12024-06-20 Release Manager 2 3 * GCC 12.4.0 released. 4 52024-06-11 Jakub Jelinek <jakub@redhat.com> 6 7 Backported from master: 8 2024-06-06 Jakub Jelinek <jakub@redhat.com> 9 10 PR c/114493 11 * c-decl.cc (c_fixup_may_alias): New function. 12 (finish_struct): Call it if "may_alias" attribute is 13 specified. 14 152023-05-08 Release Manager 16 17 * GCC 12.3.0 released. 18 192023-03-19 Jakub Jelinek <jakub@redhat.com> 20 21 Backported from master: 22 2023-03-10 Jakub Jelinek <jakub@redhat.com> 23 24 PR c/108079 25 * c-decl.cc (pop_scope): Suppress OPT_Wunused_variable warning 26 after diagnosing it. 27 282023-02-10 Jakub Jelinek <jakub@redhat.com> 29 30 Backported from master: 31 2023-01-16 Jakub Jelinek <jakub@redhat.com> 32 33 PR c++/105593 34 * c-parser.cc (c_parser_initializer): Check warning_enabled_at 35 at the DECL_SOURCE_LOCATION (decl) for OPT_Winit_self instead 36 of warn_init_self. 37 382023-02-10 Marek Polacek <polacek@redhat.com> 39 40 Backported from master: 41 2022-08-11 Marek Polacek <polacek@redhat.com> 42 43 PR middle-end/102633 44 * c-parser.cc (c_parser_initializer): Add new tree parameter. Use it. 45 Call suppress_warning. 46 (c_parser_declaration_or_fndef): Pass d down to c_parser_initializer. 47 (c_parser_omp_declare_reduction): Pass omp_priv down to 48 c_parser_initializer. 49 502023-02-10 Jakub Jelinek <jakub@redhat.com> 51 52 Backported from master: 53 2023-01-11 Jakub Jelinek <jakub@redhat.com> 54 55 PR c/105972 56 * c-parser.cc (c_parser_declaration_or_fndef): Disable debug non-bind 57 markers for K&R function parameter declarations of nested functions. 58 592023-01-31 Marek Polacek <polacek@redhat.com> 60 61 PR c++/107593 62 PR c++/108597 63 * c-objc-common.cc (instantiation_dependent_expression_p): New. 64 652022-11-03 Jakub Jelinek <jakub@redhat.com> 66 67 Backported from master: 68 2022-10-24 Jakub Jelinek <jakub@redhat.com> 69 70 PR c++/107358 71 * c-typeck.cc (build_binary_op): Pass operands before excess precision 72 promotions to scalar_to_vector call. 73 742022-11-03 Jakub Jelinek <jakub@redhat.com> 75 76 Backported from master: 77 2022-09-24 Jakub Jelinek <jakub@redhat.com> 78 79 PR c/106981 80 * c-typeck.cc (c_tree_equal): Only strip NON_LVALUE_EXPRs at the 81 start. For CONSTANT_CLASS_P or CASE_CONVERT: return false if t1 and 82 t2 have different types. 83 842022-09-19 Marek Polacek <polacek@redhat.com> 85 86 Backported from master: 87 2022-09-19 Marek Polacek <polacek@redhat.com> 88 89 PR c/106947 90 * c-typeck.cc (maybe_warn_for_null_address): Don't emit stray 91 notes. 92 932022-08-19 Release Manager 94 95 * GCC 12.2.0 released. 96 972022-08-01 Lewis Hyatt <lhyatt@gmail.com> 98 99 Backported from master: 100 2022-07-10 Lewis Hyatt <lhyatt@gmail.com> 101 102 PR preprocessor/97498 103 * c-parser.cc (c_parser_pragma): Set input_location to the 104 location of the pragma, rather than the start of the line. 105 1062022-05-06 Release Manager 107 108 * GCC 12.1.0 released. 109 1102022-04-08 Jakub Jelinek <jakub@redhat.com> 111 112 PR c/105149 113 * c-typeck.cc (c_build_va_arg): Reject function types. 114 1152022-03-22 Marek Polacek <polacek@redhat.com> 116 117 PR c/82283 118 PR c/84685 119 * c-typeck.cc (struct initializer_stack): Add 'designated' member. 120 (start_init): Set it. 121 (finish_init): Restore constructor_designated. 122 (push_init_level): Set constructor_designated to the value of 123 constructor_designated in the upper constructor_stack. 124 1252022-03-12 Thomas Schwinge <thomas@codesourcery.com> 126 127 PR other/65095 128 * c-typeck.cc (handle_omp_array_sections_1) 129 (c_oacc_check_attachments): Call 'user_omp_clause_code_name' 130 instead of 'c_omp_map_clause_name'. 131 1322022-03-09 Joseph Myers <joseph@codesourcery.com> 133 134 * c-typeck.cc (function_types_compatible_p): Do not handle C2X 135 differently from earlier standards for unprototyped function type 136 compatibility. 137 1382022-03-09 Jakub Jelinek <jakub@redhat.com> 139 140 PR c/104711 141 * c-fold.cc (c_fully_fold_internal): Don't emit 142 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS. 143 * c-typeck.cc (build_binary_op): Likewise. 144 1452022-03-07 Jakub Jelinek <jakub@redhat.com> 146 147 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string 148 literal. 149 1502022-02-23 Richard Biener <rguenther@suse.de> 151 152 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose 153 SSA names without definition. 154 (c_parser_gimple_declaration): Handle pointer typed SSA names. 155 1562022-02-17 Jakub Jelinek <jakub@redhat.com> 157 158 PR c/104532 159 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use 160 convert_lvalue_to_rvalue and build_indirect_ref instead of 161 build_simple_mem_ref. 162 1632022-02-11 Richard Biener <rguenther@suse.de> 164 165 * gimple-parser.cc (c_parser_gimple_statement): Properly parse 166 VEC_COND_EXPRs. 167 1682022-02-10 Marcel Vollweiler <marcel@codesourcery.com> 169 170 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr' 171 clause. 172 (c_parser_omp_variable_list): Handle array sections. 173 (c_parser_omp_clause_has_device_addr): Added. 174 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR 175 case. 176 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to 177 OMP_CLAUSE_MASK. 178 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions. 179 (c_finish_omp_clauses): Handle array sections. 180 1812022-02-09 Jakub Jelinek <jakub@redhat.com> 182 183 PR c/104427 184 * c-parser.cc (c_parser_postfix_expression) 185 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op 186 instead of build1_loc to build PAREN_EXPR. 187 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR. 188 * c-fold.cc (c_fully_fold_internal): Likewise. 189 1902022-01-17 Martin Liska <mliska@suse.cz> 191 192 * Make-lang.in: Rename .c names to .cc. 193 * c-convert.cc: Likewise. 194 * c-decl.cc (struct lang_identifier): Likewise. 195 (pop_scope): Likewise. 196 (finish_decl): Likewise. 197 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise. 198 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise. 199 * c-parser.h (GCC_C_PARSER_H): Likewise. 200 * c-tree.h (c_keyword_starts_typename): Likewise. 201 (finish_declspecs): Likewise. 202 (c_get_alias_set): Likewise. 203 (enum c_oracle_request): Likewise. 204 (tag_exists_p): Likewise. 205 (set_c_expr_source_range): Likewise. 206 * c-typeck.cc (c_common_type): Likewise. 207 (c_finish_omp_clauses): Likewise. 208 * config-lang.in: Likewise. 209 2102022-01-17 Martin Liska <mliska@suse.cz> 211 212 * c-aux-info.c: Moved to... 213 * c-aux-info.cc: ...here. 214 * c-convert.c: Moved to... 215 * c-convert.cc: ...here. 216 * c-decl.c: Moved to... 217 * c-decl.cc: ...here. 218 * c-errors.c: Moved to... 219 * c-errors.cc: ...here. 220 * c-fold.c: Moved to... 221 * c-fold.cc: ...here. 222 * c-lang.c: Moved to... 223 * c-lang.cc: ...here. 224 * c-objc-common.c: Moved to... 225 * c-objc-common.cc: ...here. 226 * c-parser.c: Moved to... 227 * c-parser.cc: ...here. 228 * c-typeck.c: Moved to... 229 * c-typeck.cc: ...here. 230 * gccspec.c: Moved to... 231 * gccspec.cc: ...here. 232 * gimple-parser.c: Moved to... 233 * gimple-parser.cc: ...here. 234 2352022-01-17 Andrew Stubbs <ams@codesourcery.com> 236 237 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators. 238 2392022-01-14 Chung-Lin Tang <cltang@codesourcery.com> 240 241 PR c++/103705 242 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of 243 outer node for ARRAY_REFs. 244 2452022-01-01 Jakub Jelinek <jakub@redhat.com> 246 247 PR objc/103639 248 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of 249 ObjC foreach, emit normal BREAK_STMT rather than goto to label. 250 2512021-12-17 Marek Polacek <polacek@redhat.com> 252 253 PR c/103649 254 * c-decl.c (c_warn_unused_attributes): Don't warn for 255 attribute_ignored_p. 256 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute 257 arguments when the attribute is ignored. 258 2592021-12-14 Jakub Jelinek <jakub@redhat.com> 260 261 PR c/103587 262 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA, 263 consume the pragma and silently skip to the pragma eol. 264 2652021-12-12 Jonathan Wakely <jwakely@redhat.com> 266 267 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR. 268 * c-parser.c: Likewise. 269 2702021-12-09 Jakub Jelinek <jakub@redhat.com> 271 272 PR pch/71934 273 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice 274 to resort_data.new_value. 275 2762021-12-08 Chung-Lin Tang <cltang@codesourcery.com> 277 278 * c-parser.c (struct omp_dim): New struct type for use inside 279 c_parser_omp_variable_list. 280 (c_parser_omp_variable_list): Allow multiple levels of array and 281 component accesses in array section base-pointer expression. 282 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to 283 c_parser_omp_var_list_parens. 284 (c_parser_omp_clause_from): Likewise. 285 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range 286 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and 287 POINTER_PLUS_EXPR. 288 (c_finish_omp_clauses): Extend allowed ranged of expressions 289 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR. 290 2912021-12-08 Chung-Lin Tang <cltang@codesourcery.com> 292 293 PR middle-end/92120 294 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in 295 call to c_parser_omp_variable_list to 'true'. 296 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in 297 array base handling. 298 (c_finish_omp_clauses): Handle 'A->member' case in map clauses. 299 3002021-11-30 Thomas Schwinge <thomas@codesourcery.com> 301 302 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an 303 orphan loop" checking. 304 3052021-11-30 Cesar Philippidis <cesar@codesourcery.com> 306 Thomas Schwinge <thomas@codesourcery.com> 307 308 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan 309 OpenACC gang reductions. 310 3112021-11-30 Richard Biener <rguenther@suse.de> 312 313 * gimple-parser.c (c_parser_gimple_postfix_expression): 314 avoid unreachable code after break. 315 3162021-11-29 Eric Gallager <egallager@gcc.gnu.org> 317 318 PR other/103021 319 * Make-lang.in: Use ETAGS variable in TAGS target. 320 3212021-11-29 Richard Biener <rguenther@suse.de> 322 323 * c-typeck.c (c_tree_equal): Remove unreachable return. 324 * c-parser.c (get_matching_symbol): Likewise. 325 3262021-11-23 Jakub Jelinek <jakub@redhat.com> 327 328 * c-typeck.c (c_clone_omp_udr): Don't initialize 329 id.transform_lang_insert_block. 330 3312021-11-19 Martin Sebor <msebor@redhat.com> 332 333 PR c++/33925 334 PR c/102867 335 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for 336 code resulting from macro expansion. 337 3382021-11-19 Martin Liska <mliska@suse.cz> 339 340 Revert: 341 2021-11-19 Martin Liska <mliska@suse.cz> 342 343 * c-parser.c (add_debug_begin_stmt): Use option directly. 344 3452021-11-18 Matthias Kretz <m.kretz@gsi.de> 346 347 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER. 348 * c-parser.c (c_parser_postfix_expression): Likewise. 349 3502021-11-18 Martin Liska <mliska@suse.cz> 351 352 * c-parser.c (add_debug_begin_stmt): Use option directly. 353 3542021-11-17 Martin Sebor <msebor@redhat.com> 355 356 PR c/101702 357 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array 358 bounds before deciding if they're constant. 359 3602021-11-15 Jakub Jelinek <jakub@redhat.com> 361 362 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add 363 PRAGMA_OMP_CLAUSE_THREAD_LIMIT. 364 3652021-11-11 Jakub Jelinek <jakub@redhat.com> 366 367 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional 368 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR. 369 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of 370 OMP_CLAUSE_NUM_TEAMS_EXPR. 371 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before 372 combined target teams even lower-bound expression. 373 3742021-11-11 Richard Biener <rguenther@suse.de> 375 376 * gimple-parser.c: Shuffle bitmap.h include. 377 3782021-11-03 Joseph Myers <joseph@codesourcery.com> 379 380 PR c/103031 381 * c-convert.c (c_convert): New function, based on convert. 382 (convert): Make into wrapper of c_convert. 383 (convert_init): New function. 384 * c-typeck.c (enum impl_conv): Add ic_init_const. 385 (convert_for_assignment): Handle ic_init_const like ic_init. Add 386 new argument to convert_and_check call. 387 (digest_init): Pass ic_init_const to convert_for_assignment for 388 initializers required to be constant. 389 3902021-11-02 Richard Sandiford <richard.sandiford@arm.com> 391 392 * c-tree.h (c_simulate_record_decl): Declare. 393 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override. 394 * c-decl.c (c_simulate_record_decl): New function. 395 3962021-10-22 Eric Gallager <egallager@gcc.gnu.org> 397 398 PR other/102663 399 * Make-lang.in: Add dummy c.install-dvi target. 400 4012021-10-15 Richard Biener <rguenther@suse.de> 402 403 PR c/102763 404 * gimple-parser.c 405 (c_parser_gimple_postfix_expression_after_primary): Check 406 for a pointer do be dereferenced by ->. 407 4082021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com> 409 410 * c-parser.c (c_finish_omp_declare_variant): Change call from 411 c_omp_check_context_selector to omp_check_context_selector. Change 412 call from c_omp_mark_declare_variant to omp_mark_declare_variant. 413 4142021-10-09 Jakub Jelinek <jakub@redhat.com> 415 416 * c-parser.c (c_parser_omp_structured_block_sequence): New function. 417 (c_parser_omp_scan_loop_body): Use it. 418 (c_parser_omp_sections_scope): Likewise. 419 4202021-10-07 Richard Biener <rguenther@suse.de> 421 422 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF. 423 4242021-10-05 Richard Biener <rguenther@suse.de> 425 426 PR c/102605 427 * gimple-parser.c (c_parser_gimple_postfix_expression): 428 Accept more address _Literals. 429 4302021-10-04 Marek Polacek <polacek@redhat.com> 431 432 PR c++/97573 433 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare. 434 4352021-10-01 Martin Sebor <msebor@redhat.com> 436 437 PR c/102103 438 * c-typeck.c (maybe_warn_for_null_address): New function. 439 (build_binary_op): Call it. 440 4412021-10-01 Jakub Jelinek <jakub@redhat.com> 442 Richard Biener <rguenther@suse.de> 443 444 PR sanitizer/102515 445 * c-typeck.c (build_binary_op): Call ubsan_instrument_division 446 for division even for SANITIZE_SI_OVERFLOW. 447 4482021-10-01 Jakub Jelinek <jakub@redhat.com> 449 450 * c-parser.c (c_parser_omp_clause_order): Set 451 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier. 452 4532021-09-28 Andrew Pinski <apinski@marvell.com> 454 455 PR c/32122 456 * c-parser.c (c_parser_statement_after_labels): Pass 457 the c_expr instead of the tree to c_finish_goto_ptr. 458 * c-typeck.c (c_finish_goto_ptr): Change the second 459 argument type to c_expr. 460 * c-tree.h (c_finish_goto_ptr): Likewise. 461 Error out if the expression was not of a pointer type. 462 4632021-09-22 Jakub Jelinek <jakub@redhat.com> 464 465 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause 466 modifiers. 467 4682021-09-18 Jakub Jelinek <jakub@redhat.com> 469 470 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained 471 and reproducible modifiers. 472 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause. 473 4742021-09-18 Jakub Jelinek <jakub@redhat.com> 475 476 * c-parser.c (c_parser_omp_clause_default): Handle private and 477 firstprivate arguments, adjust diagnostics on unknown argument. 478 4792021-09-17 Jakub Jelinek <jakub@redhat.com> 480 481 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture 482 is true. 483 4842021-09-10 Jakub Jelinek <jakub@redhat.com> 485 486 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and 487 cond.value is >, < or == with omp_atomic_lhs as one of the operands, 488 don't call build_conditional_expr, instead build a COND_EXPR directly. 489 (c_parser_binary_expression): Avoid calling parser_build_binary_op 490 if omp_atomic_lhs even in more cases for >, < or ==. 491 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics, 492 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow 493 acq_rel on atomic read/write and acq_rel/acquire clauses on update. 494 * c-typeck.c (build_binary_op): For flag_openmp only handle 495 MIN_EXPR/MAX_EXPR. 496 4972021-09-07 Marcel Vollweiler <marcel@codesourcery.com> 498 499 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush' 500 directive. 501 5022021-09-01 Iain Sandoe <iain@sandoe.co.uk> 503 504 * c-decl.c (enum deprecated_states): Add unavailable state. 505 (merge_decls): Copy unavailability. 506 (quals_from_declspecs): Handle unavailable case. 507 (start_decl): Amend the logic handling suppression of nested 508 deprecation states to include unavailability. 509 (smallest_type_quals_location): Amend comment. 510 (grokdeclarator): Handle the unavailable deprecation state. 511 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs. 512 * c-tree.h (struct c_declspecs): Add unavailable_p. 513 * c-typeck.c (build_component_ref): Handle unavailability. 514 (build_external_ref): Likewise. 515 5162021-09-01 Roger Sayle <roger@nextmovesoftware.com> 517 Joseph Myers <joseph@codesourcery.com> 518 519 PR c/79412 520 * c-decl.c (duplicate_decls): On significant mismatches, mark the 521 types of both (non-function) decls as error_mark_node, so that the 522 middle-end can see the code is malformed. 523 (free_attr_access_data): Don't process if the type has been set to 524 error_mark_node. 525 5262021-08-31 Marcel Vollweiler <marcel@codesourcery.com> 527 528 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num' 529 and 'ancestor' in 'target device' clauses. 530 5312021-08-23 Jakub Jelinek <jakub@redhat.com> 532 533 * c-parser.c (c_parser_omp_clause_num_tasks, 534 c_parser_omp_clause_grainsize): Parse the optional strict: modifier. 535 5362021-08-22 Martin Uecker <muecker@gwdg.de> 537 538 PR c/98397 539 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11 540 for pointers to arrays with qualifiers. 541 (build_conditional_expr): For C23 don't lose qualifiers for pointers 542 to arrays when the other pointer is a void pointer. Update warnings. 543 (convert_for_assignment): Update warnings for C2X when converting from 544 void* with qualifiers to a pointer to array with the same qualifiers. 545 5462021-08-20 Jakub Jelinek <jakub@redhat.com> 547 548 * c-parser.c (c_parser_omp_error): New function. 549 (c_parser_pragma): Handle PRAGMA_OMP_ERROR. 550 5512021-08-20 Jakub Jelinek <jakub@redhat.com> 552 553 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious 554 comma at the end of list. 555 (c_parser_omp_requires): Likewise. 556 5572021-08-19 Jakub Jelinek <jakub@redhat.com> 558 559 * c-parser.c (c_parser_omp_requires): Don't call 560 c_parser_peek_2nd_token and optionally consume token if current 561 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN. 562 5632021-08-18 Jakub Jelinek <jakub@redhat.com> 564 565 * c-parser.c (c_parser_omp_nothing): New function. 566 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING. 567 5682021-08-18 Jakub Jelinek <jakub@redhat.com> 569 570 * c-parser.c (c_parser_statement_after_labels): Add restart label 571 near the start of the function. If c_parser_pragma returns false, 572 goto restart. 573 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what 574 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE 575 return what c_parser_omp_declare returned. Return true instead of 576 false after emitting errors that the directive is not allowed in 577 pragma_stmt context. 578 (c_parser_omp_ordered): Return true instead of 579 false after emitting errors that the directive is not allowed in 580 pragma_stmt context. 581 (c_parser_omp_target_update): Likewise. 582 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): 583 Change return type from tree to bool, return false if the 584 directive should be ignored in pragma_stmt contexts. 585 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data, 586 return their result directly. 587 (c_parser_omp_cancellation_point): Change return type from void to 588 bool, return false if the directive should be ignored in pragma_stmt 589 contexts. 590 (c_parser_omp_declare): Likewise. 591 5922021-08-17 Jakub Jelinek <jakub@redhat.com> 593 594 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define. 595 (c_parser_omp_scope): New function. 596 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE. 597 5982021-08-12 Jakub Jelinek <jakub@redhat.com> 599 600 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name. 601 (c_parser_omp_clause_filter): New function. 602 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER. 603 (OMP_MASKED_CLAUSE_MASK): Define. 604 (c_parser_omp_masked): New function. 605 (c_parser_omp_parallel): Handle parallel masked. 606 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED. 607 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER. 608 6092021-08-12 Martin Uecker <muecker@gwdg.de> 610 611 PR c/101838 612 PR c/29970 613 * c-typeck.c (c_expr_sizeof_type): Evaluate 614 size expressions for structs of variable size. 615 6162021-08-12 Tobias Burnus <tobias@codesourcery.com> 617 618 * c-parser.c (c_parser_omp_clause_proc_bind): Accept 619 'primary' as alias for 'master'. 620 6212021-08-10 Martin Uecker <muecker@gwdg.de> 622 623 PR c/29970 624 * c-typeck.c (c_expr_sizeof_expr): Evaluate 625 size expressions for structs of variable size. 626 6272021-08-06 Tamar Christina <tamar.christina@arm.com> 628 629 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer. 630 * c-tree.h (c_simulate_enum_decl): Likewise. 631 6322021-08-06 Martin Sebor <msebor@redhat.com> 633 634 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function 635 vec arguments to by-reference. 636 (c_finish_omp_declare_simd): Same. 637 (c_parser_compound_statement_nostart): Same. 638 (c_parser_for_statement): Same. 639 (c_parser_objc_methodprotolist): Same. 640 (c_parser_oacc_routine): Same. 641 (c_parser_omp_for_loop): Same. 642 (c_parser_omp_declare_simd): Same. 643 6442021-07-21 Thomas Schwinge <thomas@codesourcery.com> 645 Joseph Myers <joseph@codesourcery.com> 646 Cesar Philippidis <cesar@codesourcery.com> 647 648 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'. 649 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'. 650 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'. 651 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'. 652 6532021-07-20 Martin Sebor <msebor@redhat.com> 654 655 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to 656 by-const-reference. 657 * c-typeck.c (c_build_function_call_vec): Same. 658 6592021-07-15 Martin Sebor <msebor@redhat.com> 660 661 PR c/101289 662 PR c/97548 663 * c-decl.c (get_parm_array_spec): Strip nops. 664 6652021-07-06 Martin Sebor <msebor@redhat.com> 666 667 * c-objc-common.c (c_tree_printer): Remove support for %G and %K. 668 6692021-07-02 Jakub Jelinek <jakub@redhat.com> 670 671 PR c/101297 672 * c-parser.c (c_parser_omp_atomic): Consume comma only if it 673 appears before a CPP_NAME. 674 6752021-06-25 Martin Sebor <msebor@redhat.com> 676 677 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with 678 warning_suppressed_p, suppress_warning, and copy_no_warning. 679 (diagnose_mismatched_decls): Same. 680 (duplicate_decls): Same. 681 (grokdeclarator): Same. 682 (finish_function): Same. 683 (c_write_global_declarations_1): Same. 684 * c-fold.c (c_fully_fold_internal): Same. 685 * c-parser.c (c_parser_expr_no_commas): Same. 686 (c_parser_postfix_expression): Same. 687 * c-typeck.c (array_to_pointer_conversion): Same. 688 (function_to_pointer_conversion): Same. 689 (default_function_array_conversion): Same. 690 (convert_lvalue_to_rvalue): Same. 691 (default_conversion): Same. 692 (build_indirect_ref): Same. 693 (build_function_call_vec): Same. 694 (build_atomic_assign): Same. 695 (build_unary_op): Same. 696 (c_finish_return): Same. 697 (emit_side_effect_warnings): Same. 698 (c_finish_stmt_expr): Same. 699 (c_omp_clause_copy_ctor): Same. 700 7012021-06-24 Jakub Jelinek <jakub@redhat.com> 702 703 PR c/101176 704 * c-parser.c (c_parser_has_attribute_expression): Set source range for 705 the result. 706 7072021-06-24 Jakub Jelinek <jakub@redhat.com> 708 709 PR c/101171 710 * c-typeck.c (build_c_cast): Don't call note_integer_operands on 711 error_mark_node. 712 7132021-06-24 Jakub Jelinek <jakub@redhat.com> 714 715 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of 716 C_ORT_OMP for clauses on target construct. 717 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause. 718 (c_parser_omp_target): For non-combined target add 719 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass 720 C_ORT_OMP_TARGET to c_finish_omp_clauses. 721 * c-typeck.c (handle_omp_array_sections): Adjust ort handling 722 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are 723 never present on C_ORT_*DECLARE_SIMD. 724 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION 725 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on 726 corresponding map clauses. 727 7282021-06-21 Jakub Jelinek <jakub@redhat.com> 729 730 PR inline-asm/100785 731 * c-typeck.c (c_mark_addressable): Diagnose trying to make 732 bit-fields addressable. 733 7342021-06-15 Robin Dapp <rdapp@linux.ibm.com> 735 736 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is 737 similar. 738 7392021-06-14 Tobias Burnus <tobias@codesourcery.com> 740 741 PR c/100913 742 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator 743 var in the error case. 744 7452021-06-07 Eric Botcazou <ebotcazou@adacore.com> 746 747 PR c/100920 748 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to 749 spot built-in functions. 750 7512021-06-06 Jakub Jelinek <jakub@redhat.com> 752 753 PR c/100902 754 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses 755 even when target is combined with other constructs. 756 7572021-06-06 Eric Botcazou <ebotcazou@adacore.com> 758 759 PR c/100920 760 * c-decl.c (finish_struct): Fix thinko in previous change. 761 * c-typeck.c (convert_for_assignment): Do not warn on pointer 762 assignment and initialization for storage order purposes if the 763 RHS is a call to a DECL_IS_MALLOC function. 764 7652021-06-04 Martin Sebor <msebor@redhat.com> 766 767 PR c/100783 768 * c-objc-common.c (print_type): Handle erroneous types. 769 7702021-06-03 Jakub Jelinek <jakub@redhat.com> 771 772 PR c++/100859 773 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY 774 after depend only cases. 775 7762021-05-31 Richard Biener <rguenther@suse.de> 777 778 PR c++/88601 779 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR. 780 * c-parser.c (c_parser_postfix_expression): Likewise. 781 7822021-05-28 Richard Biener <rguenther@suse.de> 783 784 PR c/100803 785 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose 786 invalid if conditions. 787 7882021-05-28 Jakub Jelinek <jakub@redhat.com> 789 790 PR middle-end/99928 791 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT. 792 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT 793 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add 794 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER 795 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is 796 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause 797 if present in map_head, map_field_head or map_firstprivate_head 798 bitmaps. 799 8002021-05-28 Tobias Burnus <tobias@codesourcery.com> 801 802 * c-parser.c (c_parser_omp_clause_affinity): New. 803 (c_parser_omp_clause_name, c_parser_omp_variable_list, 804 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause. 805 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections, 806 c_finish_omp_clauses): Likewise. 807 8082021-05-26 Eric Botcazou <ebotcazou@adacore.com> 809 810 PR c/100653 811 * c-decl.c (finish_struct): Warn for a union containing an aggregate 812 field with a differing scalar storage order. 813 8142021-05-21 Jakub Jelinek <jakub@redhat.com> 815 816 PR middle-end/99928 817 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with 818 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error 819 if a decl is mentioned both in map clause and in such firstprivate 820 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set. 821 8222021-05-19 Jakub Jelinek <jakub@redhat.com> 823 824 PR middle-end/99928 825 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on 826 master when combined with taskloop. 827 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on 828 parallel master when not combined with taskloop. 829 8302021-05-18 Richard Biener <rguenther@suse.de> 831 832 PR c/100522 833 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary): 834 Diagnose calls to non-functions. 835 (c_parser_gimple_statement): Diagnose unexpected assignment RHS. 836 8372021-05-17 Richard Biener <rguenther@suse.de> 838 839 PR c/100625 840 * gimple-parser.c (c_parser_gimple_label): Avoid building 841 a GIMPLE label with NULL label decl. 842 8432021-05-13 Martin Sebor <msebor@redhat.com> 844 845 PR c/100550 846 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds. 847 8482021-05-12 Marcel Vollweiler <marcel@codesourcery.com> 849 850 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier 851 'close'. 852 8532021-05-10 Martin Liska <mliska@suse.cz> 854 855 * c-aux-info.c (affix_data_type): Use startswith 856 function instead of strncmp. 857 * c-typeck.c (build_function_call_vec): Likewise. 858 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise. 859 8602021-05-07 Eric Botcazou <ebotcazou@adacore.com> 861 862 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error 863 on the address of a pointer field in a record with reverse SSO. 864 8652021-05-04 Tobias Burnus <tobias@codesourcery.com> 866 867 * c-typeck.c (c_finish_omp_clauses): Accept float + complex 868 for || and && reductions. 869 8702021-04-29 Joseph Myers <joseph@codesourcery.com> 871 872 * c-typeck.c (function_types_compatible_p): For C2X, treat 873 unprototyped function as compatible with non-variadic prototyped 874 function even if some argument types are changed by the default 875 argument promotions. 876 8772021-04-15 Martin Sebor <msebor@redhat.com> 878 879 PR c/99420 880 PR c/99972 881 * c-decl.c (pushdecl): Always propagate type attribute. 882 8832021-04-15 Richard Sandiford <richard.sandiford@arm.com> 884 885 PR c/98852 886 * c-typeck.c (c_common_type): Do not drop attributes that 887 affect type identity. 888 8892021-04-10 Jakub Jelinek <jakub@redhat.com> 890 891 PR c/99990 892 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of 893 error_mark_node. 894 8952021-03-25 Jakub Jelinek <jakub@redhat.com> 896 897 PR c++/99565 898 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD 899 to operand_equal_p. 900 9012021-03-19 Jakub Jelinek <jakub@redhat.com> 902 903 PR c/99588 904 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign 905 with modifycode NOP_EXPR produces and mark the _Atomic var as read 906 if found. 907 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs 908 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs. 909 Set TREE_SIDE_EFFECTS on the TARGET_EXPR. 910 9112021-03-15 Tobias Burnus <tobias@codesourcery.com> 912 913 PR c++/99509 914 * c-decl.c (finish_decl): For 'omp declare target implicit' vars, 915 ensure that the varpool node is marked as offloadable. 916 9172021-03-05 Tobias Burnus <tobias@codesourcery.com> 918 919 PR c/99137 920 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions. 921 9222021-02-24 Martin Sebor <msebor@redhat.com> 923 924 PR middle-end/97172 925 * c-decl.c (free_attr_access_data): Clear attribute arg spec. 926 9272021-02-18 Jakub Jelinek <jakub@redhat.com> 928 929 PR c/99136 930 * c-typeck.c (c_finish_return): Don't wrap retval into 931 EXCESS_PRECISION_EXPR in functions that return void. 932 9332021-02-11 Marek Polacek <polacek@redhat.com> 934 935 * c-parser.c (c_parser_if_statement): Use vec_free. 936 9372021-02-04 Martin Sebor <msebor@redhat.com> 938 939 PR c/97882 940 * c-decl.c (locate_old_decl): Add type to diagnostic output. 941 (diagnose_mismatched_decls): Same. 942 (start_function): Introduce temporaries for better readability. 943 * c-typeck.c (comptypes_internal): Only consider complete enum 944 types in comparisons with integers. 945 9462021-02-01 Martin Sebor <msebor@redhat.com> 947 948 PR middle-end/97172 949 * c-decl.c (free_attr_access_data): New function. 950 (c_parse_final_cleanups): Call free_attr_access_data. 951 9522021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com> 953 954 * c-parser.c (c_parser_omp_clause_detach): New. 955 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause. 956 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH. 957 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH 958 clause. Prevent use of detach with mergeable and overriding the 959 data sharing mode of the event handle. 960 9612021-01-15 Jakub Jelinek <jakub@redhat.com> 962 963 * c-typeck.c (c_finish_omp_clauses): For reduction build array with 964 unqualified element type and then call c_build_qualified_type on the 965 ARRAY_TYPE. 966 9672021-01-07 Richard Biener <rguenther@suse.de> 968 969 * gimple-parser.c (c_parser_gimple_compound_statement): Only 970 reallocate loop array if it is too small. 971 9722020-12-16 Martin Uecker <muecker@gwdg.de> 973 974 PR c/98047 975 * c-typeck.c (build_modify_expr): Drop qualifiers. 976 9772020-12-16 Martin Uecker <muecker@gwdg.de> 978 979 PR c/98260 980 * c-parser.c (c_parser_expression): Look into 981 nop expression when marking expressions as read. 982 9832020-12-14 Martin Liska <mliska@suse.cz> 984 985 PR sanitizer/98204 986 * c-typeck.c (pointer_diff): Do not emit a top-level 987 sanitization. 988 (build_binary_op): Likewise. 989 9902020-12-09 Tobias Burnus <tobias@codesourcery.com> 991 992 * c-parser.c (c_parser_omp_allocate): New. 993 (c_parser_omp_construct): Call it. 994 9952020-12-09 Richard Biener <rguenther@suse.de> 996 997 PR c/98200 998 * gimple-parser.c (c_parser_gimple_postfix_expression): Return 999 early on error. 1000 10012020-12-07 Martin Uecker <muecker@gwdg.de> 1002 1003 PR c/97981 1004 * c-typeck.c (convert_lvalue_to_rvalue): Move the code 1005 that drops qualifiers to the end of the function. 1006 10072020-11-26 Martin Uecker <muecker@gwdg.de> 1008 1009 PR c/65455 1010 PR c/92935 1011 * c-parser.c (c_parser_declaration_or_fndef): Remove 1012 redundant code to drop qualifiers of _Atomic types for __auto_type. 1013 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic 1014 types for __typeof__. 1015 10162020-11-24 Jakub Jelinek <jakub@redhat.com> 1017 1018 PR c/97958 1019 * c-parser.c (c_parser_binary_expression): For omp atomic binary 1020 expressions, use make_node instead of build2 to avoid checking build2 1021 performs. 1022 10232020-11-23 Joseph Myers <joseph@codesourcery.com> 1024 1025 PR c/95630 1026 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic 1027 for comparisons of complete and incomplete pointers. 1028 10292020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com> 1030 1031 * c-aux-info.c (gen_type): Support opaque types. 1032 10332020-11-20 Martin Sebor <msebor@redhat.com> 1034 1035 PR middle-end/97879 1036 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags. 1037 10382020-11-20 Jakub Jelinek <jakub@redhat.com> 1039 1040 PR other/97911 1041 * Make-lang.in (c.serial): Change from goal to a variable. 1042 (.PHONY): Drop c.serial. 1043 10442020-11-20 Martin Uecker <muecker@gwdg.de> 1045 1046 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers. 1047 10482020-11-19 Jakub Jelinek <jakub@redhat.com> 1049 1050 PR c/97860 1051 * c-decl.c (get_parm_array_spec): Bail out of nelts is 1052 error_operand_p. 1053 10542020-11-18 Jakub Jelinek <jakub@redhat.com> 1055 1056 * Make-lang.in (c.serial): New goal. 1057 (.PHONY): Add c.serial c.prev. 1058 (cc1$(exeext)): Call LINK_PROGRESS. 1059 10602020-11-13 Vladimir N. Makarov <vmakarov@redhat.com> 1061 1062 * c-parser.c (c_parser_asm_statement): Parse outputs for asm 1063 goto too. 1064 * c-typeck.c (build_asm_expr): Remove an assert checking output 1065 absence for asm goto. 1066 10672020-11-13 Jakub Jelinek <jakub@redhat.com> 1068 1069 * c-typeck.c (c_finish_omp_clauses): Don't clear 1070 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2. 1071 10722020-11-13 Iain Sandoe <iain@sandoe.co.uk> 1073 1074 PR objc/77404 1075 * c-parser.c (c_parser_objc_class_definition): Pass the 1076 location of the class name to the interface declaration. 1077 10782020-11-10 Strager Neds <strager.nds@gmail.com> 1079 1080 * c-decl.c (merge_decls): Use new overload of 1081 set_decl_section_name. 1082 10832020-11-10 Chung-Lin Tang <cltang@codesourcery.com> 1084 1085 * c-parser.c (c_parser_omp_target_data): Add use of 1086 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as 1087 handled map clause kind. 1088 (c_parser_omp_target_enter_data): Likewise. 1089 (c_parser_omp_target_exit_data): Likewise. 1090 (c_parser_omp_target): Likewise. 1091 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to 1092 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type. 1093 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and 1094 same struct field access to co-exist on OpenMP construct. 1095 10962020-11-07 Martin Uecker <muecker@gwdg.de> 1097 1098 * c-parser.c (c_parser_label): Implement mixing of labels and code. 1099 (c_parser_all_labels): Likewise. 1100 11012020-11-06 Iain Sandoe <iain@sandoe.co.uk> 1102 1103 * c-parser.c (c_parser_objc_at_property_declaration): 1104 Improve parsing fidelity. Associate better location info 1105 with @property attributes. Clean up the interface to 1106 objc_add_property_declaration (). 1107 11082020-11-06 Nathan Sidwell <nathan@acm.org> 1109 1110 * c-decl.c (diagnose_mismatched_decls): Rename 1111 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN. 1112 (warn_if_shadowing, implicitly_declare, names_builtin_p) 1113 (collect_source_refs): Likewise. 1114 * c-typeck.c (inform_declaration, inform_for_arg) 1115 (convert_for_assignment): Likewise. 1116 11172020-11-06 Tobias Burnus <tobias@codesourcery.com> 1118 1119 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update 1120 OpenACC matching. 1121 (c_parser_omp_construct): Update call. 1122 11232020-11-04 Jakub Jelinek <jakub@redhat.com> 1124 1125 PR c++/97670 1126 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to 1127 find underlying decl to clear in the aligned_head bitmap. 1128 11292020-11-04 Joseph Myers <joseph@codesourcery.com> 1130 1131 * c-decl.c (handle_nodiscard_attribute): New. 1132 (std_attribute_table): Add nodiscard. 1133 * c-parser.c (c_parser_std_attribute): Expect argument to 1134 nodiscard attribute to be a string. Do not special-case ignoring 1135 nodiscard. 1136 * c-typeck.c (maybe_warn_nodiscard): New. 1137 (build_compound_expr, emit_side_effect_warnings): Call 1138 maybe_warn_nodiscard. 1139 (c_process_expr_stmt, c_finish_stmt_expr): Also call 1140 emit_side_effect_warnings if warn_unused_result. 1141 11422020-10-29 Asher Gordon <AsDaGo@posteo.net> 1143 1144 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free 1145 with XDELETE. 1146 (finish_init): Likewise. 1147 (pop_init_level): Likewise. 1148 11492020-10-28 Joseph Myers <joseph@codesourcery.com> 1150 1151 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not 1152 error_at for omitted parameter name. 1153 11542020-10-28 Jakub Jelinek <jakub@redhat.com> 1155 1156 * c-parser.c (c_parser_omp_clause_name): Handle allocate. 1157 (c_parser_omp_clause_allocate): New function. 1158 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE. 1159 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK, 1160 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK, 1161 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK, 1162 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK, 1163 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add 1164 PRAGMA_OMP_CLAUSE_ALLOCATE. 1165 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE. 1166 11672020-10-27 Joseph Myers <joseph@codesourcery.com> 1168 1169 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate 1170 standard attributes. 1171 11722020-10-23 Marek Polacek <polacek@redhat.com> 1173 1174 PR c++/91741 1175 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div. 1176 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR. 1177 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR. 1178 * c-tree.h (char_type_p): Declare. 1179 * c-typeck.c (char_type_p): No longer static. 1180 11812020-10-23 Martin Sebor <msebor@redhat.com> 1182 1183 PR middle-end/97552 1184 * c-decl.c (get_parm_array_spec): Handle static VLA parameters. 1185 11862020-09-19 Martin Sebor <msebor@redhat.com> 1187 1188 PR c/50584 1189 * c-decl.c (lookup_last_decl): Define new function. 1190 (c_decl_attributes): Call it. 1191 (start_decl): Add argument and use it. 1192 (finish_decl): Call build_attr_access_from_parms and decl_attributes. 1193 (get_parm_array_spec): Define new function. 1194 (push_parm_decl): Call get_parm_array_spec. 1195 (start_function): Call warn_parm_array_mismatch. Build attribute 1196 access and add it to current function. 1197 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches 1198 in forms of array parameters. 1199 * c-tree.h (start_decl): Add argument. 1200 12012020-09-19 Sandra Loosemore <sandra@codesourcery.com> 1202 1203 * c-decl.c (c_break_label, c_cont_label): Delete, and replace 1204 with... 1205 (in_statement): New. 1206 (start_function): Adjust for above change. 1207 (c_push_function_context, c_pop_function_context): Likewise. 1208 * c-lang.h (struct language_function): Likewise. 1209 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define. 1210 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label): 1211 New. 1212 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt. 1213 (c_parser_switch_statement): Adjust break/switch context handling 1214 and calls to renamed functions. 1215 (c_parser_while_statement): Adjust break/switch context handling and 1216 build a WHILE_STMT. 1217 (c_parser_do_statement): Ditto, with DO_STMT respectively. 1218 (c_parser_for_statement): Ditto, with FOR_STMT respectively. 1219 (c_parser_omp_for_loop): Adjust break/switch context handling. 1220 * c-tree.h (c_break_label, c_cont_label): Delete. 1221 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define. 1222 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define. 1223 (in_statement, switch_statement_break_seen_p): Declare. 1224 (c_start_case, c_finish_case): Renamed to... 1225 (c_start_switch, c_finish_switch). 1226 (c_finish_bc_stmt): Adjust arguments. 1227 * c-typeck.c (build_function_call_vec): Don't try to print 1228 statements with %qE format. 1229 (struct c_switch): Rename switch_expr field to switch_stmt. 1230 Add break_stmt_seen_p field. 1231 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT 1232 instead of a SWITCH_EXPR. Update for changes to struct c_switch. 1233 (do_case): Update for changes to struct c_switch. 1234 (c_finish_case): Rename to c_finish_switch. Update for changes to 1235 struct c_switch and change of representation from SWITCH_EXPR to 1236 SWITCH_STMT. 1237 (c_finish_loop): Delete. 1238 (c_finish_bc_stmt): Update to reflect changes to break/continue 1239 state representation. Build a BREAK_STMT or CONTINUE_STMT instead 1240 of a GOTO_EXPR except for objc foreach loops. 1241 12422020-09-01 Jakub Jelinek <jakub@redhat.com> 1243 1244 PR c++/96867 1245 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER 1246 only on PARM_DECLs. 1247 12482020-08-28 Martin Sebor <msebor@redhat.com> 1249 1250 PR c/96596 1251 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous 1252 argument type. 1253 12542020-08-27 Martin Liska <mliska@suse.cz> 1255 1256 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector 1257 growth function to true. 1258 12592020-08-25 Tobias Burnus <tobias@codesourcery.com> 1260 1261 PR c/96678 1262 * c-typeck.c (handle_omp_array_sections_1): Talk about 1263 array function parameter in the error message. 1264 12652020-08-18 Jakub Jelinek <jakub@redhat.com> 1266 1267 PR c/96571 1268 * c-parser.c (c_parser_generic_selection): Change match_found from bool 1269 to int, holding index of the match. Call mark_exp_read on the selector 1270 expression and on expressions other than the selected one. 1271 12722020-08-01 Richard Sandiford <richard.sandiford@arm.com> 1273 1274 PR c/96377 1275 * c-typeck.c (process_init_element): Split test for whether to 1276 recurse into a record, union or array into... 1277 (initialize_elementwise_p): ...this new function. Don't recurse 1278 into a vector type if the initialization value is also a vector. 1279 12802020-07-31 Richard Biener <rguenther@suse.de> 1281 1282 PR debug/96383 1283 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG): 1284 Define to c_common_finalize_early_debug. 1285 12862020-07-22 Tobias Burnus <tobias@codesourcery.com> 1287 1288 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause. 1289 (c_parser_omp_critical): Permit hint(0) clause without named critical. 1290 (c_parser_omp_construct): Don't assert if error_mark_node is returned. 1291 12922020-07-21 Sunil K Pandey <skpgkp2@gmail.com> 1293 1294 PR target/95237 1295 * c-decl.c (finish_decl): Call target hook 1296 lower_local_decl_alignment to lower local decl alignment. 1297 12982020-07-09 Julian Brown <julian@codesourcery.com> 1299 Thomas Schwinge <thomas@codesourcery.com> 1300 1301 PR middle-end/95270 1302 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero 1303 for standalone attach/detach clauses. 1304 13052020-07-08 Eric Botcazou <ebotcazou@adacore.com> 1306 1307 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is 1308 set, warn for conversion between pointers that point to incompatible 1309 scalar storage orders. 1310 13112020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com> 1312 1313 * c-parser.c (c_parser_statement_after_labels): Pass correct 1314 parameters to c_parser_do_statement. 1315 13162020-06-16 Jakub Jelinek <jakub@redhat.com> 1317 1318 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore 1319 c_in_omp_for. 1320 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid 1321 premature c_fully_fold. Defer explicit c_fully_fold calls to after 1322 c_finish_omp_for. 1323 * c-tree.h (c_in_omp_for): Declare. 1324 * c-typeck.c (c_in_omp_for): Define. 1325 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for. 1326 (digest_init): Likewise. 1327 (build_binary_op): Likewise. 1328 13292020-06-16 Jakub Jelinek <jakub@redhat.com> 1330 1331 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated 1332 from kind by comma rather than colon. 1333 13342020-06-05 Mark Wielaard <mark@klomp.org> 1335 1336 * c-decl.c (implicit_decl_warning): When warned and olddecl is 1337 an undeclared builtin, then add a fixit header hint, if found. 1338 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to 1339 warning_at about implicit builtin declaration type mismatch. 1340 13412020-06-03 Mark Wielaard <mark@klomp.org> 1342 1343 * c-parser.c (struct c_parser): Add seen_string_literal 1344 bitfield. 1345 (c_parser_consume_token): Reset seen_string_literal. 1346 (c_parser_error_richloc): Add name_hint if seen_string_literal 1347 and next token is a CPP_NAME and we have a missing header 1348 suggestion for the name. 1349 (c_parser_string_literal): Set seen_string_literal. 1350 13512020-06-03 Mark Wielaard <mark@klomp.org> 1352 1353 * c-parser.c (c_parser_postfix_expression_after_primary): Add 1354 scope with matching_parens after CPP_OPEN_PAREN. 1355 13562020-06-03 Tobias Burnus <tobias@codesourcery.com> 1357 1358 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine. 1359 13602020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com> 1361 1362 * Make-lang.in: Remove extra slash. 1363 13642020-05-19 Martin Liska <mliska@suse.cz> 1365 1366 * c-parser.c: Fix typo. 1367 13682020-05-14 Jakub Jelinek <jakub@redhat.com> 1369 1370 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target. 1371 13722020-05-07 Richard Biener <rguenther@suse.de> 1373 1374 PR middle-end/94703 1375 * gimple-parser.c (c_parser_parse_ssa_name): Do not set 1376 DECL_GIMPLE_REG_P. 1377 13782020-04-30 Jakub Jelinek <jakub@redhat.com> 1379 1380 PR c/94842 1381 * c-decl.c (set_labels_context_r): In addition to context-less 1382 LABEL_DECLs adjust also LABEL_DECLs with context equal to 1383 parent function if any. 1384 (store_parm_decls): Adjust comment. 1385 13862020-04-19 Jakub Jelinek <jakub@redhat.com> 1387 1388 PR objc/94637 1389 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like 1390 two CPP_COLON tokens. 1391 13922020-04-17 Jakub Jelinek <jakub@redhat.com> 1393 1394 PR other/94629 1395 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment 1396 to data.clauses. 1397 13982020-04-15 Jakub Jelinek <jakub@redhat.com> 1399 1400 PR c/94593 1401 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject 1402 requires directive when not at file scope. 1403 14042020-04-08 Tobias Burnus <tobias@codesourcery.com> 1405 1406 PR middle-end/94120 1407 * c-decl.c (c_check_in_current_scope): New function. 1408 * c-tree.h (c_check_in_current_scope): Declare it. 1409 * c-parser.c (c_parser_oacc_declare): Add check that variables 1410 are declared in the same scope as the directive. Fix handling 1411 of namespace vars. 1412 14132020-04-07 Jakub Jelinek <jakub@redhat.com> 1414 1415 PR c++/94512 1416 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED 1417 if c_parser_omp_master succeeded. 1418 14192020-03-23 Jakub Jelinek <jakub@redhat.com> 1420 1421 PR gcov-profile/94029 1422 PR c/94239 1423 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to 1424 the function_start_locus location. Don't do that afterwards for the 1425 __GIMPLE body parsing. 1426 14272020-03-19 Jakub Jelinek <jakub@redhat.com> 1428 1429 PR gcov-profile/94029 1430 * c-tree.h (finish_function): Add location_t argument defaulted to 1431 input_location. 1432 * c-parser.c (c_parser_compound_statement): Add endlocp argument and 1433 set it to the locus of closing } if non-NULL. 1434 (c_parser_compound_statement_nostart): Return locus of closing }. 1435 (c_parser_parse_rtl_body): Likewise. 1436 (c_parser_declaration_or_fndef): Propagate locus of closing } to 1437 finish_function. 1438 * c-decl.c (finish_function): Add end_loc argument, use it instead of 1439 input_location to set function_end_locus. 1440 14412020-03-17 Jakub Jelinek <jakub@redhat.com> 1442 1443 PR c/94172 1444 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1 1445 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE. 1446 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs. 1447 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to 1448 ENUMERAL_TYPEs. 1449 (finish_incomplete_vars): New function, moved from finish_struct. Use 1450 relayout_decl instead of layout_decl. 1451 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS 1452 being TYPE_VFIELD. Use finish_incomplete_vars. 1453 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call 1454 finish_incomplete_vars. 1455 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS 1456 also on ENUMERAL_TYPEs. 1457 14582020-03-16 Jakub Jelinek <jakub@redhat.com> 1459 1460 PR c/94179 1461 * c-fold.c (c_fully_fold_internal): Handle MEM_REF. 1462 14632020-03-13 Martin Sebor <msebor@redhat.com> 1464 1465 PR c/94040 1466 * c-decl.c (builtin_structptr_type_count): New constant. 1467 (match_builtin_function_types): Reject decls that are incompatible 1468 in types pointed to by pointers. 1469 (diagnose_mismatched_decls): Adjust comments. 1470 14712020-03-05 Joseph Myers <joseph@codesourcery.com> 1472 1473 PR c/93577 1474 * c-typeck.c (pop_init_level): Do not diagnose initializers as 1475 empty when initialized type is error_mark_node. 1476 (set_designator, process_init_element): Ignore initializers for 1477 elements of a variable-size type or of error_mark_node. 1478 14792020-03-01 Martin Sebor <msebor@redhat.com> 1480 1481 PR middle-end/93926 1482 * c-decl.c (types_close_enough_to_match): New function. 1483 (match_builtin_function_types): 1484 (diagnose_mismatched_decls): Add missing inform call to a warning. 1485 14862020-03-01 Martin Sebor <msebor@redhat.com> 1487 1488 PR c/93812 1489 * c-typeck.c (build_functype_attribute_variant): New function. 1490 (composite_type): Call it. 1491 14922020-02-25 Jakub Jelinek <jakub@redhat.com> 1493 1494 PR other/93912 1495 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability): 1496 Rename last argument from probablity to probability. 1497 14982020-02-13 Jakub Jelinek <jakub@redhat.com> 1499 1500 PR c/93576 1501 * c-decl.c (grokdeclarator): If this_size_varies, only push size into 1502 *expr if it has side effects. 1503 15042020-01-30 Jeff Law <law@redhat.com> 1505 1506 PR c/88660 1507 * c-parser.c (c_parser_switch_statement): Make sure to request 1508 marking the switch expr as used. 1509 15102020-01-22 Joseph Myers <joseph@codesourcery.com> 1511 1512 PR c/93348 1513 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on 1514 argument with integer operands. 1515 15162020-01-16 Kerem Kat <keremkat@gmail.com> 1517 1518 PR c/92833 1519 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop 1520 to support 4 available tokens. 1521 15222020-01-15 Joseph Myers <joseph@codesourcery.com> 1523 1524 PR c/93072 1525 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to 1526 determine whether to set DECL_CONTEXT. 1527 15282020-01-13 Joseph Myers <joseph@codesourcery.com> 1529 1530 PR c/93241 1531 * c-typeck.c (build_c_cast): Check for expressions with integer 1532 operands that can occur in an unevaluated part of an integer 1533 constant expression and call note_integer_operands as needed. 1534 15352019-01-08 Richard Biener <rguenther@suse.de> 1536 1537 PR middle-end/93199 1538 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN 1539 permanently. 1540 15412020-01-01 Jakub Jelinek <jakub@redhat.com> 1542 1543 Update copyright years. 1544 15452019-12-20 Eric Botcazou <ebotcazou@adacore.com> 1546 1547 * c-decl.c (collect_source_ref_cb): Delete. 1548 (for_each_global_decl): Rename into... 1549 (collect_source_refs): ...this. Call collect_source_ref directly. 1550 (c_parse_final_cleanups): Always call collect_source_ref on the main 1551 input filename. 1552 15532019-12-19 Julian Brown <julian@codesourcery.com> 1554 Cesar Philippidis <cesar@codesourcery.com> 1555 1556 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and 1557 detach clauses. 1558 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter. 1559 Allow deref (->) in variable lists if true. 1560 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter. 1561 Pass to c_parser_omp_variable_list. 1562 (c_parser_oacc_data_clause): Support attach and detach clauses. Update 1563 call to c_parser_omp_variable_list. 1564 (c_parser_oacc_all_clauses): Support attach and detach clauses. 1565 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK, 1566 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK, 1567 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH. 1568 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH. 1569 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach 1570 and detach. Support deref. 1571 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of 1572 GOMP_MAP_ALWAYS_POINTER for OpenACC. 1573 (c_oacc_check_attachments): New function. 1574 (c_finish_omp_clauses): Check attach/detach arguments for being 1575 pointers using above. Support deref. 1576 15772019-12-19 Julian Brown <julian@codesourcery.com> 1578 Maciej W. Rozycki <macro@codesourcery.com> 1579 Tobias Burnus <tobias@codesourcery.com> 1580 Thomas Schwinge <thomas@codesourcery.com> 1581 1582 * c-parser.c (c_parser_omp_clause_name): Support no_create. 1583 (c_parser_oacc_data_clause): Likewise. 1584 (c_parser_oacc_all_clauses): Likewise. 1585 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK) 1586 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add 1587 PRAGMA_OACC_CLAUSE_NO_CREATE. 1588 * c-typeck.c (handle_omp_array_sections): Support 1589 GOMP_MAP_NO_ALLOC. 1590 15912019-12-09 David Malcolm <dmalcolm@redhat.com> 1592 1593 * c-objc-common.c (range_label_for_type_mismatch::get_text): 1594 Replace label_text ctor calls. 1595 15962019-12-04 Joseph Myers <joseph@codesourcery.com> 1597 1598 PR c/36941 1599 PR c/88827 1600 * c-typeck.c (convert_lvalue_to_rvalue): Call 1601 require_complete_type for arguments not of void types. 1602 (build_indirect_ref): Do not diagnose dereferencing pointers to 1603 incomplete types. 1604 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove. 1605 16062019-12-03 Joseph Myers <joseph@codesourcery.com> 1607 1608 PR c/88704 1609 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in 1610 old-style parameter definitions. 1611 16122019-12-01 Sandra Loosemore <sandra@codesourcery.com> 1613 1614 PR target/92499 1615 1616 * c-decl.c (flexible_array_type_p): Move to common code. 1617 16182019-11-30 Richard Sandiford <richard.sandiford@arm.com> 1619 1620 * c-decl.c (start_decl): Allow initialization of variables whose 1621 size is a POLY_INT_CST. 1622 (finish_decl): Use verify_type_context to check whether the target 1623 allows variables with a particular type to have static or thread-local 1624 storage duration. Don't raise a second error if such variables do 1625 not have a constant size. 1626 (grokdeclarator): Use verify_type_context to check whether the 1627 target allows fields or array elements to have a particular type. 1628 * c-typeck.c (pointer_diff): Use verify_type_context to test whether 1629 the target allows pointer difference for the types involved. 1630 (build_unary_op): Likewise for pointer increment and decrement. 1631 16322019-11-29 Joseph Myers <joseph@codesourcery.com> 1633 1634 * c-parser.c (struct c_parser): Add members raw_tokens and 1635 raw_tokens_used. 1636 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and 1637 using previously-lexed raw tokens. 1638 (c_parser_peek_nth_token_raw) 1639 (c_parser_check_balanced_raw_token_sequence): New functions. 1640 (c_parser_nth_token_starts_std_attributes): Use 1641 c_parser_check_balanced_raw_token_sequence for Objective-C. 1642 16432019-11-25 Joseph Myers <joseph@codesourcery.com> 1644 1645 PR c/91985 1646 * c-decl.c (finish_declspecs): Use int instead of decimal 1647 floating-point types if decimal floating-point not supported. 1648 16492019-11-25 Joseph Myers <joseph@codesourcery.com> 1650 1651 * c-tree.h (struct c_declarator): Use a structure for id member. 1652 * c-decl.c (grokdeclarator): Extract attributes from cdk_id 1653 declarators at the start, not when handling individual declarators 1654 later. Use u.id.id instead of u.id. 1655 (grokfield): Use u.id.id instead of u.id. 1656 (build_id_declarator): Set u.id.id and u.id.attrs. 1657 (finish_declspecs): Handle postfix attributes in case of typedef 1658 name or typeof used. 1659 * c-parser.c (c_parser_direct_declarator) 1660 (c_parser_direct_declarator_inner): Place declarator for 1661 attributes inside that for function or array, not outside. Set 1662 u.id.attrs for identifiers. 1663 (c_parser_parameter_declaration): Use u.id.id instead of u.id. 1664 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id 1665 instead of u.id. 1666 16672019-11-22 Jakub Jelinek <jakub@redhat.com> 1668 1669 PR c/90677 1670 * c-decl.c (identifier_global_tag): Define. 1671 16722019-11-20 Richard Biener <rguenther@suse.de> 1673 1674 PR c/92088 1675 * c-decl.c (grokdeclarator): Prevent inlining of nested 1676 function with VLA arguments. 1677 16782019-11-20 Joseph Myers <joseph@codesourcery.com> 1679 1680 * c-decl.c (c_warn_type_attributes): New function. 1681 (groktypename, grokdeclarator, finish_declspecs): Call 1682 c_warn_type_attributes before applying attributes to types. 1683 * c-tree.h (c_warn_type_attributes): Declare. 1684 16852019-11-19 Joseph Myers <joseph@codesourcery.com> 1686 1687 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for 1688 standard attributes. 1689 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use 1690 pedwarn for unknown standard attributes and return error_mark_node 1691 for them. 1692 16932019-11-18 Matthew Malcomson <matthew.malcomson@arm.com> 1694 1695 * c-parser.c (c_parser_parse_rtl_body): Always call 1696 run_rtl_passes, even if startwith pass is not provided. 1697 16982019-11-15 Joseph Myers <joseph@codesourcery.com> 1699 1700 * c-parser.c (c_parser_std_attribute_specifier): Diagnose 1701 duplicate standard attributes. 1702 17032019-11-15 Joseph Myers <joseph@codesourcery.com> 1704 1705 * c-decl.c (std_attribute_table): Add maybe_unused. 1706 17072019-11-15 Joseph Myers <joseph@codesourcery.com> 1708 1709 * c-decl.c (std_attribute_table): Add fallthrough. 1710 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough 1711 attribute at top level. 1712 17132019-11-15 Joseph Myers <joseph@codesourcery.com> 1714 1715 * c-decl.c (std_attribute_table): New. 1716 (c_init_decl_processing): Register attributes from 1717 std_attribute_table. 1718 * c-parser.c (c_parser_attribute_arguments): Add arguments 1719 require_string and allow_empty_args. All callers changed. 1720 (c_parser_std_attribute): Set require_string argument for 1721 "deprecated" attribute. 1722 17232019-11-14 Joseph Myers <joseph@codesourcery.com> 1724 1725 * c-parser.c (c_parser_postfix_expression) 1726 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR. 1727 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise. 1728 17292019-11-14 Richard Sandiford <richard.sandiford@arm.com> 1730 1731 * c-typeck.c (build_conditional_expr): Use truth_type_for instead 1732 of build_same_sized_truth_vector_type. 1733 (build_vec_cmp): Likewise. 1734 17352019-11-14 Jakub Jelinek <jakub@redhat.com> 1736 1737 * c-parser.c (c_parser_omp_context_selector): Don't require score 1738 argument to fit into shwi, just to be INTEGER_CST. Diagnose 1739 negative score. 1740 1741 * c-parser.c (c_parser_omp_context_selector): Rename 1742 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID. 1743 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single 1744 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers 1745 and string literals. 1746 17472019-11-14 Joseph Myers <joseph@codesourcery.com> 1748 1749 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and 1750 ctsk_tagfirstref_attrs. 1751 (struct c_declspecs): Update description of attrs. Add 1752 postfix_attrs and non_std_attrs_seen_p. Increase size of 1753 typespec_kind bit-field. 1754 (c_warn_unused_attributes): New declaration. 1755 (parser_xref_tag): Update prototype. 1756 * c-decl.c (c_warn_unused_attributes): New function. 1757 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and 1758 ctsk_tagref_attrs. Handle attribute declarations. 1759 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs. 1760 (grokdeclarator): Handle standard attributes. 1761 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply 1762 attributes to incomplete type reference. 1763 (xref_tag): Update call to parser_xref_tag. 1764 (declspecs_add_addrspace, declspecs_add_type) 1765 (declspecs_add_scspec, declspecs_add_attrs): Set 1766 non_std_attrs_seen_p. 1767 (finish_declspecs): Apply postfix standard attributes to type. 1768 * c-parser.c (c_token_starts_declspecs) 1769 (c_token_starts_declaration, c_parser_next_token_starts_declspecs) 1770 (c_parser_next_tokens_start_declaration): Update comments. 1771 (c_parser_consume_token, c_parser_consume_pragma): Handle moving 1772 parser->tokens[2] to parser->tokens[1]. 1773 (c_parser_nth_token_starts_std_attributes) 1774 (c_parser_std_attribute_specifier_sequence): New functions. 1775 (c_parser_declaration_or_fndef): Add arguments have_attrs and 1776 attrs. All callers changed. Handle standard attributes. 1777 (c_parser_parms_declarator, c_parser_parms_list_declarator) 1778 (c_parser_parameter_declaration): Add argument have_gnu_attrs. 1779 All callers changed. 1780 (c_parser_declspecs): Add arguments start_std_attr_ok and 1781 end_std_attr_ok. All callers changed. Handle standard 1782 attributes. 1783 (c_parser_enum_specifier, c_parser_struct_or_union_specifier) 1784 (c_parser_direct_declarator, c_parser_direct_declarator_inner) 1785 (c_parser_compound_statement_nostart, c_parser_all_labels) 1786 (c_parser_label, c_parser_statement, c_parser_for_statement): 1787 Handle standard attributes. 1788 * c-parser.h (c_parser_declspecs): Update prototype. 1789 * gimple-parser.c (c_parser_gimple_declaration): Update call to 1790 c_parser_declspecs. 1791 17922019-11-12 Martin Liska <mliska@suse.cz> 1793 1794 * gimple-parser.c: Do not include params.h. 1795 17962019-11-12 Martin Liska <mliska@suse.cz> 1797 1798 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax 1799 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET 1800 macro. 1801 18022019-11-12 Maciej W. Rozycki <macro@codesourcery.com> 1803 Frederik Harwath <frederik@codesourcery.com> 1804 1805 gcc/c/ 1806 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro. 1807 (c_parser_oacc_kernels_parallel): Rename function to... 1808 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL. 1809 (c_parser_omp_construct): Update accordingly. 1810 1811 18122019-11-11 Jakub Jelinek <jakub@redhat.com> 1813 1814 * c-parser.c (c_parser_translation_unit): Diagnose declare target 1815 without corresponding end declare target. 1816 18172019-11-08 Richard Sandiford <richard.sandiford@arm.com> 1818 1819 * c-convert.c (convert): Only handle vector conversions if one of 1820 the types satisfies gnu_vector_type_p or if -flax-vector-conversions 1821 allows it. 1822 * c-typeck.c (build_array_ref): Only allow vector indexing if the 1823 vectors satisfy gnu_vector_type_p. 1824 (build_unary_op): Only allow unary operators to be applied to 1825 vectors if they satisfy gnu_vector_type_p. 1826 (digest_init): Only allow by-element initialization of vectors 1827 if they satisfy gnu_vector_type_p. 1828 (really_start_incremental_init): Likewise. 1829 (push_init_level): Likewise. 1830 (pop_init_level): Likewise. 1831 (process_init_element): Likewise. 1832 (build_binary_op): Only allow binary operators to be applied to 1833 vectors if they satisfy gnu_vector_type_p. 1834 18352019-11-08 Joseph Myers <joseph@codesourcery.com> 1836 1837 * c-decl.c (grokparms): Convert () in a function definition to 1838 (void) for C2x. 1839 (store_parm_decls_oldstyle): Pedwarn for C2x. 1840 (store_parm_decls): Update comment about () not generating a 1841 prototype. 1842 18432019-11-07 Joseph Myers <joseph@codesourcery.com> 1844 1845 * c-parser.c (c_parser_attribute_arguments): New function. 1846 Factored out of c_parser_gnu_attribute. 1847 (c_parser_gnu_attribute): Use c_parser_attribute_arguments. 1848 (c_parser_balanced_token_sequence, c_parser_std_attribute) 1849 (c_parser_std_attribute_specifier): New functions. 1850 (c_parser_transaction_attributes): Use 1851 c_parser_std_attribute_specifier. 1852 18532019-11-07 Joseph Myers <joseph@codesourcery.com> 1854 1855 * c-parser.c (c_parser): Remove lex_untranslated_string. Add 1856 lex_joined_string and translate_strings_p. 1857 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to 1858 c_lex_with_flags. 1859 (c_parser_string_literal): New function. 1860 (c_parser_static_assert_declaration_no_semi): Use 1861 c_parser_string_literal. Do not set lex_untranslated_string. 1862 (c_parser_asm_string_literal): Use c_parser_string_literal. 1863 (c_parser_simple_asm_expr): Do not set lex_untranslated_string. 1864 (c_parser_gnu_attributes): Set and restore translate_strings_p 1865 instead of lex_untranslated_string. 1866 (c_parser_asm_statement): Do not set lex_untranslated_string. 1867 (c_parser_asm_operands): Likewise. 1868 (c_parser_has_attribute_expression): Set and restore 1869 translate_strings_p instead of lex_untranslated_string. 1870 (c_parser_postfix_expression): Use c_parser_string_literal. 1871 (pragma_lex): Likewise. 1872 (c_parser_pragma_pch_preprocess): Set lex_joined_string. 1873 (c_parse_file): Set translate_strings_p. 1874 * gimple-parser.c (c_parser_gimple_postfix_expression) 1875 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal. 1876 * c-parser.c (c_parser_string_literal): Declare function. 1877 18782019-11-02 Jakub Jelinek <jakub@redhat.com> 1879 1880 * c-parser.c (c_finish_omp_declare_variant): Use 1881 omp_get_context_selector instead of c_omp_get_context_selector. 1882 18832019-10-29 Richard Sandiford <richard.sandiford@arm.com> 1884 1885 * c-tree.h (c_simulate_enum_decl): Declare. 1886 * c-decl.c (c_simulate_enum_decl): New function. 1887 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above. 1888 18892019-10-29 Richard Sandiford <richard.sandiford@arm.com> 1890 1891 * c-tree.h (c_simulate_builtin_function_decl): Declare. 1892 * c-decl.c (c_simulate_builtin_function_decl): New function. 1893 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define 1894 to the above. 1895 18962019-10-28 Martin Sebor <msebor@redhat.com> 1897 1898 PR c/66970 1899 * c-decl.c (names_builtin_p): Define a new function. 1900 19012019-10-28 Richard Biener <rguenther@suse.de> 1902 1903 PR c/92249 1904 * gimple-parser.c (c_parser_parse_gimple_body): Make 1905 current_bb the entry block initially to easier recover 1906 from errors. 1907 (c_parser_gimple_compound_statement): Adjust. 1908 19092019-10-24 Jakub Jelinek <jakub@redhat.com> 1910 1911 * c-parser.c (c_finish_omp_declare_variant): Use 1912 omp_context_selector_matches instead of 1913 c_omp_context_selector_matches. 1914 * c-decl.c (c_decl_attributes): Add "omp declare target block" 1915 attribute in between declare target and end declare target 1916 pragmas. 1917 19182019-10-15 Joseph Myers <joseph@codesourcery.com> 1919 1920 * c-parser.c (c_parser_attribute_any_word): Rename to 1921 c_parser_gnu_attribute_any_word. All callers changed. 1922 (c_parser_attribute): Rename to c_parser_gnu_attribute. All 1923 callers changed. 1924 (c_parser_attributes): Rename to c_parser_gnu_attributes. All 1925 callers changed. 1926 (c_parser_declaration_or_fndef, c_parser_declspecs) 1927 (c_parser_enum_specifier, c_parser_struct_or_union_specifier) 1928 (c_parser_struct_declaration, c_parser_declarator) 1929 (c_parser_gnu_attribute, c_parser_compound_statement) 1930 (c_parser_label, c_parser_statement, c_parser_objc_method_decl) 1931 (c_parser_transaction_attributes): Add "gnu-" prefix to names of 1932 attribute-related syntax productions. 1933 19342019-10-14 Richard Sandiford <richard.sandiford@arm.com> 1935 1936 * c-objc-common.c (useful_aka_type_p): Replace with... 1937 (get_aka_type): ...this new function. Given the original type, 1938 decide which aka type to print (if any). Only look through typedefs 1939 if user_facing_original_type_p. 1940 (print_type): Update accordingly. 1941 19422019-10-14 Jakub Jelinek <jakub@redhat.com> 1943 1944 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument 1945 into int NESTED, if it is 2, diagnose missing commas in between 1946 clauses. 1947 (c_parser_omp_context_selector): Pass 2 as last argument to 1948 c_parser_omp_all_clauses. 1949 19502019-10-12 Jakub Jelinek <jakub@redhat.com> 1951 1952 * c-parser.c (c_parser_omp_context_selector): Improve error recovery. 1953 For simd properties, put them directly into TREE_VALUE. 1954 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant. 1955 If c_omp_context_selector_matches is 0, don't add attribute, otherwise 1956 add "omp declare variant base" attribute rather than 1957 "omp declare variant". 1958 19592019-10-11 Joseph Myers <joseph@codesourcery.com> 1960 1961 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types. 1962 19632019-10-10 Jakub Jelinek <jakub@redhat.com> 1964 1965 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if 1966 true, terminate processing on closing paren and don't skip to end of 1967 pragma line. 1968 (c_parser_omp_declare_simd): Handle also declare variant. 1969 (omp_construct_selectors, omp_device_selectors, 1970 omp_implementation_selectors, omp_user_selectors): New variables. 1971 (c_parser_omp_context_selector, 1972 c_parser_omp_context_selector_specification, 1973 c_finish_omp_declare_variant): New functions. 1974 (c_finish_omp_declare_simd): Handle both declare simd and 1975 declare variant. 1976 (c_parser_omp_declare): Handle declare variant. 1977 19782019-10-02 Joseph Myers <joseph@codesourcery.com> 1979 1980 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two 1981 CPP_COLON tokens. 1982 19832019-10-01 Richard Sandiford <richard.sandiford@arm.com> 1984 1985 * c-objc-common.c (useful_aka_type_p): New function. 1986 (print_type): Use it to decide whether an aka type is worth printing. 1987 19882019-09-27 Jakub Jelinek <jakub@redhat.com> 1989 1990 PR c++/88203 1991 * c-parser.c (c_parser_predefined_identifier): New function. 1992 (c_parser_postfix_expression): Use it. 1993 (c_parser_omp_variable_list): Parse predefined identifiers. 1994 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables 1995 in shared and firstprivate clauses, even when they are predetermined 1996 shared. 1997 19982019-09-27 Richard Sandiford <richard.sandiford@arm.com> 1999 2000 * c-typeck.c (build_function_call_vec): Take the original function 2001 decl as an optional final parameter. Pass all built-in calls to 2002 check_builtin_function_arguments. 2003 20042019-09-20 Eric Botcazou <ebotcazou@adacore.com> 2005 2006 PR c/91815 2007 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes 2008 of identifiers in the external scope only for variables and functions. 2009 20102019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> 2011 2012 PR c/78736 2013 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion. 2014 20152019-08-23 Iain Sandoe <iain@sandoe.co.uk> 2016 2017 PR pch/61250 2018 * c-parser.c (c_parse_file): Call c_common_no_more_pch () 2019 after determining that the first token is not 2020 PRAGMA_GCC_PCH_PREPROCESS. 2021 20222019-08-22 Eric Botcazou <ebotcazou@adacore.com> 2023 2024 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a 2025 FUNCTION_DECL to the right value in the presence of nested declarators. 2026 20272019-08-13 Richard Sandiford <richard.sandiford@arm.com> 2028 2029 PR middle-end/91421 2030 * c-decl.c (merge_decls): Use copy_decl_built_in_function. 2031 20322019-08-13 Richard Sandiford <richard.sandiford@arm.com> 2033 2034 PR middle-end/91421 2035 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead 2036 of a built_in_function. 2037 (diagnose_mismatched_decls, implicitly_declare): Update accordingly. 2038 20392019-08-10 Jakub Jelinek <jakub@redhat.com> 2040 2041 * c-parser.c (c_parser_omp_clause_name): Parse device_type. 2042 (c_parser_omp_clause_device_type): New function. 2043 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE. 2044 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE. 2045 (c_parser_omp_declare_target): Handle device_type clauses. Remove 2046 diagnostics for declare target with clauses nested in clause-less 2047 declare target declaration-definition-seq. 2048 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE. 2049 20502019-08-09 Jakub Jelinek <jakub@redhat.com> 2051 2052 * c-parser.c (check_no_duplicate_clause): Simplify using 2053 omp_find_clause. 2054 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data 2055 directive name modifiers. 2056 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause. 2057 2058 PR c/91401 2059 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the 2060 check_no_duplicate_clause call. Comment it out, instead emit a 2061 warning for duplicate dist_schedule clauses. 2062 20632019-08-08 Richard Sandiford <richard.sandiford@arm.com> 2064 2065 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED. 2066 20672019-08-08 Jakub Jelinek <jakub@redhat.com> 2068 2069 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP 2070 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap 2071 instead of generic_head to track duplicates. 2072 20732019-08-07 Jakub Jelinek <jakub@redhat.com> 2074 2075 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause. 2076 (c_parser_omp_clause_use_device_addr): New function. 2077 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. 2078 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. 2079 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR 2080 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no 2081 map or use_device_* clauses. 2082 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR 2083 in OpenMP, require pointer type rather than pointer or array type. 2084 Handle OMP_CLAUSE_USE_DEVICE_ADDR. 2085 20862019-07-31 Jakub Jelinek <jakub@redhat.com> 2087 2088 PR c/91192 2089 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range 2090 even if finish is UNKNOWN_LOCATION, just use start as finish in that 2091 case. 2092 20932019-07-25 Martin Liska <mliska@suse.cz> 2094 Dominik Infuhr <dominik.infuehr@theobroma-systems.com> 2095 2096 PR c++/23383 2097 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag. 2098 20992019-07-25 Martin Liska <mliska@suse.cz> 2100 2101 * c-decl.c (merge_decls): Use new macros 2102 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P). 2103 21042019-07-23 Richard Biener <rguenther@suse.de> 2105 2106 PR tree-optimization/83518 2107 * gimple-parser.c (c_parser_parse_gimple_body): When we have 2108 a CFG also rebuild cgraph edges. 2109 21102019-07-20 Jakub Jelinek <jakub@redhat.com> 2111 2112 * c-parser.c (c_parser_omp_clause_name): Handle bind clause. 2113 (c_parser_omp_clause_bind): New function. 2114 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND. 2115 (OMP_LOOP_CLAUSE_MASK): Define. 2116 (c_parser_omp_loop): New function. 2117 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of 2118 loop combined with parallel or teams. 2119 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP. 2120 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND. 2121 21222019-07-18 Richard Sandiford <richard.sandiford@arm.com> 2123 2124 PR c/53633 2125 * c-decl.c (finish_function): Check targetm.warn_func_return 2126 before issuing a -Wreturn-type warning. 2127 21282019-07-12 Alexandre Oliva <oliva@adacore.com> 2129 2130 * gimple-parser.c (c_parser_gimple_try_stmt): New. 2131 (c_parser_compound_statement): Call it. 2132 21332019-07-12 Jakub Jelinek <jakub@redhat.com> 2134 2135 * c-parser.c (c_parser_omp_clause_name): Handle order clause. 2136 (c_parser_omp_clause_order): New function. 2137 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER. 2138 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add 2139 PRAGMA_OMP_CLAUSE_ORDER. 2140 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER. 2141 21422019-07-10 Richard Biener <rguenther@suse.de> 2143 2144 * gimple-parser.c (c_parser_gimple_postfix_expression): Support 2145 _Literal (int *) &x for address literals. 2146 21472019-07-09 Martin Sebor <msebor@redhat.com> 2148 2149 PR c++/61339 2150 * c-decl.c (xref_tag): Change class-key of PODs to struct and others 2151 to class. 2152 (field_decl_cmp): Same. 2153 * c-parser.c (c_parser_struct_or_union_specifier): Same. 2154 * c-tree.h: Same. 2155 * gimple-parser.c (c_parser_gimple_compound_statement): Same. 2156 21572019-07-09 Martin Sebor <msebor@redhat.com> 2158 2159 PR c++/61339 2160 * c-decl.c: Change class-key from class to struct and vice versa 2161 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod. 2162 * gimple-parser.c: Same. 2163 21642019-07-01 Richard Biener <rguenther@suse.de> 2165 2166 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle 2167 _Literal (char *) &"foo" for address literals pointing to 2168 STRING_CSTs. 2169 21702019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com> 2171 2172 * c-parser.c (c_parse_init): Create keyword for "__intN__" type. 2173 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO 2174 C incompatibility if alternate "__intN__" form is used. 2175 21762019-06-24 Martin Sebor <msebor@redhat.com> 2177 2178 * c-typeck.c (build_binary_op): Hyphenate floating-point. 2179 21802019-06-10 Jakub Jelinek <jakub@redhat.com> 2181 2182 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN. 2183 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions. 2184 (c_parser_omp_scan_loop_body): New function. 2185 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are 2186 inscan reduction clauses. 2187 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with 2188 non-inscan reductions on the same construct, or inscan reductions with 2189 ordered or schedule clauses, or inscan array reductions. 2190 21912019-06-05 Martin Sebor <msebor@redhat.com> 2192 2193 PR c/90737 2194 * c-typeck.c (c_finish_return): Only consider functions returning 2195 pointers as candidates for -Wreturn-local-addr. 2196 21972019-06-05 Martin Sebor <msebor@redhat.com> 2198 2199 * c-decl.c (start_decl): Adjust quoting and hyphenation 2200 in diagnostics. 2201 (finish_decl): Same. 2202 (finish_enum): Same. 2203 (start_function): Same. 2204 (declspecs_add_type): Same. 2205 * c-parser.c (warn_for_abs): Same. 2206 * c-typeck.c (build_binary_op): Same. 2207 22082019-05-17 Thomas Schwinge <thomas@codesourcery.com> 2209 2210 PR c/89433 2211 * c-parser.c (c_finish_oacc_routine): Rework checking if already 2212 marked with an OpenACC 'routine' directive. 2213 2214 PR c/89433 2215 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses. 2216 (c_finish_oacc_routine): Call oacc_verify_routine_clauses. 2217 2218 PR c/89433 2219 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine' 2220 clauses from "omp declare target" attribute. 2221 22222019-05-16 Martin Sebor <msebor@redhat.com> 2223 2224 * c-decl.c (start_decl): Quote keywords, operators, and 2225 types in diagnostics. 2226 (finish_decl): Same. 2227 * c-parser.c (c_parser_asm_statement): Same. 2228 (c_parser_conditional_expression): Same. 2229 (c_parser_transaction_cancel): Same. 2230 * c-typeck.c (c_common_type): Same. 2231 (build_conditional_expr): Same. 2232 (digest_init): Same. 2233 (process_init_element): Same. 2234 (build_binary_op): Same. 2235 22362019-05-17 Richard Biener <rguenther@suse.de> 2237 2238 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM. 2239 (c_parser_gimple_unary_expression): Likewise. 2240 (c_parser_gimple_parentized_ternary_expression): New function. 2241 22422019-05-16 Richard Biener <rguenther@suse.de> 2243 2244 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT. 2245 (c_parser_gimple_unary_expression): Likewise. 2246 22472019-05-15 Richard Biener <rguenther@suse.de> 2248 2249 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle 2250 __BIT_FIELD_REF. 2251 22522019-05-14 Richard Biener <rguenther@suse.de> 2253 2254 * gimple-parser.c (c_parser_gimple_statement): Remove 2255 questionable auto-promotion to VIEW_CONVERT_EXPR. 2256 (c_parser_gimple_typespec): Split out from __MEM parsing. 2257 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT. 2258 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR 2259 as __VIEW_CONVERT with -gimple. 2260 22612019-05-09 Martin Liska <mliska@suse.cz> 2262 2263 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and 2264 __MAX. 2265 (c_parser_gimple_unary_expression): Parse also binary expression 2266 __MIN and __MAX. 2267 (c_parser_gimple_parentized_binary_expression): New function. 2268 22692019-05-09 Martin Liska <mliska@suse.cz> 2270 2271 * gimple-parser.c (struct gimple_parser): Add probability. 2272 for gimple_parser_edge. 2273 (gimple_parser::push_edge): Add new argument probability. 2274 (c_parser_gimple_parse_bb_spec): Parse also probability 2275 if present. 2276 (c_parser_parse_gimple_body): Set edge probability. 2277 (c_parser_gimple_compound_statement): Consume token 2278 before calling c_parser_gimple_goto_stmt. 2279 Parse BB counts. 2280 (c_parser_gimple_statement): Pass new argument. 2281 (c_parser_gimple_goto_stmt): Likewise. 2282 (c_parser_gimple_if_stmt): Likewise. 2283 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold. 2284 * c-parser.c (c_parser_declaration_or_fndef): Pass 2285 hot_bb_threshold argument. 2286 * c-tree.h (struct c_declspecs): Add hot_bb_threshold 2287 field. 2288 (c_parser_gimple_parse_bb_spec_edge_probability): New. 2289 22902019-04-26 Jakub Jelinek <jakub@redhat.com> 2291 2292 PR debug/90197 2293 * c-tree.h (c_finish_loop): Add 2 further location_t arguments. 2294 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller. 2295 (c_parser_do_statement): Likewise. 2296 (c_parser_for_statement): Likewise. Formatting fixes. 2297 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments, 2298 emit DEBUG_BEGIN_STMTs if needed. 2299 23002019-04-19 Jakub Jelinek <jakub@redhat.com> 2301 2302 PR c/89888 2303 * c-typeck.c (struct c_switch): Remove outside_range_p member. 2304 (c_start_case): Don't clear it. 2305 (do_case): Adjust c_add_case_label caller. 2306 (c_finish_case): Adjust c_do_switch_warnings caller. 2307 2308 PR c++/90108 2309 * c-decl.c (merge_decls): If remove is main variant and 2310 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE 2311 variant that has newdecl as TYPE_NAME if any. 2312 23132019-04-12 Jakub Jelinek <jakub@redhat.com> 2314 2315 PR c/89933 2316 * c-decl.c (merge_decls): When newdecl's type is its main variant, 2317 don't try to remove it from the variant list, but instead assert 2318 it has no variants. 2319 23202019-04-01 Richard Biener <rguenther@suse.de> 2321 2322 PR c/71598 2323 * c-tree.h (c_get_alias_set): Declare. 2324 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set. 2325 * c-objc-common.c (c_get_alias_set): Treat enumeral types 2326 as the underlying integer type. 2327 23282019-03-19 Martin Sebor <msebor@redhat.com> 2329 2330 PR tree-optimization/89688 2331 * c-decl.c (finish_decl): Call braced_lists_to_string for more 2332 kinds of initializers. 2333 23342019-03-19 Jakub Jelinek <jakub@redhat.com> 2335 2336 PR c/89734 2337 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function 2338 return type even if quals_used is 0. Formatting fixes. 2339 23402019-03-14 Richard Biener <rguenther@suse.de> 2341 2342 * c-tree.h (enum c_declspec_il): New. 2343 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il 2344 enum bitfield. 2345 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly. 2346 Pass start pass and declspec_il to c_parser_parse_gimple_body. 2347 (c_parser_declspecs): Adjust. 2348 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h, 2349 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h 2350 and bitmap.h. 2351 (struct gimple_parser): New. 2352 (gimple_parser::push_edge): New method. 2353 (c_parser_gimple_parse_bb_spec): New helper. 2354 (c_parser_parse_gimple_body): Get start pass and IL specification. 2355 Initialize SSA and CFG. 2356 (c_parser_gimple_compound_statement): Handle CFG and SSA build. 2357 Build a gimple_parser parsing state and pass it along. 2358 (c_parser_gimple_statement): Change intermittend __PHI internal 2359 function argument for the edge. 2360 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags. 2361 (c_parser_gimple_goto_stmt): Record edges to build. 2362 (c_parser_gimple_if_stmt): Likewise. 2363 * gimple-parser.h (c_parser_parse_gimple_body): Adjust. 2364 (c_parser_gimple_or_rtl_pass_list): Likewise. 2365 23662019-03-11 Martin Liska <mliska@suse.cz> 2367 2368 * c-decl.c (check_for_loop_decls): Wrap an option name 2369 in a string format message and fix GNU coding style. 2370 * c-parser.c (c_parser_declspecs): Likewise. 2371 23722019-03-08 Jakub Jelinek <jakub@redhat.com> 2373 2374 PR tree-optimization/89550 2375 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at 2376 returned true. 2377 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn 2378 or warning returned true. 2379 23802019-02-28 Jakub Jelinek <jakub@redhat.com> 2381 2382 PR c/89525 2383 * c-typeck.c (convert_arguments): Call inform_declaration only if 2384 the previous warning_at call returned true. 2385 23862019-02-22 Thomas Schwinge <thomas@codesourcery.com> 2387 2388 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal 2389 parameter. Adjust all users. 2390 (c_parser_oacc_simple_clause): Replace parser with loc formal 2391 parameter. Adjust all users. 2392 23932019-02-19 Chung-Lin Tang <cltang@codesourcery.com> 2394 2395 PR c/87924 2396 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait 2397 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments. 2398 23992019-02-15 Jakub Jelinek <jakub@redhat.com> 2400 2401 PR c/89340 2402 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions 2403 before c_decl_attributes rather than after it. 2404 24052019-02-06 Jakub Jelinek <jakub@redhat.com> 2406 2407 PR c/89211 2408 * c-parser.c (c_parser_declaration_or_fndef): Don't update 2409 DECL_ARGUMENTS of d if it has been defined already. Use a single if 2410 instead of 3 nested ifs. 2411 24122019-02-06 Joseph Myers <joseph@codesourcery.com> 2413 2414 PR c/88584 2415 * c-decl.c (finish_decl): Do not complete array types for arrays 2416 with external linkage not at file scope. 2417 24182019-02-05 Richard Biener <rguenther@suse.de> 2419 2420 PR c/88606 2421 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on 2422 all type variants when not supported. 2423 24242019-01-30 Jakub Jelinek <jakub@redhat.com> 2425 2426 PR c/89061 2427 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define. 2428 * c-decl.c (decl_jump_unsafe): Return false for 2429 C_DECL_COMPOUND_LITERAL_P decls. 2430 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P. 2431 24322019-01-29 Jakub Jelinek <jakub@redhat.com> 2433 2434 PR c/89045 2435 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter 2436 scope. 2437 2438 PR c/86125 2439 * c-decl.c (last_fileptr_type): Remove. 2440 (last_structptr_types): New variable. 2441 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of 2442 {old,new}rettype instead of the types themselves. Assert 2443 last_structptr_types array has the same number of elements 2444 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for 2445 argument oldtype and newtype. Instead of handling 2446 just fileptr_type_node specially, handle all builtin_structptr_types 2447 pointer nodes. Formatting fix. 2448 24492019-01-24 Martin Sebor <msebor@redhat.com> 2450 2451 PR c/86125 2452 PR c/88886 2453 PR middle-end/86308 2454 * c-decl.c (match_builtin_function_types): Add arguments. 2455 (diagnose_mismatched_decls): Diagnose mismatched declarations 2456 of built-ins more strictly. 2457 24582019-01-24 Jakub Jelinek <jakub@redhat.com> 2459 2460 PR c++/88976 2461 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if 2462 on #pragma omp cancel with different modifiers. 2463 24642019-01-18 H.J. Lu <hongjiu.lu@intel.com> 2465 2466 PR c/51628 2467 PR c/88664 2468 * c-typeck.c (convert_for_assignment): Upate the 2469 warn_for_address_or_pointer_of_packed_member call. 2470 24712019-01-16 Tom Honermann <tom@honermann.net> 2472 Jason Merrill <jason@redhat.com> 2473 2474 * c-typeck.c (digest_init): Revised the error message produced for 2475 ill-formed cases of array initialization with a string literal. 2476 (error_init): Make variadic. 2477 24782019-01-12 Jakub Jelinek <jakub@redhat.com> 2479 2480 * c-typeck.c (convert_for_assignment): Fix a comment typo. 2481 24822019-01-07 Jakub Jelinek <jakub@redhat.com> 2483 2484 PR c/88701 2485 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl 2486 if current_function_decl is non-NULL. 2487 24882019-01-07 Joseph Myers <joseph@codesourcery.com> 2489 2490 PR c/88720 2491 PR c/88726 2492 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine 2493 whether a function is nested, not DECL_EXTERNAL. Diagnose inline 2494 functions declared but never defined only for external scope, not 2495 for other scopes. 2496 24972019-01-07 Jakub Jelinek <jakub@redhat.com> 2498 2499 PR c++/85052 2500 * c-parser.c (c_parser_postfix_expression): Parse 2501 __builtin_convertvector. 2502 25032019-01-01 Jakub Jelinek <jakub@redhat.com> 2504 2505 Update copyright years. 2506 25072018-12-20 H.J. Lu <hongjiu.lu@intel.com> 2508 2509 PR c/51628 2510 * c-typeck.c (convert_for_assignment): Call 2511 warn_for_address_or_pointer_of_packed_member. 2512 25132018-12-19 Segher Boessenkool <segher@kernel.crashing.org> 2514 2515 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give 2516 a more specific error message (instead of just falling through). 2517 25182018-12-19 Segher Boessenkool <segher@kernel.crashing.org> 2519 2520 * c-parser.c (c_parser_asm_statement): Keep track of the location each 2521 asm qualifier is first seen; use that to give nicer "duplicate asm 2522 qualifier" messages. Delete 'quals" variable, instead pass the 2523 "is_volatile_ flag to build_asm_stmt directly. 2524 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree. 2525 * c-typeck.c (build_asm_stmt): Ditto; adjust. 2526 25272018-12-19 Segher Boessenkool <segher@kernel.crashing.org> 2528 2529 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without 2530 "done" boolean variable. 2531 25322018-12-19 David Malcolm <dmalcolm@redhat.com> 2533 2534 PR c++/87504 2535 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch): 2536 Move from here to gcc-rich-location.h and gcc-rich-location.c. 2537 (build_binary_op): Use struct op_location_t and 2538 class binary_op_rich_location. 2539 25402018-12-11 Jakub Jelinek <jakub@redhat.com> 2541 2542 PR sanitizer/88426 2543 * c-convert.c (convert): Call c_fully_fold before calling 2544 ubsan_instrument_float_cast. 2545 25462018-12-08 Segher Boessenkool <segher@kernel.crashing.org> 2547 2548 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line 2549 setting "quals". 2550 25512018-12-06 Segher Boessenkool <segher@kernel.crashing.org> 2552 2553 * c-parser.c (c_parser_asm_statement): Detect the inline keyword 2554 after asm. Pass a flag for it to build_asm_expr. 2555 * c-tree.h (build_asm_expr): Update declaration. 2556 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to 2557 set ASM_INLINE_P. 2558 25592018-12-06 Segher Boessenkool <segher@kernel.crashing.org> 2560 2561 PR inline-asm/55681 2562 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any 2563 combination of volatile and goto, in any order, without repetitions. 2564 25652018-12-04 James Norris <jnorris@codesourcery.com> 2566 Cesar Philippidis <cesar@codesourcery.com> 2567 Julian Brown <julian@codesourcery.com> 2568 2569 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic 2570 code. 2571 25722018-11-30 Richard Biener <rguenther@suse.de> 2573 2574 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse 2575 _Literal (type) { ... } as empty aggregate or vector constructor. 2576 25772018-11-29 Martin Sebor <msebor@redhat.com> 2578 2579 PR c/88091 2580 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation. 2581 (convert_arguments): Add comments. Pass additional argument to 2582 the function above. 2583 25842018-11-29 Martin Sebor <msebor@redhat.com> 2585 2586 PR c/88172 2587 PR testsuite/88208 2588 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment. 2589 25902018-11-23 Martin Sebor <msebor@redhat.com> 2591 2592 PR testsuite/88098 2593 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead. 2594 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion. 2595 25962018-11-20 Martin Sebor <msebor@redhat.com> 2597 2598 * c-parser.c (c_parser_has_attribute_expression): New function. 2599 (c_parser_attribute): New function. 2600 (c_parser_attributes): Move code into c_parser_attribute. 2601 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION. 2602 26032018-11-15 Martin Sebor <msebor@redhat.com> 2604 2605 PR c/83656 2606 * c-decl.c (header_for_builtin_fn): Declare. 2607 (diagnose_mismatched_decls): Diagnose declarations of built-in 2608 functions without a prototype. 2609 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function. 2610 (convert_argument): Same. 2611 (convert_arguments): Factor code out into convert_argument. 2612 Detect mismatches between built-in formal arguments in calls 2613 to built-in without prototype. 2614 (build_conditional_expr): Same. 2615 (type_or_builtin_type): New function. 2616 (convert_for_assignment): Add argument. Conditionally issue 2617 warnings instead of errors for mismatches. 2618 26192018-11-13 David Malcolm <dmalcolm@redhat.com> 2620 2621 * c-decl.c: Replace "source_location" with "location_t". 2622 * c-tree.h: Likewise. 2623 * c-typeck.c: Likewise. 2624 * gimple-parser.c: Likewise. 2625 26262018-11-09 Jakub Jelinek <jakub@redhat.com> 2627 2628 * c-parser.c (c_parser_omp_clause_final): Use 2629 c_parser_expr_no_commas, convert_lvalue_to_rvalue, 2630 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses 2631 parsing instead of c_parser_paren_condition. 2632 (c_parser_omp_clause_if): Use c_parser_expr_no_commas, 2633 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and 2634 c_fully_fold instead of c_parser_condition. 2635 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks, 2636 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority, 2637 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams, 2638 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use 2639 c_parser_expr_no_commas instead of c_parser_expression. 2640 2641 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on 2642 reduction clause with inscan modifier. 2643 2644 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires 2645 clauses other than atomic_default_mem_order. 2646 26472018-11-08 Jakub Jelinek <jakub@redhat.com> 2648 2649 * c-parser.c: Include memmode.h. 2650 (c_parser_omp_depobj, c_parser_omp_requires): New functions. 2651 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES. 2652 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and 2653 task_reduction clauses. 2654 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION. 2655 For OMP_CLAUSE_DEPEND, parse clause operands as either an array 2656 section, or lvalue assignment expression. 2657 (c_parser_omp_clause_if): Handle cancel and simd modifiers. 2658 (c_parser_omp_clause_lastprivate): Parse optional 2659 conditional: modifier. 2660 (c_parser_omp_clause_hint): Require constant integer expression rather 2661 than just integer expression. 2662 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap 2663 clause. 2664 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments. 2665 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list. 2666 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New 2667 functions. 2668 (c_parser_omp_clause_depend): Parse iterator modifier and handle 2669 iterators. Parse mutexinoutset and depobj kinds. 2670 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction 2671 callers. 2672 (c_parser_omp_all_clauses): Likewise. Handle 2673 PRAGMA_OMP_CLAUSE_NONTEMPORAL and 2674 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION. 2675 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle 2676 default memory order from requires directive if any. Adjust 2677 c_finish_omp_atomic caller. 2678 (c_parser_omp_critical): Allow comma in between (name) and hint clause. 2679 (c_parser_omp_flush): Parse flush with memory-order-clause. 2680 (c_parser_omp_for_loop): Allow NE_EXPR even in 2681 OpenMP loops, adjust c_finish_omp_for caller. 2682 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses. 2683 (c_parser_omp_master): Add p_name, mask and cclauses arguments. 2684 Allow to be called while parsing combined parallel master. 2685 Parse combined master taskloop{, simd}. 2686 (c_parser_omp_parallel): Parse combined 2687 parallel master{, taskloop{, simd}} constructs. 2688 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause. 2689 (OMP_TASKGROUP_CLAUSE_MASK): Define. 2690 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses. 2691 (OMP_TASKWAIT_CLAUSE_MASK): Define. 2692 (c_parser_omp_taskwait): Handle taskwait with depend clauses. 2693 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK 2694 around teams body. Use SET_EXPR_LOCATION. 2695 (c_parser_omp_target_data): Allow target data 2696 with only use_device_ptr clauses. 2697 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set 2698 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask. 2699 (c_parser_omp_requires): New function. 2700 (c_finish_taskloop_clauses): New function. 2701 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses. 2702 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward 2703 declaration. Disallow in_reduction clause when combined with parallel 2704 master. 2705 (c_parser_omp_construct): Adjust c_parser_omp_master and 2706 c_parser_omp_taskgroup callers. 2707 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier 2708 other than cancel. 2709 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION 2710 like OMP_CLAUSE_REDUCTION. 2711 (handle_omp_array_sections): Likewise. Call save_expr on array 2712 reductions before calling build_index_type. Handle depend clauses 2713 with iterators. 2714 (struct c_find_omp_var_s): New type. 2715 (c_find_omp_var_r, c_omp_finish_iterators): New functions. 2716 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause 2717 with static, runtime or auto schedule kinds. Call save_expr for whole 2718 array reduction sizes. Diagnose reductions with zero sized elements 2719 or variable length structures. Diagnose nogroup clause used with 2720 reduction clause(s). Handle depend clause with 2721 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require 2722 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and 2723 some different type for other kinds. Use build_unary_op with 2724 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable. 2725 Handle depend clauses with iterators. Remove no longer needed special 2726 case that predetermined const qualified vars may be specified in 2727 firstprivate clause. Complain if const qualified vars are mentioned 2728 in data-sharing clauses other than firstprivate or shared. Use 2729 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of 2730 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and 2731 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as 2732 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics. 2733 27342018-10-29 David Malcolm <dmalcolm@redhat.com> 2735 2736 * c-decl.c (implicit_decl_warning): Update "is there a suggestion" 2737 logic for change to name_hint::operator bool. 2738 (undeclared_variable): Likewise. 2739 * c-parser.c (c_parser_declaration_or_fndef): Likewise. 2740 (c_parser_parameter_declaration): Likewise. 2741 27422018-10-17 Joseph Myers <joseph@codesourcery.com> 2743 2744 * c-errors.c (pedwarn_c11): New function. 2745 * c-parser.c (disable_extension_diagnostics): Save 2746 warn_c11_c2x_compat and set it to 0. 2747 (restore_extension_diagnostics): Restore warn_c11_c2x_compat. 2748 (c_parser_static_assert_declaration_no_semi): Handle 2749 _Static_assert without string constant. 2750 * c-tree.h (pedwarn_c11): New prototype. 2751 27522018-10-17 David Malcolm <dmalcolm@redhat.com> 2753 2754 * Make-lang.in (selftest-c): New. 2755 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb) 2756 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here 2757 from gcc/Makefile.in. 2758 27592018-10-02 Richard Biener <rguenther@suse.de> 2760 2761 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE. 2762 27632018-09-26 Joseph Myers <joseph@codesourcery.com> 2764 2765 PR c/87390 2766 * c-typeck.c (build_binary_op): Use excess precision for 2767 comparisons of integers and floating-point for C11 and later. 2768 27692018-09-26 Martin Jambor <mjambor@suse.cz> 2770 2771 PR c/87347 2772 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix 2773 comment. 2774 27752018-09-17 David Malcolm <dmalcolm@redhat.com> 2776 2777 * c-objc-common.c (range_label_for_type_mismatch::get_text): 2778 Update for new param. 2779 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text): 2780 Likewise. 2781 27822018-09-17 Martin Jambor <mjambor@suse.cz> 2783 2784 PR c/63886 2785 * c-parser.c: (warn_for_abs): New function. 2786 (c_parser_postfix_expression_after_primary): Call it. 2787 27882018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de> 2789 2790 * c-typeck.c (digest_init): Shorten overlength strings. 2791 27922018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de> 2793 2794 * c-decl.c (finish_decl): Call complete_flexible_array_elts. 2795 27962018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de> 2797 2798 * c-decl.c (finish_decl): Call braced_list_to_string here ... 2799 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here. 2800 28012018-08-30 Alexander Monakov <amonakov@ispras.ru> 2802 2803 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix 2804 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR. 2805 28062018-08-27 David Malcolm <dmalcolm@redhat.com> 2807 2808 PR 87091 2809 * c-decl.c (implicitly_declare): Update call to 2810 maybe_add_include_fixit to suggest overriding the location, as it 2811 is for a note. 2812 * c-objc-common.c (c_tree_printer): Update for conversion of 2813 show_caret_p to a tri-state. 2814 28152018-08-27 Martin Liska <mliska@suse.cz> 2816 2817 * c-decl.c (locate_old_decl): Use new function 2818 fndecl_built_in_p and remove check for FUNCTION_DECL if 2819 possible. 2820 (diagnose_mismatched_decls): Likewise. 2821 (merge_decls): Likewise. 2822 (warn_if_shadowing): Likewise. 2823 (pushdecl): Likewise. 2824 (implicitly_declare): Likewise. 2825 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise. 2826 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise. 2827 * c-typeck.c (build_function_call_vec): Likewise. 2828 (convert_arguments): Likewise. 2829 28302018-08-20 David Malcolm <dmalcolm@redhat.com> 2831 2832 PR other/84889 2833 * c-decl.c (pushtag): Add auto_diagnostic_group instance. 2834 (diagnose_mismatched_decls): Likewise, in various places. 2835 (warn_if_shadowing): Likewise. 2836 (implicit_decl_warning): Likewise. 2837 (implicitly_declare): Likewise. 2838 (undeclared_variable): Likewise. 2839 (declare_label): Likewise. 2840 (grokdeclarator): Likewise. 2841 (start_function): Likewise. 2842 * c-parser.c (c_parser_declaration_or_fndef): Likewise. 2843 (c_parser_parameter_declaration): Likewise. 2844 (c_parser_binary_expression): Likewise. 2845 * c-typeck.c (c_expr_sizeof_expr): Likewise. 2846 (parser_build_binary_op): Likewise. 2847 (build_unary_op): Likewise. 2848 (error_init): Likewise. 2849 (pedwarn_init): Likewise. 2850 (warning_init): Likewise. 2851 (convert_for_assignment): Likewise. 2852 28532018-08-15 David Malcolm <dmalcolm@redhat.com> 2854 2855 * c-objc-common.c: Include "gcc-rich-location.h". 2856 (c_tree_printer): Move implemenation of '%T' to... 2857 (print_type): ...this new function. 2858 (range_label_for_type_mismatch::get_text): New function. 2859 * c-typeck.c (convert_for_assignment): Add type labels to the rhs 2860 range for the various ic_argpass cases. 2861 (class maybe_range_label_for_tree_type_mismatch): New class. 2862 (build_binary_op): Use it when calling binary_op_error. 2863 28642018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> 2865 2866 * c-decl.c (start_decl): Do not warn if variables is named as main 2867 and is a local variable. 2868 28692018-08-15 Iain Sandoe <iain@sandoe.co.uk> 2870 2871 PR c/19315 2872 * c-decl.c (finish_decl): Don't add the 'extern' storage class to 2873 objects of unknown size. 2874 28752018-08-13 Martin Sebor <msebor@redhat.com> 2876 2877 PR tree-optimization/71625 2878 * c-parser.c (c_parser_declaration_or_fndef): Call 2879 braced_list_to_string. 2880 28812018-08-03 Bogdan Harjoc <harjoc@gmail.com> 2882 2883 PR c/86690 2884 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after 2885 errors. 2886 28872018-08-01 Martin Sebor <msebor@redhat.com> 2888 2889 PR tree-optimization/86650 2890 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t) 2891 and TREE_BLOCK (t) from within percent_K_format to this callsite. 2892 28932018-08-01 Jakub Jelinek <jakub@redhat.com> 2894 2895 PR c/85704 2896 * c-typeck.c (init_field_decl_cmp): New function. 2897 (output_pending_init_elements): Use it for field comparisons 2898 instead of pure bit_position comparisons. 2899 29002018-07-12 Jakub Jelinek <jakub@redhat.com> 2901 2902 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable 2903 type here, instead add "omp declare target implicit" attribute. 2904 (finish_decl): Diagnose vars without mappable type here. 2905 29062018-06-20 Chung-Lin Tang <cltang@codesourcery.com> 2907 Thomas Schwinge <thomas@codesourcery.com> 2908 Cesar Philippidis <cesar@codesourcery.com> 2909 2910 * c-parser.c (c_parser_omp_clause_name): Add support for finalize 2911 and if_present. Make present_or_{copy,copyin,copyout,create} aliases 2912 to their non-present_or_* counterparts. Make 'self' an alias to 2913 PRAGMA_OACC_CLAUSE_HOST. 2914 (c_parser_oacc_data_clause): Update GOMP mappings for 2915 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove 2916 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}. 2917 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses. 2918 Remove support for present_or_* clauses. 2919 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses. 2920 (OACC_PARALLEL_CLAUSE_MASK): Likewise. 2921 (OACC_DECLARE_CLAUSE_MASK): Likewise. 2922 (OACC_DATA_CLAUSE_MASK): Likewise. 2923 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses. 2924 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause. 2925 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT. 2926 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses. 2927 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE. 2928 29292018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org> 2930 2931 * c-typeck.c (build_unary_op): Handle ABSU_EXPR; 2932 * gimple-parser.c (c_parser_gimple_statement): Likewise. 2933 (c_parser_gimple_unary_expression): Likewise. 2934 29352018-06-15 Jakub Jelinek <jakub@redhat.com> 2936 2937 PR c/86093 2938 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types 2939 before doing POINTER_DIFF_EXPR. 2940 29412018-06-07 Marek Polacek <polacek@redhat.com> 2942 2943 PR c/85318 2944 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about 2945 for loop initial declarations. 2946 29472018-05-30 David Pagan <dave.pagan@oracle.com> 2948 2949 PR c/55976 2950 * c-decl.c (grokdeclarator): Update check for return type warnings. 2951 (start_function): Likewise. 2952 (finish_function): Likewise. 2953 * c-typeck.c (c_finish_return): Update check for return type warnings. 2954 Pass OPT_Wreturn_type to pedwarn when appropriate. 2955 29562018-05-18 Richard Sandiford <richard.sandiford@linaro.org> 2957 2958 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove 2959 __FMA_EXPR handlng. 2960 29612018-05-17 Richard Sandiford <richard.sandiford@linaro.org> 2962 2963 * gimple-parser.c: Include internal-fn.h. 2964 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call. 2965 (c_parser_gimple_call_internal): New function. 2966 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT. 2967 Fix typos in comment. 2968 29692018-05-10 Jakub Jelinek <jakub@redhat.com> 2970 2971 PR c++/85662 2972 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than 2973 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the 2974 fold_convert_loc. 2975 * c-typeck.c (build_unary_op): Use fold_offsetof rather than 2976 fold_offsetof_1, pass argtype as TYPE to it and drop the 2977 fold_convert_loc. 2978 29792018-05-02 David Pagan <dave.pagan@oracle.com> 2980 2981 PR c/30552 2982 * c-decl.c (old_style_parameter_scope): New function. 2983 * c-parser.c (c_parser_postfix_expression): Check for statement 2984 expressions in old-style function parameter list declarations. 2985 * c-parser.h (old_style_parameter_scope): New extern declaration. 2986 29872018-04-25 Jakub Jelinek <jakub@redhat.com> 2988 2989 PR sanitizer/84307 2990 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when 2991 it is not TREE_STATIC. 2992 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark 2993 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also 2994 its COMPOUND_LITERAL_EXPR_DECL. 2995 29962018-03-21 Joseph Myers <joseph@codesourcery.com> 2997 2998 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath 2999 where all functions return the same _FloatN or _FloatNx type, 3000 treat integer types as _Float64 instead of double. 3001 30022018-03-21 Jakub Jelinek <jakub@redhat.com> 3003 3004 PR c/84999 3005 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when 3006 building vector comparison, diagnose it and return error_mark_node. 3007 30082018-03-15 Jakub Jelinek <jakub@redhat.com> 3009 3010 PR c/84853 3011 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>: 3012 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has 3013 INTEGER_TYPE element type. 3014 30152018-03-13 David Pagan <dave.pagan@oracle.com> 3016 3017 PR c/46921 3018 * c-typeck.c (output_init_element): Ensure field initializer 3019 expression is always evaluated if there are side effects. 3020 30212018-03-06 Jakub Jelinek <jakub@redhat.com> 3022 3023 PR c/84721 3024 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if 3025 !building_stmt_list_p (). 3026 30272018-02-13 Richard Sandiford <richard.sandiford@linaro.org> 3028 3029 PR c/84305 3030 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL 3031 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR 3032 and include the BIND_EXPR in the list of things that need to be 3033 pre-evaluated. 3034 30352018-02-09 Nathan Sidwell <nathan@acm.org> 3036 3037 PR c/84293 3038 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location 3039 to strict_aliasing_warning. 3040 30412018-02-02 Paolo Carlini <paolo.carlini@oracle.com> 3042 3043 * c-typeck.c (really_start_incremental_init, push_init_level, 3044 set_nonincremental_init, output_init_element, process_init_element): 3045 Use DECL_UNNAMED_BIT_FIELD. 3046 30472018-01-31 Marek Polacek <polacek@redhat.com> 3048 3049 PR c/81779 3050 * c-parser.c (c_parser_compound_statement_nostart): Call 3051 expansion_point_location_if_in_system_header. 3052 30532018-01-17 David Malcolm <dmalcolm@redhat.com> 3054 3055 PR c++/83814 3056 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just 3057 the C part. 3058 30592018-01-13 Jakub Jelinek <jakub@redhat.com> 3060 3061 PR c/83801 3062 * c-tree.h (decl_constant_value_1): Add a bool argument. 3063 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow 3064 returning a CONSTRUCTOR if it is true. Use error_operand_p. 3065 (decl_constant_value): Adjust caller. 3066 * c-fold.c (c_fully_fold_internal): If in_init, pass true to 3067 decl_constant_value_1 as IN_INIT. Otherwise, punt if 3068 decl_constant_value returns initializer that has BLKmode or 3069 array type. 3070 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval. 3071 30722018-01-03 Richard Sandiford <richard.sandiford@linaro.org> 3073 Alan Hayward <alan.hayward@arm.com> 3074 David Sherwood <david.sherwood@arm.com> 3075 3076 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial 3077 TYPE_VECTOR_SUBPARTS. 3078 30792018-01-03 Jakub Jelinek <jakub@redhat.com> 3080 3081 Update copyright years. 3082 30832018-01-01 Jakub Jelinek <jakub@redhat.com> 3084 3085 PR c/83595 3086 * c-parser.c (c_parser_braced_init, c_parser_initelt, 3087 c_parser_conditional_expression, c_parser_cast_expression, 3088 c_parser_sizeof_expression, c_parser_alignof_expression, 3089 c_parser_postfix_expression, c_parser_omp_declare_reduction, 3090 c_parser_transaction_expression): Use set_error () method instead 3091 of setting value member to error_mark_node. 3092 30932017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com> 3094 3095 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N> 3096 and _Float<N>X built-in functions. 3097 30982017-12-22 Jakub Jelinek <jakub@redhat.com> 3099 3100 PR debug/83550 3101 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on 3102 TYPE_STUB_DECL and call rest_of_type_compilation before processing 3103 incomplete vars rather than after it. 3104 3105 PR debug/83547 3106 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as 3107 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first, 3108 and consider empty ones if there are no other stmts. For 3109 -Wunused-value walk all statements before the one only followed by 3110 DEBUG_BEGIN_STMTs. 3111 31122017-12-22 Mike Stump <mikestump@comcast.net> 3113 Eric Botcazou <ebotcazou@adacore.com> 3114 3115 * c-parser.c (c_parser_while_statement): Add unroll parameter and 3116 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR. 3117 (c_parser_do_statement): Likewise. 3118 (c_parser_for_statement): Likewise. 3119 (c_parser_statement_after_labels): Adjust calls to above. 3120 (c_parse_pragma_ivdep): New static function. 3121 (c_parser_pragma_unroll): Likewise. 3122 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll. 3123 <PRAGMA_UNROLL>: New case. 3124 31252017-12-19 Jakub Jelinek <jakub@redhat.com> 3126 3127 * c-typeck.c (comptypes_internal, function_types_compatible_p, 3128 perform_integral_promotions, digest_init): Replace Yoda conditions 3129 with typical order conditions. 3130 * c-decl.c (check_bitfield_type_and_width): Likewise. 3131 31322017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de> 3133 3134 * c-typeck.c (c_safe_arg_type_equiv_p, 3135 c_safe_function_type_cast_p): New function. 3136 (build_c_cast): Implement -Wcast-function-type. 3137 31382017-12-14 Richard Biener <rguenther@suse.de> 3139 3140 PR c/83415 3141 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR 3142 like REALPART_EXPR for the behavior of whether its operand 3143 is an lvalue. 3144 31452017-12-12 Marek Polacek <polacek@redhat.com> 3146 3147 PR c/82679 3148 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp. 3149 31502017-12-12 Alexandre Oliva <aoliva@redhat.com> 3151 3152 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true. 3153 * c-parser.c (add_debug_begin_stmt): New. 3154 (c_parser_declaration_or_fndef): Call it. 3155 (c_parser_compound_statement_nostart): Likewise. 3156 (c_parser_statement_after_labels): Likewise. 3157 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers. 3158 31592017-12-07 Joseph Myers <joseph@codesourcery.com> 3160 3161 * c-decl.c (build_compound_literal): Add parameter alignas_align 3162 and set alignment of decl if nonzero. 3163 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS. 3164 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a 3165 qualifier. 3166 (c_parser_struct_declaration): Update syntax comment. 3167 (c_parser_type_name): Add alignas_ok argument and pass it to 3168 c_parser_declspecs. 3169 (c_parser_cast_expression): Pass true to c_parser_type_name and 3170 give error if a cast used an _Alignas specifier. 3171 (c_parser_sizeof_expression): Pass true to c_parser_type_name and 3172 give error if sizeof (type-name) used an _Alignas specifier. 3173 (c_parser_alignof_expression): Pass true to c_parser_type_name and 3174 give error if _Alignof (type-name) used an _Alignas specifier. 3175 (c_parser_postfix_expression_after_paren_type): Check specified 3176 alignment for a compound literal and pass it to 3177 build_compound_literal. 3178 * c-parser.h (c_parser_type_name): Update prototype. 3179 * c-tree.h (build_compound_literal): Update prototype. 3180 31812017-12-07 Martin Sebor <msebor@redhat.com> 3182 3183 PR c/81544 3184 * c-decl.c (c_decl_attributes): Look up existing declaration and 3185 pass it to decl_attributes. 3186 31872017-12-06 David Malcolm <dmalcolm@redhat.com> 3188 3189 PR c/83236 3190 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are 3191 reserved for use by the implementation. 3192 31932017-12-06 David Malcolm <dmalcolm@redhat.com> 3194 3195 * c-decl.c: Include "c-family/c-spellcheck.h". 3196 31972017-12-05 Martin Liska <mliska@suse.cz> 3198 Jakub Jelinek <jakub@redhat.com> 3199 3200 * c-typeck.c (pointer_diff): Add new argument and instrument 3201 pointer subtraction. 3202 (build_binary_op): Similar for pointer comparison. 3203 32042017-12-01 Jakub Jelinek <jakub@redhat.com> 3205 3206 PR c/79153 3207 * c-parser.c: Include tree-iterator.h. 3208 (c_parser_switch_statement): Emit LABEL_EXPR for the break label 3209 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P 3210 on it. 3211 3212 PR c/83222 3213 * c-tree.h (decl_constant_value_1): Declare. 3214 * c-typeck.c (decl_constant_value_1): New function. 3215 (decl_constant_value): Use it. 3216 * c-fold.c (c_fully_fold_internal): If in_init, use 3217 decl_constant_value_1 instead of decl_constant_value. 3218 32192017-11-30 Jakub Jelinek <jakub@redhat.com> 3220 3221 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;. 3222 32232017-11-28 Jakub Jelinek <jakub@redhat.com> 3224 3225 PR sanitizer/81275 3226 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if 3227 c_switch_covers_all_cases_p returns true. 3228 32292017-11-28 Julia Koval <julia.koval@intel.com> 3230 Sebastian Peryt <sebastian.peryt@intel.com> 3231 3232 * Make-lang.in (c/c-array-notation.o): Remove. 3233 * c-array-notation.c: Delete. 3234 * c-decl.c: Remove cilkplus condition. 3235 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for, 3236 c_parser_cilk_verify_simd, c_parser_array_notation, 3237 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize, 3238 c_parser_cilk_simd_fn_vector_attrs, 3239 c_finish_cilk_simd_fn_tokens): Delete. 3240 (c_parser_declaration_or_fndef): Remove cilkplus condition. 3241 (c_parser_direct_declarator_inner): Ditto. 3242 (CILK_SIMD_FN_CLAUSE_MASK): Delete. 3243 (c_parser_attributes, c_parser_compound_statement, 3244 c_parser_statement_after_labels, c_parser_if_statement, 3245 c_parser_switch_statement, c_parser_while_statement, 3246 c_parser_do_statement, c_parser_for_statement, 3247 c_parser_unary_expression, c_parser_postfix_expression, 3248 c_parser_postfix_expression_after_primary, 3249 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses, 3250 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus 3251 support. 3252 * c-typeck.c (build_array_ref, build_function_call_vec, 3253 convert_arguments, 3254 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt, 3255 c_finish_loop, build_binary_op): Remove cilkplus support. 3256 32572017-11-28 Jakub Jelinek <jakub@redhat.com> 3258 3259 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead 3260 of build3. 3261 32622017-11-14 Boris Kolpackov <boris@codesynthesis.com> 3263 3264 * Make-lang.in (c.install-plugin): Install backend import library. 3265 32662017-11-23 Jakub Jelinek <jakub@redhat.com> 3267 3268 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in 3269 pragma_stmt context. 3270 32712017-11-23 Mike Stump <mikestump@comcast.net> 3272 Eric Botcazou <ebotcazou@adacore.com> 3273 3274 * c-parser.c (c_parser_while_statement): Pass 3rd operand to 3275 ANNOTATE_EXPR. 3276 (c_parser_do_statement): Likewise. 3277 (c_parser_for_statement): Likewise. 3278 32792017-11-22 David Malcolm <dmalcolm@redhat.com> 3280 3281 PR c++/62170 3282 * c-objc-common.c (c_tree_printer): Convert penultimate param from 3283 bool to bool *. Within '%T' handling, if showing an "aka", use 3284 "quoted" param to add appropriate quoting. 3285 32862017-11-22 Marek Polacek <polacek@redhat.com> 3287 3288 PR c++/60336 3289 PR middle-end/67239 3290 PR target/68355 3291 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields. 3292 32932017-11-21 David Malcolm <dmalcolm@redhat.com> 3294 3295 PR c/83056 3296 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from 3297 earlier failed lookups. 3298 32992017-11-21 Marc Glisse <marc.glisse@inria.fr> 3300 3301 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR. 3302 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR. 3303 33042017-11-20 David Malcolm <dmalcolm@redhat.com> 3305 3306 PR c/81404 3307 * c-decl.c: Include "c-family/known-headers.h". 3308 (get_c_name_hint): Rename to get_stdlib_header_for_name and move 3309 to known-headers.cc. 3310 (class suggest_missing_header): Move to known-header.h. 3311 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather 3312 than get_c_name_hint. 3313 33142017-11-20 David Malcolm <dmalcolm@redhat.com> 3315 3316 * c-decl.c (get_c_name_hint): New function. 3317 (class suggest_missing_header): New class. 3318 (lookup_name_fuzzy): Call get_c_name_hint and use it to 3319 suggest missing headers to the user. 3320 33212017-11-20 David Malcolm <dmalcolm@redhat.com> 3322 3323 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h. 3324 Include "c-family/name-hint.h" 3325 (implicit_decl_warning): Convert "hint" from 3326 const char * to name_hint. Pass location to 3327 lookup_name_fuzzy. Suppress any deferred diagnostic if the 3328 warning was not printed. 3329 (undeclared_variable): Likewise for "guessed_id". 3330 (lookup_name_fuzzy): Convert return type from const char * 3331 to name_hint. Add location_t param. 3332 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h. 3333 Include "c-family/name-hint.h" 3334 (c_parser_declaration_or_fndef): Convert "hint" from 3335 const char * to name_hint. Pass location to lookup_name_fuzzy. 3336 (c_parser_parameter_declaration): Likewise. 3337 33382017-11-19 Jakub Jelinek <jakub@redhat.com> 3339 3340 PR c/66618 3341 PR c/69960 3342 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold 3343 where needed. 3344 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr, 3345 handle_omp_array_sections): Likewise. 3346 (digest_init): Don't call decl_constant_value_for_optimization. 3347 * c-tree.h (decl_constant_value_for_optimization): Removed. 3348 * c-fold.c (c_fold_array_ref): New function. 3349 (c_fully_fold_internal): Add LVAL argument, propagate it through 3350 recursive calls. For VAR_P call decl_constant_value and 3351 unshare if not LVAL and either optimizing or IN_INIT. Remove 3352 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL, 3353 fold ARRAY_REF with STRING_CST and INTEGER_CST operands. 3354 (c_fully_fold): Add LVAL argument, pass it through to 3355 c_fully_fold_internal. 3356 (decl_constant_value_for_optimization): Removed. 3357 33582017-11-15 Joseph Myers <joseph@codesourcery.com> 3359 3360 PR c/81156 3361 * c-parser.c (check_tgmath_function): New function. 3362 (enum tgmath_parm_kind): New enum. 3363 (c_parser_postfix_expression): Handle __builtin_tgmath. 3364 33652017-10-31 David Malcolm <dmalcolm@redhat.com> 3366 3367 * c-decl.c (implicit_decl_warning): Update for renaming of 3368 pedwarn_at_rich_loc and warning_at_rich_loc. 3369 (implicitly_declare): Likewise for renaming of inform_at_rich_loc. 3370 (undeclared_variable): Likewise for renaming of error_at_rich_loc. 3371 * c-parser.c (c_parser_declaration_or_fndef): Likewise. 3372 (c_parser_struct_or_union_specifier): Likewise for renaming of 3373 pedwarn_at_rich_loc. 3374 (c_parser_parameter_declaration): Likewise for renaming of 3375 error_at_rich_loc. 3376 * c-typeck.c (build_component_ref): Likewise. 3377 (build_unary_op): Likewise for renaming of inform_at_rich_loc. 3378 (pop_init_level): Likewise for renaming of warning_at_rich_loc. 3379 (set_init_label): Likewise for renaming of error_at_rich_loc. 3380 33812017-10-30 Richard Biener <rguenther@suse.de> 3382 3383 * gimple-parser.c (c_parser_gimple_statement): Parse conditional 3384 stmts. 3385 33862017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com> 3387 3388 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma, 3389 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants. 3390 33912017-10-25 David Malcolm <dmalcolm@redhat.com> 3392 3393 PR c/7356 3394 * c-parser.c (c_parser_declaration_or_fndef): Detect missing 3395 semicolons. 3396 33972017-10-25 Jakub Jelinek <jakub@redhat.com> 3398 3399 PR libstdc++/81706 3400 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from 3401 newdecl to corresponding __builtin_ if any. 3402 34032017-10-24 Paolo Carlini <paolo.carlini@oracle.com> 3404 3405 PR c++/82466 3406 * c-decl.c (diagnose_mismatched_decls): Use 3407 OPT_Wbuiltin_declaration_mismatch. 3408 34092017-10-12 David Malcolm <dmalcolm@redhat.com> 3410 3411 * c-parser.c (c_parser_require): Add "type_is_unique" param and 3412 use it to guard calls to maybe_suggest_missing_token_insertion. 3413 (c_parser_parms_list_declarator): Override default value of new 3414 "type_is_unique" param to c_parser_require. 3415 (c_parser_asm_statement): Likewise. 3416 * c-parser.h (c_parser_require): Add "type_is_unique" param, 3417 defaulting to true. 3418 34192017-10-11 Nathan Sidwell <nathan@acm.org> 3420 3421 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too. 3422 34232017-10-10 Richard Sandiford <richard.sandiford@linaro.org> 3424 3425 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when 3426 operating on trees as wide_ints. 3427 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise. 3428 (c_tree_equal): Likewise. 3429 34302017-10-04 David Malcolm <dmalcolm@redhat.com> 3431 3432 * c-decl.c (push_parm_decl): Store c_parm's location into the 3433 PARAM_DECL. 3434 (build_c_parm): Add "loc" param and store it within the c_parm. 3435 * c-parser.c (struct c_parser): Add "last_token_location" field. 3436 (c_parser_consume_token): Store location of the token into the 3437 new field. 3438 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS 3439 when handling a FUNCTION_DECL, if it doesn't already have them. 3440 (c_parser_parameter_declaration): Generate a location for the 3441 parameter, and pass it to the call to build_c_parm. 3442 * c-tree.h (struct c_parm): Add field "loc". 3443 (build_c_parm): Add location_t param. 3444 * c-typeck.c (get_fndecl_argument_location): New function. 3445 (inform_for_arg): New function. 3446 (convert_for_assignment): Use inform_for_arg when dealing with 3447 ic_argpass. 3448 34492017-09-29 Jakub Jelinek <jakub@redhat.com> 3450 3451 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if 3452 width is non-NULL. 3453 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL, 3454 don't SET_DECL_C_BIT_FIELD here. 3455 3456 PR c/82340 3457 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl 3458 instead of trying to set just TREE_READONLY manually. 3459 34602017-09-16 Tom de Vries <tom@codesourcery.com> 3461 3462 PR c/81875 3463 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not 3464 cond itself. 3465 34662017-09-15 Joseph Myers <joseph@codesourcery.com> 3467 3468 PR c/82071 3469 * c-typeck.c (ep_convert_and_check): Just call convert_and_check 3470 for C11. 3471 (build_conditional_expr): For C11, generate result with excess 3472 precision when one argument is an integer and the other is of a 3473 type using excess precision. 3474 34752017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de> 3476 3477 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict. 3478 34792017-09-13 Marek Polacek <polacek@redhat.com> 3480 3481 PR c/82167 3482 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather 3483 than expr.original_type. 3484 34852017-09-12 Nathan Sidwell <nathan@acm.org> 3486 3487 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp, 3488 resort_sorted_fields): Moved from c-family/c-common.c. 3489 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h. 3490 34912017-09-01 Joseph Myers <joseph@codesourcery.com> 3492 3493 PR c/82071 3494 * c-typeck.c (build_atomic_assign): Handle argument with excess 3495 precision. Ensure any EXCESS_PRECISION_EXPR is present in 3496 argument passed to build_binary_op and convert_for_assignment but 3497 not for call to c_fully_fold. 3498 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early. 3499 Ensure build_binary_op is called with argument with original 3500 semantic type. Avoid calling c_fully_fold with an 3501 EXCESS_PRECISION_EXPR from build_binary_op. 3502 35032017-09-01 Jakub Jelinek <jakub@redhat.com> 3504 3505 PR c/81887 3506 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd. 3507 35082017-08-30 Richard Sandiford <richard.sandiford@linaro.org> 3509 Alan Hayward <alan.hayward@arm.com> 3510 David Sherwood <david.sherwood@arm.com> 3511 3512 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE. 3513 (c_common_type): Likewise. Use as_a <scalar_mode> when setting 3514 m1 and m2 to the signed equivalent of a fixed-point 3515 SCALAR_TYPE_MODE. 3516 35172017-08-24 David Malcolm <dmalcolm@redhat.com> 3518 3519 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather 3520 than CAN_HAVE_LOCATION_P when determining whether to use the 3521 location_t value within "value". 3522 35232017-08-21 David Malcolm <dmalcolm@redhat.com> 3524 3525 * c-parser.c (c_parser_expr_list): Use c_expr::get_location () 3526 rather than peeking the location of the first token. 3527 * c-tree.h (c_expr::get_location): New method. 3528 35292017-08-21 David Malcolm <dmalcolm@redhat.com> 3530 3531 * c-typeck.c (build_function_call_vec): Pass arg_loc to call 3532 to check_function_arguments. 3533 35342017-08-18 Marek Polacek <polacek@redhat.com> 3535 3536 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update 3537 commentary. 3538 35392017-08-18 H.J. Lu <hongjiu.lu@intel.com> 3540 3541 PR c/53037 3542 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN. 3543 (check_bitfield_type_and_width): Don't allow bit-field with 3544 warn_if_not_aligned type. 3545 35462017-08-14 Martin Sebor <msebor@redhat.com> 3547 3548 PR c/81117 3549 * c-objc-common.c (c_objc_common_init): Handle 'G'. 3550 35512017-08-11 Marek Polacek <polacek@redhat.com> 3552 3553 PR c/81795 3554 * c-decl.c (pushtag): Only print inform if the warning was printed. 3555 (grokdeclarator): Likewise. 3556 35572017-08-10 David Malcolm <dmalcolm@redhat.com> 3558 3559 * c-parser.c (c_parser_error): Rename to... 3560 (c_parser_error_richloc): ...this, making static, and adding 3561 "richloc" parameter, passing it to the c_parse_error call, 3562 rather than calling c_parser_set_source_position_from_token. 3563 (c_parser_error): Reintroduce, reimplementing in terms of the 3564 above, converting return type from void to bool. 3565 (class token_pair): New class. 3566 (struct matching_paren_traits): New struct. 3567 (matching_parens): New typedef. 3568 (struct matching_brace_traits): New struct. 3569 (matching_braces): New typedef. 3570 (get_matching_symbol): New function. 3571 (c_parser_require): Add param MATCHING_LOCATION, using it to 3572 highlight matching "opening" tokens for missing "closing" tokens. 3573 (c_parser_skip_until_found): Likewise. 3574 (c_parser_static_assert_declaration_no_semi): Convert explicit 3575 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of 3576 class matching_parens, so that the pertinent open parenthesis is 3577 highlighted when there are problems locating the close 3578 parenthesis. 3579 (c_parser_struct_or_union_specifier): Likewise. 3580 (c_parser_typeof_specifier): Likewise. 3581 (c_parser_alignas_specifier): Likewise. 3582 (c_parser_simple_asm_expr): Likewise. 3583 (c_parser_braced_init): Likewise, for matching_braces. 3584 (c_parser_paren_condition): Likewise, for matching_parens. 3585 (c_parser_switch_statement): Likewise. 3586 (c_parser_for_statement): Likewise. 3587 (c_parser_asm_statement): Likewise. 3588 (c_parser_asm_operands): Likewise. 3589 (c_parser_cast_expression): Likewise. 3590 (c_parser_sizeof_expression): Likewise. 3591 (c_parser_alignof_expression): Likewise. 3592 (c_parser_generic_selection): Likewise. 3593 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG, 3594 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR, 3595 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary. 3596 In case CPP_OPEN_PAREN, pass loc_open_paren to the 3597 c_parser_skip_until_found call. 3598 (c_parser_objc_class_definition): Use class matching_parens as 3599 above. 3600 (c_parser_objc_method_decl): Likewise. 3601 (c_parser_objc_try_catch_finally_statement): Likewise. 3602 (c_parser_objc_synchronized_statement): Likewise. 3603 (c_parser_objc_at_property_declaration): Likewise. 3604 (c_parser_oacc_wait_list): Likewise. 3605 (c_parser_omp_var_list_parens): Likewise. 3606 (c_parser_omp_clause_collapse): Likewise. 3607 (c_parser_omp_clause_default): Likewise. 3608 (c_parser_omp_clause_if): Likewise. 3609 (c_parser_omp_clause_num_threads): Likewise. 3610 (c_parser_omp_clause_num_tasks): Likewise. 3611 (c_parser_omp_clause_grainsize): Likewise. 3612 (c_parser_omp_clause_priority): Likewise. 3613 (c_parser_omp_clause_hint): Likewise. 3614 (c_parser_omp_clause_defaultmap): Likewise. 3615 (c_parser_oacc_single_int_clause): Likewise. 3616 (c_parser_omp_clause_ordered): Likewise. 3617 (c_parser_omp_clause_reduction): Likewise. 3618 (c_parser_omp_clause_schedule): Likewise. 3619 (c_parser_omp_clause_num_teams): Likewise. 3620 (c_parser_omp_clause_thread_limit): Likewise. 3621 (c_parser_omp_clause_aligned): Likewise. 3622 (c_parser_omp_clause_linear): Likewise. 3623 (c_parser_omp_clause_safelen): Likewise. 3624 (c_parser_omp_clause_simdlen): Likewise. 3625 (c_parser_omp_clause_depend): Likewise. 3626 (c_parser_omp_clause_map): Likewise. 3627 (c_parser_omp_clause_device): Likewise. 3628 (c_parser_omp_clause_dist_schedule): Likewise. 3629 (c_parser_omp_clause_proc_bind): Likewise. 3630 (c_parser_omp_clause_uniform): Likewise. 3631 (c_parser_omp_for_loop): Likewise. 3632 (c_parser_cilk_clause_vectorlength): Likewise. 3633 (c_parser_cilk_clause_linear): Likewise. 3634 (c_parser_transaction_expression): Likewise. 3635 * c-parser.h (c_parser_require): Add param matching_location with 3636 default UNKNOWN_LOCATION. 3637 (c_parser_error): Convert return type from void to bool. 3638 (c_parser_skip_until_found): Add param matching_location with 3639 default UNKNOWN_LOCATION. 3640 36412017-08-09 Marek Polacek <polacek@redhat.com> 3642 3643 * c-decl.c (build_enumerator): Use true/false instead of 1/0. 3644 * c-tree.h (build_external_ref): Update declaration. 3645 * c-typeck.c (build_array_ref): Use true/false instead of 1/0. 3646 (build_external_ref): Change the type of a parameter to bool. 3647 (parser_build_binary_op): Use true/false instead of 1/0. 3648 (pointer_diff): Likewise. 3649 (build_modify_expr): Likewise. 3650 (set_designator): Change the type of a parameter to bool. 3651 (set_init_index): Use true/false instead of 1/0. 3652 (set_init_label): Likewise. 3653 (output_init_element): Change the type of a parameter to bool. 3654 (output_pending_init_elements): Use true/false instead of 1/0. 3655 (process_init_element): Likewise. 3656 (build_binary_op): Change the type of a parameter to bool. 3657 36582017-08-09 Marek Polacek <polacek@redhat.com> 3659 3660 PR c/81233 3661 * c-typeck.c (pedwarn_init): Make the function take a variable list. 3662 Call emit_diagnostic_valist instead of pedwarn. 3663 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro. 3664 Print the relevant types in diagnostics. 3665 36662017-08-09 Marek Polacek <polacek@redhat.com> 3667 3668 PR c/81417 3669 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to 3670 build_conditional_expr. 3671 * c-parser.c (c_parser_conditional_expression): Create locations for 3672 EXP1 and EXP2 from their source ranges. Pass the locations down to 3673 build_conditional_expr. 3674 * c-tree.h (build_conditional_expr): Update declaration. 3675 * c-typeck.c (build_conditional_expr): Add location_t parameters. 3676 For -Wsign-compare, also print the types. 3677 36782017-08-08 Martin Liska <mliska@suse.cz> 3679 3680 * c-convert.c: Include header files. 3681 * c-typeck.c: Likewise. 3682 36832017-08-07 Martin Liska <mliska@suse.cz> 3684 3685 * c-parser.c (c_parser_attributes): Canonicalize name of an 3686 attribute. 3687 36882017-08-02 Marek Polacek <polacek@redhat.com> 3689 3690 PR c/81289 3691 * c-parser.c (c_parser_unary_expression): Use set_error. 3692 3693 PR c/81448 3694 PR c/81306 3695 * c-warn.c (warn_for_multistatement_macros): Prevent bogus 3696 warnings. Avoid walking MACRO_MAP_LOCATIONS. 3697 36982017-07-31 Jan Hubicka <hubicka@ucw.cz> 3699 Martin Liska <mliska@suse.cz> 3700 3701 * c-typeck.c (c_finish_goto_label): Build gimple predict 3702 statement. 3703 37042017-07-31 Martin Liska <mliska@suse.cz> 3705 3706 PR sanitize/81530 3707 * c-convert.c (convert): Guard condition with flag_sanitize_p 3708 also with current_function_decl non-null equality. 3709 * c-decl.c (grokdeclarator): Likewise. 3710 * c-typeck.c (build_binary_op): Likewise. 3711 37122017-07-25 Marek Polacek <polacek@redhat.com> 3713 3714 * c-decl.c (grokfield): Remove local variable. 3715 37162017-07-25 Marek Polacek <polacek@redhat.com> 3717 3718 PR c/81364 3719 * c-parser.c (c_parser_else_body): Don't warn about multistatement 3720 macro expansion if the body is in { }. 3721 (c_parser_while_statement): Likewise. 3722 (c_parser_for_statement): Likewise. 3723 37242017-07-18 Nathan Sidwell <nathan@acm.org> 3725 3726 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE. 3727 37282017-07-14 David Malcolm <dmalcolm@redhat.com> 3729 3730 * c-decl.c (implicitly_declare): When suggesting a missing 3731 #include, provide a fix-it hint. 3732 37332017-07-06 David Malcolm <dmalcolm@redhat.com> 3734 3735 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests, 3736 and call that instead. 3737 * c-tree.h (selftest::run_c_tests): New decl. 3738 37392017-06-26 Marek Polacek <polacek@redhat.com> 3740 3741 PR c/80116 3742 * c-parser.c (c_parser_if_body): Set the location of the 3743 body of the conditional after parsing all the labels. Call 3744 warn_for_multistatement_macros. 3745 (c_parser_else_body): Likewise. 3746 (c_parser_switch_statement): Likewise. 3747 (c_parser_while_statement): Likewise. 3748 (c_parser_for_statement): Likewise. 3749 (c_parser_statement): Add a default argument. Save the location 3750 after labels have been parsed. 3751 (c_parser_c99_block_statement): Likewise. 3752 37532017-06-19 Richard Biener <rguenther@suse.de> 3754 3755 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle 3756 negated _Literals to parse _Literal (int) -1. 3757 37582017-06-13 Martin Liska <mliska@suse.cz> 3759 3760 PR sanitize/78204 3761 * c-convert.c (convert): Use sanitize_flags_p. 3762 * c-decl.c (grokdeclarator): Likewise. 3763 * c-typeck.c (convert_for_assignment): Likewise. 3764 (c_finish_return): Likewise. 3765 (build_binary_op): Likewise. 3766 37672017-06-08 Jakub Jelinek <jakub@redhat.com> 3768 3769 PR c/81006 3770 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE 3771 to sizetype before size_binop. 3772 37732017-06-07 Jakub Jelinek <jakub@redhat.com> 3774 3775 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead 3776 of TDI_generic. 3777 37782017-06-06 Marek Polacek <polacek@redhat.com> 3779 3780 PR c/79983 3781 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of 3782 ref. 3783 (start_enum): Use the location of TYPE_STUB_DECL of enumtype. 3784 37852017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de> 3786 3787 * c-parser.c (c_parser_binary_expression): Implement the 3788 -Wsizeof_pointer_div warning. 3789 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code 3790 from a parenthesized expression. 3791 (c_parser_expr_list): Use c_last_sizeof_loc. 3792 * c-tree.h (c_last_sizeof_loc): New external. 3793 * c-typeck.c (c_last_sizeof_loc): New variable. 3794 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc. 3795 37962017-05-31 Mikhail Maltsev <maltsevm@gmail.com> 3797 3798 PR testsuite/80580 3799 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels. 3800 38012017-05-30 David Malcolm <dmalcolm@redhat.com> 3802 3803 * c-objc-common.c (c_tree_printer): Gain bool and const char ** 3804 parameters. 3805 38062017-05-24 Martin Sebor <msebor@redhat.com> 3807 3808 PR c/80731 3809 * c-fold.c (c_fully_fold_internal): Adjust. 3810 * c-typeck.c (parser_build_unary_op): Adjust. 3811 38122017-05-23 Thomas Schwinge <thomas@codesourcery.com> 3813 3814 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add 3815 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS", 3816 "VECTOR_LENGTH". 3817 38182017-05-23 Marek Polacek <polacek@redhat.com> 3819 3820 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant 3821 quotes. 3822 38232017-05-22 Jakub Jelinek <jakub@redhat.com> 3824 3825 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal 3826 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if 3827 it returned invariant. Call tree_invariant_p unconditionally 3828 afterwards to decide whether to return expr or op0. 3829 38302017-05-22 Nathan Sidwell <nathan@acm.org> 3831 3832 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling. 3833 38342017-05-19 Thomas Schwinge <thomas@codesourcery.com> 3835 3836 * c-parser.c (c_parser_omp_clause_default): Handle 3837 "OMP_CLAUSE_DEFAULT_PRESENT". 3838 38392017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de> 3840 3841 * config-lang.in (gtfiles): Add c-family/c-format.c. 3842 38432017-05-18 Nathan Sidwell <nathan@acm.org> 3844 3845 * c-decl.c (pushdecl_top_level): Delete unused function. 3846 38472017-05-18 Marek Polacek <polacek@redhat.com> 3848 3849 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0. 3850 (check_earlier_gotos): Likewise. 3851 (define_label): Likewise. 3852 (pending_xref_error): Likewise. 3853 (smallest_type_quals_location): Likewise. 3854 (grokdeclarator): Likewise. 3855 (grokparms): Likewise. 3856 (identifier_global_value): Likewise. 3857 * c-typeck.c (set_nonincremental_init_from_string): Likewise. 3858 (find_init_member): Likewise. 3859 38602017-05-18 Marek Polacek <polacek@redhat.com> 3861 3862 * c-decl.c (start_decl): Use false/true instead of 0/1. 3863 (grokdeclarator): Likewise. 3864 (finish_struct): Likewise. 3865 (start_function): Change the return type to bool. Use false/true 3866 instead of 0/1. 3867 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0. 3868 * c-tree.h (start_function): Update. 3869 * c-typeck.c (same_translation_unit_p): Change the return type to bool. 3870 (set_designator): Change the return type to bool. Use false/true 3871 instead of 0/1. 3872 38732017-05-17 Marek Polacek <polacek@redhat.com> 3874 3875 * c-decl.c: Use NULL_TREE instead of 0 where appropriate. 3876 * c-typeck.c: Likewise. 3877 38782017-05-17 Marek Polacek <polacek@redhat.com> 3879 3880 PR sanitizer/80659 3881 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and 3882 DECL_IGNORED_P even for non-static compound literals. 3883 38842017-05-17 Martin Liska <mliska@suse.cz> 3885 3886 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and 3887 use it instead of int type. 3888 38892017-05-17 Marek Polacek <polacek@redhat.com> 3890 3891 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't 3892 call c_fully_fold. 3893 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs. 3894 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr. 3895 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR. 3896 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with 3897 save_expr. 3898 (c_parser_conditional_expression): Likewise. 3899 * c-tree.h (SAVE_EXPR_FOLDED_P): Define. 3900 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr. 3901 (process_init_element): Likewise. 3902 (build_binary_op): Likewise. 3903 (handle_omp_array_sections_1): Likewise. 3904 39052017-05-12 Thomas Schwinge <thomas@codesourcery.com> 3906 3907 * c-parser.c (c_parser_omp_clause_num_gangs) 3908 (c_parser_omp_clause_num_workers) 3909 (c_parser_omp_clause_vector_length): Merge functions into... 3910 (c_parser_oacc_single_int_clause): ... this new function. Adjust 3911 all users. 3912 39132017-05-11 Nathan Sidwell <nathan@acm.org> 3914 3915 * gimple-parser.c: Don't #include tree-dump.h. 3916 39172017-05-11 Mikhail Maltsev <maltsevm@gmail.com> 3918 3919 PR testsuite/80580 3920 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base. 3921 39222017-05-11 Mikhail Maltsev <maltsevm@gmail.com> 3923 3924 PR testsuite/80580 3925 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle 3926 incorrect __MEM syntax. 3927 39282017-05-11 Mikhail Maltsev <maltsevm@gmail.com> 3929 3930 PR testsuite/80580 3931 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument 3932 type of unary '*'. 3933 39342017-05-09 Nathan Sidwell <nathan@acm.org> 3935 3936 * c-tree.h (pushdecl): Declare. 3937 39382017-05-05 David Malcolm <dmalcolm@redhat.com> 3939 3940 * c-decl.c (warn_defaults_to): Replace report_diagnostic 3941 with diagnostic_report_diagnostic. 3942 * c-errors.c (pedwarn_c99): Likewise. 3943 (pedwarn_c90): Likewise. 3944 39452017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn> 3946 3947 PR c++/80038 3948 * c-gimplify.c (c_gimplify_expr): Remove calls to 3949 cilk_gimplifY_call_params_in_spawned_fn. 3950 39512017-04-25 David Malcolm <dmalcolm@redhat.com> 3952 3953 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it 3954 hint for removing extra semicolon. 3955 39562017-04-21 Jakub Jelinek <jakub@redhat.com> 3957 3958 PR c/80468 3959 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not 3960 enabled, set specs->type to integer_type_node. 3961 39622017-04-03 Jonathan Wakely <jwakely@redhat.com> 3963 3964 * c-array-notation.c: Fix typo in comment. 3965 39662017-03-29 Marek Polacek <polacek@redhat.com> 3967 3968 PR c/79730 3969 * c-decl.c (finish_decl): Check VAR_P. 3970 39712017-03-27 Jakub Jelinek <jakub@redhat.com> 3972 3973 PR middle-end/80162 3974 * c-tree.h (c_mark_addressable): Add array_ref_p argument. 3975 * c-typeck.c (c_mark_addressable): Likewise. Look through 3976 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE 3977 to ARRAY_TYPE. 3978 (build_array_ref): Pass true as array_ref_p to c_mark_addressable. 3979 39802017-03-23 Marek Polacek <polacek@redhat.com> 3981 3982 * c-tree.h: Remove a C_RID_YYCODE reference. 3983 39842017-03-21 Jakub Jelinek <jakub@redhat.com> 3985 3986 PR c/80097 3987 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around 3988 optional COMPOUND_EXPR with ubsan instrumentation. 3989 39902017-03-17 Marek Polacek <polacek@redhat.com> 3991 3992 * c-parser.c: Add C11 references. 3993 39942017-03-15 Marek Polacek <polacek@redhat.com> 3995 3996 * c-parser.c (c_parser_enum_specifier): Remove redundant line. 3997 39982017-03-11 Marek Polacek <polacek@redhat.com> 3999 4000 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting. 4001 40022017-03-10 David Malcolm <dmalcolm@redhat.com> 4003 4004 PR translation/79848 4005 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to 4006 "%qs". 4007 * c-parser.c (c_parser_oacc_shape_clause): Likewise. 4008 40092017-03-09 Marek Polacek <polacek@redhat.com> 4010 4011 PR sanitizer/79757 4012 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style 4013 parameter declarations with initializers. 4014 40152017-03-09 Jakub Jelinek <jakub@redhat.com> 4016 4017 PR c/79969 4018 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of 4019 TYPE_STUB_DECL. 4020 40212017-03-07 Jakub Jelinek <jakub@redhat.com> 4022 4023 PR c/79834 4024 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error 4025 for "may only be used in compound statements" diagnostics, change it 4026 such that the same translatable string is used for all pragmas. For 4027 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the 4028 diagnostics. 4029 (c_parser_omp_cancellation_point, c_parser_omp_target_update, 4030 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change 4031 "may only be used in compound statements" diagnostics, such that the 4032 same translatable string is used for all pragmas. 4033 40342017-03-04 Marek Polacek <polacek@redhat.com> 4035 4036 PR c/79847 4037 * c-decl.c (implicit_decl_warning): Add missing space. 4038 40392017-03-03 Marek Polacek <polacek@redhat.com> 4040 4041 PR c/79758 4042 * c-decl.c (store_parm_decls_oldstyle): Check if the element of 4043 current_function_prototype_arg_types is error_mark_node. Fix 4044 formatting. Use TREE_VALUE instead of TREE_TYPE. 4045 40462017-03-03 Jakub Jelinek <jakub@redhat.com> 4047 4048 PR c/79837 4049 * c-parser.c (c_parser_omp_clause_reduction): Don't mention 4050 %<min%> or %<max%> in the diagnostics, instead mention identifier. 4051 (c_parser_omp_declare_reduction): Don't mention %<min%> in the 4052 diagnostics. 4053 4054 PR c/79836 4055 * c-parser.c (c_parser_generic_selection): Use %<_Generic%> 4056 instead of %<_Generic>. 4057 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>. 4058 (c_parser_omp_target_exit_data): Use %<release%> instead of 4059 %<release>. 4060 40612017-02-28 Jakub Jelinek <jakub@redhat.com> 4062 4063 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...") 4064 instead of just cond ? "..." : "...". 4065 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only 4066 for "enter"/"exit" keyword. 4067 (c_finish_oacc_routine): Don't use %s to supply portions of the 4068 message. 4069 40702017-02-24 Jakub Jelinek <jakub@redhat.com> 4071 4072 PR c++/79588 4073 * c-parser.c (c_parser_postfix_expression_after_primary): Don't 4074 handle -Wrestrict here. 4075 * c-typeck.c (build_function_call_vec): Adjust 4076 check_function_arguments caller. 4077 40782017-02-23 Richard Biener <rguenther@suse.de> 4079 4080 PR c/79684 4081 * gimple-parser.c (c_parser_gimple_statement): Use set_error 4082 to initialize c_exprs to return. 4083 (c_parser_gimple_binary_expression): Likewise. 4084 (c_parser_gimple_unary_expression): Likewise. 4085 (c_parser_gimple_postfix_expression): Likewise. 4086 40872017-02-22 Marek Polacek <polacek@redhat.com> 4088 4089 PR c/79662 4090 * c-typeck.c (convert_arguments): Handle error_mark_node. 4091 40922017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> 4093 4094 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return 4095 value of c_parser_parse_ssa_name against error_mark_node and emit 4096 error if ssa name is anonymous and written as default definition. 4097 40982017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> 4099 4100 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle 4101 FMA_EXPR. 4102 41032017-02-16 Jakub Jelinek <jakub@redhat.com> 4104 4105 PR c++/79512 4106 * c-parser.c (c_parser_omp_target): For -fopenmp-simd 4107 ignore #pragma omp target even when not followed by identifier. 4108 41092017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> 4110 4111 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR. 4112 (c_parser_gimple_unary_expression): Likewise. 4113 41142017-02-13 Jakub Jelinek <jakub@redhat.com> 4115 4116 * c-parser.c (c_parser_oacc_declare): Add missing space in 4117 diagnostics. 4118 41192017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> 4120 4121 PR c/79478 4122 * gimple-parser.c (c_parser_gimple_postfix_expression): Call 4123 set_c_expr_source_range when parsing ssa-name. 4124 41252017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com> 4126 Richard Biener <rguenther@suse.de> 4127 4128 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid 4129 building IL when arguments are error_mark_node. 4130 (c_parser_gimple_unary_expression): Likewise. 4131 (c_parser_gimple_if_stmt): Likewise. 4132 (c_parser_gimple_switch_stmt): Likewise. 4133 (c_parser_gimple_return_stmt): Likewise. 4134 (c_parser_parse_ssa_name): When name lookup fails do not build 4135 an SSA name. Use undeclared rather than not declared in error 4136 reporting. 4137 41382017-02-09 Marek Polacek <polacek@redhat.com> 4139 4140 PR c/79428 4141 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol 4142 instead of c_parser_skip_until_found. 4143 41442017-02-09 Jakub Jelinek <jakub@redhat.com> 4145 4146 PR c/79431 4147 * c-parser.c (c_parser_omp_declare_target): Don't invoke 4148 symtab_node::get on automatic variables. 4149 41502016-02-09 Nathan Sidwell <nathan@codesourcery.com> 4151 Chung-Lin Tang <cltang@codesourcery.com> 4152 4153 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile. 4154 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and 4155 semantic checking. 4156 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs. 4157 41582017-02-07 Richard Biener <rguenther@suse.de> 4159 4160 * gimple-parser.c (c_parser_gimple_expr_list): Simplify. 4161 (c_parser_gimple_postfix_expression_after_primary): 4162 Do not use c_build_function_call_vec to avoid folding and promotion. 4163 Simplify. 4164 41652017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com> 4166 4167 PR lto/79061 4168 * c-decl.c (pop_scope): Pass main_input_filename to 4169 build_translation_unit_decl. 4170 41712017-01-24 David Malcolm <dmalcolm@redhat.com> 4172 4173 * c-parser.c: Include "read-rtl-function.h" and 4174 "run-rtl-passes.h". 4175 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in 4176 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition 4177 production. Update for renaming of field "gimple_pass" to 4178 "gimple_or_rtl_pass". If __RTL was seen, call 4179 c_parser_parse_rtl_body. Convert a timevar_push/pop pair 4180 to an auto_timevar, to cope with early exit. 4181 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of 4182 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of 4183 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list. 4184 Handle RID_RTL. 4185 (c_parser_parse_rtl_body): New function. 4186 * c-tree.h (enum c_declspec_word): Add cdw_rtl. 4187 (struct c_declspecs): Rename field "gimple_pass" to 4188 "gimple_or_rtl_pass". Add field "rtl_p". 4189 * gimple-parser.c (c_parser_gimple_pass_list): Rename to... 4190 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly. 4191 * gimple-parser.h (c_parser_gimple_pass_list): Rename to... 4192 (c_parser_gimple_or_rtl_pass_list): ...this. 4193 41942017-01-20 Marek Polacek <polacek@redhat.com> 4195 4196 PR c/64279 4197 * c-typeck.c (build_conditional_expr): Warn about duplicated branches. 4198 41992017-01-13 Richard Biener <rguenther@suse.de> 4200 4201 * gimple-parser.c (c_parser_gimple_compound_statement): Handle 4202 nops. 4203 42042017-01-13 Richard Biener <rguenther@suse.de> 4205 4206 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse 4207 _Literal ( type-name ) number. 4208 42092017-01-12 Richard Biener <rguenther@suse.de> 4210 4211 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse 4212 __MEM. 4213 42142017-01-11 Jakub Jelinek <jakub@redhat.com> 4215 4216 PR c++/72813 4217 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing 4218 PCH file. 4219 42202017-01-11 Richard Biener <rguenther@suse.de> 4221 4222 PR bootstrap/79052 4223 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing 4224 returns on parse errors. 4225 42262017-01-04 Marek Polacek <polacek@redhat.com> 4227 4228 PR c++/64767 4229 * c-parser.c (c_parser_postfix_expression): Mark zero character 4230 constants by setting original_type in c_expr. 4231 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared 4232 with a zero character constant. 4233 (char_type_p): New function. 4234 42352017-01-04 David Malcolm <dmalcolm@redhat.com> 4236 4237 * c-parser.c (c_parser_declaration_or_fndef): Create a 4238 rich_location at init_loc and parse it to start_init. 4239 (last_init_list_comma): New global. 4240 (c_parser_braced_init): Update last_init_list_comma when parsing 4241 commas. Pass it to pop_init_level. Pass location of closing 4242 brace to pop_init_level. 4243 (c_parser_postfix_expression_after_paren_type): Create a 4244 rich_location at type_loc and parse it to start_init. 4245 (c_parser_omp_declare_reduction): Likewise for loc. 4246 * c-tree.h (start_init): Add rich_location * param. 4247 (pop_init_level): Add location_t param. 4248 * c-typeck.c (struct initializer_stack): Add field 4249 "missing_brace_richloc". 4250 (start_init): Add richloc param, use it to initialize 4251 the stack node's missing_brace_richloc. 4252 (last_init_list_comma): New decl. 4253 (finish_implicit_inits): Pass last_init_list_comma to 4254 pop_init_level. 4255 (push_init_level): When finding missing open braces, add fix-it 4256 hints to the richloc. 4257 (pop_init_level): Add "insert_before" param and pass it 4258 when calling pop_init_level. Add fixits about missing 4259 close braces to any richloc. Use the richloc for the 4260 -Wmissing-braces warning. 4261 (set_designator): Pass last_init_list_comma to pop_init_level. 4262 (process_init_element): Likewise. 4263 42642017-01-01 Jakub Jelinek <jakub@redhat.com> 4265 4266 Update copyright years. 4267 42682016-12-21 Jakub Jelinek <jakub@redhat.com> 4269 4270 PR bootstrap/78817 4271 * c-typeck.c (build_function_call_vec): If check_function_arguments 4272 returns true, set TREE_NO_WARNING on CALL_EXPR. 4273 4274 PR c/77767 4275 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression 4276 to *expr instead of overwriting it. 4277 42782016-12-20 Richard Biener <rguenther@suse.de> 4279 4280 * gimple-parser.c (c_parser_gimple_compound_statement): Improve 4281 error recovery. 4282 (c_parser_gimple_statement): Only build assigns for non-error 4283 stmts. 4284 (c_parser_gimple_postfix_expression_after): Improve error recovery. 4285 42862016-12-14 Martin Jambor <mjambor@suse.cz> 4287 4288 * c-parser.c: Include omp-general.h and omp-offload.h instead of 4289 omp-low.h. 4290 (c_finish_oacc_routine): Adjusted call to 4291 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib 4292 to use their new names. 4293 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to 4294 use its new name. 4295 (c_parser_oacc_update): Likewise. 4296 (c_parser_omp_simd): Likewise. 4297 (c_parser_omp_target_update): Likewise. 4298 * c-typeck.c: Include omp-general.h instead of omp-low.h. 4299 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new 4300 name. 4301 (c_finish_omp_cancellation_point): Likewise. 4302 * gimple-parser.c: Do not include omp-low.h 4303 43042016-12-02 Cesar Philippidis <cesar@codesourcery.com> 4305 James Norris <jnorris@codesourcery.com> 4306 4307 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA, 4308 EXIT_DATA,WAIT} are not used in compound statements. 4309 (c_parser_oacc_enter_exit_data): Update diagnostics. 4310 43112016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de> 4312 4313 PR c++/71973 4314 * c-decl.c (diagnose_mismatched_decls): Use 4315 OPT_Wbuiltin_declaration_mismatch here too. 4316 43172016-11-18 Richard Sandiford <richard.sandiford@arm.com> 4318 Alan Hayward <alan.hayward@arm.com> 4319 David Sherwood <david.sherwood@arm.com> 4320 4321 * c-decl.c (merge_decls): Use SET_DECL_MODE. 4322 (make_label, finish_struct): Likewise. 4323 43242016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com> 4325 Richard Biener <rguenther@suse.de> 4326 4327 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o. 4328 * config-lang.in (gtfiles): Add c/c-parser.h. 4329 * c-tree.h (enum c_declspec_word): Add cdw_gimple. 4330 (struct c_declspecs): Add gimple_pass member and gimple_p flag. 4331 * c-parser.c (enum c_id_kind, struct c_token, 4332 c_parser_next_token_is, c_parser_next_token_is_not, 4333 c_parser_next_token_is_keyword, 4334 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec): 4335 Split out to ... 4336 * c-parser.h: ... new header. 4337 * c-parser.c: Include c-parser.h and gimple-parser.h. 4338 (c_parser_peek_token, c_parser_peek_2nd_token, 4339 c_token_starts_typename, c_parser_next_token_starts_declspecs, 4340 c_parser_next_tokens_start_declaration, c_parser_consume_token, 4341 c_parser_error, c_parser_require, c_parser_skip_until_found, 4342 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token, 4343 c_parser_type_name): Export. 4344 (c_parser_tokens_buf): New function. 4345 (c_parser_error): Likewise. 4346 (c_parser_set_error): Likewise. 4347 (c_parser_declspecs): Handle RID_GIMPLE. 4348 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body 4349 via c_parser_parse_gimple_body. 4350 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token, 4351 c_token_starts_typename, c_parser_next_token_starts_declspecs, 4352 c_parser_next_tokens_start_declaration, c_parser_consume_token, 4353 c_parser_error, c_parser_require, c_parser_skip_until_found, 4354 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token, 4355 c_parser_type_name): Declare. 4356 (struct c_parser): Declare forward. 4357 (c_parser_tokens_buf): Declare. 4358 (c_parser_error): Likewise. 4359 (c_parser_set_error): Likewise. 4360 * gimple-parser.c: New file. 4361 * gimple-parser.h: Likewise. 4362 43632016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> 4364 4365 PR c/35503 4366 * c-parser.c (c_parser_postfix_expression_after_primary): Call 4367 warn_for_restrict. 4368 43692016-09-11 Le-Chun Wu <lcwu@google.com> 4370 Mark Wielaard <mjw@redhat.com> 4371 4372 * c-decl.c (warn_if_shadowing): Use the warning code corresponding 4373 to the given -Wshadow= variant. 4374 43752016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com> 4376 4377 * c-typeck.c: Include memmodel.h. 4378 43792016-10-13 Jakub Jelinek <jakub@redhat.com> 4380 4381 PR target/77957 4382 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null 4383 instead of lhd_return_null_tree_v. 4384 43852016-10-07 Bernd Schmidt <bschmidt@redhat.com> 4386 4387 PR c++/69733 4388 * c-decl.c (smallest_type_quals_location): New static function. 4389 (grokdeclarator): Try to find the correct location for an ignored 4390 qualifier. 4391 43922016-09-26 Marek Polacek <polacek@redhat.com> 4393 4394 PR c/7652 4395 * c-decl.c (pop_scope): Add gcc_fallthrough. 4396 43972016-09-26 Marek Polacek <polacek@redhat.com> 4398 4399 PR c/7652 4400 * c-parser.c (struct c_token): Add flags field. 4401 (c_lex_one_token): Pass it to c_lex_with_flags. 4402 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough)); 4403 into IFN_FALLTHROUGH. 4404 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle 4405 attribute fallthrough after a case label or default label. 4406 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE. 4407 44082016-09-24 Marek Polacek <polacek@redhat.com> 4409 4410 PR c/77490 4411 * c-typeck.c (build_unary_op): Warn about bit not on expressions that 4412 have boolean value. Warn about ++/-- on booleans. 4413 44142016-09-23 Jakub Jelinek <jakub@redhat.com> 4415 4416 * c-parser.c (incomplete_record_decls): Remove unnecessary 4417 = vNULL initialization of file scope vec. 4418 44192016-09-16 Marek Polacek <polacek@redhat.com> 4420 4421 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0. 4422 44232016-09-14 Marek Polacek <polacek@redhat.com> 4424 4425 * c-array-notation.c (create_cmp_incr): Use false instead of 0. 4426 (fix_array_notation_expr): Likewise. 4427 * c-decl.c (finish_decl): Likewise. 4428 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise. 4429 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1. 4430 (function_to_pointer_conversion): Use false instead of 0. 4431 (convert_lvalue_to_rvalue): Likewise. 4432 (parser_build_unary_op): Likewise. 4433 (build_atomic_assign): Likewise. 4434 (build_unary_op): Change nonconvert parameter type to bool, use 4435 true/false instead of 1/0. 4436 (build_binary_op): Use true instead of 1. 4437 44382016-09-13 David Malcolm <dmalcolm@redhat.com> 4439 4440 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming 4441 of add_fixit_insert to add_fixit_insert_before. 4442 44432016-09-13 Marek Polacek <polacek@redhat.com> 4444 4445 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use 4446 it. 4447 44482016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de> 4449 4450 PR c++/77496 4451 * c-parser.c (c_parser_conditional_expression): Pass the rightmost 4452 COMPOUND_EXPR to warn_for_omitted_condop. 4453 44542016-09-07 David Malcolm <dmalcolm@redhat.com> 4455 4456 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use 4457 c_get_substring_location for this new langhook. 4458 44592016-09-02 Jakub Jelinek <jakub@redhat.com> 4460 4461 PR c/65467 4462 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if 4463 flag_openmp. 4464 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue 4465 instead of mark_exp_read on low_bound/length expression. 4466 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads, 4467 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize, 4468 c_parser_omp_clause_priority, c_parser_omp_clause_hint, 4469 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause, 4470 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule, 4471 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams, 4472 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned, 4473 c_parser_omp_clause_linear, c_parser_omp_clause_safelen, 4474 c_parser_omp_clause_simdlen, c_parser_omp_clause_device, 4475 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue 4476 instead of mark_expr_read. 4477 (c_parser_omp_declare_reduction): Reject _Atomic qualified types. 4478 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR, 4479 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine. 4480 * c-tree.h (c_omp_clause_copy_ctor): New prototype. 4481 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified 4482 array section bases outside of depend clause, for depend clause 4483 use convert_lvalue_to_rvalue on the base. 4484 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction, 4485 linear, aligned, map, to and from clauses. 4486 (c_omp_clause_copy_ctor): New function. 4487 44882016-09-01 Marek Polacek <polacek@redhat.com> 4489 4490 PR c/7652 4491 * c-typeck.c (composite_type): Add FALLTHRU comment. 4492 44932016-08-31 David Malcolm <dmalcolm@redhat.com> 4494 4495 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space 4496 to the insertion fixits for "struct", "union", and "enum". 4497 44982016-08-30 David Malcolm <dmalcolm@redhat.com> 4499 4500 * c-decl.c (implicit_decl_warning): Use add_fixit_replace 4501 rather than add_fixit_misspelled_id. 4502 (undeclared_variable): Likewise. 4503 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove 4504 now-redundant "here" params from add_fixit_insert method calls. 4505 (c_parser_parameter_declaration): Likewise. 4506 * c-typeck.c (build_component_ref): Remove now-redundant range 4507 param from add_fixit_replace method calls. 4508 45092016-08-25 Marek Polacek <polacek@redhat.com> 4510 4511 * c-typeck.c (parser_build_binary_op): Pass LHS to 4512 warn_logical_not_parentheses. 4513 45142016-08-25 Marek Polacek <polacek@redhat.com> 4515 4516 PR c/77323 4517 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN 4518 or _FloatN or _FloatNx is not supported. 4519 (finish_declspecs): Set type to integer_type_node when _FloatN or 4520 _FloatNx is not supported. 4521 45222016-08-19 Joseph Myers <joseph@codesourcery.com> 4523 4524 PR c/32187 4525 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value. 4526 (struct c_declspecs): Add field floatn_nx_idx. 4527 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN 4528 and _FloatNx type specifiers. 4529 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs) 4530 (c_parser_declspecs, c_parser_attribute_any_word) 4531 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX. 4532 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types. 4533 (convert_arguments): Avoid promoting _FloatN and _FloatNx types 4534 narrower than double. 4535 45362016-08-12 Jakub Jelinek <jakub@redhat.com> 4537 Martin Liska <mliska@suse.cz> 4538 4539 PR c/67410 4540 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of 4541 % to determine val element to change. Assert that 4542 wchar_bytes * charwidth fits into val array. 4543 45442016-08-12 Marek Polacek <polacek@redhat.com> 4545 4546 PR c/7652 4547 * c-parser.c (c_parser_external_declaration): Add FALLTHRU. 4548 (c_parser_postfix_expression): Likewise. 4549 * c-typeck.c (build_unary_op): Adjust fall through comment. 4550 (c_mark_addressable): Likewise. 4551 45522016-08-11 Jakub Jelinek <jakub@redhat.com> 4553 4554 PR c/72816 4555 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible 4556 array member through typedef, for orig_qual_indirect == 0 clear 4557 orig_qual_type. 4558 45592016-08-08 David Malcolm <dmalcolm@redhat.com> 4560 4561 PR c/64955 4562 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire 4563 this up to selftest::run_c_tests. 4564 (selftest::run_c_tests): New function. 4565 45662016-08-04 Thomas Schwinge <thomas@codesourcery.com> 4567 4568 * c-parser.c (struct oacc_routine_data): Add error_seen and 4569 fndecl_seen members. 4570 (c_finish_oacc_routine): Use these. 4571 (c_parser_declaration_or_fndef): Adjust. 4572 (c_parser_oacc_routine): Likewise. Support more C language 4573 constructs, and improve diagnostics. Move pragma context 4574 checking... 4575 (c_parser_pragma): ... here. 4576 4577 * c-parser.c (struct oacc_routine_data): New. 4578 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it. 4579 Simplify code. 4580 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp 4581 declare target" attribute. 4582 45832016-08-01 Jan Beulich <jbeulich@suse.com> 4584 4585 * c-fold.c (c_fully_fold_internal): Also emit shift count 4586 warnings for vector types. 4587 * c-typeck.c (build_binary_op): Likewise. 4588 45892016-07-29 Marek Polacek <polacek@redhat.com> 4590 4591 PR c/71742 4592 * c-decl.c (finish_struct): Rephrase an error message. 4593 4594 PR c/71853 4595 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type 4596 to error node for invalid code. 4597 4598 PR c/71573 4599 * c-decl.c (implicitly_declare): Return decl early not only for 4600 error_mark_nodes, but for anything that is not a FUNCTION_DECL. 4601 46022016-07-29 Jakub Jelinek <jakub@redhat.com> 4603 4604 PR c/71969 4605 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS 4606 on GNU extern inline functions. 4607 46082016-07-29 Marek Polacek <polacek@redhat.com> 4609 4610 PR c/71583 4611 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also 4612 check expr.value. 4613 46142016-07-22 Uros Bizjak <ubizjak@gmail.com> 4615 4616 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1, 4617 46182016-07-20 David Malcolm <dmalcolm@redhat.com> 4619 4620 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to 4621 spellcheck-tree.h 4622 (best_macro_match): Likewise, converting from a typedef to a 4623 subclass. 4624 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c. 4625 (lookup_name_fuzzy): Update for change of best_macro_match to a 4626 subclass with a ctor that calls cpp_forall_identifiers. 4627 46282016-07-20 David Malcolm <dmalcolm@redhat.com> 4629 4630 * c-decl.c (implicit_decl_warning): Update for conversion of 4631 return type of lookup_name_fuzzy to const char *. 4632 (undeclared_variable): Likewise. 4633 (lookup_name_fuzzy): Convert return type from tree to 4634 const char *. 4635 * c-parser.c (c_parser_declaration_or_fndef): Update for 4636 conversion of return type of lookup_name_fuzzy to const char *. 4637 (c_parser_parameter_declaration): Likewise. 4638 46392016-07-15 Cesar Philippidis <cesar@codesourcery.com> 4640 4641 * c-parser.c (c_parser_oacc_declare): Don't scan for 4642 GOMP_MAP_POINTER. 4643 * c-typeck.c (handle_omp_array_sections): Mark data clauses with 4644 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having 4645 zero-length subarrays. 4646 46472016-07-15 Jakub Jelinek <jakub@redhat.com> 4648 4649 PR c/71858 4650 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME 4651 instead of FUZZY_LOOKUP_NAME. 4652 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider 4653 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros. 4654 46552016-07-14 Jakub Jelinek <jakub@redhat.com> 4656 4657 PR c/71858 4658 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible. 4659 46602016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> 4661 4662 * c-parser.c (c_parser_generic_selection): Make type of variable 4663 auto_vec. 4664 (c_parser_omp_declare_simd): Likewise. 4665 46662016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> 4667 4668 * c-decl.c (struct c_struct_parse_info): Change member types 4669 from vec to auto_vec. 4670 (start_struct): Adjust. 4671 (finish_struct): Likewise. 4672 46732016-07-02 Jakub Jelinek <jakub@redhat.com> 4674 4675 PR c/71719 4676 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR. 4677 46782016-06-29 Thomas Schwinge <thomas@codesourcery.com> 4679 4680 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>: 4681 Move pragma context checking into... 4682 (c_parser_omp_cancellation_point): ... here, and improve 4683 diagnostic messages. 4684 * c-typeck.c (c_finish_omp_cancel) 4685 (c_finish_omp_cancellation_point): Improve diagnostic messages. 4686 46872016-06-29 Jakub Jelinek <jakub@redhat.com> 4688 4689 PR c/71685 4690 * c-typeck.c (c_build_qualified_type): Don't clear 4691 C_TYPE_INCOMPLETE_VARS for the main variant. 4692 46932016-06-28 Martin Sebor <msebor@redhat.com> 4694 4695 PR c/71552 4696 * c-typeck.c (output_init_element): Diagnose incompatible types 4697 before non-constant initializers. 4698 46992016-06-28 Jakub Jelinek <jakub@redhat.com> 4700 4701 * Make-lang.in: Don't cat ../stage_current if it does not exist. 4702 47032016-06-23 Andi Kleen <ak@linux.intel.com> 4704 4705 * Make-lang.in: Add support for autofdo. 4706 47072016-06-22 David Malcolm <dmalcolm@redhat.com> 4708 4709 PR c/70339 4710 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h. 4711 (implicit_decl_warning): When issuing warnings for implicit 4712 declarations, attempt to provide a suggestion via 4713 lookup_name_fuzzy. 4714 (undeclared_variable): Likewise when issuing errors. 4715 (lookup_name_in_scope): Likewise. 4716 (struct edit_distance_traits<cpp_hashnode *>): New struct. 4717 (best_macro_match): New typedef. 4718 (find_closest_macro_cpp_cb): New function. 4719 (lookup_name_fuzzy): New function. 4720 * c-parser.c: Include gcc-rich-location.h. 4721 (c_token_starts_typename): Split out case CPP_KEYWORD into... 4722 (c_keyword_starts_typename): ...this new function. 4723 (c_parser_declaration_or_fndef): When issuing errors about 4724 missing "struct" etc, add a fixit. For other kinds of errors, 4725 attempt to provide a suggestion via lookup_name_fuzzy. 4726 (c_parser_parms_declarator): When looking ahead to detect typos in 4727 type names, also reject CPP_KEYWORD. 4728 (c_parser_parameter_declaration): When issuing errors about 4729 unknown type names, attempt to provide a suggestion via 4730 lookup_name_fuzzy. 4731 * c-tree.h (c_keyword_starts_typename): New prototype. 4732 47332016-06-20 Joseph Myers <joseph@codesourcery.com> 4734 4735 PR c/71601 4736 * c-typeck.c (build_conditional_expr): Return error_mark_node if 4737 c_common_type returns error_mark_node. 4738 47392016-06-19 Martin Sebor <msebor@redhat.com> 4740 4741 PR c/69507 4742 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing 4743 __alignof__ (expression). 4744 47452016-06-14 David Malcolm <dmalcolm@redhat.com> 4746 4747 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h. 4748 47492016-06-14 David Malcolm <dmalcolm@redhat.com> 4750 4751 * c-typeck.c (build_component_ref): Simplify fixit code by 4752 using gcc_rich_location::add_fixit_misspelled_id. 4753 (set_init_label): Likewise. 4754 47552016-06-13 David Malcolm <dmalcolm@redhat.com> 4756 4757 * c-parser.c (c_parser_initelt): Provide location of name for new 4758 location_t param of set_init_label. 4759 * c-tree.h (set_init_label): Add location_t param. 4760 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t 4761 param and use it when issuing error messages about unrecognized 4762 field names. Attempt to provide a fixit hint if appropriate, 4763 otherwise update the error message to provide the type name. 4764 47652016-06-10 Thomas Schwinge <thomas@codesourcery.com> 4766 4767 PR c/71381 4768 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>: 4769 Loosen checking. 4770 47712016-06-08 Martin Sebor <msebor@redhat.com> 4772 Jakub Jelinek <jakub@redhat.com> 4773 4774 PR c++/70507 4775 PR c/68120 4776 * c-typeck.c (convert_arguments): Don't promote last argument 4777 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P. 4778 47792016-06-08 Marek Polacek <polacek@redhat.com> 4780 4781 PR c/71418 4782 * c-decl.c (grokdeclarator): Check TYPE_P. 4783 4784 PR c/71426 4785 * c-decl.c (get_parm_info): Don't crash on an assert on invalid 4786 code. 4787 47882016-06-07 David Malcolm <dmalcolm@redhat.com> 4789 4790 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof 4791 and structure element reference, capture the location of the 4792 element name token and pass it to build_component_ref. 4793 (c_parser_postfix_expression_after_primary): Likewise for 4794 structure element dereference. 4795 (c_parser_omp_variable_list): Likewise for 4796 OMP_CLAUSE_{_CACHE, MAP, FROM, TO}, 4797 * c-tree.h (build_component_ref): Add location_t param. 4798 * c-typeck.c (build_component_ref): Add location_t param 4799 COMPONENT_LOC. Use it, if available, when issuing hints about 4800 mispelled member names to provide a fixit replacement hint. 4801 48022016-06-06 Marek Polacek <polacek@redhat.com> 4803 4804 PR c/71362 4805 * c-parser.c (c_parser_direct_declarator): Set location. 4806 48072016-06-06 Marek Polacek <polacek@redhat.com> 4808 4809 * c-typeck.c (comptypes_internal): Handle comparisons of 4810 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check 4811 TYPE_REF_CAN_ALIAS_ALL. 4812 48132016-06-03 Chung-Lin Tang <cltang@codesourcery.com> 4814 4815 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction 4816 arguments as addressable when async clause exists. 4817 48182016-05-30 Jakub Jelinek <jakub@redhat.com> 4819 4820 PR c++/71349 4821 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause 4822 when combined with target construct. 4823 48242016-05-26 Jakub Jelinek <jakub@redhat.com> 4825 4826 * c-parser.c (c_parser_omp_clause_schedule): Warn if 4827 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive. 4828 48292016-05-25 Marek Polacek <polacek@redhat.com> 4830 4831 PR c/71265 4832 * c-decl.c (c_make_fname_decl): Don't check seen_error. 4833 4834 PR c/71266 4835 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs. 4836 48372016-05-24 Cesar Philippidis <cesar@codesourcery.com> 4838 4839 * c-parser.c (c_parser_oacc_declare): Add support for 4840 GOMP_MAP_FIRSTPRIVATE_POINTER. 4841 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp 4842 argument with enum c_omp_region_type ort. 4843 (handle_omp_array_sections): Likewise. Update call to 4844 handle_omp_array_sections_1. 4845 (c_finish_omp_clauses): Add specific errors and warning messages for 4846 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update 4847 call to handle_omp_array_sections. 4848 48492016-05-24 Thomas Schwinge <thomas@codesourcery.com> 4850 4851 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks. 4852 48532016-05-24 Richard Biener <rguenther@suse.de> 4854 4855 PR middle-end/70434 4856 PR c/69504 4857 * c-typeck.c (build_array_ref): Do not complain about indexing 4858 non-lvalue vectors. Adjust for function name change. 4859 48602016-05-20 Martin Sebor <msebor@redhat.com> 4861 4862 PR c/71115 4863 * c-typeck.c (error_init): Use 4864 expansion_point_location_if_in_system_header. 4865 (warning_init): Same. 4866 48672016-05-19 David Malcolm <dmalcolm@redhat.com> 4868 4869 PR c/71171 4870 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error 4871 in error-handling. 4872 (c_parser_postfix_expression): Likewise. 4873 * c-tree.h (c_expr::set_error): New method. 4874 * c-typeck.c (parser_build_binary_op): In error-handling, ensure 4875 that result's range is initialized. 4876 48772016-05-17 James Greenhalgh <james.greenhalgh@arm.com> 4878 4879 * c-typeck.c (parser_build_unary_op): Fix formatting. 4880 48812016-05-16 Matthew Wahab <matthew.wahab@arm.com> 4882 4883 * c-decl.c (grokdeclarator): Remove errmsg and use of 4884 targetm.invalid_return_type. 4885 (grokparms): Remove errmsg and use of 4886 targetm.invalid_parameter_type. 4887 48882016-05-13 Joseph Myers <joseph@codesourcery.com> 4889 4890 * c-decl.c (grokdeclarator): For C11, discard qualifiers on 4891 function return type. 4892 48932016-05-12 Marek Polacek <polacek@redhat.com> 4894 4895 PR c/70756 4896 * c-decl.c (build_compound_literal): Pass LOC down to 4897 c_incomplete_type_error. 4898 * c-tree.h (require_complete_type): Adjust declaration. 4899 (c_incomplete_type_error): Likewise. 4900 * c-typeck.c (require_complete_type): Add location parameter, pass it 4901 down to c_incomplete_type_error. 4902 (c_incomplete_type_error): Add location parameter, pass it down to 4903 error_at. 4904 (build_component_ref): Pass location down to c_incomplete_type_error. 4905 (default_conversion): Pass location down to require_complete_type. 4906 (build_array_ref): Likewise. 4907 (build_function_call_vec): Likewise. 4908 (convert_arguments): Likewise. 4909 (build_unary_op): Likewise. 4910 (build_c_cast): Likewise. 4911 (build_modify_expr): Likewise. 4912 (convert_for_assignment): Likewise. 4913 (c_finish_omp_clauses): Likewise. 4914 49152016-05-11 Mikhail Maltsev <maltsevm@gmail.com> 4916 4917 PR c/43651 4918 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier 4919 is enabled. 4920 * c-errors.c (pedwarn_c90): Return true if warned. 4921 * c-tree.h (pedwarn_c90): Change return type to bool. 4922 (enum c_declspec_word): Add new enumerator cdw_atomic. 4923 49242016-05-11 Marek Polacek <polacek@redhat.com> 4925 4926 PR c++/71024 4927 * c-decl.c (diagnose_mismatched_decls): Factor out code to 4928 diagnose_mismatched_attributes and call it. 4929 49302016-05-10 Marek Polacek <polacek@redhat.com> 4931 4932 PR c/70255 4933 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute 4934 on a declaration following the definition. 4935 49362016-05-05 Jakub Jelinek <jakub@redhat.com> 4937 4938 * c-parser.c (c_parser_switch_statement): Add IF_P argument, 4939 parse it through to c_parser_c99_block_statement. 4940 (c_parser_statement_after_labels): Adjust c_parser_switch_statement 4941 caller. 4942 49432016-05-04 Marek Polacek <polacek@redhat.com> 4944 4945 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with 4946 OPT_Wdangling_else. 4947 49482016-05-04 Marek Polacek <polacek@redhat.com> 4949 4950 PR c/48778 4951 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings 4952 for macro expansions. 4953 49542016-05-03 Marek Polacek <polacek@redhat.com> 4955 4956 PR c/70859 4957 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to 4958 check_builtin_function_arguments. 4959 49602016-05-03 Richard Biener <rguenther@suse.de> 4961 4962 * Make-lang.in (cc1-checksum.c): For stage-final re-use 4963 the checksum from the previous stage. 4964 49652016-05-02 Cesar Philippidis <cesar@codesourcery.com> 4966 4967 * c-parser.c (c_parser_oacc_all_clauses): Update call to 4968 c_finish_omp_clauses. 4969 (c_parser_omp_all_clauses): Likewise. 4970 (c_parser_oacc_cache): Likewise. 4971 (c_parser_oacc_loop): Likewise. 4972 (omp_split_clauses): Likewise. 4973 (c_parser_omp_declare_target): Likewise. 4974 (c_parser_cilk_all_clauses): Likewise. 4975 (c_parser_cilk_for): Likewise. 4976 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments 4977 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort. 4978 49792016-05-02 Marek Polacek <polacek@redhat.com> 4980 4981 PR c/70851 4982 * c-decl.c (grokdeclarator): Diagnose when array's size has an 4983 incomplete type. 4984 49852016-04-29 Cesar Philippidis <cesar@codesourcery.com> 4986 4987 PR middle-end/70626 4988 * c-parser.c (c_parser_oacc_loop): Don't augment mask with 4989 OACC_LOOP_CLAUSE_MASK. 4990 (c_parser_oacc_kernels_parallel): Update call to 4991 c_oacc_split_loop_clauses. 4992 49932016-04-28 Andrew MacLeod <amacleod@redhat.com> 4994 4995 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final 4996 argument to build_modify_expr in two cases. 4997 49982016-04-27 Bernd Schmidt <bschmidt@redhat.com> 4999 5000 * c-parser.c (c_parser_postfix_expression_after_primary): Call 5001 warn_for_memset instead of warning directly here. 5002 50032016-04-26 Marek Polacek <polacek@redhat.com> 5004 5005 PR c/67784 5006 * c-parser.c (c_parser_maybe_reclassify_token): New function factored 5007 out of ... 5008 (c_parser_for_statement): ... here. 5009 (c_parser_if_statement): Use it. 5010 (c_parser_switch_statement): Use it. 5011 (c_parser_while_statement): Use it. 5012 5013 PR c/70791 5014 * c-decl.c (pushdecl): Pass LOCUS down to warning. 5015 50162016-04-20 Ilya Verbin <ilya.verbin@intel.com> 5017 5018 PR c++/69363 5019 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses 5020 instead of c_finish_cilk_clauses. 5021 * c-tree.h (c_finish_omp_clauses): Add new default argument. 5022 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow 5023 floating-point variables in the linear clause for Cilk Plus. 5024 50252016-04-18 Michael Matz <matz@suse.de> 5026 5027 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN. 5028 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN. 5029 50302016-04-15 Marek Polacek <polacek@redhat.com> 5031 5032 PR c/70671 5033 * c-typeck.c (build_unary_op): Pass location down to error and 5034 warning call. 5035 50362016-04-15 Jakub Jelinek <jakub@redhat.com> 5037 5038 PR c/70436 5039 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down 5040 where needed. 5041 (c_parser_external_declaration, c_parser_struct_or_union_specifier, 5042 c_parser_parameter_declaration, c_parser_compound_statement_nostart, 5043 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist): 5044 Adjust c_parser_pragma callers. 5045 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for 5046 caller. 5047 (c_parser_omp_structured_block): Add IF_P argument, pass it down to 5048 c_parser_statement. 5049 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop, 5050 c_parser_oacc_kernels_parallel, c_parser_omp_critical, 5051 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master, 5052 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single, 5053 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute, 5054 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target, 5055 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize, 5056 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it 5057 down where needed. 5058 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces. 5059 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block 5060 calls. 5061 50622016-04-13 Marek Polacek <polacek@redhat.com> 5063 5064 PR c/70436 5065 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and 5066 adjust callers. 5067 (c_parser_statement): Likewise. 5068 (c_parser_c99_block_statement): Likewise. 5069 (c_parser_while_statement): Likewise. 5070 (c_parser_for_statement): Likewise. 5071 (c_parser_if_body): Don't set IF_P here. 5072 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn 5073 about dangling else here. 5074 * c-tree.h (c_finish_if_stmt): Adjust declaration. 5075 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't 5076 warn about dangling else here. 5077 50782016-04-04 Marek Polacek <polacek@redhat.com> 5079 5080 PR c/70307 5081 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR. 5082 50832016-03-31 Marek Polacek <polacek@redhat.com> 5084 5085 PR c/70297 5086 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN. 5087 50882016-03-18 David Malcolm <dmalcolm@redhat.com> 5089 5090 PR c/70281 5091 * c-parser.c (c_parser_postfix_expression): Set the source range 5092 for uses of "__builtin_types_compatible_p". 5093 50942016-03-17 Jakub Jelinek <jakub@redhat.com> 5095 5096 PR c/70280 5097 * c-typeck.c (composite_type): Don't count void_list_node 5098 into len, if the list is terminated by void_list_node, start 5099 with void_list_node instead of NULL for newargs. Stop 5100 at void_list_node. 5101 51022016-03-16 Marek Polacek <polacek@redhat.com> 5103 5104 PR c/70093 5105 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for 5106 nested functions returning VM types. 5107 51082016-03-09 Cesar Philippidis <cesar@codesourcery.com> 5109 5110 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses 5111 when calling c_finish_omp_clauses. 5112 51132016-03-04 Bernd Schmidt <bschmidt@redhat.com> 5114 5115 PR c/69824 5116 * c-decl.c (get_parm_info): Don't queue implicit function declarations 5117 for later. 5118 51192016-03-04 Marek Polacek <polacek@redhat.com> 5120 5121 PR c/69798 5122 * c-parser.c (c_parser_postfix_expression): Call 5123 c_parser_cast_expression rather than c_parser_postfix_expression. 5124 51252016-03-01 Jakub Jelinek <jakub@redhat.com> 5126 5127 PR c/69796 5128 PR c/69974 5129 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE 5130 of incomplete decls to error_mark_node. 5131 51322016-02-24 Marek Polacek <polacek@redhat.com> 5133 5134 PR c/69819 5135 * c-decl.c (finish_decl): Don't update the copy of the type of a 5136 different decl type. 5137 51382016-02-23 Jakub Jelinek <jakub@redhat.com> 5139 5140 PR objc/69844 5141 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes 5142 in id_kind reclassification. 5143 51442016-02-16 Jakub Jelinek <jakub@redhat.com> 5145 5146 PR c/69835 5147 * c-typeck.c (build_binary_op): Revert 2015-09-09 change. 5148 51492016-02-16 James Norris <jnorris@codesourcery.com> 5150 5151 PR c/64748 5152 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms. 5153 51542016-02-12 Bernd Schmidt <bschmidt@redhat.com> 5155 5156 * c-decl.c (build_null_declspecs): Zero the entire struct. 5157 5158 PR c/69522 5159 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All 5160 callers changed. If nested_p is true, use it to call 5161 finish_implicit_inits. 5162 * c-tree.h (finish_implicit_inits): Declare. 5163 * c-typeck.c (finish_implicit_inits): New function. Move code 5164 from ... 5165 (push_init_level): ... here. 5166 (set_designator, process_init_element): Call finish_implicit_inits. 5167 51682016-02-11 Jakub Jelinek <jakub@redhat.com> 5169 5170 PR c/69768 5171 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop 5172 arguments for -Waddress warning. 5173 51742016-02-04 Jakub Jelinek <jakub@redhat.com> 5175 5176 PR c/69669 5177 * c-decl.c (finish_enum): When honoring mode attribute, 5178 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE. 5179 51802016-01-29 Jakub Jelinek <jakub@redhat.com> 5181 5182 PR debug/69518 5183 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in 5184 all type variants, not just TYPE_MAIN_VARIANT. 5185 51862016-01-27 Jakub Jelinek <jakub@redhat.com> 5187 5188 PR debug/66869 5189 * c-decl.c (c_write_global_declarations_1): Warn with 5190 warn_unused_function if static prototype without definition 5191 is not C_DECL_USED. 5192 51932016-01-27 Marek Polacek <polacek@redhat.com> 5194 5195 PR c/68062 5196 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand 5197 to unsigned, if needed. Add -Wsign-compare warning. 5198 51992016-01-26 Jakub Jelinek <jakub@redhat.com> 5200 5201 PR tree-optimization/69483 5202 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT. 5203 52042016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> 5205 5206 PR c/24293 5207 * c-tree.h (incomplete_record_decls): Declare. 5208 * c-parser.c (incomplete_record_decls): Define. 5209 (c_parser_translation_unit): Iterate through incomplete_record_decls and 5210 report error if any decl has zero size. 5211 * c-decl.c (finish_decl): Append static decl with incomplete struct/union 5212 or enum type to incomplete_record_decls. 5213 52142016-01-14 Tom de Vries <tom@codesourcery.com> 5215 5216 PR tree-optimization/68773 5217 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't 5218 set force_output. 5219 52202016-01-14 Marek Polacek <polacek@redhat.com> 5221 5222 PR c/69262 5223 * c-decl.c (grokdeclarator): Provide more information for invalid 5224 array declarations. 5225 52262016-01-06 David Malcolm <dmalcolm@redhat.com> 5227 5228 * c-parser.c (c_parser_unary_expression): For dereferences, build 5229 a combined location before calling build_indirect_ref, so that 5230 error reports cover the full range, manually updating the c_expr 5231 src_range. 5232 52332016-01-06 Marek Polacek <polacek@redhat.com> 5234 5235 PR sanitizer/69099 5236 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to 5237 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of 5238 NULL. 5239 52402016-01-04 Jakub Jelinek <jakub@redhat.com> 5241 5242 Update copyright years. 5243 52442016-01-04 Marek Polacek <polacek@redhat.com> 5245 5246 PR c/68908 5247 * c-typeck.c (build_atomic_assign): Improve commentary. Add 5248 optimization to use __atomic_fetch_* built-in if possible. 5249 52502015-12-23 Thomas Schwinge <thomas@codesourcery.com> 5251 5252 * c-parser.c (c_parser_oacc_clause_use_device): Merge function 5253 into... 5254 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust 5255 all users. 5256 52572015-12-22 Marek Polacek <polacek@redhat.com> 5258 5259 PR c/69002 5260 * c-typeck.c (build_component_ref): Warn when acessing elements of 5261 atomic structures or unions. 5262 52632015-12-21 David Malcolm <dmalcolm@redhat.com> 5264 5265 * c-typeck.c: Include "gcc-rich-location.h". 5266 (build_binary_op): In the two places that call binary_op_error, 5267 create a gcc_rich_location and populate it with the location of 5268 the binary op and its two operands. 5269 52702015-12-16 David Malcolm <dmalcolm@redhat.com> 5271 5272 * c-parser.c (c_parser_statement_after_labels): When calling 5273 c_finish_return, Use the return expression's location if it has 5274 one, falling back to the location of the first token within it. 5275 * c-typeck.c (c_finish_return): When issuing warnings about 5276 the incorrect presence/absence of a return value, issue a note 5277 showing the declaration of the function. 5278 52792015-12-16 David Malcolm <dmalcolm@redhat.com> 5280 5281 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2 5282 to 4. 5283 (c_parser_peek_nth_token): New function. 5284 (c_parser_peek_conflict_marker): New function. 5285 (c_parser_error): Detect conflict markers and report them as such. 5286 52872015-12-16 David Malcolm <dmalcolm@redhat.com> 5288 5289 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC 5290 to preserve range information for the primary expression 5291 in the call to c_parser_postfix_expression_after_primary. 5292 52932015-12-16 David Malcolm <dmalcolm@redhat.com> 5294 5295 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the 5296 expression location, falling back on the first token location, 5297 rather than always using the latter. 5298 52992015-12-16 Marek Polacek <polacek@redhat.com> 5300 5301 PR c/64637 5302 * c-typeck.c (c_process_expr_stmt): Use location of the expression if 5303 available. 5304 53052015-12-15 Marek Polacek <polacek@redhat.com> 5306 5307 PR c/68907 5308 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an 5309 artificial decl. 5310 53112015-12-08 David Malcolm <dmalcolm@redhat.com> 5312 5313 * c-parser.c (c_parser_alignof_expression): Capture location of 5314 closing parenthesis (if any), or of end of unary expression, and 5315 use it to build a src_range for the expression. 5316 53172015-12-08 David Malcolm <dmalcolm@redhat.com> 5318 5319 PR c/68757 5320 * c-parser.c (c_parser_get_builtin_args): Add 5321 "out_close_paren_loc" param, and write back to it. 5322 (c_parser_postfix_expression): Capture the closing 5323 parenthesis location for RID_CHOOSE_EXPR, 5324 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX, 5325 RID_BUILTIN_SHUFFLE and use it to set the source range 5326 for such expressions; within RID_BUILTIN_COMPLEX set 5327 the underlying location. 5328 53292015-12-07 Marek Polacek <polacek@redhat.com> 5330 5331 PR c/68668 5332 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use 5333 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT. 5334 53352015-12-04 Eric Botcazou <ebotcazou@adacore.com> 5336 5337 * c-tree.h (c_build_va_arg): Adjust prototype. 5338 * c-parser.c (c_parser_postfix_expression): Adjust call to above. 5339 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1 5340 parameter, adjust throughout and issue an error if EXPR is a component 5341 with reverse storage order. 5342 53432015-12-02 Jason Merrill <jason@redhat.com> 5344 5345 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold) 5346 (c_fully_fold_internal, decl_constant_value_for_optimization): 5347 Move from c-common.c. 5348 * c-tree.h: Declare decl_constant_value_for_optimization. 5349 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o. 5350 53512015-12-02 Joseph Myers <joseph@codesourcery.com> 5352 5353 PR c/68162 5354 * c-decl.c (grokdeclarator): Set first_non_attr_kind before 5355 following link from declarator to next declarator. Track original 5356 qualified type and pass it to c_build_qualified_type. 5357 * c-typeck.c (c_build_qualified_type): Add arguments 5358 orig_qual_type and orig_qual_indirect. 5359 53602015-12-02 Thomas Schwinge <thomas@codesourcery.com> 5361 5362 * c-parser.c (c_parser_omp_clause_name) 5363 (c_parser_oacc_all_clauses): Alphabetical sorting. 5364 53652015-12-02 Jakub Jelinek <jakub@redhat.com> 5366 5367 PR c/68533 5368 * c-decl.c (get_parm_info): Use b->locus instead of input_location 5369 for diagnostics. 5370 53712015-12-01 Julian Brown <julian@codesourcery.com> 5372 Cesar Philippidis <cesar@codesourcery.com> 5373 James Norris <James_Norris@mentor.com> 5374 5375 * c-parser.c (c_parser_omp_clause_name): Add use_device support. 5376 (c_parser_oacc_clause_use_device): New function. 5377 (c_parser_oacc_all_clauses): Add use_device support. 5378 (OACC_HOST_DATA_CLAUSE_MASK): New macro. 5379 (c_parser_oacc_host_data): New function. 5380 (c_parser_omp_construct): Add host_data support. 5381 * c-tree.h (c_finish_oacc_host_data): Add prototype. 5382 * c-typeck.c (c_finish_oacc_host_data): New function. 5383 (c_finish_omp_clauses): Add use_device support. 5384 53852015-11-29 Jan Hubicka <hubicka@ucw.cz> 5386 5387 PR c/67106 5388 * c-decl.c: Set TYPE_PACKED in variants. 5389 53902015-11-27 Martin Liska <mliska@suse.cz> 5391 5392 PR c++/68312 5393 * c-array-notation.c (fix_builtin_array_notation_fn): 5394 Use release_vec_vec instead of vec::release. 5395 (build_array_notation_expr): Likewise. 5396 (fix_conditional_array_notations_1): Likewise. 5397 (fix_array_notation_expr): Likewise. 5398 (fix_array_notation_call_expr): Likewise. 5399 54002015-11-27 Jakub Jelinek <jakub@redhat.com> 5401 5402 PR c/63326 5403 * c-parser.c (c_parser_compound_statement_nostart): If 5404 last_label is true, use pragma_stmt instead of pragma_compound 5405 as second c_parser_pragma argument. 5406 (c_parser_omp_ordered, c_parser_omp_target_update, 5407 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass 5408 false as second argument to c_parser_skip_to_pragma_eol after 5409 diagnosing standalone directives used in pragma_stmt context. 5410 54112015-11-24 Ilya Verbin <ilya.verbin@intel.com> 5412 5413 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING" 5414 with "if (ENABLE_OFFLOADING)". 5415 54162015-11-23 David Malcolm <dmalcolm@redhat.com> 5417 5418 PR objc/68438 5419 * c-parser.c (c_parser_postfix_expression): Set up source ranges 5420 for various Objective-C constructs: Class.name syntax, 5421 @selector(), @protocol(), @encode(), and [] message syntax. 5422 54232015-11-20 David Malcolm <dmalcolm@redhat.com> 5424 5425 PR 62314 5426 * c-typeck.c (should_suggest_deref_p): New function. 5427 (build_component_ref): Special-case POINTER_TYPE when 5428 generating a "not a structure of union" error message, and 5429 suggest a "->" rather than a ".", providing a fix-it hint. 5430 54312015-11-19 David Malcolm <dmalcolm@redhat.com> 5432 5433 * c-typeck.c (lookup_field_fuzzy): Move determination of closest 5434 candidate into a new function, find_closest_identifier. 5435 54362015-11-19 Marek Polacek <polacek@redhat.com> 5437 5438 PR c/68412 5439 * c-typeck.c (parser_build_binary_op): Properly handle 5440 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp. 5441 54422015-11-17 David Malcolm <dmalcolm@redhat.com> 5443 5444 * c-parser.c (set_c_expr_source_range): Bulletproof both 5445 overloaded implementations against NULL expr->value. 5446 (c_parser_braced_init): Set src_range for "ret" to a sane pair of 5447 values. 5448 (c_parser_unary_expression): Likewise when handling addresses of 5449 labels. 5450 (c_parser_postfix_expression): Likewise for statement expressions, 5451 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for 5452 __builtin_va_arg, and for __builtin_offset_of. 5453 (c_parser_postfix_expression_after_paren_type): Initialize expr's 5454 src_range using the range of the braced initializer. 5455 (c_parser_transaction_expression): Set src_range for "ret" to a 5456 sane pair of values. 5457 54582015-11-16 Kirill Yukhin <kirill.yukhin@intel.com> 5459 5460 * c-parser.c (c_finish_omp_declare_simd): Look for 5461 "simd" attribute as well. Update error message. 5462 54632015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> 5464 5465 * c-parser.c (c_parser_omp_declare_target): Adjust. 5466 54672015-11-14 Jakub Jelinek <jakub@redhat.com> 5468 5469 * c-typeck.c (c_finish_omp_clauses): Don't mark 5470 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable. 5471 54722015-11-14 Marek Polacek <polacek@redhat.com> 5473 5474 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout. 5475 * c-typeck.c: Likewise. 5476 54772015-11-13 David Malcolm <dmalcolm@redhat.com> 5478 5479 * c-decl.c (warn_defaults_to): Pass line_table to 5480 rich_location ctor. 5481 * c-errors.c (pedwarn_c99): Likewise. 5482 (pedwarn_c90): Likewise. 5483 * c-parser.c (set_c_expr_source_range): New functions. 5484 (c_token::get_range): New method. 5485 (c_token::get_finish): New method. 5486 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret 5487 based on the range from the start of the LHS to the end of the 5488 RHS. 5489 (c_parser_conditional_expression): Likewise, based on the range 5490 from the start of the cond.value to the end of exp2.value. 5491 (c_parser_binary_expression): Call set_c_expr_source_range on 5492 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR. 5493 (c_parser_cast_expression): Call set_c_expr_source_range on ret 5494 based on the cast_loc through to the end of the expr. 5495 (c_parser_unary_expression): Likewise, based on the 5496 op_loc through to the end of op. 5497 (c_parser_sizeof_expression) Likewise, based on the start of the 5498 sizeof token through to either the closing paren or the end of 5499 expr. 5500 (c_parser_postfix_expression): Likewise, using the token range, 5501 or from the open paren through to the close paren for 5502 parenthesized expressions. 5503 (c_parser_postfix_expression_after_primary): Likewise, for 5504 various kinds of expression. 5505 * c-tree.h (struct c_expr): Add field "src_range". 5506 (c_expr::get_start): New method. 5507 (c_expr::get_finish): New method. 5508 (set_c_expr_source_range): New decls. 5509 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range 5510 on ret for prefix unary ops. 5511 (parser_build_binary_op): Likewise, running from the start of 5512 arg1.value through to the end of arg2.value. 5513 55142015-11-13 Marek Polacek <polacek@redhat.com> 5515 5516 PR c/68320 5517 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs. 5518 55192015-11-13 David Malcolm <dmalcolm@redhat.com> 5520 5521 * c-typeck.c: Include spellcheck.h. 5522 (lookup_field_fuzzy_find_candidates): New function. 5523 (lookup_field_fuzzy): New function. 5524 (build_component_ref): If the field was not found, try using 5525 lookup_field_fuzzy and potentially offer a suggestion. 5526 55272015-11-12 James Norris <jnorris@codesourcery.com> 5528 Joseph Myers <joseph@codesourcery.com> 5529 5530 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE. 5531 (c_parser_omp_clause_name): Handle 'device_resident' clause. 5532 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT 5533 and PRAGMA_OMP_CLAUSE_LINK. 5534 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT 5535 and PRAGMA_OACC_CLAUSE_LINK. 5536 (OACC_DECLARE_CLAUSE_MASK): New definition. 5537 (c_parser_oacc_declare): New function. 5538 55392015-11-12 Marek Polacek <polacek@redhat.com> 5540 5541 PR c/67784 5542 * c-parser.c (c_parser_for_statement): Reclassify the token in 5543 a correct scope. 5544 55452015-11-11 Marek Polacek <polacek@redhat.com> 5546 5547 PR c/68107 5548 PR c++/68266 5549 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code 5550 checking the size of an array. 5551 55522015-11-11 Andrew MacLeod <amacleod@redhat.com> 5553 5554 * c-array-notation.c: Remove unused header files. 5555 * c-aux-info.c: Likewise. 5556 * c-convert.c: Likewise. 5557 * c-decl.c: Likewise. 5558 * c-errors.c: Likewise. 5559 * c-lang.c: Likewise. 5560 * c-objc-common.c: Likewise. 5561 * c-parser.c: Likewise. 5562 * c-typeck.c: Likewise. 5563 * gccspec.c: Likewise. 5564 55652015-11-09 Thomas Schwinge <thomas@codesourcery.com> 5566 Cesar Philippidis <cesar@codesourcery.com> 5567 James Norris <jnorris@codesourcery.com> 5568 Julian Brown <julian@codesourcery.com> 5569 Nathan Sidwell <nathan@codesourcery.com> 5570 5571 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC 5572 routine arg. 5573 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine. 5574 (c_parser_pragma): Parse 'acc routine'. 5575 (OACC_ROUTINE_CLAUSE_MARK): Define. 5576 (c_parser_oacc_routine, (c_finish_oacc_routine): New. 5577 55782015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com> 5579 5580 PR debug/67192 5581 * c-typeck.c (c_finish_loop): For unconditional loops, set the 5582 location of the backward-goto to the start of the loop body. 5583 55842015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com> 5585 5586 PR debug/67192 5587 * c-parser.c (c_parser_while_statement): Finish the loop before 5588 parsing ahead for misleading indentation. 5589 (c_parser_for_statement): Likewise. 5590 55912015-11-08 Eric Botcazou <ebotcazou@adacore.com> 5592 5593 * c-decl.c (finish_struct): If the structure has reverse storage 5594 order, rewrite the type of array fields with scalar component. Call 5595 maybe_apply_pragma_scalar_storage_order on entry. 5596 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue 5597 errors on bit-fields and reverse SSO here and not... 5598 (c_mark_addressable): ...here. 5599 (output_init_element): Adjust call to initializer_constant_valid_p. 5600 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER. 5601 56022015-11-06 David Malcolm <dmalcolm@redhat.com> 5603 5604 * c-decl.c (warn_defaults_to): Update for change in signature 5605 of diagnostic_set_info. 5606 * c-errors.c (pedwarn_c99): Likewise. 5607 (pedwarn_c90): Likewise. 5608 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param 5609 for textinfo::set_location. 5610 56112015-11-05 Cesar Philippidis <cesar@codesourcery.com> 5612 Thomas Schwinge <thomas@codesourcery.com> 5613 James Norris <jnorris@codesourcery.com> 5614 5615 * c-parser.c (c_parser_omp_clause_name): Add support for 5616 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE. 5617 (c_parser_omp_clause_default): Add is_oacc argument. Handle 5618 default(none) in OpenACC. 5619 (c_parser_oacc_shape_clause): Allow pointer variables as gang static 5620 arguments. 5621 (c_parser_oacc_clause_tile): New function. 5622 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT, 5623 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE. 5624 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT, 5625 TILE}. 5626 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT. 5627 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE, 5628 FIRSTPRIVATE}. 5629 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default. 5630 (c_parser_oacc_update): Update the error message for missing clauses. 5631 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE 5632 and OMP_CLAUSE_INDEPENDENT. 5633 56342015-11-05 Marek Polacek <polacek@redhat.com> 5635 5636 PR c/68090 5637 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't 5638 deal with pre-evaluation on invalid types. 5639 56402015-11-05 Jakub Jelinek <jakub@redhat.com> 5641 Ilya Verbin <ilya.verbin@intel.com> 5642 5643 * c-parser.c: Include context.h and gimple-expr.h. 5644 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose 5645 monotonic together with nonmonotonic. 5646 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here. 5647 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause. 5648 (c_parser_omp_target_data, c_parser_omp_target_enter_data, 5649 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER. 5650 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit 5651 expressions on combined target teams before the target. 5652 (c_parser_omp_declare_target): If decl has "omp declare target" or 5653 "omp declare target link" attribute, and cgraph or varpool node already 5654 exists, then set corresponding flags. Call c_finish_omp_clauses 5655 in the parenthesized extended-list syntax case. 5656 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside 5657 declare target. 5658 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound 5659 on OMP_CLAUSE_REDUCTION array sections. 5660 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either 5661 into the constant offset, or for variable low-bound using 5662 POINTER_PLUS_EXPR. For structure element based array sections use 5663 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER. 5664 (c_finish_omp_clauses): Drop generic_field_head, structure 5665 elements are now always mapped even as array section bases, 5666 diagnose same var in data sharing and mapping clauses. Diagnose if 5667 linear step on declare simd is neither a constant nor a uniform 5668 parameter. Look through POINTER_PLUS_EXPR for array section 5669 reductions. Diagnose the same var or function appearing multiple 5670 times on the same directive. Fix up wording for the to clause if t 5671 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic 5672 modifier on kinds other than dynamic or guided or nonmonotonic 5673 modifier together with ordered clause. 5674 56752015-11-03 Thomas Schwinge <thomas@codesourcery.com> 5676 Chung-Lin Tang <cltang@codesourcery.com> 5677 5678 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC. 5679 56802015-10-29 Andrew MacLeod <amacleod@redhat.com> 5681 5682 * c-array-notation.c: Reorder #include's and remove duplicates. 5683 * c-aux-info.c: Likewise. 5684 * c-convert.c: Likewise. 5685 * c-decl.c: Likewise. 5686 * c-errors.c: Likewise. 5687 * c-lang.c: Likewise. 5688 * c-objc-common.c: Likewise. 5689 * c-parser.c: Likewise. 5690 * c-typeck.c: Likewise. 5691 56922015-10-26 Jim Wilson <jim.wilson@linaro.org> 5693 5694 PR debug/66068 5695 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS 5696 after calling build_qualified_type. 5697 56982015-10-27 Cesar Philippidis <cesar@codesourcery.com> 5699 Thomas Schwinge <thomas@codesourcery.com> 5700 James Norris <jnorris@codesourcery.com> 5701 Joseph Myers <joseph@codesourcery.com> 5702 Julian Brown <julian@codesourcery.com> 5703 Bernd Schmidt <bschmidt@redhat.com> 5704 5705 * c-parser.c (c_parser_oacc_shape_clause): New. 5706 (c_parser_oacc_simple_clause): New. 5707 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker. 5708 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq. 5709 57102015-10-27 Thomas Schwinge <thomas@codesourcery.com> 5711 James Norris <jnorris@codesourcery.com> 5712 Cesar Philippidis <cesar@codesourcery.com> 5713 5714 PR c/64765 5715 PR c/64880 5716 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal 5717 parameters, and handle these. Adjust all users. 5718 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions 5719 into... 5720 (c_parser_oacc_kernels_parallel): ... this new function. Adjust 5721 all users. 5722 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't 5723 declare functions. 5724 (c_finish_omp_construct): Declare function. 5725 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels): 5726 Merge functions into... 5727 (c_finish_omp_construct): ... this new function. 5728 57292015-10-22 Richard Biener <rguenther@suse.de> 5730 5731 * c-typeck.c (c_finish_omp_clauses): Properly convert operands 5732 before folding a MINUS_EXPR. 5733 57342015-10-21 Marek Polacek <polacek@redhat.com> 5735 5736 PR c/68024 5737 * c-decl.c (start_function): Warn about vararg functions without 5738 a prototype. 5739 57402015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com> 5741 5742 * c-typeck.c (build_conditional_expr): Use boolean vector 5743 type for vector comparison. 5744 (build_vec_cmp): New. 5745 (build_binary_op): Use build_vec_cmp for comparison. 5746 57472015-10-20 Marek Polacek <polacek@redhat.com> 5748 5749 * c-parser.c (is_cilkplus_vector_p): Don't define here. 5750 57512015-10-20 Marek Polacek <polacek@redhat.com> 5752 5753 PR c/67964 5754 * c-parser.c (c_parser_attributes): Break out of the loop if the 5755 token after an attribute isn't a comma. 5756 57572015-10-13 Jakub Jelinek <jakub@redhat.com> 5758 Aldy Hernandez <aldyh@redhat.com> 5759 5760 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here. 5761 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses. 5762 (c_parser_omp_variable_list): Handle structure elements for 5763 map, to and from clauses. Handle array sections in reduction 5764 clause. Formatting fixes. 5765 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of 5766 if clause modifiers. 5767 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize, 5768 c_parser_omp_clause_priority, c_parser_omp_clause_hint, 5769 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr, 5770 c_parser_omp_clause_is_device_ptr): New functions. 5771 (c_parser_omp_clause_ordered): Parse optional parameter. 5772 (c_parser_omp_clause_reduction): Handle array reductions. 5773 (c_parser_omp_clause_schedule): Parse optional simd modifier. 5774 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New 5775 functions. 5776 (c_parser_omp_clause_linear): Parse linear clause modifiers. 5777 (c_parser_omp_clause_depend_sink): New function. 5778 (c_parser_omp_clause_depend): Parse source/sink depend kinds. 5779 (c_parser_omp_clause_map): Parse release/delete map kinds and 5780 optional always modifier. 5781 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if 5782 and c_finish_omp_clauses callers. 5783 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses. 5784 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive. 5785 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller. 5786 (OMP_CRITICAL_CLAUSE_MASK): Define. 5787 (c_parser_omp_critical): Parse critical clauses. 5788 (c_parser_omp_for_loop): Handle doacross loops, adjust 5789 c_finish_omp_for and c_finish_omp_clauses callers. 5790 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause. 5791 (c_parser_omp_simd): Allow ordered clause if it has no parameter. 5792 (OMP_FOR_CLAUSE_MASK): Add linear clause. 5793 (c_parser_omp_for): Disallow ordered clause when combined with 5794 distribute. Disallow linear clause when combined with distribute 5795 and not combined with simd. 5796 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define. 5797 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument, 5798 parse clauses and if depend clause is found, don't parse a body. 5799 (c_parser_omp_parallel): Disallow copyin clause on target parallel. 5800 Allow target parallel without for after it. 5801 (OMP_TASK_CLAUSE_MASK): Add priority clause. 5802 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause. 5803 (c_parser_omp_target_data): Diagnose no map clauses or clauses with 5804 invalid kinds. 5805 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses. 5806 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK, 5807 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define. 5808 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New 5809 functions. 5810 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate, 5811 defaultmap and is_device_ptr clauses. 5812 (c_parser_omp_target): Parse target parallel and target simd. Set 5813 OMP_TARGET_COMBINED on combined constructs. Parse target enter data 5814 and target exit data. Diagnose invalid map kinds. 5815 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define. 5816 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this 5817 construct. 5818 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for 5819 &omp_priv. 5820 (OMP_TASKLOOP_CLAUSE_MASK): Define. 5821 (c_parser_omp_taskloop): New function. 5822 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here, 5823 handle PRAGMA_OMP_TASKLOOP. 5824 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers. 5825 * c-tree.h (c_finish_omp_clauses): Add two new arguments. 5826 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo. 5827 Add IS_OMP argument, handle structure element bases, diagnose 5828 bitfields, pass IS_OMP recursively, diagnose known zero length 5829 array sections in depend clauses, handle array sections in reduction 5830 clause, diagnose negative length even for pointers. 5831 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for 5832 types, pass IS_OMP down to handle_omp_array_sections_1, handle 5833 array sections in reduction clause, set 5834 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero 5835 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP. 5836 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments. 5837 Handle new OpenMP 4.5 clauses and new restrictions for the old ones. 5838 58392015-10-06 Marek Polacek <polacek@redhat.com> 5840 5841 * c-parser.c (c_parser_statement_after_labels): Use 5842 protected_set_expr_location. 5843 (c_parser_omp_clause_num_gangs): Likewise. 5844 (c_parser_omp_clause_num_threads): Likewise. 5845 (c_parser_omp_clause_num_workers): Likewise. 5846 (c_parser_omp_clause_vector_length): Likewise. 5847 (c_parser_omp_clause_num_teams): Likewise. 5848 (c_parser_omp_clause_thread_limit): Likewise. 5849 * c-typeck.c (build_c_cast): Likewise. 5850 (c_cast_expr): Likewise. 5851 58522015-10-05 Richard Sandiford <richard.sandiford@arm.com> 5853 5854 * c-typeck.c (c_tree_equal): Use real_equal instead of 5855 REAL_VALUES_EQUAL. 5856 58572015-10-04 Jason Merrill <jason@redhat.com> 5858 5859 * c-parser.c (c_lex_one_token): Handle @synchronized. 5860 * c-decl.c (match_builtin_function_types): A declaration of a built-in 5861 can change whether the function is transaction_safe. 5862 58632015-10-02 Marek Polacek <polacek@redhat.com> 5864 5865 PR c/67730 5866 * c-typeck.c (convert_for_assignment): Use the expansion point 5867 location throughout. 5868 58692015-10-02 Marek Polacek <polacek@redhat.com> 5870 5871 PR c/64249 5872 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter 5873 and pass it down to c_parser_if_statement. 5874 (c_parser_else_body): Add CHAIN parameter and pass it down to 5875 c_parser_statement_after_labels. 5876 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about 5877 duplicated if-else-if conditions. 5878 58792015-10-01 Marek Polacek <polacek@redhat.com> 5880 5881 * c-typeck.c (convert_for_assignment): Improve commentary. 5882 58832015-09-30 Marek Polacek <polacek@redhat.com> 5884 5885 PR c/67730 5886 * c-typeck.c (c_finish_return): Use the expansion point location for 5887 certain "return with value" warnings. 5888 58892015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org> 5890 5891 * c-parser.c (pragma_lex): Add loc argument. 5892 58932015-09-15 Marek Polacek <polacek@redhat.com> 5894 5895 PR c/67580 5896 * c-decl.c (tag_exists_p): New function. 5897 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when 5898 struct/union/enum keywords are missing. 5899 * c-tree.h (tag_exists_p): Declare. 5900 59012015-09-15 Marek Polacek <polacek@redhat.com> 5902 5903 * c-decl.c (lookup_label): Return NULL_TREE instead of 0. 5904 (lookup_tag): Change the type of THISLEVEL_ONLY to bool. 5905 Return NULL_TREE instead of 0. 5906 (lookup_name): Return NULL_TREE instead of 0. 5907 (lookup_name_in_scope): Likewise. 5908 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0. 5909 (parser_xref_tag): Use false instead of 0. 5910 (start_struct): Use true instead of 1. 5911 (start_enum): Use true instead of 1 and NULL_TREE instead of 0. 5912 59132015-09-14 Marek Polacek <polacek@redhat.com> 5914 5915 * c-typeck.c (set_nonincremental_init_from_string): Use 5916 HOST_WIDE_INT_M1U when shifting a negative value. 5917 59182015-09-09 Mark Wielaard <mjw@redhat.com> 5919 5920 * c-typeck.c (build_binary_op): Check and warn when nonnull arg 5921 parm against NULL. 5922 59232015-09-10 Jakub Jelinek <jakub@redhat.com> 5924 5925 PR c/67502 5926 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts 5927 into OMP_FOR_PRE_BODY rather than before the loop. 5928 59292015-09-09 Jakub Jelinek <jakub@redhat.com> 5930 5931 PR c/67501 5932 * c-parser.c (c_parser_oacc_all_clauses, 5933 c_parser_omp_all_clauses): Remove invalid clause from 5934 list of clauses even if parser->error is set. 5935 5936 PR c/67500 5937 * c-parser.c (c_parser_omp_clause_aligned, 5938 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up 5939 test for errors. 5940 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to 5941 error_mark_node. 5942 5943 PR c/67495 5944 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression 5945 instead of c_parser_unary_expression. If the result is !lvalue_p, 5946 wrap the result of c_fully_fold into NON_LVALUE_EXPR. 5947 59482015-09-04 Marek Polacek <polacek@redhat.com> 5949 5950 PR sanitizer/67279 5951 * c-typeck.c (build_binary_op): Don't instrument static initializers. 5952 59532015-09-03 Martin Sebor <msebor@redhat.com> 5954 5955 PR c/66516 5956 * c-typeck.c (convert_arguments, parser_build_unary_op, 5957 build_conditional_expr, c_cast_expr, convert_for_assignment, 5958 build_binary_op, _objc_common_truthvalue_conversion): Call 5959 reject_gcc_builtin. 5960 (c_decl_implicit): Define. 5961 59622015-09-02 Marek Polacek <polacek@redhat.com> 5963 5964 PR c/67432 5965 * c-parser.c (c_parser_enum_specifier): Give a better error for 5966 an empty enum. 5967 59682015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org> 5969 5970 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs. 5971 59722015-08-12 Marek Polacek <polacek@redhat.com> 5973 5974 * c-decl.c (grokdeclarator): Call error_at instead of error and pass 5975 LOC to it. 5976 59772015-08-03 Marek Polacek <polacek@redhat.com> 5978 5979 PR c/67088 5980 * c-decl.c (check_bitfield_type_and_width): Add location parameter. 5981 Use it. 5982 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width. 5983 59842015-08-02 Patrick Palka <ppalka@gcc.gnu.org> 5985 5986 * c-parser.c (c_parser_if_body): Take token_indent_info 5987 argument. Call warn_for_misleading_indentation even when the 5988 body is a semicolon. Extract token_indent_infos corresponding 5989 to the guard, body and next tokens. Adjust call to 5990 warn_for_misleading_indentation accordingly. 5991 (c_parser_else_body): Likewise. 5992 (c_parser_if_statement): Likewise. 5993 (c_parser_while_statement): Likewise. 5994 (c_parser_for_statement): Likewise. 5995 59962015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com> 5997 Manuel López-Ibáñez <manu@gcc.gnu.org> 5998 5999 * c-decl.c (get_parm_info): Remove static var. Update warning 6000 message. 6001 60022015-07-27 Marek Polacek <polacek@redhat.com> 6003 6004 PR c++/66555 6005 PR c/54979 6006 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp. 6007 60082015-07-20 Marek Polacek <polacek@redhat.com> 6009 6010 PR c++/55095 6011 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init. 6012 (build_binary_op): Warn about left shift overflows. 6013 60142015-07-09 Andrew MacLeod <amacleod@redhat.com> 6015 6016 * c-array-notation.c: Adjust includes for flags.h changes. 6017 * c-objc-common.c: Likewise. 6018 60192015-07-07 Andrew MacLeod <amacleod@redhat.com> 6020 6021 * c-array-notation.c: Adjust includes. 6022 * c-aux-info.c: Likewise. 6023 * c-convert.c: Likewise. 6024 * c-decl.c: Likewise. 6025 * c-errors.c: Likewise. 6026 * c-lang.c: Likewise. 6027 * c-objc-common.c: Likewise. 6028 * c-parser.c: Likewise. 6029 * c-typeck.c: Likewise. 6030 60312015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org> 6032 6033 PR fortran/66605 6034 * c-decl.c (finish_function): Call do_warn_unused_parameter. 6035 60362015-06-29 Marek Polacek <polacek@redhat.com> 6037 6038 PR c/66322 6039 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P. 6040 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn 6041 about -Wswitch-bool here. 6042 (do_case): Update c_add_case_label call. 6043 (c_finish_case): Update c_do_switch_warnings call. 6044 60452015-06-27 Marek Polacek <polacek@redhat.com> 6046 6047 * c-typeck.c: Use VECTOR_TYPE_P throughout. 6048 60492015-06-26 Marek Polacek <polacek@redhat.com> 6050 6051 * c-array-notation.c (fix_builtin_array_notation_fn): Use 6052 INDIRECT_REF_P. 6053 * c-typeck.c (array_to_pointer_conversion): Likewise. 6054 (build_unary_op): Likewise. 6055 (c_finish_return): Likewise. 6056 60572015-06-25 Andrew MacLeod <amacleod@redhat.com> 6058 6059 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list. 6060 * c-parser.c: Likewise. 6061 60622015-06-25 Richard Sandiford <richard.sandiford@arm.com> 6063 6064 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash 6065 instead of pointer_hash. 6066 (detect_field_duplicates): Likewise. 6067 60682015-06-25 Marek Polacek <polacek@redhat.com> 6069 6070 * c-array-notation.c: Use VAR_P throughout. 6071 * c-decl.c: Likewise. 6072 * c-objc-common.c: Likewise. 6073 * c-parser.c: Likewise. 6074 * c-typeck.c: Likewise. 6075 60762015-06-25 Marek Polacek <polacek@redhat.com> 6077 6078 * c-decl.c: Use is_global_var throughout. 6079 * c-parser.c: Likewise. 6080 * c-typeck.c: Likewise. 6081 60822015-06-17 Andrew MacLeod <amacleod@redhat.com> 6083 6084 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h. 6085 * c-aux-info.c: Likewise. 6086 * c-convert.c: Likewise. 6087 * c-decl.c: Likewise. 6088 * c-errors.c: Likewise. 6089 * c-lang.c: Likewise. 6090 * c-objc-common.c: Likewise. 6091 * c-parser.c: Likewise. 6092 * c-typeck.c: Likewise. 6093 60942015-06-11 Jan Hubicka <hubicka@ucw.cz> 6095 6096 PR middle-end/66325 6097 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type 6098 variants. 6099 61002015-06-11 Pierre-Marie de Rodat <derodat@adacore.com> 6101 6102 * c-decl.c (pop_scope): Register the main translation unit 6103 through the new debug hook. 6104 61052015-06-08 Andrew MacLeod <amacleod@redhat.com> 6106 6107 * c-array-notation.c : Adjust include files. 6108 * c-aux-info.c : Likewise. 6109 * c-convert.c : Likewise. 6110 * c-decl.c : Likewise. 6111 * c-errors.c : Likewise. 6112 * c-lang.c : Likewise. 6113 * c-lang.h : Likewise. 6114 * c-objc-common.c : Likewise. 6115 * c-parser.c : Likewise. 6116 * c-typeck.c : Likewise. 6117 61182015-06-05 Aldy Hernandez <aldyh@redhat.com> 6119 6120 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and 6121 immediately clobber it. 6122 (c_write_global_declarations_1): Remove call to 6123 check_global_declaration_1. 6124 (c_write_global_declarations_2): Remove. 6125 (c_write_final_cleanups): Rename from c_write_global_declarations. 6126 Remove call to finalize_compilation_unit. 6127 Remove calls to debugging hooks. 6128 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl. 6129 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS. 6130 * c-tree.h: Remove c_write_global_declarations. 6131 61322015-06-04 Andrew MacLeod <amacleod@redhat.com> 6133 6134 * c-array-notation.c: Adjust includes for restructured coretypes.h. 6135 * c-aux-info.c: Likewise. 6136 * c-convert.c: Likewise. 6137 * c-decl.c: Likewise. 6138 * c-errors.c: Likewise. 6139 * c-lang.c: Likewise. 6140 * c-objc-common.c: Likewise. 6141 * c-parser.c: Likewise. 6142 * c-typeck.c: Likewise. 6143 61442015-06-04 Marek Polacek <polacek@redhat.com> 6145 6146 PR c/66341 6147 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if 6148 it is a lvalue. 6149 61502015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> 6151 6152 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc. 6153 Warn for empty struct. 6154 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct. 6155 61562015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com> 6157 6158 * c-decl.c (start_function): Call plugin before parsing. 6159 (finish_function): Call plugin after parsing. 6160 61612015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> 6162 6163 PR c/49551 6164 * c-decl.c (merge_decls): Merge DECL_COMMON. 6165 61662015-05-22 Jim Wilson <jim.wilson@linaro.org> 6167 6168 * Make-lang.in (check_gcc_pallelize): Define. 6169 61702015-05-22 Marek Polacek <polacek@redhat.com> 6171 6172 PR c/47043 6173 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator 6174 attributes. 6175 61762015-05-21 Marek Polacek <polacek@redhat.com> 6177 6178 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of 6179 DECL_BUILT_IN. 6180 61812015-05-20 Marek Polacek <polacek@redhat.com> 6182 6183 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout. 6184 * c-typeck.c: Likewise. 6185 61862015-05-19 Marek Polacek <polacek@redhat.com> 6187 6188 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P. 6189 61902015-05-19 Jakub Jelinek <jakub@redhat.com> 6191 6192 PR middle-end/66199 6193 * c-parser.c (c_parser_omp_for_loop): Don't add 6194 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving 6195 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES. 6196 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined 6197 constructs. 6198 61992015-05-19 Mikhail Maltsev <maltsevm@gmail.com> 6200 6201 * c-typeck.c (build_array_ref): Use std::swap instead of explicit 6202 swaps. 6203 62042015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org> 6205 6206 PR fortran/44054 6207 * c-objc-common.c (c_tree_printer): Replace locus pointer with 6208 accessor function. 6209 62102015-05-14 Marek Polacek <polacek@redhat.com> 6211 6212 PR c/66066 6213 PR c/66127 6214 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic 6215 rather than with 0. 6216 62172015-05-12 David Malcolm <dmalcolm@redhat.com> 6218 6219 * c-parser.c (c_parser_if_body): Add param "if_loc", use it 6220 to add a call to warn_for_misleading_indentation. 6221 (c_parser_else_body): Likewise, adding param "else_loc". 6222 (c_parser_if_statement): Check for misleading indentation. 6223 (c_parser_while_statement): Likewise. 6224 (c_parser_for_statement): Likewise. 6225 62262015-05-08 Marek Polacek <polacek@redhat.com> 6227 6228 PR c/64918 6229 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects. 6230 (output_init_element): Likewise. 6231 62322015-05-07 Marek Polacek <polacek@redhat.com> 6233 6234 PR c/65179 6235 * c-typeck.c (build_binary_op): Warn when left shifting a negative 6236 value. 6237 62382015-04-30 Marek Polacek <polacek@redhat.com> 6239 6240 * c-typeck.c (set_init_label): Call error_at instead of error and 6241 pass LOC to it. 6242 6243 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print 6244 the type of a decl. 6245 6246 * c-typeck.c (c_build_va_arg): Clarify the error message. 6247 62482015-04-29 Thomas Schwinge <thomas@codesourcery.com> 6249 6250 * c-parser.c (c_parser_oacc_enter_exit_data): Use 6251 OMP_STANDALONE_CLAUSES. 6252 62532015-04-28 Marek Polacek <polacek@redhat.com> 6254 6255 * c-parser.c (c_parser_binary_expression): Remove duplicate line. 6256 62572015-04-28 Marek Polacek <polacek@redhat.com> 6258 6259 PR c/65901 6260 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type. 6261 62622015-04-25 Marek Polacek <polacek@redhat.com> 6263 6264 PR c/52085 6265 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode" 6266 attribute. 6267 62682015-04-23 Marek Polacek <polacek@redhat.com> 6269 6270 PR c/65345 6271 * c-decl.c (set_labels_context_r): New function. 6272 (store_parm_decls): Call it via walk_tree_without_duplicates. 6273 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw 6274 instead of create_tmp_var. Build TARGET_EXPR instead of 6275 COMPOUND_EXPR. 6276 (build_atomic_assign): Use create_tmp_var_raw instead of 6277 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR. 6278 62792015-04-20 Ilya Verbin <ilya.verbin@intel.com> 6280 6281 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon. 6282 (c_parser_omp_target_update): Add missed %> to error_at (). 6283 62842015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org> 6285 6286 PR target/55143 6287 * c-decl.c (c_default_pointer_mode): Remove definition. 6288 * c-tree.h (c_default_pointer_mode): Remove declaration. 6289 62902015-03-27 Tobias Burnus <burnus@net-b.de> 6291 6292 PR c/65586 6293 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't 6294 error out. 6295 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute, 6296 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare): 6297 Update calls to not error for skipped omp pragmas with -fopenmp-simd. 6298 62992015-03-19 Jakub Jelinek <jakub@redhat.com> 6300 6301 * c-decl.c (c_decl_attributes): Also add "omp declare target" 6302 attribute for DECL_EXTERNAL VAR_DECLs. 6303 63042015-03-11 Jakub Jelinek <jakub@redhat.com> 6305 6306 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier 6307 argument. 6308 63092015-03-10 Jakub Jelinek <jakub@redhat.com> 6310 6311 PR c/65120 6312 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison 6313 before preparing arguments to warn_logical_not_parentheses. 6314 63152015-03-09 Jakub Jelinek <jakub@redhat.com> 6316 6317 PR c/65120 6318 * c-typeck.c (parser_build_binary_op): Don't warn for 6319 !!x == y or !b == y where b is _Bool. 6320 63212015-03-09 Marek Polacek <polacek@redhat.com> 6322 6323 * c-convert.c (convert): Make use of do_ubsan_in_current_function. 6324 * c-decl.c (grokdeclarator): Likewise. 6325 * c-typeck.c (build_binary_op): Likewise. 6326 63272015-02-27 Marek Polacek <polacek@redhat.com> 6328 6329 PR c/65228 6330 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node. 6331 63322015-02-14 Marek Polacek <polacek@redhat.com> 6333 6334 PR c/64768 6335 * c-decl.c (grokdeclarator): Set the range of a flexible array member 6336 declared through a typedef name. 6337 63382015-02-13 Marek Polacek <polacek@redhat.com> 6339 6340 PR c/65050 6341 * c-decl.c (grokdeclarator): Print also the type when giving 6342 the error message about array's incomplete element type. 6343 63442015-02-11 Jakub Jelinek <jakub@redhat.com> 6345 6346 PR c/64824 6347 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec 6348 check in the POP macro. 6349 63502015-02-09 Marek Polacek <polacek@redhat.com> 6351 6352 PR c/64856 6353 * c-typeck.c (process_init_element): Don't always wrap 6354 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when 6355 initializing a range of elements. 6356 63572015-02-04 Jakub Jelinek <jakub@redhat.com> 6358 6359 PR c/64824 6360 PR c/64868 6361 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR. 6362 63632015-02-02 Bruno Loff <bruno.loff@gmail.com> 6364 6365 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after 6366 processing enum declaration. 6367 63682015-01-29 Marek Polacek <polacek@redhat.com> 6369 6370 PR c/64709 6371 * c-typeck.c (pop_init_level): If constructor_elements has 6372 exactly one element with integer_zerop value, set constructor_zeroinit 6373 to 1. Remove braces around warning_init call. 6374 63752015-01-27 Jakub Jelinek <jakub@redhat.com> 6376 6377 PR c/64766 6378 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL 6379 of FUNCTION_DECLs with error_mark_node. 6380 63812015-01-26 Jakub Jelinek <jakub@redhat.com> 6382 6383 PR c/64778 6384 * c-typeck.c (convert_arguments): Return -1 if there are 6385 error_args, even if we've diagnosed too many arguments. 6386 63872015-01-21 Richard Biener <rguenther@suse.de> 6388 6389 PR middle-end/64313 6390 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p 6391 for builtins the user declared correctly. 6392 63932015-01-15 Thomas Schwinge <thomas@codesourcery.com> 6394 Bernd Schmidt <bernds@codesourcery.com> 6395 Cesar Philippidis <cesar@codesourcery.com> 6396 James Norris <jnorris@codesourcery.com> 6397 Jakub Jelinek <jakub@redhat.com> 6398 Ilmir Usmanov <i.usmanov@samsung.com> 6399 6400 * c-parser.c: Include "gomp-constants.h". 6401 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum 6402 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. 6403 Use OMP_CLAUSE_SET_MAP_KIND. 6404 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA, 6405 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE. 6406 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE, 6407 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, 6408 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT. 6409 (c_parser_omp_clause_name): Handle "auto", "async", "copy", 6410 "copyout", "create", "delete", "deviceptr", "gang", "host", 6411 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy", 6412 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout", 6413 "present_or_create", "pcreate", "seq", "self", "vector", 6414 "vector_length", "wait", "worker". 6415 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK) 6416 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK) 6417 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK) 6418 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros. 6419 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_. 6420 (c_parser_oacc_wait_list, c_parser_oacc_data_clause) 6421 (c_parser_oacc_data_clause_deviceptr) 6422 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers) 6423 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait) 6424 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses) 6425 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels) 6426 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop) 6427 (c_parser_oacc_parallel, c_parser_oacc_update) 6428 (c_parser_oacc_wait): New functions. 6429 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels) 6430 (c_finish_oacc_data): New prototypes. 6431 * c-typeck.c: Include "gomp-constants.h". 6432 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use 6433 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use 6434 OMP_CLAUSE_SET_MAP_KIND. 6435 (c_finish_oacc_parallel, c_finish_oacc_kernels) 6436 (c_finish_oacc_data): New functions. 6437 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_, 6438 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS, 6439 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT, 6440 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG, 6441 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's 6442 GOMP_MAP_FORCE_DEVICEPTR. 6443 64442015-01-09 Michael Collison <michael.collison@linaro.org> 6445 6446 * c-array-notation.c: Include hash-set.h, machmode.h, 6447 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h 6448 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. 6449 * c-aux-info.c: Ditto. 6450 * c-convert.c: Ditto. 6451 * c-decl.c: Ditto. 6452 * c-errors.c: Ditto. 6453 * c-lang.c: Dittoxs. 6454 * c-objc-common.c: Ditto. 6455 * c-parser.c: Ditto. 6456 * c-typeck.c: Include hash-set.h, machmode.h, 6457 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h 6458 fold-const.h, wide-int.h, inchash.h, real.h and 6459 fixed-value.h due to flattening of tree.h. 6460 64612015-01-07 Marek Polacek <polacek@redhat.com> 6462 6463 PR c/64417 6464 * c-typeck.c (process_init_element): Disallow initialization of 6465 a flexible array member with a string constant if the structure 6466 is in an array. 6467 64682015-01-05 Jakub Jelinek <jakub@redhat.com> 6469 6470 PR sanitizer/64344 6471 * c-typeck.c (convert_for_assignment, c_finish_return): For 6472 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum 6473 types also set in_late_binary_op around convert call. 6474 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE 6475 to integral type casts, if not in_late_binary_op, pass c_fully_fold 6476 result on expr as last argument to ubsan_instrument_float_cast, 6477 if in_late_binary_op, don't use c_save_expr but save_expr. 6478 6479 Update copyright years. 6480 64812015-01-05 Marek Polacek <polacek@redhat.com> 6482 6483 PR c/64423 6484 * c-typeck.c (build_array_ref): Pass loc down to 6485 warn_array_subscript_with_type_char. 6486 64872014-12-20 Martin Uecker <uecker@eecs.berkeley.edu> 6488 6489 * c-typeck.c: New behavious for pointers to arrays with qualifiers 6490 (common-pointer-type): For pointers to arrays take qualifiers from 6491 element type. 6492 (build_conditional_expr): Add warnings for lost qualifiers. 6493 (comp-target-types): Allow pointers to arrays with different qualifiers. 6494 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add 6495 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS 6496 to PEDWARN_FOR_QUALIFIERS. 6497 64982014-12-17 Jakub Jelinek <jakub@redhat.com> 6499 6500 PR sanitizer/64289 6501 * c-convert.c: Include ubsan.h. 6502 (convert): For real -> integral casts and 6503 -fsanitize=float-cast-overflow don't call convert_to_integer, but 6504 instead instrument the float cast directly. 6505 65062014-11-29 Jakub Jelinek <jakub@redhat.com> 6507 6508 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign, 6509 c_finish_stmt_expr): Remove NULL last argument from 6510 create_tmp_var_raw and create_tmp_var calls. 6511 * c-array-notation.c (fix_builtin_array_notation_fn, 6512 build_array_notation_expr, fix_conditional_array_notations_1, 6513 fix_array_notation_expr, fix_array_notation_call_expr): Likewise. 6514 65152014-11-28 Marek Polacek <polacek@redhat.com> 6516 6517 PR c/63862 6518 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't 6519 convert the right operand to integer type. 6520 65212014-11-25 Marek Polacek <polacek@redhat.com> 6522 6523 PR c/63877 6524 * c-decl.c (start_function): Disable -Wmissing-declarations warning 6525 for inline functions. 6526 65272014-11-21 Jakub Jelinek <jakub@redhat.com> 6528 6529 PR target/63764 6530 * c-typeck.c (build_array_ref): Adjust 6531 convert_vector_to_pointer_for_subscript caller. If it returns true, 6532 call non_lvalue_loc on the result. 6533 65342014-11-11 Richard Biener <rguenther@suse.de> 6535 6536 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues 6537 to true. 6538 65392014-11-10 Andi Kleen <ak@linux.intel.com> 6540 6541 PR c/60804 6542 * c-parser.c (c_parser_statement_after_labels): Call 6543 check_no_cilk. 6544 (c_parser_if_statement): Dito. 6545 (c_parser_switch_statement): Dito. 6546 (c_parser_while_statement): Dito. 6547 (c_parser_do_statement): Dito. 6548 (c_parser_for_statement): Dito. 6549 * c-typeck.c (c_finish_loop): Dito. 6550 65512014-11-10 Paolo Carlini <paolo.carlini@oracle.com> 6552 6553 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and 6554 OPT_Wshift_count_overflow in the warnings. 6555 65562014-10-30 Marek Polacek <polacek@redhat.com> 6557 6558 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name, 6559 print the stripped version as well, if they're not the same. 6560 65612014-10-29 Richard Sandiford <richard.sandiford@arm.com> 6562 6563 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from 6564 machine_mode. 6565 65662014-10-28 Andrew MacLeod <amacleod@redhat.com> 6567 6568 * c-decl.c: Adjust include files. 6569 * c-parser.c: Ditto. 6570 65712014-10-27 Phil Muldoon <pmuldoon@redhat.com> 6572 Tom Tromey <tromey@redhat.com> 6573 6574 * c-tree.h (enum c_oracle_request): New. 6575 (c_binding_oracle_function): New typedef. 6576 (c_binding_oracle, c_pushtag, c_bind): Declare. 6577 * c-decl.c (c_binding_oracle): New global. 6578 (I_SYMBOL_CHECKED): New macro. 6579 (i_symbol_binding): New function. 6580 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine. 6581 (I_TAG_CHECKED): New macro. 6582 (i_tag_binding): New function. 6583 (I_TAG_BINDING, I_TAG_DECL): Redefine. 6584 (I_LABEL_CHECKED): New macro. 6585 (i_label_binding): New function. 6586 (I_LABEL_BINDING, I_LABEL_DECL): Redefine. 6587 (c_print_identifier): Save and restore c_binding_oracle. 6588 (c_pushtag, c_bind): New functions. 6589 65902014-10-27 Andrew MacLeod <amacleod@redhat.com> 6591 6592 * c-typeck.c: Adjust include files. 6593 65942014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org> 6595 6596 PR c++/53061 6597 * c-objc-common.c (c_objc_common_init): Do not do diagnostics 6598 initialization here... 6599 (c_initialize_diagnostics): ... but here. Set defaults after 6600 building pretty-printer. 6601 66022014-10-23 Marek Polacek <polacek@redhat.com> 6603 6604 PR c/63626 6605 * c-decl.c (pop_scope): Don't print warning in external_scope. 6606 66072014-10-19 Marek Polacek <polacek@redhat.com> 6608 6609 PR c/63567 6610 * c-typeck.c (output_init_element): Allow initializing objects with 6611 static storage duration with compound literals even in C99 and add 6612 pedwarn for it. 6613 66142014-10-17 Marek Polacek <polacek@redhat.com> 6615 6616 PR c/63567 6617 * c-typeck.c (digest_init): Allow initializing objects with static 6618 storage duration with compound literals even in C99 and add pedwarn 6619 for it. 6620 66212014-10-17 Marek Polacek <polacek@redhat.com> 6622 6623 PR c/63543 6624 * c-tree.h (C_TYPE_ERROR_REPORTED): Define. 6625 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..." 6626 error multiple times. Print the type. 6627 66282014-10-17 Marek Polacek <polacek@redhat.com> 6629 6630 PR c/63549 6631 * c-typeck.c (build_array_ref): Bail if the index in an incomplete 6632 type. 6633 66342014-10-17 Marek Polacek <polacek@redhat.com> 6635 6636 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally. 6637 (start_function): Use OPT_Wimplicit_int instead of 0. 6638 (store_parm_decls_oldstyle): Likewise. 6639 66402014-10-17 Alan Modra <amodra@gmail.com> 6641 6642 PR middle-end/61848 6643 * c-decl.c (merge_decls): Don't merge section name or tls model 6644 to newdecl symtab node, instead merge to olddecl. Override 6645 existing olddecl section name. Set tls_model for all thread-local 6646 vars, not just OMP thread-private ones. Remove incorrect comment. 6647 66482014-10-16 Andrew MacLeod <amacleod@redhat.com> 6649 6650 * c-decl.c: Adjust include files. 6651 66522014-10-14 DJ Delorie <dj@redhat.com> 6653 6654 * c-parser.c (c_parse_init): Add RID entries for each __intN. 6655 (c_token_starts_typename): Check all __intN, not just __int128. 6656 (c_token_starts_declspecs): Likewise. 6657 (c_parser_declspecs): Likewise. 6658 (c_parser_attribute_any_word): Likewise. 6659 (c_parser_objc_selector): Likewise. 6660 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n. 6661 (struct c_declspecs): Add int_n_idx field to record *which* __intN 6662 is specified. 6663 * c-decl.c (declspecs_add_type): Check for all __intN, not just 6664 __int128. 6665 (finish_declspecs): Likewise. 6666 66672014-10-13 Anthony Brandon <anthony.brandon@gmail.com> 6668 6669 * c-parser.c (c_parser_all_labels): New function to replace 6670 the duplicate code. 6671 (c_parser_statement): Call the new function. 6672 66732014-10-09 Marek Polacek <polacek@redhat.com> 6674 6675 PR c/63480 6676 * c-typeck.c (pop_init_level): Don't warn about initializing 6677 with { }. 6678 66792014-10-07 Marek Polacek <polacek@redhat.com> 6680 6681 PR c/59717 6682 * c-decl.c (header_for_builtin_fn): New function. 6683 (implicitly_declare): Suggest which header to include. 6684 66852014-10-07 Marek Polacek <polacek@redhat.com> 6686 6687 * c-convert.c (convert): Use error_operand_p. 6688 * c-typeck.c (require_complete_type): Likewise. 6689 (really_atomic_lvalue): Likewise. 6690 (digest_init): Likewise. 6691 (handle_omp_array_sections_1): Likewise. 6692 66932014-10-03 Marek Polacek <polacek@redhat.com> 6694 6695 PR c/63453 6696 * c-decl.c (pop_scope): Don't warn about "inline function declared 6697 but never defined" for functions marked with gnu_inline attribute. 6698 66992014-09-25 Jakub Jelinek <jakub@redhat.com> 6700 6701 PR c++/63249 6702 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read 6703 on low_bound and length. 6704 67052014-09-24 Marek Polacek <polacek@redhat.com> 6706 6707 PR c/61405 6708 PR c/53874 6709 * c-parser.c: Don't define CPP_KEYWORD. 6710 (c_parser_switch_statement): Pass original type to c_finish_case. 6711 * c-tree.h (c_finish_case): Update declaration. 6712 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it 6713 conditionally to c_do_switch_warnings. 6714 67152014-09-03 Marek Polacek <polacek@redhat.com> 6716 6717 PR c/62024 6718 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op 6719 conversions. 6720 67212014-09-02 Jakub Jelinek <jakub@redhat.com> 6722 Balaji V. Iyer <balaji.v.iyer@intel.com> 6723 Igor Zamyatin <igor.zamyatin@intel.com> 6724 6725 * c-parser.c (c_parser_cilk_for): New function. 6726 (c_parser_cilk_grainsize): Likewise. 6727 (c_get_temp_regvar): Likewise. 6728 (c_parser_statement_after_labels): Added RID_CILK_FOR case. 6729 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case. 6730 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks. 6731 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_ 6732 case. 6733 67342014-08-27 Chen Gang <gang.chen.5i5j@gmail.com> 6735 6736 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes, 6737 with using HOST_WIDE_INT without truncation to 'int' 6738 67392014-08-22 Marek Polacek <polacek@redhat.com> 6740 6741 PR c++/62199 6742 * c-typeck.c (parser_build_binary_op): Adjust call to 6743 warn_logical_not_parentheses. 6744 67452014-08-22 Igor Zamyatin <igor.zamyatin@intel.com> 6746 6747 PR other/62008 6748 * c-parser.c (c_parser_array_notation): Check for correct 6749 type of an array added. 6750 67512014-08-19 Marek Polacek <polacek@redhat.com> 6752 6753 PR c++/62153 6754 * c-typeck.c (build_binary_op): If either operand of a comparison 6755 is a boolean expression, call maybe_warn_bool_compare. 6756 67572014-08-19 Patrick Palka <ppalka@gcc.gnu.org> 6758 6759 PR c/45584 6760 * c-typeck.c (build_c_cast): Do a conversion even when the 6761 TYPE_MAIN_VARIANTs are the same. 6762 67632014-08-19 Marek Polacek <polacek@redhat.com> 6764 6765 * c-decl.c (diagnose_mismatched_decls): Unconditionally call 6766 pedwarn_c99 instead of pedwarn. 6767 (grokfield): Likewise. 6768 (warn_defaults_to): New function. 6769 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99. 6770 Unconditionally call pedwarn_c99 instead of pedwarn. 6771 (start_function): Call warn_defaults_to instead of pedwarn_c99. 6772 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't 6773 check flag_isoc11 before. 6774 * c-errors.c (pedwarn_c99): Change the return type to bool. 6775 Handle -Wc99-c11-compat. 6776 * c-parser.c (disable_extension_diagnostics): Handle 6777 warn_c99_c11_compat. 6778 (restore_extension_diagnostics): Likewise. 6779 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99 6780 instead of pedwarn, don't check flag_isoc11 before. 6781 (c_parser_declspecs): Likewise. 6782 (c_parser_alignas_specifier): Likewise. 6783 (c_parser_alignof_expression): Likewise. 6784 (c_parser_generic_selection): Likewise. 6785 * c-tree.h (pedwarn_c99): Update declaration. 6786 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead 6787 of pedwarn_c99. 6788 67892014-08-19 Marek Polacek <polacek@redhat.com> 6790 6791 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally 6792 to pedwarn_c90. 6793 * c-errors.c: Include "opts.h". 6794 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better. 6795 * c-parser.c (disable_extension_diagnostics): Handle negative value 6796 of warn_c90_c99_compat, too. 6797 (restore_extension_diagnostics): Likewise. 6798 (c_parser_compound_statement_nostart): Pass 6799 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90. 6800 68012014-08-12 Marek Polacek <polacek@redhat.com> 6802 6803 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>: 6804 Add pedwarn. 6805 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>: 6806 Likewise. 6807 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise. 6808 68092014-08-10 Marek Polacek <polacek@redhat.com> 6810 6811 PR c/51849 6812 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99. 6813 Call pedwarn_c90 instead of pedwarn. 6814 (check_bitfield_type_and_width): Likewise. 6815 (declspecs_add_qual): Likewise. 6816 (declspecs_add_type): Likewise. 6817 (warn_variable_length_array): Unify function for -pedantic and -Wvla. 6818 Adjust to only call pedwarn_c90. 6819 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call 6820 pedwarn_c90 instead of pedwarn. 6821 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat. 6822 * c-parser.c (disable_extension_diagnostics): Handle 6823 warn_c90_c99_compat. 6824 (restore_extension_diagnostics): Likewise. 6825 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call 6826 pedwarn_c90 instead of pedwarn. 6827 (c_parser_initelt): Likewise. 6828 (c_parser_postfix_expression): Likewise. 6829 (c_parser_postfix_expression_after_paren_type): Likewise. 6830 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99. 6831 * c-tree.h: Fix formatting. 6832 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call 6833 pedwarn_c90 instead of pedwarn. 6834 68352014-08-07 Trevor Saunders <tsaunders@mozilla.com> 6836 6837 * c-typeck.c: Remove include of pointer-set.h. 6838 68392014-08-07 Marek Polacek <polacek@redhat.com> 6840 6841 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization. 6842 68432014-08-02 Trevor Saunders <tsaunders@mozilla.com> 6844 6845 * c-typeck.c: Use hash_map instead of pointer_map. 6846 68472014-08-02 Trevor Saunders <tsaunders@mozilla.com> 6848 6849 * c-decl.c: Use hash_set instead of pointer_set. 6850 68512014-08-01 Igor Zamyatin <igor.zamyatin@intel.com> 6852 6853 PR middle-end/61455 6854 * c-array-notation.c (expand_array_notations): Handling 6855 of DECL_EXPR added. 6856 68572014-07-31 Marc Glisse <marc.glisse@inria.fr> 6858 6859 PR c++/60517 6860 * c-typeck.c (c_finish_return): Return 0 instead of the address of 6861 a local variable. 6862 68632014-07-30 Tom Tromey <tromey@redhat.com> 6864 6865 * c-typeck.c (struct constructor_stack) <designator_depth>: New 6866 field. 6867 (really_start_incremental_init, push_init_level): Initialize 6868 designator_depth. 6869 (pop_init_level): Set global designator_depth. 6870 (process_init_element): Check for designated_init attribute. 6871 68722014-07-20 Marek Polacek <polacek@redhat.com> 6873 6874 PR c/61852 6875 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it. 6876 (implicitly_declare): Pass location to implicit_decl_warning. 6877 68782014-07-14 Jakub Jelinek <jakub@redhat.com> 6879 6880 PR middle-end/61294 6881 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask. 6882 If non-NULL, call c_parser_check_literal_zero. 6883 (c_parser_check_literal_zero): New function. 6884 (c_parser_postfix_expression_after_primary): Adjust 6885 c_parser_expr_list caller, handle -Wmemset-transposed-args. 6886 68872014-07-06 Marek Polacek <polacek@redhat.com> 6888 6889 PR c/6940 6890 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER. 6891 * c-tree.h (C_ARRAY_PARAMETER): Define. 6892 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array 6893 function parameter. 6894 68952014-07-02 Jan Hubicka <hubicka@ucw.cz> 6896 Chen Gang <gang.chen.5i5j@gmail.com> 6897 6898 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before 6899 releasing symbol. 6900 69012014-07-01 Marek Polacek <polacek@redhat.com> 6902 6903 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion 6904 instead of 0 to WARN_FOR_ASSIGNMENT. 6905 69062014-07-01 Marek Polacek <polacek@redhat.com> 6907 6908 PR c/58286 6909 * c-typeck.c (convert_for_assignment): Pass 6910 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT. 6911 69122014-06-30 Marek Polacek <polacek@redhat.com> 6913 6914 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function 6915 has no_sanitize_undefined attribute. 6916 69172014-06-30 Igor Zamyatin <igor.zamyatin@intel.com> 6918 6919 PR middle-end/57541 6920 * c-array-notation.c (fix_builtin_array_notation_fn): 6921 Check for 0 arguments in builtin call. Check that bultin argument is 6922 correct. 6923 * c-parser.c (c_parser_array_notation): Check for incorrect initial 6924 index. 6925 69262014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de> 6927 6928 * c-parser.c (c_parser_declaration_or_fndef): Discard all type 6929 qualifiers in __auto_type for atomic types. 6930 (c_parser_typeof_specifier): Discard all type qualifiers in 6931 __typeof__ for atomic types. 6932 69332014-06-25 Marek Polacek <polacek@redhat.com> 6934 6935 PR c/61162 6936 * c-parser.c (c_parser_statement_after_labels): Pass the location of 6937 the return expression to c_finish_return. 6938 69392014-06-25 Jakub Jelinek <jakub@redhat.com> 6940 6941 * c-typeck.c (c_finish_omp_clauses): Make sure 6942 OMP_CLAUSE_LINEAR_STEP has correct type. 6943 69442014-06-24 Trevor Saunders <tsaunders@mozilla.com> 6945 6946 * c-decl.c: Adjust. 6947 69482014-06-24 Jakub Jelinek <jakub@redhat.com> 6949 6950 * c-parser.c (c_parser_omp_for_loop): For 6951 #pragma omp parallel for simd move lastprivate clause from parallel 6952 to for rather than simd. 6953 69542014-06-23 Marek Polacek <polacek@redhat.com> 6955 6956 * c-typeck.c (parser_build_binary_op): Don't call 6957 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR. 6958 69592014-06-15 Jan Hubicka <hubicka@ucw.cz> 6960 6961 * c-parser.c (c_parser_omp_threadprivate): Likewise. 6962 * c-decl.c (merge_decls): Likewise. 6963 69642014-06-09 Marek Polacek <polacek@redhat.com> 6965 6966 PR c/36446 6967 * c-typeck.c (error_init): Call inform instead of error_at. 6968 (pedwarn_init): Call inform instead of pedwarn. 6969 (warning_init): Call inform instead of warning_at. 6970 69712014-06-07 Jan Hubicka <hubicka@ucw.cz> 6972 6973 * c-decl.c (merge_decls): Use set_decl_section_name. 6974 (duplicate_decls): Remove node if it exists. 6975 69762014-06-05 S. Gilles <sgilles@terpmail.umd.edu> 6977 6978 PR c/53119 6979 * c-typeck.c (push_init_level, process_init_element, 6980 pop_init_level): Correct check for zero initialization, move 6981 missing brace warning to respect zero initialization. 6982 69832014-06-05 Marek Polacek <polacek@redhat.com> 6984 6985 PR c/56724 6986 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass. 6987 69882014-06-05 Marek Polacek <polacek@redhat.com> 6989 6990 PR c/49706 6991 * c-typeck.c (parser_build_binary_op): Warn when logical not is used 6992 on the left hand side operand of a comparison. 6993 69942014-06-05 Marek Polacek <polacek@redhat.com> 6995 6996 PR c/48062 6997 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at. 6998 Print note only if the warning was printed. 6999 70002014-06-04 Igor Zamyatin <igor.zamyatin@intel.com> 7001 7002 PR c/58942 7003 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case 7004 with a pointer. 7005 70062014-06-03 Marek Polacek <polacek@redhat.com> 7007 7008 PR c/60439 7009 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to 7010 c_start_case. 7011 * c-tree.h (c_start_case): Update. 7012 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if 7013 switch condition has boolean value. 7014 70152014-06-02 Andrew MacLeod <amacleod@redhat.com> 7016 7017 * c-decl.c: Include builtins.h. 7018 * c-parser.c: Likewise. 7019 70202014-05-27 Marek Polacek <polacek@redhat.com> 7021 7022 PR c/56724 7023 * c-typeck.c (convert_arguments): Get location of a parameter. Change 7024 error and warning calls to error_at and warning_at. Pass location of 7025 a parameter to it. Call warning_at with OPT_Wtraditional_conversion. 7026 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and 7027 WARN_FOR_QUALIFIERS. Pass expr_loc to those. 7028 70292014-05-26 Igor Zamyatin <igor.zamyatin@intel.com> 7030 7031 PR c/61191 7032 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid 7033 function parameters. 7034 70352014-05-23 Jan Hubicka <hubicka@ucw.cz> 7036 7037 * c-decl.c (merge_decls): Preserve symtab node pointers. 7038 (duplicate_decls): Free new decl. 7039 70402014-05-23 Thomas Schwinge <thomas@codesourcery.com> 7041 7042 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable 7043 initialization. 7044 7045 * c-parser.c (c_parser_omp_target): Return bool values. 7046 70472014-05-22 Thomas Schwinge <thomas@codesourcery.com> 7048 7049 * c-parser.c (c_parser_omp_clause_thread_limit): Rename 7050 num_teams_loc variable to num_thread_limit_loc. 7051 70522014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com> 7053 7054 * c-array-notation.c (expand_array_notations): Use void_node 7055 instead of void_zero_node. 7056 70572014-05-17 Trevor Saunders <tsaunders@mozilla.com> 7058 7059 * c-decl.c (finish_struct): Adjust. 7060 (finish_enum): Likewise. 7061 (bind): Adjust. 7062 (record_inline_static): Likewise. 7063 (push_scope): Likewise. 7064 (make_label): Likewise. 7065 (lookup_label_for_goto): Likewise. 7066 (finish_struct): Likewise. 7067 (finish_enum): Likewise. 7068 (store_parm_decls): Likewise. 7069 (c_push_function_context): Likewise. 7070 * c-lang.h: Remove usage of variable_size gty attribute. 7071 * c-parser.c (c_parse_init): Adjust. 7072 (c_parse_file): Likewise. 7073 70742014-05-13 Marek Polacek <polacek@redhat.com> 7075 7076 PR c/61162 7077 * c-typeck.c (convert_for_assignment): Pass location to 7078 WARN_FOR_ASSIGNMENT instead of input_location. 7079 70802014-05-10 Marek Polacek <polacek@redhat.com> 7081 7082 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to 7083 maybe_warn_string_init. 7084 (c_parser_postfix_expression_after_paren_type): Pass type_loc to 7085 maybe_warn_string_init. 7086 * c-tree.h (maybe_warn_string_init): Update declaration. 7087 * c-typeck.c (maybe_warn_string_init): Add location parameter. 7088 Call pedwarn_init with loc instead of with input_location. 7089 (digest_init): Pass init_loc to maybe_warn_string_init. 7090 (pop_init_level): Call pedwarn_init with loc instead of with 7091 input_location. 7092 (set_init_index): Likewise. 7093 (process_init_element): Likewise. 7094 70952014-05-09 Marek Polacek <polacek@redhat.com> 7096 7097 PR c/61096 7098 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level. 7099 (c_parser_initelt): Pass location to set_init_label. Pass array index 7100 location to set_init_index. 7101 * c-tree.h (push_init_level): Update declaration. 7102 (pop_init_level): Likewise. 7103 (set_init_index): Likewise. 7104 (set_init_label): Likewise. 7105 * c-typeck.c (error_init): Add location parameter. Call error_at 7106 instead of error. 7107 (digest_init): Pass init_loc to error_init. 7108 (really_start_incremental_init): 7109 (push_init_level): Add location parameter. Pass loc to pop_init_level 7110 and error_init. 7111 (pop_init_level): Likewise. 7112 (set_designator): Add location parameter. Pass loc to pop_init_level, 7113 push_init_level, and error_init. 7114 (set_init_index): Add location parameter. Pass loc to error_init and 7115 set_designator. 7116 (set_init_label): Likewise. 7117 (output_init_element): Pass loc to error_init. 7118 (process_init_element): Pass loc to error_init, pop_init_level, 7119 pedwarn_init, and push_init_level. 7120 71212014-05-09 Marek Polacek <polacek@redhat.com> 7122 7123 PR c/50459 7124 * c-parser.c (c_parser_attributes): Parse the arguments as an 7125 expression-list if the attribute takes identifier. 7126 71272014-05-08 Marek Polacek <polacek@redhat.com> 7128 7129 PR c/61053 7130 * c-decl.c (grokdeclarator): Use min_align_of_type instead of 7131 TYPE_ALIGN_UNIT. 7132 71332014-05-08 Marek Polacek <polacek@redhat.com> 7134 7135 PR c/61077 7136 * c-decl.c (start_function): Warn for _Atomic-qualified return type 7137 of main. 7138 71392014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com> 7140 Mike Stump <mikestump@comcast.net> 7141 Richard Sandiford <rdsandiford@googlemail.com> 7142 7143 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN. 7144 (finish_enum): Use wide-int interfaces. 7145 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise. 7146 * c-typeck.c (build_c_cast): Likewise. 7147 (set_nonincremental_init_from_string): Likewise. 7148 (c_tree_equal): Likewise. 7149 71502014-05-02 Marek Polacek <polacek@redhat.com> 7151 7152 PR c/25801 7153 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error. 7154 Return size_one_node when the type is not complete. 7155 (pointer_diff): Remove comment. 7156 (build_unary_op): Improve error messages. 7157 71582014-05-02 Marek Polacek <polacek@redhat.com> 7159 7160 * c-typeck.c (c_finish_return): Separate warning_at calls. 7161 71622014-05-02 Marek Polacek <polacek@redhat.com> 7163 7164 * c-tree.h (error_init): Remove declaration. 7165 (pedwarn_init): Likewise. 7166 * c-typeck.c (error_init): Make static and move above. 7167 (pedwarn_init): Likewise. 7168 (warning_init): Move above. 7169 (maybe_warn_string_init): Likewise. 7170 71712014-05-01 Jeff Law <law@redhat.com> 7172 7173 Revert: 7174 7175 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com> 7176 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to 7177 avoid goto. 7178 71792014-05-02 Marek Polacek <polacek@redhat.com> 7180 7181 PR c/60784 7182 * c-typeck.c (push_init_level): Set constructor_designated to 7183 p->designated for structures. 7184 71852014-05-01 Marek Polacek <polacek@redhat.com> 7186 7187 PR c/60915 7188 * c-parser.c (c_parser_declaration_or_fndef): Give better error if 7189 function-definition has an attribute after the declarator. 7190 71912014-05-01 Marek Polacek <polacek@redhat.com> 7192 7193 PR c/60257 7194 * c-typeck.c (warning_init): Add location_t parameter. Call 7195 warning_at instead of warning. 7196 (push_init_level): Pass input_location to warning_init. 7197 (add_pending_init): Add location_t parameter. Pass loc to 7198 warning_init. 7199 (set_nonincremental_init): Pass input_location to add_pending_init. 7200 (set_nonincremental_init_from_string): Likewise. 7201 (output_init_element): Pass loc to warning_init and to 7202 add_pending_init. 7203 72042014-05-01 Marek Polacek <polacek@redhat.com> 7205 7206 PR c/43395 7207 * c-typeck.c (c_finish_return): Distinguish between label and variable 7208 when warning about returning local address. 7209 72102014-05-01 Marek Polacek <polacek@redhat.com> 7211 7212 PR c/29467 7213 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used 7214 in C89 mode. 7215 72162014-05-01 Marek Polacek <polacek@redhat.com> 7217 7218 PR c/43245 7219 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers 7220 instead of 0 to WARN_FOR_QUALIFIERS. 7221 72222014-05-01 Marek Polacek <polacek@redhat.com> 7223 7224 PR c/56989 7225 * c-typeck.c (default_conversion): Use better location for 7226 error call. 7227 72282014-04-30 Marek Polacek <polacek@redhat.com> 7229 7230 * c-typeck.c (build_binary_op): Call ubsan_instrument_division 7231 also when SANITIZE_FLOAT_DIVIDE is on. 7232 72332014-04-30 Marek Polacek <polacek@redhat.com> 7234 7235 PR c/60139 7236 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn 7237 and pedwarn_init. Use loc insted of input_location. 7238 72392014-04-30 Marek Polacek <polacek@redhat.com> 7240 7241 PR c/60351 7242 * c-typeck.c (build_binary_op): Use location when warning about 7243 shift count. 7244 72452014-04-25 Marek Polacek <polacek@redhat.com> 7246 7247 PR c/18079 7248 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched 7249 always_inline/noinline and hot/cold attributes. 7250 72512014-04-25 Marek Polacek <polacek@redhat.com> 7252 7253 PR c/60114 7254 * c-parser.c (c_parser_initelt): Pass input_location to 7255 process_init_element. 7256 (c_parser_initval): Pass loc to process_init_element. 7257 * c-tree.h (process_init_element): Adjust declaration. 7258 * c-typeck.c (push_init_level): Pass input_location to 7259 process_init_element. 7260 (pop_init_level): Likewise. 7261 (set_designator): Likewise. 7262 (output_init_element): Add location_t parameter. Pass loc to 7263 digest_init. 7264 (output_pending_init_elements): Pass input_location to 7265 output_init_element. 7266 (process_init_element): Add location_t parameter. Pass loc to 7267 output_init_element. 7268 72692014-04-24 Jakub Jelinek <jakub@redhat.com> 7270 7271 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before 7272 atomic-clause, allow comma in between atomic-clause and 7273 seq_cst. 7274 72752014-04-22 Jakub Jelinek <jakub@redhat.com> 7276 7277 PR c/59073 7278 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for 7279 fails, don't set OM_PARALLEL_COMBINED and return NULL. 7280 72812014-04-12 Igor Zamyatin <igor.zamyatin@intel.com> 7282 7283 PR middle-end/60469 7284 * c-array-notation.c (fix_builtin_array_notation_fn): Use 7285 create_tmp_var instead build_decl for creating temps. 7286 (build_array_notation_expr): Likewise. 7287 (fix_conditional_array_notations_1): Likewise. 7288 (fix_array_notation_expr): Likewise. 7289 (fix_array_notation_call_expr): Likewise. 7290 72912014-03-28 Jakub Jelinek <jakub@redhat.com> 7292 7293 PR c++/60689 7294 * c-tree.h (c_build_function_call_vec): New prototype. 7295 * c-typeck.c (build_function_call_vec): Don't call 7296 resolve_overloaded_builtin here. 7297 (c_build_function_call_vec): New wrapper function around 7298 build_function_call_vec. Call resolve_overloaded_builtin here. 7299 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign): 7300 Call c_build_function_call_vec instead of build_function_call_vec. 7301 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise. 7302 * c-decl.c (finish_decl): Likewise. 7303 73042014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org> 7305 7306 PR c/55383 7307 * c-typeck.c: Use correct format string in cast-qual warning 7308 73092014-03-07 Thomas Schwinge <thomas@codesourcery.com> 7310 7311 * c-decl.c (c_decl_attributes): Use 7312 lang_hooks.types.omp_mappable_type. 7313 * c-typeck.c (c_finish_omp_clauses): Likewise. 7314 73152014-03-06 Marek Polacek <polacek@redhat.com> 7316 7317 PR c/60197 7318 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead 7319 of checking tree code. 7320 73212014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com> 7322 7323 * c-parser.c (c_parser_declspecs): Replace call to error by error_at. 7324 (c_parser_parameter_declaration): Likewise. 7325 73262014-02-19 Marek Polacek <polacek@redhat.com> 7327 7328 PR c/60195 7329 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp. 7330 Call mark_exp_read on exp.value. 7331 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set 7332 TREE_ADDRESSABLE on old instead of val. 7333 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING. 7334 73352014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com> 7336 7337 * c-parser.c (c_parser_get_builtin_args): Replace calls to 7338 C_EXPR_APPEND by vec_safe_push. 7339 * c-tree.h (C_EXPR_APPEND): Remove. 7340 73412014-01-31 Marek Polacek <polacek@redhat.com> 7342 7343 PR c/59963 7344 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to 7345 build_function_call_vec. 7346 (build_function_call): Likewise. 7347 (build_atomic_assign): Likewise. 7348 (build_function_call_vec): Add arg_loc parameter. Use it. 7349 (convert_arguments): Likewise. 7350 (convert_for_assignment): Rename rhs_loc to expr_loc. 7351 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list. 7352 (c_parser_objc_keywordexpr): Likewise. 7353 (c_parser_postfix_expression_after_primary): Call 7354 build_function_call_vec with expr_loc rather than op_loc. 7355 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to 7356 build_function_call_vec. 7357 (c_parser_expr_list): Add locations parameter. Fill it with locations 7358 of function arguments. 7359 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec. 7360 73612014-01-30 Marek Polacek <polacek@redhat.com> 7362 7363 PR c/59940 7364 * c-typeck.c (build_function_call_vec): Use loc parameter. 7365 (convert_arguments): Add location parameter. Use it. 7366 (ep_convert_and_check): Likewise. 7367 (build_atomic_assign): Adjust convert_for_assignment call. 7368 (build_modify_expr): Likewise. 7369 (digest_init): Likewise. 7370 (c_finish_return): Likewise. 7371 (build_conditional_expr): Adjust ep_convert_and_check calls. 7372 (convert_for_assignment): Add rhs_loc parameter. Use it. 7373 (build_binary_op): Adjust convert_and_check and ep_convert_and_check 7374 calls. 7375 73762014-01-30 Richard Biener <rguenther@suse.de> 7377 7378 PR c/59905 7379 * c-typeck.c (build_function_call_vec): Do not replace calls 7380 to a function via an incompatible type with a runtime abort. 7381 73822014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com> 7383 7384 * c-parser.c (c_parser_declaration_or_fndef): Replaced 7385 flag_enable_cilkplus with flag_cilkplus. 7386 (c_parser_direct_declarator_inner): Likewise. 7387 (c_parser_attribute_any_word): Likewise. 7388 (c_parser_attributes): Likewise. 7389 (c_parser_compound_statement): Likewise. 7390 (c_parser_statement_after_labels): Likewise. 7391 (c_parser_if_statement): Likewise. 7392 (c_parser_switch_statement): Likewise. 7393 (c_parser_do_statement): Likewise. 7394 (c_parser_for_statement): Likewise. 7395 (c_parser_unary_expression): Likewise. 7396 (c_parser_postfix_expression): Likewise. 7397 (c_parser_postfix_expression_after_primary): Likewise. 7398 (c_parser_postfix_expression_after_primary): Likewise. 7399 (c_parser_omp_clause_name): Likewise. 7400 (c_finish_omp_declare_simd): Likewise. 7401 (c_parser_cilk_verify_simd): Likewise. 7402 * c-typeck.c (build_array_ref): Likewise. 7403 (build_function_call_vec): Likewise. 7404 (convert_arguments): Likewise. 7405 (build_compound_expr): Likewise. 7406 (c_finish_return): Likewise. 7407 (c_finish_if_stmt): Likewise. 7408 (c_finish_loop): Likewise. 7409 (build_binary_op): Likewise. 7410 74112014-01-23 Marek Polacek <polacek@redhat.com> 7412 7413 PR c/59846 7414 * c-typeck.c (parser_build_binary_op): Use location instead of 7415 input_location. 7416 (build_binary_op): Pass location to shorten_compare. 7417 74182014-01-23 Marek Polacek <polacek@redhat.com> 7419 7420 PR c/58346 7421 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to 7422 an empty aggregate. 7423 74242014-01-23 Marek Polacek <polacek@redhat.com> 7425 7426 PR c/59871 7427 * c-typeck.c (build_compound_expr): Warn even for right-hand operand 7428 of a comma expression. 7429 (emit_side_effect_warnings): Likewise. 7430 74312014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com> 7432 7433 PR c/59825 7434 * c-array-notation.c (expand_array_notation_exprs): Rewrote this 7435 function to use walk_tree and moved a lot of its functionality to 7436 expand_array_notations. 7437 (expand_array_notations): New function. 7438 74392014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com> 7440 7441 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function" 7442 attribute an attribute without value. 7443 74442014-01-23 Jakub Jelinek <jakub@redhat.com> 7445 7446 PR middle-end/58809 7447 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR, 7448 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs. 7449 74502014-01-22 Marek Polacek <polacek@redhat.com> 7451 7452 PR c/59891 7453 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead 7454 of remove_c_maybe_const_expr on op1 and op2. 7455 74562014-01-15 Jakub Jelinek <jakub@redhat.com> 7457 7458 PR c/58943 7459 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side 7460 effects, preevaluate rhs using SAVE_EXPR first. 7461 74622014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com> 7463 7464 PR c++/59631 7465 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if 7466 statements with if-elseif statements. 7467 74682014-01-06 Marek Polacek <polacek@redhat.com> 7469 7470 PR c/57773 7471 * c-decl.c (check_bitfield_type_and_width): Warn for implementation 7472 defined bit-field types only in ISO C. 7473 74742014-01-02 Richard Sandiford <rdsandiford@googlemail.com> 7475 7476 Update copyright years 7477 74782014-01-02 Richard Sandiford <rdsandiford@googlemail.com> 7479 7480 * c-array-notation.c: Use the standard form for the copyright notice. 7481 74822013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com> 7483 7484 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field. 7485 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens 7486 field in parser is not empty. If not-empty, call the function 7487 c_parser_finish_omp_declare_simd. 7488 (c_parser_cilk_clause_vectorlength): Modified function to be shared 7489 between SIMD-enabled functions and #pragma simd. Added new parameter. 7490 (c_parser_cilk_all_clauses): Modified the usage of the function 7491 c_parser_cilk_clause_vectorlength as mentioned above. 7492 (c_parser_cilk_simd_fn_vector_attrs): New function. 7493 (c_finish_cilk_simd_fn_tokens): Likewise. 7494 (is_cilkplus_vector_p): Likewise. 7495 (c_parser_omp_clause_name): Added checking for "vectorlength," 7496 "nomask," and "mask" strings in clause name. 7497 (c_parser_omp_all_clauses): Added 3 new case statements: 7498 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and 7499 PRAGMA_CILK_CLAUSE_NOMASK. 7500 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a 7501 check for vector attribute and if so call the function 7502 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled, 7503 called the function c_finish_cilk_simd_fn_tokens. 7504 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in 7505 parser field is non-empty. If so, parse them as you would parse 7506 the omp declare simd pragma. 7507 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn. 7508 Added a check when step is a parameter and flag it as error. 7509 (CILK_SIMD_FN_CLAUSE_MASK): New #define. 7510 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to 7511 pragma_omp_clause. 7512 75132013-12-17 Thomas Schwinge <thomas@codesourcery.com> 7514 7515 * c-parser.c (c_parser_omp_parallel): Fix description. 7516 75172013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com> 7518 7519 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove. 7520 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise. 7521 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise. 7522 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function. 7523 75242013-12-04 Joseph Myers <joseph@codesourcery.com> 7525 7526 PR c/52023 7527 * c-parser.c (c_parser_alignas_specifier): Use 7528 c_sizeof_or_alignof_type instead of c_alignof. 7529 (c_parser_alignof_expression): Likewise, with min_alignof 7530 parameter depending on alignof spelling used. 7531 75322013-12-04 Marek Polacek <polacek@redhat.com> 7533 7534 PR c/54113 7535 * c-decl.c (start_function): Don't warn for missing prototype for 7536 inline functions. 7537 75382013-12-03 Marek Polacek <polacek@redhat.com> 7539 7540 PR c/59351 7541 * c-decl.c (build_compound_literal): Allow compound literals with 7542 empty initial value. 7543 75442013-12-02 Joseph Myers <joseph@codesourcery.com> 7545 7546 PR c/58235 7547 * c-typeck.c (build_modify_expr): Diagnose assignment to 7548 expression with array type. 7549 75502013-11-29 Joseph Myers <joseph@codesourcery.com> 7551 7552 PR c/42262 7553 * c-typeck.c (process_init_element): Do not treat a string as 7554 initializing a whole array when used with a designator for an 7555 individual element. 7556 75572013-11-29 Joseph Myers <joseph@codesourcery.com> 7558 7559 PR c/57574 7560 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of 7561 an inline function following a static declaration. 7562 75632013-11-28 Jakub Jelinek <jakub@redhat.com> 7564 7565 PR c/59310 7566 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target" 7567 to p_name before calling c_parser_omp_teams instead of after. 7568 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser 7569 argument. Remove unused p_name variable. 7570 75712013-11-27 Aldy Hernandez <aldyh@redhat.com> 7572 Jakub Jelinek <jakub@redhat.com> 7573 7574 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if 7575 external_scope is NULL. 7576 75772013-11-27 Tom de Vries <tom@codesourcery.com> 7578 Marc Glisse <marc.glisse@inria.fr> 7579 7580 PR c++/59032 7581 * c-typeck.c (build_unary_op): Allow vector increment and decrement. 7582 75832013-11-22 Andrew MacLeod <amacleod@redhat.com> 7584 7585 * c-typeck.c: Add required include files from gimple.h. 7586 75872013-11-22 David Malcolm <dmalcolm@redhat.com> 7588 7589 * c-decl.c (define_label, shadow_tag_warned) 7590 (check_bitfield_type_and_width, grokdeclarator, grokparms, 7591 store_parm_decls_newstyle, store_parm_decls_oldstyle) 7592 (declspecs_add_type): Remove use of in_system_header macro. 7593 * c-parser.c (c_parser_unary_expression): Likewise. 7594 * c-typeck.c (store_init_value, process_init_element) 7595 (c_start_case): Likewise. 7596 7597 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE 7598 macro. 7599 7600 * c-parser.c (c_parser_set_source_position_from_token): Remove 7601 reference to in_system_header from comment. 7602 76032013-11-18 Richard Sandiford <rdsandiford@googlemail.com> 7604 7605 * c-decl.c (grokdeclarator): Update comment to refer to 7606 tree_to_[su]hwi rather than tree_low_cst. 7607 76082013-11-18 Richard Sandiford <rdsandiford@googlemail.com> 7609 7610 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with 7611 tree_to_uhwi throughout. 7612 76132013-11-18 Richard Sandiford <rdsandiford@googlemail.com> 7614 7615 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi 7616 throughout. 7617 76182013-11-18 Richard Sandiford <rdsandiford@googlemail.com> 7619 7620 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p 7621 throughout. 7622 76232013-11-15 Aldy Hernandez <aldyh@redhat.com> 7624 7625 * c-parser.c (c_parser_cilk_simd): New. 7626 (c_parser_cilk_verify_simd): New. 7627 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD. 7628 (c_parser_omp_for_loop): Add case for NE_EXPR. 7629 Set c_break_label for CILK_SIMD. 7630 (c_parser_cilk_clause_vectorlength): New. 7631 (c_parser_cilk_clause_linear): New. 7632 (c_parser_cilk_clause_name): New. 7633 (c_parser_cilk_all_clauses): New. 7634 * c-typeck.c (build_unary_op): Pass location argument to 7635 readonly_error. 7636 (build_modify_expr): Same. 7637 (build_asm_expr): Same. 7638 (c_finish_bc_stmt): Error on break/continue in loops. 7639 76402013-11-14 Andrew MacLeod <amacleod@redhat.com> 7641 7642 * c-typeck.c: Include only gimplify.h and gimple.h as needed. 7643 76442013-11-14 Diego Novillo <dnovillo@google.com> 7645 7646 * c-decl.c: Include print-tree.h. 7647 Include stor-layout.h. 7648 Include varasm.h. 7649 Include attribs.h. 7650 Include stringpool.h. 7651 * c-lang.c: Include fold-const.h. 7652 * c-parser.c: Include stringpool.h. 7653 Include attribs.h. 7654 Include stor-layout.h. 7655 Include varasm.h. 7656 Include trans-mem.h. 7657 * c-typeck.c: Include stor-layout.h. 7658 Include trans-mem.h. 7659 Include varasm.h. 7660 Include stmt.h. 7661 76622013-11-13 Joseph Myers <joseph@codesourcery.com> 7663 7664 * c-tree.h (c_typespec_keyword): Add cts_auto_type. 7665 * c-decl.c (declspecs_add_type, finish_declspecs): Handle 7666 __auto_type. 7667 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs) 7668 (c_parser_attribute_any_word, c_parser_objc_selector): Handle 7669 RID_AUTO_TYPE. 7670 (c_parser_declspecs): Take argument AUTO_TYPE_OK. 7671 (c_parser_declaration_or_fndef, c_parser_struct_declaration) 7672 (c_parser_declarator, c_parser_direct_declarator_inner) 7673 (c_parser_parameter_declaration, c_parser_type_name): All callers 7674 changed. 7675 (c_parser_declaration_or_fndef): Handle declarations with type 7676 determined from the initializer. 7677 76782013-11-12 Andrew MacLeod <amacleod@redhat.com> 7679 7680 * c-typeck.c: Include gimplify.h. 7681 76822013-11-12 Joseph Myers <joseph@codesourcery.com> 7683 7684 * c-tree.h (struct c_declspecs): Add thread_gnu_p field. 7685 * c-parser.c (c_parser_declspecs): Mention _Thread_local in 7686 comment. 7687 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread 7688 or _Thread_local as appropriate in diagnostics. 7689 (build_null_declspecs): Initialize ret->thread_gnu_p. 7690 (declspecs_add_scspec): Handle either __thread or _Thread_local 7691 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if 7692 pedantic. Do not disallow _Thread_local extern and _Thread_local 7693 static. 7694 76952013-11-07 Joseph Myers <joseph@codesourcery.com> 7696 Andrew MacLeod <amacleod@redhat.com> 7697 7698 * c-aux-info.c (gen_type): Handle atomic qualifier. 7699 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic 7700 qualifiers when compating types. 7701 (shadow_tag_warned): Handle atomic_p in declspecs. 7702 (quals_from_declspecs): Likewise. 7703 (start_decl): Use c_type_promotes_to when promoting argument 7704 types. 7705 (grokdeclarator): Handle _Atomic. 7706 (get_parm_info): Diagnose any qualifier on "void" as only 7707 parameter. 7708 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when 7709 comparing types. Use c_type_promotes_to when promoting argument 7710 types. 7711 (finish_function): Use c_type_promotes_to when promoting argument 7712 types. 7713 (build_null_declspecs): Handle atomic_p in declspecs. 7714 (declspecs_add_qual): Handle RID_ATOMIC. 7715 * c-parser.c (c_token_starts_typename, c_token_is_qualifier) 7716 (c_token_starts_declspecs): Handle RID_ATOMIC. 7717 (c_parser_declspecs): Handle atomic type specifiers and 7718 qualifiers. 7719 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers 7720 from types of expressions with atomic type. 7721 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue. 7722 (c_parser_attribute_any_word): Handle RID_ATOMIC. 7723 (c_parser_initializer, c_parser_initelt, c_parser_initval) 7724 (c_parser_statement_after_labels, c_parser_switch_statement) 7725 (c_parser_for_statement, c_parser_expr_no_commas) 7726 (c_parser_conditional_expression, c_parser_binary_expression) 7727 (c_parser_cast_expression, c_parser_unary_expression) 7728 (c_parser_postfix_expression) 7729 (c_parser_postfix_expression_after_primary, c_parser_expression): 7730 Use convert_lvalue_to_rvalue. 7731 (c_parser_expression_conv, c_parser_expr_list): Document 7732 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue. 7733 (c_parser_objc_synchronized_statement): Use 7734 convert_lvalue_to_rvalue. 7735 (c_parser_objc_selector): Handle RID_ATOMIC. 7736 (c_parser_objc_receiver, c_parser_array_notation): Use 7737 convert_lvalue_to_rvalue. 7738 * c-tree.h (ctsk_typeof): Adjust comment to mention use for 7739 _Atomic (type-name). 7740 (struct c_declspecs): Add atomic_p field. 7741 (convert_lvalue_to_rvalue): Declare. 7742 * c-typeck.c (c_type_promotes_to): Promote atomic types to 7743 corresponding atomic types. 7744 (qualify_type): Don't add _Atomic qualifiers from second argument. 7745 (comp_target_types): Do not allow _Atomic mismatches. 7746 (type_lists_compatible_p): Do not remove atomic qualifiers when 7747 comparing types. 7748 (really_atomic_lvalue, convert_lvalue_to_rvalue) 7749 (build_atomic_assign): New functions. 7750 (build_unary_op): Use build_atomic_assign for atomic increment and 7751 decrement. 7752 (build_conditional_expr): Do not treat _Atomic void as a qualified 7753 version of void. 7754 (build_modify_expr): Use build_atomic_assign for atomic LHS. 7755 (find_anonymous_field_with_type, convert_to_anonymous_field) 7756 (convert_for_assignment): Do not remove atomic qualifiers when 7757 comparing types. 7758 (digest_init): Do not accept initialization of arrays of atomic 7759 elements by string constants. 7760 (build_asm_expr): Use convert_lvalue_to_rvalue. 7761 (build_binary_op): Do not treat _Atomic void as a qualified 7762 version of void. 7763 77642013-11-06 DJ Delorie <dj@redhat.com> 7765 7766 * c-decl.c (locate_old_decl): If a previous conflicting decl is 7767 both explicit and builtin, print the location of the explicit one. 7768 77692013-11-05 Tobias Burnus <burnus@net-b.de> 7770 7771 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel, 7772 c_parser_omp_distribute, c_parser_omp_teams, 7773 c_parser_omp_target, c_parser_omp_declare): Handle 7774 -fopenmp-simd. 7775 77762013-11-03 Marek Polacek <polacek@redhat.com> 7777 7778 * c-decl.c (grokdeclarator): Add VLA instrumentation. 7779 77802013-11-01 Jakub Jelinek <jakub@redhat.com> 7781 7782 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to 7783 check_dup_generic at the end, unless remove is true. 7784 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after 7785 remove = true;. 7786 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise. 7787 77882013-10-31 Jakub Jelinek <jakub@redhat.com> 7789 7790 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause 7791 with decl that is not pointer nor array. 7792 77932013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com> 7794 7795 * c-decl.c (finish_function): Added a call for insert_cilk_frame when 7796 a spawning function is found. 7797 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define. 7798 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise. 7799 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise. 7800 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC 7801 case. 7802 (c_parser_postfix_expression): Added RID_CILK_SPAWN case. 7803 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma 7804 expr. 7805 (c_finish_return): Added a check to reject _Cilk_spawn in return 7806 expression. 7807 (build_cilk_spawn): New function. 7808 (build_cilk_sync): Likewise. 7809 * Makefile.in (c-decl.o): Added cilk.h in dependency list. 7810 78112013-10-27 Tobias Burnus <burnus@net-b.de> 7812 7813 PR other/33426 7814 * c-parser.c (c_parser_while_statement, c_parser_while_statement, 7815 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'. 7816 (c_parser_statement_after_labels): Update calls. 7817 78182013-10-24 Tobias Burnus <burnus@net-b.de> 7819 7820 PR other/33426 7821 * c-parser.c (c_parser_pragma, c_parser_for_statement): 7822 Handle PRAGMA_IVDEP. 7823 (c_parser_statement_after_labels): Update call. 7824 78252013-10-24 Marek Polacek <polacek@redhat.com> 7826 7827 * c-parser.c (c_parser_struct_declaration): Add a comment. 7828 (c_parser_declarator): Don't allow _Alignas here. 7829 78302013-10-17 Andrew MacLeod <amacleod@redhat.com> 7831 7832 * c-parser.c: Include omp-low.h. 7833 * c-typeck.c: Likewise. 7834 78352013-10-17 Marek Polacek <polacek@redhat.com> 7836 7837 PR c/58267 7838 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter. 7839 Document syntax of the array-declarator. 7840 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs 7841 are not permitted. 7842 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call. 7843 (c_parser_struct_declaration): Likewise. 7844 (c_parser_declarator): Likewise. 7845 (c_parser_direct_declarator_inner): Likewise. 7846 (c_parser_parameter_declaration): Likewise. 7847 (c_parser_type_name): Likewise. 7848 78492013-10-11 Jakub Jelinek <jakub@redhat.com> 7850 7851 * c-lang.h (current_omp_declare_target_attribute): New extern 7852 decl. 7853 * c-parser.c: Include c-lang.h. 7854 (struct c_parser): Change tokens to c_token *. 7855 Add tokens_buf field. Change tokens_avail type to unsigned int. 7856 (c_parser_consume_token): If parser->tokens isn't 7857 &parser->tokens_buf[0], increment parser->tokens. 7858 (c_parser_consume_pragma): Likewise. 7859 (enum pragma_context): Add pragma_struct and pragma_param. 7860 (c_parser_external_declaration): Adjust 7861 c_parser_declaration_or_fndef caller. 7862 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses 7863 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd. 7864 Adjust recursive call. 7865 (c_parser_struct_or_union_specifier): Use pragma_struct instead 7866 of pragma_external. 7867 (c_parser_parameter_declaration): Use pragma_param instead of 7868 pragma_external. 7869 (c_parser_compound_statement_nostart, c_parser_label, 7870 c_parser_for_statement): Adjust 7871 c_parser_declaration_or_fndef callers. 7872 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass 7873 it through to c_parser_conditional_expression. 7874 (c_parser_conditional_expression): Add omp_atomic_lhs argument, 7875 pass it through to c_parser_binary_expression. Adjust recursive 7876 call. 7877 (c_parser_binary_expression): Remove prec argument, add 7878 omp_atomic_lhs argument instead. Always start from PREC_NONE, if 7879 omp_atomic_lhs is non-NULL and one of the arguments of toplevel 7880 binop matches it, use build2 instead of parser_build_binary_op. 7881 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL, 7882 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET, 7883 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION. 7884 Handle pragma_struct and pragma_param the same as pragma_external. 7885 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names. 7886 (c_parser_omp_variable_list): Parse array sections for 7887 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses. 7888 (c_parser_omp_clause_collapse): Fully fold collapse expression. 7889 (c_parser_omp_clause_reduction): Handle user defined reductions. 7890 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind, 7891 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit, 7892 c_parser_omp_clause_aligned, c_parser_omp_clause_linear, 7893 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen, 7894 c_parser_omp_clause_depend, c_parser_omp_clause_map, 7895 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule, 7896 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to, 7897 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions. 7898 (c_parser_omp_all_clauses): Add finish_p argument. Don't call 7899 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses. 7900 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is 7901 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms. 7902 (c_parser_omp_for_loop): Add CODE argument, pass it through 7903 to c_finish_omp_for. Change last argument to cclauses, 7904 and adjust uses to grab parallel clauses from the array of all 7905 the split clauses. Adjust c_parser_binary_expression, 7906 c_parser_declaration_or_fndef and c_finish_omp_for callers. 7907 (omp_split_clauses): New function. 7908 (c_parser_omp_simd): New function. 7909 (c_parser_omp_for): Add p_name, mask and cclauses arguments. 7910 Allow the function to be called also when parsing combined constructs, 7911 and call c_parser_omp_simd when parsing for simd. 7912 (c_parser_omp_sections_scope): If section-sequence doesn't start with 7913 #pragma omp section, require exactly one structured-block instead of 7914 sequence of statements. 7915 (c_parser_omp_sections): Add p_name, mask and cclauses arguments. 7916 Allow the function to be called also when parsing combined constructs. 7917 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments. 7918 Allow the function to be called also when parsing combined 7919 constructs. 7920 (c_parser_omp_taskgroup, c_parser_omp_cancel, 7921 c_parser_omp_cancellation_point, c_parser_omp_distribute, 7922 c_parser_omp_teams, c_parser_omp_target_data, 7923 c_parser_omp_target_update, c_parser_omp_target, 7924 c_parser_omp_declare_simd, c_finish_omp_declare_simd, 7925 c_parser_omp_declare_target, c_parser_omp_end_declare_target, 7926 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions. 7927 (c_parser_omp_construct): Add p_name and mask vars. Handle 7928 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP, 7929 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel 7930 and c_parser_omp_sections callers. 7931 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here. 7932 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK, 7933 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. 7934 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND. 7935 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add 7936 OMP_CLAUSE_DEPEND. 7937 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK, 7938 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK, 7939 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK, 7940 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK, 7941 OMP_DECLARE_SIMD_CLAUSE_MASK): Define. 7942 * c-typeck.c: Include tree-inline.h. 7943 (c_finish_omp_cancel, c_finish_omp_cancellation_point, 7944 handle_omp_array_sections_1, handle_omp_array_sections, 7945 c_clone_omp_udr, c_find_omp_placeholder_r): New functions. 7946 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and 7947 user defined reductions. 7948 (c_tree_equal): New function. 7949 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls, 7950 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal, 7951 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup, 7952 c_check_omp_declare_reduction_r): New prototypes. 7953 * c-decl.c (current_omp_declare_target_attribute): New variable. 7954 (c_decl_attributes): New function. 7955 (start_decl, start_function): Use it instead of decl_attributes. 7956 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id, 7957 c_omp_reduction_decl, c_omp_reduction_lookup, 7958 c_check_omp_declare_reduction_r): New functions. 7959 79602013-09-25 Tom Tromey <tromey@redhat.com> 7961 7962 * Make-lang.in (c/gccspec.o): Remove. 7963 (CFLAGS-c/gccspec.o): New variable. 7964 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o) 7965 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o) 7966 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove. 7967 79682013-09-25 Tom Tromey <tromey@redhat.com> 7969 7970 * Make-lang.in (c/gccspec.o): Don't use subshell. 7971 79722013-09-18 Marek Polacek <polacek@redhat.com> 7973 7974 PR sanitize/58443 7975 * c-typeck.c (build_binary_op): Properly honor -fsanitize options. 7976 Remove unnecessary check. 7977 79782013-09-18 Marek Polacek <polacek@redhat.com> 7979 7980 PR sanitizer/58411 7981 * c-typeck.c (build_binary_op): Don't sanitize function if it has the 7982 no_sanitize_undefined attribute. 7983 79842013-09-13 Kai Tietz <ktietz@redhat.com> 7985 7986 PR target/57848 7987 * c-decl.c (c_builtin_function_ext_scope): Remove 7988 wrong assumption that it is never called on prexisting 7989 symbol. 7990 79912013-09-08 Joern Rennecke <joern.rennecke@embecosm.com> 7992 7993 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p. 7994 79952013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net> 7996 7997 * c-objc-common.c (c_tree_printer): Tidy. 7998 79992013-08-30 Marek Polacek <polacek@redhat.com> 8000 8001 * c-typeck.c (build_binary_op): Add division by zero and shift 8002 instrumentation. 8003 80042013-08-26 Joern Rennecke <joern.rennecke@embecosm.com> 8005 Joseph Myers <joseph@codesourcery.com> 8006 8007 PR c/35649 8008 * c-typeck.c (c_common_type): Prefer double_type_node over 8009 other REAL_TYPE types with the same precision. 8010 (convert_arguments): Likewise. 8011 80122013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net> 8013 8014 * c-objc-common.c (c_tree_printer): Document the nature of the cast. 8015 (c_initialize_diagnostics): Call a destructor for the early printer. 8016 80172013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net> 8018 8019 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty 8020 printer initialization. 8021 80222013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com> 8023 8024 PR c/57490 8025 * c-array-notation.c (fix_conditional_array_notations_1): Added a 8026 check for truth values. 8027 (expand_array_notation_exprs): Added truth values case. Removed an 8028 unwanted else. Added for-loop to walk through subtrees in default 8029 case. 8030 80312013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net> 8032 8033 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base. 8034 80352013-07-23 Joseph Myers <joseph@codesourcery.com> 8036 8037 * c-parser.c (struct c_generic_association): Fix typo. 8038 80392013-07-23 Tom Tromey <tromey@redhat.com> 8040 Joseph Myers <joseph@codesourcery.com> 8041 8042 * c-parser.c (struct c_generic_association): New. 8043 (c_generic_association_d): New typedef. 8044 (c_parser_generic_selection): New function. 8045 (c_parser_postfix_expression): Handle RID_GENERIC. 8046 80472013-07-13 Jason Merrill <jason@redhat.com> 8048 8049 PR c++/57793 8050 * c-decl.c (finish_struct): Check for too-large class. 8051 80522013-07-04 Joern Rennecke <joern.rennecke@embecosm.com> 8053 8054 PR c/57821 8055 * c-typeck.c (set_init_index): When folding, check for index overflow. 8056 80572013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com> 8058 8059 * c-parser.c (c_parser_array_notation): Removed rejection of array 8060 notations in an array of function pointers. 8061 80622013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com> 8063 8064 * c-array-notation.c (make_triplet_val_inv): New function. 8065 (create_cmp_incr): Likewise. 8066 (create_array_refs): Likewise. 8067 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec. 8068 Also modularized common parts between functions and called the function. 8069 (build_array_notation_expr): Likewise. 8070 (fix_conditional_array_notations_1): Likewise. 8071 (fix_array_notation_expr): Likewise. 8072 (fix_array_notation_call_expr): Likewise. 8073 80742013-06-18 Marek Polacek <polacek@redhat.com> 8075 8076 PR c/57630 8077 * c-decl.c (check_for_loop_decls): Improve diagnostics messages. 8078 80792013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com> 8080 8081 * c-array-notation.c (build_array_notation_expr): Reject array notation 8082 mismatch between LHS and RHS even inside a call_expr. Also, removed 8083 a couple while statements that were dead code. 8084 80852013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com> 8086 8087 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded 8088 excessive precision expressions in function parameters. Also removed 8089 couple unwanted while statements. 8090 80912013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com> 8092 8093 * c-array-notation.c (expand_array_notation_exprs): Added 8094 ARRAY_NOTATION_REF case. 8095 80962013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com> 8097 8098 * c-array-notation.c (length_mismatch_in_expr_p): Moved this 8099 function to c-family/array-notation-common.c. 8100 (is_cilkplus_reduce_builtin): Likewise. 8101 (find_rank): Likewise. 8102 (extract_array_notation_exprs): Likewise. 8103 (replace_array_notations): Likewise. 8104 (find_inv_trees): Likewise. 8105 (replace_inv_trees): Likewise. 8106 (contains_array_notation_expr): Likewise. 8107 (find_correct_array_notation_type): Likewise. 8108 (replace_invariant_exprs): Initialized additional_tcodes to NULL. 8109 (struct inv_list): Moved this to c-family/array-notation-common.c. 8110 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype. 8111 81122013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com> 8113 8114 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus 8115 reduction functions outside the for-loop. Added a check if the fundecl 8116 is non-NULL. Finally, removed an unwanted if-statement, and made the 8117 body unconditional. 8118 81192013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com> 8120 8121 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the 8122 condition of the if-statement matches the rank of else-block and then- 8123 block when array notations are used. 8124 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation 8125 expression after the entire function body is parsed. 8126 (c_parser_expr_no_commas): Delayed creating array notation expressions 8127 to the end of function parsing. 8128 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the 8129 whole if-statement instead of just the condition. 8130 (expand_array_notation_exprs): Added MODIFY_EXPR case. 8131 81322013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com> 8133 8134 PR c/57474 8135 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length 8136 array to NULL_TREE if they are unused. Also added a check for the 8137 field to be NULL before its fields are used in future. 8138 81392013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 8140 8141 PR bootstrap/57450 8142 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi. 8143 (build_array_notation_expr): Likewise. 8144 81452013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com> 8146 8147 * c-typeck.c (build_array_ref): Added a check to see if array's 8148 index is greater than one. If true, then emit an error. 8149 (build_function_call_vec): Exclude error reporting and checking 8150 for builtin array-notation functions. 8151 (convert_arguments): Likewise. 8152 (c_finish_return): Added a check for array notations as a return 8153 expression. If true, then emit an error. 8154 (c_finish_loop): Added a check for array notations in a loop 8155 condition. If true then emit an error. 8156 (lvalue_p): Added a ARRAY_NOTATION_REF case. 8157 (build_binary_op): Added a check for array notation expr inside 8158 op1 and op0. If present, we call another function to find correct 8159 type. 8160 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o. 8161 * c-parser.c (c_parser_compound_statement): Check if array 8162 notation code is used in tree, if so, then transform them into 8163 appropriate C code. 8164 (c_parser_expr_no_commas): Check if array notation is used in LHS 8165 or RHS, if so, then build array notation expression instead of 8166 regular modify. 8167 (c_parser_postfix_expression_after_primary): Added a check for 8168 colon(s) after square braces, if so then handle it like an array 8169 notation. Also, break up array notations in unary op if found. 8170 (c_parser_direct_declarator_inner): Added a check for array 8171 notation. 8172 (c_parser_compound_statement): Added a check for array notation in 8173 a stmt. If one is present, then expand array notation expr. 8174 (c_parser_if_statement): Likewise. 8175 (c_parser_switch_statement): Added a check for array notations in 8176 a switch statement's condition. If true, then output an error. 8177 (c_parser_while_statement): Similarly, but for a while. 8178 (c_parser_do_statement): Similarly, but for a do-while. 8179 (c_parser_for_statement): Similarly, but for a for-loop. 8180 (c_parser_unary_expression): Check if array notation is used in a 8181 pre-increment or pre-decrement expression. If true, then expand 8182 them. 8183 (c_parser_array_notation): New function. 8184 * c-array-notation.c: New file. 8185 * c-tree.h (is_cilkplus_reduce_builtin): Protoize. 8186 81872013-05-23 Mike Stump <mikestump@comcast.net> 8188 8189 * c-typeck.c (convert_for_assignment): Handle references to memory 8190 spaces better. 8191 81922013-05-16 Jason Merrill <jason@redhat.com> 8193 8194 * Make-lang.in (cc1$(exeext)): Use link mutex. 8195 81962013-04-24 Paolo Carlini <paolo.carlini@oracle.com> 8197 8198 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns 8199 to simply use OPT_Wpointer_arith. 8200 (build_unary_op): Likewise. 8201 82022013-04-03 Jakub Jelinek <jakub@redhat.com> 8203 8204 PR c/19449 8205 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p 8206 argument. If set, or it temporarily for parsing of the first 8207 argument into force_folding_builtin_constant_p. 8208 (c_parser_postfix_expression): Adjust callers. 8209 82102013-03-21 Richard Biener <rguenther@suse.de> 8211 8212 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P 8213 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly. 8214 82152013-02-12 Marek Polacek <polacek@redhat.com> 8216 8217 PR c/44938 8218 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize 8219 origtypes to NULL. 8220 82212013-01-24 Jakub Jelinek <jakub@redhat.com> 8222 8223 PR c/56078 8224 * c-typeck.c (set_nonincremental_init_from_string): If 8225 constructor_max_index is NULL, treat it as if tree_int_cst_lt 8226 returned false. 8227 (process_init_element): Likewise. 8228 82292012-12-20 Jakub Jelinek <jakub@redhat.com> 8230 8231 PR c++/55619 8232 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P 8233 argument, don't call default_function_array_conversion 8234 nor c_fully_fold here. 8235 (c_parser_asm_statement): Adjust callers. 8236 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs 8237 and outputs here, and call default_function_array_conversion 8238 on inputs that don't need to be addressable. 8239 82402012-12-18 Jakub Jelinek <jakub@redhat.com> 8241 8242 PR c/39464 8243 * c-typeck.c (convert_for_assignment): For -Wpointer-sign 8244 warning require that both c_common_unsigned_type as well as 8245 c_common_signed_type is the same for both mvl and mvr types. 8246 82472012-11-16 Diego Novillo <dnovillo@google.com> 8248 8249 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec) 8250 8251 * c-common.c: Use new vec API in vec.h. 8252 * c-common.h: Likewise. 8253 * c-gimplify.c: Likewise. 8254 * c-pragma.c: Likewise. 8255 * c-pretty-print.c: Likewise. 8256 * c-pretty-print.h: Likewise. 8257 * c-semantics.c: Likewise. 8258 * c-decl.c: Likewise. 8259 * c-parser.c: Likewise. 8260 * c-tree.h: Likewise. 8261 * c-typeck.c: Likewise. 8262 82632012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com> 8264 8265 PR c++/54930 8266 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr. 8267 82682012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org> 8269 8270 PR c/53066 8271 * c-decl.c (warn_if_shadowing): Do not warn if a variable 8272 shadows a function, unless the variable is a function or a 8273 pointer-to-function. 8274 82752012-10-12 Jakub Jelinek <jakub@redhat.com> 8276 8277 PR c/54381 8278 * c-parser.c (struct c_tree_loc_pair): Removed. 8279 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument, 8280 add location_t * and tree * arguments, fill in array of 3 8281 sizeof_arg trees and corresponding locs. 8282 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust 8283 c_parser_expr_list callers. 8284 (c_parser_postfix_expression_after_primary): Likewise. Pass 8285 array of 3 sizeof_arg trees and locs (corresponding to first 8286 3 arguments) to sizeof_pointer_memaccess_warning. 8287 82882012-10-09 Lawrence Crowl <crowl@google.com> 8289 8290 * Make-lang.in (c-decl.o): Add dependence on hash-table.h. 8291 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe 8292 hash table. 8293 82942012-10-09 Paolo Carlini <paolo.carlini@oracle.com> 8295 8296 PR c++/54194 8297 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses 8298 call. 8299 83002012-10-09 Marc Glisse <marc.glisse@inria.fr> 8301 8302 PR c++/54427 8303 * c-typeck.c: Include c-common.h. 8304 (enum stv_conv): Moved to c-common.h. 8305 (scalar_to_vector): Moved to c-common.c. 8306 (build_binary_op): Adapt to scalar_to_vector's new prototype. 8307 * Make-lang.in: c-typeck.c depends on c-common.h. 8308 83092012-10-04 Arnaud Charlet <charlet@adacore.com> 8310 8311 * c-decl.c (c_write_global_declarations): Fix handling of 8312 -fdump-ada-spec*. 8313 83142012-09-30 Sharad Singhai <singhai@google.com> 8315 8316 * c-decl.c (c_write_global_declarations): Use a different method 8317 to determine if the dump has ben initialized. 8318 83192012-09-14 Joseph Myers <joseph@codesourcery.com> 8320 8321 PR c/54552 8322 * c-typeck.c (c_cast_expr): When casting to a type requiring 8323 C_MAYBE_CONST_EXPR to be created, pass the inner expression to 8324 c_fully_fold first. 8325 83262012-09-14 Joseph Myers <joseph@codesourcery.com> 8327 8328 PR c/54103 8329 * c-typeck.c (build_unary_op): Pass original argument of 8330 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove 8331 any C_MAYBE_CONST_EXPR, if it has integer operands. 8332 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR, 8333 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR 8334 to c_objc_common_truthvalue_conversion, then remove any 8335 C_MAYBE_CONST_EXPR, if they have integer operands. Use 8336 c_objc_common_truthvalue_conversion not 8337 c_common_truthvalue_conversion. 8338 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and 8339 call note_integer_operands for arguments with integer operands 8340 that are not integer constants. 8341 83422012-09-13 Jakub Jelinek <jakub@redhat.com> 8343 8344 PR c/54559 8345 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or 8346 COMPLEX_TYPE with in_late_binary_op set temporarily to true. 8347 83482012-08-31 Jakub Jelinek <jakub@redhat.com> 8349 8350 PR c/54428 8351 * c-convert.c (convert): Don't call fold_convert_loc if 8352 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e 8353 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from 8354 COMPLEX_TYPE -> COMPLEX_TYPE conversion. 8355 83562012-08-24 Jakub Jelinek <jakub@redhat.com> 8357 8358 PR c/54355 8359 * c-decl.c (c_parser_label): Pass true as nested and fix up comments 8360 for nested and empty_ok arguments in the call to 8361 c_parser_declaration_or_fndef. 8362 83632012-08-17 Jakub Jelinek <jakub@redhat.com> 8364 8365 * c-tree.h (c_last_sizeof_arg): Declare. 8366 * c-parser.c (struct c_tree_loc_pair): New type. 8367 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if 8368 non-NULL. 8369 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers. 8370 (c_parser_postfix_expression_after_primary): Likewise. Call 8371 sizeof_pointer_memaccess_warning if needed. 8372 (sizeof_ptr_memacc_comptypes): New function. 8373 * c-typeck.c (c_last_sizeof_arg): New global variable. 8374 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it. 8375 83762012-07-24 Uros Bizjak <ubizjak@gmail.com> 8377 8378 * c-lang.h (lang_decl): Add variable_size GTY option. 8379 83802012-07-16 Steven Bosscher <steven@gcc.gnu.org> 8381 8382 * c-decl.c: Include dumpfile.h instead of tree-dump.h. 8383 * Make-lang.in: Fix dependencies. 8384 83852012-06-29 Steven Bosscher <steven@gcc.gnu.org> 8386 8387 * Make-lang.in: New file, rules migrated from gcc/Makefile.in 8388 and add language Makefile hooks. 8389 * config-lang.in: New file. 8390 * c-config-lang.in: Moved from gcc/config-lang.in to here, and 8391 add the required "normal" config-lang.in rules. 8392 * c-lang.h: Moved from gcc/ to here. 8393 * c-tree.h: Likewise. 8394 * c-objc-common.c: Likewise. 8395 * c-objc-common.h: Likewise. 8396 * c-typeck.c: Likewise. 8397 * c-convert.c: Likewise. 8398 * c-lang.c: Likewise. 8399 * c-aux-info.c: Likewise. 8400 * c-errors.c: Likewise. 8401 * gccspec.c: Likewise. 8402 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h. 8403 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h. 8404 8405Copyright (C) 2012-2022 Free Software Foundation, Inc. 8406 8407Copying and distribution of this file, with or without modification, 8408are permitted in any medium without royalty provided the copyright 8409notice and this notice are preserved. 8410