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