ChangeLog.apple revision 303975
12010-03-16 Fariborz Jahanian <fjahanian@apple.com> 2 3 Radar 7760213 4 * c-common.h (HasByrefArray): New decl. 5 * c-common.c (HasByrefArray): New definition. 6 * c-typeck.c (build_external_ref): Diagnose access of 7 __block array. 8 92010-03-12 Jim Grosbach <grosbach@apple.com> 10 11 Radar 7744816 12 13 * expmed.c (synth_mult): Remove incorrect special case handling for 14 0xffffffff. 15 162010-03-12 Fariborz Jahanian <fjahanian@apple.com> 17 18 Radar 7735196 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. 23 242010-03-05 Fariborz Jahanian <fjahanian@apple.com> 25 26 Radar 7721728 27 * c-typeck.c (build_external_ref): Diagnose 28 importation of copied-in variables. 29 302009-03-12 Caroline Tice <ctice@apple.com> 31 32 Radar 6144634 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. 36 372009-02-11 Fariborz Jahanian <fjahanian@apple.com> 38 39 Radar 6573923 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. 44 452008-12-21 Caroline Tice <ctice@apple.com> 46 47 Radar 6455678 48 * cp/typeck.c (original_type): Stop if the type 49 and its DECL_ORIGINAL_TYPE are the same. 50 512008-12-18 Bill Wendling <wendling@apple.com> 52 53 Radar 6457359 54 * c-parser.c (build_block_struct_initlist): Changed type. 55 * cp/parser.c (build_block_struct_initlist): Ditto. 56 572008-12-02 Caroline Tice <ctice@apple.com> 58 59 Radar 6386976 60 * objcp/objcp-decl.h (TYPE_HAS_OBJCXX_INFO): New macro. 61 * objcp/objcp-lang.c (objcp-decl.h): New include statement, with 62 required define. 63 (LANG_HOOKS_IS_RUNTIME_SPECIFIC_TYPE): Redefine for 64 obj-c++. 65 (objcxx_is_runtime_type): New function. 66 672008-12-02 Fariborz Jahanian <fjahanian@apple.com> 68 69 Radar 6411649 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. 74 752008-11-18 Stuart Hastings <stuart@apple.com> 76 77 Radar 6353006 78 * tree.c (generic_block_literal_struct_type): Fix APPLE LOCAL. 79 * langhooks-def.h (lhd_build_generic_block_struct_type): Fix 80 APPLE LOCAL. 81 822008-11-07 Fariborz Jahanian <fjahanian@apple.com> 83 84 Radar 5847976 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 114 -fobjc-gc is off. 115 1162008-10-31 Fariborz Jahanian <fjahanian@apple.com> 117 118 Radar 6175959 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. 126 1272008-10-27 Fariborz Jahanian <fjahanian@apple.com> 128 129 Radar 6231433 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): 133 Take extra argument. 134 * stub-objc.c: Ditto 135 1362008-10-24 Fariborz Jahanian <fjahanian@apple.com> 137 138 Radar 6305545 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. 143 1442008-10-24 Fariborz Jahanian <fjahanian@apple.com> 145 146 Radar 5847213 (minor tweak) 147 * c-decl.c (build_block_descriptor_type): 148 Make descriptor_ptr_type and descriptor_ptr_type_with_copydispose 149 visible to pch. 150 1512008-10-23 Caroline Tice <ctice@apple.com> 152 153 Radar 6300081 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. 164 1652008-10-22 Caroline Tice <ctice@apple.com> 166 167 Radar 6300081 & Radar 6163705 168 * tree.h (generic_block_literal_struct_type): Extern global variable 169 decl. 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. 193 1942008-10-10 Fariborz Jahanian <fjahanian@apple.com> 195 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. 213 2142008-10-06 Fariborz Jahanian <fjahanian@apple.com> 215 216 Radar 6268817 217 * c-decl.c (check_for_loop_decls): Block helper function 218 is OK if declared in a for-loop main statement block. 219 2202008-10-02 Fariborz Jahanian <fjahanian@apple.com> 221 222 Radar 6246527 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 229 on printf attribute. 230 2312008-09-30 Fariborz Jahanian <fjahanian@apple.com> 232 233 Radar 6225809 234 * c-decl.c (build_block_byref_decl): Add __block vaiables 235 to intervening blocks. 236 2372008-09-25 Fariborz Jahanian <fjahanian@apple.com> 238 239 Radar 6237713 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. 244 2452008-09-25 Fariborz Jahanian <fjahanian@apple.com> 246 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. 250 2512008-09-16 Fariborz Jahanian <fjahanian@apple.com> 252 253 Radar 6214617 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 257 BLOCK_NO_COPY flag. 258 2592008-09-16 Fariborz Jahanian <fjahanian@apple.com> 260 261 Radar 6217257 262 * c-common.c (handle_blocks_attribute): Diagnose 263 vla __block declarations. 264 2652008-09-12 Fariborz Jahanian <fjahanian@apple.com> 266 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): 271 Made them global. 272 * c-common.h (array_to_pointer_conversion, function_to_pointer_conversion): 273 Declare. 274 2752008-09-09 Fariborz Jahanian <fjahanian@apple.com> 276 277 Radar 6169580 278 * c-commmon.c (build_block_helper_name): Fix bug in 279 block helper function name mangling. 280 2812008-09-03 Fariborz Jahanian <fjahanian@apple.com> 282 283 Radar 6185344 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 287 a new field. 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. 292 2932008-08-28 Fariborz Jahanian <fjahanian@apple.com> 294 295 Radar 6160536 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 300 name. 301 3022008-08-28 Fariborz Jahanian <fjahanian@apple.com> 303 304 Radar 6180456 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 311 mode only. 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(). 315 3162008-08-24 Caroline Tice <ctice@apple.com> 317 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. 323 3242008-08-14 Fariborz Jahanian <fjahanian@apple.com> 325 326 Radar 5822844 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. 339 3402008-08-06 Fariborz Jahanian <fjahanian@apple.com> 341 342 Radar 6014138 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. 345 3462008-08-04 Fariborz Jahanian <fjahanian@apple.com> 347 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 353 in c++ mode as well. 354 3552008-07-18 Fariborz Jahanian <fjahanian@apple.com> 356 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. 362 3632008-07-15 Fariborz Jahanian <fjahanian@apple.com> 364 365 Radar 5988451 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. 374 3752008-07-08 Fariborz Jahanian <fjahanian@apple.com> 376 377 Radar 6048570 378 * c-typeck.c (c_finish_return): Error on returning a block on the stack. 379 3802008-06-05 Fariborz Jahanian <fjahanian@apple.com> 381 382 Radar 5988995 383 * c-typeck.c (types_are_closure_compatible): Nested block pointer 384 types must be considered when matching block types. 385 3862008-06-05 Fariborz Jahanian <fjahanian@apple.com> 387 388 Radar 5982990 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. 392 3932008-06-04 Fariborz Jahanian <fjahanian@apple.com> 394 395 Radar 5985368 396 * c-parser.c (c_parser_declaration_or_fndef): Better diagnostics for 397 a bad block definition. 398 3992008-05-23 Fariborz Jahanian <fjahanian@apple.com> 400 401 Radar 5925781 402 * c-common.c (handle_nonnull_attribute): Support block pointer 403 just like a pointer for nonnull attribute. 404 (check_nonnull_arg): Ditto. 405 4062008-05-20 Fariborz Jahanian <fjahanian@apple.com> 407 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. 412 4132008-04-30 Caroline Tice <ctice@apple.com> 414 415 Radar 5811961 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 418 the decl tree. 419 4202008-04-25 Fariborz Jahanian <fjahanian@apple.com> 421 422 Radar 5803005 (tweaked) 423 * c-typeck.c (build_external_ref): Refactored global decl checks. 424 4252008-04-24 Caroline Tice <ctice@apple.com> 426 427 Radar 5811943 428 * tree.h (TYPE_CLOSURE_IMPL_STRUCT): New macro. 429 (lang_flag_2): Use previously unused field in tree_type to indicate 430 closure structs. 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 439 c-common.c 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 443 c-typeck.c. 444 4452008-04-23 Fariborz Jahanian <fjahanian@apple.com> 446 447 Radar 5882266 448 * c-typeck.c (types_are_closure_compatible): Check for underlying 449 pointer types as well. 450 4512008-04-15 Stuart Hastings <stuart@apple.com> 452 453 Radar 5862465 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. 458 4592008-03-31 Fariborz Jahanian <fjahanian@apple.com> 460 461 Radar 5831855 462 * c-typeck.c (convert_for_assignment): Block and 'id' types 463 are interchangeable. 464 4652008-03-28 Fariborz Jahanian <fjahanian@apple.com> 466 467 Radar 5809099 468 * convert.c (convert_to_pointer): Allow typecast of closure 469 pointer to 'id'. 470 (convert_to_closure_pointer): Allow typecast of 'id' 471 of a closure pointer expression. 472 4732008-03-25 Fariborz Jahanian <fjahanian@apple.com> 474 475 Radar 5811887 (minor change) 476 * c-opts.c (c_common_post_options): Remove conditional check 477 of pedantic when setting flag_blocks. 478 4792008-03-24 Fariborz Jahanian <fjahanian@apple.com> 480 481 Radar 5811887 482 * c-cppbuiltin.c: flag_closures renamed to flag_blocks 483 * c-parser.c: Ditto. 484 * c.opt: flag_closures renamed to flag_blocks. flag_blocks 485 defaulted to -1. 486 * c-opts.c (c_common_post_options): All flavors of c99, blocks are off by 487 default unless requested via -fblocks. 488 4892008-03-24 Fariborz Jahanian <fjahanian@apple.com> 490 491 Radar 5814025 492 * c-tree.h (make_closure_pointer_declarator): Takes 493 additional argument. 494 * c-decl.c (grokdeclarator): Get 'const'-ness of closure 495 pointer. 496 (make_closure_pointer_declarator): Takes additional argument for 497 const/volatile. 498 * c-parser.c (c_parser_declarator): Pass down attribute info. 499 to make_closure_pointer_declarator. 500 5012008-03-20 Fariborz Jahanian <fjahanian@apple.com> 502 503 Radar 5802025 504 * c-common.h (objc_build_property_getter_func_call): New decl. 505 * stub-objc.c (objc_build_property_getter_func_call): New stub. 506 5072008-03-18 Fariborz Jahanian <fjahanian@apple.com> 508 509 Radar 5803600 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. 520 5212008-03-13 Fariborz Jahanian <fjahanian@apple.com> 522 523 Radar 5795493 524 * c-typeck.c: Renamed typesAreClosureCompatible to 525 types_are_closure_compatible. 526 5272008-03-11 Fariborz Jahanian <fjahanian@apple.com> 528 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. 532 5332008-03-10 Fariborz Jahanian <fjahanian@apple.com> 534 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. 539 5402008-02-21 Caroline Tice <ctice@apple.com> 541 542 Radar 5741070 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 548 declaration. 549 * c-tree.h (c_return_interface_record_type): Likewise 550 * c-decl.c (c_return_interface_record_type): New function. 551 5522007-08-22 Fariborz Jahanian <fjahanian@apple.com> 553 554 Radar 4947311 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. 563 5642007-07-13 Fariborz Jahanian <fjahanian@apple.com> 565 566 Radar 5277239 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. 571 5722007-07-10 Fariborz Jahanian <fjahanian@apple.com> 573 574 Radar 5285911 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 579 objc_property_call. 580 * c-common.h (objc_build_getter_call, objc_property_call): Decl removed. 581 (objc_build_property_reference_expr, objc_property_reference_expr): Decl. 582 added. 583 * stub-objc.c (objc_build_getter_call, objc_property_call): Stub removed. 584 (objc_build_property_reference_expr, objc_property_reference_expr): 585 Stub added. 586 5872007-06-29 Fariborz Jahanian <fjahanian@apple.com> 588 589 Radar 5276085 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. 600 6012007-05-23 Fariborz Jahanian <fjahanian@apple.com> 602 603 Radar 5195402 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. 615 6162007-05-18 Fariborz Jahanian <fjahanian@apple.com> 617 618 Radar 5202926 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. 624 6252007-05-07 Fariborz Jahanian <fjahanian@apple.com> 626 627 Radar 4157812 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. 633 6342007-05-02 Fariborz Jahanian <fjahanian@apple.com> 635 636 Radar 4502186 637 * c-typeck.c (convert_for_assignment): Remove synthesized 'volatile' 638 type before doing type comparison. 639 6402007-03-29 Fariborz Jahanian <fjahanian@apple.com> 641 642 Radar 4564694 643 * c-parse.c (c_parser_objc_class_instance_variables): Add @package 644 support to syntax. 645 * c-common.h (RID_AT_PACKAGE): Add 646 6472007-03-29 Fariborz Jahanian <fjahanian@apple.com> 648 649 Radar 4947014 - objc atomic property 650 * c-common.h (RID_NONATOMIC): Add 651 * c-parse.c (c_parser_objc_property_attribute) : Recognize 'nonatomic' 652 as new property. 653 6542007-03-23 Fariborz Jahanian <fjahanian@apple.com> 655 656 Radar 4985544 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 664 NSString format. 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 668 stubs. 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 672 6732007-03-23 Fariborz Jahanian <fjahanian@apple.com> 674 675 Radar 4985544 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 683 NSString format. 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 687 stubs. 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 691 6922007-03-22 Fariborz Jahanian <fjahanian@apple.com> 693 694 Radar 4965989 695 * c-parser.c (c_parser_objc_class_definition): Add supprt for anonymous 696 category syntax. 697 6982007-03-21 Fariborz Jahanian <fjahanian@apple.com> 699 700 Radar 2848255 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): 707 New stubs. 708 * config/darwin.h (OBJC_FLAG_OBJC_ABI): Check for proper 709 use of -fobjc-zerocost-exceptions option. 710 7112006-11-06 Fariborz Jahanian <fjahania@apple.com> 712 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. 7202006-09-15 Fariborz Jahanian <fjahania@apple.com> 721 722 Radar 4727659 723 * c-common.c (handle_noreturn_attribute): Handle method_decl 724 nodes as well. 725 7262006-09-01 Fariborz Jahanian <fjahania@apple.com> 727 728 Radar 4712269 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. 733 7342006-08-31 Fariborz Jahanian <fjahanian@apple.com> 735 736 Radar 4697411 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. 740 7412006-07-18 Fariborz Jahanian <fjahanian@apple.com> 742 743 Radar 4592503 744 * c-decl.c (finish_struct): Check on illegal use of __weak 745 on struct fields. 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. 750 7512006-06-26 Fariborz Jahanian <fjahanian@apple.com> 752 753 Radar 4591909 754 * c-parse.in: New/modified grammar for new attributes in 755 properties. 756 (yylexname): Change to recognize new attribute terminals. 757 * c-common.h (RID_DYNAMIC): New enum declaration. 758 7592006-07-14 Fariborz Jahanian <fjahanian@apple.com> 760 761 Radar 4621020 762 * c-parse.in: Added 'weak' attribute keyword for @property. 763 * c-common.h: 'weak' related declarations. 764 7652006-05-18 Fariborz Jahanian <fjahanian@apple.com> 766 767 Radar 4548636 (objc attributes on class) 768 * c-parse.in: Add attribute non-terminal before 769 AT_INTERFACE. 770 * c-common.h (objc_start_class_interface): New argument added. 771 * stub-objc.c (objc_start_class_interface): Ditto. 772 7732006-05-16 Fariborz Jahanian <fjahanian@apple.com> 774 775 Radar 4547045 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. 779 7802006-04-26 Fariborz Jahanian <fjahanian@apple.com> 781 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): 790 Added new argument. 791 (objc_method_decl): New stub. 792 7932006-04-12 Fariborz Jahanian <fjahanian@apple.com> 794 795 Radar 4507230 796 * c-common.h (objc_type_valid_for_messaging): Declare. 797 * stub-objc.c (objc_type_valid_for_messaging): New stub. 798 7992006-04-06 Fariborz Jahanian <fjahanian@apple.com> 800 801 Radar 4436866 802 (Missing copies attribute) 803 * c-parse.in: Add grammer for 'copies' attribute. 804 * c-common.h (RID_COPIES): New enumerator. 805 8062006-03-27 Fariborz Jahanian <fjahanian@apple.com> 807 808 Radar 4133425 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. 813 8142006-03-27 Fariborz Jahanian <fjahanian@apple.com> 815 816 Radar 4491608 817 * c-typeck.c (convert_arguments): function name must come from 'selector' 818 when diagnosing 'too many arguments'. 819 8202006-03-23 Fariborz Jahanian <fjahanian@apple.com> 821 822 Radar 4193359 823 * c-typeck.c (convert_for_assignment): Remove Objective-C EH machinery 824 'volatile' qualifier before doing type comparison. 825 8262006-02-28 Fariborz Jahanian <fjahanian@apple.com> 827 828 Radar 4441049 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. 833 8342006-02-15 Fariborz Jahanian <fjahanian@apple.com> 835 836 Radar 4445586 837 * c-common.def (DO_STMT): Takes an extra argument. 838 8392006-02-02 Fariborz Jahanian <fjahanian@apple.com> 840 841 Radar 4426814 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 845 on LHS expression. 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. 850 8512005-12-15 Fariborz Jahanian <fjahanian@apple.com> 852 853 Radar 4229905 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. 858 8592005-12-05 Mike Stump <mrs@apple.com> 860 861 Radar 4357979 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. 865 8662005-11-08 Fariborz Jahanian <fjahanian@apple.com> 867 868 Radar 4330422 869 870 * c-common.h (objc_non_volatilized_type): New declaration 871 * stub-objc.c (objc_non_volatilized_type): New stub. 872 8732005-10-12 Fariborz Jahanian <fjahanian@apple.com> 874 875 Radar 4291785 876 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. 883 8842005-09-28 Devang Patel <dpatel@apple.com> 885 886 Radar 4258406 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. 891 8922005-08-03 Fariborz Jahanian <fjahanian@apple.com> 893 894 Radar 4188876 895 * c-typeck.c (pop_init_level): Issue diagnostic on non-constant 896 vector initializers. 897 8982005-06-22 Ziemowit Laski <zlaski@apple.com> 899 900 Radar 4154928 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. 905 906/* APPLE LOCAL merge marger */ 907/* Stuff under is in fsf mainline, but not in the 4.2 branch */ 908 9092007-08-02 Geoffrey Keating <geoffk@apple.com> 910 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 916 is marked as unused. 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. 924 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. 952