OSDN Git Service

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