OSDN Git Service

104948ba908b507b56f277472ee19b1aff660840
[pf3gnuchains/gcc-fork.git] / gcc / objc / ChangeLog
1 2010-11-06  Iain Sandoe  <iains@gcc.gnu.org>
2
3         PR target/44981
4         * objc-act.c (objc_build_string_object): Amend for renamed hook.
5         (objc_string_ref_type_p): New.
6         (objc_check_format_arg): New.
7
8 2010-11-04  Nicola Pero  <nicola.pero@meta-innovation.com>
9
10         Fixed using the Objective-C 2.0 dot-syntax with class names.    
11         * objc-act.c (objc_build_class_component_ref): New.
12
13 2010-11-03  Nicola Pero  <nicola.pero@meta-innovation.com>
14
15         * objc-act.c (objc_add_dynamic_declaration): Allow @dynamic in a
16         category.
17         (objc_type_valid_for_messaging): Added 'accept_classes' argument;
18         if set to 'true', return 'true' for Class objects.  Do not remove
19         more than on pointer indirection.
20         (objc_add_property_declaration): Only warn about 'assign'
21         semantics for Objective-C objects if warn_property_assign_default;
22         and do not warn if the property is readonly or if the type is a Class.
23         (objc_finish_foreach_loop): Updated calls to
24         objc_type_valid_for_messaging.
25         
26 2010-11-03  Nicola Pero  <nicola.pero@meta-innovation.com>
27
28         Implemented -fobjc-std=objc1 flag.
29         * objc-act.c (objc_start_class_interface): If attributes are
30         specified when flag_objc1_only is set, print an error.
31         (objc_start_category_interface): Same change.
32         (objc_start_protocol): Same change.
33         (objc_add_method_declaration): Same change.
34         (objc_start_method_definition): Same change.
35         (objc_build_keyword_decl): Same change.
36         (objc_set_visibility): If OBJC_IVAR_VIS_PACKAGE is used when
37         flag_objc1_set is set, print an error.
38         (objc_set_method_opt): If flag_objc1_only is set, print an error.
39         (objc_add_property_declaration): Same change.
40         (objc_add_synthesize_declaration): Same change.
41         (objc_add_dynamic_declaration): Same change.
42         (objc_finish_foreach_loop): Same change.
43         (objc_maybe_build_component_ref): If flag_objc1_only is set,
44         return immediately.
45
46 2010-11-03  Nicola Pero  <nicola.pero@meta-innovation.com>
47
48         * objc-act.c (maybe_make_artificial_property_decl): New.
49         (objc_maybe_build_component_ref): Call
50         maybe_make_artificial_property_decl if a property can not be
51         found.  Do not call objc_finish_message_expr if
52         PROPERTY_HAS_NO_GETTER.
53         * objc-act.h Updated comments.
54         (PROPERTY_HAS_NO_GETTER): New.
55         (PROPERTY_HAS_NO_SETTER): New.
56         * objc-tree.def: Updated comment.
57         
58 2010-11-01  Nicola Pero  <nicola.pero@meta-innovation.com>
59
60         Implemented format and noreturn attributes for Objective-C methods.
61         * objc-act.c (objc_start_method_definition): If method attributes
62         are specified emit a warning and ignore them.
63         (build_objc_method_call): Moved deprecation warnings from here ...
64         (objc_finish_message_expr): to here.  Do not emit deprecation
65         warnings if the receiver is of type 'id'.
66         (really_start_method): Install 'deprecation' and 'noreturn'
67         attributes.
68         (objc_decl_method_attributes): Carefully filter out the list of
69         attributes, allowing only "noreturn", "format", "sentinel" and
70         "deprecated".  In the case of "format", adjust the arguments.
71         Always process the attributes in the same way no matter if
72         "sentinel" is in the list or not.
73         
74 2010-11-01  Nicola Pero  <nicola.pero@meta-innovation.com>
75
76         * objc-act.c (objc_maybe_build_component_ref): Warn about using
77         deprecated properties.
78         (objc_maybe_printable_name): Support PROPERTY_DECL.
79         
80 2010-11-01  Nicola Pero  <nicola.pero@meta-innovation.com>
81
82         Implemented Objective-C 2.0 property accessors. 
83         * objc-act.h (enum objc_tree_index): Added OCTI_GET_PROPERTY_DECL,
84         OCTI_SET_PROPERTY_DECL, OCTI_COPY_STRUCT_DECL,
85         OCTI_GET_PROPERTY_STRUCT_DECL and OCTI_SET_PROPERTY_STRUCT_DECL.
86         (objc_getProperty_decl): New.
87         (objc_setProperty_decl): New.
88         (objc_copyStruct_decl): New.
89         (objc_getPropertyStruct_decl): New.
90         (objc_setPropertyStruct_decl): New.
91         * objc-act.c (build_objc_property_accessor_helpers): New.
92         (synth_module_prologue): Call
93         build_objc_property_accessor_helpers.
94         (lookup_ivar): New.
95         (objc_synthesize_getter): Implemented synthesizing getters that
96         work with properties that are not nonatomic, assign properties.
97         (objc_synthesize_setter): Implemented synthesizing setters that
98         work with properties that are not nonatomic, assign properties.
99         
100 2010-10-30  Nicola Pero  <nicola.pero@meta-innovation.com>
101
102         Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
103         * objc-tree.def (PROPERTY_REF): New.
104         * objc-act.h: Added comments for all the PROPERTY_ macros.
105         (PROPERTY_NAME): Use DECL_NAME.
106         (PROPERTY_COPIES): Removed.
107         (PROPERTY_READONLY): Use DECL_LANG_FLAG_0 for it.
108         (PROPERTY_NONATOMIC): New.
109         (objc_property_assign_semantics): Make it a typedef.
110         (PROPERTY_ASSIGN_SEMANTICS): New.
111         (PROPERTY_DYNAMIC): New.
112         (PROPERTY_REF_OBJECT): New.
113         (PROPERTY_REF_PROPERTY_DECL): New.
114         * objc-act.c (CALL_EXPR_OBJC_PROPERTY_GETTER): Removed.
115         (in_objc_property_setter_name_context): Removed.
116         (objc_add_property_declaration): Removed copies and ivar arguments
117         and code supporting them.  Fixed recovering when readonly and
118         setter attributes are specified.  Removed support for @property in
119         @implementation context.  Updated error message.  Double-check
120         that a property does not have a DECL_INITIAL.  Validate the
121         property assign semantics and emit appropriate errors and
122         warnings.  Check for duplicate property declarations.  Set
123         DECL_SOURCE_LOCATION, TREE_DEPRECATED, PROPERTY_NONATOMIC,
124         PROPERTY_ASSIGN_SEMANTICS and PROPERTY_DYNAMIC of the new
125         PROPERTY_DECL.  Do not set PROPERTY_COPIES.  Set
126         PROPERTY_IVAR_NAME to NULL_TREE.
127         (objc_build_getter_call): Renamed to
128         objc_maybe_build_component_ref.  If the property is not found in
129         the interface, search in the protocol list.  Do not generate the
130         getter call; instead, build and return a PROPERTY_REF.
131         (objc_is_property_ref): New.
132         (objc_setter_func_call): Removed.
133         (get_selector_from_reference): Removed.
134         (is_property): Removed.
135         (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
136         Updated to work on a PROPERTY_REF and use the PROPERTY_DECL from
137         the PROPERTY_REF.  Generate an error if the property is read-only.
138         (build_property_reference): Removed.
139         (objc_finish_message_expr): Removed check to produce "readonly
140         property can not be set" error when
141         in_objc_property_setter_name_context.  We now generate the error
142         earlier, in objc_maybe_build_modify_expr, which will only generate
143         the setter call if the property is readwrite.
144         (check_methods): Recognize dynamic properties.
145         (check_methods_accessible): Same change.
146         (objc_build_property_ivar_name): Removed.
147         (objc_build_property_setter_name): Dropped bool argument.  Always
148         add the ':' at the end.
149         (objc_gen_one_property_datum): Removed.
150         (objc_process_getter_setter): Removed.
151         (objc_synthesize_getter): Mark 'klass' argument as unused.  Use
152         PROPERTY_GETTER_NAME instead of PROPERTY_NAME.  Set the
153         DECL_SOURCE_LOCATION of the new method to be the same as the one
154         for the @synthesize.  Always use PROPERTY_IVAR_NAME as it is
155         instead of trying to guess what it should be.  Removed use of
156         CLASS_IVARS.  Use the location of @synthesize for c_finish_return
157         and c_end_compound_statement.
158         (objc_synthesize_setter): Mark 'klass' argument as unused.  Use
159         PROPERTY_SETTER_NAME instead of trying to guess what it should be.
160         Set the DECL_SOURCE_LOCATION of the new method to be the same as
161         the one for the @synthesize.  Always use PROPERTY_IVAR_NAME as it
162         is instead of trying to guess what it should be.  Removed use of
163         CLASS_IVARS.  Use the location of @synthesize for c_finish_return
164         and c_end_compound_statement.  Emit an error and keep going,
165         instead of aborting, if the setter prototype does not have the
166         expected argument.
167         (objc_add_synthesize_declaration_for_property): New.
168         (objc_add_synthesize_declaration): Removed ATTRIBUTE_UNUSED from
169         all arguments.  Improved error message.  Filled in the rest of the
170         function, which used to be a placeholder, with an actual
171         implementation.
172         (objc_add_dynamic_declaration_for_property): New.
173         (objc_add_dynamic_declaration): Removed ATTRIBUTE_UNUSED from all
174         arguments.  Improved error message.  Filled in the rest of the
175         function, which used to be a placeholder, with an actual
176         implementation.
177         (objc_gen_property_data): Rewritten.
178         (finish_class): Added explicit switch cases for
179         CLASS_INTERFACE_TYPE, CATEGORY_INTERFACE_TYPE and
180         PROTOCOL_INTERFACE_TYPE.  Added a default switch case which is
181         gcc_unreachable.  Rewritten the processing of properties, in
182         particular to not synthesize prototypes for getters and setters if
183         they already exist and to install the getter and setter names into
184         PROPERTY_GETTER_NAME and PROPERTY_SETTER_NAME.  Do not generate
185         warnings about setter, getter and ivar property attributes.
186         (objc_lookup_ivar): Removed support for properties.
187         (objc_gimplify_property_ref): New.
188         (objc_gimplify_expr): Use a switch.  In case of a PROPERTY_REF, call
189         objc_gimplify_property_ref.
190         
191 2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>
192
193         * objc-act.c (objc_add_property_declaration): Added arguments to
194         pass the various property attributes that were parsed with the
195         property declaration.  Process arguments to determine the final
196         property attributes and produce error messages as appropriate.
197         Added temporary code to keep the compiler silent about variables
198         set but not used - for new attributes that are only checked but
199         have no effect yet.
200         (property_readonly): Removed.
201         (property_setter): Removed.
202         (property_getter): Removed.
203         (property_ivar): Removed.
204         (property_copies): Removed.     
205         (objc_set_property_attr): Removed.
206         * objc-act.h (enum property_assign_semantics): New.
207         
208 2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>
209
210         * objc-act.c (objc_add_property_variable): Renamed to
211         objc_add_property_declaration.  Added location argument.  Updated
212         warnings and errors to use it.  Use error, not fatal_error, if a
213         property declaration is found outside an interface or
214         implementation context.
215         
216 2010-10-24  Nicola Pero  <nicola.pero@meta-innovation.com>
217
218         * objc-act.c (objc_build_keyword_decl): Updated comments.  Do not
219         emit a warning that method parameter attributes are unimplemented.
220         Instead, store them into DECL_ATTRIBUTES of the KEYWORD_DECL.
221         (start_method_def): Copy attributes from each KEYWORD_DECL into
222         the corresponding PARM_DECL.
223         (objc_warn_deprecated_use): Removed.
224         (build_objc_method_call): Call warn_deprecated_use, not
225         objc_warn_deprecated_use.
226         (objc_maybe_printable_name): Do not try to get the identifier name
227         of DECLs that we don't recognize.  Immediately return NULL for them.
228         (objc_printable_name): Removed C++-specific case, which is no
229         longer used.  Updated comments.
230         
231 2010-10-23  Nicola Pero  <nicola.pero@meta-innovation.com>
232
233         * objc-act.c (OBJC_GEN_METHOD_LABEL): Updated comments.
234         (objc_demangle): Return NULL if demangling can not be done because
235         the string to demangle is not an Objective-C mangled method name.
236         Be smarter in demangling method names so that at least for methods
237         with no arguments we are able to almost always demangle '_' correctly.
238         Updated comments.
239         (objc_maybe_printable_name): New.
240         (objc_printable_name): Call objc_maybe_printable_name.  If it
241         returns NULL, call cxx_printable_name in Objective-C++.
242
243 2010-10-21  Iain Sandoe  <iains@gcc.gnu.org>
244
245         Based on the CFString implementation in FSF apple/trunk branch.
246         
247         * objc/objc-act.c (objc_build_string_object): Handle CFStrings.
248
249 2010-10-21  Nicola Pero  <nicola.pero@meta-innovation.com>
250
251         * objc-act.c (get_objc_string_decl): Use a switch instead of a
252         chain of ifs.  Use gcc_unreachable instead of abort.
253         (add_objc_string): Same change.
254         (generate_protocol_list): Same change - twice.
255         (synth_id_with_class_suffix): Same change.
256         (build_keyword_selector): Same change - twice.
257         (objc_build_message_expr): Same change.
258         (objc_build_selector_expr): Same change.
259         (check_methods): Same change - and added missing gcc_unreachable
260         for default case.
261         (check_methods_accessible): Same change - twice, and added missing
262         gcc_unreachable for default case in one of them.
263         (start_class): Same change - and added missing gcc_unreachable for
264         default case.
265         (continue_class): Same change.
266         (objc_gen_property_data): Same change.
267         (finish_class): Same change.
268         (encode_type_qualifiers): Added missing gcc_unreachable.
269         (encode_type): Small code tidy up to reduce duplicated code.  Use
270         gcc_unreachable instead of abort - twice.
271         (encode_gnu_bitfield): Use a switch instead of a chain of ifs -
272         twice.  Added missing gcc_unreachable for default case - twice.
273         (dump_interface): Use a switch instead of a chain of ifs.
274         (handle_impent): Same change.
275         
276 2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>
277
278         * objc-act.h (objc_inherit_code): Removed.
279         * objc-act.c (objc_inherit_code): Removed.
280         (objc_set_method_type): Removed.
281         (objc_build_method_signature): Added is_class_method argument.
282         Use it instead of the global objc_inherit_code variable.
283         (objc_add_method_declaration): Same change.
284         (objc_start_method_definition): Same change.
285         (objc_generate_cxx_ctor_or_dtor): Updated call to
286         objc_start_method_definition.  Do not call objc_set_method_type.
287         (adjust_type_for_id_default): Mark as inline.
288         (objc_synthesize_getter): Updated call to
289         objc_start_method_definition.  Do not set objc_inherit_code.
290         (objc_synthesize_setter): Updated call to
291         objc_start_method_definition.  Do not set objc_inherit_code.    
292         
293 2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>
294
295         Merge from 'apple/trunk' branch on FSF servers.  Obvious updates
296         to gcc_alloc_xxx calls in hash_init and hash_class_name_enter to
297         get it to compile in the current trunk.
298
299         2006-01-27 Fariborz Jahanian <fjahanian@apple.com>
300
301         Radar 4345837
302         * objc/objc-act.c (hash_class_name_enter): New.
303         (hash_class_name_lookup): New.
304         (objc_declare_alias): Enter alias name into hash table.
305         (objc_declare_class): Enter class name into hash table.
306         (objc_is_class_name): Do a hash look up of class name.
307         (hash_init): Initialize the two new hash tables.
308         * objc-act.h: Added cls_name_hash_list and als_name_hash_list 
309         declarations, removed class_chain and alias_chain.      
310
311 2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>
312
313         * objc-lang.c (finish_file): Removed.
314         * objc-act.c (objc_finish_file): Renamed to
315         objc_write_global_declarations.  Do not try to instantiate C++
316         templates when compiling Objective-C++ as this is now
317         automatically done before this function is called.  Do not check
318         for syntax-only run or PCH generation as this is done by the
319         callers.
320         * objc-act.h (objc_finish_file): Removed.
321         
322 2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>
323
324         Implemented parsing @synthesize and @dynamic for
325         Objective-C/Objective-C++.
326         * objc-act.c (objc_add_synthesize_declaration): New.
327         (objc_add_dynamic_declaration): New.
328
329 2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>      
330
331         * objc-act.c (lookup_and_install_protocols): Return NULL if passed
332         error_mark_node.
333         
334 2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>
335
336         Merge from 'apple/trunk' branch on FSF servers.
337
338         2006-03-10  Fariborz Jahanian <fjahanian@apple.com>
339
340         Radar 4407151
341         * objc/objc-act.c (objc_is_class_name): template parameter is not
342         an objective class name.
343         (objc_generate_cxx_cdtors): Check for the null
344         objc_implementation_context.    
345
346 2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>
347
348         Merge from 'apple/trunk' branch on FSF servers. 
349         
350         2005-11-08  Fariborz Jahanian <fjahanian@apple.com>
351
352         Radar 4330422
353         * objc/objc-act.c (objc_non_volatilized_type): New
354
355         2005-10-07  Fariborz Jahanian <fjahanian@apple.com>
356         
357         Radar 4204796
358         * objc-act.c (objc_build_volatilized_type): Build 'volatilzed'
359         types with proper attribute set and correctly.
360         (objc_volatilize_decl): Remove unneeded code.
361         (objc_type_quals_match): Use the new attribute to check on
362         'volatilzed' type.
363         (hash_init): removed unneeded code.
364         
365 2010-10-17  Nicola Pero  <nicola.pero@meta-innovation.com>
366
367         Merge from 'apple/trunk' branch on FSF servers.
368         
369         2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
370
371         Radar 4133425
372         * objc-act.c (objc_diagnose_private_ivar): New.
373
374 2010-10-17  Iain Sandoe  <iains@gcc.gnu.org>
375
376         * objc-act.c: Rename 'objc_public_flag' to  objc_ivar_visibility and
377         make its type 'objc_ivar_visibility_kind'.  
378         (objc_start_class_interface): Update to use visibility enum.
379         (objc_start_class_implementation): Likewise.
380         (objc_set_visibility): Update to use visibility enum, warn that 
381         @package is handle as per @public.
382         (add_instance_variable): Handle OBJC_IVAR_VIS_PACKAGE.
383         * objc-act.h: Rename 'objc_public_flag' to  objc_ivar_visibility and
384         make its type 'objc_ivar_visibility_kind'.
385
386 2010-10-14  Iain Sandoe  <iains@gcc.gnu.org>
387
388         merge from FSF apple 'trunk' branch. 
389         2006 Fariborz Jahanian <fjahanian@apple.com>
390         
391         Radars 4436866, 4505126, 4506903, 4517826
392         * objc-act.c (CALL_EXPR_OBJC_PROPERTY_GETTER): New.
393         property_readonly, property_getter, property_setter, property_ivar,
394         property_copies, in_objc_property_setter_name_context: New vars.
395         (objc_set_property_attr): New.
396         (objc_add_property_variable): New.
397         (lookup_property_in_list): New.
398         (lookup_property): New.
399         (objc_build_getter_call): New.
400         (objc_setter_func_call): New.
401         (get_selector_from_reference): New.
402         (objc_build_setter_call): New.
403         (is_property): New.
404         (build_property_reference): New.
405         (objc_finish_message_expr): Detect readonly property and warn.
406         (objc_build_property_ivar_name): New.
407         (objc_build_property_setter_name): New.
408         (objc_gen_one_property_datum): New.
409         (objc_process_getter_setter): New.
410         (objc_synthesize_getter): New.
411         (objc_synthesize_setter): New.
412         (objc_gen_property_data): New.
413         (finish_class): Generate property data.
414         (comp_proto_with_proto): Separated from ...
415         (match_proto_with_proto): ... New.
416         (objc_lookup_ivar): Handle properties.
417         * objc-tree.def (PROPERTY_DECL): New tree code.
418         * objc-act.h: CLASS_LANG_SLOT_ELTS, PROTOCOL_LANG_SLOT_ELTS update size.
419         (METHOD_PROPERTY_CONTEXT): New.
420         (PROPERTY_NAME): New.
421         (PROPERTY_GETTER_NAME): New.
422         (PROPERTY_SETTER_NAME): New.
423         (PROPERTY_IVAR_NAME): New.
424         (PROPERTY_READONLY): New.
425         (PROPERTY_COPIES): New.
426         (TOTAL_CLASS_RAW_IVARS): New.
427         (CLASS_PROPERTY_DECL): New.
428         (IMPL_PROPERTY_DECL): New.
429         * objc-lang.c (objc_init_ts): Update fields for property_decl.
430
431 2010-10-13  Richard Henderson  <rth@redhat.com>
432
433         * objc-act.c (objc_eh_personality): Update call to
434         build_personality_function.
435
436 2010-10-13  Iain Sandoe  <iains@gcc.gnu.org>
437
438         merge from FSF apple 'trunk' branch. 
439
440         2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
441         Radar 3803157 (method attributes)
442         * objc/objc-act.h (METHOD_TYPE_ATTRIBUTES): New macro.
443         * objc/objc-act.c (objc_decl_method_attributes): New.
444         (objc_add_method_declaration): Process method's attribute.
445         (objc_start_method_definition): Ditto.
446         (build_objc_method_call): Inject method attribute into
447         built function type.
448         (objc_method_decl): New.
449         (objc_warn_deprecated)use): New.
450
451 2010-10-07  Andi Kleen  <ak@linux.intel.com>
452
453         * Make-lang.in (cc1obj-dummy): Remove.
454         (cc1obj-checksum): Change to run checksum over object files
455         and options only.
456
457 2010-10-07  Nicola Pero  <nicola.pero@meta-innovation.com>
458
459         PR objc/45925
460         * objc-act.c (objc_finish_foreach_loop): Convert return value of
461         countByEnumeratingWithState:objects:count: to long unsigned int.
462
463 2010-10-07  Iain Sandoe  <iains@gcc.gnu.org>
464
465         * objc-act.c (build_objc_method_call): Replace calls to 
466         build_function_call () with the VEC equivalent.  Construct parameter
467         lists as VECs.
468
469 2010-10-07  Iain Sandoe  <iains@gcc.gnu.org>
470
471         * objc-act.c (objc_build_message_expr):  Call mark_exp_read () to 
472         signal that the receiver has been used.
473
474 2010-10-06  Nicola Pero  <nicola.pero@meta-innovation.com>
475
476         * README: Obsolete file removed.
477
478 2010-10-06  Nicola Pero  <nicola.pero@meta-innovation.com>
479
480         Implemented fast enumeration for Objective-C.
481         * objc-act.c (build_fast_enumeration_state_template): New.
482         (TAG_ENUMERATION_MUTATION): New.
483         (TAG_FAST_ENUMERATION_STATE): New.
484         (synth_module_prologue): Call build_fast_enumeration_state_template() and set up
485         objc_enumeration_mutation_decl.
486         (objc_create_temporary_var): Allow providing a name to temporary
487         variables.
488         (objc_build_exc_ptr): Updated calls to
489         objc_create_temporary_var().
490         (next_sjlj_build_try_catch_finally): Same change.
491         (objc_finish_foreach_loop): New.
492         * objc-act.h: Added OCTI_FAST_ENUM_STATE_TEMP,
493         OCTI_ENUM_MUTATION_DECL, objc_fast_enumeration_state_template,
494         objc_enumeration_mutation_decl.
495
496         Merge from 'apple/trunk' branch on FSF servers.
497
498         2006-04-12 Fariborz Jahanian <fjahanian@apple.com>
499
500         Radar 4507230
501         * objc-act.c (objc_type_valid_for_messaging): New routine to check
502         for valid objc object types.
503         (objc_finish_foreach_loop): Check for invalid objc objects in
504         foreach header.
505         
506 2010-10-05  Nicola Pero  <nicola.pero@meta-innovation.com>
507
508         Merge from 'apple/trunk' branch on FSF servers.
509
510         2005-10-17  Fariborz Jahanian <fjahanian@apple.com>
511
512         Radar 4290840
513         * objc-act.c (objc_start_method_definition): Check for
514         error_mark_node for the selector name and make a quick exit.
515         
516 2010-10-04  Andi Kleen <ak@linux.intel.com>
517
518         * Make-lang.in (cc1obj-dummy, cc1obj): Add + to build rule.
519
520 2010-09-30  Iain Sandoe  <iains@gcc.gnu.org>
521
522         merge from FSF 'apple/trunk' branch.
523         2006-01-30  Fariborz Jahanian <fjahanian@apple.com>
524
525        Radar 4386773
526        * objc/objc-act.c (objc_set_method_opt): New function.
527        (objc_start_protocol, objc_finish_interface): Reset
528        objc_method_optional_flag flag.
529        (objc_add_method_declaration): Pass on the new
530        flag to objc_add_method.
531        (objc_add_method): Add optional methods to new chain in
532        the protocol class.
533        * objc/objc-act.h (CLASS_OPTIONAL_CLS_METHODS,
534        CLASS_OPTIONAL_NST_METHODS): New macros accessing a protocol
535        class's optional method chains.
536         
537 2010-09-30  Nicola Pero  <nicola.pero@meta-innovation.com>
538
539         Merge from 'apple/trunk' branch on FSF servers.
540
541         2005-10-04  Fariborz Jahanian <fjahanian@apple.com>
542
543         Radar 4278236
544         * objc-act.c (objc_declare_class): Pick the right
545         type tree.
546
547 2010-09-29  Nicola Pero  <nicola.pero@meta-innovation.com>
548
549         Merge from 'apple/trunk' branch on FSF servers.
550
551         2005-10-04  Fariborz Jahanian <fjahanian@apple.com>
552
553         Radar 4281748
554         * objc-act.c (objc_check_global_decl): New
555
556 2010-09-29  Nicola Pero  <nicola.pero@meta-innovation.com>
557
558         * objc-act.c (objc_is_reserved_word): Removed.
559
560 2010-09-28  Iain Sandoe  <iains@gcc.gnu.org>
561         
562         * objc-act.c (objc_add_method_declaration): Handle and ignore 
563         attributes.
564         (objc_start_method_definition): Likewise.
565         (objc_generate_cxx_ctor_or_dtor): Pass NULL attributes to ctor/dtor.
566         (objc_build_keyword_decl): Handle and ignore attributes.
567
568 2010-09-28  Richard Henderson  <rth@redhat.com>
569
570         * objc-act.c (objc_eh_personality): Use targetm.except_unwind_info.
571
572 2010-09-28  Iain Sandoe  <iains@gcc.gnu.org>
573
574         * objc-act.c (objc_start_class_interface): Handle and ignore attributes.
575         (objc_start_category_interface): Likewise.
576         (objc_start_protocol): Likewise.
577
578 2010-09-28  Nicola Pero  <nicola.pero@meta-innovation.com>
579
580         Merge from 'apple/trunk' branch on FSF servers.
581
582         2005-08-23  Stuart Hastings <stuart@apple.com>
583                     Ziemowit Laski  <zlaski@apple.com>
584
585         Radar 4209854
586         * objc-act.c (objc_decay_parm_type): New function.
587         (get_arg_type_list): Decay types for all named arguments.
588         (objc_push_parm): Rebuild the PARM_DECL if its type has
589         been decayed.   
590
591 2010-09-28  Nicola Pero  <nicola@nicola.brainstorm.co.uk>
592
593         * objc-act.c (encode_type): Fixed encoding enums with the next
594         runtime.
595
596 2010-09-28  Nicola Pero  <nicola.pero@meta-innovation.com>
597
598         Merge from 'apple/trunk' branch on FSF servers.
599
600         2005-07-18  Ziemowit Laski  <zlaski@apple.com>
601
602         Radar 4175534
603         * objc-act.c (objc_compare_types): A new silent comparison
604         mode (-4), differing from regular comparison (-3) in that
605         'false' is returned instead of issuing warnings.
606         
607 2010-09-28  Nicola Pero  <nicola.pero@meta-innovation.com>
608
609         * objc-act.c (encode_type): Do not add 'r' with the next runtime.
610         (encode_aggregate_within): Reorganized code to be more readable.
611         (encode_aggregate_fields): Updated second argument to be 'bool'
612         instead of 'int'.
613
614 2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>
615
616         PR objc/45763
617         PR objc/25450
618         PR objc/25464
619         * objc-act.c: Improved comments for encoding functions.
620         (encode_aggregate_within): For the GNU runtime, rewritten some
621         obsfuscated code to clarify the various cases.
622         (encode_aggregate): Function removed.
623         (encode_array): Generate an error if asked to encode an incomplete
624         array as part of generating instance variables.  Else, when
625         encoding an incomplete array inside a structure, encode it as an
626         array of zero size.
627         (encode_pointer): For the GNU runtime, fixed encoding 'BOOL *' as
628         '^c' instead of '*'.
629         (encode_gnu_bitfield): Encode enumerated types exactly in the same
630         type as integer types instead of using a hardcoded 'i'.  If asked
631         to encode a non-integer type as a bitfield, do not abort
632         compilation immediately; instead generate an error, then skip the
633         type.
634         (encode_type): Use a 'switch' instead of a sequence of 'if's.
635         Added a 'default' clause that gets executed if the type can not be
636         matched, and that encodes it as '?' (unknown) and produces a
637         warning.  For the GNU runtime, encode enumerated types exactly in
638         the same way as integer types instead of using a hardcoded 'i'.
639         Encode long double as 'D'.  Encode 128-bit integers as 'T' or 't'.
640         Encode C++ reference types as pointers.  Call encode_vector to
641         encode vectors.
642         (encode_vector): New function.
643         
644 2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>
645
646         Merge from 'apple/trunk' branch on FSF servers.  I modified the
647         changes to be used only when compiling for the NeXT runtime.
648
649         2005-10-10  Fariborz Jahanian <fjahanian@apple.com>
650
651         Radar 4301047
652
653         * objc-act.c (encode_type): Remove the hack.
654         
655         2005-07-20  Ziemowit Laski  <zlaski@apple.com>
656
657         Radar 4136935
658         * objc-act.c (pointee_is_readonly): New function.
659         (encode_pointer, encode_aggregate_within, encode_type):
660         Attempt to emulate GCC 3.3 when generating type encodings.
661
662 2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>
663
664         Merge from 'apple/trunk' branch on FSF servers.
665
666         2005-12-15  Fariborz Jahanian <fjahanian@apple.com>
667
668         Radar 4229905
669         * objc-act.c (objc_have_common_types): New function.
670         
671         2005-06-22  Ziemowit Laski  <zlaski@apple.com>
672
673         Radar 4154928
674         * objc-act.c (objc_common_type): New function.
675         
676 2010-09-27  Richard Guenther  <rguenther@suse.de>
677
678         * objc-act.c (objc_get_class_reference): Use CP_TYPE_CONTEXT.
679         (objc_is_global_reference_p): Use DECL_FILE_SCOPE_P.
680
681 2010-09-26  Nicola Pero  <nicola.pero@meta-innovation.com>
682
683         * objc-act.c: Removed historical, obsolete comment at the top of
684         the file.
685
686 2010-09-21  Nicola Pero  <nicola.pero@meta-innovation.com>
687
688         PR objc/23710
689         * objc-act.c (objc_start_method_definition): Do not abort upon a
690         'method definition not in @implementation context' error.  Return
691         'false' instead.
692
693 2010-09-21  Nicola Pero  <nicola.pero@meta-innovation.com>
694
695         PR objc/25965
696         * objc-act.c (objc_get_interface_ivars): New function.
697         (objc_collecting_ivars): New variable.
698         (continue_class): Set and reset objc_collecting_ivars for context.
699         
700 2010-09-15  Nicola Pero  <nicola.pero@meta-innovation.com>
701
702         Merge from 'apple/trunk' branch on FSF servers.
703
704         2006-03-09 Fariborz Jahanian <fjahanian@apple.com>
705
706         Radar 4457381
707         * objc/objc-act.c (objc_finish_message_expr): Look for message in
708         @class's protocol list.
709
710         2006-02-07  Fariborz Jahanian <fjahanian@apple.com>
711
712         Radar 4219590
713         * objc/objc-act.c (objc_start_method_definition): Initialize
714         break/continue labels.
715
716         2005-08-22  Ziemowit Laski  <zlaski@apple.com>
717
718         Radar 4174166
719         * objc-act.c (objc_compare_types): Compare function
720         pointers; indicate success if the right-hand side has
721         a return type that is covariant, and the argument types
722         contravariant, with those of the left side.
723
724         2005-08-22  Ziemowit Laski  <zlaski@apple.com>
725
726         Radar 4216500
727         * objc-act.c (objc_get_protocol_qualified_type): When looking
728         at a typedef, retrieve the precise type it describes (rather
729         than merely looking up a class by name).
730         
731 2010-09-10  Nicola Pero  <nicola.pero@meta-innovation.com>
732
733         * objc/objc-act.c (objc_begin_try_stmt): Generate an error if
734         -fobjc-exceptions was not used.  (objc_build_throw_stmt): Same
735         change.
736
737 2010-07-15  Nathan Froyd  <froydnj@codesourcery.com>
738
739         * objc-act.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
740
741 2010-07-10  Iain Sandoe  <iains@gcc.gnu.org>
742
743         PR objc/44140
744         * objc-act.c: build_objc_string_decl() remove declaration.
745         (finish_var_decl): Remove forcing of var output and marking
746         as "Used". 
747         (init_def_list): Use integer_zero_node. 
748         (init_objc_symtab): Use integer_zero_node, make the short
749         integer type specific on relevant nodes.
750         (generate_objc_symtab_decl): Remove call to 
751         forward_declare_categories().  Use null_pointer_node where
752         appropriate.  
753         (build_module_descriptor): Comment and mark this item as 
754         DECL_PRESERVE_P. 
755         (generate_static_references): Use gcc_unreachable instead of
756         abort (). 
757         (diagnose_missing_method): New.
758         (build_next_selector_translation_table): New.
759         (build_gnu_selector_translation_table): New.
760         (add_objc_string): Merge code from build_objc_string_decl...
761         ... and delete build_objc_string_decl().
762         (generate_dispatch_table): Make integer types explicit.
763         (generate_category): Pass implent and arrange for the data
764         to be extracted within the routine.  Do not start new vars, 
765         but finish the ones collcted during parsing.
766         (generate_shared_structures): Likewise.
767         (finish_objc):  Reorder code so that we finish variables before
768         referencing them.  Save the global data before calling meta-data
769         creation routines, and pass the current reference to the two 
770         main routines.  Only call generate_objc_image_info () for the 
771         NeXT runtime.
772         (generate_classref_translation_entry): Comment on and make this
773         item DECL_PRESERVE_P.
774         (handle_class_ref): Use varpool interfaces, comment on and make
775         this item DECL_PRESERVE_P.
776         (handle_impent): Likewise.
777         (generate_objc_image_info): Only generate when the content is 
778         non-zero.  Make integer types explict.
779
780 2010-07-03  Nathan Froyd  <froydnj@codesourcery.com>
781
782         PR objc/24867
783         * objc-act.c (build_sized_array_type): New function.
784         (add_objc_string): Use it.
785         (generate_protocol_list): Likewise.
786         (generate_objc_image_info): Likewise.
787         (add_field_decl): New function.
788         (objc_build_struct): Use a VEC rather than building a TREE_LIST.
789         (generate_struct_by_value_array): Use add_field_decl.
790         (build_objc_symtab_template): Likewise.
791         (build_module_descriptor): Likewise.
792         (build_objc_exception_stuff): Likewise.
793         (build_protocol_template): Likewise.
794         (build_method_prototype_list_template): Likewise.
795         (build_method_prototype_template): Likewise.
796         (build_category_template): Likewise.
797         (build_selector_template): Likewise.
798         (build_class_template): Likewise.
799         (build_super_template): Likewise.
800         (build_ivar_template): Likewise.
801         (build_ivar_list_template): Likewise.
802         (build_method_list_template): Likewise.
803         (build_method_template): Likewise.
804
805 2010-06-28  Steven Bosscher  <steven@gcc.gnu.org>
806
807         * objc-act.c: Do not include except.h.
808
809 2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
810
811         * objc-act.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Use typed GC
812         allocation.
813
814         * objc-act.c (objc_volatilize_decl): Likewise.
815         (objc_build_string_object): Likewise.
816         (hash_init): Likewise.
817         (hash_enter): Likewise.
818         (hash_add_attr): Likewise.
819         (add_class): Likewise.
820         (start_class): Likewise.
821
822 2010-06-05  Steven Bosscher  <steven@gcc.gnu.org>
823
824         * objc-act.c: Update include path for moved files.
825         * objc-lang.c: Likewise.
826         * config-lang.in: Update paths in gtfiles for files in c-family/.
827
828 2010-06-01  Nathan Froyd  <froydnj@codesourcery.com>
829
830         * objc-act.c (build_next_objc_exception_stuff): Give setjmp a
831         varargs type instead of a zero-argument type.
832
833 2010-05-30  Nathan Froyd  <froydnj@codesourcery.com>
834
835         * objc-act.c (synth_module_prologue): Use build_function_type_list
836         instead of build_function_type.
837         (build_module_initializer_routine): Likewise.
838         (build_next_objc_exception_stuff): Likewise.
839         (build_objc_exception_stuff): Likewise.
840
841 2010-05-27  Joseph Myers  <joseph@codesourcery.com>
842
843         * objc-act.c: Include diagnostic-core.h instead of diagnostic.h.
844         * Make-lang.in (objc/objc-act.o): Update dependencies.
845
846 2010-05-25  Steven Bosscher  <steven@gcc.gnu.org>
847
848         * objc-act.h: Do not include gimple.h.
849         * objc-act.c: Do not include rtl.h, expr.h, libfuncs.h, and tm_p.h.
850         Include gimple.h.  Explain why except.h has to be included.
851         * objc-lang.c: Do not include diagnostics.h.
852         * Make-lang.in: Update dependencies.
853
854 2010-05-25  Nathan Froyd  <froydnj@codesourcery.com>
855
856         * objc-act.c (objc_build_constructor): Adjust OBJCPLUS impedance
857         mismatch code for VECs.
858
859 2010-05-25  Nathan Froyd  <froydnj@codesourcery.com>
860
861         * objc-act.c (objc_build_constructor): Take a VEC instead of a tree.
862         Use build_constructor instead of build_constructor_from_list.
863         (objc_build_string_object): Build a VEC argument for
864         objc_build_constructor.
865         (init_def_list): Likewise.
866         (init_objc_symtab): Likewise.
867         (init_module_descriptor): Likewise.
868         (generate_static_references): Likewise.
869         (build_selector_translation_table): Likewise.
870         (build_descriptor_table_initializer): Likewise.
871         (generate_descriptor_table): Likewise.
872         (build_protocol_initializer): Likewise.
873         (build_ivar_list_initializer): Likewise.
874         (generate_ivars_list): Likewise.
875         (build_dispatch_table_initializer): Likewise.
876         (generate_dispatch_table): Likewise.
877         (generate_protocol_list): Likewise.
878         (build_category_initializer): Likewise.
879         (build_shared_structure_initializer): Likewise.
880         (generate_objc_image_info): Likewise.
881
882 2010-04-30  Iain Sandoe  <iains@gcc.gnu.org>
883
884         PR objc++/32052
885         * objc-act.c (encode_aggregate_within): Encode structure tags
886         with template args for ObjC++.
887
888 2010-04-30  Steven Bosscher  <steven@gcc.gnu.org>
889
890         * objc-act.c: Do not include varray.h.
891
892 2010-04-07  Jakub Jelinek  <jakub@redhat.com>
893
894         PR c/18624
895         * objc-act.c (finish_var_decl, objc_begin_catch_clause,
896         really_start_method, get_super_receiver, handle_class_ref): Set
897         DECL_READ_P in addition to TREE_USED.
898
899 2010-04-07  Iain Sandoe <iains@gcc.gnu.org>
900
901         PR objc/35996
902         * objc-act.c (objc_init): Warn that -fobjc-gc is ignored for
903         -fgnu-runtime and set flag_objc_gc to zero.
904
905 2010-04-07  Iain Sandoe <iains@gcc.gnu.org>
906
907         PR objc++/23716
908         * objc-act.c (build_module_initializer_routine): Make the argument
909         to objc_start_function NULL_TREE when compiling ObjC++.
910
911 2010-02-18  Iain Sandoe <iain.sandoe@sandoe-acoustics.co.uk>
912             Mike Stump  <mikestump@comcast.net>
913
914         PR objc/43061
915         * objc-act.c (finish_var_decl): Set the generated symbols as "used".
916
917 2009-12-17  Shujing Zhao  <pearly.zhao@oracle.com>
918
919         * objc-act.c (objc_substitute_decl, build_ivar_reference,
920         get_super_receiver): Update build_indirect_ref calls.
921
922 2009-11-28  Jakub Jelinek  <jakub@redhat.com>
923
924         * objc-act.c (generate_shared_structures): Remove unused sc_spec and
925         decl_specs variables.
926         (objc_build_message_expr): Remove unused loc variable.
927         (objc_finish_message_expr): Remove unused saved_rtype variable.
928         (encode_field_decl): Remove unused type variable.
929
930         PR obj-c++/42156
931         * objc-act.c (objc_build_struct): INIT_TYPE_OBJC_INFO for
932         type variants that don't have it initialized yet.
933
934 2009-09-14  Jan Hubicka  <jh@suse.cz>
935
936         * objc-act.c (objc_add_static_instance): Do not set DECL_COMMON.
937
938 2009-09-14  Richard Henderson  <rth@redhat.com>
939
940         * objc-act.c (objc_init_exceptions): Don't call
941         default_init_unwind_resume_libfunc.
942         (objc_build_exc_ptr): Use __builtin_eh_pointer.
943
944 2009-09-13  Richard Guenther  <rguenther@suse.de>
945         Rafael Avila de Espindola  <espindola@google.com>
946
947         * objc-act.c (objc_eh_runtime_type): Export.
948         (objc_init_exceptions): Remove.  Move warning code ...
949         (objc_begin_try_stmt): ... here
950         (objc_build_throw_stmt): ... and here.
951         (objc_eh_personality_decl): New.
952         (objc_eh_personality): New function.
953         * objc-act.h (objc_eh_runtime_type): Declare.
954         (objc_eh_personality): Likewise.
955         * objc-lang.c (LANG_HOOKS_EH_RUNTIME_TYPE): Define.
956         (LANG_HOOKS_EH_PERSONALITY): Likewise.
957
958 2009-09-03  Diego Novillo  <dnovillo@google.com>
959
960         * objc-lang.c (lang_hooks): Remove const qualifier.
961
962 2009-08-20  Richard Guenther  <rguenther@suse.de>
963
964         * objc-act.c: Include c-lang.h
965         * Make-lang.in (objc/objc-act.o): Add c-lang.h dependency.
966
967 2009-07-17  Aldy Hernandez  <aldyh@redhat.com>
968             Manuel López-Ibáñez  <manu@gcc.gnu.org>
969
970         PR 40435 
971         * objc-act.c: Add location argument to all calls to
972         build_fold_addr_expr.
973         
974 2009-07-14  Taras Glek  <tglek@mozilla.com>
975             Rafael Espindola  <espindola@google.com>
976
977         * Make-lang.in (objc.install-plugin): New target for
978         installing plugin headers.
979
980 2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
981
982         * objc-act.c (next_sjlj_build_catch_list): Replace EXPR_LOCUS by
983         EXPR_LOCATION.
984         
985 2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
986
987         * objc-act.c: Replace %J by an explicit location. Update all
988         calls.
989         
990 2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
991
992         * objc-act.c: Replace %H by an explicit location. Update all
993         calls.
994         
995 2009-06-22  Steven Bosscher  <steven@gcc.gnu.org>
996
997         PR objc/28050
998         * objc-act.c (objc_build_message_args): Return if ARGS is the
999         error_mark_node.
1000         
1001 2009-06-19  Ian Lance Taylor  <iant@google.com>
1002
1003         * objc-act.c (objc_in_struct, objc_struct_types): Remove.
1004         (objc_struct_info): New static variable.
1005         (objc_start_struct): Pass &objc_struct_info, not &objc_in_struct
1006         and &objc_struct_types, to start_struct.
1007         (objc_finish_struct): Likewise for finish_struct.
1008
1009 2009-06-15  Ian Lance Taylor  <iant@google.com>
1010
1011         * objc-act.c (objc_start_function): Don't set
1012         label_context_stack_se or label_context_stack_vm.
1013
1014 2009-06-12  Aldy Hernandez  <aldyh@redhat.com>
1015         
1016         * objc-act.c (finish_var_decl): Pass location to finish_decl.
1017         (objc_get_parm_info): Same.
1018         (get_super_receiver): Same.
1019         * objc-act.c (objc_build_component_ref): Pass location to
1020         build_compound_ref.
1021         (build_module_initializer_routine): Pass location to
1022         c_end_compound_stmt.
1023         (objc_generate_static_init_call): Pass location to build_stmt.
1024         (build_typed_selector_reference): New location argument.
1025         (build_selector_reference): Same.
1026         (objc_substitute_decl): Pass location to build_array_ref.
1027         (next_sjlj_build_try_catch_finally): Pass location to build_stmt.
1028         (objc_begin_catch_clause): Same.
1029         (objc_finish_try_stmt): Same.
1030         (objc_finish_catch_clause): Pass location to c_end_compound_stmt.
1031         (objc_build_throw_stmt): New argument.
1032         (generate_shared_structures): Pass location to build_c_cast.
1033         (objc_build_message_expr): Use local location.
1034         (objc_finish_message_expr): Use input_location.
1035         (build_objc_method_call): New argument.
1036         (objc_build_selector_expr): Same.
1037         (get_super_receiver): Pass location to build_c_cast,
1038         build_modify_expr, build_compound_expr.
1039         * objc-act.c: Add location to all calls to start_struct, build_decl,
1040         finish_struct.
1041         
1042 2009-06-09  Ian Lance Taylor  <iant@google.com>
1043
1044         * objc-act.c (objc_gimplify_expr): Change return type to int.
1045         * objc-act.h: Update declaration.
1046
1047 2009-06-08  Alexandre Oliva  <aoliva@redhat.com>
1048
1049         * objc-act.c (objc_init): Skip print_struct_values during
1050         -fcompare-debug-second.
1051
1052 2009-06-03  Ian Lance Taylor  <iant@google.com>
1053
1054         * Make-lang.in (cc1obj-checksum.o): Depend upon $(CONFIG_H) and
1055         $(SYSTEM_H).
1056
1057 2009-05-27  Ian Lance Taylor  <iant@google.com>
1058
1059         * Make-lang.in (cc1obj-dummy$(exeext)): Change $(COMPILER) to
1060         $(LINKER).
1061         (cc1obj$(exeext)): Likewise.
1062
1063 2009-05-26  Ian Lance Taylor  <iant@google.com>
1064
1065         * Make-lang.in (cc1obj-dummy$(exeext)): Use $(COMPILER).
1066         (cc1obj$(exeext)): Likewise.
1067
1068 2009-05-20  Ian Lance Taylor  <iant@google.com>
1069
1070         * objc-act.c (objc_generate_cxx_ctor_or_dtor): Pass NULL rather
1071         than NULL_TREE to build_special_member_call.
1072
1073 2009-05-10  Ian Lance Taylor  <iant@google.com>
1074
1075         * objc-act.c (objc_building_struct): New static variable.
1076         (objc_in_struct, objc_struct_types): New static variables.
1077         (objc_start_struct, objc_finish_struct): New static functions.
1078         (generate_struct_by_value_array): Call objc_start_struct instead
1079         of start_struct, and call objc_finish_struct instead of
1080         finish_struct.
1081         (objc_build_struct, build_objc_symtab_template): Likewise.
1082         (build_module_descriptor): Likewise.
1083         (build_next_objc_exception_stuff): Likewise.
1084         (build_protocol_template): Likewise.
1085         (build_method_prototype_list_template): Likewise.
1086         (build_method_prototype_template): Likewise.
1087         (build_category_template, build_selector_template): Likewise.
1088         (build_class_template, build_super_template): Likewise.
1089         (build_ivar_template, build_ivar_list_template): Likewise.
1090         (build_method_list_template): Likewise.
1091         (build_method_template): Likewise.
1092
1093 2009-05-10  Joseph Myers  <joseph@codesourcery.com>
1094
1095         * objc-act.c: Include intl.h.
1096         (objc_lookup_protocol): Use complete sentences for diagnostics
1097         with %qE for identifiers and translating results of
1098         gen_type_name_0 to locale character set.
1099         (objc_check_decl, check_protocol_recursively,
1100         lookup_and_install_protocols, objc_build_string_object,
1101         objc_get_class_reference, objc_declare_alias, objc_declare_class,
1102         objc_get_class_ivars, error_with_ivar, check_duplicates,
1103         objc_finish_message_expr, objc_build_protocol_expr,
1104         objc_build_selector_expr, build_ivar_reference, objc_add_method,
1105         add_category, add_instance_variable, objc_is_public,
1106         check_methods, check_methods_accessible, check_protocol,
1107         start_class, finish_class, start_protocol, really_start_method,
1108         get_super_receiver, objc_lookup_ivar): Use %E and %qE for
1109         identifiers in diagnostics.  Translate generated text to locale
1110         character set as needed.
1111         (check_protocol, check_protocols): Change name parameter to type
1112         tree.
1113         (lang_report_error_function): Remove.
1114
1115 2009-04-27  Ian Lance Taylor  <iant@google.com>
1116
1117         * objc-act.c (objc_gimplify_expr): Add casts to enum type.
1118
1119 2009-04-24  Ian Lance Taylor  <iant@google.com>
1120
1121         * objc-act.c (get_super_receiver): Update calls to
1122         build_modify_expr to pass new argument.
1123
1124 2009-04-21  Taras Glek <tglek@mozilla.com>
1125
1126         * objc-act.c: Update GTY annotations to new syntax
1127         * objc-act.h: Likewise
1128
1129 2009-04-21  Joseph Myers  <joseph@codesourcery.com>
1130
1131         * ChangeLog: Add copyright and license notices.
1132
1133 2009-04-20  Ian Lance Taylor  <iant@google.com>
1134
1135         * objc-act.c (objc_rewrite_function_call): Change parameter from
1136         params to first_param.  Change all callers.
1137
1138 2009-03-30  Dominique d'Humieres  <dominiq@lps.ens.fr>
1139
1140         PR bootstrap/39583
1141         * objc-act.c (in_late_binary_op): Define for Objective-C++.
1142
1143 2009-03-29  Joseph Myers  <joseph@codesourcery.com>
1144
1145         PR c/456
1146         PR c/5675
1147         PR c/19976
1148         PR c/29116
1149         PR c/31871
1150         PR c/35198
1151         * objc-act.c (objc_finish_try_stmt): Set in_late_binary_op.
1152
1153 2008-12-05  Sebastian Pop  <sebastian.pop@amd.com>
1154
1155         PR bootstrap/38262
1156         * Make-lang.in (cc1obj-dummy, cc1obj): Add BACKENDLIBS,
1157         remove GMPLIBS.
1158
1159 2008-10-06  Aldy Hernandez  <aldyh@redhat.com>
1160
1161         * objc-act.c (objc_build_string_object): Pass location to
1162         build_unary_op.
1163         (init_def_list): Same.
1164         (init_objc_symtab): Same.
1165         (init_module_descriptor): Same.
1166         (build_module_initializer_routine): Same.
1167         (generate_static_references): Same.
1168         (build_typed_selector_reference): Same.
1169         (add_objc_string): Same.
1170         (objc_substitute_decl): Same.
1171         (objc_build_ivar_assignment): Same.
1172         (objc_build_global_assignment): Same.
1173         (objc_build_strong_cast_assignment): Same.
1174         (generate_protocols): Same.
1175         (build_protocol_initializer): Same.
1176         (build_dispatch_table_initializer): Same.
1177         (generate_protocol_list): Same.
1178         (build_category_initializer): Same.
1179         (build_shared_structure_initializer): Same.
1180         (generate_shared_structures): Same.
1181         (objc_build_protocol_expr): Same.
1182         (build_ivar_reference): Same.
1183         (get_super_receiver): Same.
1184
1185 2008-09-23  Aldy Hernandez  <aldyh@redhat.com>
1186
1187         * objc-act.c (next_sjlj_build_enter_and_setjmp): Call
1188         c_common_truthvalue_conversion with location.
1189         (next_sjlj_build_catch_list): Same.
1190         (next_sjlj_build_try_catch_finally): Same.
1191
1192 2008-09-17  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1193
1194         PR objc/37460
1195         * objc-lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define.
1196         * objc-act.h (objc_get_callee_fndecl): Remove prototype.
1197         * objc-act.c (objc_get_callee_fndecl): Kill.
1198
1199 2008-09-17  Jan Hubicka  <jh@suse.cz>
1200
1201         PR c++/18071
1202         * objc/objc-act.c (objc_finish_method_definition): Do not set
1203         DECL_INLINE.
1204
1205 2008-09-01  Aldy Hernandez  <aldyh@redhat.com>
1206
1207         * objc-act.c (build_typed_selector_reference): Pass input_location to
1208         build_unary_op calls.
1209         (build_selector_reference): Same, but to build_array_ref.
1210         (objc_substitute_decl): Same.
1211         (build_ivar_reference): Same, but to build_indirect_ref.
1212         (get_super_receiver): Same.
1213
1214 2008-07-28  Richard Guenther  <rguenther@suse.de>
1215
1216         Merge from gimple-tuples-branch.
1217
1218         2008-07-18  Aldy Hernandez  <aldyh@redhat.com>
1219
1220         * Make-lang.in (objc-lang.o): Depend on GIMPLE_H.
1221         (objc-act.o): Rename TREE_GIMPLE_H to GIMPLE_H.
1222         * objc-act.h: Include gimple.h instead of tree-gimple.h.
1223         * ipa-reference.c: Same.
1224
1225         2007-11-10  Aldy Hernandez  <aldyh@redhat.com>
1226
1227         * objc-act.c (objc_gimplify_expr): Change pre and post to sequences.
1228         * objc-act.h (objc_gimplify_expr): Change prototype accordingly.
1229
1230 2008-07-21  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1231
1232         * objc-act.c: Fix comment typos.
1233
1234 2008-07-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1235
1236         * objc-act.c (objc_start_class_interface,
1237         objc_start_category_interface, objc_start_class_implementation,
1238         objc_start_category_implementation, objc_build_struct,
1239         generate_static_references, build_private_template,
1240         lookup_category, objc_add_method, add_category,
1241         add_instance_variable, objc_is_public, conforms_to_protocol,
1242         start_class, continue_class, finish_class): Avoid C++ keywords.
1243
1244 2008-07-14  Jason Merrill  <jason@redhat.com>
1245
1246         PR objc++/36723
1247         * objc-act.c (objc_build_constructor): Update C++ tweak.
1248
1249 2007-07-14  Rafael Ávila de Espíndola  <espindola@google.com>
1250
1251         * objc-act.c (synth_module_prologue): Use TREE_NO_WARNING instead
1252         of DECL_IN_SYSTEM_HEADER.
1253
1254 2008-07-11  Ian Lance Taylor  <iant@google.com>
1255
1256         * objc-act.c (objc_is_reserved_word): Always check for RID_CLASS,
1257         etc., not just when OBJCPLUS is defined.
1258
1259 2008-06-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1260
1261         * objc-act.c (setup_string_decl, objc_build_string_object,
1262         hash_interface, eq_interface, objc_begin_try_stmt,
1263         encode_method_prototype, build_ivar_list_initializer,
1264         objc_build_encode_expr): Fix for -Wc++-compat.
1265
1266 2008-05-12  Tomas Bily  <tbily@suse.cz>
1267
1268         * objc-act.c (objc_generate_write_barrier, objc_finish_message_expr):
1269         Use CONVERT_EXPR_P.
1270
1271 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
1272
1273         * objc-act.c (objc_build_string_object): Don't set TREE_INVARIANT.
1274
1275 2008-04-03  Tom Tromey  <tromey@redhat.com>
1276
1277         * Make-lang.in (objc_OBJS): New variable.
1278
1279 2008-03-27  Tom Tromey  <tromey@redhat.com>
1280
1281         * Make-lang.in: Revert automatic dependency patch.
1282
1283 2008-03-27  Douglas Gregor  <doug.gregor@gmail.com>
1284
1285         PR obj-c++/35704
1286         * objc-act.c (objc_build_component_ref): Fix call to
1287         finish_class_member_access_expr.
1288         (objc_generate_cxx_ctor_or_dtor): Fix call to
1289         build_special_member_call.
1290
1291 2008-03-25  Andrew Pinski  <pinskia@gmail.com>
1292
1293         PR objc/29197
1294         * objc-act.c (encode_type): Handle when type is error_mark_node.
1295         (objc_push_parm): Handle when the type of parm is error_mark_node.
1296
1297 2008-03-25  Tom Tromey  <tromey@redhat.com>
1298
1299         * Make-lang.in (objc_OBJS): New variable.
1300         (cc1obj-checksum.o, objc/objc-lang.o, objc/objc-act.o): Remove.
1301
1302 2008-03-21  Andreas Tobler  <a.tobler@schweiz.org>
1303
1304         PR bootstrap/35660
1305         * objc-act.c (objc_generate_cxx_ctor_or_dtor): Rename IS_AGGR_TYPE to
1306         MAYBE_CLASS_TYPE_P.
1307         (objc_generate_cxx_cdtors): Likewise.
1308         (add_instance_variable): Likewise.
1309
1310 2008-02-26  Tom Tromey  <tromey@redhat.com>
1311
1312         * objc-act.c (objc_init): Remove old location code.
1313
1314 2008-02-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1315
1316         PR other/35107
1317         * Make-lang.in (cc1obj-dummy, cc1obj): Add $(GMPLIBS).
1318
1319 2007-07-30  Nick Clifton  <nickc@redhat.com>
1320
1321         * Make-lang.in: Change copyright header to refer to version 3 of
1322         the GNU General Public License and to point readers at the
1323         COPYING3 file and the FSF's license web page.
1324         * lang-specs.h, objc-act.c, objc-tree.def, objc-act.h,
1325         config-lang.in, objc-lang.c: Likewise.
1326
1327 2007-07-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1328
1329         * objc-act.c (objc_get_callee_fndecl): Constify.
1330         * objc-act.h (objc_get_callee_fndecl): Likewise.
1331
1332 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1333
1334         * objc-act.c (volatilized_hash, volatilized_eq, string_hash,
1335         string_eq): Constify.
1336
1337 2007-04-04  Stuart Hastings  <stuart@apple.com>
1338
1339         PR 31281
1340         * objc/objc-act.c (next_sjlj_build_catch_list): Delete volatile from rethrow decl.
1341
1342 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
1343
1344         * Make-lang.in: Add dummy lang.install-pdf target.
1345
1346 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
1347
1348         * objc/objc-act.c: Fix comment typos.
1349
1350 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
1351             Brooks Moses  <brooks.moses@codesourcery.com>
1352             Lee Millward  <lee.millward@codesourcery.com>
1353
1354         * objc-act.c (receiver_is_class_object): Use new CALL_EXPR accessors.
1355         (objc_get_callee_fndecl): Likewise.
1356
1357 2007-01-23  Andrew Pinski  <pinskia@gmail.com>
1358
1359         PR objc/27438
1360         * objc-act.c (objc_add_static_instance): Mark the decl as
1361         TREE_USED.
1362
1363 2007-01-20  Andrew Pinski  <pinskia@gmail.com>
1364
1365         PR objc/30479
1366         * objc-act.c (hash_interface): Use IDENTIFIER_HASH_VALUE instead
1367         of htab_hash_pointer.
1368         (lookup_interface): Likewise.
1369         (add_class): Likewise.
1370
1371 2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>
1372         
1373         * objc-act.c (objc_build_volatilized_type): Keep track of
1374         canonical types.
1375         (objc_get_protocol_qualified_type): Ditto.
1376         
1377 2006-11-02  Andreas Tobler  <a.tobler@schweiz.org>
1378
1379         * objc-act.c (objc_finish_file): Remove ifdef clause for OBJCPLUS and
1380         content where we called cp_finish_file.
1381
1382 2006-10-23 Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1383
1384         * objc-act.c (synth_module_prologue): Replace calls to
1385         builtin_function with add_builtin_function.
1386         (build_next_objc_exception_stuff): Replace calls to
1387         builtin_function with add_builtin_function.
1388         (build_objc_exception_stuff): Replace calls to
1389         builtin_function with add_builtin_function.
1390
1391 2006-10-10  Brooks Moses  <bmoses@stanford.edu>
1392
1393         * Make-lang.in: Added empty "objc.pdf" target.
1394
1395 2006-09-26  Andrew Pinski  <pinskia@physics.uc.edu>
1396
1397         PR objc/29195
1398         * objc-act.c (objc_push_parm): If we change the type of the
1399         decl, relayout the decl.
1400
1401 2006-09-19  Eric Christopher  <echristo@apple.com>
1402
1403         * objc-act.c (JBLEN): Rename to OBJC_JBLEN,
1404         default to something innocuous.
1405         (build_next_objc_exception_stuff): Rename JBLEN.
1406
1407 2006-07-28  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1408
1409         * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
1410
1411 2006-07-19  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1412
1413         PR obj-c++/28434
1414         * objc-act.c (lookup_and_install_protocols): Skip error_mark_nodes.
1415
1416 2006-06-06  Mike Stump  <mrs@apple.com>
1417
1418         * objc-act.c: Remove prototype for objc_build_volatilized_type.
1419
1420 2006-05-24  Mike Stump  <mrs@apple.com>
1421
1422         * objc-act.c (build_next_objc_exception_stuff): Use JBLEN instead of _JBLEN.
1423
1424 2006-05-05  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1425
1426         PR objc/27240
1427         * objc-act.c (objc_is_public): Return early on invalid type.
1428
1429 2006-03-02 Fariborz Jahanian <fjahanian@apple.com>
1430
1431         * objc-act.c (init_module_descriptor): Remove file name from
1432         module descriptor.
1433         (gen_type_name_0): Fix ICE when issuing warning.
1434
1435 2006-02-20 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
1436         * Make-lang.in (OBJC): Remove
1437         (OBJECTIVE-C): Remove
1438         (objective-c): Remove
1439         (.PHONY): Remove objective-c and ObjC
1440
1441 2005-12-14  Andrew Pinski  <pinskia@physics.uc.edu>
1442
1443         PR objc/25360
1444         * objc/objc-act.c (encode_type): Encode Complex types as 'j' followed
1445         by the inner type.
1446
1447 2005-12-12  Andrew Pinski  <pinskia@physics.uc.edu>
1448
1449         PR objc/25348
1450         * objc-act.c (encode_array): Handle arrays to zero sized types.
1451
1452 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1453
1454         * Make-lang.in (objc.all.build, objc.install-normal): Remove.
1455
1456 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1457
1458         * Make-lang.in: Remove all dependencies on s-gtype.
1459
1460 2005-12-02  Richard Guenther  <rguenther@suse.de>
1461
1462         * objc-act.c (objc_build_exc_ptr, next_sjlj_build_enter_and_setjmp
1463         next_sjlj_build_exc_extract, next_sjlj_build_catch_list,
1464         next_sjlj_build_try_catch_finally, objc_begin_catch_clause,
1465         build_objc_method_call, objc_rewrite_function_call): Use buildN
1466         instead of build.
1467
1468 2005-10-20  Geoffrey Keating  <geoffk@apple.com>
1469
1470         * objc-act.c (synth_module_prologue): Clear TREE_NOTHROW
1471         on objc_msgSend and like builtin functions.
1472
1473 2005-10-17  Andreas Krebbel  <krebbel1@de.ibm.com>
1474
1475         * objc-act.c (objc_build_component_ref): Adjust call to
1476         finish_class_member_access_expr due to a changed prototype.
1477
1478 2005-08-31  Andrew Pinski  <pinskia@physics.uc.edu>
1479
1480         PR objc/23306
1481         * objc-act.c (generate_strings): Remove and move code to
1482         finish decl to ...
1483         (add_objc_string): here when creating a new string decl.
1484         (finish_objc): Don't call generate_strings.
1485
1486 2005-08-31  Andrew Pinski  <pinskia@physics.uc.edu>
1487
1488         PR objc/23381
1489         * objc-act.c (next_sjlj_build_try_catch_finally): Set
1490         TREE_SIDE_EFFECTS on catch_seq after building it.
1491
1492 2005-08-09  Andrew Pinski  <pinskia@physics.uc.edu>
1493
1494         part of PR objc/21992
1495         * objc-act.c (handle_class_ref): The ref decl is always referenced.
1496
1497 2005-07-20  Giovanni Bajo  <giovannibajo@libero.it>
1498
1499         Make CONSTRUCTOR use VEC to store initializers.
1500         * objc-act.c (objc_build_constructor): Use build_constructor_from_list
1501         instead of build_constructor.
1502
1503 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
1504
1505         * objc-act.c (objc_push_parm): DECL_ARG_TYPE_AS_WRITTEN is
1506         removed.
1507         * objc-act.h (KEYWORD_ARG_NAME): Use decl_non_common.
1508         (KEYWORD_KEY_NAME): Use decl_minimal.
1509         (METHOD_SEL_NAME): Ditto..
1510         (METHOD_SEL_ARGS): Use decl_non_common.
1511         (METHOD_ADD_ARGS): Ditto.
1512         (METHOD_ADD_ARGS_ELLIPSIS_P): Use decl_common.
1513         (METHOD_DEFINITION): Ditto.
1514         (METHOD_ENCODING): Ditto.
1515         * objc-lang.c: (objc_init_ts): New function.
1516
1517 2005-07-07  Ziemowit Laski  <zlaski@apple.com>
1518
1519         * objc-act.c (objc_build_struct): Pass in an actual @interface
1520         instead of its name, and annotate the struct created (and all
1521         existing variants thereof) with the @interface.
1522         (objc_compare_types): Treat forward-declared ObjC classes
1523         as stand-alone (root) classes for purposes of type comparisons.
1524         (build_private_template): Move some code to objc_build_struct().
1525
1526 2005-07-07  Ziemowit Laski  <zlaski@apple.com>
1527
1528         PR objc/22274
1529         * objc-act.c (objc_build_string_object): For GNU-style constants,
1530         use the @interface type rather than the built-in type.
1531
1532 2005-07-03  Kazu Hirata  <kazu@codesourcery.com>
1533
1534         * Make-lang.in (cc1plus-checksum.c): Use
1535         build/genchecksum$(build_exeext), not build/genchecksum$(exeext).
1536
1537 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
1538
1539         * objc-act.c: Use %q to quote in diagnostics.
1540
1541 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
1542
1543         * objc-act.c: Use '+' flag instead of %J.  Use 'q' flag for
1544         quoting.
1545
1546 2005-06-30  Ziemowit Laski  <zlaski@apple.com>
1547
1548         * objc-act.c (objc_build_volatilized_type): New function.
1549         (objc_volatilize_decl): Call objc_build_volatilized_type()
1550         instead of build_qualified_type().
1551
1552 2005-06-29  Ziemowit Laski  <zlaski@apple.com>
1553
1554         * objc-act.c (objc_build_internal_const_str_type): New function.
1555         (check_string_class_template): Use objc_get_class_ivars() instead
1556         of TYPE_FIELDS() to retrieve ivar list.
1557         (AT_LEAST_AS_LARGE_AS): Check the size of each field's type rather
1558         than the field itself.
1559         (objc_build_string_object): Synthesize a "__builtin_ObjCString"
1560         type and use it to lay out compile-time string objects.
1561         * objc-act.h (OCTI_INTERNAL_CNST_STR_TYPE, internal_const_str_type):
1562         New.
1563
1564 2005-06-28  Paul Brook  <paul@codesourcery.com>
1565
1566         * objc-act.c (objc_init_exceptions): Call
1567         default_init_unwind_resume_libfunc.
1568
1569 2005-06-27  Ziemowit Laski  <zlaski@apple.com>
1570
1571         * objc-act.c (objc_build_struct): Save the TYPE_OBJC_INFO
1572         portion of TYPE_LANG_SPECIFIC info for all variants of
1573         a class before calling finish_struct(), and restore
1574         same TYPE_OBJC_INFO afterwards.
1575
1576 2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>
1577
1578         * all files: Update FSF address in copyright headers.
1579
1580 2005-06-15  Joseph S. Myers  <joseph@codesourcery.com>
1581
1582         * objc-act.c (my_build_string_pointer): New.
1583         (objc_get_class_reference, get_super_receiver): Call
1584         my_build_string_pointer instead of my_build_string when building
1585         function arguments.
1586
1587 2005-05-25  Mike Stump  <mrs@mrs.kithrup.com>
1588
1589         * objc-act.c (volatilized_hash): Avoid warnings on 64-bit
1590         machines.
1591
1592 2005-05-24  Ziemowit Laski  <zlaski@apple.com>
1593
1594         * objc-act.c (objc_build_struct): New function.
1595         (objc_derived_from_p): Likewise.
1596         (objc_build_component_ref): Likewise.
1597         (objc_copy_binfo): Likewise.
1598         (objc_xref_basetypes): Likewise.
1599         (objc_lookup_protocol): Likewise.
1600         (objc_compare_protocols): Likewise.
1601         (objc_volatilize_decl): Likewise.
1602         (encode_aggregate_fields): Likewise.
1603         (volatilized_hash): Likewise.
1604         (volatilized_eq): Likewise.
1605         (objc_compare_types): Likewise.
1606         (objc_type_quals_match): Likewise.
1607         (DERIVED_FROM_P): New ObjC macro, corresponding to C++ macro
1608         of same name.
1609         (get_class_ivars): Add second parameter indicating if entire
1610         hierarchy is desired.
1611         (struct volatilized_type): New type.
1612         (volatilized_htab): New hash table.
1613         (objc_types_compatible_p, objc_comptypes): Remove functions.
1614         (synth_module_prologue): Do not initialize 'unused_list'.
1615         (objc_get_class_reference): Fix ObjC++ impedance mismatches.
1616         (objc_declare_alias): Implement as a typedef.
1617         (objc_substitute_decl, objc_gimplify_expr): Reformat.
1618         (objc_get_class_ivars): Adjust call to get_class_ivars().
1619         (next_sjlj_build_enter_and_setjmp, synth_forward_declarations,
1620         build_ivar_reference, get_super_receiver): Call
1621         objc_build_component_ref() instead of build_component_ref().
1622         (objc_begin_catch_clause): Use DERIVED_FROM_P() instead of
1623         objc_comptypes().
1624         (build_private_template): Call objc_build_struct() instead of
1625         start_struct() and finish_struct().
1626         (hash_init): Initialize volatilized_htab.
1627         (objc_is_public): Adjust calls to objc_get_ivars(); adjust
1628         ObjC++ impedance mismatches.
1629         (encode_aggregate_within): Streamline by calling
1630         encode_aggregate_fields().
1631         * objc-act.h (objc_types_compatible_p): Remove prototype.
1632         (OCTI_UNUSED_LIST, unused_list): Remove slot.
1633         * objc-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Remove.
1634
1635 2005-05-18  Geoffrey Keating  <geoffk@apple.com>
1636
1637         * Make-lang.in (cc1obj-dummy): New.
1638         (cc1obj-checksum.c): New.
1639         (cc1obj-checksum.o): New.
1640         (cc1obj): Add cc1obj-checksum.o.
1641
1642 2005-05-18  Mike Stump  <mrs@apple.com>
1643
1644         PR objc/21641
1645         * objc-act.c (struct interface_tuple): Mark it up for GC.
1646         (interface_htab): It is really a struct interface_tuple.
1647
1648 2005-05-17  Ziemowit Laski  <zlaski@apple.com>
1649             Mike Stump  <mrs@apple.com>
1650
1651         Yet more Objective-C++...
1652
1653         * objc-act.c (objc_finish_try_stmt): Add return value.
1654         (objc_build_synchronized): Likewise.
1655
1656         * objc-act.c (objc_is_gcable_type): Add.
1657         (objc_substitute_decl): Add.
1658         (objc_build_ivar_assignment): Add.
1659         (objc_build_global_assignment): Add.
1660         (objc_build_strong_cast_assignment): Add.
1661         (objc_is_ivar_reference_p): Add.
1662         (objc_is_global_reference_p): Add.
1663         (objc_generate_write_barrier): Add.
1664         (objc_rewrite_function_call): Add.
1665         (objc_gimplify_expr): Add Objective-C++ support.
1666         * objc-act.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Likewise.
1667         (SIZEOF_OBJC_TYPE_LANG_SPECIFIC): Add.
1668         (INIT_TYPE_OBJC_INFO): Add Objective-C++ support.
1669         (DUP_TYPE_OBJC_INFO): Likewise.
1670         (struct imp_entry): Add field has_cxx_cdtors.
1671         (struct imp_entry *imp_list): Add OCTI_UMSG_FAST_DECL,
1672         OCTI_METH_LIST_TEMPL, OCTI_METH_PROTO_LIST_TEMPL,
1673         OCTI_IVAR_LIST_TEMPL, OCTI_ASSIGN_IVAR_DECL,
1674         OCTI_ASSIGN_IVAR_FAST_DECL, OCTI_ASSIGN_GLOBAL_DECL,
1675         OCTI_ASSIGN_STRONGCAST_DECL.
1676         (umsg_fast_decl): Add.
1677         (objc_assign_ivar_decl): Add.
1678         (objc_assign_ivar_fast_decl): Add.
1679         (objc_assign_global_decl): Add.
1680         (objc_assign_strong_cast_decl): Add.
1681         (objc_method_list_ptr): Add.
1682         (objc_method_proto_list_ptr): Add.
1683         (objc_ivar_list_ptr): Add.
1684
1685         * objc-act.c (should_call_super_dealloc): Add.
1686         (OBJC_VERSION): Bump to 6.
1687         (objc_is_gcable_type): Add.
1688         (objc_substitute_decl): Add.
1689         (objc_build_ivar_assignment): Add.
1690         (objc_build_global_assignment): Add.
1691         (objc_build_strong_cast_assignment): Add.
1692         (objc_is_gcable_p): Add.
1693         (objc_is_ivar_reference_p): Add.
1694         (objc_is_global_reference_p): Add.
1695         (generate_shared_structures): Add flags parameter.
1696         (objc_generate_cxx_ctor_or_dtor): Add.
1697         (objc_generate_cxx_cdtors): Add.
1698         (add_class): Add name parameter.
1699         (objc_types_share_size_and_alignment): Add.
1700         (comp_proto_with_proto): Add strict parameter.
1701         (CLS_HAS_CXX_STRUCTORS): Add.
1702         (TAG_ASSIGNIVAR): Add.
1703         (TAG_ASSIGNGLOBAL): Add.
1704         (TAG_ASSIGNSTRONGCAST): Add.
1705         (TAG_MSGSEND_FAST): Add.
1706         (TAG_ASSIGNIVAR_FAST): Add.
1707         (TAG_CXX_CONSTRUCT): Add.
1708         (TAG_CXX_DESTRUCT): Add.
1709         (OBJC_LOOKUP_CLASS): Add.
1710         (OBJC_LOOKUP_NO_SUPER): Add.
1711         (objc_finish_file): Add pch support.
1712         (objc_finish_implementation): Add Objective-C++ support.
1713         (synth_module_prologue): Likewise.
1714         (synth_module_prologue): Add fast dispatching.
1715         (objc_get_class_reference): Add Objective-C++ support.
1716         (objc_generate_write_barrier): Likewise.
1717         (next_sjlj_build_enter_and_setjmp): Likewise.
1718         (objc_begin_try_stmt): Likewise.
1719         (build_next_objc_exception_stuff): Add fast ivar support.
1720         (build_private_template): Mark the record as used so debug
1721         information is generated.
1722         (build_protocol_template): Add Objective-C++ support.
1723         (objc_method_parm_type) Likewise.
1724         (objc_generate_cxx_ctor_or_dtor): Likewise.
1725         (objc_generate_cxx_cdtors): Likewise.
1726         (build_protocol_initializer): Likewise.
1727         (build_category_template): Likewise.
1728         (build_class_template): Likewise.
1729         (build_method_list_template): Likewise.
1730         (build_category_initializer): Likewise.
1731         (build_shared_structure_initializer): Likewise.
1732         (objc_finish_message_expr): Likewise.
1733         (build_objc_method_call): Add fast dispatch support.
1734         (lookup_method_static): Add support to end search at superclasses.
1735         (add_method_to_hash_list): Add strict parameter to
1736         comp_proto_with_proto.
1737         (objc_add_method): Likewise.
1738         (objc_add_method): Also set the interface_value.
1739         (add_instance_variable): Add Objective-C++ support.
1740         (objc_is_public): Likewise.
1741         (start_class): Likewise.
1742         (continue_class): Likewise.
1743         (encode_aggregate_within): Likewise.
1744         (start_method_def): Likewise.
1745         (objc_start_function): Clear current_function_returns_value
1746         and current_function_returns_null.
1747         (really_start_method): Add Objective-C++ support.
1748         (objc_finish_method_definition): Add warning for missing
1749         [super dealloc].
1750         (finish_objc): Add Objective-C++ support.
1751         (generate_objc_image_info): Likewise.
1752         (objc_lookup_ivar): Likewise.
1753         * objc-act.h (TYPE_HAS_OBJC_INFO): Likewise.
1754         (INIT_TYPE_OBJC_INFO): Likewise.
1755         (DUP_TYPE_OBJC_INFO): Likewise.
1756
1757 2005-04-23  DJ Delorie  <dj@redhat.com>
1758
1759         * objc-act.c: Adjust warning() callers.
1760
1761 2005-04-21  Roger Sayle  <roger@eyesopen.com>
1762
1763         * objc-act.h (METHOD_ADD_ARGS_ELLIPSIS_P): New macro for accessing
1764         this field of an objc method decl.
1765         * objc-act.c (build_method_decl): Take an additional "ellipsis"
1766         argument, and set METHOD_ADD_ARGS_ELLIPSIS_P as appropriate.
1767         (objc_build_method_signature): Accept additional "ellipsis"
1768         argument and pass it to build_method_decl.
1769         (get_arg_type_list, start_method_def, gen_method_decl): Use
1770         the new METHOD_ADD_ARGS_ELLIPSIS_P instead of examining the
1771         TREE_OVERFLOW field of a TREE_LIST node.
1772
1773 2005-04-20  Joseph S. Myers  <joseph@codesourcery.com>
1774
1775         PR c/12913
1776         * objc-act.c (objc_start_function): Create stack level for context
1777         of identifiers with variably modified type.
1778
1779 2005-03-30  Joseph S. Myers  <joseph@codesourcery.com>
1780
1781         PR c/772
1782         PR c/17913
1783         * objc-act.c (objc_start_function): Push context on
1784         label_context_stack.
1785
1786 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
1787
1788         * objc-act.c (next_sjlj_build_enter_and_setjmp,
1789         next_sjlj_build_catch_list, next_sjlj_build_try_catch_finally):
1790         Call c_common_truthvalue_conversion.
1791
1792 2005-02-25  Joseph S. Myers  <joseph@codesourcery.com>
1793
1794         * Make-lang.in (objc/objc-parse.o-warn, objc/objc-parse.o,
1795         objc/objc-parse.c, objc/objc-parse.y): Remove
1796         (OBJC_OBJS, objc.srcextra, objc.tags, objc.mostlyclean,
1797         objc.distclean, objc.maintainer-clean): Update for new parser.
1798         * config-lang.in (gtfiles): Update for new parser.
1799
1800 2005-01-29  Kazu Hirata  <kazu@cs.umass.edu>
1801
1802         * lang-specs.h, objc-act.c, objc-act.h, objc-lang.c: Update
1803         copyright.
1804
1805 2005-01-27  Matt Austern  <austern@apple.com>
1806
1807         * objc-act.c (objc_finish_file): In ObjC++ mode, set at_eof before
1808         calling instantiate_pending_templates.
1809
1810 2005-01-26  Alexander Malmberg  <alexander@malmberg.org>
1811
1812         PR objc/18862
1813         * objc-act.c (build_selector_translation_table): Use
1814         input_location in the diagnostic for the GNU runtime or if
1815         TREE_PURPOSE (chain) is NULL.
1816
1817 2005-01-25  Alexander Malmberg  <alexander@malmberg.org>
1818
1819         PR objc/18408
1820         * objc-act.c (objc_types_compatible_p): New function.
1821         * objc-act.h (objc_types_compatible_p): Declare.
1822         * objc-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.
1823
1824 2005-01-16  Ziemowit Laski  <zlaski@apple.com>
1825
1826         * objc-act.c (objc_push_parm): Call c_type_promotes_to()
1827         via a lang-hook.
1828
1829 2005-01-15  Ziemowit Laski  <zlaski@apple.com>
1830
1831         PR objc/19321
1832         * objc-act.c (get_arg_type_list): Decay function arguments into
1833         pointers.
1834         (objc_push_parm): Likewise; bring PARM_DECL construction closer
1835         in line with what the C front-end does.
1836         (objc_get_parm_info): Call pushdecl() and finish_decl() on
1837         each PARM_DECL, like the C front-end does.
1838         (start_method_def): Remove redundant ARRAY_TYPE decay.
1839         (objc_start_function): Bring closer in line with what the
1840         C front-end does for functions.
1841
1842 2005-01-14  Mike Stump  <mrs@apple.com>
1843
1844         * lang-specs.h ("@objective-c"): Use cc1obj when -E is used so
1845         that -fobjc-exceptions is accepted.
1846
1847 2004-12-30  Ziemowit Laski  <zlaski@apple.com>
1848
1849         PR objc/18971
1850         * objc-act.c (get_arg_type_list, start_method_def): Decay
1851         array arguments into pointers.
1852         (gen_type_name_0): Learn to pretty-print array types.
1853
1854 2004-12-15  Ziemowit Laski  <zlaski@apple.com>
1855
1856         * objc-act.c (build_private_template): Change to return 'void'; do
1857         not set ivar_context, uprivate_record or objc_instance_type.
1858         (objc_comptypes, gen_type_name_0): For types 'id' and 'Class',
1859         retrieve protocol list from the pointee rather than the pointer itself;
1860         check TYPE_HAS_OBJC_INFO(...) precondition before accessing
1861         TYPE_OBJC_PROTOCOL_LIST.
1862         (objc_get_protocol_qualified_type): For types 'id' and 'Class',
1863         construct a variant of the pointee as well as the pointer, and
1864         store protocol information in the former.  When creating variants
1865         of RECORD_TYPEs, clone their TYPE_LANG_SPECIFIC fields and propagate
1866         TYPE_OBJC_INTERFACE information.
1867         (objc_declare_class): If a TYPE_DECL is looked up, retrieve the
1868         underlying RECORD_TYPE to check for presence of TYPE_OBJC_INTERFACE;
1869         for newly-created RECORD_TYPEs, create a tentative TYPE_OBJC_INTERFACE
1870         holding an IDENTIFIER_NODE.
1871         (objc_finish_message_expr): Check TYPE_HAS_OBJC_INFO(...) before
1872         accessing TYPE_OBJC_PROTOCOL_LIST; Use TYPE_OBJC_INTERFACE instead
1873         of calling lookup_interface(); allow for TYPE_OBJC_INTERFACE holding
1874         an IDENTIFIER_NODE (meaning a @class forward-declaration only).
1875         (objc_is_public): Check TYPE_OBJC_INTERFACE instead of calling
1876         lookup_interface().
1877         (continue_class): For @implementations, set ivar_context,
1878         uprivate_record and objc_instance_type, for @interfaces, call
1879         build_private_template().
1880         (encode_pointer): Check TYPE_HAS_OBJC_INFO(...) before accessing
1881         TYPE_OBJC_INTERFACE.
1882         (objc_types_are_equivalent): Check TYPE_HAS_OBJC_INFO(...) before
1883         accessing TYPE_OBJC_PROTOCOL_LIST.
1884         * objc-act.h (OBJC_INFO_SLOT_ELTS, TYPE_OBJC_INFO, INIT_TYPE_OBJC_INFO,
1885         DUP_TYPE_OBJC_INFO, ALLOC_OBJC_TYPE_LANG_SPECIFIC,
1886         SIZEOF_OBJC_TYPE_LANG_SPECIFIC): New macros.
1887         (TYPE_OBJC_INTERFACE): Replaces TREE_STATIC_INSTANCE and now points
1888         to an actual @interface; stored in TYPE_LANG_SPECIFIC(...).
1889         (TYPE_OBJC_PROTOCOL_LIST): Replaces TYPE_PROTOCOL_LIST; stored in
1890         TYPE_LANG_SPECIFIC(...).
1891         (TREE_STATIC_INSTANCE, TYPE_PROTOCOL_LIST): Delete.
1892         (IS_ID, IS_CLASS, IS_PROTOCOL_QUALIFIED_UNTYPED, IS_SUPER,
1893         TYPED_OBJECT): Check for POINTER_TYPE rather than POINTER_TYPE_P;
1894         adjust for use of TYPE_OBJC_INTERFACE and TYPE_OBJC_PROTOCOL_LIST
1895         instead of TREE_STATIC_INSTANCE and TYPE_PROTOCOL_LIST.
1896
1897 2004-11-29  Joseph Myers  <joseph@codesourcery.com>
1898
1899         PR c/7544
1900         * Make-lang.in (objc/objc-act.o): Update dependencies.
1901         * objc-act.c (objc_finish_file): Call
1902         maybe_apply_pending_pragma_weaks if not OBJCPLUS.
1903
1904 2004-11-09  Andrew Pinski  <pinskia@physics.uc.edu>
1905
1906         PR objc/18406
1907         * obj-act.c (encode_type): 96bits doubles are encoded the
1908         same way as 64bit and 128bit doubles are.
1909
1910 2004-11-09  Joseph S. Myers  <joseph@codesourcery.com>
1911
1912         * objc-act.c: Use %q, %< and %> for quoting in diagnostics.
1913
1914 2004-11-08  Andrew Pinski  <pinskia@physics.uc.edu>
1915
1916         PR objc/16546
1917         * objc-act.c (generate_method_descriptors): Remove setting
1918         the new decls' type to variable_length_type.
1919         (generate_ivar_lists): Likewise.
1920         (generate_dispatch_tables): Likewise.
1921
1922 2004-10-30  Ziemowit Laski  <zlaski@apple.com>
1923
1924         * objc-act.c (objc_lookup_ivar): The new OTHER parameter
1925         contains the result of the ID lookup by the C or C++
1926         front-end; in class methods, use OTHER if it exists;
1927         in instance methods, use OTHER only if it is locally
1928         declared.
1929
1930 2004-10-26  Ziemowit Laski  <zlaski@apple.com>
1931
1932         * objc-act.c (finish_class): Do not synthesize bogus
1933         'extern objc_object *_Foo;' declarations for @interface Foo.
1934
1935 2004-10-25  Ziemowit Laski  <zlaski@apple.com>
1936             David Ayers  <d.ayers@inode.at>
1937
1938         * objc-act.c (objc_comptypes): Use IS_PROTOCOL_QUALIFIED_UNTYPED
1939         instead of IS_PROTOCOL_QUALIFIED_ID; add comparisons for:
1940         'Class <Protocol> != id <Protocol>'; 'Class <Protocol> != <class> *';
1941         'Class <Protocol> == id' and 'Class <Protocol> == Class'.
1942         (objc_is_id): Add test for 'super'.
1943         (objc_finish_message_expr): Allow for messaging of 'Class <Proto>'
1944         receivers; if class methods are not found in protocol lists, search
1945         for instance methods therein and warn if one is found.  Look in
1946         global hash tables for suitable method as a last resort when messaging
1947         'id <Proto>', 'Class <Proto>' and invalid receiver types.
1948         (objc_add_method): Insert instance methods listed in protocols into
1949         the global class method hash table.
1950         * objc-act.h (IS_PROTOCOL_QUALIFIED_ID): Rename to
1951         IS_PROTOCOL_QUALIFIED_UNTYPED and allow for 'Class <Proto>' in
1952         addition to 'id <Proto>'.
1953
1954 2004-10-21  Andrew Pinski  <pinskia@physics.uc.edu>
1955
1956         PR objc/17923
1957         * objc-act.c (objc_build_string_object): Create a CONST_DECL
1958         for the NeXT runtime case.
1959
1960 2004-10-02  Kazu Hirata  <kazu@cs.umass.edu>
1961
1962         * objc-act.c: Fix comment typos.
1963
1964 2004-09-24  Ziemowit Laski  <zlaski@apple.com>
1965
1966         * objc-act.c (init_objc_symtab, init_module_descriptor,
1967         build_shared_structure_initializer): When initializing 'long'
1968         fields, ensure that the initializer value is also 'long'.
1969
1970 2004-09-24  Zack Weinberg  <zack@codesourcery.com>
1971
1972         * objc-act.c: Change annotate_with_locus to SET_EXPR_LOCATION
1973         throughout.
1974         (objc_init): Only set input_line to 0 #ifndef USE_MAPPED_LOCATION.
1975         (build_selector_translation_table): Use %J in diagnostic
1976         instead of diddling input_line.  Fix spelling.
1977
1978 2004-09-21  Ziemowit Laski  <zlaski@apple.com>
1979
1980         * objc-act.c (objc_fold_objc_type_ref): New function.
1981         * objc-act.h (objc_fold_objc_type_ref): New prototype.
1982
1983 2004-09-09  Joseph S. Myers  <jsm@polyomino.org.uk>
1984
1985         * objc-act.c (objc_start_function, really_start_method,
1986         objc_get_parm_info, start_method_def): Update to new arg_info
1987         structures.
1988
1989 2004-09-07  Ziemowit Laski  <zlaski@apple.com>
1990
1991         * Make-lang.in (objc/objc-parse.o): Depend on $(C_COMMON_H) instead of
1992         objc/objc-act.h.
1993         (objc/objc-act.o): Depend on $(HASHTAB_H).
1994         * objc-act.c: Include hashtab.h; in ObjC++ mode, include cp-tree.h and
1995         objcp-decl.h instead of c-tree.h.
1996         (build_module_descriptor, get_class_ivars, synth_id_with_class_suffix,
1997         error_with_ivar, gen_method_decl, gen_declaration, setup_string_decl,
1998         build_protocol_template): Adjust prototypes.
1999         (build_module_initializer_routine, start_class, continue_class,
2000         finish_class, start_method_def, objc_start_function, start_protocol,
2001         build_method_decl, objc_add_method, add_instance_variable,
2002         build_ivar_reference, is_ivar, is_private, get_super_receiver,
2003         build_selector_table_decl, objc_push_parm, objc_get_parm_info,
2004         gen_type_name, gen_type_name_0, start_var_decl, finish_var_decl,
2005         create_field_decl): New prototypes.
2006         (objc_expand_function_end, comp_method_with_proto, objc_expr_last,
2007         gen_declaration_1, gen_declarator, is_complex_decl, adorn_decl,
2008         define_decl, create_builtin_decl, gen_declspecs): Remove prototypes.
2009         (TYPE_ID): Rename to OBJECT_TYPEDEF_NAME.
2010         (CLASS_TYPEDEF_NAME): New.
2011         (TAG_EXECCLASS): Change from a global variable to a #define.
2012         (TAG_RETURN_STRUCT): Delete.
2013         (TAG_GNUINIT): New, holds '__objc_gnu_init' name.
2014         (objc_inherit_code, objc_public_flag): New, moved from c-parse.in.
2015         (string_descriptor): New struct.
2016         (string_htab): New hash table.
2017         (string_hash, string_eq): New prototypes.
2018         (generate_struct_by_value_array): Call create_field_decl() instead of
2019         create_builtin_decl().
2020         (objc_init): Do not initialize objc_ellipsis_node or TAG_EXECCLASS;
2021         In ObjC++ mode, call cxx_init() instead of c_objc_common_init().
2022         (objc_finish_file): In ObjC++, call instantiate_pending_templates()
2023         and cp_finish_file().
2024         (define_decl, get_static_reference, get_protocol_reference,
2025         create_builtin_decl): Remove functions.
2026         (objc_start_class_interface, objc_start_category_interface,
2027         objc_start_protocol, objc_continue_interface, objc_finish_interface,
2028         objc_start_class_implementation, objc_start_category_implementation,
2029         objc_continue_implementation, objc_finish_implementation,
2030         objc_set_visibility, objc_set_method_type,
2031         objc_build_method_signature, objc_add_method_declaration,
2032         objc_start_method_definition, objc_add_instance_variable,
2033         objc_get_protocol_qualified_type, create_field_decl,
2034         start_var_decl, finish_var_decl): New functions.
2035         (setup_string_decl): Simplify since it is only called once.
2036         (synth_module_prologue): Call build_class_template(); predefine 'id'
2037         and 'Class' as typedefs; rename 'temp_type' to 'type'; disable debug
2038         hooks for duration of function; fix GNU runtime messenger signatures
2039         to correspond to reality; forward-declare '__objc_exec_class' for the
2040         GNU runtime; call build_selector_table_decl(); in ObjC++ mode, generate
2041         'extern "C" { ... }' wrappers around synthesized declarations; call
2042         build_protocol_template() and build_category_template().
2043         (string_hash, string_eq): New functions.
2044         (objc_build_string_object): Check metaclass correctness only once;
2045         store string literals in hash table.
2046         (objc_build_constructor): Do not convert initializer elements;
2047         adjust for ObjC++ impedance mismatch.
2048         (build_objc_symtab_template): Call create_field_decl() instead of
2049         create_builtin_decl().
2050         (init_objc_symtab): Add missing conversion to initializer element.
2051         (build_metadata_decl): Call start_var_decl() instead of define_decl().
2052         (generate_objc_symtab_decl): Do not call build_category_template();
2053         call start_var_decl() and finish_var_decl() instead of start_decl()
2054         and finish_decl().
2055         (build_module_descriptor): Call create_field_decl() instead of
2056         grokfield(); call start_var_decl() and finish_var_decl() instead of
2057         start_decl() and finish_decl(); always mark module descriptor as
2058         used; move GNU runtime-specific functionality to
2059         build_module_initializer_routine().
2060         (build_module_initializer_routine): New function, broken off of
2061         build_module_descriptor().
2062         (objc_static_init_needed_p, objc_generate_static_init_call): New
2063         functions.
2064         (generate_static_references, generate_strings,
2065         build_selector_translation_table, generate_descriptor_table,
2066         generate_ivars_list, generate_dispatch_table, generate_category): Call
2067         start_var_decl() and finish_var_decl() instead of start_decl() and
2068         finish_decl(); build a type directly instead of via groktypename().
2069         (build_selector_reference_decl, build_selector_table_decl,
2070         build_class_reference_decl, build_protocol_reference,
2071         generate_objc_image_info): Call start_var_decl() instead of
2072         build_decl().
2073         (build_selector_reference): For GNU runtime, do not call
2074         build_selector_reference_decl().
2075         (build_selector, build_typed_selector_reference): Always convert
2076         result to the selector type.
2077         (add_objc_string): Cast return value to 'char *'.
2078         (build_method_prototype_template, build_selector_template,
2079         build_method_template): Use actual selector type for fields
2080         pointing to selectors.
2081         (finish_objc): For GNU runtime, call
2082         build_module_initializer_routine() after build_module_descriptor().
2083         (generate_protocol_list, generate_shared_structures): Call
2084         start_var_decl() and finish_var_decl() instead of start_decl() and
2085         finish_decl(); build a type directly instead of via
2086         groktypename().
2087         (synth_id_with_class_suffix): Return a string.
2088         (get_arg_type_list): For instance methods, use the instance type for
2089         'self'; do not call groktypename_in_parm_context().
2090         (build_objc_string_decl): Squash redeclaration errors in ObjC++.
2091         (objc_is_class_name): Use OBJC_TYPE_NAME instead of TYPE_NAME;
2092         handle RECORD_TYPEs in ObjC as well as ObjC++.
2093         (objc_is_id): New function.
2094         (objc_is_object_ptr): Return the canonical type node.
2095         (objc_get_class_ivars): Simplify using get_class_ivars().
2096         (get_class_ivars): Remove second parameter; create a fresh copy
2097         of the ivar list for each call; do not check for existence of
2098         super class.
2099         (objc_eh_runtime_type): Mark #ifndef OBJCPLUS.
2100         (objc_init_exceptions): When using SJLJ-style exceptions, require
2101         the use of '-fobjc-exceptions' flag; do not require it for DWARF-style
2102         exceptions.
2103         (objc_build_exc_ptr, next_sjlj_build_try_catch_finally): Use
2104         objc_object_type instead of objc_id_type.
2105         (objc_begin_catch_clause): Convert the incoming PARM_DECL into
2106         a VAR_DECL before placing it in the appropriate scope; do not
2107         call define_decl(); adjust call to c_begin_compound_stmt();
2108         use objc_object_type instead of objc_id_type.
2109         (build_next_objc_exception_stuff): Call create_field_decl() instead
2110         of create_builtin_decl(); construct type directly instead of calling
2111         groktypename(); use OBJC_VOID_AT_END to mark end of function parameters.
2112         (build_private_template): Adjust call to get_class_ivars(); build
2113         a type directly instead of via groktypename().
2114         (build_protocol_template, build_method_prototype_list_template,
2115         build_method_prototype_template, build_category_template,
2116         build_selector_template, build_class_template, build_super_template,
2117         build_ivar_template, build_ivar_list_template,
2118         build_method_list_template, build_method_template):
2119         Call create_field_decl() instead of grokfield().
2120         (objc_method_parm_type): Do not call groktypename().
2121         (generate_descriptor_table): Call start_var_decl() and
2122         finish_var_decl() instead of start_decl() and finish_decl().
2123         (generate_method_descriptors, build_protocol_initializer,
2124         generate_dispatch_tables, build_category_initializer,
2125         build_shared_structure_initializer): Do not call groktypename().
2126         (generate_protocols): Call start_var_decl() and finish_var_decl()
2127         instead of start_decl() and finish_decl(); do not call groktypename().
2128         (error_with_ivar): Remove last parameter.
2129         (check_ivars): Do not iterate ovar CLASS_RAW_IVARS lists in addition
2130         to CLASS_IVARS lists; adjust calls to error_with_ivar().
2131         (generate_ivar_lists): Convert one of the initializer elements; do
2132         not call groktypename().
2133         (get_arg_type_list, start_method_def, gen_method_def): Account for
2134         new representation of variable arguments and '...' in Objective-C
2135         methods; add Objective-C++ impedance matching code.
2136         (is_objc_type_qualifier): Remove function.
2137         (adjust_type_for_id_default): Simplify; there is no longer a need to
2138         wade through declspecs.
2139         (lookup_interface, start_class, continue_class,
2140         finish_class, start_method_def, start_protocol, build_method_decl,
2141         objc_add_method, add_instance_variable, build_ivar_reference,
2142         is_ivar, is_private, get_super_receiver, objc_build_finally_epilogue):
2143         Make into static functions.
2144         (receiver_is_class_object): Use new IS_CLASS() macro.
2145         (objc_build_message_expr): Tweak ObjC++ message argument handling;
2146         call objc_finish_message_expr() instead of finish_message_expr().
2147         (finish_message_expr): Rename to objc_finish_message_expr(); use
2148         OBJC_TYPE_NAME and OBJC_SET_TYPE_NAME macros instead of TYPE_NAME.
2149         call gen_type_name() instead of gen_declaration(); call objc_is_id()
2150         instead of using IS_ID and IS_CLASS; Use objc_class_name instead of
2151         calling get_identifier("Class"); handle CONVERT_EXPRs in receiver.
2152         (build_objc_method_call, warn_with_method): Do not call groktypename().
2153         (build_ivar_reference): Call convert() instead of clobbering in a
2154         type.
2155         (hash_init): Initialize string_htab hash table.
2156         (add_instance_variable): Simplify parameter list; do not call grokfield();
2157         do not populate CLASS_IVARS list.
2158         (start_class): Check for the existence of super class, if one was specified.
2159         (continue_class): Use CLASS_RAW_IVARS rather than CLASS_IVARS; do not
2160         call build_class_template(); adjust call to get_class_ivars(); call
2161         build_decl(), pushdecl() and finish_decl() instead of define_decl().
2162         (finish_class): Call build_decl(), pushdecl() and finish_decl() instead
2163         of define_decl().
2164         (add_protocols): Use PROTOCOL_BINFO_ELTS for the tree vector size.
2165         (start_protocol): Do not call build_protocol_template(); use
2166         PROTOCOL_BINFO_ELTS for the tree vector size.
2167         (encode_type_qualifiers): Do not handle the 'const' qualifier here.
2168         (encode_pointer): Encode 'const char *' as 'r*', for backwards
2169         compatibility.
2170         (encode_array): Use HOST_WIDE_INT_PRINT_DEC instead of "%ld".
2171         (encode_type): Handle the 'const' qualifier here.
2172         (objc_parmlist): New global variable, sued by objc_push_parm and
2173         objc_get_parm_info().
2174         (objc_push_parm, objc_get_parm_info): New functions.
2175         (objc_expr_last): Remove function.
2176         (synth_self_and_ucmd_args): For instance methods, use the instance
2177         type for 'self'; call objc_push_parm() instead of push_parm_decl().
2178         (start_method_def): Do not call push_scope(), declare_parm_level(),
2179         pop_scope(), push_parm_decl(), store_parm_decls() or objc_expr_last();
2180         just use objc_push_parm() and objc_get_parm_info().
2181         (comp_method_with_proto): Remove function.
2182         (objc_types_are_equivalent): Strip away indirections before comparing
2183         underlying types.
2184         (comp_proto_with_proto): Do not call groktypename(); types are no
2185         longer in raw declspec format.
2186         (objc_start_function): New function.
2187         (really_start_method): Call comp_proto_with_proto() instead of
2188         comp_method_with_proto(); call objc_start_function() instead of
2189         hand-crafting a function declarator.
2190         (continue_method_def, objc_expand_function_end): Remove functions.
2191         (get_super_receiver): Call objc_get_current_scope() instead of
2192         get_current_scope(); reference 'super_class' field (instead of
2193         'class').
2194         (finish_method_def): Rename to objc_finish_method_definition() and
2195         add a function decl parameter; move method encoding call from
2196         objc_expand_function_end().
2197         (is_complex_decl, adorn_decl, gen_declarator, gen_declspecs,
2198         gen_declaration_1): Remove functions.
2199         (tmpbuf, RAW_DECLSPEC): Remove.
2200         (gen_declaration): Remove second parameter; simplify to deal
2201         with TYPE_P nodes instead of raw declspecs.
2202         (gen_type_name, gen_type_name_0): New functions.
2203         (gen_method_decl): Remove second parameter; call gen_type_name()
2204         instead of gen_declaration_1().
2205         (dump_interface): Adjust calls to gen_declaration() and
2206         gen_method_decl(); do not allocate a separate string buffer.
2207         (init_objc): Allocate a larger string buffer to accommodate
2208         dump_interface(); adjust call to build_module_descriptor();
2209         add call to build_module_initializer_routine() for the GNU
2210         runtime.
2211         (generate_classref_translation_entry): Do not call start_decl(); call
2212         finish_var_decl() instead of finish_decl(); call convert() instead of
2213         build_c_cast().
2214         * objc-act.h (CLASS_OWN_IVARS): Remove accessor.
2215         (CLASS_BINFO_ELTS): Reduce from 6 to 5, now that CLASS_OWN_IVARS is
2216         gone.
2217         (OCTI_GNU_INIT_DECL, GNU_INIT_decl): New.
2218         (OCTI_ELLIPSIS_NODE, objc_ellipsis_node): Remove.
2219         (OCTI_ID_ID, id_type, objc_id_id): Rename to OCTI_ID_NAME,
2220         objc_object_type and objc_object_name, respectively.
2221         (OCTI_CLS_REF, OCTI_CLASS_NAME, objc_class_reference,
2222         objc_class_name): New.
2223         (IS_CLASS): New macro.
2224         (IS_ID, IS_SUPER): Robustify.
2225         (OCTI_EXECCLASS_DECL, execclass_decl): New.
2226         (finish_file, start_class, continue_class, finish_class,
2227         start_method_def, continue_method_def, finish_method_def,
2228         start_protocol, finish_protocol, objc_build_throw_stmt,
2229         objc_build_try_catch_finally_stmt, objc_build_synchronized_prologue,
2230         objc_build_synchronized_epilogue, objc_build_try_prologue,
2231         objc_build_try_epilogue, objc_build_catch_stmt, objc_build_catch_epilogue,
2232         objc_build_finally_prologue, objc_build_finally_epilogue,
2233         is_ivar, is_private, is_public, add_instance_variable, objc_add_method,
2234         get_super_receiver, objc_clear_super_receiver, get_class_ivars_from_name,
2235         get_class_reference, get_static_reference, get_object_reference,
2236         build_message_expr, finish_message_expr, build_selector_expr,
2237         build_ivar_reference, build_keyword_decl, build_method_decl,
2238         build_protocol_expr, build_objc_string_object, objc_declare_alias,
2239         objc_declare_class, objc_declare_protocols, objc_comptypes,
2240         objc_check_decl, build_encode_expr): Remove prototypes.
2241         (imp_count, cat_count): Make GGC-aware.
2242         (OBJC_SET_TYPE_NAME): New macro.
2243
2244 2004-09-03  Ziemowit Laski  <zlaski@apple.com>
2245
2246         * config-lang.in: Update copyright notice.
2247         (lang_requires): Indicate that ObjC requires C to be built first.
2248
2249 2004-09-01  Ziemowit Laski  <zlaski@apple.com>
2250
2251         * objc-act.c (objc_check_decl): Use OBJC_TYPE_NAME macro instead of
2252         TYPE_NAME.
2253         (build_objc_string_object): Rename to objc_build_string_object().
2254         (get_class_reference): Rename to objc_get_class_reference().
2255         (get_class_ivars_from_name): Rename to objc_get_class_ivars().
2256         (next_sjlj_build_catch_list, get_super_receiver): Call
2257         objc_get_class_reference() instead of get_class_reference().
2258         (build_keyword_decl): Rename to objc_build_keyword_decl().
2259         (build_message_expr): Rename to objc_build_message_expr().
2260         (build_protocol_expr): Rename to objc_build_protocol_expr().
2261         (build_selector_expr): Rename to objc_build_selector_expr().
2262         (build_encode_expr): Rename to objc_build_encode_expr().
2263         * objc-act.h (get_class_ivars_from_name): Rename prototype to
2264         objc_get_class_ivars().
2265         (get_class_reference): Rename prototype to objc_get_class_reference().
2266         (build_message_expr): Rename prototype to objc_build_message_expr().
2267         (build_selector_expr): Rename prototype to objc_build_selector_expr().
2268         (build_keyword_decl): Rename prototype to objc_build_keyword_decl().
2269         (build_protocol_expr): Rename prototype to objc_build_prototype_expr().
2270         (build_objc_string_object): Rename prototype to
2271         objc_build_string_object().
2272
2273 2004-09-01  Ziemowit Laski  <zlaski@apple.com>
2274
2275         * objc-act.c (lookup_interface): Make function 'static' and add a
2276         local prototype.
2277         (objc_check_decl, get_class_reference, objc_declare_alias,
2278         objc_declare_class, objc_is_object_ptr): Call objc_is_class_name()
2279         instead of is_class_name().
2280         (get_super_receiver, objc_clear_super_receiver): Call
2281         objc_get_current_scope() instead of get_current_scope().
2282         (is_class_name): Rename to objc_is_class_name.
2283         (lookup_objc_ivar): Rename to objc_lookup_ivar.
2284
2285 2004-08-28  Ziemowit Laski  <zlaski@apple.com>
2286
2287         * objc-act.c (objc_is_reserved_word): New function.
2288
2289 2004-08-15  Ziemowit Laski  <zlaski@apple.com>
2290
2291         * Make-lang.in (objc/objc-lang.o): Depend on $(C_PRETTY_PRINT_H),
2292         $(DIAGNOSTIC_H), c-objc-common.h and gtype-objc.h, but not on toplev.h.
2293         (objc/objc-parse.o): Do not depend on gtype-objc.h.
2294         * objc-act.c: Do not include gtype-objc.h.
2295         (finish_file): Rename to objc_finish_file().
2296         * objc-act.h (finish_file): Update copyright notice; remove prototype.
2297         * objc-lang.c: Update copyright notice; include diagnostic.h,
2298         c-objc-common.h, c-pretty-print.h and gtype-objc.h; do not include
2299         toplev.h.
2300         (finish_file): New hook routine.
2301         (LANG_HOOKS_FINISH, LANG_HOOKS_INIT_OPTIONS,
2302         LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
2303         LANG_HOOKS_MISSING_ARGUMENT, LANG_HOOKS_POST_OPTIONS,
2304         LANG_HOOKS_GET_ALIAS_SET, LANG_HOOKS_SAFE_FROM_P,
2305         LANG_HOOKS_EXPAND_EXPR, LANG_HOOKS_MARK_ADDRESSABLE,
2306         LANG_HOOKS_PARSE_FILE, LANG_HOOKS_TRUTHVALUE_CONVERSION,
2307         LANG_HOOKS_FINISH_INCOMPLETE_DECL, LANG_HOOKS_UNSAFE_FOR_REEVAL,
2308         LANG_HOOKS_STATICP, LANG_HOOKS_SET_DECL_ASSEMBLER_NAME,
2309         LANG_HOOKS_NO_BODY_BLOCKS, LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL,
2310         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_FUNCTION_ENTER_NESTED,
2311         LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_DUP_LANG_SPECIFIC_DECL,
2312         LANG_HOOKS_DECL_UNINIT, LANG_HOOKS_RTL_EXPAND_STMT,
2313         LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
2314         LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
2315         LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS,
2316         LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
2317         LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING,
2318         LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS,
2319         LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
2320         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_TYPE_FOR_MODE,
2321         LANG_HOOKS_TYPE_FOR_SIZE, LANG_HOOKS_SIGNED_TYPE,
2322         LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE,
2323         LANG_HOOKS_INCOMPLETE_TYPE_ERROR, LANG_HOOKS_TYPE_PROMOTES_TO,
2324         LANG_HOOKS_REGISTER_BUILTIN_TYPE, LANG_HOOKS_WRITE_GLOBALS):
2325         Move to c-objc-common.h.
2326
2327 \f
2328 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
2329
2330 Copying and distribution of this file, with or without modification,
2331 are permitted in any medium without royalty provided the copyright
2332 notice and this notice are preserved.