In gcc/objc/: 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
[official-gcc.git] / gcc / objc / ChangeLog
blobf21a2137292f28b0a6d16df04e3605b58b279b8b
1 2011-04-15  Nicola Pero  <nicola.pero@meta-innovation.com>
3         * objc-act.c (ivar_of_class): New.
4         (objc_is_public): Use ivar_of_class.
6 2011-04-15  Nicola Pero  <nicola.pero@meta-innovation.com>
8         * objc-act.c (objc_get_interface_ivars): Removed.
9         (objc_detect_field_duplicates): New.
10         (hash_instance_variable): New.
11         (eq_instance_variable): New.
12         
13 2011-04-14  Nicola Pero  <nicola.pero@meta-innovation.com>
15         * objc-act.c (objc_declare_protocols): Renamed to
16         objc_declare_protocol.  Changed first argument to be an identifier
17         instead of a tree chain of identifiers, so that callers don't have
18         to create a temporary tree chain.
20 2011-04-14  Nicola Pero  <nicola.pero@meta-innovation.com>
22         * objc-act.c (objc_declare_class): Changed to take a single
23         identifier as argument instead of a tree list.  This means callers
24         don't have to build temporary tree lists to call this function.
25         (synth_module_prologue): Updated calls to objc_declare_class.
26         
27 2011-04-13  Nicola Pero  <nicola.pero@meta-innovation.com>
29         * objc-act.c (build_keyword_selector): Use get_identifier_with_length
30         instead of get_identifier.
32 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
34         * objc-lang.c (objc_init_ts): Move code for this function...
35         * objc-act.c (objc_common_init_ts): ...here. Define.
36         * objc-act.h (objc_common_init_ts): Declare.
38 2011-04-12  Nicola Pero  <nicola.pero@meta-innovation.com>
40         * objc-act.c (objc_build_message_expr): Accept two arguments
41         instead of one so that callers can simply pass the arguments
42         without having to create a temporary chain to hold them.
44 2011-04-12  Nicola Pero  <nicola.pero@meta-innovation.com>
46         * objc-act.c (comp_proto_with_proto): Do not create and use
47         inefficient temporary argument lists.  Compare the arguments
48         directly.  (match_proto_with_proto): Removed; incorporated into
49         comp_proto_with_proto ().
50         
51 2011-04-12  Nicola Pero  <nicola.pero@meta-innovation.com>
53         * objc-act.c (printable_ivar_name): New.
54         (add_instance_variable): Call printable_ivar_name() when an error
55         message needs to be printed.  Do not prepare the instance variable
56         for printing unless there is an actual error.
58 2011-04-12  Nicola Pero  <nicola.pero@meta-innovation.com>
60         * objc-act.c (objc_is_class_name, objc_is_id): For efficiency,
61         avoid calling identifier_global_value() multiple times.
63 2011-04-12  Martin Jambor  <mjambor@suse.cz>
65         * objc-act.c (mark_referenced_methods): Call cgraph_get_create_node
66         instead of cgraph_node.
68 2011-04-06  Joseph Myers  <joseph@codesourcery.com>
70         * objc-act.c: Include c-target.h instead of target.h.
71         * Make-lang.in (objc/objc-act.o): Update dependencies.
73 2011-03-06  Joseph Myers  <joseph@codesourcery.com>
75         * lang-specs.h: Match -save-temps* instead of -save-temps.
77 2011-02-26  Nicola Pero  <nicola.pero@meta-innovation.com>
79         * objc-act.c (objc_v2_encode_prop_attr): Rewritten.
80         
81 2011-02-23  Nicola Pero  <nicola.pero@meta-innovation.com>
83         * objc-act.c (build_private_template): Do not copy the
84         CLASS_HAS_EXCEPTION_ATTR from the class to the struct.
85         * objc-act.h (CLASS_HAS_EXCEPTION_ATTR): Define using
86         TYPE_LANG_SLOT_0.
88 2011-02-22  Nicola Pero  <nicola.pero@meta-innovation.com>
90         PR objc/47832
91         * objc-act.c (flexible_array_type_p): New.
92         (add_instance_variable): Produce an error if an instance variable
93         uses flexible array members.
94         (encode_array): Do not emit an error if encoding a flexible array
95         type while generating instance variables.
97 2011-02-21  Mike Stump  <mikestump@comcast.net>
99         * Make-lang.in (check_objc_parallelize): Refine for 4 processor
100         machines.
102 2011-02-20  Nicola Pero  <nicola.pero@meta-innovation.com>
104         * objc-gnu-runtime-abi-01.c (TARGET_64BIT): Removed.  Removed
105         usage of padding fields.  Do not include tm.h.
106         * objc-act.c (objc_write_global_declaration): Set input_location
107         to BUILTINS_LOCATION while generating runtime metadata.
109 2011-01-20  Nicola Pero  <nicola.pero@meta-innovation.com>
111         PR objc/47784
112         * objc-act.c (objc_maybe_build_modify_expr): If 'rhs' has side
113         effects, do not use a temporary variable.
115 2011-01-19  Nicola Pero  <nicola.pero@meta-innovation.com>
117         * objc-next-runtime-abi-01.c: Updated comments.
118         * objc-next-runtime-abi-02.c: Same.
120 2011-01-19  Nicola Pero  <nicola.pero@meta-innovation.com>
122         * objc-act.c (objc_init, generate_struct_by_value_array): Updated
123         comments.
125 2011-01-19  Nicola Pero  <nicola.pero@meta-innovation.com>
127         * objc-act.c: Updated comments.
128         * objc-next-runtime-abi-02.c: Same.
129         * objc-runtime-shared-support.c: Same.
130         * objc-runtime-hooks.h: Same.
131         * objc-act.h: Same.
132         * objc-gnu-runtime-abi-01.c: Same.
134 2011-01-19  Nicola Pero  <nicola.pero@meta-innovation.com>
136         * objc-gnu-runtime-abi-01.c (objc_generate_v1_gnu_metadata): Do
137         not generate metadata if there is nothing to put into it.
139 2011-02-17  Iain Sandoe  <iains@gcc.gnu.org>
141         * config-lang.in (gtfiles): Updated.
142         * Make-lang.in (START_HDRS): New.
143         (OBJC_OBJS): Added new object files.
144         (objc/objc-act.o): Updated prerequisites.
145         (objc/objc-lang.o): Updated prerequisites.
146         (objc/objc-runtime-shared-support.o): New.
147         (objc/objc-gnu-runtime-abi-01.o): New.
148         (objc/objc-next-runtime-abi-01.o): New.
149         (objc/objc-next-runtime-abi-02.o): New.
150         * objc-runtime-hooks.h: New.
151         * objc-runtime-shared-support.h: New.
152         * objc-runtime-shared-support.c: New.
153         * objc-gnu-runtime-abi-01.c: New.
154         * objc-next-metadata-tags.h: New.
155         * objc-next-runtime-abi-01.c: New.
156         * objc-next-runtime-abi-02.c: New.
157         * objc-lang.c: Include c-lang.h.
158         (LANG_HOOKS_EH_PERSONALITY): Removed.
159         * objc-act.h: Moved many declarations and code from objc-act.c
160         into objc-act.h to make them available outside objc-act.c.
161         (objc_eh_runtime_type): Removed.
162         (objc_eh_personality): Removed.
163         (CLASS_HAS_EXCEPTION_ATTR): New.
164         (OCTI_SUPER_SUPERFIELD_ID): New.
165         (OCTI_V1_PROP_LIST_TEMPL): New.
166         (OCTI_V1_PROP_NAME_ATTR_CHAIN): New.
167         (super_superclassfield_id): New.
168         (objc_prop_list_ptr): New.
169         (prop_names_attr_chain): New.
170         * objc-act.c: Include new runtime headers.  Moved many #defines
171         and declarations into objc-act.h and
172         objc-runtime-shared-support.h.  Made some corresponding functions
173         non-static, and moved some others into
174         objc-runtime-shared-support.c.  Moved metadata generation code
175         into the new runtime hook files.
176         (ivar_offset_hash_list): New.
177         (objc_init): Call generate_struct_value_by_array() before doing
178         any runtime initialization.  Create the appropriate runtime hook
179         structures.
180         (init_objc): Removed.  Code moved directly into objc_init.
181         (finish_objc): Removed.  Code moved directly into
182         objc_write_global_declarations.
183         (objc_write_global_declarations): Do the warn_selector checks
184         before emitting metadata.  Use a runtime hook to emit the
185         metadata.  Do not emit the metadata or do -gen-decls processing if
186         -fsyntax-only or we are producing a PCH.
187         (build_objc_exception_stuff): Renamed to
188         build_common_objc_exception_stuff.  Remove TREE_NOTHROW flag from
189         objc_exception_throw_decl.
190         (synth_module_prologue): Call runtime initialize hook instead of
191         building runtime declarations here.  Use the
192         default_constant_string_class_name runtime hook to set the
193         constant string class name.
194         (objc_build_string_object): Call the setup_const_string_class_decl
195         runtime hook instead of setup_string_decl.  Call the
196         build_const_string_constructor runtime hook instead of building
197         the string object here.
198         (get_objc_string_decl): Added prop_names_attr case.  Removed
199         gcc_unreachable() at the end.
200         (objc_begin_catch_clause): Distinguish between @catch (...) and
201         @catch (id x).  Call the begin_catch runtime hook instead of
202         building the CATCH_EXPR here.
203         (objc_finish_catch_clause): Call the finish_catch runtime hook
204         instead of adding the catch here.
205         (objc_finish_try_stmt): Call the finish_try_stmt runtime hook
206         instead of doing it here.
207         (objc_build_throw_stmt): Bail out early for error_mark_node.  Call
208         the build_exc_ptr runtime hook instead of objc_build_exc_ptr.
209         Call the build_throw_stmt runtime hook instead of building the
210         throw call here.
211         (objc_generate_cxx_cdtors): Set has_cxx_cdtors for the GNU runtime
212         as well.
213         (get_arg_type_list): Call the get_arg_type_list_base runtime hook
214         instead of building the list of arguments here.
215         (receiver_is_class_object): Call the receiver_is_class_object
216         runtime hook instead of doing the check here.  Call the
217         tag_getclass runtime hook instead of using TAG_GETCLASS.
218         (objc_finish_message_expr): Call the build_objc_method_call
219         runtime hook.
220         (objc_build_protocol_expr): Call the get_protocol_reference
221         runtime hook.
222         (objc_build_selector_expr): Call the build_selector_reference
223         runtime hook.
224         (build_ivar_reference): Call the build_ivar_reference runtime
225         hook.
226         (hash_init): Set up ivar_offset_hash_list.
227         (start_class): Recognize the objc_exception attribute and store
228         it.
229         (continue_class): Use the class_decl and metaclass_decl runtime
230         hooks.
231         (build_objc_property_accessor_helpers): Renamed to
232         build_common_objc_property_accessor_helpers.  Do not build
233         objc_copyStruct_decl, objc_getPropertyStruct_decl and
234         objc_setPropertyStruct_decl.
235         (objc_synthesize_getter): Check what struct setter/getter helper
236         is available instead of checking the type of runtime.
237         (get_super_receiver): Use the super_superclassfield_ident runtime
238         hook.  Added assert.  Use the get_class_super_ref and
239         get_category_super_ref runtime hooks.
240         (objc_v2_encode_prop_attr): New.
241         
242 2011-01-17  Nicola Pero  <nicola.pero@meta-innovation.com>
244         PR objc/47314
245         * objc-act.c (finish_objc): When calling check_duplicates to check
246         duplicated instance methods, set 'is_class' to 0, not 1.
248 2011-01-14  Ben Elliston  <bje@au.ibm.com>
250         PR 19162
251         * objc-act.c (generate_struct_by_value_array): Do not output a
252         definition for struct_forward_array.
254 2011-01-08  Iain Sandoe  <iains@gcc.gnu.org>
256         * objc-act.c (objc_finish_foreach_loop): Mark collection expression
257         as read.
259 2011-01-02  H.J. Lu  <hongjiu.lu@intel.com>
261         * objc-act.c (check_that_protocol_is_defined): Fix a typo.
263 2011-01-02  Nicola Pero  <nicola.pero@meta-innovation.com>
265         * objc-act.c (check_that_protocol_is_defined): New.
266         (lookup_protocol): Call check_that_protocol_is_defined.
268 2010-12-30  Nicola Pero  <nicola.pero@meta-innovation.com>
270         * objc-act.c (objc_types_are_equivalent): Fixed comparing protocol
271         lists.  Check them two-ways to fix comparisons when one protocol
272         implements the other one, or when one list contains duplicated
273         protocols.
275 2010-12-30  Nicola Pero  <nicola.pero@meta-innovation.com>
277         * objc-act.c (objc_add_method): When emitting an error because a
278         method with the same name but conflicting types is found in the
279         same class or category interface, print a note with the location
280         of the original method.  Also, improved the error message to
281         clearly state that the conflict is due to conflicting types, and
282         produce it for protocols as well.  Emit an error if two identical
283         methods are declared in a protocol, but one is @required and the
284         other one is @optional.
286 2010-12-30  Nicola Pero  <nicola.pero@meta-innovation.com>
288         * objc-act.c (start_class): Warn when a class attribute is
289         ignored.
290         (objc_declare_protocols): Warn when a protocol attribute in a
291         protocol forward-declaration is ignored.
292         (start_protocol): Warn when a protocol attribute is ignored.
294 2010-12-30  Nicola Pero  <nicola.pero@meta-innovation.com>
296         * objc-act.c (objc_set_method_opt): Tidy up error messages.  In
297         particular, explicitly mention whether the error is due to the
298         @optional or @required keyword instead of mentioning
299         "@optional/@required".
301 2010-12-29  Nicola Pero  <nicola.pero@meta-innovation.com>
303         PR objc/47118
304         * objc-act.c (objc_build_synchronized): Check the argument of
305         @synchronized and emit an appropriate error if it is not a valid
306         Objective-C object.  Deal gracefully with that case.  Updated
307         comments and variable names.
309 2010-12-29  Nicola Pero  <nicola.pero@meta-innovation.com>
311         PR objc/47075
312         * objc-act.h (PROPERTY_REF_DEPRECATED_GETTER): New.
313         * objc-tree.def (PROPERTY_REF): Increased the number of operands
314         from 3 to 4.
315         * objc-act.c (objc_finish_message_expr): Added optional argument
316         allowing to return the deprecated method prototype for deprecated
317         methods, instead of immediately emitting the deprecation warning.
318         (objc_maybe_build_component_ref): Do not warn for a deprecated
319         property.  When building the getter call, get the deprecated
320         method prototype from objc_finish_message_expr() and put it into
321         the PROPERTY_REF.
322         (objc_build_class_component_ref): Same change.
323         (finish_class): Mark the getter and setter as deprecated if they
324         are generated from a deprecated property.
325         (objc_gimplify_property_ref): If the getter is deprecated, emit a
326         deprecation warning.
327         (objc_build_setter_call, objc_build_message_expr,
328         objc_finish_foreach_loop): Updated call to
329         objc_finish_message_expr.
330         
331 2010-12-28  Nicola Pero  <nicola.pero@meta-innovation.com>
333         PR objc/47076
334         * objc-act.c (lookup_protocol): Added 'definition_required'
335         argument.  If 'definition_required', and the protocol is not
336         defined, emit a warning.
337         (objc_declare_protocols): Updated call to lookup_protocol.
338         (start_protocol): Same change.
339         (check_protocol_recursively): Same change.
340         (objc_build_protocol_expr): Same change.
341         (lookup_and_install_protocols): Added definition_required argument.
342         Pass it to lookup_protocol.
343         (objc_get_protocol_qualified_type): Updated call to
344         lookup_and_install_protocols.
345         (start_class): Updated calls to lookup_and_install_protocols; pass
346         true to 'definition_required' to get the warnings.
347         (start_protocol): Updated calls to lookup_and_install_protocols.
349 2010-12-28  Nicola Pero  <nicola.pero@meta-innovation.com>
351         * objc-act.c (objc_start_category_interface): Produce an error if
352         a class extension is found after the class @implementation.
354 2010-12-28  Nicola Pero  <nicola.pero@meta-innovation.com>
356         PR objc/47073
357         * objc-act.c (encode_method_prototype): Fixed both location and
358         format string of error "type %qT does not have a known size".
360 2010-12-26  Nicola Pero  <nicola.pero@meta-innovation.com>
362         * config-lang.in (gtfiles): Added c-family/c-cppbuiltin.c.
364 2010-12-22  Nathan Froyd  <froydnj@codesourcery.com>
366         * objc-act.c (next_sjlj_build_enter_and_setjmp): Use prototype_p.
368 2010-12-18  Nicola Pero  <nicola.pero@meta-innovation.com>
370         * objc-act.c (objc_init): Call using_eh_for_cleanups.
371         (objc_init_exceptions): Renamed to objc_maybe_warn_exceptions.  Do
372         not call using_eh_for_cleanups.
373         (objc_begin_try_stmt): Do not call objc_init_exceptions.
374         (objc_build_throw_stmt): Updated call to
375         objc_maybe_warn_exceptions.
377 2010-12-18  Iain Sandoe  <iains@gcc.gnu.org>
379         * objc/objc-act.c (objc_eh_personality): Select personality name on
380         runtime.
381         (objc_init_exceptions): New.
382         (objc_begin_try_stmt): Use objc_init_exceptions.
383         (objc_build_throw_stmt): Likewise.
385 2010-12-10  Nicola Pero  <nicola.pero@meta-innovation.com>
387         * objc-act.c (objc_in_class_extension): New.
388         (objc_start_category_interface): If -fobjc-std=objc1
389         was specified, produce an error if a class extension is used.
390         (objc_finish_interface): Reset objc_in_class_extension to false.
391         (objc_add_property_declaration): Allow a class extension to extend
392         readonly properties in the main @interface to be readwrite.
393         (start_class): Added code to deal with class extensions.  In that
394         case, return the existing interface after adding any additional
395         protocols to it and setting objc_in_class_extension to true.
396         (continue_class): If in a class extension, do not generate the
397         instance variable template.
399 2010-12-08  Nicola Pero  <nicola.pero@meta-innovation.com>
401         * objc-act.c (objc_build_throw_stmt): Check that the argument of
402         @throw is an object and emit an error if not.
404 2010-12-08  Nicola Pero  <nicola.pero@meta-innovation.com>
406         * objc-act.c (objc_finish_foreach_loop): Use error_at() instead of
407         error() when printing an error about the iterating variable or
408         collection not being an object.
410 2010-12-06  Nicola Pero  <nicola.pero@meta-innovation.com>
412         * objc-act.c (objc_finish_foreach_loop): Mark the
413         object_expression as used.
415 2010-12-06  Nicola Pero  <nicola.pero@meta-innovation.com>
417         * objc-act.c: Include c-family/c-objc.h.
418         * objc-lang.c: Same change.
419         * Make-lang.in (objc/objc-act.o): Depend on
420         c-family/c-objc.h.
421         (objc/objc-lang.o): Same change.
422         * config-lang.in (gtfiles): Added c-family/c-objc.h.
423         
424 2010-12-02  Joseph Myers  <joseph@codesourcery.com>
426         * lang-specs.h: Don't handle -ftraditional.
428 2010-12-02  Nicola Pero  <nicola.pero@meta-innovation.com>
430         * objc-act.c (objc_build_throw_stmt): Return error_mark_node and
431         not NULL_TREE when a @throw is used outside of a @catch block.
433 2010-11-30  Nicola Pero  <nicola.pero@meta-innovation.com>
435         * objc-act.c (objc_build_volatilized_type): Removed.
436         (objc_non_volatilized_type): Removed.
437         (objc_type_quals_match): Removed.
438         (local_variables_to_volatilize): New.
439         (objc_volatilize_decl): Add the decl to volatilize to
440         local_variables_to_volatilize, but don't volatilize it yet.
441         (objc_finish_function): New.
442         * objc-act.h (local_variables_to_volatilize): New.
444 2010-11-29  Nicola Pero  <nicola.pero@meta-innovation.com>
445             Mike Stump  <mikestump@comcast.net>
447         Allow 'make check-objc -j2'
448         * Make-lang.in (lang_checks_parallelized): New.
449         (check_objc_parallelize): New.
450         
451 2010-11-29  Nicola Pero  <nicola.pero@meta-innovation.com>
453         * objc-act.c (start_class): When a class is reimplemented,
454         generate an error and avoid adding the class to the list of
455         implemented classes again, but do not return error_mark_node.
457 2010-11-29  Nicola Pero  <nicola.pero@meta-innovation.com>
459         * objc-act.c (objc_maybe_build_component_ref): Removed TODO.
461 2010-11-29  Nicola Pero  <nicola.pero@meta-innovation.com>
463         * objc-act.c (objc_eh_runtime_type): Avoid ICE if error_mark_node
464         is passed as argument.
465         (objc_begin_catch_clause): Added code to deal with an
466         error_mark_node or NULL_TREE argument.  Improved checks for
467         invalid arguments.  Added code to traverse typedefs.
469 2010-11-29  Nicola Pero  <nicola.pero@meta-innovation.com>
471         * objc-act.c (objc_demangle): Return immediately if the string is
472         too short.  Detect names that do not need demangling, and return
473         them unchanged.
475 2010-11-27  Nicola Pero  <nicola.pero@meta-innovation.com>
477         Implemented optional properties.
478         * objc-act.h (PROPERTY_OPTIONAL): New.
479         * objc-act.c (objc_add_property_declaration): Set
480         PROPERTY_OPTIONAL if appropriate.
481         (finish_class): When generating definitions of setter and getter
482         methods associated with a property for a protocol, mark them as
483         optional if the property is optional.
484         (maybe_make_artificial_property_decl): Added 'getter_name'
485         argument.  Set PROPERTY_OPTIONAL.
486         (objc_maybe_build_component_ref): Updated calls to
487         maybe_make_artificial_property_decl.  Added code for optional,
488         readonly properties.
489         (objc_build_class_component_ref): Updated call to
490         maybe_make_artificial_property_decl.
491         
492 2010-11-27  Nicola Pero  <nicola.pero@meta-innovation.com>
494         * objc-act.c (objc_build_struct): Fixed loops that save and
495         restore TYPE_OBJC_INFO to iterate over all variants of the type; a
496         special case for the current type is then no longer required.
497         Duplicate TYPE_LANG_SPECIFIC for each type before restoring
498         TYPE_OBJC_INFO.
499         (objc_get_protocol_qualified_type): Updated comments.
500         
501 2010-11-25  Nicola Pero  <nicola.pero@meta-innovation.com>
503         * objc-act.c (objc_build_struct): Install TYPE_OBJC_INTERFACE
504         after finish_struct, not before, otherwise it may be wiped out by
505         it.  This fixes spurious warnings when a class has more than 15
506         instance variables.
508 2010-11-23  Nicola Pero  <nicola.pero@meta-innovation.com>
510         PR objc/24358
511         * lang-specs.h: Added objective-c-cpp-output.  Mapped .mi to
512         objective-c-cpp-output instead of objc-cpp-output.  Print a
513         deprecation note every time objc-cpp-output is requested.
515 2010-11-22  Joseph Myers  <joseph@codesourcery.com>
517         * objc-act.c (write_symbols): Don't declare here.
519 2010-11-22  Nicola Pero  <nicola.pero@meta-innovation.com>
521         PR objc/41108
522         * objc-act.c (objc_generate_write_barrier): Added assert to make sure
523         this function is only called with the next runtime.
525 2010-11-20  Jakub Jelinek  <jakub@redhat.com>
527         PR c/46547
528         * objc-act.c (in_late_binary_op): Remove.
530 2010-11-19  Nicola Pero  <nicola.pero@meta-innovation.com>
532         * objc-act.c (objc_start_class_interface): Do not warn that class
533         attributes are unimplemented.  Pass the attributes to start_class.
534         (objc_start_category_interface): Updated call to start_class.
535         (objc_start_class_implementation): Same change.
536         (objc_start_category_implementation): Same change.
537         (objc_build_class_component_ref): Warn if the class is deprecated.
538         (build_private_template): Mark the template as deprecated if the
539         class is deprecated.
540         (start_class): Added 'attributes' argument.  Emit a warning if
541         using a deprecated class as superclass of a class, or original
542         class of a category.  Recognize the 'deprecated' attribute when
543         starting and interface, and mark the interface with
544         TREE_DEPRECATED if present.  Store attributes in the interface.
545         
546 2010-11-19  Nicola Pero  <nicola.pero@meta-innovation.com>      
548         * objc-act.c (lookup_protocol): Added 'warn_if_deprecated'
549         argument.  If it is 'true' and the protocol is deprecated, emit a
550         deprecation warning.
551         (objc_start_protocol): Do not warn that protocol attributes are
552         unimplemented.  Pass the attributes to start_protocol.
553         (start_protocol): Added attributes argument.  Recognize the
554         'deprecated' attribute and mark the protocols with TREE_DEPRECATED
555         if present.  Store attributes in the protocol.
556         (objc_declare_protocols): Added 'attributes' argument.  Recognize
557         the 'deprecated' attribute and mark the protocols with
558         TREE_DEPRECATED if present.  Store attributes in the protocol.
559         Updated call to lookup_protocol.
560         (objc_build_protocol_expr): Updated call to lookup_protocol.
561         (check_protocol_recursively): Same change.
562         (lookup_and_install_protocols): Same change.
563         * objc-act.h: Updated comments.
564         
565 2010-11-17  Nicola Pero  <nicola.pero@meta-innovation.com>
567         * objc-act.c (lookup_method_in_protocol_list): Search methods in
568         PROTOCOL_OPTIONAL_CLS_METHODS / PROTOCOL_OPTIONAL_NST_METHODS if
569         they are not found in PROTOCOL_CLS_METHODS / PROTOCOL_NST_METHODS.
571 2010-11-15  Nicola Pero  <nicola.pero@meta-innovation.com>
573         * objc-act.c (objc_build_setter_call): New.
574         (objc_maybe_build_modify_expr): Rewritten to build a compound
575         statement.
576         (objc_build_incr_expr_for_property_ref): Updated calls to
577         objc_maybe_build_modify_expr to call objc_build_setter_call
578         instead.  Use build_modify_expr () instead of build2 (MODIFY_EXPR,
579         ...).  Use convert () instead of build1 (NOP_EXPR, ...).  Use
580         TREE_NO_WARNING on the final compound statement to silence C++
581         warnings.
583 2010-11-15  Nicola Pero  <nicola.pero@meta-innovation.com>
585         * objc-act.c (objc_build_incr_expr_for_property_ref): New.
586         (objc_create_temporary_var): Moved it towards the beginning of the
587         file so that objc_build_incr_expr_for_property_ref can use it.
589 2010-11-14  Nicola Pero  <nicola.pero@meta-innovation.com>
591         * objc-act.c (objc_add_property_declaration): Check that the decl
592         we received from the parser is a FIELD_DECL; reject array and
593         bitfield properties.  Convert the warning when a property is
594         readonly and a setter is specified into an error.  Convert errors
595         when a property declaration does not match a property declaration
596         in a superclass into warnings.
597         (objc_add_synthesize_declaration_for_property): Use
598         DECL_BIT_FIELD_TYPE to determine the type of an instance variable
599         if it is a bitfield.  Throw an error if we are asked to synthesize
600         setters/getters for a bitfield instance variable but the property
601         is not appropriate - it must be assign and nonatomic.  If the
602         property is readonly, allow the instance variable type to be a
603         specialization of the property type.
604         (objc_type_valid_for_messaging): Fixed returning 'false' for a
605         Class qualified with a protocol when the 'accept_classes' argument
606         is 'false'.
608 2010-11-13  Nicola Pero  <nicola.pero@meta-innovation.com>
610         * objc-act.c (objc_get_protocol_qualified_type): detect cases
611         where we are asked to attach a protocol to something which is not
612         an Objective-C object type, and produce an error.
614 2010-11-11  Nicola Pero  <nicola.pero@meta-innovation.com>
616         * objc-act.c (objc_add_property_declaration): Check that the type
617         of a property and of an inherited property match.
618         (objc_maybe_build_component_ref): Tidied up indentation and
619         comments.
620         (objc_common_type): Added new type of check (-5).
621         (objc_add_synthesize_declaration_for_property): Check that the
622         property to synthesize and the instance variable to use have the
623         same type.
624         
625 2010-11-10  Joseph Myers  <joseph@codesourcery.com>
627         * objc-act.c (objc_init): Use %' in diagnostic.
628         (objc_set_method_opt): Remove trailing '.' from diagnostic.
630 2010-11-10  Joseph Myers  <joseph@codesourcery.com>
632         * objc-act.c (dump_base_name): Don't declare here.
634 2010-11-08  Nicola Pero  <nicola.pero@meta-innovation.com>
636         * objc-act.c (objc_add_dynamic_declaration_for_property): Do not
637         search for the @property declation only in the current context,
638         but also in inherited properties.  Do not mark the original
639         PROPERTY_DECL in the @interface or @protocol with
640         PROPERTY_DYNAMIC.
641         (check_methods): To check if a method is associated with a
642         @dynamic property, search for the property in IMPL_PROPERTY_DECL.
643         (check_accessible_methods): Same change.
644         * objc-act.h: Updated comment.
646 2010-11-08  Nicola Pero  <nicola.pero@meta-innovation.com>
648         * objc-act.c (objc_add_synthesize_declaration_for_property):
649         Iterate over IMPL_PROPERTY_DECL, not CLASS_PROPERTY_DECL, when
650         checking for an existing @synthesize or @dynamic declaration.
651         Search for an inherited @property declaration if none is found in
652         the local interface.  If the required instance variable does not
653         exist, return instead of trying to continue to prevent a compiler
654         crash later.  Check that the instance variable is not already
655         being used by another @synthesize.
656         (objc_add_dynamic_declaration_for_property): Iterate over
657         IMPL_PROPERTY_DECL, not CLASS_PROPERTY_DECL, when checking for an
658         existing @synthesize or @dynamic declaration.
659         (objc_synthesize_getter): Search for the getter declaration in
660         protocols and superclasses as well.
661         (objc_synthesize_setter): Search for the setter declaration in
662         protocols and superclasses as well.
663         
664 2010-11-08  Nicola Pero  <nicola.pero@meta-innovation.com>
666         * objc-act.c (lookup_property): When checking categories, also
667         check the protocols attached to each.
668         (objc_add_property_declaration): Determine the
669         PROPERTY_SETTER_NAME and PROPERTY_GETTER_NAME here.  Tidied up
670         error message.  Search for an existing property declaration with
671         the same name which would be inherited from the class hiearchy,
672         and produce an error if it has incompatible attributes.
673         (check_methods): Changed second parameter.  If the method is a
674         getter or setter for a property, do not warn if it is inherited as
675         opposed to implemented directly in the class.
676         (check_protocol): Updated calls to check_methods.
677         (finish_class): Do not determine the PROPERTY_SETTER_NAME and
678         PROPERTY_GETTER_NAME here; this is now done earlier, in
679         objc_add_property_declaration.
680         * objc-act.h (CLASS_NAME, CLASS_SUPER_NAME): Added comments.
681         
682 2010-11-06  Nicola Pero  <nicola.pero@meta-innovation.com>
684         Fixed using the Objective-C 2.0 dot-syntax with self and super.
685         * objc-act.c (OBJC_LOOKUP_NO_INSTANCE_METHODS_OF_ROOT_CLASS): New.
686         (maybe_make_artificial_property_decl): Added 'implementation'
687         argument.  Use OBJC_LOOKUP_NO_INSTANCE_METHODS_OF_ROOT_CLASS when
688         looking up getters or setters for a class.  If an implementation
689         is specified, search it as well for a getter or setter.
690         (objc_maybe_build_component_ref): Updated calls to
691         maybe_make_artificial_property_decl; added code to deal with
692         'self' and 'super' and with methods declared locally in the
693         implementation.  Store the getter call expression in the
694         PROPERTY_REF instead of throwing it away.
695         (objc_build_class_component_ref): Updated calls to
696         maybe_make_artificial_property_decl, and store the getter call
697         expression in PROPERTY_REF instead of throwing it away.
698         (lookup_method_static): Implemented
699         OBJC_LOOKUP_NO_INSTANCE_METHODS_OF_ROOT_CLASS option.
700         (objc_gimplify_property_ref): Do not build the getter method call
701         here; instead use the one stored in the PROPERTY_REF.  If it's not
702         there, produce helpful error messages.
703         * objc-tree.def (PROPERTY_REF): Increased the number of operands
704         from 2 to 3.  Updated comments.
705         * objc-act.h (PROPERTY_REF_GETTER_CALL): New.
706         
707 2010-11-06  Iain Sandoe  <iains@gcc.gnu.org>
709         PR target/44981
710         * objc-act.c (objc_build_string_object): Amend for renamed hook.
711         (objc_string_ref_type_p): New.
712         (objc_check_format_arg): New.
714 2010-11-04  Nicola Pero  <nicola.pero@meta-innovation.com>
716         Fixed using the Objective-C 2.0 dot-syntax with class names.    
717         * objc-act.c (objc_build_class_component_ref): New.
719 2010-11-03  Nicola Pero  <nicola.pero@meta-innovation.com>
721         * objc-act.c (objc_add_dynamic_declaration): Allow @dynamic in a
722         category.
723         (objc_type_valid_for_messaging): Added 'accept_classes' argument;
724         if set to 'true', return 'true' for Class objects.  Do not remove
725         more than on pointer indirection.
726         (objc_add_property_declaration): Only warn about 'assign'
727         semantics for Objective-C objects if warn_property_assign_default;
728         and do not warn if the property is readonly or if the type is a Class.
729         (objc_finish_foreach_loop): Updated calls to
730         objc_type_valid_for_messaging.
731         
732 2010-11-03  Nicola Pero  <nicola.pero@meta-innovation.com>
734         Implemented -fobjc-std=objc1 flag.
735         * objc-act.c (objc_start_class_interface): If attributes are
736         specified when flag_objc1_only is set, print an error.
737         (objc_start_category_interface): Same change.
738         (objc_start_protocol): Same change.
739         (objc_add_method_declaration): Same change.
740         (objc_start_method_definition): Same change.
741         (objc_build_keyword_decl): Same change.
742         (objc_set_visibility): If OBJC_IVAR_VIS_PACKAGE is used when
743         flag_objc1_set is set, print an error.
744         (objc_set_method_opt): If flag_objc1_only is set, print an error.
745         (objc_add_property_declaration): Same change.
746         (objc_add_synthesize_declaration): Same change.
747         (objc_add_dynamic_declaration): Same change.
748         (objc_finish_foreach_loop): Same change.
749         (objc_maybe_build_component_ref): If flag_objc1_only is set,
750         return immediately.
752 2010-11-03  Nicola Pero  <nicola.pero@meta-innovation.com>
754         * objc-act.c (maybe_make_artificial_property_decl): New.
755         (objc_maybe_build_component_ref): Call
756         maybe_make_artificial_property_decl if a property can not be
757         found.  Do not call objc_finish_message_expr if
758         PROPERTY_HAS_NO_GETTER.
759         * objc-act.h Updated comments.
760         (PROPERTY_HAS_NO_GETTER): New.
761         (PROPERTY_HAS_NO_SETTER): New.
762         * objc-tree.def: Updated comment.
763         
764 2010-11-01  Nicola Pero  <nicola.pero@meta-innovation.com>
766         Implemented format and noreturn attributes for Objective-C methods.
767         * objc-act.c (objc_start_method_definition): If method attributes
768         are specified emit a warning and ignore them.
769         (build_objc_method_call): Moved deprecation warnings from here ...
770         (objc_finish_message_expr): to here.  Do not emit deprecation
771         warnings if the receiver is of type 'id'.
772         (really_start_method): Install 'deprecation' and 'noreturn'
773         attributes.
774         (objc_decl_method_attributes): Carefully filter out the list of
775         attributes, allowing only "noreturn", "format", "sentinel" and
776         "deprecated".  In the case of "format", adjust the arguments.
777         Always process the attributes in the same way no matter if
778         "sentinel" is in the list or not.
779         
780 2010-11-01  Nicola Pero  <nicola.pero@meta-innovation.com>
782         * objc-act.c (objc_maybe_build_component_ref): Warn about using
783         deprecated properties.
784         (objc_maybe_printable_name): Support PROPERTY_DECL.
785         
786 2010-11-01  Nicola Pero  <nicola.pero@meta-innovation.com>
788         Implemented Objective-C 2.0 property accessors. 
789         * objc-act.h (enum objc_tree_index): Added OCTI_GET_PROPERTY_DECL,
790         OCTI_SET_PROPERTY_DECL, OCTI_COPY_STRUCT_DECL,
791         OCTI_GET_PROPERTY_STRUCT_DECL and OCTI_SET_PROPERTY_STRUCT_DECL.
792         (objc_getProperty_decl): New.
793         (objc_setProperty_decl): New.
794         (objc_copyStruct_decl): New.
795         (objc_getPropertyStruct_decl): New.
796         (objc_setPropertyStruct_decl): New.
797         * objc-act.c (build_objc_property_accessor_helpers): New.
798         (synth_module_prologue): Call
799         build_objc_property_accessor_helpers.
800         (lookup_ivar): New.
801         (objc_synthesize_getter): Implemented synthesizing getters that
802         work with properties that are not nonatomic, assign properties.
803         (objc_synthesize_setter): Implemented synthesizing setters that
804         work with properties that are not nonatomic, assign properties.
805         
806 2010-10-30  Nicola Pero  <nicola.pero@meta-innovation.com>
808         Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
809         * objc-tree.def (PROPERTY_REF): New.
810         * objc-act.h: Added comments for all the PROPERTY_ macros.
811         (PROPERTY_NAME): Use DECL_NAME.
812         (PROPERTY_COPIES): Removed.
813         (PROPERTY_READONLY): Use DECL_LANG_FLAG_0 for it.
814         (PROPERTY_NONATOMIC): New.
815         (objc_property_assign_semantics): Make it a typedef.
816         (PROPERTY_ASSIGN_SEMANTICS): New.
817         (PROPERTY_DYNAMIC): New.
818         (PROPERTY_REF_OBJECT): New.
819         (PROPERTY_REF_PROPERTY_DECL): New.
820         * objc-act.c (CALL_EXPR_OBJC_PROPERTY_GETTER): Removed.
821         (in_objc_property_setter_name_context): Removed.
822         (objc_add_property_declaration): Removed copies and ivar arguments
823         and code supporting them.  Fixed recovering when readonly and
824         setter attributes are specified.  Removed support for @property in
825         @implementation context.  Updated error message.  Double-check
826         that a property does not have a DECL_INITIAL.  Validate the
827         property assign semantics and emit appropriate errors and
828         warnings.  Check for duplicate property declarations.  Set
829         DECL_SOURCE_LOCATION, TREE_DEPRECATED, PROPERTY_NONATOMIC,
830         PROPERTY_ASSIGN_SEMANTICS and PROPERTY_DYNAMIC of the new
831         PROPERTY_DECL.  Do not set PROPERTY_COPIES.  Set
832         PROPERTY_IVAR_NAME to NULL_TREE.
833         (objc_build_getter_call): Renamed to
834         objc_maybe_build_component_ref.  If the property is not found in
835         the interface, search in the protocol list.  Do not generate the
836         getter call; instead, build and return a PROPERTY_REF.
837         (objc_is_property_ref): New.
838         (objc_setter_func_call): Removed.
839         (get_selector_from_reference): Removed.
840         (is_property): Removed.
841         (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
842         Updated to work on a PROPERTY_REF and use the PROPERTY_DECL from
843         the PROPERTY_REF.  Generate an error if the property is read-only.
844         (build_property_reference): Removed.
845         (objc_finish_message_expr): Removed check to produce "readonly
846         property can not be set" error when
847         in_objc_property_setter_name_context.  We now generate the error
848         earlier, in objc_maybe_build_modify_expr, which will only generate
849         the setter call if the property is readwrite.
850         (check_methods): Recognize dynamic properties.
851         (check_methods_accessible): Same change.
852         (objc_build_property_ivar_name): Removed.
853         (objc_build_property_setter_name): Dropped bool argument.  Always
854         add the ':' at the end.
855         (objc_gen_one_property_datum): Removed.
856         (objc_process_getter_setter): Removed.
857         (objc_synthesize_getter): Mark 'klass' argument as unused.  Use
858         PROPERTY_GETTER_NAME instead of PROPERTY_NAME.  Set the
859         DECL_SOURCE_LOCATION of the new method to be the same as the one
860         for the @synthesize.  Always use PROPERTY_IVAR_NAME as it is
861         instead of trying to guess what it should be.  Removed use of
862         CLASS_IVARS.  Use the location of @synthesize for c_finish_return
863         and c_end_compound_statement.
864         (objc_synthesize_setter): Mark 'klass' argument as unused.  Use
865         PROPERTY_SETTER_NAME instead of trying to guess what it should be.
866         Set the DECL_SOURCE_LOCATION of the new method to be the same as
867         the one for the @synthesize.  Always use PROPERTY_IVAR_NAME as it
868         is instead of trying to guess what it should be.  Removed use of
869         CLASS_IVARS.  Use the location of @synthesize for c_finish_return
870         and c_end_compound_statement.  Emit an error and keep going,
871         instead of aborting, if the setter prototype does not have the
872         expected argument.
873         (objc_add_synthesize_declaration_for_property): New.
874         (objc_add_synthesize_declaration): Removed ATTRIBUTE_UNUSED from
875         all arguments.  Improved error message.  Filled in the rest of the
876         function, which used to be a placeholder, with an actual
877         implementation.
878         (objc_add_dynamic_declaration_for_property): New.
879         (objc_add_dynamic_declaration): Removed ATTRIBUTE_UNUSED from all
880         arguments.  Improved error message.  Filled in the rest of the
881         function, which used to be a placeholder, with an actual
882         implementation.
883         (objc_gen_property_data): Rewritten.
884         (finish_class): Added explicit switch cases for
885         CLASS_INTERFACE_TYPE, CATEGORY_INTERFACE_TYPE and
886         PROTOCOL_INTERFACE_TYPE.  Added a default switch case which is
887         gcc_unreachable.  Rewritten the processing of properties, in
888         particular to not synthesize prototypes for getters and setters if
889         they already exist and to install the getter and setter names into
890         PROPERTY_GETTER_NAME and PROPERTY_SETTER_NAME.  Do not generate
891         warnings about setter, getter and ivar property attributes.
892         (objc_lookup_ivar): Removed support for properties.
893         (objc_gimplify_property_ref): New.
894         (objc_gimplify_expr): Use a switch.  In case of a PROPERTY_REF, call
895         objc_gimplify_property_ref.
896         
897 2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>
899         * objc-act.c (objc_add_property_declaration): Added arguments to
900         pass the various property attributes that were parsed with the
901         property declaration.  Process arguments to determine the final
902         property attributes and produce error messages as appropriate.
903         Added temporary code to keep the compiler silent about variables
904         set but not used - for new attributes that are only checked but
905         have no effect yet.
906         (property_readonly): Removed.
907         (property_setter): Removed.
908         (property_getter): Removed.
909         (property_ivar): Removed.
910         (property_copies): Removed.     
911         (objc_set_property_attr): Removed.
912         * objc-act.h (enum property_assign_semantics): New.
913         
914 2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>
916         * objc-act.c (objc_add_property_variable): Renamed to
917         objc_add_property_declaration.  Added location argument.  Updated
918         warnings and errors to use it.  Use error, not fatal_error, if a
919         property declaration is found outside an interface or
920         implementation context.
921         
922 2010-10-24  Nicola Pero  <nicola.pero@meta-innovation.com>
924         * objc-act.c (objc_build_keyword_decl): Updated comments.  Do not
925         emit a warning that method parameter attributes are unimplemented.
926         Instead, store them into DECL_ATTRIBUTES of the KEYWORD_DECL.
927         (start_method_def): Copy attributes from each KEYWORD_DECL into
928         the corresponding PARM_DECL.
929         (objc_warn_deprecated_use): Removed.
930         (build_objc_method_call): Call warn_deprecated_use, not
931         objc_warn_deprecated_use.
932         (objc_maybe_printable_name): Do not try to get the identifier name
933         of DECLs that we don't recognize.  Immediately return NULL for them.
934         (objc_printable_name): Removed C++-specific case, which is no
935         longer used.  Updated comments.
936         
937 2010-10-23  Nicola Pero  <nicola.pero@meta-innovation.com>
939         * objc-act.c (OBJC_GEN_METHOD_LABEL): Updated comments.
940         (objc_demangle): Return NULL if demangling can not be done because
941         the string to demangle is not an Objective-C mangled method name.
942         Be smarter in demangling method names so that at least for methods
943         with no arguments we are able to almost always demangle '_' correctly.
944         Updated comments.
945         (objc_maybe_printable_name): New.
946         (objc_printable_name): Call objc_maybe_printable_name.  If it
947         returns NULL, call cxx_printable_name in Objective-C++.
949 2010-10-21  Iain Sandoe  <iains@gcc.gnu.org>
951         Based on the CFString implementation in FSF apple/trunk branch.
952         
953         * objc/objc-act.c (objc_build_string_object): Handle CFStrings.
955 2010-10-21  Nicola Pero  <nicola.pero@meta-innovation.com>
957         * objc-act.c (get_objc_string_decl): Use a switch instead of a
958         chain of ifs.  Use gcc_unreachable instead of abort.
959         (add_objc_string): Same change.
960         (generate_protocol_list): Same change - twice.
961         (synth_id_with_class_suffix): Same change.
962         (build_keyword_selector): Same change - twice.
963         (objc_build_message_expr): Same change.
964         (objc_build_selector_expr): Same change.
965         (check_methods): Same change - and added missing gcc_unreachable
966         for default case.
967         (check_methods_accessible): Same change - twice, and added missing
968         gcc_unreachable for default case in one of them.
969         (start_class): Same change - and added missing gcc_unreachable for
970         default case.
971         (continue_class): Same change.
972         (objc_gen_property_data): Same change.
973         (finish_class): Same change.
974         (encode_type_qualifiers): Added missing gcc_unreachable.
975         (encode_type): Small code tidy up to reduce duplicated code.  Use
976         gcc_unreachable instead of abort - twice.
977         (encode_gnu_bitfield): Use a switch instead of a chain of ifs -
978         twice.  Added missing gcc_unreachable for default case - twice.
979         (dump_interface): Use a switch instead of a chain of ifs.
980         (handle_impent): Same change.
981         
982 2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>
984         * objc-act.h (objc_inherit_code): Removed.
985         * objc-act.c (objc_inherit_code): Removed.
986         (objc_set_method_type): Removed.
987         (objc_build_method_signature): Added is_class_method argument.
988         Use it instead of the global objc_inherit_code variable.
989         (objc_add_method_declaration): Same change.
990         (objc_start_method_definition): Same change.
991         (objc_generate_cxx_ctor_or_dtor): Updated call to
992         objc_start_method_definition.  Do not call objc_set_method_type.
993         (adjust_type_for_id_default): Mark as inline.
994         (objc_synthesize_getter): Updated call to
995         objc_start_method_definition.  Do not set objc_inherit_code.
996         (objc_synthesize_setter): Updated call to
997         objc_start_method_definition.  Do not set objc_inherit_code.    
998         
999 2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>
1001         Merge from 'apple/trunk' branch on FSF servers.  Obvious updates
1002         to gcc_alloc_xxx calls in hash_init and hash_class_name_enter to
1003         get it to compile in the current trunk.
1005         2006-01-27 Fariborz Jahanian <fjahanian@apple.com>
1007         Radar 4345837
1008         * objc/objc-act.c (hash_class_name_enter): New.
1009         (hash_class_name_lookup): New.
1010         (objc_declare_alias): Enter alias name into hash table.
1011         (objc_declare_class): Enter class name into hash table.
1012         (objc_is_class_name): Do a hash look up of class name.
1013         (hash_init): Initialize the two new hash tables.
1014         * objc-act.h: Added cls_name_hash_list and als_name_hash_list 
1015         declarations, removed class_chain and alias_chain.      
1017 2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>
1019         * objc-lang.c (finish_file): Removed.
1020         * objc-act.c (objc_finish_file): Renamed to
1021         objc_write_global_declarations.  Do not try to instantiate C++
1022         templates when compiling Objective-C++ as this is now
1023         automatically done before this function is called.  Do not check
1024         for syntax-only run or PCH generation as this is done by the
1025         callers.
1026         * objc-act.h (objc_finish_file): Removed.
1027         
1028 2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>
1030         Implemented parsing @synthesize and @dynamic for
1031         Objective-C/Objective-C++.
1032         * objc-act.c (objc_add_synthesize_declaration): New.
1033         (objc_add_dynamic_declaration): New.
1035 2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>      
1037         * objc-act.c (lookup_and_install_protocols): Return NULL if passed
1038         error_mark_node.
1039         
1040 2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>
1042         Merge from 'apple/trunk' branch on FSF servers.
1044         2006-03-10  Fariborz Jahanian <fjahanian@apple.com>
1046         Radar 4407151
1047         * objc/objc-act.c (objc_is_class_name): template parameter is not
1048         an objective class name.
1049         (objc_generate_cxx_cdtors): Check for the null
1050         objc_implementation_context.    
1052 2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>
1054         Merge from 'apple/trunk' branch on FSF servers. 
1055         
1056         2005-11-08  Fariborz Jahanian <fjahanian@apple.com>
1058         Radar 4330422
1059         * objc/objc-act.c (objc_non_volatilized_type): New
1061         2005-10-07  Fariborz Jahanian <fjahanian@apple.com>
1062         
1063         Radar 4204796
1064         * objc-act.c (objc_build_volatilized_type): Build 'volatilzed'
1065         types with proper attribute set and correctly.
1066         (objc_volatilize_decl): Remove unneeded code.
1067         (objc_type_quals_match): Use the new attribute to check on
1068         'volatilzed' type.
1069         (hash_init): removed unneeded code.
1070         
1071 2010-10-17  Nicola Pero  <nicola.pero@meta-innovation.com>
1073         Merge from 'apple/trunk' branch on FSF servers.
1074         
1075         2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
1077         Radar 4133425
1078         * objc-act.c (objc_diagnose_private_ivar): New.
1080 2010-10-17  Iain Sandoe  <iains@gcc.gnu.org>
1082         * objc-act.c: Rename 'objc_public_flag' to  objc_ivar_visibility and
1083         make its type 'objc_ivar_visibility_kind'.  
1084         (objc_start_class_interface): Update to use visibility enum.
1085         (objc_start_class_implementation): Likewise.
1086         (objc_set_visibility): Update to use visibility enum, warn that 
1087         @package is handle as per @public.
1088         (add_instance_variable): Handle OBJC_IVAR_VIS_PACKAGE.
1089         * objc-act.h: Rename 'objc_public_flag' to  objc_ivar_visibility and
1090         make its type 'objc_ivar_visibility_kind'.
1092 2010-10-14  Iain Sandoe  <iains@gcc.gnu.org>
1094         merge from FSF apple 'trunk' branch. 
1095         2006 Fariborz Jahanian <fjahanian@apple.com>
1096         
1097         Radars 4436866, 4505126, 4506903, 4517826
1098         * objc-act.c (CALL_EXPR_OBJC_PROPERTY_GETTER): New.
1099         property_readonly, property_getter, property_setter, property_ivar,
1100         property_copies, in_objc_property_setter_name_context: New vars.
1101         (objc_set_property_attr): New.
1102         (objc_add_property_variable): New.
1103         (lookup_property_in_list): New.
1104         (lookup_property): New.
1105         (objc_build_getter_call): New.
1106         (objc_setter_func_call): New.
1107         (get_selector_from_reference): New.
1108         (objc_build_setter_call): New.
1109         (is_property): New.
1110         (build_property_reference): New.
1111         (objc_finish_message_expr): Detect readonly property and warn.
1112         (objc_build_property_ivar_name): New.
1113         (objc_build_property_setter_name): New.
1114         (objc_gen_one_property_datum): New.
1115         (objc_process_getter_setter): New.
1116         (objc_synthesize_getter): New.
1117         (objc_synthesize_setter): New.
1118         (objc_gen_property_data): New.
1119         (finish_class): Generate property data.
1120         (comp_proto_with_proto): Separated from ...
1121         (match_proto_with_proto): ... New.
1122         (objc_lookup_ivar): Handle properties.
1123         * objc-tree.def (PROPERTY_DECL): New tree code.
1124         * objc-act.h: CLASS_LANG_SLOT_ELTS, PROTOCOL_LANG_SLOT_ELTS update size.
1125         (METHOD_PROPERTY_CONTEXT): New.
1126         (PROPERTY_NAME): New.
1127         (PROPERTY_GETTER_NAME): New.
1128         (PROPERTY_SETTER_NAME): New.
1129         (PROPERTY_IVAR_NAME): New.
1130         (PROPERTY_READONLY): New.
1131         (PROPERTY_COPIES): New.
1132         (TOTAL_CLASS_RAW_IVARS): New.
1133         (CLASS_PROPERTY_DECL): New.
1134         (IMPL_PROPERTY_DECL): New.
1135         * objc-lang.c (objc_init_ts): Update fields for property_decl.
1137 2010-10-13  Richard Henderson  <rth@redhat.com>
1139         * objc-act.c (objc_eh_personality): Update call to
1140         build_personality_function.
1142 2010-10-13  Iain Sandoe  <iains@gcc.gnu.org>
1144         merge from FSF apple 'trunk' branch. 
1146         2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
1147         Radar 3803157 (method attributes)
1148         * objc/objc-act.h (METHOD_TYPE_ATTRIBUTES): New macro.
1149         * objc/objc-act.c (objc_decl_method_attributes): New.
1150         (objc_add_method_declaration): Process method's attribute.
1151         (objc_start_method_definition): Ditto.
1152         (build_objc_method_call): Inject method attribute into
1153         built function type.
1154         (objc_method_decl): New.
1155         (objc_warn_deprecated)use): New.
1157 2010-10-07  Andi Kleen  <ak@linux.intel.com>
1159         * Make-lang.in (cc1obj-dummy): Remove.
1160         (cc1obj-checksum): Change to run checksum over object files
1161         and options only.
1163 2010-10-07  Nicola Pero  <nicola.pero@meta-innovation.com>
1165         PR objc/45925
1166         * objc-act.c (objc_finish_foreach_loop): Convert return value of
1167         countByEnumeratingWithState:objects:count: to long unsigned int.
1169 2010-10-07  Iain Sandoe  <iains@gcc.gnu.org>
1171         * objc-act.c (build_objc_method_call): Replace calls to 
1172         build_function_call () with the VEC equivalent.  Construct parameter
1173         lists as VECs.
1175 2010-10-07  Iain Sandoe  <iains@gcc.gnu.org>
1177         * objc-act.c (objc_build_message_expr):  Call mark_exp_read () to 
1178         signal that the receiver has been used.
1180 2010-10-06  Nicola Pero  <nicola.pero@meta-innovation.com>
1182         * README: Obsolete file removed.
1184 2010-10-06  Nicola Pero  <nicola.pero@meta-innovation.com>
1186         Implemented fast enumeration for Objective-C.
1187         * objc-act.c (build_fast_enumeration_state_template): New.
1188         (TAG_ENUMERATION_MUTATION): New.
1189         (TAG_FAST_ENUMERATION_STATE): New.
1190         (synth_module_prologue): Call build_fast_enumeration_state_template() and set up
1191         objc_enumeration_mutation_decl.
1192         (objc_create_temporary_var): Allow providing a name to temporary
1193         variables.
1194         (objc_build_exc_ptr): Updated calls to
1195         objc_create_temporary_var().
1196         (next_sjlj_build_try_catch_finally): Same change.
1197         (objc_finish_foreach_loop): New.
1198         * objc-act.h: Added OCTI_FAST_ENUM_STATE_TEMP,
1199         OCTI_ENUM_MUTATION_DECL, objc_fast_enumeration_state_template,
1200         objc_enumeration_mutation_decl.
1202         Merge from 'apple/trunk' branch on FSF servers.
1204         2006-04-12 Fariborz Jahanian <fjahanian@apple.com>
1206         Radar 4507230
1207         * objc-act.c (objc_type_valid_for_messaging): New routine to check
1208         for valid objc object types.
1209         (objc_finish_foreach_loop): Check for invalid objc objects in
1210         foreach header.
1211         
1212 2010-10-05  Nicola Pero  <nicola.pero@meta-innovation.com>
1214         Merge from 'apple/trunk' branch on FSF servers.
1216         2005-10-17  Fariborz Jahanian <fjahanian@apple.com>
1218         Radar 4290840
1219         * objc-act.c (objc_start_method_definition): Check for
1220         error_mark_node for the selector name and make a quick exit.
1221         
1222 2010-10-04  Andi Kleen <ak@linux.intel.com>
1224         * Make-lang.in (cc1obj-dummy, cc1obj): Add + to build rule.
1226 2010-09-30  Iain Sandoe  <iains@gcc.gnu.org>
1228         merge from FSF 'apple/trunk' branch.
1229         2006-01-30  Fariborz Jahanian <fjahanian@apple.com>
1231        Radar 4386773
1232        * objc/objc-act.c (objc_set_method_opt): New function.
1233        (objc_start_protocol, objc_finish_interface): Reset
1234        objc_method_optional_flag flag.
1235        (objc_add_method_declaration): Pass on the new
1236        flag to objc_add_method.
1237        (objc_add_method): Add optional methods to new chain in
1238        the protocol class.
1239        * objc/objc-act.h (CLASS_OPTIONAL_CLS_METHODS,
1240        CLASS_OPTIONAL_NST_METHODS): New macros accessing a protocol
1241        class's optional method chains.
1242         
1243 2010-09-30  Nicola Pero  <nicola.pero@meta-innovation.com>
1245         Merge from 'apple/trunk' branch on FSF servers.
1247         2005-10-04  Fariborz Jahanian <fjahanian@apple.com>
1249         Radar 4278236
1250         * objc-act.c (objc_declare_class): Pick the right
1251         type tree.
1253 2010-09-29  Nicola Pero  <nicola.pero@meta-innovation.com>
1255         Merge from 'apple/trunk' branch on FSF servers.
1257         2005-10-04  Fariborz Jahanian <fjahanian@apple.com>
1259         Radar 4281748
1260         * objc-act.c (objc_check_global_decl): New
1262 2010-09-29  Nicola Pero  <nicola.pero@meta-innovation.com>
1264         * objc-act.c (objc_is_reserved_word): Removed.
1266 2010-09-28  Iain Sandoe  <iains@gcc.gnu.org>
1267         
1268         * objc-act.c (objc_add_method_declaration): Handle and ignore 
1269         attributes.
1270         (objc_start_method_definition): Likewise.
1271         (objc_generate_cxx_ctor_or_dtor): Pass NULL attributes to ctor/dtor.
1272         (objc_build_keyword_decl): Handle and ignore attributes.
1274 2010-09-28  Richard Henderson  <rth@redhat.com>
1276         * objc-act.c (objc_eh_personality): Use targetm.except_unwind_info.
1278 2010-09-28  Iain Sandoe  <iains@gcc.gnu.org>
1280         * objc-act.c (objc_start_class_interface): Handle and ignore attributes.
1281         (objc_start_category_interface): Likewise.
1282         (objc_start_protocol): Likewise.
1284 2010-09-28  Nicola Pero  <nicola.pero@meta-innovation.com>
1286         Merge from 'apple/trunk' branch on FSF servers.
1288         2005-08-23  Stuart Hastings <stuart@apple.com>
1289                     Ziemowit Laski  <zlaski@apple.com>
1291         Radar 4209854
1292         * objc-act.c (objc_decay_parm_type): New function.
1293         (get_arg_type_list): Decay types for all named arguments.
1294         (objc_push_parm): Rebuild the PARM_DECL if its type has
1295         been decayed.   
1297 2010-09-28  Nicola Pero  <nicola.pero@meta-innovation.com>
1299         * objc-act.c (encode_type): Fixed encoding enums with the next
1300         runtime.
1302 2010-09-28  Nicola Pero  <nicola.pero@meta-innovation.com>
1304         Merge from 'apple/trunk' branch on FSF servers.
1306         2005-07-18  Ziemowit Laski  <zlaski@apple.com>
1308         Radar 4175534
1309         * objc-act.c (objc_compare_types): A new silent comparison
1310         mode (-4), differing from regular comparison (-3) in that
1311         'false' is returned instead of issuing warnings.
1312         
1313 2010-09-28  Nicola Pero  <nicola.pero@meta-innovation.com>
1315         * objc-act.c (encode_type): Do not add 'r' with the next runtime.
1316         (encode_aggregate_within): Reorganized code to be more readable.
1317         (encode_aggregate_fields): Updated second argument to be 'bool'
1318         instead of 'int'.
1320 2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>
1322         PR objc/45763
1323         PR objc/25450
1324         PR objc/25464
1325         * objc-act.c: Improved comments for encoding functions.
1326         (encode_aggregate_within): For the GNU runtime, rewritten some
1327         obsfuscated code to clarify the various cases.
1328         (encode_aggregate): Function removed.
1329         (encode_array): Generate an error if asked to encode an incomplete
1330         array as part of generating instance variables.  Else, when
1331         encoding an incomplete array inside a structure, encode it as an
1332         array of zero size.
1333         (encode_pointer): For the GNU runtime, fixed encoding 'BOOL *' as
1334         '^c' instead of '*'.
1335         (encode_gnu_bitfield): Encode enumerated types exactly in the same
1336         type as integer types instead of using a hardcoded 'i'.  If asked
1337         to encode a non-integer type as a bitfield, do not abort
1338         compilation immediately; instead generate an error, then skip the
1339         type.
1340         (encode_type): Use a 'switch' instead of a sequence of 'if's.
1341         Added a 'default' clause that gets executed if the type can not be
1342         matched, and that encodes it as '?' (unknown) and produces a
1343         warning.  For the GNU runtime, encode enumerated types exactly in
1344         the same way as integer types instead of using a hardcoded 'i'.
1345         Encode long double as 'D'.  Encode 128-bit integers as 'T' or 't'.
1346         Encode C++ reference types as pointers.  Call encode_vector to
1347         encode vectors.
1348         (encode_vector): New function.
1349         
1350 2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>
1352         Merge from 'apple/trunk' branch on FSF servers.  I modified the
1353         changes to be used only when compiling for the NeXT runtime.
1355         2005-10-10  Fariborz Jahanian <fjahanian@apple.com>
1357         Radar 4301047
1359         * objc-act.c (encode_type): Remove the hack.
1360         
1361         2005-07-20  Ziemowit Laski  <zlaski@apple.com>
1363         Radar 4136935
1364         * objc-act.c (pointee_is_readonly): New function.
1365         (encode_pointer, encode_aggregate_within, encode_type):
1366         Attempt to emulate GCC 3.3 when generating type encodings.
1368 2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>
1370         Merge from 'apple/trunk' branch on FSF servers.
1372         2005-12-15  Fariborz Jahanian <fjahanian@apple.com>
1374         Radar 4229905
1375         * objc-act.c (objc_have_common_types): New function.
1376         
1377         2005-06-22  Ziemowit Laski  <zlaski@apple.com>
1379         Radar 4154928
1380         * objc-act.c (objc_common_type): New function.
1381         
1382 2010-09-27  Richard Guenther  <rguenther@suse.de>
1384         * objc-act.c (objc_get_class_reference): Use CP_TYPE_CONTEXT.
1385         (objc_is_global_reference_p): Use DECL_FILE_SCOPE_P.
1387 2010-09-26  Nicola Pero  <nicola.pero@meta-innovation.com>
1389         * objc-act.c: Removed historical, obsolete comment at the top of
1390         the file.
1392 2010-09-21  Nicola Pero  <nicola.pero@meta-innovation.com>
1394         PR objc/23710
1395         * objc-act.c (objc_start_method_definition): Do not abort upon a
1396         'method definition not in @implementation context' error.  Return
1397         'false' instead.
1399 2010-09-21  Nicola Pero  <nicola.pero@meta-innovation.com>
1401         PR objc/25965
1402         * objc-act.c (objc_get_interface_ivars): New function.
1403         (objc_collecting_ivars): New variable.
1404         (continue_class): Set and reset objc_collecting_ivars for context.
1405         
1406 2010-09-15  Nicola Pero  <nicola.pero@meta-innovation.com>
1408         Merge from 'apple/trunk' branch on FSF servers.
1410         2006-03-09 Fariborz Jahanian <fjahanian@apple.com>
1412         Radar 4457381
1413         * objc/objc-act.c (objc_finish_message_expr): Look for message in
1414         @class's protocol list.
1416         2006-02-07  Fariborz Jahanian <fjahanian@apple.com>
1418         Radar 4219590
1419         * objc/objc-act.c (objc_start_method_definition): Initialize
1420         break/continue labels.
1422         2005-08-22  Ziemowit Laski  <zlaski@apple.com>
1424         Radar 4174166
1425         * objc-act.c (objc_compare_types): Compare function
1426         pointers; indicate success if the right-hand side has
1427         a return type that is covariant, and the argument types
1428         contravariant, with those of the left side.
1430         2005-08-22  Ziemowit Laski  <zlaski@apple.com>
1432         Radar 4216500
1433         * objc-act.c (objc_get_protocol_qualified_type): When looking
1434         at a typedef, retrieve the precise type it describes (rather
1435         than merely looking up a class by name).
1436         
1437 2010-09-10  Nicola Pero  <nicola.pero@meta-innovation.com>
1439         * objc/objc-act.c (objc_begin_try_stmt): Generate an error if
1440         -fobjc-exceptions was not used.  (objc_build_throw_stmt): Same
1441         change.
1443 2010-07-15  Nathan Froyd  <froydnj@codesourcery.com>
1445         * objc-act.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
1447 2010-07-10  Iain Sandoe  <iains@gcc.gnu.org>
1449         PR objc/44140
1450         * objc-act.c: build_objc_string_decl() remove declaration.
1451         (finish_var_decl): Remove forcing of var output and marking
1452         as "Used". 
1453         (init_def_list): Use integer_zero_node. 
1454         (init_objc_symtab): Use integer_zero_node, make the short
1455         integer type specific on relevant nodes.
1456         (generate_objc_symtab_decl): Remove call to 
1457         forward_declare_categories().  Use null_pointer_node where
1458         appropriate.  
1459         (build_module_descriptor): Comment and mark this item as 
1460         DECL_PRESERVE_P. 
1461         (generate_static_references): Use gcc_unreachable instead of
1462         abort (). 
1463         (diagnose_missing_method): New.
1464         (build_next_selector_translation_table): New.
1465         (build_gnu_selector_translation_table): New.
1466         (add_objc_string): Merge code from build_objc_string_decl...
1467         ... and delete build_objc_string_decl().
1468         (generate_dispatch_table): Make integer types explicit.
1469         (generate_category): Pass implent and arrange for the data
1470         to be extracted within the routine.  Do not start new vars, 
1471         but finish the ones collcted during parsing.
1472         (generate_shared_structures): Likewise.
1473         (finish_objc):  Reorder code so that we finish variables before
1474         referencing them.  Save the global data before calling meta-data
1475         creation routines, and pass the current reference to the two 
1476         main routines.  Only call generate_objc_image_info () for the 
1477         NeXT runtime.
1478         (generate_classref_translation_entry): Comment on and make this
1479         item DECL_PRESERVE_P.
1480         (handle_class_ref): Use varpool interfaces, comment on and make
1481         this item DECL_PRESERVE_P.
1482         (handle_impent): Likewise.
1483         (generate_objc_image_info): Only generate when the content is 
1484         non-zero.  Make integer types explict.
1486 2010-07-03  Nathan Froyd  <froydnj@codesourcery.com>
1488         PR objc/24867
1489         * objc-act.c (build_sized_array_type): New function.
1490         (add_objc_string): Use it.
1491         (generate_protocol_list): Likewise.
1492         (generate_objc_image_info): Likewise.
1493         (add_field_decl): New function.
1494         (objc_build_struct): Use a VEC rather than building a TREE_LIST.
1495         (generate_struct_by_value_array): Use add_field_decl.
1496         (build_objc_symtab_template): Likewise.
1497         (build_module_descriptor): Likewise.
1498         (build_objc_exception_stuff): Likewise.
1499         (build_protocol_template): Likewise.
1500         (build_method_prototype_list_template): Likewise.
1501         (build_method_prototype_template): Likewise.
1502         (build_category_template): Likewise.
1503         (build_selector_template): Likewise.
1504         (build_class_template): Likewise.
1505         (build_super_template): Likewise.
1506         (build_ivar_template): Likewise.
1507         (build_ivar_list_template): Likewise.
1508         (build_method_list_template): Likewise.
1509         (build_method_template): Likewise.
1511 2010-06-28  Steven Bosscher  <steven@gcc.gnu.org>
1513         * objc-act.c: Do not include except.h.
1515 2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
1517         * objc-act.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Use typed GC
1518         allocation.
1520         * objc-act.c (objc_volatilize_decl): Likewise.
1521         (objc_build_string_object): Likewise.
1522         (hash_init): Likewise.
1523         (hash_enter): Likewise.
1524         (hash_add_attr): Likewise.
1525         (add_class): Likewise.
1526         (start_class): Likewise.
1528 2010-06-05  Steven Bosscher  <steven@gcc.gnu.org>
1530         * objc-act.c: Update include path for moved files.
1531         * objc-lang.c: Likewise.
1532         * config-lang.in: Update paths in gtfiles for files in c-family/.
1534 2010-06-01  Nathan Froyd  <froydnj@codesourcery.com>
1536         * objc-act.c (build_next_objc_exception_stuff): Give setjmp a
1537         varargs type instead of a zero-argument type.
1539 2010-05-30  Nathan Froyd  <froydnj@codesourcery.com>
1541         * objc-act.c (synth_module_prologue): Use build_function_type_list
1542         instead of build_function_type.
1543         (build_module_initializer_routine): Likewise.
1544         (build_next_objc_exception_stuff): Likewise.
1545         (build_objc_exception_stuff): Likewise.
1547 2010-05-27  Joseph Myers  <joseph@codesourcery.com>
1549         * objc-act.c: Include diagnostic-core.h instead of diagnostic.h.
1550         * Make-lang.in (objc/objc-act.o): Update dependencies.
1552 2010-05-25  Steven Bosscher  <steven@gcc.gnu.org>
1554         * objc-act.h: Do not include gimple.h.
1555         * objc-act.c: Do not include rtl.h, expr.h, libfuncs.h, and tm_p.h.
1556         Include gimple.h.  Explain why except.h has to be included.
1557         * objc-lang.c: Do not include diagnostics.h.
1558         * Make-lang.in: Update dependencies.
1560 2010-05-25  Nathan Froyd  <froydnj@codesourcery.com>
1562         * objc-act.c (objc_build_constructor): Adjust OBJCPLUS impedance
1563         mismatch code for VECs.
1565 2010-05-25  Nathan Froyd  <froydnj@codesourcery.com>
1567         * objc-act.c (objc_build_constructor): Take a VEC instead of a tree.
1568         Use build_constructor instead of build_constructor_from_list.
1569         (objc_build_string_object): Build a VEC argument for
1570         objc_build_constructor.
1571         (init_def_list): Likewise.
1572         (init_objc_symtab): Likewise.
1573         (init_module_descriptor): Likewise.
1574         (generate_static_references): Likewise.
1575         (build_selector_translation_table): Likewise.
1576         (build_descriptor_table_initializer): Likewise.
1577         (generate_descriptor_table): Likewise.
1578         (build_protocol_initializer): Likewise.
1579         (build_ivar_list_initializer): Likewise.
1580         (generate_ivars_list): Likewise.
1581         (build_dispatch_table_initializer): Likewise.
1582         (generate_dispatch_table): Likewise.
1583         (generate_protocol_list): Likewise.
1584         (build_category_initializer): Likewise.
1585         (build_shared_structure_initializer): Likewise.
1586         (generate_objc_image_info): Likewise.
1588 2010-04-30  Iain Sandoe  <iains@gcc.gnu.org>
1590         PR objc++/32052
1591         * objc-act.c (encode_aggregate_within): Encode structure tags
1592         with template args for ObjC++.
1594 2010-04-30  Steven Bosscher  <steven@gcc.gnu.org>
1596         * objc-act.c: Do not include varray.h.
1598 2010-04-07  Jakub Jelinek  <jakub@redhat.com>
1600         PR c/18624
1601         * objc-act.c (finish_var_decl, objc_begin_catch_clause,
1602         really_start_method, get_super_receiver, handle_class_ref): Set
1603         DECL_READ_P in addition to TREE_USED.
1605 2010-04-07  Iain Sandoe <iains@gcc.gnu.org>
1607         PR objc/35996
1608         * objc-act.c (objc_init): Warn that -fobjc-gc is ignored for
1609         -fgnu-runtime and set flag_objc_gc to zero.
1611 2010-04-07  Iain Sandoe <iains@gcc.gnu.org>
1613         PR objc++/23716
1614         * objc-act.c (build_module_initializer_routine): Make the argument
1615         to objc_start_function NULL_TREE when compiling ObjC++.
1617 2010-02-18  Iain Sandoe <iain.sandoe@sandoe-acoustics.co.uk>
1618             Mike Stump  <mikestump@comcast.net>
1620         PR objc/43061
1621         * objc-act.c (finish_var_decl): Set the generated symbols as "used".
1623 2009-12-17  Shujing Zhao  <pearly.zhao@oracle.com>
1625         * objc-act.c (objc_substitute_decl, build_ivar_reference,
1626         get_super_receiver): Update build_indirect_ref calls.
1628 2009-11-28  Jakub Jelinek  <jakub@redhat.com>
1630         * objc-act.c (generate_shared_structures): Remove unused sc_spec and
1631         decl_specs variables.
1632         (objc_build_message_expr): Remove unused loc variable.
1633         (objc_finish_message_expr): Remove unused saved_rtype variable.
1634         (encode_field_decl): Remove unused type variable.
1636         PR obj-c++/42156
1637         * objc-act.c (objc_build_struct): INIT_TYPE_OBJC_INFO for
1638         type variants that don't have it initialized yet.
1640 2009-09-14  Jan Hubicka  <jh@suse.cz>
1642         * objc-act.c (objc_add_static_instance): Do not set DECL_COMMON.
1644 2009-09-14  Richard Henderson  <rth@redhat.com>
1646         * objc-act.c (objc_init_exceptions): Don't call
1647         default_init_unwind_resume_libfunc.
1648         (objc_build_exc_ptr): Use __builtin_eh_pointer.
1650 2009-09-13  Richard Guenther  <rguenther@suse.de>
1651         Rafael Avila de Espindola  <espindola@google.com>
1653         * objc-act.c (objc_eh_runtime_type): Export.
1654         (objc_init_exceptions): Remove.  Move warning code ...
1655         (objc_begin_try_stmt): ... here
1656         (objc_build_throw_stmt): ... and here.
1657         (objc_eh_personality_decl): New.
1658         (objc_eh_personality): New function.
1659         * objc-act.h (objc_eh_runtime_type): Declare.
1660         (objc_eh_personality): Likewise.
1661         * objc-lang.c (LANG_HOOKS_EH_RUNTIME_TYPE): Define.
1662         (LANG_HOOKS_EH_PERSONALITY): Likewise.
1664 2009-09-03  Diego Novillo  <dnovillo@google.com>
1666         * objc-lang.c (lang_hooks): Remove const qualifier.
1668 2009-08-20  Richard Guenther  <rguenther@suse.de>
1670         * objc-act.c: Include c-lang.h
1671         * Make-lang.in (objc/objc-act.o): Add c-lang.h dependency.
1673 2009-07-17  Aldy Hernandez  <aldyh@redhat.com>
1674             Manuel López-Ibáñez  <manu@gcc.gnu.org>
1676         PR 40435 
1677         * objc-act.c: Add location argument to all calls to
1678         build_fold_addr_expr.
1679         
1680 2009-07-14  Taras Glek  <tglek@mozilla.com>
1681             Rafael Espindola  <espindola@google.com>
1683         * Make-lang.in (objc.install-plugin): New target for
1684         installing plugin headers.
1686 2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1688         * objc-act.c (next_sjlj_build_catch_list): Replace EXPR_LOCUS by
1689         EXPR_LOCATION.
1690         
1691 2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1693         * objc-act.c: Replace %J by an explicit location. Update all
1694         calls.
1695         
1696 2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1698         * objc-act.c: Replace %H by an explicit location. Update all
1699         calls.
1700         
1701 2009-06-22  Steven Bosscher  <steven@gcc.gnu.org>
1703         PR objc/28050
1704         * objc-act.c (objc_build_message_args): Return if ARGS is the
1705         error_mark_node.
1706         
1707 2009-06-19  Ian Lance Taylor  <iant@google.com>
1709         * objc-act.c (objc_in_struct, objc_struct_types): Remove.
1710         (objc_struct_info): New static variable.
1711         (objc_start_struct): Pass &objc_struct_info, not &objc_in_struct
1712         and &objc_struct_types, to start_struct.
1713         (objc_finish_struct): Likewise for finish_struct.
1715 2009-06-15  Ian Lance Taylor  <iant@google.com>
1717         * objc-act.c (objc_start_function): Don't set
1718         label_context_stack_se or label_context_stack_vm.
1720 2009-06-12  Aldy Hernandez  <aldyh@redhat.com>
1721         
1722         * objc-act.c (finish_var_decl): Pass location to finish_decl.
1723         (objc_get_parm_info): Same.
1724         (get_super_receiver): Same.
1725         * objc-act.c (objc_build_component_ref): Pass location to
1726         build_compound_ref.
1727         (build_module_initializer_routine): Pass location to
1728         c_end_compound_stmt.
1729         (objc_generate_static_init_call): Pass location to build_stmt.
1730         (build_typed_selector_reference): New location argument.
1731         (build_selector_reference): Same.
1732         (objc_substitute_decl): Pass location to build_array_ref.
1733         (next_sjlj_build_try_catch_finally): Pass location to build_stmt.
1734         (objc_begin_catch_clause): Same.
1735         (objc_finish_try_stmt): Same.
1736         (objc_finish_catch_clause): Pass location to c_end_compound_stmt.
1737         (objc_build_throw_stmt): New argument.
1738         (generate_shared_structures): Pass location to build_c_cast.
1739         (objc_build_message_expr): Use local location.
1740         (objc_finish_message_expr): Use input_location.
1741         (build_objc_method_call): New argument.
1742         (objc_build_selector_expr): Same.
1743         (get_super_receiver): Pass location to build_c_cast,
1744         build_modify_expr, build_compound_expr.
1745         * objc-act.c: Add location to all calls to start_struct, build_decl,
1746         finish_struct.
1747         
1748 2009-06-09  Ian Lance Taylor  <iant@google.com>
1750         * objc-act.c (objc_gimplify_expr): Change return type to int.
1751         * objc-act.h: Update declaration.
1753 2009-06-08  Alexandre Oliva  <aoliva@redhat.com>
1755         * objc-act.c (objc_init): Skip print_struct_values during
1756         -fcompare-debug-second.
1758 2009-06-03  Ian Lance Taylor  <iant@google.com>
1760         * Make-lang.in (cc1obj-checksum.o): Depend upon $(CONFIG_H) and
1761         $(SYSTEM_H).
1763 2009-05-27  Ian Lance Taylor  <iant@google.com>
1765         * Make-lang.in (cc1obj-dummy$(exeext)): Change $(COMPILER) to
1766         $(LINKER).
1767         (cc1obj$(exeext)): Likewise.
1769 2009-05-26  Ian Lance Taylor  <iant@google.com>
1771         * Make-lang.in (cc1obj-dummy$(exeext)): Use $(COMPILER).
1772         (cc1obj$(exeext)): Likewise.
1774 2009-05-20  Ian Lance Taylor  <iant@google.com>
1776         * objc-act.c (objc_generate_cxx_ctor_or_dtor): Pass NULL rather
1777         than NULL_TREE to build_special_member_call.
1779 2009-05-10  Ian Lance Taylor  <iant@google.com>
1781         * objc-act.c (objc_building_struct): New static variable.
1782         (objc_in_struct, objc_struct_types): New static variables.
1783         (objc_start_struct, objc_finish_struct): New static functions.
1784         (generate_struct_by_value_array): Call objc_start_struct instead
1785         of start_struct, and call objc_finish_struct instead of
1786         finish_struct.
1787         (objc_build_struct, build_objc_symtab_template): Likewise.
1788         (build_module_descriptor): Likewise.
1789         (build_next_objc_exception_stuff): Likewise.
1790         (build_protocol_template): Likewise.
1791         (build_method_prototype_list_template): Likewise.
1792         (build_method_prototype_template): Likewise.
1793         (build_category_template, build_selector_template): Likewise.
1794         (build_class_template, build_super_template): Likewise.
1795         (build_ivar_template, build_ivar_list_template): Likewise.
1796         (build_method_list_template): Likewise.
1797         (build_method_template): Likewise.
1799 2009-05-10  Joseph Myers  <joseph@codesourcery.com>
1801         * objc-act.c: Include intl.h.
1802         (objc_lookup_protocol): Use complete sentences for diagnostics
1803         with %qE for identifiers and translating results of
1804         gen_type_name_0 to locale character set.
1805         (objc_check_decl, check_protocol_recursively,
1806         lookup_and_install_protocols, objc_build_string_object,
1807         objc_get_class_reference, objc_declare_alias, objc_declare_class,
1808         objc_get_class_ivars, error_with_ivar, check_duplicates,
1809         objc_finish_message_expr, objc_build_protocol_expr,
1810         objc_build_selector_expr, build_ivar_reference, objc_add_method,
1811         add_category, add_instance_variable, objc_is_public,
1812         check_methods, check_methods_accessible, check_protocol,
1813         start_class, finish_class, start_protocol, really_start_method,
1814         get_super_receiver, objc_lookup_ivar): Use %E and %qE for
1815         identifiers in diagnostics.  Translate generated text to locale
1816         character set as needed.
1817         (check_protocol, check_protocols): Change name parameter to type
1818         tree.
1819         (lang_report_error_function): Remove.
1821 2009-04-27  Ian Lance Taylor  <iant@google.com>
1823         * objc-act.c (objc_gimplify_expr): Add casts to enum type.
1825 2009-04-24  Ian Lance Taylor  <iant@google.com>
1827         * objc-act.c (get_super_receiver): Update calls to
1828         build_modify_expr to pass new argument.
1830 2009-04-21  Taras Glek <tglek@mozilla.com>
1832         * objc-act.c: Update GTY annotations to new syntax
1833         * objc-act.h: Likewise
1835 2009-04-21  Joseph Myers  <joseph@codesourcery.com>
1837         * ChangeLog: Add copyright and license notices.
1839 2009-04-20  Ian Lance Taylor  <iant@google.com>
1841         * objc-act.c (objc_rewrite_function_call): Change parameter from
1842         params to first_param.  Change all callers.
1844 2009-03-30  Dominique d'Humieres  <dominiq@lps.ens.fr>
1846         PR bootstrap/39583
1847         * objc-act.c (in_late_binary_op): Define for Objective-C++.
1849 2009-03-29  Joseph Myers  <joseph@codesourcery.com>
1851         PR c/456
1852         PR c/5675
1853         PR c/19976
1854         PR c/29116
1855         PR c/31871
1856         PR c/35198
1857         * objc-act.c (objc_finish_try_stmt): Set in_late_binary_op.
1859 2008-12-05  Sebastian Pop  <sebastian.pop@amd.com>
1861         PR bootstrap/38262
1862         * Make-lang.in (cc1obj-dummy, cc1obj): Add BACKENDLIBS,
1863         remove GMPLIBS.
1865 2008-10-06  Aldy Hernandez  <aldyh@redhat.com>
1867         * objc-act.c (objc_build_string_object): Pass location to
1868         build_unary_op.
1869         (init_def_list): Same.
1870         (init_objc_symtab): Same.
1871         (init_module_descriptor): Same.
1872         (build_module_initializer_routine): Same.
1873         (generate_static_references): Same.
1874         (build_typed_selector_reference): Same.
1875         (add_objc_string): Same.
1876         (objc_substitute_decl): Same.
1877         (objc_build_ivar_assignment): Same.
1878         (objc_build_global_assignment): Same.
1879         (objc_build_strong_cast_assignment): Same.
1880         (generate_protocols): Same.
1881         (build_protocol_initializer): Same.
1882         (build_dispatch_table_initializer): Same.
1883         (generate_protocol_list): Same.
1884         (build_category_initializer): Same.
1885         (build_shared_structure_initializer): Same.
1886         (generate_shared_structures): Same.
1887         (objc_build_protocol_expr): Same.
1888         (build_ivar_reference): Same.
1889         (get_super_receiver): Same.
1891 2008-09-23  Aldy Hernandez  <aldyh@redhat.com>
1893         * objc-act.c (next_sjlj_build_enter_and_setjmp): Call
1894         c_common_truthvalue_conversion with location.
1895         (next_sjlj_build_catch_list): Same.
1896         (next_sjlj_build_try_catch_finally): Same.
1898 2008-09-17  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1900         PR objc/37460
1901         * objc-lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define.
1902         * objc-act.h (objc_get_callee_fndecl): Remove prototype.
1903         * objc-act.c (objc_get_callee_fndecl): Kill.
1905 2008-09-17  Jan Hubicka  <jh@suse.cz>
1907         PR c++/18071
1908         * objc/objc-act.c (objc_finish_method_definition): Do not set
1909         DECL_INLINE.
1911 2008-09-01  Aldy Hernandez  <aldyh@redhat.com>
1913         * objc-act.c (build_typed_selector_reference): Pass input_location to
1914         build_unary_op calls.
1915         (build_selector_reference): Same, but to build_array_ref.
1916         (objc_substitute_decl): Same.
1917         (build_ivar_reference): Same, but to build_indirect_ref.
1918         (get_super_receiver): Same.
1920 2008-07-28  Richard Guenther  <rguenther@suse.de>
1922         Merge from gimple-tuples-branch.
1924         2008-07-18  Aldy Hernandez  <aldyh@redhat.com>
1926         * Make-lang.in (objc-lang.o): Depend on GIMPLE_H.
1927         (objc-act.o): Rename TREE_GIMPLE_H to GIMPLE_H.
1928         * objc-act.h: Include gimple.h instead of tree-gimple.h.
1929         * ipa-reference.c: Same.
1931         2007-11-10  Aldy Hernandez  <aldyh@redhat.com>
1933         * objc-act.c (objc_gimplify_expr): Change pre and post to sequences.
1934         * objc-act.h (objc_gimplify_expr): Change prototype accordingly.
1936 2008-07-21  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1938         * objc-act.c: Fix comment typos.
1940 2008-07-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1942         * objc-act.c (objc_start_class_interface,
1943         objc_start_category_interface, objc_start_class_implementation,
1944         objc_start_category_implementation, objc_build_struct,
1945         generate_static_references, build_private_template,
1946         lookup_category, objc_add_method, add_category,
1947         add_instance_variable, objc_is_public, conforms_to_protocol,
1948         start_class, continue_class, finish_class): Avoid C++ keywords.
1950 2008-07-14  Jason Merrill  <jason@redhat.com>
1952         PR objc++/36723
1953         * objc-act.c (objc_build_constructor): Update C++ tweak.
1955 2007-07-14  Rafael Ávila de Espíndola  <espindola@google.com>
1957         * objc-act.c (synth_module_prologue): Use TREE_NO_WARNING instead
1958         of DECL_IN_SYSTEM_HEADER.
1960 2008-07-11  Ian Lance Taylor  <iant@google.com>
1962         * objc-act.c (objc_is_reserved_word): Always check for RID_CLASS,
1963         etc., not just when OBJCPLUS is defined.
1965 2008-06-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1967         * objc-act.c (setup_string_decl, objc_build_string_object,
1968         hash_interface, eq_interface, objc_begin_try_stmt,
1969         encode_method_prototype, build_ivar_list_initializer,
1970         objc_build_encode_expr): Fix for -Wc++-compat.
1972 2008-05-12  Tomas Bily  <tbily@suse.cz>
1974         * objc-act.c (objc_generate_write_barrier, objc_finish_message_expr):
1975         Use CONVERT_EXPR_P.
1977 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
1979         * objc-act.c (objc_build_string_object): Don't set TREE_INVARIANT.
1981 2008-04-03  Tom Tromey  <tromey@redhat.com>
1983         * Make-lang.in (objc_OBJS): New variable.
1985 2008-03-27  Tom Tromey  <tromey@redhat.com>
1987         * Make-lang.in: Revert automatic dependency patch.
1989 2008-03-27  Douglas Gregor  <doug.gregor@gmail.com>
1991         PR obj-c++/35704
1992         * objc-act.c (objc_build_component_ref): Fix call to
1993         finish_class_member_access_expr.
1994         (objc_generate_cxx_ctor_or_dtor): Fix call to
1995         build_special_member_call.
1997 2008-03-25  Andrew Pinski  <pinskia@gmail.com>
1999         PR objc/29197
2000         * objc-act.c (encode_type): Handle when type is error_mark_node.
2001         (objc_push_parm): Handle when the type of parm is error_mark_node.
2003 2008-03-25  Tom Tromey  <tromey@redhat.com>
2005         * Make-lang.in (objc_OBJS): New variable.
2006         (cc1obj-checksum.o, objc/objc-lang.o, objc/objc-act.o): Remove.
2008 2008-03-21  Andreas Tobler  <a.tobler@schweiz.org>
2010         PR bootstrap/35660
2011         * objc-act.c (objc_generate_cxx_ctor_or_dtor): Rename IS_AGGR_TYPE to
2012         MAYBE_CLASS_TYPE_P.
2013         (objc_generate_cxx_cdtors): Likewise.
2014         (add_instance_variable): Likewise.
2016 2008-02-26  Tom Tromey  <tromey@redhat.com>
2018         * objc-act.c (objc_init): Remove old location code.
2020 2008-02-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2022         PR other/35107
2023         * Make-lang.in (cc1obj-dummy, cc1obj): Add $(GMPLIBS).
2025 2007-07-30  Nick Clifton  <nickc@redhat.com>
2027         * Make-lang.in: Change copyright header to refer to version 3 of
2028         the GNU General Public License and to point readers at the
2029         COPYING3 file and the FSF's license web page.
2030         * lang-specs.h, objc-act.c, objc-tree.def, objc-act.h,
2031         config-lang.in, objc-lang.c: Likewise.
2033 2007-07-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2035         * objc-act.c (objc_get_callee_fndecl): Constify.
2036         * objc-act.h (objc_get_callee_fndecl): Likewise.
2038 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2040         * objc-act.c (volatilized_hash, volatilized_eq, string_hash,
2041         string_eq): Constify.
2043 2007-04-04  Stuart Hastings  <stuart@apple.com>
2045         PR 31281
2046         * objc/objc-act.c (next_sjlj_build_catch_list): Delete volatile from rethrow decl.
2048 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
2050         * Make-lang.in: Add dummy lang.install-pdf target.
2052 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
2054         * objc/objc-act.c: Fix comment typos.
2056 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
2057             Brooks Moses  <brooks.moses@codesourcery.com>
2058             Lee Millward  <lee.millward@codesourcery.com>
2060         * objc-act.c (receiver_is_class_object): Use new CALL_EXPR accessors.
2061         (objc_get_callee_fndecl): Likewise.
2063 2007-01-23  Andrew Pinski  <pinskia@gmail.com>
2065         PR objc/27438
2066         * objc-act.c (objc_add_static_instance): Mark the decl as
2067         TREE_USED.
2069 2007-01-20  Andrew Pinski  <pinskia@gmail.com>
2071         PR objc/30479
2072         * objc-act.c (hash_interface): Use IDENTIFIER_HASH_VALUE instead
2073         of htab_hash_pointer.
2074         (lookup_interface): Likewise.
2075         (add_class): Likewise.
2077 2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>
2078         
2079         * objc-act.c (objc_build_volatilized_type): Keep track of
2080         canonical types.
2081         (objc_get_protocol_qualified_type): Ditto.
2082         
2083 2006-11-02  Andreas Tobler  <a.tobler@schweiz.org>
2085         * objc-act.c (objc_finish_file): Remove ifdef clause for OBJCPLUS and
2086         content where we called cp_finish_file.
2088 2006-10-23 Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
2090         * objc-act.c (synth_module_prologue): Replace calls to
2091         builtin_function with add_builtin_function.
2092         (build_next_objc_exception_stuff): Replace calls to
2093         builtin_function with add_builtin_function.
2094         (build_objc_exception_stuff): Replace calls to
2095         builtin_function with add_builtin_function.
2097 2006-10-10  Brooks Moses  <bmoses@stanford.edu>
2099         * Make-lang.in: Added empty "objc.pdf" target.
2101 2006-09-26  Andrew Pinski  <pinskia@physics.uc.edu>
2103         PR objc/29195
2104         * objc-act.c (objc_push_parm): If we change the type of the
2105         decl, relayout the decl.
2107 2006-09-19  Eric Christopher  <echristo@apple.com>
2109         * objc-act.c (JBLEN): Rename to OBJC_JBLEN,
2110         default to something innocuous.
2111         (build_next_objc_exception_stuff): Rename JBLEN.
2113 2006-07-28  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2115         * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
2117 2006-07-19  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2119         PR obj-c++/28434
2120         * objc-act.c (lookup_and_install_protocols): Skip error_mark_nodes.
2122 2006-06-06  Mike Stump  <mrs@apple.com>
2124         * objc-act.c: Remove prototype for objc_build_volatilized_type.
2126 2006-05-24  Mike Stump  <mrs@apple.com>
2128         * objc-act.c (build_next_objc_exception_stuff): Use JBLEN instead of _JBLEN.
2130 2006-05-05  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2132         PR objc/27240
2133         * objc-act.c (objc_is_public): Return early on invalid type.
2135 2006-03-02 Fariborz Jahanian <fjahanian@apple.com>
2137         * objc-act.c (init_module_descriptor): Remove file name from
2138         module descriptor.
2139         (gen_type_name_0): Fix ICE when issuing warning.
2141 2006-02-20 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2142         * Make-lang.in (OBJC): Remove
2143         (OBJECTIVE-C): Remove
2144         (objective-c): Remove
2145         (.PHONY): Remove objective-c and ObjC
2147 2005-12-14  Andrew Pinski  <pinskia@physics.uc.edu>
2149         PR objc/25360
2150         * objc/objc-act.c (encode_type): Encode Complex types as 'j' followed
2151         by the inner type.
2153 2005-12-12  Andrew Pinski  <pinskia@physics.uc.edu>
2155         PR objc/25348
2156         * objc-act.c (encode_array): Handle arrays to zero sized types.
2158 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
2160         * Make-lang.in (objc.all.build, objc.install-normal): Remove.
2162 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
2164         * Make-lang.in: Remove all dependencies on s-gtype.
2166 2005-12-02  Richard Guenther  <rguenther@suse.de>
2168         * objc-act.c (objc_build_exc_ptr, next_sjlj_build_enter_and_setjmp
2169         next_sjlj_build_exc_extract, next_sjlj_build_catch_list,
2170         next_sjlj_build_try_catch_finally, objc_begin_catch_clause,
2171         build_objc_method_call, objc_rewrite_function_call): Use buildN
2172         instead of build.
2174 2005-10-20  Geoffrey Keating  <geoffk@apple.com>
2176         * objc-act.c (synth_module_prologue): Clear TREE_NOTHROW
2177         on objc_msgSend and like builtin functions.
2179 2005-10-17  Andreas Krebbel  <krebbel1@de.ibm.com>
2181         * objc-act.c (objc_build_component_ref): Adjust call to
2182         finish_class_member_access_expr due to a changed prototype.
2184 2005-08-31  Andrew Pinski  <pinskia@physics.uc.edu>
2186         PR objc/23306
2187         * objc-act.c (generate_strings): Remove and move code to
2188         finish decl to ...
2189         (add_objc_string): here when creating a new string decl.
2190         (finish_objc): Don't call generate_strings.
2192 2005-08-31  Andrew Pinski  <pinskia@physics.uc.edu>
2194         PR objc/23381
2195         * objc-act.c (next_sjlj_build_try_catch_finally): Set
2196         TREE_SIDE_EFFECTS on catch_seq after building it.
2198 2005-08-09  Andrew Pinski  <pinskia@physics.uc.edu>
2200         part of PR objc/21992
2201         * objc-act.c (handle_class_ref): The ref decl is always referenced.
2203 2005-07-20  Giovanni Bajo  <giovannibajo@libero.it>
2205         Make CONSTRUCTOR use VEC to store initializers.
2206         * objc-act.c (objc_build_constructor): Use build_constructor_from_list
2207         instead of build_constructor.
2209 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
2211         * objc-act.c (objc_push_parm): DECL_ARG_TYPE_AS_WRITTEN is
2212         removed.
2213         * objc-act.h (KEYWORD_ARG_NAME): Use decl_non_common.
2214         (KEYWORD_KEY_NAME): Use decl_minimal.
2215         (METHOD_SEL_NAME): Ditto..
2216         (METHOD_SEL_ARGS): Use decl_non_common.
2217         (METHOD_ADD_ARGS): Ditto.
2218         (METHOD_ADD_ARGS_ELLIPSIS_P): Use decl_common.
2219         (METHOD_DEFINITION): Ditto.
2220         (METHOD_ENCODING): Ditto.
2221         * objc-lang.c: (objc_init_ts): New function.
2223 2005-07-07  Ziemowit Laski  <zlaski@apple.com>
2225         * objc-act.c (objc_build_struct): Pass in an actual @interface
2226         instead of its name, and annotate the struct created (and all
2227         existing variants thereof) with the @interface.
2228         (objc_compare_types): Treat forward-declared ObjC classes
2229         as stand-alone (root) classes for purposes of type comparisons.
2230         (build_private_template): Move some code to objc_build_struct().
2232 2005-07-07  Ziemowit Laski  <zlaski@apple.com>
2234         PR objc/22274
2235         * objc-act.c (objc_build_string_object): For GNU-style constants,
2236         use the @interface type rather than the built-in type.
2238 2005-07-03  Kazu Hirata  <kazu@codesourcery.com>
2240         * Make-lang.in (cc1plus-checksum.c): Use
2241         build/genchecksum$(build_exeext), not build/genchecksum$(exeext).
2243 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
2245         * objc-act.c: Use %q to quote in diagnostics.
2247 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
2249         * objc-act.c: Use '+' flag instead of %J.  Use 'q' flag for
2250         quoting.
2252 2005-06-30  Ziemowit Laski  <zlaski@apple.com>
2254         * objc-act.c (objc_build_volatilized_type): New function.
2255         (objc_volatilize_decl): Call objc_build_volatilized_type()
2256         instead of build_qualified_type().
2258 2005-06-29  Ziemowit Laski  <zlaski@apple.com>
2260         * objc-act.c (objc_build_internal_const_str_type): New function.
2261         (check_string_class_template): Use objc_get_class_ivars() instead
2262         of TYPE_FIELDS() to retrieve ivar list.
2263         (AT_LEAST_AS_LARGE_AS): Check the size of each field's type rather
2264         than the field itself.
2265         (objc_build_string_object): Synthesize a "__builtin_ObjCString"
2266         type and use it to lay out compile-time string objects.
2267         * objc-act.h (OCTI_INTERNAL_CNST_STR_TYPE, internal_const_str_type):
2268         New.
2270 2005-06-28  Paul Brook  <paul@codesourcery.com>
2272         * objc-act.c (objc_init_exceptions): Call
2273         default_init_unwind_resume_libfunc.
2275 2005-06-27  Ziemowit Laski  <zlaski@apple.com>
2277         * objc-act.c (objc_build_struct): Save the TYPE_OBJC_INFO
2278         portion of TYPE_LANG_SPECIFIC info for all variants of
2279         a class before calling finish_struct(), and restore
2280         same TYPE_OBJC_INFO afterwards.
2282 2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>
2284         * all files: Update FSF address in copyright headers.
2286 2005-06-15  Joseph S. Myers  <joseph@codesourcery.com>
2288         * objc-act.c (my_build_string_pointer): New.
2289         (objc_get_class_reference, get_super_receiver): Call
2290         my_build_string_pointer instead of my_build_string when building
2291         function arguments.
2293 2005-05-25  Mike Stump  <mrs@mrs.kithrup.com>
2295         * objc-act.c (volatilized_hash): Avoid warnings on 64-bit
2296         machines.
2298 2005-05-24  Ziemowit Laski  <zlaski@apple.com>
2300         * objc-act.c (objc_build_struct): New function.
2301         (objc_derived_from_p): Likewise.
2302         (objc_build_component_ref): Likewise.
2303         (objc_copy_binfo): Likewise.
2304         (objc_xref_basetypes): Likewise.
2305         (objc_lookup_protocol): Likewise.
2306         (objc_compare_protocols): Likewise.
2307         (objc_volatilize_decl): Likewise.
2308         (encode_aggregate_fields): Likewise.
2309         (volatilized_hash): Likewise.
2310         (volatilized_eq): Likewise.
2311         (objc_compare_types): Likewise.
2312         (objc_type_quals_match): Likewise.
2313         (DERIVED_FROM_P): New ObjC macro, corresponding to C++ macro
2314         of same name.
2315         (get_class_ivars): Add second parameter indicating if entire
2316         hierarchy is desired.
2317         (struct volatilized_type): New type.
2318         (volatilized_htab): New hash table.
2319         (objc_types_compatible_p, objc_comptypes): Remove functions.
2320         (synth_module_prologue): Do not initialize 'unused_list'.
2321         (objc_get_class_reference): Fix ObjC++ impedance mismatches.
2322         (objc_declare_alias): Implement as a typedef.
2323         (objc_substitute_decl, objc_gimplify_expr): Reformat.
2324         (objc_get_class_ivars): Adjust call to get_class_ivars().
2325         (next_sjlj_build_enter_and_setjmp, synth_forward_declarations,
2326         build_ivar_reference, get_super_receiver): Call
2327         objc_build_component_ref() instead of build_component_ref().
2328         (objc_begin_catch_clause): Use DERIVED_FROM_P() instead of
2329         objc_comptypes().
2330         (build_private_template): Call objc_build_struct() instead of
2331         start_struct() and finish_struct().
2332         (hash_init): Initialize volatilized_htab.
2333         (objc_is_public): Adjust calls to objc_get_ivars(); adjust
2334         ObjC++ impedance mismatches.
2335         (encode_aggregate_within): Streamline by calling
2336         encode_aggregate_fields().
2337         * objc-act.h (objc_types_compatible_p): Remove prototype.
2338         (OCTI_UNUSED_LIST, unused_list): Remove slot.
2339         * objc-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Remove.
2341 2005-05-18  Geoffrey Keating  <geoffk@apple.com>
2343         * Make-lang.in (cc1obj-dummy): New.
2344         (cc1obj-checksum.c): New.
2345         (cc1obj-checksum.o): New.
2346         (cc1obj): Add cc1obj-checksum.o.
2348 2005-05-18  Mike Stump  <mrs@apple.com>
2350         PR objc/21641
2351         * objc-act.c (struct interface_tuple): Mark it up for GC.
2352         (interface_htab): It is really a struct interface_tuple.
2354 2005-05-17  Ziemowit Laski  <zlaski@apple.com>
2355             Mike Stump  <mrs@apple.com>
2357         Yet more Objective-C++...
2359         * objc-act.c (objc_finish_try_stmt): Add return value.
2360         (objc_build_synchronized): Likewise.
2362         * objc-act.c (objc_is_gcable_type): Add.
2363         (objc_substitute_decl): Add.
2364         (objc_build_ivar_assignment): Add.
2365         (objc_build_global_assignment): Add.
2366         (objc_build_strong_cast_assignment): Add.
2367         (objc_is_ivar_reference_p): Add.
2368         (objc_is_global_reference_p): Add.
2369         (objc_generate_write_barrier): Add.
2370         (objc_rewrite_function_call): Add.
2371         (objc_gimplify_expr): Add Objective-C++ support.
2372         * objc-act.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Likewise.
2373         (SIZEOF_OBJC_TYPE_LANG_SPECIFIC): Add.
2374         (INIT_TYPE_OBJC_INFO): Add Objective-C++ support.
2375         (DUP_TYPE_OBJC_INFO): Likewise.
2376         (struct imp_entry): Add field has_cxx_cdtors.
2377         (struct imp_entry *imp_list): Add OCTI_UMSG_FAST_DECL,
2378         OCTI_METH_LIST_TEMPL, OCTI_METH_PROTO_LIST_TEMPL,
2379         OCTI_IVAR_LIST_TEMPL, OCTI_ASSIGN_IVAR_DECL,
2380         OCTI_ASSIGN_IVAR_FAST_DECL, OCTI_ASSIGN_GLOBAL_DECL,
2381         OCTI_ASSIGN_STRONGCAST_DECL.
2382         (umsg_fast_decl): Add.
2383         (objc_assign_ivar_decl): Add.
2384         (objc_assign_ivar_fast_decl): Add.
2385         (objc_assign_global_decl): Add.
2386         (objc_assign_strong_cast_decl): Add.
2387         (objc_method_list_ptr): Add.
2388         (objc_method_proto_list_ptr): Add.
2389         (objc_ivar_list_ptr): Add.
2391         * objc-act.c (should_call_super_dealloc): Add.
2392         (OBJC_VERSION): Bump to 6.
2393         (objc_is_gcable_type): Add.
2394         (objc_substitute_decl): Add.
2395         (objc_build_ivar_assignment): Add.
2396         (objc_build_global_assignment): Add.
2397         (objc_build_strong_cast_assignment): Add.
2398         (objc_is_gcable_p): Add.
2399         (objc_is_ivar_reference_p): Add.
2400         (objc_is_global_reference_p): Add.
2401         (generate_shared_structures): Add flags parameter.
2402         (objc_generate_cxx_ctor_or_dtor): Add.
2403         (objc_generate_cxx_cdtors): Add.
2404         (add_class): Add name parameter.
2405         (objc_types_share_size_and_alignment): Add.
2406         (comp_proto_with_proto): Add strict parameter.
2407         (CLS_HAS_CXX_STRUCTORS): Add.
2408         (TAG_ASSIGNIVAR): Add.
2409         (TAG_ASSIGNGLOBAL): Add.
2410         (TAG_ASSIGNSTRONGCAST): Add.
2411         (TAG_MSGSEND_FAST): Add.
2412         (TAG_ASSIGNIVAR_FAST): Add.
2413         (TAG_CXX_CONSTRUCT): Add.
2414         (TAG_CXX_DESTRUCT): Add.
2415         (OBJC_LOOKUP_CLASS): Add.
2416         (OBJC_LOOKUP_NO_SUPER): Add.
2417         (objc_finish_file): Add pch support.
2418         (objc_finish_implementation): Add Objective-C++ support.
2419         (synth_module_prologue): Likewise.
2420         (synth_module_prologue): Add fast dispatching.
2421         (objc_get_class_reference): Add Objective-C++ support.
2422         (objc_generate_write_barrier): Likewise.
2423         (next_sjlj_build_enter_and_setjmp): Likewise.
2424         (objc_begin_try_stmt): Likewise.
2425         (build_next_objc_exception_stuff): Add fast ivar support.
2426         (build_private_template): Mark the record as used so debug
2427         information is generated.
2428         (build_protocol_template): Add Objective-C++ support.
2429         (objc_method_parm_type) Likewise.
2430         (objc_generate_cxx_ctor_or_dtor): Likewise.
2431         (objc_generate_cxx_cdtors): Likewise.
2432         (build_protocol_initializer): Likewise.
2433         (build_category_template): Likewise.
2434         (build_class_template): Likewise.
2435         (build_method_list_template): Likewise.
2436         (build_category_initializer): Likewise.
2437         (build_shared_structure_initializer): Likewise.
2438         (objc_finish_message_expr): Likewise.
2439         (build_objc_method_call): Add fast dispatch support.
2440         (lookup_method_static): Add support to end search at superclasses.
2441         (add_method_to_hash_list): Add strict parameter to
2442         comp_proto_with_proto.
2443         (objc_add_method): Likewise.
2444         (objc_add_method): Also set the interface_value.
2445         (add_instance_variable): Add Objective-C++ support.
2446         (objc_is_public): Likewise.
2447         (start_class): Likewise.
2448         (continue_class): Likewise.
2449         (encode_aggregate_within): Likewise.
2450         (start_method_def): Likewise.
2451         (objc_start_function): Clear current_function_returns_value
2452         and current_function_returns_null.
2453         (really_start_method): Add Objective-C++ support.
2454         (objc_finish_method_definition): Add warning for missing
2455         [super dealloc].
2456         (finish_objc): Add Objective-C++ support.
2457         (generate_objc_image_info): Likewise.
2458         (objc_lookup_ivar): Likewise.
2459         * objc-act.h (TYPE_HAS_OBJC_INFO): Likewise.
2460         (INIT_TYPE_OBJC_INFO): Likewise.
2461         (DUP_TYPE_OBJC_INFO): Likewise.
2463 2005-04-23  DJ Delorie  <dj@redhat.com>
2465         * objc-act.c: Adjust warning() callers.
2467 2005-04-21  Roger Sayle  <roger@eyesopen.com>
2469         * objc-act.h (METHOD_ADD_ARGS_ELLIPSIS_P): New macro for accessing
2470         this field of an objc method decl.
2471         * objc-act.c (build_method_decl): Take an additional "ellipsis"
2472         argument, and set METHOD_ADD_ARGS_ELLIPSIS_P as appropriate.
2473         (objc_build_method_signature): Accept additional "ellipsis"
2474         argument and pass it to build_method_decl.
2475         (get_arg_type_list, start_method_def, gen_method_decl): Use
2476         the new METHOD_ADD_ARGS_ELLIPSIS_P instead of examining the
2477         TREE_OVERFLOW field of a TREE_LIST node.
2479 2005-04-20  Joseph S. Myers  <joseph@codesourcery.com>
2481         PR c/12913
2482         * objc-act.c (objc_start_function): Create stack level for context
2483         of identifiers with variably modified type.
2485 2005-03-30  Joseph S. Myers  <joseph@codesourcery.com>
2487         PR c/772
2488         PR c/17913
2489         * objc-act.c (objc_start_function): Push context on
2490         label_context_stack.
2492 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
2494         * objc-act.c (next_sjlj_build_enter_and_setjmp,
2495         next_sjlj_build_catch_list, next_sjlj_build_try_catch_finally):
2496         Call c_common_truthvalue_conversion.
2498 2005-02-25  Joseph S. Myers  <joseph@codesourcery.com>
2500         * Make-lang.in (objc/objc-parse.o-warn, objc/objc-parse.o,
2501         objc/objc-parse.c, objc/objc-parse.y): Remove
2502         (OBJC_OBJS, objc.srcextra, objc.tags, objc.mostlyclean,
2503         objc.distclean, objc.maintainer-clean): Update for new parser.
2504         * config-lang.in (gtfiles): Update for new parser.
2506 2005-01-29  Kazu Hirata  <kazu@cs.umass.edu>
2508         * lang-specs.h, objc-act.c, objc-act.h, objc-lang.c: Update
2509         copyright.
2511 2005-01-27  Matt Austern  <austern@apple.com>
2513         * objc-act.c (objc_finish_file): In ObjC++ mode, set at_eof before
2514         calling instantiate_pending_templates.
2516 2005-01-26  Alexander Malmberg  <alexander@malmberg.org>
2518         PR objc/18862
2519         * objc-act.c (build_selector_translation_table): Use
2520         input_location in the diagnostic for the GNU runtime or if
2521         TREE_PURPOSE (chain) is NULL.
2523 2005-01-25  Alexander Malmberg  <alexander@malmberg.org>
2525         PR objc/18408
2526         * objc-act.c (objc_types_compatible_p): New function.
2527         * objc-act.h (objc_types_compatible_p): Declare.
2528         * objc-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
2530 2005-01-16  Ziemowit Laski  <zlaski@apple.com>
2532         * objc-act.c (objc_push_parm): Call c_type_promotes_to()
2533         via a lang-hook.
2535 2005-01-15  Ziemowit Laski  <zlaski@apple.com>
2537         PR objc/19321
2538         * objc-act.c (get_arg_type_list): Decay function arguments into
2539         pointers.
2540         (objc_push_parm): Likewise; bring PARM_DECL construction closer
2541         in line with what the C front-end does.
2542         (objc_get_parm_info): Call pushdecl() and finish_decl() on
2543         each PARM_DECL, like the C front-end does.
2544         (start_method_def): Remove redundant ARRAY_TYPE decay.
2545         (objc_start_function): Bring closer in line with what the
2546         C front-end does for functions.
2548 2005-01-14  Mike Stump  <mrs@apple.com>
2550         * lang-specs.h ("@objective-c"): Use cc1obj when -E is used so
2551         that -fobjc-exceptions is accepted.
2553 2004-12-30  Ziemowit Laski  <zlaski@apple.com>
2555         PR objc/18971
2556         * objc-act.c (get_arg_type_list, start_method_def): Decay
2557         array arguments into pointers.
2558         (gen_type_name_0): Learn to pretty-print array types.
2560 2004-12-15  Ziemowit Laski  <zlaski@apple.com>
2562         * objc-act.c (build_private_template): Change to return 'void'; do
2563         not set ivar_context, uprivate_record or objc_instance_type.
2564         (objc_comptypes, gen_type_name_0): For types 'id' and 'Class',
2565         retrieve protocol list from the pointee rather than the pointer itself;
2566         check TYPE_HAS_OBJC_INFO(...) precondition before accessing
2567         TYPE_OBJC_PROTOCOL_LIST.
2568         (objc_get_protocol_qualified_type): For types 'id' and 'Class',
2569         construct a variant of the pointee as well as the pointer, and
2570         store protocol information in the former.  When creating variants
2571         of RECORD_TYPEs, clone their TYPE_LANG_SPECIFIC fields and propagate
2572         TYPE_OBJC_INTERFACE information.
2573         (objc_declare_class): If a TYPE_DECL is looked up, retrieve the
2574         underlying RECORD_TYPE to check for presence of TYPE_OBJC_INTERFACE;
2575         for newly-created RECORD_TYPEs, create a tentative TYPE_OBJC_INTERFACE
2576         holding an IDENTIFIER_NODE.
2577         (objc_finish_message_expr): Check TYPE_HAS_OBJC_INFO(...) before
2578         accessing TYPE_OBJC_PROTOCOL_LIST; Use TYPE_OBJC_INTERFACE instead
2579         of calling lookup_interface(); allow for TYPE_OBJC_INTERFACE holding
2580         an IDENTIFIER_NODE (meaning a @class forward-declaration only).
2581         (objc_is_public): Check TYPE_OBJC_INTERFACE instead of calling
2582         lookup_interface().
2583         (continue_class): For @implementations, set ivar_context,
2584         uprivate_record and objc_instance_type, for @interfaces, call
2585         build_private_template().
2586         (encode_pointer): Check TYPE_HAS_OBJC_INFO(...) before accessing
2587         TYPE_OBJC_INTERFACE.
2588         (objc_types_are_equivalent): Check TYPE_HAS_OBJC_INFO(...) before
2589         accessing TYPE_OBJC_PROTOCOL_LIST.
2590         * objc-act.h (OBJC_INFO_SLOT_ELTS, TYPE_OBJC_INFO, INIT_TYPE_OBJC_INFO,
2591         DUP_TYPE_OBJC_INFO, ALLOC_OBJC_TYPE_LANG_SPECIFIC,
2592         SIZEOF_OBJC_TYPE_LANG_SPECIFIC): New macros.
2593         (TYPE_OBJC_INTERFACE): Replaces TREE_STATIC_INSTANCE and now points
2594         to an actual @interface; stored in TYPE_LANG_SPECIFIC(...).
2595         (TYPE_OBJC_PROTOCOL_LIST): Replaces TYPE_PROTOCOL_LIST; stored in
2596         TYPE_LANG_SPECIFIC(...).
2597         (TREE_STATIC_INSTANCE, TYPE_PROTOCOL_LIST): Delete.
2598         (IS_ID, IS_CLASS, IS_PROTOCOL_QUALIFIED_UNTYPED, IS_SUPER,
2599         TYPED_OBJECT): Check for POINTER_TYPE rather than POINTER_TYPE_P;
2600         adjust for use of TYPE_OBJC_INTERFACE and TYPE_OBJC_PROTOCOL_LIST
2601         instead of TREE_STATIC_INSTANCE and TYPE_PROTOCOL_LIST.
2603 2004-11-29  Joseph Myers  <joseph@codesourcery.com>
2605         PR c/7544
2606         * Make-lang.in (objc/objc-act.o): Update dependencies.
2607         * objc-act.c (objc_finish_file): Call
2608         maybe_apply_pending_pragma_weaks if not OBJCPLUS.
2610 2004-11-09  Andrew Pinski  <pinskia@physics.uc.edu>
2612         PR objc/18406
2613         * obj-act.c (encode_type): 96bits doubles are encoded the
2614         same way as 64bit and 128bit doubles are.
2616 2004-11-09  Joseph S. Myers  <joseph@codesourcery.com>
2618         * objc-act.c: Use %q, %< and %> for quoting in diagnostics.
2620 2004-11-08  Andrew Pinski  <pinskia@physics.uc.edu>
2622         PR objc/16546
2623         * objc-act.c (generate_method_descriptors): Remove setting
2624         the new decls' type to variable_length_type.
2625         (generate_ivar_lists): Likewise.
2626         (generate_dispatch_tables): Likewise.
2628 2004-10-30  Ziemowit Laski  <zlaski@apple.com>
2630         * objc-act.c (objc_lookup_ivar): The new OTHER parameter
2631         contains the result of the ID lookup by the C or C++
2632         front-end; in class methods, use OTHER if it exists;
2633         in instance methods, use OTHER only if it is locally
2634         declared.
2636 2004-10-26  Ziemowit Laski  <zlaski@apple.com>
2638         * objc-act.c (finish_class): Do not synthesize bogus
2639         'extern objc_object *_Foo;' declarations for @interface Foo.
2641 2004-10-25  Ziemowit Laski  <zlaski@apple.com>
2642             David Ayers  <d.ayers@inode.at>
2644         * objc-act.c (objc_comptypes): Use IS_PROTOCOL_QUALIFIED_UNTYPED
2645         instead of IS_PROTOCOL_QUALIFIED_ID; add comparisons for:
2646         'Class <Protocol> != id <Protocol>'; 'Class <Protocol> != <class> *';
2647         'Class <Protocol> == id' and 'Class <Protocol> == Class'.
2648         (objc_is_id): Add test for 'super'.
2649         (objc_finish_message_expr): Allow for messaging of 'Class <Proto>'
2650         receivers; if class methods are not found in protocol lists, search
2651         for instance methods therein and warn if one is found.  Look in
2652         global hash tables for suitable method as a last resort when messaging
2653         'id <Proto>', 'Class <Proto>' and invalid receiver types.
2654         (objc_add_method): Insert instance methods listed in protocols into
2655         the global class method hash table.
2656         * objc-act.h (IS_PROTOCOL_QUALIFIED_ID): Rename to
2657         IS_PROTOCOL_QUALIFIED_UNTYPED and allow for 'Class <Proto>' in
2658         addition to 'id <Proto>'.
2660 2004-10-21  Andrew Pinski  <pinskia@physics.uc.edu>
2662         PR objc/17923
2663         * objc-act.c (objc_build_string_object): Create a CONST_DECL
2664         for the NeXT runtime case.
2666 2004-10-02  Kazu Hirata  <kazu@cs.umass.edu>
2668         * objc-act.c: Fix comment typos.
2670 2004-09-24  Ziemowit Laski  <zlaski@apple.com>
2672         * objc-act.c (init_objc_symtab, init_module_descriptor,
2673         build_shared_structure_initializer): When initializing 'long'
2674         fields, ensure that the initializer value is also 'long'.
2676 2004-09-24  Zack Weinberg  <zack@codesourcery.com>
2678         * objc-act.c: Change annotate_with_locus to SET_EXPR_LOCATION
2679         throughout.
2680         (objc_init): Only set input_line to 0 #ifndef USE_MAPPED_LOCATION.
2681         (build_selector_translation_table): Use %J in diagnostic
2682         instead of diddling input_line.  Fix spelling.
2684 2004-09-21  Ziemowit Laski  <zlaski@apple.com>
2686         * objc-act.c (objc_fold_objc_type_ref): New function.
2687         * objc-act.h (objc_fold_objc_type_ref): New prototype.
2689 2004-09-09  Joseph S. Myers  <jsm@polyomino.org.uk>
2691         * objc-act.c (objc_start_function, really_start_method,
2692         objc_get_parm_info, start_method_def): Update to new arg_info
2693         structures.
2695 2004-09-07  Ziemowit Laski  <zlaski@apple.com>
2697         * Make-lang.in (objc/objc-parse.o): Depend on $(C_COMMON_H) instead of
2698         objc/objc-act.h.
2699         (objc/objc-act.o): Depend on $(HASHTAB_H).
2700         * objc-act.c: Include hashtab.h; in ObjC++ mode, include cp-tree.h and
2701         objcp-decl.h instead of c-tree.h.
2702         (build_module_descriptor, get_class_ivars, synth_id_with_class_suffix,
2703         error_with_ivar, gen_method_decl, gen_declaration, setup_string_decl,
2704         build_protocol_template): Adjust prototypes.
2705         (build_module_initializer_routine, start_class, continue_class,
2706         finish_class, start_method_def, objc_start_function, start_protocol,
2707         build_method_decl, objc_add_method, add_instance_variable,
2708         build_ivar_reference, is_ivar, is_private, get_super_receiver,
2709         build_selector_table_decl, objc_push_parm, objc_get_parm_info,
2710         gen_type_name, gen_type_name_0, start_var_decl, finish_var_decl,
2711         create_field_decl): New prototypes.
2712         (objc_expand_function_end, comp_method_with_proto, objc_expr_last,
2713         gen_declaration_1, gen_declarator, is_complex_decl, adorn_decl,
2714         define_decl, create_builtin_decl, gen_declspecs): Remove prototypes.
2715         (TYPE_ID): Rename to OBJECT_TYPEDEF_NAME.
2716         (CLASS_TYPEDEF_NAME): New.
2717         (TAG_EXECCLASS): Change from a global variable to a #define.
2718         (TAG_RETURN_STRUCT): Delete.
2719         (TAG_GNUINIT): New, holds '__objc_gnu_init' name.
2720         (objc_inherit_code, objc_public_flag): New, moved from c-parse.in.
2721         (string_descriptor): New struct.
2722         (string_htab): New hash table.
2723         (string_hash, string_eq): New prototypes.
2724         (generate_struct_by_value_array): Call create_field_decl() instead of
2725         create_builtin_decl().
2726         (objc_init): Do not initialize objc_ellipsis_node or TAG_EXECCLASS;
2727         In ObjC++ mode, call cxx_init() instead of c_objc_common_init().
2728         (objc_finish_file): In ObjC++, call instantiate_pending_templates()
2729         and cp_finish_file().
2730         (define_decl, get_static_reference, get_protocol_reference,
2731         create_builtin_decl): Remove functions.
2732         (objc_start_class_interface, objc_start_category_interface,
2733         objc_start_protocol, objc_continue_interface, objc_finish_interface,
2734         objc_start_class_implementation, objc_start_category_implementation,
2735         objc_continue_implementation, objc_finish_implementation,
2736         objc_set_visibility, objc_set_method_type,
2737         objc_build_method_signature, objc_add_method_declaration,
2738         objc_start_method_definition, objc_add_instance_variable,
2739         objc_get_protocol_qualified_type, create_field_decl,
2740         start_var_decl, finish_var_decl): New functions.
2741         (setup_string_decl): Simplify since it is only called once.
2742         (synth_module_prologue): Call build_class_template(); predefine 'id'
2743         and 'Class' as typedefs; rename 'temp_type' to 'type'; disable debug
2744         hooks for duration of function; fix GNU runtime messenger signatures
2745         to correspond to reality; forward-declare '__objc_exec_class' for the
2746         GNU runtime; call build_selector_table_decl(); in ObjC++ mode, generate
2747         'extern "C" { ... }' wrappers around synthesized declarations; call
2748         build_protocol_template() and build_category_template().
2749         (string_hash, string_eq): New functions.
2750         (objc_build_string_object): Check metaclass correctness only once;
2751         store string literals in hash table.
2752         (objc_build_constructor): Do not convert initializer elements;
2753         adjust for ObjC++ impedance mismatch.
2754         (build_objc_symtab_template): Call create_field_decl() instead of
2755         create_builtin_decl().
2756         (init_objc_symtab): Add missing conversion to initializer element.
2757         (build_metadata_decl): Call start_var_decl() instead of define_decl().
2758         (generate_objc_symtab_decl): Do not call build_category_template();
2759         call start_var_decl() and finish_var_decl() instead of start_decl()
2760         and finish_decl().
2761         (build_module_descriptor): Call create_field_decl() instead of
2762         grokfield(); call start_var_decl() and finish_var_decl() instead of
2763         start_decl() and finish_decl(); always mark module descriptor as
2764         used; move GNU runtime-specific functionality to
2765         build_module_initializer_routine().
2766         (build_module_initializer_routine): New function, broken off of
2767         build_module_descriptor().
2768         (objc_static_init_needed_p, objc_generate_static_init_call): New
2769         functions.
2770         (generate_static_references, generate_strings,
2771         build_selector_translation_table, generate_descriptor_table,
2772         generate_ivars_list, generate_dispatch_table, generate_category): Call
2773         start_var_decl() and finish_var_decl() instead of start_decl() and
2774         finish_decl(); build a type directly instead of via groktypename().
2775         (build_selector_reference_decl, build_selector_table_decl,
2776         build_class_reference_decl, build_protocol_reference,
2777         generate_objc_image_info): Call start_var_decl() instead of
2778         build_decl().
2779         (build_selector_reference): For GNU runtime, do not call
2780         build_selector_reference_decl().
2781         (build_selector, build_typed_selector_reference): Always convert
2782         result to the selector type.
2783         (add_objc_string): Cast return value to 'char *'.
2784         (build_method_prototype_template, build_selector_template,
2785         build_method_template): Use actual selector type for fields
2786         pointing to selectors.
2787         (finish_objc): For GNU runtime, call
2788         build_module_initializer_routine() after build_module_descriptor().
2789         (generate_protocol_list, generate_shared_structures): Call
2790         start_var_decl() and finish_var_decl() instead of start_decl() and
2791         finish_decl(); build a type directly instead of via
2792         groktypename().
2793         (synth_id_with_class_suffix): Return a string.
2794         (get_arg_type_list): For instance methods, use the instance type for
2795         'self'; do not call groktypename_in_parm_context().
2796         (build_objc_string_decl): Squash redeclaration errors in ObjC++.
2797         (objc_is_class_name): Use OBJC_TYPE_NAME instead of TYPE_NAME;
2798         handle RECORD_TYPEs in ObjC as well as ObjC++.
2799         (objc_is_id): New function.
2800         (objc_is_object_ptr): Return the canonical type node.
2801         (objc_get_class_ivars): Simplify using get_class_ivars().
2802         (get_class_ivars): Remove second parameter; create a fresh copy
2803         of the ivar list for each call; do not check for existence of
2804         super class.
2805         (objc_eh_runtime_type): Mark #ifndef OBJCPLUS.
2806         (objc_init_exceptions): When using SJLJ-style exceptions, require
2807         the use of '-fobjc-exceptions' flag; do not require it for DWARF-style
2808         exceptions.
2809         (objc_build_exc_ptr, next_sjlj_build_try_catch_finally): Use
2810         objc_object_type instead of objc_id_type.
2811         (objc_begin_catch_clause): Convert the incoming PARM_DECL into
2812         a VAR_DECL before placing it in the appropriate scope; do not
2813         call define_decl(); adjust call to c_begin_compound_stmt();
2814         use objc_object_type instead of objc_id_type.
2815         (build_next_objc_exception_stuff): Call create_field_decl() instead
2816         of create_builtin_decl(); construct type directly instead of calling
2817         groktypename(); use OBJC_VOID_AT_END to mark end of function parameters.
2818         (build_private_template): Adjust call to get_class_ivars(); build
2819         a type directly instead of via groktypename().
2820         (build_protocol_template, build_method_prototype_list_template,
2821         build_method_prototype_template, build_category_template,
2822         build_selector_template, build_class_template, build_super_template,
2823         build_ivar_template, build_ivar_list_template,
2824         build_method_list_template, build_method_template):
2825         Call create_field_decl() instead of grokfield().
2826         (objc_method_parm_type): Do not call groktypename().
2827         (generate_descriptor_table): Call start_var_decl() and
2828         finish_var_decl() instead of start_decl() and finish_decl().
2829         (generate_method_descriptors, build_protocol_initializer,
2830         generate_dispatch_tables, build_category_initializer,
2831         build_shared_structure_initializer): Do not call groktypename().
2832         (generate_protocols): Call start_var_decl() and finish_var_decl()
2833         instead of start_decl() and finish_decl(); do not call groktypename().
2834         (error_with_ivar): Remove last parameter.
2835         (check_ivars): Do not iterate ovar CLASS_RAW_IVARS lists in addition
2836         to CLASS_IVARS lists; adjust calls to error_with_ivar().
2837         (generate_ivar_lists): Convert one of the initializer elements; do
2838         not call groktypename().
2839         (get_arg_type_list, start_method_def, gen_method_def): Account for
2840         new representation of variable arguments and '...' in Objective-C
2841         methods; add Objective-C++ impedance matching code.
2842         (is_objc_type_qualifier): Remove function.
2843         (adjust_type_for_id_default): Simplify; there is no longer a need to
2844         wade through declspecs.
2845         (lookup_interface, start_class, continue_class,
2846         finish_class, start_method_def, start_protocol, build_method_decl,
2847         objc_add_method, add_instance_variable, build_ivar_reference,
2848         is_ivar, is_private, get_super_receiver, objc_build_finally_epilogue):
2849         Make into static functions.
2850         (receiver_is_class_object): Use new IS_CLASS() macro.
2851         (objc_build_message_expr): Tweak ObjC++ message argument handling;
2852         call objc_finish_message_expr() instead of finish_message_expr().
2853         (finish_message_expr): Rename to objc_finish_message_expr(); use
2854         OBJC_TYPE_NAME and OBJC_SET_TYPE_NAME macros instead of TYPE_NAME.
2855         call gen_type_name() instead of gen_declaration(); call objc_is_id()
2856         instead of using IS_ID and IS_CLASS; Use objc_class_name instead of
2857         calling get_identifier("Class"); handle CONVERT_EXPRs in receiver.
2858         (build_objc_method_call, warn_with_method): Do not call groktypename().
2859         (build_ivar_reference): Call convert() instead of clobbering in a
2860         type.
2861         (hash_init): Initialize string_htab hash table.
2862         (add_instance_variable): Simplify parameter list; do not call grokfield();
2863         do not populate CLASS_IVARS list.
2864         (start_class): Check for the existence of super class, if one was specified.
2865         (continue_class): Use CLASS_RAW_IVARS rather than CLASS_IVARS; do not
2866         call build_class_template(); adjust call to get_class_ivars(); call
2867         build_decl(), pushdecl() and finish_decl() instead of define_decl().
2868         (finish_class): Call build_decl(), pushdecl() and finish_decl() instead
2869         of define_decl().
2870         (add_protocols): Use PROTOCOL_BINFO_ELTS for the tree vector size.
2871         (start_protocol): Do not call build_protocol_template(); use
2872         PROTOCOL_BINFO_ELTS for the tree vector size.
2873         (encode_type_qualifiers): Do not handle the 'const' qualifier here.
2874         (encode_pointer): Encode 'const char *' as 'r*', for backwards
2875         compatibility.
2876         (encode_array): Use HOST_WIDE_INT_PRINT_DEC instead of "%ld".
2877         (encode_type): Handle the 'const' qualifier here.
2878         (objc_parmlist): New global variable, sued by objc_push_parm and
2879         objc_get_parm_info().
2880         (objc_push_parm, objc_get_parm_info): New functions.
2881         (objc_expr_last): Remove function.
2882         (synth_self_and_ucmd_args): For instance methods, use the instance
2883         type for 'self'; call objc_push_parm() instead of push_parm_decl().
2884         (start_method_def): Do not call push_scope(), declare_parm_level(),
2885         pop_scope(), push_parm_decl(), store_parm_decls() or objc_expr_last();
2886         just use objc_push_parm() and objc_get_parm_info().
2887         (comp_method_with_proto): Remove function.
2888         (objc_types_are_equivalent): Strip away indirections before comparing
2889         underlying types.
2890         (comp_proto_with_proto): Do not call groktypename(); types are no
2891         longer in raw declspec format.
2892         (objc_start_function): New function.
2893         (really_start_method): Call comp_proto_with_proto() instead of
2894         comp_method_with_proto(); call objc_start_function() instead of
2895         hand-crafting a function declarator.
2896         (continue_method_def, objc_expand_function_end): Remove functions.
2897         (get_super_receiver): Call objc_get_current_scope() instead of
2898         get_current_scope(); reference 'super_class' field (instead of
2899         'class').
2900         (finish_method_def): Rename to objc_finish_method_definition() and
2901         add a function decl parameter; move method encoding call from
2902         objc_expand_function_end().
2903         (is_complex_decl, adorn_decl, gen_declarator, gen_declspecs,
2904         gen_declaration_1): Remove functions.
2905         (tmpbuf, RAW_DECLSPEC): Remove.
2906         (gen_declaration): Remove second parameter; simplify to deal
2907         with TYPE_P nodes instead of raw declspecs.
2908         (gen_type_name, gen_type_name_0): New functions.
2909         (gen_method_decl): Remove second parameter; call gen_type_name()
2910         instead of gen_declaration_1().
2911         (dump_interface): Adjust calls to gen_declaration() and
2912         gen_method_decl(); do not allocate a separate string buffer.
2913         (init_objc): Allocate a larger string buffer to accommodate
2914         dump_interface(); adjust call to build_module_descriptor();
2915         add call to build_module_initializer_routine() for the GNU
2916         runtime.
2917         (generate_classref_translation_entry): Do not call start_decl(); call
2918         finish_var_decl() instead of finish_decl(); call convert() instead of
2919         build_c_cast().
2920         * objc-act.h (CLASS_OWN_IVARS): Remove accessor.
2921         (CLASS_BINFO_ELTS): Reduce from 6 to 5, now that CLASS_OWN_IVARS is
2922         gone.
2923         (OCTI_GNU_INIT_DECL, GNU_INIT_decl): New.
2924         (OCTI_ELLIPSIS_NODE, objc_ellipsis_node): Remove.
2925         (OCTI_ID_ID, id_type, objc_id_id): Rename to OCTI_ID_NAME,
2926         objc_object_type and objc_object_name, respectively.
2927         (OCTI_CLS_REF, OCTI_CLASS_NAME, objc_class_reference,
2928         objc_class_name): New.
2929         (IS_CLASS): New macro.
2930         (IS_ID, IS_SUPER): Robustify.
2931         (OCTI_EXECCLASS_DECL, execclass_decl): New.
2932         (finish_file, start_class, continue_class, finish_class,
2933         start_method_def, continue_method_def, finish_method_def,
2934         start_protocol, finish_protocol, objc_build_throw_stmt,
2935         objc_build_try_catch_finally_stmt, objc_build_synchronized_prologue,
2936         objc_build_synchronized_epilogue, objc_build_try_prologue,
2937         objc_build_try_epilogue, objc_build_catch_stmt, objc_build_catch_epilogue,
2938         objc_build_finally_prologue, objc_build_finally_epilogue,
2939         is_ivar, is_private, is_public, add_instance_variable, objc_add_method,
2940         get_super_receiver, objc_clear_super_receiver, get_class_ivars_from_name,
2941         get_class_reference, get_static_reference, get_object_reference,
2942         build_message_expr, finish_message_expr, build_selector_expr,
2943         build_ivar_reference, build_keyword_decl, build_method_decl,
2944         build_protocol_expr, build_objc_string_object, objc_declare_alias,
2945         objc_declare_class, objc_declare_protocols, objc_comptypes,
2946         objc_check_decl, build_encode_expr): Remove prototypes.
2947         (imp_count, cat_count): Make GGC-aware.
2948         (OBJC_SET_TYPE_NAME): New macro.
2950 2004-09-03  Ziemowit Laski  <zlaski@apple.com>
2952         * config-lang.in: Update copyright notice.
2953         (lang_requires): Indicate that ObjC requires C to be built first.
2955 2004-09-01  Ziemowit Laski  <zlaski@apple.com>
2957         * objc-act.c (objc_check_decl): Use OBJC_TYPE_NAME macro instead of
2958         TYPE_NAME.
2959         (build_objc_string_object): Rename to objc_build_string_object().
2960         (get_class_reference): Rename to objc_get_class_reference().
2961         (get_class_ivars_from_name): Rename to objc_get_class_ivars().
2962         (next_sjlj_build_catch_list, get_super_receiver): Call
2963         objc_get_class_reference() instead of get_class_reference().
2964         (build_keyword_decl): Rename to objc_build_keyword_decl().
2965         (build_message_expr): Rename to objc_build_message_expr().
2966         (build_protocol_expr): Rename to objc_build_protocol_expr().
2967         (build_selector_expr): Rename to objc_build_selector_expr().
2968         (build_encode_expr): Rename to objc_build_encode_expr().
2969         * objc-act.h (get_class_ivars_from_name): Rename prototype to
2970         objc_get_class_ivars().
2971         (get_class_reference): Rename prototype to objc_get_class_reference().
2972         (build_message_expr): Rename prototype to objc_build_message_expr().
2973         (build_selector_expr): Rename prototype to objc_build_selector_expr().
2974         (build_keyword_decl): Rename prototype to objc_build_keyword_decl().
2975         (build_protocol_expr): Rename prototype to objc_build_prototype_expr().
2976         (build_objc_string_object): Rename prototype to
2977         objc_build_string_object().
2979 2004-09-01  Ziemowit Laski  <zlaski@apple.com>
2981         * objc-act.c (lookup_interface): Make function 'static' and add a
2982         local prototype.
2983         (objc_check_decl, get_class_reference, objc_declare_alias,
2984         objc_declare_class, objc_is_object_ptr): Call objc_is_class_name()
2985         instead of is_class_name().
2986         (get_super_receiver, objc_clear_super_receiver): Call
2987         objc_get_current_scope() instead of get_current_scope().
2988         (is_class_name): Rename to objc_is_class_name.
2989         (lookup_objc_ivar): Rename to objc_lookup_ivar.
2991 2004-08-28  Ziemowit Laski  <zlaski@apple.com>
2993         * objc-act.c (objc_is_reserved_word): New function.
2995 2004-08-15  Ziemowit Laski  <zlaski@apple.com>
2997         * Make-lang.in (objc/objc-lang.o): Depend on $(C_PRETTY_PRINT_H),
2998         $(DIAGNOSTIC_H), c-objc-common.h and gtype-objc.h, but not on toplev.h.
2999         (objc/objc-parse.o): Do not depend on gtype-objc.h.
3000         * objc-act.c: Do not include gtype-objc.h.
3001         (finish_file): Rename to objc_finish_file().
3002         * objc-act.h (finish_file): Update copyright notice; remove prototype.
3003         * objc-lang.c: Update copyright notice; include diagnostic.h,
3004         c-objc-common.h, c-pretty-print.h and gtype-objc.h; do not include
3005         toplev.h.
3006         (finish_file): New hook routine.
3007         (LANG_HOOKS_FINISH, LANG_HOOKS_INIT_OPTIONS,
3008         LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
3009         LANG_HOOKS_MISSING_ARGUMENT, LANG_HOOKS_POST_OPTIONS,
3010         LANG_HOOKS_GET_ALIAS_SET, LANG_HOOKS_SAFE_FROM_P,
3011         LANG_HOOKS_EXPAND_EXPR, LANG_HOOKS_MARK_ADDRESSABLE,
3012         LANG_HOOKS_PARSE_FILE, LANG_HOOKS_TRUTHVALUE_CONVERSION,
3013         LANG_HOOKS_FINISH_INCOMPLETE_DECL, LANG_HOOKS_UNSAFE_FOR_REEVAL,
3014         LANG_HOOKS_STATICP, LANG_HOOKS_SET_DECL_ASSEMBLER_NAME,
3015         LANG_HOOKS_NO_BODY_BLOCKS, LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL,
3016         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_FUNCTION_ENTER_NESTED,
3017         LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_DUP_LANG_SPECIFIC_DECL,
3018         LANG_HOOKS_DECL_UNINIT, LANG_HOOKS_RTL_EXPAND_STMT,
3019         LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
3020         LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
3021         LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS,
3022         LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
3023         LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING,
3024         LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS,
3025         LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
3026         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_TYPE_FOR_MODE,
3027         LANG_HOOKS_TYPE_FOR_SIZE, LANG_HOOKS_SIGNED_TYPE,
3028         LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE,
3029         LANG_HOOKS_INCOMPLETE_TYPE_ERROR, LANG_HOOKS_TYPE_PROMOTES_TO,
3030         LANG_HOOKS_REGISTER_BUILTIN_TYPE, LANG_HOOKS_WRITE_GLOBALS):
3031         Move to c-objc-common.h.
3034 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
3035 Free Software Foundation, Inc.
3037 Copying and distribution of this file, with or without modification,
3038 are permitted in any medium without royalty provided the copyright
3039 notice and this notice are preserved.