1 2010-03-16 Fariborz Jahanian <fjahanian@apple.com>
4 * c-common.h (HasByrefArray): New decl.
5 * c-common.c (HasByrefArray): New definition.
6 * c-typeck.c (build_external_ref): Diagnose access of
9 2010-03-12 Jim Grosbach <grosbach@apple.com>
13 * expmed.c (synth_mult): Remove incorrect special case handling for
16 2010-03-12 Fariborz Jahanian <fjahanian@apple.com>
19 * c-parser.c (build_block_struct_initlist):
20 Set BLOCK_USE_STRET flag in block descriptor for
21 blocks which return their aggregate value in memory.
22 * c-common.h (BLOCK_USE_STRET): New flag.
24 2010-03-05 Fariborz Jahanian <fjahanian@apple.com>
27 * c-typeck.c (build_external_ref): Diagnose
28 importation of copied-in variables.
30 2009-03-12 Caroline Tice <ctice@apple.com>
33 * c-parser.c (c_parser_statement_after_labels): When
34 re-setting the expression location at the end, use the input
35 location for Block pointer assignments.
37 2009-02-11 Fariborz Jahanian <fjahanian@apple.com>
40 * c-decl.c (synth_block_byref_id_object_copy_func,
41 synth_block_byref_id_object_dispose_func): Set BLOCK_BYREF_CALLER
42 flag in call to copy/dispose helper functions.
43 * c-common.h (BLOCK_BYREF_CALLER): New flag.
45 2008-12-21 Caroline Tice <ctice@apple.com>
48 * cp/typeck.c (original_type): Stop if the type
49 and its DECL_ORIGINAL_TYPE are the same.
51 2008-12-18 Bill Wendling <wendling@apple.com>
54 * c-parser.c (build_block_struct_initlist): Changed type.
55 * cp/parser.c (build_block_struct_initlist): Ditto.
57 2008-12-02 Caroline Tice <ctice@apple.com>
60 * objcp/objcp-decl.h (TYPE_HAS_OBJCXX_INFO): New macro.
61 * objcp/objcp-lang.c (objcp-decl.h): New include statement, with
63 (LANG_HOOKS_IS_RUNTIME_SPECIFIC_TYPE): Redefine for
65 (objcxx_is_runtime_type): New function.
67 2008-12-02 Fariborz Jahanian <fjahanian@apple.com>
70 * funciton.h: Added new field.
71 * c-common.c (build_block_helper_name): Produce a unique
72 block number per each enclosing function when building
73 the block helper function name.
75 2008-11-18 Stuart Hastings <stuart@apple.com>
78 * tree.c (generic_block_literal_struct_type): Fix APPLE LOCAL.
79 * langhooks-def.h (lhd_build_generic_block_struct_type): Fix
82 2008-11-07 Fariborz Jahanian <fjahanian@apple.com>
85 * c-decl.c (synth_block_byref_id_object_copy_func): Takes a new
86 'flag' argument and generates the much simplified API.
87 (synth_block_byref_id_object_dispose_func): Ditto.
88 (new_block_byref_decl): Hack to prevent issuing bogus warning
89 on a field declared as __weak.
90 (init_byref_decl): Takes an additional 'flag' argument
91 and passes it down to synth_block_byref_id_object_copy_func and
92 synth_block_byref_id_object_dispose_func.
93 (finish_decl): Computes the flag for the block variable declaration.
94 * c-common.c (build_block_byref_release_decl,
95 build_block_byref_assign_copy_decl): Removed.
96 (build_block_byref_release_exp): Use the new API.
97 (build_block_object_assign_decl, build_block_object_assign_call_exp,
98 build_block_object_dispose_decl, build_block_object_dispose_call_exp): New.
99 (build_indirect_object_id_exp): Fixed a code gen bug which was exposed in
100 c/c++ mode, but not in ObjC/ObjC++ mode.
101 * c-common.h (build_block_object_assign_call_exp,
102 build_block_object_dispose_call_exp,
103 objc_is_gcable_type): New decls.
104 Declaration of several new flags.
105 (cast_to_pointer_to_id): Removed.
106 * stub-objc.c (objc_is_gcable_type): New
107 (copy_in_object, retain_block_component, release_block_component): Removed.
108 (cast_to_pointer_to_id): Removed.
109 * c-parser.c (build_block_struct_initlist): Remove call to copy_in_object.
110 (synth_copy_helper_block_func): Generates much simplified API.
111 (synth_destroy_helper_block_func): Ditto.
112 (block_object_dispose): Removed.
113 * config/darwin-c.c (darwin_cpp_builtins): Define __weak even when
116 2008-10-31 Fariborz Jahanian <fjahanian@apple.com>
119 * stub-objc.c (block_requires_copying): Object pointers with
120 NSObject attribute also require copy/release API.
121 * c-parser.c (synth_copy_helper_block_func): Use the new API
122 _Block_object_assign for ObjC object copying.
123 (block_object_dispose): New
124 (synth_destroy_helper_block_func): Call block_object_dispose
125 to use new _Block_object_dispose API for ObjC object release.
127 2008-10-27 Fariborz Jahanian <fjahanian@apple.com>
130 * c-typeck.c (objc_compare_types, objc_have_common_type):
131 Take an extra argument for better diagnostics.
132 * c-common.c (objc_compare_types, objc_have_common_type):
136 2008-10-24 Fariborz Jahanian <fjahanian@apple.com>
139 * cgraph.h (lower_if_nested_functions): New decl.
140 * tree-gimple.h (lower_nested_functions): Takes one more arg.
141 * cgraphunit.c (lower_if_nested_functions): New
142 * tree-nested.c (lower_nested_functions): Skip structors.
144 2008-10-24 Fariborz Jahanian <fjahanian@apple.com>
146 Radar 5847213 (minor tweak)
147 * c-decl.c (build_block_descriptor_type):
148 Make descriptor_ptr_type and descriptor_ptr_type_with_copydispose
151 2008-10-23 Caroline Tice <ctice@apple.com>
154 * tree.c(build_block_pointer_type): Add call to
155 build_generic_block_struct_type to initialize
156 generic_block_literal_struct_type if necessary.
157 * cp/parser.c (build_generic_block_struct_type): Update comments.
158 (build_block_struct_type): Remove call to
159 build_generic_block_struct_type.
160 (make_block_pointer_declarator): Likewise.
161 * c-decl.c (make_block_pointer_declarator): Likewise.
162 * c-parser.c (build_block_struct_type): Likewise.
163 (build_generic_block_struct_type): Update comments.
165 2008-10-22 Caroline Tice <ctice@apple.com>
167 Radar 6300081 & Radar 6163705
168 * tree.h (generic_block_literal_struct_type): Extern global variable
170 (build_generic_block_struct_type): New extern function decl.
171 * cp/parser (build_generic_block_struct_type): New function.
172 (build_block_struct_type): Call build_generic_block_struct_type
173 to initialize generic_block_literal_struct_type.
174 (make_block_pointer_declarator): Likewise.
175 (declare_block_prologue_local_vars): Temporarily set input_location
176 to 1 before the start of the block function; re-set input_location at
177 the end of this function.
178 * dwarf2out.c (add_type_attribute): If the type is a
179 BLOCK_POINTER_TYPE, assign it to be a pointer to a
180 generic_block_literal_struct_type.
181 * c-decl.c (make_block_pointer_declarator): Call
182 build_generic_block_struct_type to initialize
183 generic_block_literal_struct_type.
184 * c-common.c (generic_block_literal_struct_type): New global variable.
185 * c-parser.c (build_generic_block_struct_type): New function.
186 (build_block_struct_type): Call build_generic_block_struct_type
187 to initialize generic_block_literal_struct_type.
188 * testsuite/gcc.apple/block-debug-1.c: Fix test to work with new
189 compiler modifications.
190 * testsuite/gcc.apple/block-debug-2.c: Likewise.
191 * testsuite/g++.apple/block-debug-1.C: Likewise.
192 * testsuite/g++.apple/block-debug-2.C: Likewise.
194 2008-10-10 Fariborz Jahanian <fjahanian@apple.com>
196 Radar 5847213 - New Block ABI
197 * dwarf2out.c (add_type_attribute): Unusuable code
198 for radar 5811943 is removed.
199 * c-decl.c (build_block_byref_decl): Removed unneeded
200 build of block_original_byref_decl_list.
201 (build_block_internal_types): Removed.
202 (build_block_descriptor_type): New routine to build the descriptor type.
203 (make_block_pointer_declarator): Unused code is removed.
204 * c-typeck.c (build_block_call): New code gen for block calls.
205 * c-common.c (invoke_impl_ptr_type): Removed.
206 * c-common.h (block_original_byref_decl_list, build_block_internal_types): Removed
207 (build_block_descriptor_type, BLOCK_HAS_DESCRIPTOR): Decls added.
208 * c-parser.c (build_block_struct_type): Block literal expression internal type
209 is redeclared into its new layout.
210 (build_block_struct_initlist): Initializer list for above type is redone.
211 (build_descriptor_block_decl): New routine to declare the descriptor variable
212 (build_block_literal_tmp): Modified for the new type and initiazation.
214 2008-10-06 Fariborz Jahanian <fjahanian@apple.com>
217 * c-decl.c (check_for_loop_decls): Block helper function
218 is OK if declared in a for-loop main statement block.
220 2008-10-02 Fariborz Jahanian <fjahanian@apple.com>
223 * attribs.c (decl_attributes): Added support for adding attributes
224 on block pointer variable declarations.
225 * c-common.c (block_delta_format_args): Add
226 (any_recognized_block_attribute): Add
227 * c-common.h (any_recognized_block_attribute): New decl.
228 * c-parser.c (c_parser_block_literal_expr): Call to do the delta
231 2008-09-30 Fariborz Jahanian <fjahanian@apple.com>
234 * c-decl.c (build_block_byref_decl): Add __block vaiables
235 to intervening blocks.
237 2008-09-25 Fariborz Jahanian <fjahanian@apple.com>
240 * c-common.c (handle_noreturn_attribute): Add 'noreturn'
241 attribute to block pointer decls.
242 * c-parser.c (c_parser_block_literal_expr): Parse and set
243 attributes on block literals.
245 2008-09-25 Fariborz Jahanian <fjahanian@apple.com>
247 Radar 6244520 - minor addition
248 * c-common.c (build_indirect_object_id_exp): offset needs
249 be updated to accomodate addition of the new field.
251 2008-09-16 Fariborz Jahanian <fjahanian@apple.com>
254 * c-common: New flag BLOCK_HAS_CXX_OBJ replaces BLOCK_NO_COPY.
255 (BlockImportsCxxObjects): New field replaces BlockHasByrefVar.
256 * c-parser.c (build_block_struct_type): Remove setting of
259 2008-09-16 Fariborz Jahanian <fjahanian@apple.com>
262 * c-common.c (handle_blocks_attribute): Diagnose
263 vla __block declarations.
265 2008-09-12 Fariborz Jahanian <fjahanian@apple.com>
267 Radar 6212722 (tweak)
268 * c-decl.c (build_block_ref_decl): Use array_to_pointer_conversion
269 and function_to_pointer_conversion.
270 * c-typeck.c (array_to_pointer_conversion, function_to_pointer_conversion):
272 * c-common.h (array_to_pointer_conversion, function_to_pointer_conversion):
275 2008-09-09 Fariborz Jahanian <fjahanian@apple.com>
278 * c-commmon.c (build_block_helper_name): Fix bug in
279 block helper function name mangling.
281 2008-09-03 Fariborz Jahanian <fjahanian@apple.com>
284 * c-typeck.c (c_finish_return): Don't do block specific
285 stuff when block has a return type.
286 * c-common.h (block_sema_info): block_has_return_type is
288 * c-parser.c (c_parser_direct_declarator): Terminate type
289 parsing for block return types.
290 (c_parser_block_literal_expr): Added support to parse and
291 handle explicit return type for blocks.
293 2008-08-28 Fariborz Jahanian <fjahanian@apple.com>
296 * c-commmon.c (build_block_helper_name): New
297 * c-common.h (build_block_helper_name): New decl.
298 * c-parser.c (c_parser_block_literal_expr): Call
299 build_block_helper_name to build pretty helper function
302 2008-08-28 Fariborz Jahanian <fjahanian@apple.com>
305 * c-decl.c (synth_block_byref_id_object_copy_func): Different
306 API for copying __block declared objects in c.
307 (synth_block_byref_id_object_dispose_func): Different API
308 for releasing __block declared objects in c.
309 * c-common.c (block_byref_assign_copy_decl): New
310 (build_indirect_object_id_exp): Cast to 'id *' in objective-c
312 * c-common.h (build_block_byref_assign_copy_decl): New decl.
313 * c-parser.c (synth_copy_helper_block_func): Refactored code
314 to call build_block_byref_assign_copy_decl().
316 2008-08-24 Caroline Tice <ctice@apple.com>
318 Radars 6144664, 6145471, 6144634
319 c-decl.c (build_block_byref_decl): Assign the source
320 location for each byref decl to the source location of
321 the helper function decl.
322 (build_block_ref_decl): Ditto for ref decls.
324 2008-08-14 Fariborz Jahanian <fjahanian@apple.com>
327 * c-typeck.c (digest_init): Handler block as initializer.
328 (c_finish_return): check for completed block before
329 analyzing block's return expression.
330 * varasm.c (output_constant): Allow outputting block data.
331 * c-common.h (BLOCK_IS_GLOBAL): New flag.
332 (block_is_complete): New field in block data structure.
333 * c-parser.c (build_block_struct_initlist): New initializer and
334 flag for global block data.
335 (build_block_literal_tmp): Temporary data for global block is
336 declared as global static.
337 (c_parser_block_literal_expr): Removed diagnostics for global blocks.
338 Moved fixing helper function type earlier before its tree is built.
340 2008-08-06 Fariborz Jahanian <fjahanian@apple.com>
343 * c-decl.c (build_block_byref_decl): In the presence of nested "{"
344 move up the scope chain until reaching the main function body's scope.
346 2008-08-04 Fariborz Jahanian <fjahanian@apple.com>
348 Radar 6040305 - work in progress.
349 * c-decl.c (build_indirect_object_id_exp): Removed.
350 * c-common.c (build_indirect_object_id_exp): Added
351 * c-common.h (build_indirect_object_id_exp): New decl.
352 * config/darwin-c.c (darwin_cpp_builtins): Define __byref
355 2008-07-18 Fariborz Jahanian <fjahanian@apple.com>
357 Radar 6083129 - twiked
358 * c-decl.c (release_all_local_byrefs_at_return): Do not release
359 imported __byref variables in the block.
360 * c-parser.c (gen_block_byref_release_exp): Do not release __byref
361 variables outside of the block when returning from the block.
363 2008-07-15 Fariborz Jahanian <fjahanian@apple.com>
366 * c-decl.c (build_block_ref_decl): Insert copied in variable
367 in each enclosing block which does not use it.
368 (begin_block): Remove setting of "the_scope" field of the block.
369 (in_imm_block): Fix effect of changing the "the_scope" field.
370 (lookup_name_in_block): Do not skip over copied-in variables when
371 looking up a variable in the block.
372 * c-parser.c (c_parser_block_literal_expr): Set block's "the_scope" field
373 to the helper function's outer-most body scope.
375 2008-07-08 Fariborz Jahanian <fjahanian@apple.com>
378 * c-typeck.c (c_finish_return): Error on returning a block on the stack.
380 2008-06-05 Fariborz Jahanian <fjahanian@apple.com>
383 * c-typeck.c (types_are_closure_compatible): Nested block pointer
384 types must be considered when matching block types.
386 2008-06-05 Fariborz Jahanian <fjahanian@apple.com>
389 * c-parser.c (c_parser_objc_synch_compound_statement): New
390 (c_parser_objc_synchronized_statement): Call
391 c_parser_objc_synch_compound_statement.
393 2008-06-04 Fariborz Jahanian <fjahanian@apple.com>
396 * c-parser.c (c_parser_declaration_or_fndef): Better diagnostics for
397 a bad block definition.
399 2008-05-23 Fariborz Jahanian <fjahanian@apple.com>
402 * c-common.c (handle_nonnull_attribute): Support block pointer
403 just like a pointer for nonnull attribute.
404 (check_nonnull_arg): Ditto.
406 2008-05-20 Fariborz Jahanian <fjahanian@apple.com>
408 Radar 5932809 - minor change for runtime delight.
409 * c-parser.c (build_closure_struct_type): Add strcutor fields
410 for __byref 'id' object blocks as well.
411 (build_closure_struct_initlist): And their initializers.
413 2008-04-30 Caroline Tice <ctice@apple.com>
416 * c-decl.c: (declare_closure_prologue_local_vars): Set the source
417 location for the new decl expr statement to be the source location of
420 2008-04-25 Fariborz Jahanian <fjahanian@apple.com>
422 Radar 5803005 (tweaked)
423 * c-typeck.c (build_external_ref): Refactored global decl checks.
425 2008-04-24 Caroline Tice <ctice@apple.com>
428 * tree.h (TYPE_CLOSURE_IMPL_STRUCT): New macro.
429 (lang_flag_2): Use previously unused field in tree_type to indicate
431 * dwarf2out.c (c-common.h): New include statement.
432 (dwarf_attr_name): Add case for DW_AT_APPLE_closure.
433 (gen_variable_die): Give pointers to closures the
434 invoke_impl_ptr_type.
435 (gen_struct_or_union_type_die): Add DW_AT_APPLE_closure
436 to structs that define closures.
437 * dwarf2.h (DW_AT_APPLE_closure): New Dwarf attribute.
438 * c-typeck.c (invoke_impl_ptr_type): Move declaration from here to
440 (build_closure_internal_types): Set TYPE_CLOSURE_IMPL_STRUCT
441 flag for closure structs.
442 * c-common.c (invoke_impl_ptr_type): Move declaration to here from
445 2008-04-23 Fariborz Jahanian <fjahanian@apple.com>
448 * c-typeck.c (types_are_closure_compatible): Check for underlying
449 pointer types as well.
451 2008-04-15 Stuart Hastings <stuart@apple.com>
454 * tree.h (PTR_OR_REF_CHECK, POINTER_TYPE_P): Add
455 CLOSURE_POINTER_TYPE.
456 * fold-const.c (fold_convert): Add CLOSURE_POINTER_TYPE.
457 * testsuite/gcc.apple/closure-5862465.c: New.
459 2008-03-31 Fariborz Jahanian <fjahanian@apple.com>
462 * c-typeck.c (convert_for_assignment): Block and 'id' types
465 2008-03-28 Fariborz Jahanian <fjahanian@apple.com>
468 * convert.c (convert_to_pointer): Allow typecast of closure
470 (convert_to_closure_pointer): Allow typecast of 'id'
471 of a closure pointer expression.
473 2008-03-25 Fariborz Jahanian <fjahanian@apple.com>
475 Radar 5811887 (minor change)
476 * c-opts.c (c_common_post_options): Remove conditional check
477 of pedantic when setting flag_blocks.
479 2008-03-24 Fariborz Jahanian <fjahanian@apple.com>
482 * c-cppbuiltin.c: flag_closures renamed to flag_blocks
484 * c.opt: flag_closures renamed to flag_blocks. flag_blocks
486 * c-opts.c (c_common_post_options): All flavors of c99, blocks are off by
487 default unless requested via -fblocks.
489 2008-03-24 Fariborz Jahanian <fjahanian@apple.com>
492 * c-tree.h (make_closure_pointer_declarator): Takes
494 * c-decl.c (grokdeclarator): Get 'const'-ness of closure
496 (make_closure_pointer_declarator): Takes additional argument for
498 * c-parser.c (c_parser_declarator): Pass down attribute info.
499 to make_closure_pointer_declarator.
501 2008-03-20 Fariborz Jahanian <fjahanian@apple.com>
504 * c-common.h (objc_build_property_getter_func_call): New decl.
505 * stub-objc.c (objc_build_property_getter_func_call): New stub.
507 2008-03-18 Fariborz Jahanian <fjahanian@apple.com>
510 * c-decl.c (add_closure_global_byref_list,
511 in_closure_global_byref_list): New defs.
512 * c-common.h (add_closure_global_byref_list,
513 in_closure_global_byref_list): New decls.
514 * c-typeck.c (build_external_ref): global variables
515 declared as 'byref' are enterred in their own list
516 of such declarations per each closure.
517 * c-parser.c (c_parser_postfix_expression): Remove previous fix.
518 (c_parser_closure_byref_declaration): Check for global
519 'byref' by calling in_closure_global_byref_list.
521 2008-03-13 Fariborz Jahanian <fjahanian@apple.com>
524 * c-typeck.c: Renamed typesAreClosureCompatible to
525 types_are_closure_compatible.
527 2008-03-11 Fariborz Jahanian <fjahanian@apple.com>
529 Radar 5732232 (Related to change of command option/macro)
530 * c-cppbuiltin.c: __CLOSURES__ macro rename __BLOCKS__
531 * c.opt: -fclosures change to -fblocks.
533 2008-03-10 Fariborz Jahanian <fjahanian@apple.com>
535 Radar 5782740 - part 2 (bug fix).
536 * c-parser.c (synth_copy_helper_closure,
537 synth_destroy_helper_closure): set DECL_ARG_TYPE field of input
538 arguments for the two synthesized helper functions.
540 2008-02-21 Caroline Tice <ctice@apple.com>
543 * objc/objc-act.c (objc_finish_message_expr): Find
544 the record-type tree from the class interface, and mark the record
545 type as used, for emitting debug info.
546 * cp/cp-objcp-common.c (c_return_interface_record_type): New function.
547 * cp/cp-tree.h (c_return_interface_record_type): New extern function
549 * c-tree.h (c_return_interface_record_type): Likewise
550 * c-decl.c (c_return_interface_record_type): New function.
552 2007-08-22 Fariborz Jahanian <fjahanian@apple.com>
555 * c-common.h (objc_declare_protocols, objc_start_protocol): Decl changed.
556 * stub-objc.c (objc_declare_protocols, objc_start_protocol): Changed.
557 * c-parser.c (c_parser_external_declaration): Call to
558 c_parser_objc_protocol_definition takes additional argument.
559 (c_parser_declaration_or_fndef): Protocols with attributes are processed
560 here by passing it to c_parser_objc_protocol_definition.
561 (c_parser_objc_protocol_definition): Takes additional argument and passes
562 it to objc_declare_protocols or objc_start_protocol.
564 2007-07-13 Fariborz Jahanian <fjahanian@apple.com>
567 * c-parser.c (c_parser_next_token_starts_declspecs): Exclude
568 objc2's property dot-syntax as a declarator.
569 (c_parser_postfix_expression): Convert property dot-syntax on
570 class objects into a property reference expression.
572 2007-07-10 Fariborz Jahanian <fjahanian@apple.com>
575 * tree.h (CALL_EXPR_OBJC_PROPERTY_GETTER): Macro removed.
576 * c-typeck.c (build_component_ref): Call
577 objc_build_property_reference_expr instead of objc_build_getter_call.
578 (build_modify_expr): Call objc_property_reference_expr instead of
580 * c-common.h (objc_build_getter_call, objc_property_call): Decl removed.
581 (objc_build_property_reference_expr, objc_property_reference_expr): Decl.
583 * stub-objc.c (objc_build_getter_call, objc_property_call): Stub removed.
584 (objc_build_property_reference_expr, objc_property_reference_expr):
587 2007-06-29 Fariborz Jahanian <fjahanian@apple.com>
590 * c-parser.c (c_parser_binary_expression) : objc_generate_weak_read
591 replaced with call to objc_build_weak_reference_tree
592 * c-typeck.c (build_modify_expr, c_objc_common_truthvalue_conversion):
593 objc_remove_weak_read replaced with call to objc_weak_reference_expr.
594 * c-common.h (objc_weak_reference_expr,
595 objc_build_weak_reference_tree) : New decl.
596 (objc_generate_weak_read, objc_remove_weak_read): remove.
597 * stub-objc.c (objc_weak_reference_expr,
598 objc_build_weak_reference_tree): New stub.
599 (objc_generate_weak_read, objc_remove_weak_read): remove.
601 2007-05-23 Fariborz Jahanian <fjahanian@apple.com>
604 * c-format.c (handle_format_arg_attribute): Check for NSString *
605 and CFStringRef as valid formatting types.
606 (check_format_string): Ditto.
607 * c-common.h (objc_check_format_nsstring,
608 objc_check_cfstringref_type): New decls.
609 * stub-objc.c (objc_check_nsstring_pointer_type): New stub.
610 * config/darwin-c.c (objc_check_cfstringref_type): New
611 (objc_check_format_cfstring): Call objc_check_cfstringref_type
612 for valid CFStringRef argument type.
613 * config/darwin-protos.h (objc_check_cfstringref_type): New decl.
614 * config/darwin.h (CFSTRING_TYPE_CHECK): New macro.
616 2007-05-18 Fariborz Jahanian <fjahanian@apple.com>
619 * c-common.h (objc_anonymous_local_objc_name): New decl.
620 * config/darwin-protos.h (objc_anonymous_local_objc_name): Decl.
621 * stub-objc.c (objc_anonymous_local_objc_name): New stub.
622 * config/darwin.h (ASM_OUTPUT_LABELREF) Call
623 objc_anonymous_local_objc_name.
625 2007-05-07 Fariborz Jahanian <fjahanian@apple.com>
628 * c-common.h (objc_build_keyword_decl): Takes a new argument.
629 * stub-objc.c (objc_build_keyword_decl): Ditto.
630 * c-parser.c (c_parser_objc_method_decl): Recognize optional
631 method's argument attribute.
632 (c_parser_objc_method_decl): Handle errornous selector.
634 2007-05-02 Fariborz Jahanian <fjahanian@apple.com>
637 * c-typeck.c (convert_for_assignment): Remove synthesized 'volatile'
638 type before doing type comparison.
640 2007-03-29 Fariborz Jahanian <fjahanian@apple.com>
643 * c-parse.c (c_parser_objc_class_instance_variables): Add @package
645 * c-common.h (RID_AT_PACKAGE): Add
647 2007-03-29 Fariborz Jahanian <fjahanian@apple.com>
649 Radar 4947014 - objc atomic property
650 * c-common.h (RID_NONATOMIC): Add
651 * c-parse.c (c_parser_objc_property_attribute) : Recognize 'nonatomic'
654 2007-03-23 Fariborz Jahanian <fjahanian@apple.com>
657 * c-format.c (enum format_type): New entry for NSString format.
658 (format_typ): Has a new entry for NSString format.
659 (decode_format_attr): Error on use of NSString format on a
660 non-objective-c program.
661 (objc_check_nsformat_arg): New.
662 (check_format_info): Call back for NSString is objc_check_nsformat_arg
663 (handle_format_attribute): Use objc_check_format_nsstring for
665 * c-common.h (objc_NSString_format): New decl.
666 (objc_check_format_nsstring): New decl.
667 * stub-objc.c (objc_NSString_format, objc_check_format_nsstring): New
669 * config/darwin-protos.h (darwin_cfstring_type_node): New decl.
670 * config/darwin.c (darwin_cfstring_type_node): New
671 * config/darwin.h (TARGET_CFSTRING_P): New macro
673 2007-03-23 Fariborz Jahanian <fjahanian@apple.com>
676 * c-format.c (enum format_type): New entry for NSString format.
677 (format_typ): Has a new entry for NSString format.
678 (decode_format_attr): Error on use of NSString format on a
679 non-objective-c program.
680 (objc_check_nsformat_arg): New.
681 (check_format_info): Call back for NSString is objc_check_nsformat_arg
682 (handle_format_attribute): Use objc_check_format_nsstring for
684 * c-common.h (objc_NSString_format): New decl.
685 (objc_check_format_nsstring): New decl.
686 * stub-objc.c (objc_NSString_format, objc_check_format_nsstring): New
688 * config/darwin-protos.h (darwin_cfstring_type_node): New decl.
689 * config/darwin.c (darwin_cfstring_type_node): New
690 * config/darwin.h (TARGET_CFSTRING_P): New macro
692 2007-03-22 Fariborz Jahanian <fjahanian@apple.com>
695 * c-parser.c (c_parser_objc_class_definition): Add supprt for anonymous
698 2007-03-21 Fariborz Jahanian <fjahanian@apple.com>
701 * c-parser.c (c_parser_objc_try_catch_statement): Parse @catch(...).
702 * c.opt: Add -fobjc-zerocost-exceptions option.
703 * c-opts.c (c_common_post_options): Set the flags for
704 -fobjc-zerocost-exceptions.
705 * c-common.h: Add some declarations.
706 * stub-objc.c (objc2_valid_objc_catch_type, objc2_build_throw_call):
708 * config/darwin.h (OBJC_FLAG_OBJC_ABI): Check for proper
709 use of -fobjc-zerocost-exceptions option.
711 2006-11-06 Fariborz Jahanian <fjahania@apple.com>
713 Radar 4781080 (part 2)
714 * targhooks.c (default_objc_fpreturn_msgcall): Takes 2nd argument.
715 * targhooks.h (default_objc_fpreturn_msgcall): Changed Decl.
716 * target.h (objc_fpreturn_msgcall): Changed Decl.
717 * config/i386/i386.h (OBJC_FPRETURN_MSGCALL): Changed Decl.
718 * config/i386/i386-protos.h (ix86_objc_fpreturn_msgcall): Changed Decl.
719 * config/i386/i386.c (ix86_objc_fpreturn_msgcall): Changed definition.
720 2006-09-15 Fariborz Jahanian <fjahania@apple.com>
723 * c-common.c (handle_noreturn_attribute): Handle method_decl
726 2006-09-01 Fariborz Jahanian <fjahania@apple.com>
729 * c-common.h (objc_build_incr_decr_setter_call): New decl.
730 * stub-objc.c (objc_build_incr_decr_setter_call): New stub.
731 * c-typeck.c (build_unary_op): Call objc_build_incr_decr_setter_call
732 for potential ince/decr pre/post expressions involving properties.
734 2006-08-31 Fariborz Jahanian <fjahanian@apple.com>
737 * c-common.h (objc_volatilize_component_ref): New decl.
738 * c-typeck.c (build_component_ref): Call objc_volatilize_component_ref.
739 * stub-objc.c (objc_volatilize_component_ref): New stub.
741 2006-07-18 Fariborz Jahanian <fjahanian@apple.com>
744 * c-decl.c (finish_struct): Check on illegal use of __weak
746 * decl.c (start_decl): Check on illegal use of __weak on
747 variable declarations.
748 * stub-objc.c (objc_checkon_weak_attribute): New stub.
749 * c-common.h (objc_checkon_weak_attribute): New decl.
751 2006-06-26 Fariborz Jahanian <fjahanian@apple.com>
754 * c-parse.in: New/modified grammar for new attributes in
756 (yylexname): Change to recognize new attribute terminals.
757 * c-common.h (RID_DYNAMIC): New enum declaration.
759 2006-07-14 Fariborz Jahanian <fjahanian@apple.com>
762 * c-parse.in: Added 'weak' attribute keyword for @property.
763 * c-common.h: 'weak' related declarations.
765 2006-05-18 Fariborz Jahanian <fjahanian@apple.com>
767 Radar 4548636 (objc attributes on class)
768 * c-parse.in: Add attribute non-terminal before
770 * c-common.h (objc_start_class_interface): New argument added.
771 * stub-objc.c (objc_start_class_interface): Ditto.
773 2006-05-16 Fariborz Jahanian <fjahanian@apple.com>
776 * c-gimplify.c (obj_reuse_bc_block): Removed.
777 (objc_pop_label, objc_push_label): New.
778 (gimplify_c_loop): Fix up foreach's innerloop break label.
780 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
782 Radar 3803157 (method attributes)
783 * c-parse.in: Add grammar support for declaring
784 attribute for objc methods.
785 * c-common.c (handle_deprecated_attribute): Recognize
786 objc methods as valid declarations.
787 (handle_unavailable_attribute): Ditto.
788 * c-common.h: Bunch of new extern declarations.
789 * stub-objc.c (objc_add_method_declaration, objc_start_method_definition):
791 (objc_method_decl): New stub.
793 2006-04-12 Fariborz Jahanian <fjahanian@apple.com>
796 * c-common.h (objc_type_valid_for_messaging): Declare.
797 * stub-objc.c (objc_type_valid_for_messaging): New stub.
799 2006-04-06 Fariborz Jahanian <fjahanian@apple.com>
802 (Missing copies attribute)
803 * c-parse.in: Add grammer for 'copies' attribute.
804 * c-common.h (RID_COPIES): New enumerator.
806 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
809 * c-common.h (objc_diagnose_private_ivar): New decl.
810 * stub-objc.c (objc_diagnose_private_ivar): New stub.
811 * c-decl.c (undeclared_variable): Issue disnostic on
812 private 'ivar' access.
814 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
817 * c-typeck.c (convert_arguments): function name must come from 'selector'
818 when diagnosing 'too many arguments'.
820 2006-03-23 Fariborz Jahanian <fjahanian@apple.com>
823 * c-typeck.c (convert_for_assignment): Remove Objective-C EH machinery
824 'volatile' qualifier before doing type comparison.
826 2006-02-28 Fariborz Jahanian <fjahanian@apple.com>
829 * c-common.h (objc_v2_bitfield_ivar_bitpos): New decl.
830 * expr.h (objc_v2_bitfield_ivar_bitpos): New decl.
831 * stub-objc.c (objc_v2_bitfield_ivar_bitpos): New stub.
832 * expr.c (get_inner_reference): Compute ivar's bitfield bit offset.
834 2006-02-15 Fariborz Jahanian <fjahanian@apple.com>
837 * c-common.def (DO_STMT): Takes an extra argument.
839 2006-02-02 Fariborz Jahanian <fjahanian@apple.com>
842 * c-parse.in (cast_expr): generate objc_read_weak call on
843 each __weak object in the expession.
844 * c-typeck.c (build_modify_expr): Undo the call to objc_read_weak
846 * c-objc-common.c (c_objc_common_truthvalue_conversion): Generate
847 objc_read_weak call before generating tree for !exp, etc.
848 * c-common.h (objc_generate_weak_read, objc_remove_weak_read): New decl.
849 * stub-objc.c (objc_generate_weak_read, objc_remove_weak_read): New stubs.
851 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
854 * c-typeck.c (build_conditional_expr): Call objc_have_common_type when
855 looking for objective-c common pointer types.
856 * c-common.h objc_have_common_type): New declaration.
857 * stub-objc.c (objc_have_common_type): New stub.
859 2005-12-05 Mike Stump <mrs@apple.com>
862 * doc/invoke.texi (C Dialect Options): Improve -fnested-functions wording.
863 * doc/extend.texi (Nested Functions): Note that on darwin nested
864 functions are off by default.
866 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
870 * c-common.h (objc_non_volatilized_type): New declaration
871 * stub-objc.c (objc_non_volatilized_type): New stub.
873 2005-10-12 Fariborz Jahanian <fjahanian@apple.com>
877 * c-common.h (objc_get_interface_ivars): New declaration
878 (objc_detect_field_duplicates): Ditto.
879 * c-decl.c (finish_struct): Check for duplicate among
880 flattened fields if objective-c.
881 * stub-objc.c (objc_get_interface_ivars): New stub.
882 (objc_detect_field_duplicates): Ditto.
884 2005-09-28 Devang Patel <dpatel@apple.com>
887 * c-parse.in (nested_function): Report an error, instead of a warning.
888 (nontype_nested_function): Same.
889 * c.opt (Wnested-funcs): Remove.
890 * doc/invoke.texi: Remove Wnested-funcs documentations.
892 2005-08-03 Fariborz Jahanian <fjahanian@apple.com>
895 * c-typeck.c (pop_init_level): Issue diagnostic on non-constant
898 2005-06-22 Ziemowit Laski <zlaski@apple.com>
901 * c-common.h (objc_common_type): New prototype.
902 * c-typeck.c (build_conditional_expr): For two ObjC pointer types,
903 use their ObjC common type.
904 * stub-objc.c (objc_common_type): New stub.
906 /* APPLE LOCAL merge marger */
907 /* Stuff under is in fsf mainline, but not in the 4.2 branch */
909 2007-08-02 Geoffrey Keating <geoffk@apple.com>
911 Radar 3274130, 5295549
912 * c-parser.c (c_parser_while_statement): Handle attributes.
913 (c_parser_do_statement): Handle attributes.
914 (c_parser_for_statement): Handle attributes.
915 * c-common.c (handle_unused_attribute): Warn if a statement
917 * c-tree.h (c_finish_loop): Add extra parameter.
918 * c-typeck.c (c_finish_loop): Handle attributes.
919 * doc/extend.texi (Attribute Syntax): Document statement attributes.
920 (Label Attributes): Explain how they apply to statements.
921 * tree-cfg.c (cleanup_dead_labels): Preserve labels with
922 user-specified alignment or attributes.
923 * stmt.c (expand_label): Update and correct documentation.
925 * c-common.c (handle_aligned_attribute): Handle LABEL_DECL.
926 * rtl.def (CODE_LABEL): Add 8th operand.
927 * rtl.h (LABEL_ALIGN_LOG): New.
928 (LABEL_MAX_SKIP): New.
929 (SET_LABEL_ALIGN): New.
930 * emit-rtl.c (gen_label_rtx): Adjust.
931 * print-rtl.c (print_rtx): Print LABEL_ALIGN_LOG.
932 * stmt.c (label_rtx): Set CODE_LABEL's alignment from DECL_ALIGN.
933 (expand_label): Update documentation.
934 * final.c (struct label_alignment): Delete.
935 (label_align): Delete.
936 (min_labelno): Delete.
937 (max_labelno): Delete.
938 (LABEL_TO_ALIGNMENT): Delete.
939 (LABEL_TO_MAX_SKIP): Delete.
940 (label_to_alignment): Adjust for LABEL_ALIGN_LOG.
941 (align_fuzz): Likewise.
942 (compute_alignments): Likewise.
943 (shorten_branches): Remove code to set up label_align.
944 Adjust for LABEL_ALIGN_LOG.
945 (final_scan_insn): Adjust for LABEL_ALIGN_LOG.
946 * doc/extend.texi (C Extensions): Add 'Label Attributes' to menu.
947 (Attribute Syntax): Move label content to Label Attributes.
948 (Function Attributes): Mention label attributes.
949 (Variable Attributes): Mention label attributes.
950 (Type Attributes): Mention label attributes.
951 (Label Attributes): New.