OSDN Git Service

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