12021-05-14 Release Manager 2 3 * GCC 8.5.0 released. 4 52021-04-22 Jakub Jelinek <jakub@redhat.com> 6 7 Backported from master: 8 2021-04-20 Jakub Jelinek <jakub@redhat.com> 9 10 PR c/99990 11 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of 12 error_mark_node. 13 142021-04-22 Jakub Jelinek <jakub@redhat.com> 15 16 Backported from master: 17 2021-03-30 Jakub Jelinek <jakub@redhat.com> 18 19 PR c/99588 20 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign 21 with modifycode NOP_EXPR produces and mark the _Atomic var as read 22 if found. 23 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs 24 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs. 25 Set TREE_SIDE_EFFECTS on the TARGET_EXPR. 26 272021-04-22 Jakub Jelinek <jakub@redhat.com> 28 29 Backported from master: 30 2021-03-19 Jakub Jelinek <jakub@redhat.com> 31 32 PR c/99136 33 * c-typeck.c (c_finish_return): Don't wrap retval into 34 EXCESS_PRECISION_EXPR in functions that return void. 35 362021-04-22 Jakub Jelinek <jakub@redhat.com> 37 38 Backported from master: 39 2020-11-25 Jakub Jelinek <jakub@redhat.com> 40 41 PR c/97958 42 * c-parser.c (c_parser_binary_expression): For omp atomic binary 43 expressions, use make_node instead of build2 to avoid checking build2 44 performs. 45 462020-09-17 Jakub Jelinek <jakub@redhat.com> 47 48 Backported from master: 49 2020-08-18 Jakub Jelinek <jakub@redhat.com> 50 51 PR c/96571 52 * c-parser.c (c_parser_generic_selection): Change match_found from bool 53 to int, holding index of the match. Call mark_exp_read on the selector 54 expression and on expressions other than the selected one. 55 562020-09-17 Jakub Jelinek <jakub@redhat.com> 57 58 Backported from master: 59 2020-05-07 Jakub Jelinek <jakub@redhat.com> 60 61 PR c/94842 62 * c-decl.c (set_labels_context_r): In addition to context-less 63 LABEL_DECLs adjust also LABEL_DECLs with context equal to 64 parent function if any. 65 (store_parm_decls): Adjust comment. 66 672020-09-17 Jakub Jelinek <jakub@redhat.com> 68 69 Backported from master: 70 2020-04-07 Jakub Jelinek <jakub@redhat.com> 71 72 PR c/94172 73 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1 74 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE. 75 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs. 76 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to 77 ENUMERAL_TYPEs. 78 (finish_incomplete_vars): New function, moved from finish_struct. Use 79 relayout_decl instead of layout_decl. 80 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS 81 being TYPE_VFIELD. Use finish_incomplete_vars. 82 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call 83 finish_incomplete_vars. 84 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS 85 also on ENUMERAL_TYPEs. 86 872020-03-04 Release Manager 88 89 * GCC 8.4.0 released. 90 912020-02-14 Jakub Jelinek <jakub@redhat.com> 92 93 Backported from mainline 94 2020-02-13 Jakub Jelinek <jakub@redhat.com> 95 96 PR c/93576 97 * c-decl.c (grokdeclarator): If this_size_varies, only push size into 98 *expr if it has side effects. 99 1002020-01-22 Joseph Myers <joseph@codesourcery.com> 101 102 Backport from mainline: 103 2020-01-22 Joseph Myers <joseph@codesourcery.com> 104 105 PR c/93348 106 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on 107 argument with integer operands. 108 1092020-01-15 Joseph Myers <joseph@codesourcery.com> 110 111 Backport from mainline: 112 2020-01-15 Joseph Myers <joseph@codesourcery.com> 113 114 PR c/93072 115 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to 116 determine whether to set DECL_CONTEXT. 117 1182020-01-14 Joseph Myers <joseph@codesourcery.com> 119 120 Backport from mainline: 121 2020-01-13 Joseph Myers <joseph@codesourcery.com> 122 123 PR c/93241 124 * c-typeck.c (build_c_cast): Check for expressions with integer 125 operands that can occur in an unevaluated part of an integer 126 constant expression and call note_integer_operands as needed. 127 1282019-11-21 Jakub Jelinek <jakub@redhat.com> 129 130 Backported from mainline 131 2019-08-09 Jakub Jelinek <jakub@redhat.com> 132 133 PR c/91401 134 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the 135 check_no_duplicate_clause call. Comment it out, instead emit a 136 warning for duplicate dist_schedule clauses. 137 1382019-09-03 Iain Sandoe <iain@sandoe.co.uk> 139 140 Backport from mainline. 141 2019-08-23 Iain Sandoe <iain@sandoe.co.uk> 142 143 PR pch/61250 144 * c-parser.c (c_parse_file): Call c_common_no_more_pch () 145 after determining that the first token is not 146 PRAGMA_GCC_PCH_PREPROCESS. 147 1482019-08-29 Jakub Jelinek <jakub@redhat.com> 149 150 Backported from mainline 151 2019-04-26 Jakub Jelinek <jakub@redhat.com> 152 153 PR debug/90197 154 * c-tree.h (c_finish_loop): Add 2 further location_t arguments. 155 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller. 156 (c_parser_do_statement): Likewise. 157 (c_parser_for_statement): Likewise. Formatting fixes. 158 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments, 159 emit DEBUG_BEGIN_STMTs if needed. 160 1612019-07-21 Richard Sandiford <richard.sandiford@arm.com> 162 163 Backport from mainline 164 2019-07-18 Richard Sandiford <richard.sandiford@arm.com> 165 166 PR c/53633 167 * c-decl.c (finish_function): Check targetm.warn_func_return 168 before issuing a -Wreturn-type warning. 169 1702019-04-30 Jakub Jelinek <jakub@redhat.com> 171 172 Backported from mainline 173 2019-04-19 Jakub Jelinek <jakub@redhat.com> 174 175 PR c++/90108 176 * c-decl.c (merge_decls): If remove is main variant and 177 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE 178 variant that has newdecl as TYPE_NAME if any. 179 180 2019-04-12 Jakub Jelinek <jakub@redhat.com> 181 182 PR c/89933 183 * c-decl.c (merge_decls): When newdecl's type is its main variant, 184 don't try to remove it from the variant list, but instead assert 185 it has no variants. 186 187 2019-03-19 Jakub Jelinek <jakub@redhat.com> 188 189 PR c/89734 190 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function 191 return type even if quals_used is 0. Formatting fixes. 192 1932019-02-22 Release Manager 194 195 * GCC 8.3.0 released. 196 1972019-02-07 Jakub Jelinek <jakub@redhat.com> 198 199 Backported from mainline 200 2019-02-06 Jakub Jelinek <jakub@redhat.com> 201 202 PR c/89211 203 * c-parser.c (c_parser_declaration_or_fndef): Don't update 204 DECL_ARGUMENTS of d if it has been defined already. Use a single if 205 instead of 3 nested ifs. 206 2072019-01-15 Joseph Myers <joseph@codesourcery.com> 208 209 Backport from mainline 210 2019-01-07 Joseph Myers <joseph@codesourcery.com> 211 212 PR c/88720 213 PR c/88726 214 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine 215 whether a function is nested, not DECL_EXTERNAL. Diagnose inline 216 functions declared but never defined only for external scope, not 217 for other scopes. 218 2192019-01-08 Jakub Jelinek <jakub@redhat.com> 220 221 Backported from mainline 222 2018-12-11 Jakub Jelinek <jakub@redhat.com> 223 224 PR sanitizer/88426 225 * c-convert.c (convert): Call c_fully_fold before calling 226 ubsan_instrument_float_cast. 227 2282018-01-02 Segher Boessenkool <segher@kernel.crashing.org> 229 230 Backport from trunk 231 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org> 232 233 PR inline-asm/55681 234 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any 235 combination of volatile and goto, in any order, without repetitions. 236 237 Backport from trunk 238 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org> 239 240 * c-parser.c (c_parser_asm_statement): Detect the inline keyword 241 after asm. Pass a flag for it to build_asm_expr. 242 * c-tree.h (build_asm_expr): Update declaration. 243 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to 244 set ASM_INLINE_P. 245 246 Backport from trunk 247 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org> 248 249 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line 250 setting "quals". 251 252 Backport from trunk 253 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org> 254 255 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without 256 "done" boolean variable. 257 258 Backport from trunk 259 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org> 260 261 * c-parser.c (c_parser_asm_statement): Keep track of the location each 262 asm qualifier is first seen; use that to give nicer "duplicate asm 263 qualifier" messages. Delete 'quals" variable, instead pass the 264 "is_volatile_ flag to build_asm_stmt directly. 265 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree. 266 * c-typeck.c (build_asm_stmt): Ditto; adjust. 267 268 Backport from trunk 269 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org> 270 271 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give 272 a more specific error message (instead of just falling through). 273 274 And extra for the backport 275 2019-01-02 Segher Boessenkool <segher@kernel.crashing.org> 276 277 * c-parser.c (c_parser_asm_statement): Output a warning instead of an 278 error for const and restrict. 279 2802018-08-01 Jakub Jelinek <jakub@redhat.com> 281 282 PR c/85704 283 * c-typeck.c (init_field_decl_cmp): New function. 284 (output_pending_init_elements): Use it for field comparisons 285 instead of pure bit_position comparisons. 286 2872018-07-26 Release Manager 288 289 * GCC 8.2.0 released. 290 2912018-07-12 Jakub Jelinek <jakub@redhat.com> 292 293 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable 294 type here, instead add "omp declare target implicit" attribute. 295 (finish_decl): Diagnose vars without mappable type here. 296 2972018-06-20 Jakub Jelinek <jakub@redhat.com> 298 299 Backported from mainline 300 2018-06-15 Jakub Jelinek <jakub@redhat.com> 301 302 PR c/86093 303 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types 304 before doing POINTER_DIFF_EXPR. 305 3062018-05-30 Jakub Jelinek <jakub@redhat.com> 307 308 Backported from mainline 309 2018-05-10 Jakub Jelinek <jakub@redhat.com> 310 311 PR c++/85662 312 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than 313 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the 314 fold_convert_loc. 315 * c-typeck.c (build_unary_op): Use fold_offsetof rather than 316 fold_offsetof_1, pass argtype as TYPE to it and drop the 317 fold_convert_loc. 318 3192018-05-02 Release Manager 320 321 * GCC 8.1.0 released. 322 3232018-03-21 Joseph Myers <joseph@codesourcery.com> 324 325 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath 326 where all functions return the same _FloatN or _FloatNx type, 327 treat integer types as _Float64 instead of double. 328 3292018-03-21 Jakub Jelinek <jakub@redhat.com> 330 331 PR c/84999 332 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when 333 building vector comparison, diagnose it and return error_mark_node. 334 3352018-03-15 Jakub Jelinek <jakub@redhat.com> 336 337 PR c/84853 338 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>: 339 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has 340 INTEGER_TYPE element type. 341 3422018-03-13 David Pagan <dave.pagan@oracle.com> 343 344 PR c/46921 345 * c-typeck.c (output_init_element): Ensure field initializer 346 expression is always evaluated if there are side effects. 347 3482018-03-06 Jakub Jelinek <jakub@redhat.com> 349 350 PR c/84721 351 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if 352 !building_stmt_list_p (). 353 3542018-02-13 Richard Sandiford <richard.sandiford@linaro.org> 355 356 PR c/84305 357 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL 358 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR 359 and include the BIND_EXPR in the list of things that need to be 360 pre-evaluated. 361 3622018-02-09 Nathan Sidwell <nathan@acm.org> 363 364 PR c/84293 365 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location 366 to strict_aliasing_warning. 367 3682018-02-02 Paolo Carlini <paolo.carlini@oracle.com> 369 370 * c-typeck.c (really_start_incremental_init, push_init_level, 371 set_nonincremental_init, output_init_element, process_init_element): 372 Use DECL_UNNAMED_BIT_FIELD. 373 3742018-01-31 Marek Polacek <polacek@redhat.com> 375 376 PR c/81779 377 * c-parser.c (c_parser_compound_statement_nostart): Call 378 expansion_point_location_if_in_system_header. 379 3802018-01-17 David Malcolm <dmalcolm@redhat.com> 381 382 PR c++/83814 383 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just 384 the C part. 385 3862018-01-13 Jakub Jelinek <jakub@redhat.com> 387 388 PR c/83801 389 * c-tree.h (decl_constant_value_1): Add a bool argument. 390 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow 391 returning a CONSTRUCTOR if it is true. Use error_operand_p. 392 (decl_constant_value): Adjust caller. 393 * c-fold.c (c_fully_fold_internal): If in_init, pass true to 394 decl_constant_value_1 as IN_INIT. Otherwise, punt if 395 decl_constant_value returns initializer that has BLKmode or 396 array type. 397 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval. 398 3992018-01-03 Richard Sandiford <richard.sandiford@linaro.org> 400 Alan Hayward <alan.hayward@arm.com> 401 David Sherwood <david.sherwood@arm.com> 402 403 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial 404 TYPE_VECTOR_SUBPARTS. 405 4062018-01-03 Jakub Jelinek <jakub@redhat.com> 407 408 Update copyright years. 409 4102018-01-01 Jakub Jelinek <jakub@redhat.com> 411 412 PR c/83595 413 * c-parser.c (c_parser_braced_init, c_parser_initelt, 414 c_parser_conditional_expression, c_parser_cast_expression, 415 c_parser_sizeof_expression, c_parser_alignof_expression, 416 c_parser_postfix_expression, c_parser_omp_declare_reduction, 417 c_parser_transaction_expression): Use set_error () method instead 418 of setting value member to error_mark_node. 419 4202017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com> 421 422 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N> 423 and _Float<N>X built-in functions. 424 4252017-12-22 Jakub Jelinek <jakub@redhat.com> 426 427 PR debug/83550 428 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on 429 TYPE_STUB_DECL and call rest_of_type_compilation before processing 430 incomplete vars rather than after it. 431 432 PR debug/83547 433 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as 434 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first, 435 and consider empty ones if there are no other stmts. For 436 -Wunused-value walk all statements before the one only followed by 437 DEBUG_BEGIN_STMTs. 438 4392017-12-22 Mike Stump <mikestump@comcast.net> 440 Eric Botcazou <ebotcazou@adacore.com> 441 442 * c-parser.c (c_parser_while_statement): Add unroll parameter and 443 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR. 444 (c_parser_do_statement): Likewise. 445 (c_parser_for_statement): Likewise. 446 (c_parser_statement_after_labels): Adjust calls to above. 447 (c_parse_pragma_ivdep): New static function. 448 (c_parser_pragma_unroll): Likewise. 449 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll. 450 <PRAGMA_UNROLL>: New case. 451 4522017-12-19 Jakub Jelinek <jakub@redhat.com> 453 454 * c-typeck.c (comptypes_internal, function_types_compatible_p, 455 perform_integral_promotions, digest_init): Replace Yoda conditions 456 with typical order conditions. 457 * c-decl.c (check_bitfield_type_and_width): Likewise. 458 4592017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de> 460 461 * c-typeck.c (c_safe_arg_type_equiv_p, 462 c_safe_function_type_cast_p): New function. 463 (build_c_cast): Implement -Wcast-function-type. 464 4652017-12-14 Richard Biener <rguenther@suse.de> 466 467 PR c/83415 468 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR 469 like REALPART_EXPR for the behavior of whether its operand 470 is an lvalue. 471 4722017-12-12 Marek Polacek <polacek@redhat.com> 473 474 PR c/82679 475 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp. 476 4772017-12-12 Alexandre Oliva <aoliva@redhat.com> 478 479 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true. 480 * c-parser.c (add_debug_begin_stmt): New. 481 (c_parser_declaration_or_fndef): Call it. 482 (c_parser_compound_statement_nostart): Likewise. 483 (c_parser_statement_after_labels): Likewise. 484 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers. 485 4862017-12-07 Joseph Myers <joseph@codesourcery.com> 487 488 * c-decl.c (build_compound_literal): Add parameter alignas_align 489 and set alignment of decl if nonzero. 490 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS. 491 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a 492 qualifier. 493 (c_parser_struct_declaration): Update syntax comment. 494 (c_parser_type_name): Add alignas_ok argument and pass it to 495 c_parser_declspecs. 496 (c_parser_cast_expression): Pass true to c_parser_type_name and 497 give error if a cast used an _Alignas specifier. 498 (c_parser_sizeof_expression): Pass true to c_parser_type_name and 499 give error if sizeof (type-name) used an _Alignas specifier. 500 (c_parser_alignof_expression): Pass true to c_parser_type_name and 501 give error if _Alignof (type-name) used an _Alignas specifier. 502 (c_parser_postfix_expression_after_paren_type): Check specified 503 alignment for a compound literal and pass it to 504 build_compound_literal. 505 * c-parser.h (c_parser_type_name): Update prototype. 506 * c-tree.h (build_compound_literal): Update prototype. 507 5082017-12-07 Martin Sebor <msebor@redhat.com> 509 510 PR c/81544 511 * c-decl.c (c_decl_attributes): Look up existing declaration and 512 pass it to decl_attributes. 513 5142017-12-06 David Malcolm <dmalcolm@redhat.com> 515 516 PR c/83236 517 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are 518 reserved for use by the implementation. 519 5202017-12-06 David Malcolm <dmalcolm@redhat.com> 521 522 * c-decl.c: Include "c-family/c-spellcheck.h". 523 5242017-12-05 Martin Liska <mliska@suse.cz> 525 Jakub Jelinek <jakub@redhat.com> 526 527 * c-typeck.c (pointer_diff): Add new argument and instrument 528 pointer subtraction. 529 (build_binary_op): Similar for pointer comparison. 530 5312017-12-01 Jakub Jelinek <jakub@redhat.com> 532 533 PR c/79153 534 * c-parser.c: Include tree-iterator.h. 535 (c_parser_switch_statement): Emit LABEL_EXPR for the break label 536 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P 537 on it. 538 539 PR c/83222 540 * c-tree.h (decl_constant_value_1): Declare. 541 * c-typeck.c (decl_constant_value_1): New function. 542 (decl_constant_value): Use it. 543 * c-fold.c (c_fully_fold_internal): If in_init, use 544 decl_constant_value_1 instead of decl_constant_value. 545 5462017-11-30 Jakub Jelinek <jakub@redhat.com> 547 548 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;. 549 5502017-11-28 Jakub Jelinek <jakub@redhat.com> 551 552 PR sanitizer/81275 553 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if 554 c_switch_covers_all_cases_p returns true. 555 5562017-11-28 Julia Koval <julia.koval@intel.com> 557 Sebastian Peryt <sebastian.peryt@intel.com> 558 559 * Make-lang.in (c/c-array-notation.o): Remove. 560 * c-array-notation.c: Delete. 561 * c-decl.c: Remove cilkplus condition. 562 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for, 563 c_parser_cilk_verify_simd, c_parser_array_notation, 564 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize, 565 c_parser_cilk_simd_fn_vector_attrs, 566 c_finish_cilk_simd_fn_tokens): Delete. 567 (c_parser_declaration_or_fndef): Remove cilkplus condition. 568 (c_parser_direct_declarator_inner): Ditto. 569 (CILK_SIMD_FN_CLAUSE_MASK): Delete. 570 (c_parser_attributes, c_parser_compound_statement, 571 c_parser_statement_after_labels, c_parser_if_statement, 572 c_parser_switch_statement, c_parser_while_statement, 573 c_parser_do_statement, c_parser_for_statement, 574 c_parser_unary_expression, c_parser_postfix_expression, 575 c_parser_postfix_expression_after_primary, 576 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses, 577 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus 578 support. 579 * c-typeck.c (build_array_ref, build_function_call_vec, 580 convert_arguments, 581 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt, 582 c_finish_loop, build_binary_op): Remove cilkplus support. 583 5842017-11-28 Jakub Jelinek <jakub@redhat.com> 585 586 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead 587 of build3. 588 5892017-11-14 Boris Kolpackov <boris@codesynthesis.com> 590 591 * Make-lang.in (c.install-plugin): Install backend import library. 592 5932017-11-23 Jakub Jelinek <jakub@redhat.com> 594 595 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in 596 pragma_stmt context. 597 5982017-11-23 Mike Stump <mikestump@comcast.net> 599 Eric Botcazou <ebotcazou@adacore.com> 600 601 * c-parser.c (c_parser_while_statement): Pass 3rd operand to 602 ANNOTATE_EXPR. 603 (c_parser_do_statement): Likewise. 604 (c_parser_for_statement): Likewise. 605 6062017-11-22 David Malcolm <dmalcolm@redhat.com> 607 608 PR c++/62170 609 * c-objc-common.c (c_tree_printer): Convert penultimate param from 610 bool to bool *. Within '%T' handling, if showing an "aka", use 611 "quoted" param to add appropriate quoting. 612 6132017-11-22 Marek Polacek <polacek@redhat.com> 614 615 PR c++/60336 616 PR middle-end/67239 617 PR target/68355 618 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields. 619 6202017-11-21 David Malcolm <dmalcolm@redhat.com> 621 622 PR c/83056 623 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from 624 earlier failed lookups. 625 6262017-11-21 Marc Glisse <marc.glisse@inria.fr> 627 628 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR. 629 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR. 630 6312017-11-20 David Malcolm <dmalcolm@redhat.com> 632 633 PR c/81404 634 * c-decl.c: Include "c-family/known-headers.h". 635 (get_c_name_hint): Rename to get_stdlib_header_for_name and move 636 to known-headers.cc. 637 (class suggest_missing_header): Move to known-header.h. 638 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather 639 than get_c_name_hint. 640 6412017-11-20 David Malcolm <dmalcolm@redhat.com> 642 643 * c-decl.c (get_c_name_hint): New function. 644 (class suggest_missing_header): New class. 645 (lookup_name_fuzzy): Call get_c_name_hint and use it to 646 suggest missing headers to the user. 647 6482017-11-20 David Malcolm <dmalcolm@redhat.com> 649 650 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h. 651 Include "c-family/name-hint.h" 652 (implicit_decl_warning): Convert "hint" from 653 const char * to name_hint. Pass location to 654 lookup_name_fuzzy. Suppress any deferred diagnostic if the 655 warning was not printed. 656 (undeclared_variable): Likewise for "guessed_id". 657 (lookup_name_fuzzy): Convert return type from const char * 658 to name_hint. Add location_t param. 659 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h. 660 Include "c-family/name-hint.h" 661 (c_parser_declaration_or_fndef): Convert "hint" from 662 const char * to name_hint. Pass location to lookup_name_fuzzy. 663 (c_parser_parameter_declaration): Likewise. 664 6652017-11-19 Jakub Jelinek <jakub@redhat.com> 666 667 PR c/66618 668 PR c/69960 669 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold 670 where needed. 671 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr, 672 handle_omp_array_sections): Likewise. 673 (digest_init): Don't call decl_constant_value_for_optimization. 674 * c-tree.h (decl_constant_value_for_optimization): Removed. 675 * c-fold.c (c_fold_array_ref): New function. 676 (c_fully_fold_internal): Add LVAL argument, propagate it through 677 recursive calls. For VAR_P call decl_constant_value and 678 unshare if not LVAL and either optimizing or IN_INIT. Remove 679 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL, 680 fold ARRAY_REF with STRING_CST and INTEGER_CST operands. 681 (c_fully_fold): Add LVAL argument, pass it through to 682 c_fully_fold_internal. 683 (decl_constant_value_for_optimization): Removed. 684 6852017-11-15 Joseph Myers <joseph@codesourcery.com> 686 687 PR c/81156 688 * c-parser.c (check_tgmath_function): New function. 689 (enum tgmath_parm_kind): New enum. 690 (c_parser_postfix_expression): Handle __builtin_tgmath. 691 6922017-10-31 David Malcolm <dmalcolm@redhat.com> 693 694 * c-decl.c (implicit_decl_warning): Update for renaming of 695 pedwarn_at_rich_loc and warning_at_rich_loc. 696 (implicitly_declare): Likewise for renaming of inform_at_rich_loc. 697 (undeclared_variable): Likewise for renaming of error_at_rich_loc. 698 * c-parser.c (c_parser_declaration_or_fndef): Likewise. 699 (c_parser_struct_or_union_specifier): Likewise for renaming of 700 pedwarn_at_rich_loc. 701 (c_parser_parameter_declaration): Likewise for renaming of 702 error_at_rich_loc. 703 * c-typeck.c (build_component_ref): Likewise. 704 (build_unary_op): Likewise for renaming of inform_at_rich_loc. 705 (pop_init_level): Likewise for renaming of warning_at_rich_loc. 706 (set_init_label): Likewise for renaming of error_at_rich_loc. 707 7082017-10-30 Richard Biener <rguenther@suse.de> 709 710 * gimple-parser.c (c_parser_gimple_statement): Parse conditional 711 stmts. 712 7132017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com> 714 715 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma, 716 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants. 717 7182017-10-25 David Malcolm <dmalcolm@redhat.com> 719 720 PR c/7356 721 * c-parser.c (c_parser_declaration_or_fndef): Detect missing 722 semicolons. 723 7242017-10-25 Jakub Jelinek <jakub@redhat.com> 725 726 PR libstdc++/81706 727 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from 728 newdecl to corresponding __builtin_ if any. 729 7302017-10-24 Paolo Carlini <paolo.carlini@oracle.com> 731 732 PR c++/82466 733 * c-decl.c (diagnose_mismatched_decls): Use 734 OPT_Wbuiltin_declaration_mismatch. 735 7362017-10-12 David Malcolm <dmalcolm@redhat.com> 737 738 * c-parser.c (c_parser_require): Add "type_is_unique" param and 739 use it to guard calls to maybe_suggest_missing_token_insertion. 740 (c_parser_parms_list_declarator): Override default value of new 741 "type_is_unique" param to c_parser_require. 742 (c_parser_asm_statement): Likewise. 743 * c-parser.h (c_parser_require): Add "type_is_unique" param, 744 defaulting to true. 745 7462017-10-11 Nathan Sidwell <nathan@acm.org> 747 748 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too. 749 7502017-10-10 Richard Sandiford <richard.sandiford@linaro.org> 751 752 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when 753 operating on trees as wide_ints. 754 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise. 755 (c_tree_equal): Likewise. 756 7572017-10-04 David Malcolm <dmalcolm@redhat.com> 758 759 * c-decl.c (push_parm_decl): Store c_parm's location into the 760 PARAM_DECL. 761 (build_c_parm): Add "loc" param and store it within the c_parm. 762 * c-parser.c (struct c_parser): Add "last_token_location" field. 763 (c_parser_consume_token): Store location of the token into the 764 new field. 765 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS 766 when handling a FUNCTION_DECL, if it doesn't already have them. 767 (c_parser_parameter_declaration): Generate a location for the 768 parameter, and pass it to the call to build_c_parm. 769 * c-tree.h (struct c_parm): Add field "loc". 770 (build_c_parm): Add location_t param. 771 * c-typeck.c (get_fndecl_argument_location): New function. 772 (inform_for_arg): New function. 773 (convert_for_assignment): Use inform_for_arg when dealing with 774 ic_argpass. 775 7762017-09-29 Jakub Jelinek <jakub@redhat.com> 777 778 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if 779 width is non-NULL. 780 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL, 781 don't SET_DECL_C_BIT_FIELD here. 782 783 PR c/82340 784 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl 785 instead of trying to set just TREE_READONLY manually. 786 7872017-09-16 Tom de Vries <tom@codesourcery.com> 788 789 PR c/81875 790 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not 791 cond itself. 792 7932017-09-15 Joseph Myers <joseph@codesourcery.com> 794 795 PR c/82071 796 * c-typeck.c (ep_convert_and_check): Just call convert_and_check 797 for C11. 798 (build_conditional_expr): For C11, generate result with excess 799 precision when one argument is an integer and the other is of a 800 type using excess precision. 801 8022017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de> 803 804 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict. 805 8062017-09-13 Marek Polacek <polacek@redhat.com> 807 808 PR c/82167 809 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather 810 than expr.original_type. 811 8122017-09-12 Nathan Sidwell <nathan@acm.org> 813 814 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp, 815 resort_sorted_fields): Moved from c-family/c-common.c. 816 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h. 817 8182017-09-01 Joseph Myers <joseph@codesourcery.com> 819 820 PR c/82071 821 * c-typeck.c (build_atomic_assign): Handle argument with excess 822 precision. Ensure any EXCESS_PRECISION_EXPR is present in 823 argument passed to build_binary_op and convert_for_assignment but 824 not for call to c_fully_fold. 825 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early. 826 Ensure build_binary_op is called with argument with original 827 semantic type. Avoid calling c_fully_fold with an 828 EXCESS_PRECISION_EXPR from build_binary_op. 829 8302017-09-01 Jakub Jelinek <jakub@redhat.com> 831 832 PR c/81887 833 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd. 834 8352017-08-30 Richard Sandiford <richard.sandiford@linaro.org> 836 Alan Hayward <alan.hayward@arm.com> 837 David Sherwood <david.sherwood@arm.com> 838 839 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE. 840 (c_common_type): Likewise. Use as_a <scalar_mode> when setting 841 m1 and m2 to the signed equivalent of a fixed-point 842 SCALAR_TYPE_MODE. 843 8442017-08-24 David Malcolm <dmalcolm@redhat.com> 845 846 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather 847 than CAN_HAVE_LOCATION_P when determining whether to use the 848 location_t value within "value". 849 8502017-08-21 David Malcolm <dmalcolm@redhat.com> 851 852 * c-parser.c (c_parser_expr_list): Use c_expr::get_location () 853 rather than peeking the location of the first token. 854 * c-tree.h (c_expr::get_location): New method. 855 8562017-08-21 David Malcolm <dmalcolm@redhat.com> 857 858 * c-typeck.c (build_function_call_vec): Pass arg_loc to call 859 to check_function_arguments. 860 8612017-08-18 Marek Polacek <polacek@redhat.com> 862 863 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update 864 commentary. 865 8662017-08-18 H.J. Lu <hongjiu.lu@intel.com> 867 868 PR c/53037 869 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN. 870 (check_bitfield_type_and_width): Don't allow bit-field with 871 warn_if_not_aligned type. 872 8732017-08-14 Martin Sebor <msebor@redhat.com> 874 875 PR c/81117 876 * c-objc-common.c (c_objc_common_init): Handle 'G'. 877 8782017-08-11 Marek Polacek <polacek@redhat.com> 879 880 PR c/81795 881 * c-decl.c (pushtag): Only print inform if the warning was printed. 882 (grokdeclarator): Likewise. 883 8842017-08-10 David Malcolm <dmalcolm@redhat.com> 885 886 * c-parser.c (c_parser_error): Rename to... 887 (c_parser_error_richloc): ...this, making static, and adding 888 "richloc" parameter, passing it to the c_parse_error call, 889 rather than calling c_parser_set_source_position_from_token. 890 (c_parser_error): Reintroduce, reimplementing in terms of the 891 above, converting return type from void to bool. 892 (class token_pair): New class. 893 (struct matching_paren_traits): New struct. 894 (matching_parens): New typedef. 895 (struct matching_brace_traits): New struct. 896 (matching_braces): New typedef. 897 (get_matching_symbol): New function. 898 (c_parser_require): Add param MATCHING_LOCATION, using it to 899 highlight matching "opening" tokens for missing "closing" tokens. 900 (c_parser_skip_until_found): Likewise. 901 (c_parser_static_assert_declaration_no_semi): Convert explicit 902 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of 903 class matching_parens, so that the pertinent open parenthesis is 904 highlighted when there are problems locating the close 905 parenthesis. 906 (c_parser_struct_or_union_specifier): Likewise. 907 (c_parser_typeof_specifier): Likewise. 908 (c_parser_alignas_specifier): Likewise. 909 (c_parser_simple_asm_expr): Likewise. 910 (c_parser_braced_init): Likewise, for matching_braces. 911 (c_parser_paren_condition): Likewise, for matching_parens. 912 (c_parser_switch_statement): Likewise. 913 (c_parser_for_statement): Likewise. 914 (c_parser_asm_statement): Likewise. 915 (c_parser_asm_operands): Likewise. 916 (c_parser_cast_expression): Likewise. 917 (c_parser_sizeof_expression): Likewise. 918 (c_parser_alignof_expression): Likewise. 919 (c_parser_generic_selection): Likewise. 920 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG, 921 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR, 922 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary. 923 In case CPP_OPEN_PAREN, pass loc_open_paren to the 924 c_parser_skip_until_found call. 925 (c_parser_objc_class_definition): Use class matching_parens as 926 above. 927 (c_parser_objc_method_decl): Likewise. 928 (c_parser_objc_try_catch_finally_statement): Likewise. 929 (c_parser_objc_synchronized_statement): Likewise. 930 (c_parser_objc_at_property_declaration): Likewise. 931 (c_parser_oacc_wait_list): Likewise. 932 (c_parser_omp_var_list_parens): Likewise. 933 (c_parser_omp_clause_collapse): Likewise. 934 (c_parser_omp_clause_default): Likewise. 935 (c_parser_omp_clause_if): Likewise. 936 (c_parser_omp_clause_num_threads): Likewise. 937 (c_parser_omp_clause_num_tasks): Likewise. 938 (c_parser_omp_clause_grainsize): Likewise. 939 (c_parser_omp_clause_priority): Likewise. 940 (c_parser_omp_clause_hint): Likewise. 941 (c_parser_omp_clause_defaultmap): Likewise. 942 (c_parser_oacc_single_int_clause): Likewise. 943 (c_parser_omp_clause_ordered): Likewise. 944 (c_parser_omp_clause_reduction): Likewise. 945 (c_parser_omp_clause_schedule): Likewise. 946 (c_parser_omp_clause_num_teams): Likewise. 947 (c_parser_omp_clause_thread_limit): Likewise. 948 (c_parser_omp_clause_aligned): Likewise. 949 (c_parser_omp_clause_linear): Likewise. 950 (c_parser_omp_clause_safelen): Likewise. 951 (c_parser_omp_clause_simdlen): Likewise. 952 (c_parser_omp_clause_depend): Likewise. 953 (c_parser_omp_clause_map): Likewise. 954 (c_parser_omp_clause_device): Likewise. 955 (c_parser_omp_clause_dist_schedule): Likewise. 956 (c_parser_omp_clause_proc_bind): Likewise. 957 (c_parser_omp_clause_uniform): Likewise. 958 (c_parser_omp_for_loop): Likewise. 959 (c_parser_cilk_clause_vectorlength): Likewise. 960 (c_parser_cilk_clause_linear): Likewise. 961 (c_parser_transaction_expression): Likewise. 962 * c-parser.h (c_parser_require): Add param matching_location with 963 default UNKNOWN_LOCATION. 964 (c_parser_error): Convert return type from void to bool. 965 (c_parser_skip_until_found): Add param matching_location with 966 default UNKNOWN_LOCATION. 967 9682017-08-09 Marek Polacek <polacek@redhat.com> 969 970 * c-decl.c (build_enumerator): Use true/false instead of 1/0. 971 * c-tree.h (build_external_ref): Update declaration. 972 * c-typeck.c (build_array_ref): Use true/false instead of 1/0. 973 (build_external_ref): Change the type of a parameter to bool. 974 (parser_build_binary_op): Use true/false instead of 1/0. 975 (pointer_diff): Likewise. 976 (build_modify_expr): Likewise. 977 (set_designator): Change the type of a parameter to bool. 978 (set_init_index): Use true/false instead of 1/0. 979 (set_init_label): Likewise. 980 (output_init_element): Change the type of a parameter to bool. 981 (output_pending_init_elements): Use true/false instead of 1/0. 982 (process_init_element): Likewise. 983 (build_binary_op): Change the type of a parameter to bool. 984 9852017-08-09 Marek Polacek <polacek@redhat.com> 986 987 PR c/81233 988 * c-typeck.c (pedwarn_init): Make the function take a variable list. 989 Call emit_diagnostic_valist instead of pedwarn. 990 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro. 991 Print the relevant types in diagnostics. 992 9932017-08-09 Marek Polacek <polacek@redhat.com> 994 995 PR c/81417 996 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to 997 build_conditional_expr. 998 * c-parser.c (c_parser_conditional_expression): Create locations for 999 EXP1 and EXP2 from their source ranges. Pass the locations down to 1000 build_conditional_expr. 1001 * c-tree.h (build_conditional_expr): Update declaration. 1002 * c-typeck.c (build_conditional_expr): Add location_t parameters. 1003 For -Wsign-compare, also print the types. 1004 10052017-08-08 Martin Liska <mliska@suse.cz> 1006 1007 * c-convert.c: Include header files. 1008 * c-typeck.c: Likewise. 1009 10102017-08-07 Martin Liska <mliska@suse.cz> 1011 1012 * c-parser.c (c_parser_attributes): Canonicalize name of an 1013 attribute. 1014 10152017-08-02 Marek Polacek <polacek@redhat.com> 1016 1017 PR c/81289 1018 * c-parser.c (c_parser_unary_expression): Use set_error. 1019 1020 PR c/81448 1021 PR c/81306 1022 * c-warn.c (warn_for_multistatement_macros): Prevent bogus 1023 warnings. Avoid walking MACRO_MAP_LOCATIONS. 1024 10252017-07-31 Jan Hubicka <hubicka@ucw.cz> 1026 Martin Liska <mliska@suse.cz> 1027 1028 * c-typeck.c (c_finish_goto_label): Build gimple predict 1029 statement. 1030 10312017-07-31 Martin Liska <mliska@suse.cz> 1032 1033 PR sanitize/81530 1034 * c-convert.c (convert): Guard condition with flag_sanitize_p 1035 also with current_function_decl non-null equality. 1036 * c-decl.c (grokdeclarator): Likewise. 1037 * c-typeck.c (build_binary_op): Likewise. 1038 10392017-07-25 Marek Polacek <polacek@redhat.com> 1040 1041 * c-decl.c (grokfield): Remove local variable. 1042 10432017-07-25 Marek Polacek <polacek@redhat.com> 1044 1045 PR c/81364 1046 * c-parser.c (c_parser_else_body): Don't warn about multistatement 1047 macro expansion if the body is in { }. 1048 (c_parser_while_statement): Likewise. 1049 (c_parser_for_statement): Likewise. 1050 10512017-07-18 Nathan Sidwell <nathan@acm.org> 1052 1053 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE. 1054 10552017-07-14 David Malcolm <dmalcolm@redhat.com> 1056 1057 * c-decl.c (implicitly_declare): When suggesting a missing 1058 #include, provide a fix-it hint. 1059 10602017-07-06 David Malcolm <dmalcolm@redhat.com> 1061 1062 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests, 1063 and call that instead. 1064 * c-tree.h (selftest::run_c_tests): New decl. 1065 10662017-06-26 Marek Polacek <polacek@redhat.com> 1067 1068 PR c/80116 1069 * c-parser.c (c_parser_if_body): Set the location of the 1070 body of the conditional after parsing all the labels. Call 1071 warn_for_multistatement_macros. 1072 (c_parser_else_body): Likewise. 1073 (c_parser_switch_statement): Likewise. 1074 (c_parser_while_statement): Likewise. 1075 (c_parser_for_statement): Likewise. 1076 (c_parser_statement): Add a default argument. Save the location 1077 after labels have been parsed. 1078 (c_parser_c99_block_statement): Likewise. 1079 10802017-06-19 Richard Biener <rguenther@suse.de> 1081 1082 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle 1083 negated _Literals to parse _Literal (int) -1. 1084 10852017-06-13 Martin Liska <mliska@suse.cz> 1086 1087 PR sanitize/78204 1088 * c-convert.c (convert): Use sanitize_flags_p. 1089 * c-decl.c (grokdeclarator): Likewise. 1090 * c-typeck.c (convert_for_assignment): Likewise. 1091 (c_finish_return): Likewise. 1092 (build_binary_op): Likewise. 1093 10942017-06-08 Jakub Jelinek <jakub@redhat.com> 1095 1096 PR c/81006 1097 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE 1098 to sizetype before size_binop. 1099 11002017-06-07 Jakub Jelinek <jakub@redhat.com> 1101 1102 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead 1103 of TDI_generic. 1104 11052017-06-06 Marek Polacek <polacek@redhat.com> 1106 1107 PR c/79983 1108 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of 1109 ref. 1110 (start_enum): Use the location of TYPE_STUB_DECL of enumtype. 1111 11122017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de> 1113 1114 * c-parser.c (c_parser_binary_expression): Implement the 1115 -Wsizeof_pointer_div warning. 1116 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code 1117 from a parenthesized expression. 1118 (c_parser_expr_list): Use c_last_sizeof_loc. 1119 * c-tree.h (c_last_sizeof_loc): New external. 1120 * c-typeck.c (c_last_sizeof_loc): New variable. 1121 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc. 1122 11232017-05-31 Mikhail Maltsev <maltsevm@gmail.com> 1124 1125 PR testsuite/80580 1126 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels. 1127 11282017-05-30 David Malcolm <dmalcolm@redhat.com> 1129 1130 * c-objc-common.c (c_tree_printer): Gain bool and const char ** 1131 parameters. 1132 11332017-05-24 Martin Sebor <msebor@redhat.com> 1134 1135 PR c/80731 1136 * c-fold.c (c_fully_fold_internal): Adjust. 1137 * c-typeck.c (parser_build_unary_op): Adjust. 1138 11392017-05-23 Thomas Schwinge <thomas@codesourcery.com> 1140 1141 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add 1142 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS", 1143 "VECTOR_LENGTH". 1144 11452017-05-23 Marek Polacek <polacek@redhat.com> 1146 1147 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant 1148 quotes. 1149 11502017-05-22 Jakub Jelinek <jakub@redhat.com> 1151 1152 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal 1153 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if 1154 it returned invariant. Call tree_invariant_p unconditionally 1155 afterwards to decide whether to return expr or op0. 1156 11572017-05-22 Nathan Sidwell <nathan@acm.org> 1158 1159 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling. 1160 11612017-05-19 Thomas Schwinge <thomas@codesourcery.com> 1162 1163 * c-parser.c (c_parser_omp_clause_default): Handle 1164 "OMP_CLAUSE_DEFAULT_PRESENT". 1165 11662017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de> 1167 1168 * config-lang.in (gtfiles): Add c-family/c-format.c. 1169 11702017-05-18 Nathan Sidwell <nathan@acm.org> 1171 1172 * c-decl.c (pushdecl_top_level): Delete unused function. 1173 11742017-05-18 Marek Polacek <polacek@redhat.com> 1175 1176 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0. 1177 (check_earlier_gotos): Likewise. 1178 (define_label): Likewise. 1179 (pending_xref_error): Likewise. 1180 (smallest_type_quals_location): Likewise. 1181 (grokdeclarator): Likewise. 1182 (grokparms): Likewise. 1183 (identifier_global_value): Likewise. 1184 * c-typeck.c (set_nonincremental_init_from_string): Likewise. 1185 (find_init_member): Likewise. 1186 11872017-05-18 Marek Polacek <polacek@redhat.com> 1188 1189 * c-decl.c (start_decl): Use false/true instead of 0/1. 1190 (grokdeclarator): Likewise. 1191 (finish_struct): Likewise. 1192 (start_function): Change the return type to bool. Use false/true 1193 instead of 0/1. 1194 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0. 1195 * c-tree.h (start_function): Update. 1196 * c-typeck.c (same_translation_unit_p): Change the return type to bool. 1197 (set_designator): Change the return type to bool. Use false/true 1198 instead of 0/1. 1199 12002017-05-17 Marek Polacek <polacek@redhat.com> 1201 1202 * c-decl.c: Use NULL_TREE instead of 0 where appropriate. 1203 * c-typeck.c: Likewise. 1204 12052017-05-17 Marek Polacek <polacek@redhat.com> 1206 1207 PR sanitizer/80659 1208 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and 1209 DECL_IGNORED_P even for non-static compound literals. 1210 12112017-05-17 Martin Liska <mliska@suse.cz> 1212 1213 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and 1214 use it instead of int type. 1215 12162017-05-17 Marek Polacek <polacek@redhat.com> 1217 1218 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't 1219 call c_fully_fold. 1220 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs. 1221 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr. 1222 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR. 1223 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with 1224 save_expr. 1225 (c_parser_conditional_expression): Likewise. 1226 * c-tree.h (SAVE_EXPR_FOLDED_P): Define. 1227 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr. 1228 (process_init_element): Likewise. 1229 (build_binary_op): Likewise. 1230 (handle_omp_array_sections_1): Likewise. 1231 12322017-05-12 Thomas Schwinge <thomas@codesourcery.com> 1233 1234 * c-parser.c (c_parser_omp_clause_num_gangs) 1235 (c_parser_omp_clause_num_workers) 1236 (c_parser_omp_clause_vector_length): Merge functions into... 1237 (c_parser_oacc_single_int_clause): ... this new function. Adjust 1238 all users. 1239 12402017-05-11 Nathan Sidwell <nathan@acm.org> 1241 1242 * gimple-parser.c: Don't #include tree-dump.h. 1243 12442017-05-11 Mikhail Maltsev <maltsevm@gmail.com> 1245 1246 PR testsuite/80580 1247 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base. 1248 12492017-05-11 Mikhail Maltsev <maltsevm@gmail.com> 1250 1251 PR testsuite/80580 1252 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle 1253 incorrect __MEM syntax. 1254 12552017-05-11 Mikhail Maltsev <maltsevm@gmail.com> 1256 1257 PR testsuite/80580 1258 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument 1259 type of unary '*'. 1260 12612017-05-09 Nathan Sidwell <nathan@acm.org> 1262 1263 * c-tree.h (pushdecl): Declare. 1264 12652017-05-05 David Malcolm <dmalcolm@redhat.com> 1266 1267 * c-decl.c (warn_defaults_to): Replace report_diagnostic 1268 with diagnostic_report_diagnostic. 1269 * c-errors.c (pedwarn_c99): Likewise. 1270 (pedwarn_c90): Likewise. 1271 12722017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn> 1273 1274 PR c++/80038 1275 * c-gimplify.c (c_gimplify_expr): Remove calls to 1276 cilk_gimplifY_call_params_in_spawned_fn. 1277 12782017-04-25 David Malcolm <dmalcolm@redhat.com> 1279 1280 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it 1281 hint for removing extra semicolon. 1282 12832017-04-21 Jakub Jelinek <jakub@redhat.com> 1284 1285 PR c/80468 1286 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not 1287 enabled, set specs->type to integer_type_node. 1288 12892017-04-03 Jonathan Wakely <jwakely@redhat.com> 1290 1291 * c-array-notation.c: Fix typo in comment. 1292 12932017-03-29 Marek Polacek <polacek@redhat.com> 1294 1295 PR c/79730 1296 * c-decl.c (finish_decl): Check VAR_P. 1297 12982017-03-27 Jakub Jelinek <jakub@redhat.com> 1299 1300 PR middle-end/80162 1301 * c-tree.h (c_mark_addressable): Add array_ref_p argument. 1302 * c-typeck.c (c_mark_addressable): Likewise. Look through 1303 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE 1304 to ARRAY_TYPE. 1305 (build_array_ref): Pass true as array_ref_p to c_mark_addressable. 1306 13072017-03-23 Marek Polacek <polacek@redhat.com> 1308 1309 * c-tree.h: Remove a C_RID_YYCODE reference. 1310 13112017-03-21 Jakub Jelinek <jakub@redhat.com> 1312 1313 PR c/80097 1314 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around 1315 optional COMPOUND_EXPR with ubsan instrumentation. 1316 13172017-03-17 Marek Polacek <polacek@redhat.com> 1318 1319 * c-parser.c: Add C11 references. 1320 13212017-03-15 Marek Polacek <polacek@redhat.com> 1322 1323 * c-parser.c (c_parser_enum_specifier): Remove redundant line. 1324 13252017-03-11 Marek Polacek <polacek@redhat.com> 1326 1327 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting. 1328 13292017-03-10 David Malcolm <dmalcolm@redhat.com> 1330 1331 PR translation/79848 1332 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to 1333 "%qs". 1334 * c-parser.c (c_parser_oacc_shape_clause): Likewise. 1335 13362017-03-09 Marek Polacek <polacek@redhat.com> 1337 1338 PR sanitizer/79757 1339 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style 1340 parameter declarations with initializers. 1341 13422017-03-09 Jakub Jelinek <jakub@redhat.com> 1343 1344 PR c/79969 1345 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of 1346 TYPE_STUB_DECL. 1347 13482017-03-07 Jakub Jelinek <jakub@redhat.com> 1349 1350 PR c/79834 1351 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error 1352 for "may only be used in compound statements" diagnostics, change it 1353 such that the same translatable string is used for all pragmas. For 1354 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the 1355 diagnostics. 1356 (c_parser_omp_cancellation_point, c_parser_omp_target_update, 1357 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change 1358 "may only be used in compound statements" diagnostics, such that the 1359 same translatable string is used for all pragmas. 1360 13612017-03-04 Marek Polacek <polacek@redhat.com> 1362 1363 PR c/79847 1364 * c-decl.c (implicit_decl_warning): Add missing space. 1365 13662017-03-03 Marek Polacek <polacek@redhat.com> 1367 1368 PR c/79758 1369 * c-decl.c (store_parm_decls_oldstyle): Check if the element of 1370 current_function_prototype_arg_types is error_mark_node. Fix 1371 formatting. Use TREE_VALUE instead of TREE_TYPE. 1372 13732017-03-03 Jakub Jelinek <jakub@redhat.com> 1374 1375 PR c/79837 1376 * c-parser.c (c_parser_omp_clause_reduction): Don't mention 1377 %<min%> or %<max%> in the diagnostics, instead mention identifier. 1378 (c_parser_omp_declare_reduction): Don't mention %<min%> in the 1379 diagnostics. 1380 1381 PR c/79836 1382 * c-parser.c (c_parser_generic_selection): Use %<_Generic%> 1383 instead of %<_Generic>. 1384 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>. 1385 (c_parser_omp_target_exit_data): Use %<release%> instead of 1386 %<release>. 1387 13882017-02-28 Jakub Jelinek <jakub@redhat.com> 1389 1390 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...") 1391 instead of just cond ? "..." : "...". 1392 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only 1393 for "enter"/"exit" keyword. 1394 (c_finish_oacc_routine): Don't use %s to supply portions of the 1395 message. 1396 13972017-02-24 Jakub Jelinek <jakub@redhat.com> 1398 1399 PR c++/79588 1400 * c-parser.c (c_parser_postfix_expression_after_primary): Don't 1401 handle -Wrestrict here. 1402 * c-typeck.c (build_function_call_vec): Adjust 1403 check_function_arguments caller. 1404 14052017-02-23 Richard Biener <rguenther@suse.de> 1406 1407 PR c/79684 1408 * gimple-parser.c (c_parser_gimple_statement): Use set_error 1409 to initialize c_exprs to return. 1410 (c_parser_gimple_binary_expression): Likewise. 1411 (c_parser_gimple_unary_expression): Likewise. 1412 (c_parser_gimple_postfix_expression): Likewise. 1413 14142017-02-22 Marek Polacek <polacek@redhat.com> 1415 1416 PR c/79662 1417 * c-typeck.c (convert_arguments): Handle error_mark_node. 1418 14192017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> 1420 1421 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return 1422 value of c_parser_parse_ssa_name against error_mark_node and emit 1423 error if ssa name is anonymous and written as default definition. 1424 14252017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> 1426 1427 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle 1428 FMA_EXPR. 1429 14302017-02-16 Jakub Jelinek <jakub@redhat.com> 1431 1432 PR c++/79512 1433 * c-parser.c (c_parser_omp_target): For -fopenmp-simd 1434 ignore #pragma omp target even when not followed by identifier. 1435 14362017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> 1437 1438 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR. 1439 (c_parser_gimple_unary_expression): Likewise. 1440 14412017-02-13 Jakub Jelinek <jakub@redhat.com> 1442 1443 * c-parser.c (c_parser_oacc_declare): Add missing space in 1444 diagnostics. 1445 14462017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> 1447 1448 PR c/79478 1449 * gimple-parser.c (c_parser_gimple_postfix_expression): Call 1450 set_c_expr_source_range when parsing ssa-name. 1451 14522017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com> 1453 Richard Biener <rguenther@suse.de> 1454 1455 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid 1456 building IL when arguments are error_mark_node. 1457 (c_parser_gimple_unary_expression): Likewise. 1458 (c_parser_gimple_if_stmt): Likewise. 1459 (c_parser_gimple_switch_stmt): Likewise. 1460 (c_parser_gimple_return_stmt): Likewise. 1461 (c_parser_parse_ssa_name): When name lookup fails do not build 1462 an SSA name. Use undeclared rather than not declared in error 1463 reporting. 1464 14652017-02-09 Marek Polacek <polacek@redhat.com> 1466 1467 PR c/79428 1468 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol 1469 instead of c_parser_skip_until_found. 1470 14712017-02-09 Jakub Jelinek <jakub@redhat.com> 1472 1473 PR c/79431 1474 * c-parser.c (c_parser_omp_declare_target): Don't invoke 1475 symtab_node::get on automatic variables. 1476 14772016-02-09 Nathan Sidwell <nathan@codesourcery.com> 1478 Chung-Lin Tang <cltang@codesourcery.com> 1479 1480 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile. 1481 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and 1482 semantic checking. 1483 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs. 1484 14852017-02-07 Richard Biener <rguenther@suse.de> 1486 1487 * gimple-parser.c (c_parser_gimple_expr_list): Simplify. 1488 (c_parser_gimple_postfix_expression_after_primary): 1489 Do not use c_build_function_call_vec to avoid folding and promotion. 1490 Simplify. 1491 14922017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com> 1493 1494 PR lto/79061 1495 * c-decl.c (pop_scope): Pass main_input_filename to 1496 build_translation_unit_decl. 1497 14982017-01-24 David Malcolm <dmalcolm@redhat.com> 1499 1500 * c-parser.c: Include "read-rtl-function.h" and 1501 "run-rtl-passes.h". 1502 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in 1503 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition 1504 production. Update for renaming of field "gimple_pass" to 1505 "gimple_or_rtl_pass". If __RTL was seen, call 1506 c_parser_parse_rtl_body. Convert a timevar_push/pop pair 1507 to an auto_timevar, to cope with early exit. 1508 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of 1509 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of 1510 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list. 1511 Handle RID_RTL. 1512 (c_parser_parse_rtl_body): New function. 1513 * c-tree.h (enum c_declspec_word): Add cdw_rtl. 1514 (struct c_declspecs): Rename field "gimple_pass" to 1515 "gimple_or_rtl_pass". Add field "rtl_p". 1516 * gimple-parser.c (c_parser_gimple_pass_list): Rename to... 1517 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly. 1518 * gimple-parser.h (c_parser_gimple_pass_list): Rename to... 1519 (c_parser_gimple_or_rtl_pass_list): ...this. 1520 15212017-01-20 Marek Polacek <polacek@redhat.com> 1522 1523 PR c/64279 1524 * c-typeck.c (build_conditional_expr): Warn about duplicated branches. 1525 15262017-01-13 Richard Biener <rguenther@suse.de> 1527 1528 * gimple-parser.c (c_parser_gimple_compound_statement): Handle 1529 nops. 1530 15312017-01-13 Richard Biener <rguenther@suse.de> 1532 1533 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse 1534 _Literal ( type-name ) number. 1535 15362017-01-12 Richard Biener <rguenther@suse.de> 1537 1538 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse 1539 __MEM. 1540 15412017-01-11 Jakub Jelinek <jakub@redhat.com> 1542 1543 PR c++/72813 1544 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing 1545 PCH file. 1546 15472017-01-11 Richard Biener <rguenther@suse.de> 1548 1549 PR bootstrap/79052 1550 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing 1551 returns on parse errors. 1552 15532017-01-04 Marek Polacek <polacek@redhat.com> 1554 1555 PR c++/64767 1556 * c-parser.c (c_parser_postfix_expression): Mark zero character 1557 constants by setting original_type in c_expr. 1558 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared 1559 with a zero character constant. 1560 (char_type_p): New function. 1561 15622017-01-04 David Malcolm <dmalcolm@redhat.com> 1563 1564 * c-parser.c (c_parser_declaration_or_fndef): Create a 1565 rich_location at init_loc and parse it to start_init. 1566 (last_init_list_comma): New global. 1567 (c_parser_braced_init): Update last_init_list_comma when parsing 1568 commas. Pass it to pop_init_level. Pass location of closing 1569 brace to pop_init_level. 1570 (c_parser_postfix_expression_after_paren_type): Create a 1571 rich_location at type_loc and parse it to start_init. 1572 (c_parser_omp_declare_reduction): Likewise for loc. 1573 * c-tree.h (start_init): Add rich_location * param. 1574 (pop_init_level): Add location_t param. 1575 * c-typeck.c (struct initializer_stack): Add field 1576 "missing_brace_richloc". 1577 (start_init): Add richloc param, use it to initialize 1578 the stack node's missing_brace_richloc. 1579 (last_init_list_comma): New decl. 1580 (finish_implicit_inits): Pass last_init_list_comma to 1581 pop_init_level. 1582 (push_init_level): When finding missing open braces, add fix-it 1583 hints to the richloc. 1584 (pop_init_level): Add "insert_before" param and pass it 1585 when calling pop_init_level. Add fixits about missing 1586 close braces to any richloc. Use the richloc for the 1587 -Wmissing-braces warning. 1588 (set_designator): Pass last_init_list_comma to pop_init_level. 1589 (process_init_element): Likewise. 1590 15912017-01-01 Jakub Jelinek <jakub@redhat.com> 1592 1593 Update copyright years. 1594 15952016-12-21 Jakub Jelinek <jakub@redhat.com> 1596 1597 PR bootstrap/78817 1598 * c-typeck.c (build_function_call_vec): If check_function_arguments 1599 returns true, set TREE_NO_WARNING on CALL_EXPR. 1600 1601 PR c/77767 1602 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression 1603 to *expr instead of overwriting it. 1604 16052016-12-20 Richard Biener <rguenther@suse.de> 1606 1607 * gimple-parser.c (c_parser_gimple_compound_statement): Improve 1608 error recovery. 1609 (c_parser_gimple_statement): Only build assigns for non-error 1610 stmts. 1611 (c_parser_gimple_postfix_expression_after): Improve error recovery. 1612 16132016-12-14 Martin Jambor <mjambor@suse.cz> 1614 1615 * c-parser.c: Include omp-general.h and omp-offload.h instead of 1616 omp-low.h. 1617 (c_finish_oacc_routine): Adjusted call to 1618 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib 1619 to use their new names. 1620 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to 1621 use its new name. 1622 (c_parser_oacc_update): Likewise. 1623 (c_parser_omp_simd): Likewise. 1624 (c_parser_omp_target_update): Likewise. 1625 * c-typeck.c: Include omp-general.h instead of omp-low.h. 1626 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new 1627 name. 1628 (c_finish_omp_cancellation_point): Likewise. 1629 * gimple-parser.c: Do not include omp-low.h 1630 16312016-12-02 Cesar Philippidis <cesar@codesourcery.com> 1632 James Norris <jnorris@codesourcery.com> 1633 1634 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA, 1635 EXIT_DATA,WAIT} are not used in compound statements. 1636 (c_parser_oacc_enter_exit_data): Update diagnostics. 1637 16382016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de> 1639 1640 PR c++/71973 1641 * c-decl.c (diagnose_mismatched_decls): Use 1642 OPT_Wbuiltin_declaration_mismatch here too. 1643 16442016-11-18 Richard Sandiford <richard.sandiford@arm.com> 1645 Alan Hayward <alan.hayward@arm.com> 1646 David Sherwood <david.sherwood@arm.com> 1647 1648 * c-decl.c (merge_decls): Use SET_DECL_MODE. 1649 (make_label, finish_struct): Likewise. 1650 16512016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com> 1652 Richard Biener <rguenther@suse.de> 1653 1654 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o. 1655 * config-lang.in (gtfiles): Add c/c-parser.h. 1656 * c-tree.h (enum c_declspec_word): Add cdw_gimple. 1657 (struct c_declspecs): Add gimple_pass member and gimple_p flag. 1658 * c-parser.c (enum c_id_kind, struct c_token, 1659 c_parser_next_token_is, c_parser_next_token_is_not, 1660 c_parser_next_token_is_keyword, 1661 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec): 1662 Split out to ... 1663 * c-parser.h: ... new header. 1664 * c-parser.c: Include c-parser.h and gimple-parser.h. 1665 (c_parser_peek_token, c_parser_peek_2nd_token, 1666 c_token_starts_typename, c_parser_next_token_starts_declspecs, 1667 c_parser_next_tokens_start_declaration, c_parser_consume_token, 1668 c_parser_error, c_parser_require, c_parser_skip_until_found, 1669 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token, 1670 c_parser_type_name): Export. 1671 (c_parser_tokens_buf): New function. 1672 (c_parser_error): Likewise. 1673 (c_parser_set_error): Likewise. 1674 (c_parser_declspecs): Handle RID_GIMPLE. 1675 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body 1676 via c_parser_parse_gimple_body. 1677 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token, 1678 c_token_starts_typename, c_parser_next_token_starts_declspecs, 1679 c_parser_next_tokens_start_declaration, c_parser_consume_token, 1680 c_parser_error, c_parser_require, c_parser_skip_until_found, 1681 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token, 1682 c_parser_type_name): Declare. 1683 (struct c_parser): Declare forward. 1684 (c_parser_tokens_buf): Declare. 1685 (c_parser_error): Likewise. 1686 (c_parser_set_error): Likewise. 1687 * gimple-parser.c: New file. 1688 * gimple-parser.h: Likewise. 1689 16902016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> 1691 1692 PR c/35503 1693 * c-parser.c (c_parser_postfix_expression_after_primary): Call 1694 warn_for_restrict. 1695 16962016-09-11 Le-Chun Wu <lcwu@google.com> 1697 Mark Wielaard <mjw@redhat.com> 1698 1699 * c-decl.c (warn_if_shadowing): Use the warning code corresponding 1700 to the given -Wshadow= variant. 1701 17022016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com> 1703 1704 * c-typeck.c: Include memmodel.h. 1705 17062016-10-13 Jakub Jelinek <jakub@redhat.com> 1707 1708 PR target/77957 1709 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null 1710 instead of lhd_return_null_tree_v. 1711 17122016-10-07 Bernd Schmidt <bschmidt@redhat.com> 1713 1714 PR c++/69733 1715 * c-decl.c (smallest_type_quals_location): New static function. 1716 (grokdeclarator): Try to find the correct location for an ignored 1717 qualifier. 1718 17192016-09-26 Marek Polacek <polacek@redhat.com> 1720 1721 PR c/7652 1722 * c-decl.c (pop_scope): Add gcc_fallthrough. 1723 17242016-09-26 Marek Polacek <polacek@redhat.com> 1725 1726 PR c/7652 1727 * c-parser.c (struct c_token): Add flags field. 1728 (c_lex_one_token): Pass it to c_lex_with_flags. 1729 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough)); 1730 into IFN_FALLTHROUGH. 1731 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle 1732 attribute fallthrough after a case label or default label. 1733 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE. 1734 17352016-09-24 Marek Polacek <polacek@redhat.com> 1736 1737 PR c/77490 1738 * c-typeck.c (build_unary_op): Warn about bit not on expressions that 1739 have boolean value. Warn about ++/-- on booleans. 1740 17412016-09-23 Jakub Jelinek <jakub@redhat.com> 1742 1743 * c-parser.c (incomplete_record_decls): Remove unnecessary 1744 = vNULL initialization of file scope vec. 1745 17462016-09-16 Marek Polacek <polacek@redhat.com> 1747 1748 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0. 1749 17502016-09-14 Marek Polacek <polacek@redhat.com> 1751 1752 * c-array-notation.c (create_cmp_incr): Use false instead of 0. 1753 (fix_array_notation_expr): Likewise. 1754 * c-decl.c (finish_decl): Likewise. 1755 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise. 1756 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1. 1757 (function_to_pointer_conversion): Use false instead of 0. 1758 (convert_lvalue_to_rvalue): Likewise. 1759 (parser_build_unary_op): Likewise. 1760 (build_atomic_assign): Likewise. 1761 (build_unary_op): Change nonconvert parameter type to bool, use 1762 true/false instead of 1/0. 1763 (build_binary_op): Use true instead of 1. 1764 17652016-09-13 David Malcolm <dmalcolm@redhat.com> 1766 1767 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming 1768 of add_fixit_insert to add_fixit_insert_before. 1769 17702016-09-13 Marek Polacek <polacek@redhat.com> 1771 1772 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use 1773 it. 1774 17752016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de> 1776 1777 PR c++/77496 1778 * c-parser.c (c_parser_conditional_expression): Pass the rightmost 1779 COMPOUND_EXPR to warn_for_omitted_condop. 1780 17812016-09-07 David Malcolm <dmalcolm@redhat.com> 1782 1783 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use 1784 c_get_substring_location for this new langhook. 1785 17862016-09-02 Jakub Jelinek <jakub@redhat.com> 1787 1788 PR c/65467 1789 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if 1790 flag_openmp. 1791 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue 1792 instead of mark_exp_read on low_bound/length expression. 1793 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads, 1794 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize, 1795 c_parser_omp_clause_priority, c_parser_omp_clause_hint, 1796 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause, 1797 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule, 1798 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams, 1799 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned, 1800 c_parser_omp_clause_linear, c_parser_omp_clause_safelen, 1801 c_parser_omp_clause_simdlen, c_parser_omp_clause_device, 1802 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue 1803 instead of mark_expr_read. 1804 (c_parser_omp_declare_reduction): Reject _Atomic qualified types. 1805 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR, 1806 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine. 1807 * c-tree.h (c_omp_clause_copy_ctor): New prototype. 1808 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified 1809 array section bases outside of depend clause, for depend clause 1810 use convert_lvalue_to_rvalue on the base. 1811 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction, 1812 linear, aligned, map, to and from clauses. 1813 (c_omp_clause_copy_ctor): New function. 1814 18152016-09-01 Marek Polacek <polacek@redhat.com> 1816 1817 PR c/7652 1818 * c-typeck.c (composite_type): Add FALLTHRU comment. 1819 18202016-08-31 David Malcolm <dmalcolm@redhat.com> 1821 1822 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space 1823 to the insertion fixits for "struct", "union", and "enum". 1824 18252016-08-30 David Malcolm <dmalcolm@redhat.com> 1826 1827 * c-decl.c (implicit_decl_warning): Use add_fixit_replace 1828 rather than add_fixit_misspelled_id. 1829 (undeclared_variable): Likewise. 1830 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove 1831 now-redundant "here" params from add_fixit_insert method calls. 1832 (c_parser_parameter_declaration): Likewise. 1833 * c-typeck.c (build_component_ref): Remove now-redundant range 1834 param from add_fixit_replace method calls. 1835 18362016-08-25 Marek Polacek <polacek@redhat.com> 1837 1838 * c-typeck.c (parser_build_binary_op): Pass LHS to 1839 warn_logical_not_parentheses. 1840 18412016-08-25 Marek Polacek <polacek@redhat.com> 1842 1843 PR c/77323 1844 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN 1845 or _FloatN or _FloatNx is not supported. 1846 (finish_declspecs): Set type to integer_type_node when _FloatN or 1847 _FloatNx is not supported. 1848 18492016-08-19 Joseph Myers <joseph@codesourcery.com> 1850 1851 PR c/32187 1852 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value. 1853 (struct c_declspecs): Add field floatn_nx_idx. 1854 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN 1855 and _FloatNx type specifiers. 1856 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs) 1857 (c_parser_declspecs, c_parser_attribute_any_word) 1858 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX. 1859 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types. 1860 (convert_arguments): Avoid promoting _FloatN and _FloatNx types 1861 narrower than double. 1862 18632016-08-12 Jakub Jelinek <jakub@redhat.com> 1864 Martin Liska <mliska@suse.cz> 1865 1866 PR c/67410 1867 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of 1868 % to determine val element to change. Assert that 1869 wchar_bytes * charwidth fits into val array. 1870 18712016-08-12 Marek Polacek <polacek@redhat.com> 1872 1873 PR c/7652 1874 * c-parser.c (c_parser_external_declaration): Add FALLTHRU. 1875 (c_parser_postfix_expression): Likewise. 1876 * c-typeck.c (build_unary_op): Adjust fall through comment. 1877 (c_mark_addressable): Likewise. 1878 18792016-08-11 Jakub Jelinek <jakub@redhat.com> 1880 1881 PR c/72816 1882 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible 1883 array member through typedef, for orig_qual_indirect == 0 clear 1884 orig_qual_type. 1885 18862016-08-08 David Malcolm <dmalcolm@redhat.com> 1887 1888 PR c/64955 1889 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire 1890 this up to selftest::run_c_tests. 1891 (selftest::run_c_tests): New function. 1892 18932016-08-04 Thomas Schwinge <thomas@codesourcery.com> 1894 1895 * c-parser.c (struct oacc_routine_data): Add error_seen and 1896 fndecl_seen members. 1897 (c_finish_oacc_routine): Use these. 1898 (c_parser_declaration_or_fndef): Adjust. 1899 (c_parser_oacc_routine): Likewise. Support more C language 1900 constructs, and improve diagnostics. Move pragma context 1901 checking... 1902 (c_parser_pragma): ... here. 1903 1904 * c-parser.c (struct oacc_routine_data): New. 1905 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it. 1906 Simplify code. 1907 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp 1908 declare target" attribute. 1909 19102016-08-01 Jan Beulich <jbeulich@suse.com> 1911 1912 * c-fold.c (c_fully_fold_internal): Also emit shift count 1913 warnings for vector types. 1914 * c-typeck.c (build_binary_op): Likewise. 1915 19162016-07-29 Marek Polacek <polacek@redhat.com> 1917 1918 PR c/71742 1919 * c-decl.c (finish_struct): Rephrase an error message. 1920 1921 PR c/71853 1922 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type 1923 to error node for invalid code. 1924 1925 PR c/71573 1926 * c-decl.c (implicitly_declare): Return decl early not only for 1927 error_mark_nodes, but for anything that is not a FUNCTION_DECL. 1928 19292016-07-29 Jakub Jelinek <jakub@redhat.com> 1930 1931 PR c/71969 1932 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS 1933 on GNU extern inline functions. 1934 19352016-07-29 Marek Polacek <polacek@redhat.com> 1936 1937 PR c/71583 1938 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also 1939 check expr.value. 1940 19412016-07-22 Uros Bizjak <ubizjak@gmail.com> 1942 1943 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1, 1944 19452016-07-20 David Malcolm <dmalcolm@redhat.com> 1946 1947 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to 1948 spellcheck-tree.h 1949 (best_macro_match): Likewise, converting from a typedef to a 1950 subclass. 1951 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c. 1952 (lookup_name_fuzzy): Update for change of best_macro_match to a 1953 subclass with a ctor that calls cpp_forall_identifiers. 1954 19552016-07-20 David Malcolm <dmalcolm@redhat.com> 1956 1957 * c-decl.c (implicit_decl_warning): Update for conversion of 1958 return type of lookup_name_fuzzy to const char *. 1959 (undeclared_variable): Likewise. 1960 (lookup_name_fuzzy): Convert return type from tree to 1961 const char *. 1962 * c-parser.c (c_parser_declaration_or_fndef): Update for 1963 conversion of return type of lookup_name_fuzzy to const char *. 1964 (c_parser_parameter_declaration): Likewise. 1965 19662016-07-15 Cesar Philippidis <cesar@codesourcery.com> 1967 1968 * c-parser.c (c_parser_oacc_declare): Don't scan for 1969 GOMP_MAP_POINTER. 1970 * c-typeck.c (handle_omp_array_sections): Mark data clauses with 1971 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having 1972 zero-length subarrays. 1973 19742016-07-15 Jakub Jelinek <jakub@redhat.com> 1975 1976 PR c/71858 1977 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME 1978 instead of FUZZY_LOOKUP_NAME. 1979 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider 1980 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros. 1981 19822016-07-14 Jakub Jelinek <jakub@redhat.com> 1983 1984 PR c/71858 1985 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible. 1986 19872016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> 1988 1989 * c-parser.c (c_parser_generic_selection): Make type of variable 1990 auto_vec. 1991 (c_parser_omp_declare_simd): Likewise. 1992 19932016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> 1994 1995 * c-decl.c (struct c_struct_parse_info): Change member types 1996 from vec to auto_vec. 1997 (start_struct): Adjust. 1998 (finish_struct): Likewise. 1999 20002016-07-02 Jakub Jelinek <jakub@redhat.com> 2001 2002 PR c/71719 2003 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR. 2004 20052016-06-29 Thomas Schwinge <thomas@codesourcery.com> 2006 2007 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>: 2008 Move pragma context checking into... 2009 (c_parser_omp_cancellation_point): ... here, and improve 2010 diagnostic messages. 2011 * c-typeck.c (c_finish_omp_cancel) 2012 (c_finish_omp_cancellation_point): Improve diagnostic messages. 2013 20142016-06-29 Jakub Jelinek <jakub@redhat.com> 2015 2016 PR c/71685 2017 * c-typeck.c (c_build_qualified_type): Don't clear 2018 C_TYPE_INCOMPLETE_VARS for the main variant. 2019 20202016-06-28 Martin Sebor <msebor@redhat.com> 2021 2022 PR c/71552 2023 * c-typeck.c (output_init_element): Diagnose incompatible types 2024 before non-constant initializers. 2025 20262016-06-28 Jakub Jelinek <jakub@redhat.com> 2027 2028 * Make-lang.in: Don't cat ../stage_current if it does not exist. 2029 20302016-06-23 Andi Kleen <ak@linux.intel.com> 2031 2032 * Make-lang.in: Add support for autofdo. 2033 20342016-06-22 David Malcolm <dmalcolm@redhat.com> 2035 2036 PR c/70339 2037 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h. 2038 (implicit_decl_warning): When issuing warnings for implicit 2039 declarations, attempt to provide a suggestion via 2040 lookup_name_fuzzy. 2041 (undeclared_variable): Likewise when issuing errors. 2042 (lookup_name_in_scope): Likewise. 2043 (struct edit_distance_traits<cpp_hashnode *>): New struct. 2044 (best_macro_match): New typedef. 2045 (find_closest_macro_cpp_cb): New function. 2046 (lookup_name_fuzzy): New function. 2047 * c-parser.c: Include gcc-rich-location.h. 2048 (c_token_starts_typename): Split out case CPP_KEYWORD into... 2049 (c_keyword_starts_typename): ...this new function. 2050 (c_parser_declaration_or_fndef): When issuing errors about 2051 missing "struct" etc, add a fixit. For other kinds of errors, 2052 attempt to provide a suggestion via lookup_name_fuzzy. 2053 (c_parser_parms_declarator): When looking ahead to detect typos in 2054 type names, also reject CPP_KEYWORD. 2055 (c_parser_parameter_declaration): When issuing errors about 2056 unknown type names, attempt to provide a suggestion via 2057 lookup_name_fuzzy. 2058 * c-tree.h (c_keyword_starts_typename): New prototype. 2059 20602016-06-20 Joseph Myers <joseph@codesourcery.com> 2061 2062 PR c/71601 2063 * c-typeck.c (build_conditional_expr): Return error_mark_node if 2064 c_common_type returns error_mark_node. 2065 20662016-06-19 Martin Sebor <msebor@redhat.com> 2067 2068 PR c/69507 2069 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing 2070 __alignof__ (expression). 2071 20722016-06-14 David Malcolm <dmalcolm@redhat.com> 2073 2074 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h. 2075 20762016-06-14 David Malcolm <dmalcolm@redhat.com> 2077 2078 * c-typeck.c (build_component_ref): Simplify fixit code by 2079 using gcc_rich_location::add_fixit_misspelled_id. 2080 (set_init_label): Likewise. 2081 20822016-06-13 David Malcolm <dmalcolm@redhat.com> 2083 2084 * c-parser.c (c_parser_initelt): Provide location of name for new 2085 location_t param of set_init_label. 2086 * c-tree.h (set_init_label): Add location_t param. 2087 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t 2088 param and use it when issuing error messages about unrecognized 2089 field names. Attempt to provide a fixit hint if appropriate, 2090 otherwise update the error message to provide the type name. 2091 20922016-06-10 Thomas Schwinge <thomas@codesourcery.com> 2093 2094 PR c/71381 2095 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>: 2096 Loosen checking. 2097 20982016-06-08 Martin Sebor <msebor@redhat.com> 2099 Jakub Jelinek <jakub@redhat.com> 2100 2101 PR c++/70507 2102 PR c/68120 2103 * c-typeck.c (convert_arguments): Don't promote last argument 2104 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P. 2105 21062016-06-08 Marek Polacek <polacek@redhat.com> 2107 2108 PR c/71418 2109 * c-decl.c (grokdeclarator): Check TYPE_P. 2110 2111 PR c/71426 2112 * c-decl.c (get_parm_info): Don't crash on an assert on invalid 2113 code. 2114 21152016-06-07 David Malcolm <dmalcolm@redhat.com> 2116 2117 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof 2118 and structure element reference, capture the location of the 2119 element name token and pass it to build_component_ref. 2120 (c_parser_postfix_expression_after_primary): Likewise for 2121 structure element dereference. 2122 (c_parser_omp_variable_list): Likewise for 2123 OMP_CLAUSE_{_CACHE, MAP, FROM, TO}, 2124 * c-tree.h (build_component_ref): Add location_t param. 2125 * c-typeck.c (build_component_ref): Add location_t param 2126 COMPONENT_LOC. Use it, if available, when issuing hints about 2127 mispelled member names to provide a fixit replacement hint. 2128 21292016-06-06 Marek Polacek <polacek@redhat.com> 2130 2131 PR c/71362 2132 * c-parser.c (c_parser_direct_declarator): Set location. 2133 21342016-06-06 Marek Polacek <polacek@redhat.com> 2135 2136 * c-typeck.c (comptypes_internal): Handle comparisons of 2137 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check 2138 TYPE_REF_CAN_ALIAS_ALL. 2139 21402016-06-03 Chung-Lin Tang <cltang@codesourcery.com> 2141 2142 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction 2143 arguments as addressable when async clause exists. 2144 21452016-05-30 Jakub Jelinek <jakub@redhat.com> 2146 2147 PR c++/71349 2148 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause 2149 when combined with target construct. 2150 21512016-05-26 Jakub Jelinek <jakub@redhat.com> 2152 2153 * c-parser.c (c_parser_omp_clause_schedule): Warn if 2154 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive. 2155 21562016-05-25 Marek Polacek <polacek@redhat.com> 2157 2158 PR c/71265 2159 * c-decl.c (c_make_fname_decl): Don't check seen_error. 2160 2161 PR c/71266 2162 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs. 2163 21642016-05-24 Cesar Philippidis <cesar@codesourcery.com> 2165 2166 * c-parser.c (c_parser_oacc_declare): Add support for 2167 GOMP_MAP_FIRSTPRIVATE_POINTER. 2168 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp 2169 argument with enum c_omp_region_type ort. 2170 (handle_omp_array_sections): Likewise. Update call to 2171 handle_omp_array_sections_1. 2172 (c_finish_omp_clauses): Add specific errors and warning messages for 2173 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update 2174 call to handle_omp_array_sections. 2175 21762016-05-24 Thomas Schwinge <thomas@codesourcery.com> 2177 2178 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks. 2179 21802016-05-24 Richard Biener <rguenther@suse.de> 2181 2182 PR middle-end/70434 2183 PR c/69504 2184 * c-typeck.c (build_array_ref): Do not complain about indexing 2185 non-lvalue vectors. Adjust for function name change. 2186 21872016-05-20 Martin Sebor <msebor@redhat.com> 2188 2189 PR c/71115 2190 * c-typeck.c (error_init): Use 2191 expansion_point_location_if_in_system_header. 2192 (warning_init): Same. 2193 21942016-05-19 David Malcolm <dmalcolm@redhat.com> 2195 2196 PR c/71171 2197 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error 2198 in error-handling. 2199 (c_parser_postfix_expression): Likewise. 2200 * c-tree.h (c_expr::set_error): New method. 2201 * c-typeck.c (parser_build_binary_op): In error-handling, ensure 2202 that result's range is initialized. 2203 22042016-05-17 James Greenhalgh <james.greenhalgh@arm.com> 2205 2206 * c-typeck.c (parser_build_unary_op): Fix formatting. 2207 22082016-05-16 Matthew Wahab <matthew.wahab@arm.com> 2209 2210 * c-decl.c (grokdeclarator): Remove errmsg and use of 2211 targetm.invalid_return_type. 2212 (grokparms): Remove errmsg and use of 2213 targetm.invalid_parameter_type. 2214 22152016-05-13 Joseph Myers <joseph@codesourcery.com> 2216 2217 * c-decl.c (grokdeclarator): For C11, discard qualifiers on 2218 function return type. 2219 22202016-05-12 Marek Polacek <polacek@redhat.com> 2221 2222 PR c/70756 2223 * c-decl.c (build_compound_literal): Pass LOC down to 2224 c_incomplete_type_error. 2225 * c-tree.h (require_complete_type): Adjust declaration. 2226 (c_incomplete_type_error): Likewise. 2227 * c-typeck.c (require_complete_type): Add location parameter, pass it 2228 down to c_incomplete_type_error. 2229 (c_incomplete_type_error): Add location parameter, pass it down to 2230 error_at. 2231 (build_component_ref): Pass location down to c_incomplete_type_error. 2232 (default_conversion): Pass location down to require_complete_type. 2233 (build_array_ref): Likewise. 2234 (build_function_call_vec): Likewise. 2235 (convert_arguments): Likewise. 2236 (build_unary_op): Likewise. 2237 (build_c_cast): Likewise. 2238 (build_modify_expr): Likewise. 2239 (convert_for_assignment): Likewise. 2240 (c_finish_omp_clauses): Likewise. 2241 22422016-05-11 Mikhail Maltsev <maltsevm@gmail.com> 2243 2244 PR c/43651 2245 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier 2246 is enabled. 2247 * c-errors.c (pedwarn_c90): Return true if warned. 2248 * c-tree.h (pedwarn_c90): Change return type to bool. 2249 (enum c_declspec_word): Add new enumerator cdw_atomic. 2250 22512016-05-11 Marek Polacek <polacek@redhat.com> 2252 2253 PR c++/71024 2254 * c-decl.c (diagnose_mismatched_decls): Factor out code to 2255 diagnose_mismatched_attributes and call it. 2256 22572016-05-10 Marek Polacek <polacek@redhat.com> 2258 2259 PR c/70255 2260 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute 2261 on a declaration following the definition. 2262 22632016-05-05 Jakub Jelinek <jakub@redhat.com> 2264 2265 * c-parser.c (c_parser_switch_statement): Add IF_P argument, 2266 parse it through to c_parser_c99_block_statement. 2267 (c_parser_statement_after_labels): Adjust c_parser_switch_statement 2268 caller. 2269 22702016-05-04 Marek Polacek <polacek@redhat.com> 2271 2272 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with 2273 OPT_Wdangling_else. 2274 22752016-05-04 Marek Polacek <polacek@redhat.com> 2276 2277 PR c/48778 2278 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings 2279 for macro expansions. 2280 22812016-05-03 Marek Polacek <polacek@redhat.com> 2282 2283 PR c/70859 2284 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to 2285 check_builtin_function_arguments. 2286 22872016-05-03 Richard Biener <rguenther@suse.de> 2288 2289 * Make-lang.in (cc1-checksum.c): For stage-final re-use 2290 the checksum from the previous stage. 2291 22922016-05-02 Cesar Philippidis <cesar@codesourcery.com> 2293 2294 * c-parser.c (c_parser_oacc_all_clauses): Update call to 2295 c_finish_omp_clauses. 2296 (c_parser_omp_all_clauses): Likewise. 2297 (c_parser_oacc_cache): Likewise. 2298 (c_parser_oacc_loop): Likewise. 2299 (omp_split_clauses): Likewise. 2300 (c_parser_omp_declare_target): Likewise. 2301 (c_parser_cilk_all_clauses): Likewise. 2302 (c_parser_cilk_for): Likewise. 2303 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments 2304 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort. 2305 23062016-05-02 Marek Polacek <polacek@redhat.com> 2307 2308 PR c/70851 2309 * c-decl.c (grokdeclarator): Diagnose when array's size has an 2310 incomplete type. 2311 23122016-04-29 Cesar Philippidis <cesar@codesourcery.com> 2313 2314 PR middle-end/70626 2315 * c-parser.c (c_parser_oacc_loop): Don't augment mask with 2316 OACC_LOOP_CLAUSE_MASK. 2317 (c_parser_oacc_kernels_parallel): Update call to 2318 c_oacc_split_loop_clauses. 2319 23202016-04-28 Andrew MacLeod <amacleod@redhat.com> 2321 2322 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final 2323 argument to build_modify_expr in two cases. 2324 23252016-04-27 Bernd Schmidt <bschmidt@redhat.com> 2326 2327 * c-parser.c (c_parser_postfix_expression_after_primary): Call 2328 warn_for_memset instead of warning directly here. 2329 23302016-04-26 Marek Polacek <polacek@redhat.com> 2331 2332 PR c/67784 2333 * c-parser.c (c_parser_maybe_reclassify_token): New function factored 2334 out of ... 2335 (c_parser_for_statement): ... here. 2336 (c_parser_if_statement): Use it. 2337 (c_parser_switch_statement): Use it. 2338 (c_parser_while_statement): Use it. 2339 2340 PR c/70791 2341 * c-decl.c (pushdecl): Pass LOCUS down to warning. 2342 23432016-04-20 Ilya Verbin <ilya.verbin@intel.com> 2344 2345 PR c++/69363 2346 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses 2347 instead of c_finish_cilk_clauses. 2348 * c-tree.h (c_finish_omp_clauses): Add new default argument. 2349 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow 2350 floating-point variables in the linear clause for Cilk Plus. 2351 23522016-04-18 Michael Matz <matz@suse.de> 2353 2354 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN. 2355 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN. 2356 23572016-04-15 Marek Polacek <polacek@redhat.com> 2358 2359 PR c/70671 2360 * c-typeck.c (build_unary_op): Pass location down to error and 2361 warning call. 2362 23632016-04-15 Jakub Jelinek <jakub@redhat.com> 2364 2365 PR c/70436 2366 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down 2367 where needed. 2368 (c_parser_external_declaration, c_parser_struct_or_union_specifier, 2369 c_parser_parameter_declaration, c_parser_compound_statement_nostart, 2370 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist): 2371 Adjust c_parser_pragma callers. 2372 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for 2373 caller. 2374 (c_parser_omp_structured_block): Add IF_P argument, pass it down to 2375 c_parser_statement. 2376 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop, 2377 c_parser_oacc_kernels_parallel, c_parser_omp_critical, 2378 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master, 2379 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single, 2380 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute, 2381 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target, 2382 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize, 2383 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it 2384 down where needed. 2385 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces. 2386 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block 2387 calls. 2388 23892016-04-13 Marek Polacek <polacek@redhat.com> 2390 2391 PR c/70436 2392 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and 2393 adjust callers. 2394 (c_parser_statement): Likewise. 2395 (c_parser_c99_block_statement): Likewise. 2396 (c_parser_while_statement): Likewise. 2397 (c_parser_for_statement): Likewise. 2398 (c_parser_if_body): Don't set IF_P here. 2399 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn 2400 about dangling else here. 2401 * c-tree.h (c_finish_if_stmt): Adjust declaration. 2402 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't 2403 warn about dangling else here. 2404 24052016-04-04 Marek Polacek <polacek@redhat.com> 2406 2407 PR c/70307 2408 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR. 2409 24102016-03-31 Marek Polacek <polacek@redhat.com> 2411 2412 PR c/70297 2413 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN. 2414 24152016-03-18 David Malcolm <dmalcolm@redhat.com> 2416 2417 PR c/70281 2418 * c-parser.c (c_parser_postfix_expression): Set the source range 2419 for uses of "__builtin_types_compatible_p". 2420 24212016-03-17 Jakub Jelinek <jakub@redhat.com> 2422 2423 PR c/70280 2424 * c-typeck.c (composite_type): Don't count void_list_node 2425 into len, if the list is terminated by void_list_node, start 2426 with void_list_node instead of NULL for newargs. Stop 2427 at void_list_node. 2428 24292016-03-16 Marek Polacek <polacek@redhat.com> 2430 2431 PR c/70093 2432 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for 2433 nested functions returning VM types. 2434 24352016-03-09 Cesar Philippidis <cesar@codesourcery.com> 2436 2437 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses 2438 when calling c_finish_omp_clauses. 2439 24402016-03-04 Bernd Schmidt <bschmidt@redhat.com> 2441 2442 PR c/69824 2443 * c-decl.c (get_parm_info): Don't queue implicit function declarations 2444 for later. 2445 24462016-03-04 Marek Polacek <polacek@redhat.com> 2447 2448 PR c/69798 2449 * c-parser.c (c_parser_postfix_expression): Call 2450 c_parser_cast_expression rather than c_parser_postfix_expression. 2451 24522016-03-01 Jakub Jelinek <jakub@redhat.com> 2453 2454 PR c/69796 2455 PR c/69974 2456 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE 2457 of incomplete decls to error_mark_node. 2458 24592016-02-24 Marek Polacek <polacek@redhat.com> 2460 2461 PR c/69819 2462 * c-decl.c (finish_decl): Don't update the copy of the type of a 2463 different decl type. 2464 24652016-02-23 Jakub Jelinek <jakub@redhat.com> 2466 2467 PR objc/69844 2468 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes 2469 in id_kind reclassification. 2470 24712016-02-16 Jakub Jelinek <jakub@redhat.com> 2472 2473 PR c/69835 2474 * c-typeck.c (build_binary_op): Revert 2015-09-09 change. 2475 24762016-02-16 James Norris <jnorris@codesourcery.com> 2477 2478 PR c/64748 2479 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms. 2480 24812016-02-12 Bernd Schmidt <bschmidt@redhat.com> 2482 2483 * c-decl.c (build_null_declspecs): Zero the entire struct. 2484 2485 PR c/69522 2486 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All 2487 callers changed. If nested_p is true, use it to call 2488 finish_implicit_inits. 2489 * c-tree.h (finish_implicit_inits): Declare. 2490 * c-typeck.c (finish_implicit_inits): New function. Move code 2491 from ... 2492 (push_init_level): ... here. 2493 (set_designator, process_init_element): Call finish_implicit_inits. 2494 24952016-02-11 Jakub Jelinek <jakub@redhat.com> 2496 2497 PR c/69768 2498 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop 2499 arguments for -Waddress warning. 2500 25012016-02-04 Jakub Jelinek <jakub@redhat.com> 2502 2503 PR c/69669 2504 * c-decl.c (finish_enum): When honoring mode attribute, 2505 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE. 2506 25072016-01-29 Jakub Jelinek <jakub@redhat.com> 2508 2509 PR debug/69518 2510 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in 2511 all type variants, not just TYPE_MAIN_VARIANT. 2512 25132016-01-27 Jakub Jelinek <jakub@redhat.com> 2514 2515 PR debug/66869 2516 * c-decl.c (c_write_global_declarations_1): Warn with 2517 warn_unused_function if static prototype without definition 2518 is not C_DECL_USED. 2519 25202016-01-27 Marek Polacek <polacek@redhat.com> 2521 2522 PR c/68062 2523 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand 2524 to unsigned, if needed. Add -Wsign-compare warning. 2525 25262016-01-26 Jakub Jelinek <jakub@redhat.com> 2527 2528 PR tree-optimization/69483 2529 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT. 2530 25312016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> 2532 2533 PR c/24293 2534 * c-tree.h (incomplete_record_decls): Declare. 2535 * c-parser.c (incomplete_record_decls): Define. 2536 (c_parser_translation_unit): Iterate through incomplete_record_decls and 2537 report error if any decl has zero size. 2538 * c-decl.c (finish_decl): Append static decl with incomplete struct/union 2539 or enum type to incomplete_record_decls. 2540 25412016-01-14 Tom de Vries <tom@codesourcery.com> 2542 2543 PR tree-optimization/68773 2544 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't 2545 set force_output. 2546 25472016-01-14 Marek Polacek <polacek@redhat.com> 2548 2549 PR c/69262 2550 * c-decl.c (grokdeclarator): Provide more information for invalid 2551 array declarations. 2552 25532016-01-06 David Malcolm <dmalcolm@redhat.com> 2554 2555 * c-parser.c (c_parser_unary_expression): For dereferences, build 2556 a combined location before calling build_indirect_ref, so that 2557 error reports cover the full range, manually updating the c_expr 2558 src_range. 2559 25602016-01-06 Marek Polacek <polacek@redhat.com> 2561 2562 PR sanitizer/69099 2563 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to 2564 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of 2565 NULL. 2566 25672016-01-04 Jakub Jelinek <jakub@redhat.com> 2568 2569 Update copyright years. 2570 25712016-01-04 Marek Polacek <polacek@redhat.com> 2572 2573 PR c/68908 2574 * c-typeck.c (build_atomic_assign): Improve commentary. Add 2575 optimization to use __atomic_fetch_* built-in if possible. 2576 25772015-12-23 Thomas Schwinge <thomas@codesourcery.com> 2578 2579 * c-parser.c (c_parser_oacc_clause_use_device): Merge function 2580 into... 2581 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust 2582 all users. 2583 25842015-12-22 Marek Polacek <polacek@redhat.com> 2585 2586 PR c/69002 2587 * c-typeck.c (build_component_ref): Warn when acessing elements of 2588 atomic structures or unions. 2589 25902015-12-21 David Malcolm <dmalcolm@redhat.com> 2591 2592 * c-typeck.c: Include "gcc-rich-location.h". 2593 (build_binary_op): In the two places that call binary_op_error, 2594 create a gcc_rich_location and populate it with the location of 2595 the binary op and its two operands. 2596 25972015-12-16 David Malcolm <dmalcolm@redhat.com> 2598 2599 * c-parser.c (c_parser_statement_after_labels): When calling 2600 c_finish_return, Use the return expression's location if it has 2601 one, falling back to the location of the first token within it. 2602 * c-typeck.c (c_finish_return): When issuing warnings about 2603 the incorrect presence/absence of a return value, issue a note 2604 showing the declaration of the function. 2605 26062015-12-16 David Malcolm <dmalcolm@redhat.com> 2607 2608 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2 2609 to 4. 2610 (c_parser_peek_nth_token): New function. 2611 (c_parser_peek_conflict_marker): New function. 2612 (c_parser_error): Detect conflict markers and report them as such. 2613 26142015-12-16 David Malcolm <dmalcolm@redhat.com> 2615 2616 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC 2617 to preserve range information for the primary expression 2618 in the call to c_parser_postfix_expression_after_primary. 2619 26202015-12-16 David Malcolm <dmalcolm@redhat.com> 2621 2622 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the 2623 expression location, falling back on the first token location, 2624 rather than always using the latter. 2625 26262015-12-16 Marek Polacek <polacek@redhat.com> 2627 2628 PR c/64637 2629 * c-typeck.c (c_process_expr_stmt): Use location of the expression if 2630 available. 2631 26322015-12-15 Marek Polacek <polacek@redhat.com> 2633 2634 PR c/68907 2635 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an 2636 artificial decl. 2637 26382015-12-08 David Malcolm <dmalcolm@redhat.com> 2639 2640 * c-parser.c (c_parser_alignof_expression): Capture location of 2641 closing parenthesis (if any), or of end of unary expression, and 2642 use it to build a src_range for the expression. 2643 26442015-12-08 David Malcolm <dmalcolm@redhat.com> 2645 2646 PR c/68757 2647 * c-parser.c (c_parser_get_builtin_args): Add 2648 "out_close_paren_loc" param, and write back to it. 2649 (c_parser_postfix_expression): Capture the closing 2650 parenthesis location for RID_CHOOSE_EXPR, 2651 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX, 2652 RID_BUILTIN_SHUFFLE and use it to set the source range 2653 for such expressions; within RID_BUILTIN_COMPLEX set 2654 the underlying location. 2655 26562015-12-07 Marek Polacek <polacek@redhat.com> 2657 2658 PR c/68668 2659 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use 2660 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT. 2661 26622015-12-04 Eric Botcazou <ebotcazou@adacore.com> 2663 2664 * c-tree.h (c_build_va_arg): Adjust prototype. 2665 * c-parser.c (c_parser_postfix_expression): Adjust call to above. 2666 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1 2667 parameter, adjust throughout and issue an error if EXPR is a component 2668 with reverse storage order. 2669 26702015-12-02 Jason Merrill <jason@redhat.com> 2671 2672 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold) 2673 (c_fully_fold_internal, decl_constant_value_for_optimization): 2674 Move from c-common.c. 2675 * c-tree.h: Declare decl_constant_value_for_optimization. 2676 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o. 2677 26782015-12-02 Joseph Myers <joseph@codesourcery.com> 2679 2680 PR c/68162 2681 * c-decl.c (grokdeclarator): Set first_non_attr_kind before 2682 following link from declarator to next declarator. Track original 2683 qualified type and pass it to c_build_qualified_type. 2684 * c-typeck.c (c_build_qualified_type): Add arguments 2685 orig_qual_type and orig_qual_indirect. 2686 26872015-12-02 Thomas Schwinge <thomas@codesourcery.com> 2688 2689 * c-parser.c (c_parser_omp_clause_name) 2690 (c_parser_oacc_all_clauses): Alphabetical sorting. 2691 26922015-12-02 Jakub Jelinek <jakub@redhat.com> 2693 2694 PR c/68533 2695 * c-decl.c (get_parm_info): Use b->locus instead of input_location 2696 for diagnostics. 2697 26982015-12-01 Julian Brown <julian@codesourcery.com> 2699 Cesar Philippidis <cesar@codesourcery.com> 2700 James Norris <James_Norris@mentor.com> 2701 2702 * c-parser.c (c_parser_omp_clause_name): Add use_device support. 2703 (c_parser_oacc_clause_use_device): New function. 2704 (c_parser_oacc_all_clauses): Add use_device support. 2705 (OACC_HOST_DATA_CLAUSE_MASK): New macro. 2706 (c_parser_oacc_host_data): New function. 2707 (c_parser_omp_construct): Add host_data support. 2708 * c-tree.h (c_finish_oacc_host_data): Add prototype. 2709 * c-typeck.c (c_finish_oacc_host_data): New function. 2710 (c_finish_omp_clauses): Add use_device support. 2711 27122015-11-29 Jan Hubicka <hubicka@ucw.cz> 2713 2714 PR c/67106 2715 * c-decl.c: Set TYPE_PACKED in variants. 2716 27172015-11-27 Martin Liska <mliska@suse.cz> 2718 2719 PR c++/68312 2720 * c-array-notation.c (fix_builtin_array_notation_fn): 2721 Use release_vec_vec instead of vec::release. 2722 (build_array_notation_expr): Likewise. 2723 (fix_conditional_array_notations_1): Likewise. 2724 (fix_array_notation_expr): Likewise. 2725 (fix_array_notation_call_expr): Likewise. 2726 27272015-11-27 Jakub Jelinek <jakub@redhat.com> 2728 2729 PR c/63326 2730 * c-parser.c (c_parser_compound_statement_nostart): If 2731 last_label is true, use pragma_stmt instead of pragma_compound 2732 as second c_parser_pragma argument. 2733 (c_parser_omp_ordered, c_parser_omp_target_update, 2734 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass 2735 false as second argument to c_parser_skip_to_pragma_eol after 2736 diagnosing standalone directives used in pragma_stmt context. 2737 27382015-11-24 Ilya Verbin <ilya.verbin@intel.com> 2739 2740 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING" 2741 with "if (ENABLE_OFFLOADING)". 2742 27432015-11-23 David Malcolm <dmalcolm@redhat.com> 2744 2745 PR objc/68438 2746 * c-parser.c (c_parser_postfix_expression): Set up source ranges 2747 for various Objective-C constructs: Class.name syntax, 2748 @selector(), @protocol(), @encode(), and [] message syntax. 2749 27502015-11-20 David Malcolm <dmalcolm@redhat.com> 2751 2752 PR 62314 2753 * c-typeck.c (should_suggest_deref_p): New function. 2754 (build_component_ref): Special-case POINTER_TYPE when 2755 generating a "not a structure of union" error message, and 2756 suggest a "->" rather than a ".", providing a fix-it hint. 2757 27582015-11-19 David Malcolm <dmalcolm@redhat.com> 2759 2760 * c-typeck.c (lookup_field_fuzzy): Move determination of closest 2761 candidate into a new function, find_closest_identifier. 2762 27632015-11-19 Marek Polacek <polacek@redhat.com> 2764 2765 PR c/68412 2766 * c-typeck.c (parser_build_binary_op): Properly handle 2767 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp. 2768 27692015-11-17 David Malcolm <dmalcolm@redhat.com> 2770 2771 * c-parser.c (set_c_expr_source_range): Bulletproof both 2772 overloaded implementations against NULL expr->value. 2773 (c_parser_braced_init): Set src_range for "ret" to a sane pair of 2774 values. 2775 (c_parser_unary_expression): Likewise when handling addresses of 2776 labels. 2777 (c_parser_postfix_expression): Likewise for statement expressions, 2778 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for 2779 __builtin_va_arg, and for __builtin_offset_of. 2780 (c_parser_postfix_expression_after_paren_type): Initialize expr's 2781 src_range using the range of the braced initializer. 2782 (c_parser_transaction_expression): Set src_range for "ret" to a 2783 sane pair of values. 2784 27852015-11-16 Kirill Yukhin <kirill.yukhin@intel.com> 2786 2787 * c-parser.c (c_finish_omp_declare_simd): Look for 2788 "simd" attribute as well. Update error message. 2789 27902015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> 2791 2792 * c-parser.c (c_parser_omp_declare_target): Adjust. 2793 27942015-11-14 Jakub Jelinek <jakub@redhat.com> 2795 2796 * c-typeck.c (c_finish_omp_clauses): Don't mark 2797 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable. 2798 27992015-11-14 Marek Polacek <polacek@redhat.com> 2800 2801 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout. 2802 * c-typeck.c: Likewise. 2803 28042015-11-13 David Malcolm <dmalcolm@redhat.com> 2805 2806 * c-decl.c (warn_defaults_to): Pass line_table to 2807 rich_location ctor. 2808 * c-errors.c (pedwarn_c99): Likewise. 2809 (pedwarn_c90): Likewise. 2810 * c-parser.c (set_c_expr_source_range): New functions. 2811 (c_token::get_range): New method. 2812 (c_token::get_finish): New method. 2813 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret 2814 based on the range from the start of the LHS to the end of the 2815 RHS. 2816 (c_parser_conditional_expression): Likewise, based on the range 2817 from the start of the cond.value to the end of exp2.value. 2818 (c_parser_binary_expression): Call set_c_expr_source_range on 2819 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR. 2820 (c_parser_cast_expression): Call set_c_expr_source_range on ret 2821 based on the cast_loc through to the end of the expr. 2822 (c_parser_unary_expression): Likewise, based on the 2823 op_loc through to the end of op. 2824 (c_parser_sizeof_expression) Likewise, based on the start of the 2825 sizeof token through to either the closing paren or the end of 2826 expr. 2827 (c_parser_postfix_expression): Likewise, using the token range, 2828 or from the open paren through to the close paren for 2829 parenthesized expressions. 2830 (c_parser_postfix_expression_after_primary): Likewise, for 2831 various kinds of expression. 2832 * c-tree.h (struct c_expr): Add field "src_range". 2833 (c_expr::get_start): New method. 2834 (c_expr::get_finish): New method. 2835 (set_c_expr_source_range): New decls. 2836 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range 2837 on ret for prefix unary ops. 2838 (parser_build_binary_op): Likewise, running from the start of 2839 arg1.value through to the end of arg2.value. 2840 28412015-11-13 Marek Polacek <polacek@redhat.com> 2842 2843 PR c/68320 2844 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs. 2845 28462015-11-13 David Malcolm <dmalcolm@redhat.com> 2847 2848 * c-typeck.c: Include spellcheck.h. 2849 (lookup_field_fuzzy_find_candidates): New function. 2850 (lookup_field_fuzzy): New function. 2851 (build_component_ref): If the field was not found, try using 2852 lookup_field_fuzzy and potentially offer a suggestion. 2853 28542015-11-12 James Norris <jnorris@codesourcery.com> 2855 Joseph Myers <joseph@codesourcery.com> 2856 2857 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE. 2858 (c_parser_omp_clause_name): Handle 'device_resident' clause. 2859 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT 2860 and PRAGMA_OMP_CLAUSE_LINK. 2861 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT 2862 and PRAGMA_OACC_CLAUSE_LINK. 2863 (OACC_DECLARE_CLAUSE_MASK): New definition. 2864 (c_parser_oacc_declare): New function. 2865 28662015-11-12 Marek Polacek <polacek@redhat.com> 2867 2868 PR c/67784 2869 * c-parser.c (c_parser_for_statement): Reclassify the token in 2870 a correct scope. 2871 28722015-11-11 Marek Polacek <polacek@redhat.com> 2873 2874 PR c/68107 2875 PR c++/68266 2876 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code 2877 checking the size of an array. 2878 28792015-11-11 Andrew MacLeod <amacleod@redhat.com> 2880 2881 * c-array-notation.c: Remove unused header files. 2882 * c-aux-info.c: Likewise. 2883 * c-convert.c: Likewise. 2884 * c-decl.c: Likewise. 2885 * c-errors.c: Likewise. 2886 * c-lang.c: Likewise. 2887 * c-objc-common.c: Likewise. 2888 * c-parser.c: Likewise. 2889 * c-typeck.c: Likewise. 2890 * gccspec.c: Likewise. 2891 28922015-11-09 Thomas Schwinge <thomas@codesourcery.com> 2893 Cesar Philippidis <cesar@codesourcery.com> 2894 James Norris <jnorris@codesourcery.com> 2895 Julian Brown <julian@codesourcery.com> 2896 Nathan Sidwell <nathan@codesourcery.com> 2897 2898 c/ 2899 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC 2900 routine arg. 2901 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine. 2902 (c_parser_pragma): Parse 'acc routine'. 2903 (OACC_ROUTINE_CLAUSE_MARK): Define. 2904 (c_parser_oacc_routine, (c_finish_oacc_routine): New. 2905 29062015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com> 2907 2908 PR debug/67192 2909 * c-typeck.c (c_finish_loop): For unconditional loops, set the 2910 location of the backward-goto to the start of the loop body. 2911 29122015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com> 2913 2914 PR debug/67192 2915 * c-parser.c (c_parser_while_statement): Finish the loop before 2916 parsing ahead for misleading indentation. 2917 (c_parser_for_statement): Likewise. 2918 29192015-11-08 Eric Botcazou <ebotcazou@adacore.com> 2920 2921 * c-decl.c (finish_struct): If the structure has reverse storage 2922 order, rewrite the type of array fields with scalar component. Call 2923 maybe_apply_pragma_scalar_storage_order on entry. 2924 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue 2925 errors on bit-fields and reverse SSO here and not... 2926 (c_mark_addressable): ...here. 2927 (output_init_element): Adjust call to initializer_constant_valid_p. 2928 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER. 2929 29302015-11-06 David Malcolm <dmalcolm@redhat.com> 2931 2932 * c-decl.c (warn_defaults_to): Update for change in signature 2933 of diagnostic_set_info. 2934 * c-errors.c (pedwarn_c99): Likewise. 2935 (pedwarn_c90): Likewise. 2936 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param 2937 for textinfo::set_location. 2938 29392015-11-05 Cesar Philippidis <cesar@codesourcery.com> 2940 Thomas Schwinge <thomas@codesourcery.com> 2941 James Norris <jnorris@codesourcery.com> 2942 2943 * c-parser.c (c_parser_omp_clause_name): Add support for 2944 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE. 2945 (c_parser_omp_clause_default): Add is_oacc argument. Handle 2946 default(none) in OpenACC. 2947 (c_parser_oacc_shape_clause): Allow pointer variables as gang static 2948 arguments. 2949 (c_parser_oacc_clause_tile): New function. 2950 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT, 2951 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE. 2952 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT, 2953 TILE}. 2954 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT. 2955 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE, 2956 FIRSTPRIVATE}. 2957 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default. 2958 (c_parser_oacc_update): Update the error message for missing clauses. 2959 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE 2960 and OMP_CLAUSE_INDEPENDENT. 2961 29622015-11-05 Marek Polacek <polacek@redhat.com> 2963 2964 PR c/68090 2965 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't 2966 deal with pre-evaluation on invalid types. 2967 29682015-11-05 Jakub Jelinek <jakub@redhat.com> 2969 Ilya Verbin <ilya.verbin@intel.com> 2970 2971 * c-parser.c: Include context.h and gimple-expr.h. 2972 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose 2973 monotonic together with nonmonotonic. 2974 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here. 2975 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause. 2976 (c_parser_omp_target_data, c_parser_omp_target_enter_data, 2977 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER. 2978 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit 2979 expressions on combined target teams before the target. 2980 (c_parser_omp_declare_target): If decl has "omp declare target" or 2981 "omp declare target link" attribute, and cgraph or varpool node already 2982 exists, then set corresponding flags. Call c_finish_omp_clauses 2983 in the parenthesized extended-list syntax case. 2984 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside 2985 declare target. 2986 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound 2987 on OMP_CLAUSE_REDUCTION array sections. 2988 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either 2989 into the constant offset, or for variable low-bound using 2990 POINTER_PLUS_EXPR. For structure element based array sections use 2991 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER. 2992 (c_finish_omp_clauses): Drop generic_field_head, structure 2993 elements are now always mapped even as array section bases, 2994 diagnose same var in data sharing and mapping clauses. Diagnose if 2995 linear step on declare simd is neither a constant nor a uniform 2996 parameter. Look through POINTER_PLUS_EXPR for array section 2997 reductions. Diagnose the same var or function appearing multiple 2998 times on the same directive. Fix up wording for the to clause if t 2999 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic 3000 modifier on kinds other than dynamic or guided or nonmonotonic 3001 modifier together with ordered clause. 3002 30032015-11-03 Thomas Schwinge <thomas@codesourcery.com> 3004 Chung-Lin Tang <cltang@codesourcery.com> 3005 3006 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC. 3007 30082015-10-29 Andrew MacLeod <amacleod@redhat.com> 3009 3010 * c-array-notation.c: Reorder #include's and remove duplicates. 3011 * c-aux-info.c: Likewise. 3012 * c-convert.c: Likewise. 3013 * c-decl.c: Likewise. 3014 * c-errors.c: Likewise. 3015 * c-lang.c: Likewise. 3016 * c-objc-common.c: Likewise. 3017 * c-parser.c: Likewise. 3018 * c-typeck.c: Likewise. 3019 30202015-10-26 Jim Wilson <jim.wilson@linaro.org> 3021 3022 PR debug/66068 3023 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS 3024 after calling build_qualified_type. 3025 30262015-10-27 Cesar Philippidis <cesar@codesourcery.com> 3027 Thomas Schwinge <thomas@codesourcery.com> 3028 James Norris <jnorris@codesourcery.com> 3029 Joseph Myers <joseph@codesourcery.com> 3030 Julian Brown <julian@codesourcery.com> 3031 Bernd Schmidt <bschmidt@redhat.com> 3032 3033 * c-parser.c (c_parser_oacc_shape_clause): New. 3034 (c_parser_oacc_simple_clause): New. 3035 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker. 3036 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq. 3037 30382015-10-27 Thomas Schwinge <thomas@codesourcery.com> 3039 James Norris <jnorris@codesourcery.com> 3040 Cesar Philippidis <cesar@codesourcery.com> 3041 3042 PR c/64765 3043 PR c/64880 3044 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal 3045 parameters, and handle these. Adjust all users. 3046 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions 3047 into... 3048 (c_parser_oacc_kernels_parallel): ... this new function. Adjust 3049 all users. 3050 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't 3051 declare functions. 3052 (c_finish_omp_construct): Declare function. 3053 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels): 3054 Merge functions into... 3055 (c_finish_omp_construct): ... this new function. 3056 30572015-10-22 Richard Biener <rguenther@suse.de> 3058 3059 * c-typeck.c (c_finish_omp_clauses): Properly convert operands 3060 before folding a MINUS_EXPR. 3061 30622015-10-21 Marek Polacek <polacek@redhat.com> 3063 3064 PR c/68024 3065 * c-decl.c (start_function): Warn about vararg functions without 3066 a prototype. 3067 30682015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com> 3069 3070 * c-typeck.c (build_conditional_expr): Use boolean vector 3071 type for vector comparison. 3072 (build_vec_cmp): New. 3073 (build_binary_op): Use build_vec_cmp for comparison. 3074 30752015-10-20 Marek Polacek <polacek@redhat.com> 3076 3077 * c-parser.c (is_cilkplus_vector_p): Don't define here. 3078 30792015-10-20 Marek Polacek <polacek@redhat.com> 3080 3081 PR c/67964 3082 * c-parser.c (c_parser_attributes): Break out of the loop if the 3083 token after an attribute isn't a comma. 3084 30852015-10-13 Jakub Jelinek <jakub@redhat.com> 3086 Aldy Hernandez <aldyh@redhat.com> 3087 3088 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here. 3089 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses. 3090 (c_parser_omp_variable_list): Handle structure elements for 3091 map, to and from clauses. Handle array sections in reduction 3092 clause. Formatting fixes. 3093 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of 3094 if clause modifiers. 3095 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize, 3096 c_parser_omp_clause_priority, c_parser_omp_clause_hint, 3097 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr, 3098 c_parser_omp_clause_is_device_ptr): New functions. 3099 (c_parser_omp_clause_ordered): Parse optional parameter. 3100 (c_parser_omp_clause_reduction): Handle array reductions. 3101 (c_parser_omp_clause_schedule): Parse optional simd modifier. 3102 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New 3103 functions. 3104 (c_parser_omp_clause_linear): Parse linear clause modifiers. 3105 (c_parser_omp_clause_depend_sink): New function. 3106 (c_parser_omp_clause_depend): Parse source/sink depend kinds. 3107 (c_parser_omp_clause_map): Parse release/delete map kinds and 3108 optional always modifier. 3109 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if 3110 and c_finish_omp_clauses callers. 3111 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses. 3112 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive. 3113 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller. 3114 (OMP_CRITICAL_CLAUSE_MASK): Define. 3115 (c_parser_omp_critical): Parse critical clauses. 3116 (c_parser_omp_for_loop): Handle doacross loops, adjust 3117 c_finish_omp_for and c_finish_omp_clauses callers. 3118 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause. 3119 (c_parser_omp_simd): Allow ordered clause if it has no parameter. 3120 (OMP_FOR_CLAUSE_MASK): Add linear clause. 3121 (c_parser_omp_for): Disallow ordered clause when combined with 3122 distribute. Disallow linear clause when combined with distribute 3123 and not combined with simd. 3124 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define. 3125 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument, 3126 parse clauses and if depend clause is found, don't parse a body. 3127 (c_parser_omp_parallel): Disallow copyin clause on target parallel. 3128 Allow target parallel without for after it. 3129 (OMP_TASK_CLAUSE_MASK): Add priority clause. 3130 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause. 3131 (c_parser_omp_target_data): Diagnose no map clauses or clauses with 3132 invalid kinds. 3133 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses. 3134 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK, 3135 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define. 3136 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New 3137 functions. 3138 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate, 3139 defaultmap and is_device_ptr clauses. 3140 (c_parser_omp_target): Parse target parallel and target simd. Set 3141 OMP_TARGET_COMBINED on combined constructs. Parse target enter data 3142 and target exit data. Diagnose invalid map kinds. 3143 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define. 3144 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this 3145 construct. 3146 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for 3147 &omp_priv. 3148 (OMP_TASKLOOP_CLAUSE_MASK): Define. 3149 (c_parser_omp_taskloop): New function. 3150 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here, 3151 handle PRAGMA_OMP_TASKLOOP. 3152 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers. 3153 * c-tree.h (c_finish_omp_clauses): Add two new arguments. 3154 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo. 3155 Add IS_OMP argument, handle structure element bases, diagnose 3156 bitfields, pass IS_OMP recursively, diagnose known zero length 3157 array sections in depend clauses, handle array sections in reduction 3158 clause, diagnose negative length even for pointers. 3159 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for 3160 types, pass IS_OMP down to handle_omp_array_sections_1, handle 3161 array sections in reduction clause, set 3162 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero 3163 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP. 3164 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments. 3165 Handle new OpenMP 4.5 clauses and new restrictions for the old ones. 3166 31672015-10-06 Marek Polacek <polacek@redhat.com> 3168 3169 * c-parser.c (c_parser_statement_after_labels): Use 3170 protected_set_expr_location. 3171 (c_parser_omp_clause_num_gangs): Likewise. 3172 (c_parser_omp_clause_num_threads): Likewise. 3173 (c_parser_omp_clause_num_workers): Likewise. 3174 (c_parser_omp_clause_vector_length): Likewise. 3175 (c_parser_omp_clause_num_teams): Likewise. 3176 (c_parser_omp_clause_thread_limit): Likewise. 3177 * c-typeck.c (build_c_cast): Likewise. 3178 (c_cast_expr): Likewise. 3179 31802015-10-05 Richard Sandiford <richard.sandiford@arm.com> 3181 3182 * c-typeck.c (c_tree_equal): Use real_equal instead of 3183 REAL_VALUES_EQUAL. 3184 31852015-10-04 Jason Merrill <jason@redhat.com> 3186 3187 * c-parser.c (c_lex_one_token): Handle @synchronized. 3188 * c-decl.c (match_builtin_function_types): A declaration of a built-in 3189 can change whether the function is transaction_safe. 3190 31912015-10-02 Marek Polacek <polacek@redhat.com> 3192 3193 PR c/67730 3194 * c-typeck.c (convert_for_assignment): Use the expansion point 3195 location throughout. 3196 31972015-10-02 Marek Polacek <polacek@redhat.com> 3198 3199 PR c/64249 3200 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter 3201 and pass it down to c_parser_if_statement. 3202 (c_parser_else_body): Add CHAIN parameter and pass it down to 3203 c_parser_statement_after_labels. 3204 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about 3205 duplicated if-else-if conditions. 3206 32072015-10-01 Marek Polacek <polacek@redhat.com> 3208 3209 * c-typeck.c (convert_for_assignment): Improve commentary. 3210 32112015-09-30 Marek Polacek <polacek@redhat.com> 3212 3213 PR c/67730 3214 * c-typeck.c (c_finish_return): Use the expansion point location for 3215 certain "return with value" warnings. 3216 32172015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org> 3218 3219 * c-parser.c (pragma_lex): Add loc argument. 3220 32212015-09-15 Marek Polacek <polacek@redhat.com> 3222 3223 PR c/67580 3224 * c-decl.c (tag_exists_p): New function. 3225 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when 3226 struct/union/enum keywords are missing. 3227 * c-tree.h (tag_exists_p): Declare. 3228 32292015-09-15 Marek Polacek <polacek@redhat.com> 3230 3231 * c-decl.c (lookup_label): Return NULL_TREE instead of 0. 3232 (lookup_tag): Change the type of THISLEVEL_ONLY to bool. 3233 Return NULL_TREE instead of 0. 3234 (lookup_name): Return NULL_TREE instead of 0. 3235 (lookup_name_in_scope): Likewise. 3236 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0. 3237 (parser_xref_tag): Use false instead of 0. 3238 (start_struct): Use true instead of 1. 3239 (start_enum): Use true instead of 1 and NULL_TREE instead of 0. 3240 32412015-09-14 Marek Polacek <polacek@redhat.com> 3242 3243 * c-typeck.c (set_nonincremental_init_from_string): Use 3244 HOST_WIDE_INT_M1U when shifting a negative value. 3245 32462015-09-09 Mark Wielaard <mjw@redhat.com> 3247 3248 * c-typeck.c (build_binary_op): Check and warn when nonnull arg 3249 parm against NULL. 3250 32512015-09-10 Jakub Jelinek <jakub@redhat.com> 3252 3253 PR c/67502 3254 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts 3255 into OMP_FOR_PRE_BODY rather than before the loop. 3256 32572015-09-09 Jakub Jelinek <jakub@redhat.com> 3258 3259 PR c/67501 3260 * c-parser.c (c_parser_oacc_all_clauses, 3261 c_parser_omp_all_clauses): Remove invalid clause from 3262 list of clauses even if parser->error is set. 3263 3264 PR c/67500 3265 * c-parser.c (c_parser_omp_clause_aligned, 3266 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up 3267 test for errors. 3268 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to 3269 error_mark_node. 3270 3271 PR c/67495 3272 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression 3273 instead of c_parser_unary_expression. If the result is !lvalue_p, 3274 wrap the result of c_fully_fold into NON_LVALUE_EXPR. 3275 32762015-09-04 Marek Polacek <polacek@redhat.com> 3277 3278 PR sanitizer/67279 3279 * c-typeck.c (build_binary_op): Don't instrument static initializers. 3280 32812015-09-03 Martin Sebor <msebor@redhat.com> 3282 3283 PR c/66516 3284 * c-typeck.c (convert_arguments, parser_build_unary_op, 3285 build_conditional_expr, c_cast_expr, convert_for_assignment, 3286 build_binary_op, _objc_common_truthvalue_conversion): Call 3287 reject_gcc_builtin. 3288 (c_decl_implicit): Define. 3289 32902015-09-02 Marek Polacek <polacek@redhat.com> 3291 3292 PR c/67432 3293 * c-parser.c (c_parser_enum_specifier): Give a better error for 3294 an empty enum. 3295 32962015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org> 3297 3298 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs. 3299 33002015-08-12 Marek Polacek <polacek@redhat.com> 3301 3302 * c-decl.c (grokdeclarator): Call error_at instead of error and pass 3303 LOC to it. 3304 33052015-08-03 Marek Polacek <polacek@redhat.com> 3306 3307 PR c/67088 3308 * c-decl.c (check_bitfield_type_and_width): Add location parameter. 3309 Use it. 3310 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width. 3311 33122015-08-02 Patrick Palka <ppalka@gcc.gnu.org> 3313 3314 * c-parser.c (c_parser_if_body): Take token_indent_info 3315 argument. Call warn_for_misleading_indentation even when the 3316 body is a semicolon. Extract token_indent_infos corresponding 3317 to the guard, body and next tokens. Adjust call to 3318 warn_for_misleading_indentation accordingly. 3319 (c_parser_else_body): Likewise. 3320 (c_parser_if_statement): Likewise. 3321 (c_parser_while_statement): Likewise. 3322 (c_parser_for_statement): Likewise. 3323 33242015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com> 3325 Manuel López-Ibáñez <manu@gcc.gnu.org> 3326 3327 * c-decl.c (get_parm_info): Remove static var. Update warning 3328 message. 3329 33302015-07-27 Marek Polacek <polacek@redhat.com> 3331 3332 PR c++/66555 3333 PR c/54979 3334 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp. 3335 33362015-07-20 Marek Polacek <polacek@redhat.com> 3337 3338 PR c++/55095 3339 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init. 3340 (build_binary_op): Warn about left shift overflows. 3341 33422015-07-09 Andrew MacLeod <amacleod@redhat.com> 3343 3344 * c-array-notation.c: Adjust includes for flags.h changes. 3345 * c-objc-common.c: Likewise. 3346 33472015-07-07 Andrew MacLeod <amacleod@redhat.com> 3348 3349 * c-array-notation.c: Adjust includes. 3350 * c-aux-info.c: Likewise. 3351 * c-convert.c: Likewise. 3352 * c-decl.c: Likewise. 3353 * c-errors.c: Likewise. 3354 * c-lang.c: Likewise. 3355 * c-objc-common.c: Likewise. 3356 * c-parser.c: Likewise. 3357 * c-typeck.c: Likewise. 3358 33592015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org> 3360 3361 PR fortran/66605 3362 * c-decl.c (finish_function): Call do_warn_unused_parameter. 3363 33642015-06-29 Marek Polacek <polacek@redhat.com> 3365 3366 PR c/66322 3367 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P. 3368 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn 3369 about -Wswitch-bool here. 3370 (do_case): Update c_add_case_label call. 3371 (c_finish_case): Update c_do_switch_warnings call. 3372 33732015-06-27 Marek Polacek <polacek@redhat.com> 3374 3375 * c-typeck.c: Use VECTOR_TYPE_P throughout. 3376 33772015-06-26 Marek Polacek <polacek@redhat.com> 3378 3379 * c-array-notation.c (fix_builtin_array_notation_fn): Use 3380 INDIRECT_REF_P. 3381 * c-typeck.c (array_to_pointer_conversion): Likewise. 3382 (build_unary_op): Likewise. 3383 (c_finish_return): Likewise. 3384 33852015-06-25 Andrew MacLeod <amacleod@redhat.com> 3386 3387 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list. 3388 * c-parser.c: Likewise. 3389 33902015-06-25 Richard Sandiford <richard.sandiford@arm.com> 3391 3392 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash 3393 instead of pointer_hash. 3394 (detect_field_duplicates): Likewise. 3395 33962015-06-25 Marek Polacek <polacek@redhat.com> 3397 3398 * c-array-notation.c: Use VAR_P throughout. 3399 * c-decl.c: Likewise. 3400 * c-objc-common.c: Likewise. 3401 * c-parser.c: Likewise. 3402 * c-typeck.c: Likewise. 3403 34042015-06-25 Marek Polacek <polacek@redhat.com> 3405 3406 * c-decl.c: Use is_global_var throughout. 3407 * c-parser.c: Likewise. 3408 * c-typeck.c: Likewise. 3409 34102015-06-17 Andrew MacLeod <amacleod@redhat.com> 3411 3412 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h. 3413 * c-aux-info.c: Likewise. 3414 * c-convert.c: Likewise. 3415 * c-decl.c: Likewise. 3416 * c-errors.c: Likewise. 3417 * c-lang.c: Likewise. 3418 * c-objc-common.c: Likewise. 3419 * c-parser.c: Likewise. 3420 * c-typeck.c: Likewise. 3421 34222015-06-11 Jan Hubicka <hubicka@ucw.cz> 3423 3424 PR middle-end/66325 3425 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type 3426 variants. 3427 34282015-06-11 Pierre-Marie de Rodat <derodat@adacore.com> 3429 3430 * c-decl.c (pop_scope): Register the main translation unit 3431 through the new debug hook. 3432 34332015-06-08 Andrew MacLeod <amacleod@redhat.com> 3434 3435 * c-array-notation.c : Adjust include files. 3436 * c-aux-info.c : Likewise. 3437 * c-convert.c : Likewise. 3438 * c-decl.c : Likewise. 3439 * c-errors.c : Likewise. 3440 * c-lang.c : Likewise. 3441 * c-lang.h : Likewise. 3442 * c-objc-common.c : Likewise. 3443 * c-parser.c : Likewise. 3444 * c-typeck.c : Likewise. 3445 34462015-06-05 Aldy Hernandez <aldyh@redhat.com> 3447 3448 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and 3449 immediately clobber it. 3450 (c_write_global_declarations_1): Remove call to 3451 check_global_declaration_1. 3452 (c_write_global_declarations_2): Remove. 3453 (c_write_final_cleanups): Rename from c_write_global_declarations. 3454 Remove call to finalize_compilation_unit. 3455 Remove calls to debugging hooks. 3456 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl. 3457 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS. 3458 * c-tree.h: Remove c_write_global_declarations. 3459 34602015-06-04 Andrew MacLeod <amacleod@redhat.com> 3461 3462 * c-array-notation.c: Adjust includes for restructured coretypes.h. 3463 * c-aux-info.c: Likewise. 3464 * c-convert.c: Likewise. 3465 * c-decl.c: Likewise. 3466 * c-errors.c: Likewise. 3467 * c-lang.c: Likewise. 3468 * c-objc-common.c: Likewise. 3469 * c-parser.c: Likewise. 3470 * c-typeck.c: Likewise. 3471 34722015-06-04 Marek Polacek <polacek@redhat.com> 3473 3474 PR c/66341 3475 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if 3476 it is a lvalue. 3477 34782015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> 3479 3480 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc. 3481 Warn for empty struct. 3482 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct. 3483 34842015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com> 3485 3486 * c-decl.c (start_function): Call plugin before parsing. 3487 (finish_function): Call plugin after parsing. 3488 34892015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> 3490 3491 PR c/49551 3492 * c-decl.c (merge_decls): Merge DECL_COMMON. 3493 34942015-05-22 Jim Wilson <jim.wilson@linaro.org> 3495 3496 * Make-lang.in (check_gcc_pallelize): Define. 3497 34982015-05-22 Marek Polacek <polacek@redhat.com> 3499 3500 PR c/47043 3501 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator 3502 attributes. 3503 35042015-05-21 Marek Polacek <polacek@redhat.com> 3505 3506 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of 3507 DECL_BUILT_IN. 3508 35092015-05-20 Marek Polacek <polacek@redhat.com> 3510 3511 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout. 3512 * c-typeck.c: Likewise. 3513 35142015-05-19 Marek Polacek <polacek@redhat.com> 3515 3516 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P. 3517 35182015-05-19 Jakub Jelinek <jakub@redhat.com> 3519 3520 PR middle-end/66199 3521 * c-parser.c (c_parser_omp_for_loop): Don't add 3522 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving 3523 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES. 3524 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined 3525 constructs. 3526 35272015-05-19 Mikhail Maltsev <maltsevm@gmail.com> 3528 3529 * c-typeck.c (build_array_ref): Use std::swap instead of explicit 3530 swaps. 3531 35322015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org> 3533 3534 PR fortran/44054 3535 * c-objc-common.c (c_tree_printer): Replace locus pointer with 3536 accessor function. 3537 35382015-05-14 Marek Polacek <polacek@redhat.com> 3539 3540 PR c/66066 3541 PR c/66127 3542 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic 3543 rather than with 0. 3544 35452015-05-12 David Malcolm <dmalcolm@redhat.com> 3546 3547 * c-parser.c (c_parser_if_body): Add param "if_loc", use it 3548 to add a call to warn_for_misleading_indentation. 3549 (c_parser_else_body): Likewise, adding param "else_loc". 3550 (c_parser_if_statement): Check for misleading indentation. 3551 (c_parser_while_statement): Likewise. 3552 (c_parser_for_statement): Likewise. 3553 35542015-05-08 Marek Polacek <polacek@redhat.com> 3555 3556 PR c/64918 3557 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects. 3558 (output_init_element): Likewise. 3559 35602015-05-07 Marek Polacek <polacek@redhat.com> 3561 3562 PR c/65179 3563 * c-typeck.c (build_binary_op): Warn when left shifting a negative 3564 value. 3565 35662015-04-30 Marek Polacek <polacek@redhat.com> 3567 3568 * c-typeck.c (set_init_label): Call error_at instead of error and 3569 pass LOC to it. 3570 3571 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print 3572 the type of a decl. 3573 3574 * c-typeck.c (c_build_va_arg): Clarify the error message. 3575 35762015-04-29 Thomas Schwinge <thomas@codesourcery.com> 3577 3578 * c-parser.c (c_parser_oacc_enter_exit_data): Use 3579 OMP_STANDALONE_CLAUSES. 3580 35812015-04-28 Marek Polacek <polacek@redhat.com> 3582 3583 * c-parser.c (c_parser_binary_expression): Remove duplicate line. 3584 35852015-04-28 Marek Polacek <polacek@redhat.com> 3586 3587 PR c/65901 3588 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type. 3589 35902015-04-25 Marek Polacek <polacek@redhat.com> 3591 3592 PR c/52085 3593 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode" 3594 attribute. 3595 35962015-04-23 Marek Polacek <polacek@redhat.com> 3597 3598 PR c/65345 3599 * c-decl.c (set_labels_context_r): New function. 3600 (store_parm_decls): Call it via walk_tree_without_duplicates. 3601 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw 3602 instead of create_tmp_var. Build TARGET_EXPR instead of 3603 COMPOUND_EXPR. 3604 (build_atomic_assign): Use create_tmp_var_raw instead of 3605 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR. 3606 36072015-04-20 Ilya Verbin <ilya.verbin@intel.com> 3608 3609 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon. 3610 (c_parser_omp_target_update): Add missed %> to error_at (). 3611 36122015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org> 3613 3614 PR target/55143 3615 * c-decl.c (c_default_pointer_mode): Remove definition. 3616 * c-tree.h (c_default_pointer_mode): Remove declaration. 3617 36182015-03-27 Tobias Burnus <burnus@net-b.de> 3619 3620 PR c/65586 3621 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't 3622 error out. 3623 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute, 3624 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare): 3625 Update calls to not error for skipped omp pragmas with -fopenmp-simd. 3626 36272015-03-19 Jakub Jelinek <jakub@redhat.com> 3628 3629 * c-decl.c (c_decl_attributes): Also add "omp declare target" 3630 attribute for DECL_EXTERNAL VAR_DECLs. 3631 36322015-03-11 Jakub Jelinek <jakub@redhat.com> 3633 3634 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier 3635 argument. 3636 36372015-03-10 Jakub Jelinek <jakub@redhat.com> 3638 3639 PR c/65120 3640 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison 3641 before preparing arguments to warn_logical_not_parentheses. 3642 36432015-03-09 Jakub Jelinek <jakub@redhat.com> 3644 3645 PR c/65120 3646 * c-typeck.c (parser_build_binary_op): Don't warn for 3647 !!x == y or !b == y where b is _Bool. 3648 36492015-03-09 Marek Polacek <polacek@redhat.com> 3650 3651 * c-convert.c (convert): Make use of do_ubsan_in_current_function. 3652 * c-decl.c (grokdeclarator): Likewise. 3653 * c-typeck.c (build_binary_op): Likewise. 3654 36552015-02-27 Marek Polacek <polacek@redhat.com> 3656 3657 PR c/65228 3658 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node. 3659 36602015-02-14 Marek Polacek <polacek@redhat.com> 3661 3662 PR c/64768 3663 * c-decl.c (grokdeclarator): Set the range of a flexible array member 3664 declared through a typedef name. 3665 36662015-02-13 Marek Polacek <polacek@redhat.com> 3667 3668 PR c/65050 3669 * c-decl.c (grokdeclarator): Print also the type when giving 3670 the error message about array's incomplete element type. 3671 36722015-02-11 Jakub Jelinek <jakub@redhat.com> 3673 3674 PR c/64824 3675 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec 3676 check in the POP macro. 3677 36782015-02-09 Marek Polacek <polacek@redhat.com> 3679 3680 PR c/64856 3681 * c-typeck.c (process_init_element): Don't always wrap 3682 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when 3683 initializing a range of elements. 3684 36852015-02-04 Jakub Jelinek <jakub@redhat.com> 3686 3687 PR c/64824 3688 PR c/64868 3689 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR. 3690 36912015-02-02 Bruno Loff <bruno.loff@gmail.com> 3692 3693 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after 3694 processing enum declaration. 3695 36962015-01-29 Marek Polacek <polacek@redhat.com> 3697 3698 PR c/64709 3699 * c-typeck.c (pop_init_level): If constructor_elements has 3700 exactly one element with integer_zerop value, set constructor_zeroinit 3701 to 1. Remove braces around warning_init call. 3702 37032015-01-27 Jakub Jelinek <jakub@redhat.com> 3704 3705 PR c/64766 3706 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL 3707 of FUNCTION_DECLs with error_mark_node. 3708 37092015-01-26 Jakub Jelinek <jakub@redhat.com> 3710 3711 PR c/64778 3712 * c-typeck.c (convert_arguments): Return -1 if there are 3713 error_args, even if we've diagnosed too many arguments. 3714 37152015-01-21 Richard Biener <rguenther@suse.de> 3716 3717 PR middle-end/64313 3718 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p 3719 for builtins the user declared correctly. 3720 37212015-01-15 Thomas Schwinge <thomas@codesourcery.com> 3722 Bernd Schmidt <bernds@codesourcery.com> 3723 Cesar Philippidis <cesar@codesourcery.com> 3724 James Norris <jnorris@codesourcery.com> 3725 Jakub Jelinek <jakub@redhat.com> 3726 Ilmir Usmanov <i.usmanov@samsung.com> 3727 3728 * c-parser.c: Include "gomp-constants.h". 3729 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum 3730 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. 3731 Use OMP_CLAUSE_SET_MAP_KIND. 3732 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA, 3733 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE. 3734 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE, 3735 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, 3736 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT. 3737 (c_parser_omp_clause_name): Handle "auto", "async", "copy", 3738 "copyout", "create", "delete", "deviceptr", "gang", "host", 3739 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy", 3740 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout", 3741 "present_or_create", "pcreate", "seq", "self", "vector", 3742 "vector_length", "wait", "worker". 3743 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK) 3744 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK) 3745 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK) 3746 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros. 3747 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_. 3748 (c_parser_oacc_wait_list, c_parser_oacc_data_clause) 3749 (c_parser_oacc_data_clause_deviceptr) 3750 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers) 3751 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait) 3752 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses) 3753 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels) 3754 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop) 3755 (c_parser_oacc_parallel, c_parser_oacc_update) 3756 (c_parser_oacc_wait): New functions. 3757 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels) 3758 (c_finish_oacc_data): New prototypes. 3759 * c-typeck.c: Include "gomp-constants.h". 3760 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use 3761 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use 3762 OMP_CLAUSE_SET_MAP_KIND. 3763 (c_finish_oacc_parallel, c_finish_oacc_kernels) 3764 (c_finish_oacc_data): New functions. 3765 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_, 3766 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS, 3767 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT, 3768 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG, 3769 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's 3770 GOMP_MAP_FORCE_DEVICEPTR. 3771 37722015-01-09 Michael Collison <michael.collison@linaro.org> 3773 3774 * c-array-notation.c: Include hash-set.h, machmode.h, 3775 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h 3776 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h. 3777 * c-aux-info.c: Ditto. 3778 * c-convert.c: Ditto. 3779 * c-decl.c: Ditto. 3780 * c-errors.c: Ditto. 3781 * c-lang.c: Dittoxs. 3782 * c-objc-common.c: Ditto. 3783 * c-parser.c: Ditto. 3784 * c-typeck.c: Include hash-set.h, machmode.h, 3785 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h 3786 fold-const.h, wide-int.h, inchash.h, real.h and 3787 fixed-value.h due to flattening of tree.h. 3788 37892015-01-07 Marek Polacek <polacek@redhat.com> 3790 3791 PR c/64417 3792 * c-typeck.c (process_init_element): Disallow initialization of 3793 a flexible array member with a string constant if the structure 3794 is in an array. 3795 37962015-01-05 Jakub Jelinek <jakub@redhat.com> 3797 3798 PR sanitizer/64344 3799 * c-typeck.c (convert_for_assignment, c_finish_return): For 3800 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum 3801 types also set in_late_binary_op around convert call. 3802 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE 3803 to integral type casts, if not in_late_binary_op, pass c_fully_fold 3804 result on expr as last argument to ubsan_instrument_float_cast, 3805 if in_late_binary_op, don't use c_save_expr but save_expr. 3806 3807 Update copyright years. 3808 38092015-01-05 Marek Polacek <polacek@redhat.com> 3810 3811 PR c/64423 3812 * c-typeck.c (build_array_ref): Pass loc down to 3813 warn_array_subscript_with_type_char. 3814 38152014-12-20 Martin Uecker <uecker@eecs.berkeley.edu> 3816 3817 * c-typeck.c: New behavious for pointers to arrays with qualifiers 3818 (common-pointer-type): For pointers to arrays take qualifiers from 3819 element type. 3820 (build_conditional_expr): Add warnings for lost qualifiers. 3821 (comp-target-types): Allow pointers to arrays with different qualifiers. 3822 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add 3823 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS 3824 to PEDWARN_FOR_QUALIFIERS. 3825 38262014-12-17 Jakub Jelinek <jakub@redhat.com> 3827 3828 PR sanitizer/64289 3829 * c-convert.c: Include ubsan.h. 3830 (convert): For real -> integral casts and 3831 -fsanitize=float-cast-overflow don't call convert_to_integer, but 3832 instead instrument the float cast directly. 3833 38342014-11-29 Jakub Jelinek <jakub@redhat.com> 3835 3836 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign, 3837 c_finish_stmt_expr): Remove NULL last argument from 3838 create_tmp_var_raw and create_tmp_var calls. 3839 * c-array-notation.c (fix_builtin_array_notation_fn, 3840 build_array_notation_expr, fix_conditional_array_notations_1, 3841 fix_array_notation_expr, fix_array_notation_call_expr): Likewise. 3842 38432014-11-28 Marek Polacek <polacek@redhat.com> 3844 3845 PR c/63862 3846 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't 3847 convert the right operand to integer type. 3848 38492014-11-25 Marek Polacek <polacek@redhat.com> 3850 3851 PR c/63877 3852 * c-decl.c (start_function): Disable -Wmissing-declarations warning 3853 for inline functions. 3854 38552014-11-21 Jakub Jelinek <jakub@redhat.com> 3856 3857 PR target/63764 3858 * c-typeck.c (build_array_ref): Adjust 3859 convert_vector_to_pointer_for_subscript caller. If it returns true, 3860 call non_lvalue_loc on the result. 3861 38622014-11-11 Richard Biener <rguenther@suse.de> 3863 3864 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues 3865 to true. 3866 38672014-11-10 Andi Kleen <ak@linux.intel.com> 3868 3869 PR c/60804 3870 * c-parser.c (c_parser_statement_after_labels): Call 3871 check_no_cilk. 3872 (c_parser_if_statement): Dito. 3873 (c_parser_switch_statement): Dito. 3874 (c_parser_while_statement): Dito. 3875 (c_parser_do_statement): Dito. 3876 (c_parser_for_statement): Dito. 3877 * c-typeck.c (c_finish_loop): Dito. 3878 38792014-11-10 Paolo Carlini <paolo.carlini@oracle.com> 3880 3881 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and 3882 OPT_Wshift_count_overflow in the warnings. 3883 38842014-10-30 Marek Polacek <polacek@redhat.com> 3885 3886 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name, 3887 print the stripped version as well, if they're not the same. 3888 38892014-10-29 Richard Sandiford <richard.sandiford@arm.com> 3890 3891 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from 3892 machine_mode. 3893 38942014-10-28 Andrew MacLeod <amacleod@redhat.com> 3895 3896 * c-decl.c: Adjust include files. 3897 * c-parser.c: Ditto. 3898 38992014-10-27 Phil Muldoon <pmuldoon@redhat.com> 3900 Tom Tromey <tromey@redhat.com> 3901 3902 * c-tree.h (enum c_oracle_request): New. 3903 (c_binding_oracle_function): New typedef. 3904 (c_binding_oracle, c_pushtag, c_bind): Declare. 3905 * c-decl.c (c_binding_oracle): New global. 3906 (I_SYMBOL_CHECKED): New macro. 3907 (i_symbol_binding): New function. 3908 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine. 3909 (I_TAG_CHECKED): New macro. 3910 (i_tag_binding): New function. 3911 (I_TAG_BINDING, I_TAG_DECL): Redefine. 3912 (I_LABEL_CHECKED): New macro. 3913 (i_label_binding): New function. 3914 (I_LABEL_BINDING, I_LABEL_DECL): Redefine. 3915 (c_print_identifier): Save and restore c_binding_oracle. 3916 (c_pushtag, c_bind): New functions. 3917 39182014-10-27 Andrew MacLeod <amacleod@redhat.com> 3919 3920 * c-typeck.c: Adjust include files. 3921 39222014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org> 3923 3924 PR c++/53061 3925 * c-objc-common.c (c_objc_common_init): Do not do diagnostics 3926 initialization here... 3927 (c_initialize_diagnostics): ... but here. Set defaults after 3928 building pretty-printer. 3929 39302014-10-23 Marek Polacek <polacek@redhat.com> 3931 3932 PR c/63626 3933 * c-decl.c (pop_scope): Don't print warning in external_scope. 3934 39352014-10-19 Marek Polacek <polacek@redhat.com> 3936 3937 PR c/63567 3938 * c-typeck.c (output_init_element): Allow initializing objects with 3939 static storage duration with compound literals even in C99 and add 3940 pedwarn for it. 3941 39422014-10-17 Marek Polacek <polacek@redhat.com> 3943 3944 PR c/63567 3945 * c-typeck.c (digest_init): Allow initializing objects with static 3946 storage duration with compound literals even in C99 and add pedwarn 3947 for it. 3948 39492014-10-17 Marek Polacek <polacek@redhat.com> 3950 3951 PR c/63543 3952 * c-tree.h (C_TYPE_ERROR_REPORTED): Define. 3953 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..." 3954 error multiple times. Print the type. 3955 39562014-10-17 Marek Polacek <polacek@redhat.com> 3957 3958 PR c/63549 3959 * c-typeck.c (build_array_ref): Bail if the index in an incomplete 3960 type. 3961 39622014-10-17 Marek Polacek <polacek@redhat.com> 3963 3964 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally. 3965 (start_function): Use OPT_Wimplicit_int instead of 0. 3966 (store_parm_decls_oldstyle): Likewise. 3967 39682014-10-17 Alan Modra <amodra@gmail.com> 3969 3970 PR middle-end/61848 3971 * c-decl.c (merge_decls): Don't merge section name or tls model 3972 to newdecl symtab node, instead merge to olddecl. Override 3973 existing olddecl section name. Set tls_model for all thread-local 3974 vars, not just OMP thread-private ones. Remove incorrect comment. 3975 39762014-10-16 Andrew MacLeod <amacleod@redhat.com> 3977 3978 * c-decl.c: Adjust include files. 3979 39802014-10-14 DJ Delorie <dj@redhat.com> 3981 3982 * c-parser.c (c_parse_init): Add RID entries for each __intN. 3983 (c_token_starts_typename): Check all __intN, not just __int128. 3984 (c_token_starts_declspecs): Likewise. 3985 (c_parser_declspecs): Likewise. 3986 (c_parser_attribute_any_word): Likewise. 3987 (c_parser_objc_selector): Likewise. 3988 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n. 3989 (struct c_declspecs): Add int_n_idx field to record *which* __intN 3990 is specified. 3991 * c-decl.c (declspecs_add_type): Check for all __intN, not just 3992 __int128. 3993 (finish_declspecs): Likewise. 3994 39952014-10-13 Anthony Brandon <anthony.brandon@gmail.com> 3996 3997 * c-parser.c (c_parser_all_labels): New function to replace 3998 the duplicate code. 3999 (c_parser_statement): Call the new function. 4000 40012014-10-09 Marek Polacek <polacek@redhat.com> 4002 4003 PR c/63480 4004 * c-typeck.c (pop_init_level): Don't warn about initializing 4005 with { }. 4006 40072014-10-07 Marek Polacek <polacek@redhat.com> 4008 4009 PR c/59717 4010 * c-decl.c (header_for_builtin_fn): New function. 4011 (implicitly_declare): Suggest which header to include. 4012 40132014-10-07 Marek Polacek <polacek@redhat.com> 4014 4015 * c-convert.c (convert): Use error_operand_p. 4016 * c-typeck.c (require_complete_type): Likewise. 4017 (really_atomic_lvalue): Likewise. 4018 (digest_init): Likewise. 4019 (handle_omp_array_sections_1): Likewise. 4020 40212014-10-03 Marek Polacek <polacek@redhat.com> 4022 4023 PR c/63453 4024 * c-decl.c (pop_scope): Don't warn about "inline function declared 4025 but never defined" for functions marked with gnu_inline attribute. 4026 40272014-09-25 Jakub Jelinek <jakub@redhat.com> 4028 4029 PR c++/63249 4030 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read 4031 on low_bound and length. 4032 40332014-09-24 Marek Polacek <polacek@redhat.com> 4034 4035 PR c/61405 4036 PR c/53874 4037 * c-parser.c: Don't define CPP_KEYWORD. 4038 (c_parser_switch_statement): Pass original type to c_finish_case. 4039 * c-tree.h (c_finish_case): Update declaration. 4040 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it 4041 conditionally to c_do_switch_warnings. 4042 40432014-09-03 Marek Polacek <polacek@redhat.com> 4044 4045 PR c/62024 4046 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op 4047 conversions. 4048 40492014-09-02 Jakub Jelinek <jakub@redhat.com> 4050 Balaji V. Iyer <balaji.v.iyer@intel.com> 4051 Igor Zamyatin <igor.zamyatin@intel.com> 4052 4053 * c-parser.c (c_parser_cilk_for): New function. 4054 (c_parser_cilk_grainsize): Likewise. 4055 (c_get_temp_regvar): Likewise. 4056 (c_parser_statement_after_labels): Added RID_CILK_FOR case. 4057 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case. 4058 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks. 4059 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_ 4060 case. 4061 40622014-08-27 Chen Gang <gang.chen.5i5j@gmail.com> 4063 4064 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes, 4065 with using HOST_WIDE_INT without truncation to 'int' 4066 40672014-08-22 Marek Polacek <polacek@redhat.com> 4068 4069 PR c++/62199 4070 * c-typeck.c (parser_build_binary_op): Adjust call to 4071 warn_logical_not_parentheses. 4072 40732014-08-22 Igor Zamyatin <igor.zamyatin@intel.com> 4074 4075 PR other/62008 4076 * c-parser.c (c_parser_array_notation): Check for correct 4077 type of an array added. 4078 40792014-08-19 Marek Polacek <polacek@redhat.com> 4080 4081 PR c++/62153 4082 * c-typeck.c (build_binary_op): If either operand of a comparison 4083 is a boolean expression, call maybe_warn_bool_compare. 4084 40852014-08-19 Patrick Palka <ppalka@gcc.gnu.org> 4086 4087 PR c/45584 4088 * c-typeck.c (build_c_cast): Do a conversion even when the 4089 TYPE_MAIN_VARIANTs are the same. 4090 40912014-08-19 Marek Polacek <polacek@redhat.com> 4092 4093 * c-decl.c (diagnose_mismatched_decls): Unconditionally call 4094 pedwarn_c99 instead of pedwarn. 4095 (grokfield): Likewise. 4096 (warn_defaults_to): New function. 4097 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99. 4098 Unconditionally call pedwarn_c99 instead of pedwarn. 4099 (start_function): Call warn_defaults_to instead of pedwarn_c99. 4100 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't 4101 check flag_isoc11 before. 4102 * c-errors.c (pedwarn_c99): Change the return type to bool. 4103 Handle -Wc99-c11-compat. 4104 * c-parser.c (disable_extension_diagnostics): Handle 4105 warn_c99_c11_compat. 4106 (restore_extension_diagnostics): Likewise. 4107 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99 4108 instead of pedwarn, don't check flag_isoc11 before. 4109 (c_parser_declspecs): Likewise. 4110 (c_parser_alignas_specifier): Likewise. 4111 (c_parser_alignof_expression): Likewise. 4112 (c_parser_generic_selection): Likewise. 4113 * c-tree.h (pedwarn_c99): Update declaration. 4114 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead 4115 of pedwarn_c99. 4116 41172014-08-19 Marek Polacek <polacek@redhat.com> 4118 4119 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally 4120 to pedwarn_c90. 4121 * c-errors.c: Include "opts.h". 4122 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better. 4123 * c-parser.c (disable_extension_diagnostics): Handle negative value 4124 of warn_c90_c99_compat, too. 4125 (restore_extension_diagnostics): Likewise. 4126 (c_parser_compound_statement_nostart): Pass 4127 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90. 4128 41292014-08-12 Marek Polacek <polacek@redhat.com> 4130 4131 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>: 4132 Add pedwarn. 4133 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>: 4134 Likewise. 4135 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise. 4136 41372014-08-10 Marek Polacek <polacek@redhat.com> 4138 4139 PR c/51849 4140 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99. 4141 Call pedwarn_c90 instead of pedwarn. 4142 (check_bitfield_type_and_width): Likewise. 4143 (declspecs_add_qual): Likewise. 4144 (declspecs_add_type): Likewise. 4145 (warn_variable_length_array): Unify function for -pedantic and -Wvla. 4146 Adjust to only call pedwarn_c90. 4147 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call 4148 pedwarn_c90 instead of pedwarn. 4149 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat. 4150 * c-parser.c (disable_extension_diagnostics): Handle 4151 warn_c90_c99_compat. 4152 (restore_extension_diagnostics): Likewise. 4153 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call 4154 pedwarn_c90 instead of pedwarn. 4155 (c_parser_initelt): Likewise. 4156 (c_parser_postfix_expression): Likewise. 4157 (c_parser_postfix_expression_after_paren_type): Likewise. 4158 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99. 4159 * c-tree.h: Fix formatting. 4160 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call 4161 pedwarn_c90 instead of pedwarn. 4162 41632014-08-07 Trevor Saunders <tsaunders@mozilla.com> 4164 4165 * c-typeck.c: Remove include of pointer-set.h. 4166 41672014-08-07 Marek Polacek <polacek@redhat.com> 4168 4169 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization. 4170 41712014-08-02 Trevor Saunders <tsaunders@mozilla.com> 4172 4173 * c-typeck.c: Use hash_map instead of pointer_map. 4174 41752014-08-02 Trevor Saunders <tsaunders@mozilla.com> 4176 4177 * c-decl.c: Use hash_set instead of pointer_set. 4178 41792014-08-01 Igor Zamyatin <igor.zamyatin@intel.com> 4180 4181 PR middle-end/61455 4182 * c-array-notation.c (expand_array_notations): Handling 4183 of DECL_EXPR added. 4184 41852014-07-31 Marc Glisse <marc.glisse@inria.fr> 4186 4187 PR c++/60517 4188 * c-typeck.c (c_finish_return): Return 0 instead of the address of 4189 a local variable. 4190 41912014-07-30 Tom Tromey <tromey@redhat.com> 4192 4193 * c-typeck.c (struct constructor_stack) <designator_depth>: New 4194 field. 4195 (really_start_incremental_init, push_init_level): Initialize 4196 designator_depth. 4197 (pop_init_level): Set global designator_depth. 4198 (process_init_element): Check for designated_init attribute. 4199 42002014-07-20 Marek Polacek <polacek@redhat.com> 4201 4202 PR c/61852 4203 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it. 4204 (implicitly_declare): Pass location to implicit_decl_warning. 4205 42062014-07-14 Jakub Jelinek <jakub@redhat.com> 4207 4208 PR middle-end/61294 4209 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask. 4210 If non-NULL, call c_parser_check_literal_zero. 4211 (c_parser_check_literal_zero): New function. 4212 (c_parser_postfix_expression_after_primary): Adjust 4213 c_parser_expr_list caller, handle -Wmemset-transposed-args. 4214 42152014-07-06 Marek Polacek <polacek@redhat.com> 4216 4217 PR c/6940 4218 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER. 4219 * c-tree.h (C_ARRAY_PARAMETER): Define. 4220 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array 4221 function parameter. 4222 42232014-07-02 Jan Hubicka <hubicka@ucw.cz> 4224 Chen Gang <gang.chen.5i5j@gmail.com> 4225 4226 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before 4227 releasing symbol. 4228 42292014-07-01 Marek Polacek <polacek@redhat.com> 4230 4231 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion 4232 instead of 0 to WARN_FOR_ASSIGNMENT. 4233 42342014-07-01 Marek Polacek <polacek@redhat.com> 4235 4236 PR c/58286 4237 * c-typeck.c (convert_for_assignment): Pass 4238 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT. 4239 42402014-06-30 Marek Polacek <polacek@redhat.com> 4241 4242 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function 4243 has no_sanitize_undefined attribute. 4244 42452014-06-30 Igor Zamyatin <igor.zamyatin@intel.com> 4246 4247 PR middle-end/57541 4248 * c-array-notation.c (fix_builtin_array_notation_fn): 4249 Check for 0 arguments in builtin call. Check that bultin argument is 4250 correct. 4251 * c-parser.c (c_parser_array_notation): Check for incorrect initial 4252 index. 4253 42542014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de> 4255 4256 * c-parser.c (c_parser_declaration_or_fndef): Discard all type 4257 qualifiers in __auto_type for atomic types. 4258 (c_parser_typeof_specifier): Discard all type qualifiers in 4259 __typeof__ for atomic types. 4260 42612014-06-25 Marek Polacek <polacek@redhat.com> 4262 4263 PR c/61162 4264 * c-parser.c (c_parser_statement_after_labels): Pass the location of 4265 the return expression to c_finish_return. 4266 42672014-06-25 Jakub Jelinek <jakub@redhat.com> 4268 4269 * c-typeck.c (c_finish_omp_clauses): Make sure 4270 OMP_CLAUSE_LINEAR_STEP has correct type. 4271 42722014-06-24 Trevor Saunders <tsaunders@mozilla.com> 4273 4274 * c-decl.c: Adjust. 4275 42762014-06-24 Jakub Jelinek <jakub@redhat.com> 4277 4278 * c-parser.c (c_parser_omp_for_loop): For 4279 #pragma omp parallel for simd move lastprivate clause from parallel 4280 to for rather than simd. 4281 42822014-06-23 Marek Polacek <polacek@redhat.com> 4283 4284 * c-typeck.c (parser_build_binary_op): Don't call 4285 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR. 4286 42872014-06-15 Jan Hubicka <hubicka@ucw.cz> 4288 4289 * c-parser.c (c_parser_omp_threadprivate): Likewise. 4290 * c-decl.c (merge_decls): Likewise. 4291 42922014-06-09 Marek Polacek <polacek@redhat.com> 4293 4294 PR c/36446 4295 * c-typeck.c (error_init): Call inform instead of error_at. 4296 (pedwarn_init): Call inform instead of pedwarn. 4297 (warning_init): Call inform instead of warning_at. 4298 42992014-06-07 Jan Hubicka <hubicka@ucw.cz> 4300 4301 * c-decl.c (merge_decls): Use set_decl_section_name. 4302 (duplicate_decls): Remove node if it exists. 4303 43042014-06-05 S. Gilles <sgilles@terpmail.umd.edu> 4305 4306 PR c/53119 4307 * c-typeck.c (push_init_level, process_init_element, 4308 pop_init_level): Correct check for zero initialization, move 4309 missing brace warning to respect zero initialization. 4310 43112014-06-05 Marek Polacek <polacek@redhat.com> 4312 4313 PR c/56724 4314 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass. 4315 43162014-06-05 Marek Polacek <polacek@redhat.com> 4317 4318 PR c/49706 4319 * c-typeck.c (parser_build_binary_op): Warn when logical not is used 4320 on the left hand side operand of a comparison. 4321 43222014-06-05 Marek Polacek <polacek@redhat.com> 4323 4324 PR c/48062 4325 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at. 4326 Print note only if the warning was printed. 4327 43282014-06-04 Igor Zamyatin <igor.zamyatin@intel.com> 4329 4330 PR c/58942 4331 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case 4332 with a pointer. 4333 43342014-06-03 Marek Polacek <polacek@redhat.com> 4335 4336 PR c/60439 4337 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to 4338 c_start_case. 4339 * c-tree.h (c_start_case): Update. 4340 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if 4341 switch condition has boolean value. 4342 43432014-06-02 Andrew MacLeod <amacleod@redhat.com> 4344 4345 * c-decl.c: Include builtins.h. 4346 * c-parser.c: Likewise. 4347 43482014-05-27 Marek Polacek <polacek@redhat.com> 4349 4350 PR c/56724 4351 * c-typeck.c (convert_arguments): Get location of a parameter. Change 4352 error and warning calls to error_at and warning_at. Pass location of 4353 a parameter to it. Call warning_at with OPT_Wtraditional_conversion. 4354 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and 4355 WARN_FOR_QUALIFIERS. Pass expr_loc to those. 4356 43572014-05-26 Igor Zamyatin <igor.zamyatin@intel.com> 4358 4359 PR c/61191 4360 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid 4361 function parameters. 4362 43632014-05-23 Jan Hubicka <hubicka@ucw.cz> 4364 4365 * c-decl.c (merge_decls): Preserve symtab node pointers. 4366 (duplicate_decls): Free new decl. 4367 43682014-05-23 Thomas Schwinge <thomas@codesourcery.com> 4369 4370 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable 4371 initialization. 4372 4373 * c-parser.c (c_parser_omp_target): Return bool values. 4374 43752014-05-22 Thomas Schwinge <thomas@codesourcery.com> 4376 4377 * c-parser.c (c_parser_omp_clause_thread_limit): Rename 4378 num_teams_loc variable to num_thread_limit_loc. 4379 43802014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com> 4381 4382 * c-array-notation.c (expand_array_notations): Use void_node 4383 instead of void_zero_node. 4384 43852014-05-17 Trevor Saunders <tsaunders@mozilla.com> 4386 4387 * c-decl.c (finish_struct): Adjust. 4388 (finish_enum): Likewise. 4389 (bind): Adjust. 4390 (record_inline_static): Likewise. 4391 (push_scope): Likewise. 4392 (make_label): Likewise. 4393 (lookup_label_for_goto): Likewise. 4394 (finish_struct): Likewise. 4395 (finish_enum): Likewise. 4396 (store_parm_decls): Likewise. 4397 (c_push_function_context): Likewise. 4398 * c-lang.h: Remove usage of variable_size gty attribute. 4399 * c-parser.c (c_parse_init): Adjust. 4400 (c_parse_file): Likewise. 4401 44022014-05-13 Marek Polacek <polacek@redhat.com> 4403 4404 PR c/61162 4405 * c-typeck.c (convert_for_assignment): Pass location to 4406 WARN_FOR_ASSIGNMENT instead of input_location. 4407 44082014-05-10 Marek Polacek <polacek@redhat.com> 4409 4410 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to 4411 maybe_warn_string_init. 4412 (c_parser_postfix_expression_after_paren_type): Pass type_loc to 4413 maybe_warn_string_init. 4414 * c-tree.h (maybe_warn_string_init): Update declaration. 4415 * c-typeck.c (maybe_warn_string_init): Add location parameter. 4416 Call pedwarn_init with loc instead of with input_location. 4417 (digest_init): Pass init_loc to maybe_warn_string_init. 4418 (pop_init_level): Call pedwarn_init with loc instead of with 4419 input_location. 4420 (set_init_index): Likewise. 4421 (process_init_element): Likewise. 4422 44232014-05-09 Marek Polacek <polacek@redhat.com> 4424 4425 PR c/61096 4426 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level. 4427 (c_parser_initelt): Pass location to set_init_label. Pass array index 4428 location to set_init_index. 4429 * c-tree.h (push_init_level): Update declaration. 4430 (pop_init_level): Likewise. 4431 (set_init_index): Likewise. 4432 (set_init_label): Likewise. 4433 * c-typeck.c (error_init): Add location parameter. Call error_at 4434 instead of error. 4435 (digest_init): Pass init_loc to error_init. 4436 (really_start_incremental_init): 4437 (push_init_level): Add location parameter. Pass loc to pop_init_level 4438 and error_init. 4439 (pop_init_level): Likewise. 4440 (set_designator): Add location parameter. Pass loc to pop_init_level, 4441 push_init_level, and error_init. 4442 (set_init_index): Add location parameter. Pass loc to error_init and 4443 set_designator. 4444 (set_init_label): Likewise. 4445 (output_init_element): Pass loc to error_init. 4446 (process_init_element): Pass loc to error_init, pop_init_level, 4447 pedwarn_init, and push_init_level. 4448 44492014-05-09 Marek Polacek <polacek@redhat.com> 4450 4451 PR c/50459 4452 * c-parser.c (c_parser_attributes): Parse the arguments as an 4453 expression-list if the attribute takes identifier. 4454 44552014-05-08 Marek Polacek <polacek@redhat.com> 4456 4457 PR c/61053 4458 * c-decl.c (grokdeclarator): Use min_align_of_type instead of 4459 TYPE_ALIGN_UNIT. 4460 44612014-05-08 Marek Polacek <polacek@redhat.com> 4462 4463 PR c/61077 4464 * c-decl.c (start_function): Warn for _Atomic-qualified return type 4465 of main. 4466 44672014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com> 4468 Mike Stump <mikestump@comcast.net> 4469 Richard Sandiford <rdsandiford@googlemail.com> 4470 4471 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN. 4472 (finish_enum): Use wide-int interfaces. 4473 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise. 4474 * c-typeck.c (build_c_cast): Likewise. 4475 (set_nonincremental_init_from_string): Likewise. 4476 (c_tree_equal): Likewise. 4477 44782014-05-02 Marek Polacek <polacek@redhat.com> 4479 4480 PR c/25801 4481 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error. 4482 Return size_one_node when the type is not complete. 4483 (pointer_diff): Remove comment. 4484 (build_unary_op): Improve error messages. 4485 44862014-05-02 Marek Polacek <polacek@redhat.com> 4487 4488 * c-typeck.c (c_finish_return): Separate warning_at calls. 4489 44902014-05-02 Marek Polacek <polacek@redhat.com> 4491 4492 * c-tree.h (error_init): Remove declaration. 4493 (pedwarn_init): Likewise. 4494 * c-typeck.c (error_init): Make static and move above. 4495 (pedwarn_init): Likewise. 4496 (warning_init): Move above. 4497 (maybe_warn_string_init): Likewise. 4498 44992014-05-01 Jeff Law <law@redhat.com> 4500 4501 Revert: 4502 4503 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com> 4504 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to 4505 avoid goto. 4506 45072014-05-02 Marek Polacek <polacek@redhat.com> 4508 4509 PR c/60784 4510 * c-typeck.c (push_init_level): Set constructor_designated to 4511 p->designated for structures. 4512 45132014-05-01 Marek Polacek <polacek@redhat.com> 4514 4515 PR c/60915 4516 * c-parser.c (c_parser_declaration_or_fndef): Give better error if 4517 function-definition has an attribute after the declarator. 4518 45192014-05-01 Marek Polacek <polacek@redhat.com> 4520 4521 PR c/60257 4522 * c-typeck.c (warning_init): Add location_t parameter. Call 4523 warning_at instead of warning. 4524 (push_init_level): Pass input_location to warning_init. 4525 (add_pending_init): Add location_t parameter. Pass loc to 4526 warning_init. 4527 (set_nonincremental_init): Pass input_location to add_pending_init. 4528 (set_nonincremental_init_from_string): Likewise. 4529 (output_init_element): Pass loc to warning_init and to 4530 add_pending_init. 4531 45322014-05-01 Marek Polacek <polacek@redhat.com> 4533 4534 PR c/43395 4535 * c-typeck.c (c_finish_return): Distinguish between label and variable 4536 when warning about returning local address. 4537 45382014-05-01 Marek Polacek <polacek@redhat.com> 4539 4540 PR c/29467 4541 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used 4542 in C89 mode. 4543 45442014-05-01 Marek Polacek <polacek@redhat.com> 4545 4546 PR c/43245 4547 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers 4548 instead of 0 to WARN_FOR_QUALIFIERS. 4549 45502014-05-01 Marek Polacek <polacek@redhat.com> 4551 4552 PR c/56989 4553 * c-typeck.c (default_conversion): Use better location for 4554 error call. 4555 45562014-04-30 Marek Polacek <polacek@redhat.com> 4557 4558 * c-typeck.c (build_binary_op): Call ubsan_instrument_division 4559 also when SANITIZE_FLOAT_DIVIDE is on. 4560 45612014-04-30 Marek Polacek <polacek@redhat.com> 4562 4563 PR c/60139 4564 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn 4565 and pedwarn_init. Use loc insted of input_location. 4566 45672014-04-30 Marek Polacek <polacek@redhat.com> 4568 4569 PR c/60351 4570 * c-typeck.c (build_binary_op): Use location when warning about 4571 shift count. 4572 45732014-04-25 Marek Polacek <polacek@redhat.com> 4574 4575 PR c/18079 4576 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched 4577 always_inline/noinline and hot/cold attributes. 4578 45792014-04-25 Marek Polacek <polacek@redhat.com> 4580 4581 PR c/60114 4582 * c-parser.c (c_parser_initelt): Pass input_location to 4583 process_init_element. 4584 (c_parser_initval): Pass loc to process_init_element. 4585 * c-tree.h (process_init_element): Adjust declaration. 4586 * c-typeck.c (push_init_level): Pass input_location to 4587 process_init_element. 4588 (pop_init_level): Likewise. 4589 (set_designator): Likewise. 4590 (output_init_element): Add location_t parameter. Pass loc to 4591 digest_init. 4592 (output_pending_init_elements): Pass input_location to 4593 output_init_element. 4594 (process_init_element): Add location_t parameter. Pass loc to 4595 output_init_element. 4596 45972014-04-24 Jakub Jelinek <jakub@redhat.com> 4598 4599 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before 4600 atomic-clause, allow comma in between atomic-clause and 4601 seq_cst. 4602 46032014-04-22 Jakub Jelinek <jakub@redhat.com> 4604 4605 PR c/59073 4606 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for 4607 fails, don't set OM_PARALLEL_COMBINED and return NULL. 4608 46092014-04-12 Igor Zamyatin <igor.zamyatin@intel.com> 4610 4611 PR middle-end/60469 4612 * c-array-notation.c (fix_builtin_array_notation_fn): Use 4613 create_tmp_var instead build_decl for creating temps. 4614 (build_array_notation_expr): Likewise. 4615 (fix_conditional_array_notations_1): Likewise. 4616 (fix_array_notation_expr): Likewise. 4617 (fix_array_notation_call_expr): Likewise. 4618 46192014-03-28 Jakub Jelinek <jakub@redhat.com> 4620 4621 PR c++/60689 4622 * c-tree.h (c_build_function_call_vec): New prototype. 4623 * c-typeck.c (build_function_call_vec): Don't call 4624 resolve_overloaded_builtin here. 4625 (c_build_function_call_vec): New wrapper function around 4626 build_function_call_vec. Call resolve_overloaded_builtin here. 4627 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign): 4628 Call c_build_function_call_vec instead of build_function_call_vec. 4629 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise. 4630 * c-decl.c (finish_decl): Likewise. 4631 46322014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org> 4633 4634 PR c/55383 4635 * c-typeck.c: Use correct format string in cast-qual warning 4636 46372014-03-07 Thomas Schwinge <thomas@codesourcery.com> 4638 4639 * c-decl.c (c_decl_attributes): Use 4640 lang_hooks.types.omp_mappable_type. 4641 * c-typeck.c (c_finish_omp_clauses): Likewise. 4642 46432014-03-06 Marek Polacek <polacek@redhat.com> 4644 4645 PR c/60197 4646 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead 4647 of checking tree code. 4648 46492014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com> 4650 4651 * c-parser.c (c_parser_declspecs): Replace call to error by error_at. 4652 (c_parser_parameter_declaration): Likewise. 4653 46542014-02-19 Marek Polacek <polacek@redhat.com> 4655 4656 PR c/60195 4657 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp. 4658 Call mark_exp_read on exp.value. 4659 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set 4660 TREE_ADDRESSABLE on old instead of val. 4661 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING. 4662 46632014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com> 4664 4665 * c-parser.c (c_parser_get_builtin_args): Replace calls to 4666 C_EXPR_APPEND by vec_safe_push. 4667 * c-tree.h (C_EXPR_APPEND): Remove. 4668 46692014-01-31 Marek Polacek <polacek@redhat.com> 4670 4671 PR c/59963 4672 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to 4673 build_function_call_vec. 4674 (build_function_call): Likewise. 4675 (build_atomic_assign): Likewise. 4676 (build_function_call_vec): Add arg_loc parameter. Use it. 4677 (convert_arguments): Likewise. 4678 (convert_for_assignment): Rename rhs_loc to expr_loc. 4679 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list. 4680 (c_parser_objc_keywordexpr): Likewise. 4681 (c_parser_postfix_expression_after_primary): Call 4682 build_function_call_vec with expr_loc rather than op_loc. 4683 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to 4684 build_function_call_vec. 4685 (c_parser_expr_list): Add locations parameter. Fill it with locations 4686 of function arguments. 4687 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec. 4688 46892014-01-30 Marek Polacek <polacek@redhat.com> 4690 4691 PR c/59940 4692 * c-typeck.c (build_function_call_vec): Use loc parameter. 4693 (convert_arguments): Add location parameter. Use it. 4694 (ep_convert_and_check): Likewise. 4695 (build_atomic_assign): Adjust convert_for_assignment call. 4696 (build_modify_expr): Likewise. 4697 (digest_init): Likewise. 4698 (c_finish_return): Likewise. 4699 (build_conditional_expr): Adjust ep_convert_and_check calls. 4700 (convert_for_assignment): Add rhs_loc parameter. Use it. 4701 (build_binary_op): Adjust convert_and_check and ep_convert_and_check 4702 calls. 4703 47042014-01-30 Richard Biener <rguenther@suse.de> 4705 4706 PR c/59905 4707 * c-typeck.c (build_function_call_vec): Do not replace calls 4708 to a function via an incompatible type with a runtime abort. 4709 47102014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com> 4711 4712 * c-parser.c (c_parser_declaration_or_fndef): Replaced 4713 flag_enable_cilkplus with flag_cilkplus. 4714 (c_parser_direct_declarator_inner): Likewise. 4715 (c_parser_attribute_any_word): Likewise. 4716 (c_parser_attributes): Likewise. 4717 (c_parser_compound_statement): Likewise. 4718 (c_parser_statement_after_labels): Likewise. 4719 (c_parser_if_statement): Likewise. 4720 (c_parser_switch_statement): Likewise. 4721 (c_parser_do_statement): Likewise. 4722 (c_parser_for_statement): Likewise. 4723 (c_parser_unary_expression): Likewise. 4724 (c_parser_postfix_expression): Likewise. 4725 (c_parser_postfix_expression_after_primary): Likewise. 4726 (c_parser_postfix_expression_after_primary): Likewise. 4727 (c_parser_omp_clause_name): Likewise. 4728 (c_finish_omp_declare_simd): Likewise. 4729 (c_parser_cilk_verify_simd): Likewise. 4730 * c-typeck.c (build_array_ref): Likewise. 4731 (build_function_call_vec): Likewise. 4732 (convert_arguments): Likewise. 4733 (build_compound_expr): Likewise. 4734 (c_finish_return): Likewise. 4735 (c_finish_if_stmt): Likewise. 4736 (c_finish_loop): Likewise. 4737 (build_binary_op): Likewise. 4738 47392014-01-23 Marek Polacek <polacek@redhat.com> 4740 4741 PR c/59846 4742 * c-typeck.c (parser_build_binary_op): Use location instead of 4743 input_location. 4744 (build_binary_op): Pass location to shorten_compare. 4745 47462014-01-23 Marek Polacek <polacek@redhat.com> 4747 4748 PR c/58346 4749 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to 4750 an empty aggregate. 4751 47522014-01-23 Marek Polacek <polacek@redhat.com> 4753 4754 PR c/59871 4755 * c-typeck.c (build_compound_expr): Warn even for right-hand operand 4756 of a comma expression. 4757 (emit_side_effect_warnings): Likewise. 4758 47592014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com> 4760 4761 PR c/59825 4762 * c-array-notation.c (expand_array_notation_exprs): Rewrote this 4763 function to use walk_tree and moved a lot of its functionality to 4764 expand_array_notations. 4765 (expand_array_notations): New function. 4766 47672014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com> 4768 4769 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function" 4770 attribute an attribute without value. 4771 47722014-01-23 Jakub Jelinek <jakub@redhat.com> 4773 4774 PR middle-end/58809 4775 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR, 4776 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs. 4777 47782014-01-22 Marek Polacek <polacek@redhat.com> 4779 4780 PR c/59891 4781 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead 4782 of remove_c_maybe_const_expr on op1 and op2. 4783 47842014-01-15 Jakub Jelinek <jakub@redhat.com> 4785 4786 PR c/58943 4787 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side 4788 effects, preevaluate rhs using SAVE_EXPR first. 4789 47902014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com> 4791 4792 PR c++/59631 4793 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if 4794 statements with if-elseif statements. 4795 47962014-01-06 Marek Polacek <polacek@redhat.com> 4797 4798 PR c/57773 4799 * c-decl.c (check_bitfield_type_and_width): Warn for implementation 4800 defined bit-field types only in ISO C. 4801 48022014-01-02 Richard Sandiford <rdsandiford@googlemail.com> 4803 4804 Update copyright years 4805 48062014-01-02 Richard Sandiford <rdsandiford@googlemail.com> 4807 4808 * c-array-notation.c: Use the standard form for the copyright notice. 4809 48102013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com> 4811 4812 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field. 4813 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens 4814 field in parser is not empty. If not-empty, call the function 4815 c_parser_finish_omp_declare_simd. 4816 (c_parser_cilk_clause_vectorlength): Modified function to be shared 4817 between SIMD-enabled functions and #pragma simd. Added new parameter. 4818 (c_parser_cilk_all_clauses): Modified the usage of the function 4819 c_parser_cilk_clause_vectorlength as mentioned above. 4820 (c_parser_cilk_simd_fn_vector_attrs): New function. 4821 (c_finish_cilk_simd_fn_tokens): Likewise. 4822 (is_cilkplus_vector_p): Likewise. 4823 (c_parser_omp_clause_name): Added checking for "vectorlength," 4824 "nomask," and "mask" strings in clause name. 4825 (c_parser_omp_all_clauses): Added 3 new case statements: 4826 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and 4827 PRAGMA_CILK_CLAUSE_NOMASK. 4828 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a 4829 check for vector attribute and if so call the function 4830 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled, 4831 called the function c_finish_cilk_simd_fn_tokens. 4832 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in 4833 parser field is non-empty. If so, parse them as you would parse 4834 the omp declare simd pragma. 4835 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn. 4836 Added a check when step is a parameter and flag it as error. 4837 (CILK_SIMD_FN_CLAUSE_MASK): New #define. 4838 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to 4839 pragma_omp_clause. 4840 48412013-12-17 Thomas Schwinge <thomas@codesourcery.com> 4842 4843 * c-parser.c (c_parser_omp_parallel): Fix description. 4844 48452013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com> 4846 4847 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove. 4848 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise. 4849 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise. 4850 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function. 4851 48522013-12-04 Joseph Myers <joseph@codesourcery.com> 4853 4854 PR c/52023 4855 * c-parser.c (c_parser_alignas_specifier): Use 4856 c_sizeof_or_alignof_type instead of c_alignof. 4857 (c_parser_alignof_expression): Likewise, with min_alignof 4858 parameter depending on alignof spelling used. 4859 48602013-12-04 Marek Polacek <polacek@redhat.com> 4861 4862 PR c/54113 4863 * c-decl.c (start_function): Don't warn for missing prototype for 4864 inline functions. 4865 48662013-12-03 Marek Polacek <polacek@redhat.com> 4867 4868 PR c/59351 4869 * c-decl.c (build_compound_literal): Allow compound literals with 4870 empty initial value. 4871 48722013-12-02 Joseph Myers <joseph@codesourcery.com> 4873 4874 PR c/58235 4875 * c-typeck.c (build_modify_expr): Diagnose assignment to 4876 expression with array type. 4877 48782013-11-29 Joseph Myers <joseph@codesourcery.com> 4879 4880 PR c/42262 4881 * c-typeck.c (process_init_element): Do not treat a string as 4882 initializing a whole array when used with a designator for an 4883 individual element. 4884 48852013-11-29 Joseph Myers <joseph@codesourcery.com> 4886 4887 PR c/57574 4888 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of 4889 an inline function following a static declaration. 4890 48912013-11-28 Jakub Jelinek <jakub@redhat.com> 4892 4893 PR c/59310 4894 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target" 4895 to p_name before calling c_parser_omp_teams instead of after. 4896 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser 4897 argument. Remove unused p_name variable. 4898 48992013-11-27 Aldy Hernandez <aldyh@redhat.com> 4900 Jakub Jelinek <jakub@redhat.com> 4901 4902 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if 4903 external_scope is NULL. 4904 49052013-11-27 Tom de Vries <tom@codesourcery.com> 4906 Marc Glisse <marc.glisse@inria.fr> 4907 4908 PR c++/59032 4909 * c-typeck.c (build_unary_op): Allow vector increment and decrement. 4910 49112013-11-22 Andrew MacLeod <amacleod@redhat.com> 4912 4913 * c-typeck.c: Add required include files from gimple.h. 4914 49152013-11-22 David Malcolm <dmalcolm@redhat.com> 4916 4917 * c-decl.c (define_label, shadow_tag_warned) 4918 (check_bitfield_type_and_width, grokdeclarator, grokparms, 4919 store_parm_decls_newstyle, store_parm_decls_oldstyle) 4920 (declspecs_add_type): Remove use of in_system_header macro. 4921 * c-parser.c (c_parser_unary_expression): Likewise. 4922 * c-typeck.c (store_init_value, process_init_element) 4923 (c_start_case): Likewise. 4924 4925 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE 4926 macro. 4927 4928 * c-parser.c (c_parser_set_source_position_from_token): Remove 4929 reference to in_system_header from comment. 4930 49312013-11-18 Richard Sandiford <rdsandiford@googlemail.com> 4932 4933 * c-decl.c (grokdeclarator): Update comment to refer to 4934 tree_to_[su]hwi rather than tree_low_cst. 4935 49362013-11-18 Richard Sandiford <rdsandiford@googlemail.com> 4937 4938 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with 4939 tree_to_uhwi throughout. 4940 49412013-11-18 Richard Sandiford <rdsandiford@googlemail.com> 4942 4943 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi 4944 throughout. 4945 49462013-11-18 Richard Sandiford <rdsandiford@googlemail.com> 4947 4948 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p 4949 throughout. 4950 49512013-11-15 Aldy Hernandez <aldyh@redhat.com> 4952 4953 * c-parser.c (c_parser_cilk_simd): New. 4954 (c_parser_cilk_verify_simd): New. 4955 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD. 4956 (c_parser_omp_for_loop): Add case for NE_EXPR. 4957 Set c_break_label for CILK_SIMD. 4958 (c_parser_cilk_clause_vectorlength): New. 4959 (c_parser_cilk_clause_linear): New. 4960 (c_parser_cilk_clause_name): New. 4961 (c_parser_cilk_all_clauses): New. 4962 * c-typeck.c (build_unary_op): Pass location argument to 4963 readonly_error. 4964 (build_modify_expr): Same. 4965 (build_asm_expr): Same. 4966 (c_finish_bc_stmt): Error on break/continue in loops. 4967 49682013-11-14 Andrew MacLeod <amacleod@redhat.com> 4969 4970 * c-typeck.c: Include only gimplify.h and gimple.h as needed. 4971 49722013-11-14 Diego Novillo <dnovillo@google.com> 4973 4974 * c-decl.c: Include print-tree.h. 4975 Include stor-layout.h. 4976 Include varasm.h. 4977 Include attribs.h. 4978 Include stringpool.h. 4979 * c-lang.c: Include fold-const.h. 4980 * c-parser.c: Include stringpool.h. 4981 Include attribs.h. 4982 Include stor-layout.h. 4983 Include varasm.h. 4984 Include trans-mem.h. 4985 * c-typeck.c: Include stor-layout.h. 4986 Include trans-mem.h. 4987 Include varasm.h. 4988 Include stmt.h. 4989 49902013-11-13 Joseph Myers <joseph@codesourcery.com> 4991 4992 * c-tree.h (c_typespec_keyword): Add cts_auto_type. 4993 * c-decl.c (declspecs_add_type, finish_declspecs): Handle 4994 __auto_type. 4995 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs) 4996 (c_parser_attribute_any_word, c_parser_objc_selector): Handle 4997 RID_AUTO_TYPE. 4998 (c_parser_declspecs): Take argument AUTO_TYPE_OK. 4999 (c_parser_declaration_or_fndef, c_parser_struct_declaration) 5000 (c_parser_declarator, c_parser_direct_declarator_inner) 5001 (c_parser_parameter_declaration, c_parser_type_name): All callers 5002 changed. 5003 (c_parser_declaration_or_fndef): Handle declarations with type 5004 determined from the initializer. 5005 50062013-11-12 Andrew MacLeod <amacleod@redhat.com> 5007 5008 * c-typeck.c: Include gimplify.h. 5009 50102013-11-12 Joseph Myers <joseph@codesourcery.com> 5011 5012 * c-tree.h (struct c_declspecs): Add thread_gnu_p field. 5013 * c-parser.c (c_parser_declspecs): Mention _Thread_local in 5014 comment. 5015 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread 5016 or _Thread_local as appropriate in diagnostics. 5017 (build_null_declspecs): Initialize ret->thread_gnu_p. 5018 (declspecs_add_scspec): Handle either __thread or _Thread_local 5019 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if 5020 pedantic. Do not disallow _Thread_local extern and _Thread_local 5021 static. 5022 50232013-11-07 Joseph Myers <joseph@codesourcery.com> 5024 Andrew MacLeod <amacleod@redhat.com> 5025 5026 * c-aux-info.c (gen_type): Handle atomic qualifier. 5027 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic 5028 qualifiers when compating types. 5029 (shadow_tag_warned): Handle atomic_p in declspecs. 5030 (quals_from_declspecs): Likewise. 5031 (start_decl): Use c_type_promotes_to when promoting argument 5032 types. 5033 (grokdeclarator): Handle _Atomic. 5034 (get_parm_info): Diagnose any qualifier on "void" as only 5035 parameter. 5036 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when 5037 comparing types. Use c_type_promotes_to when promoting argument 5038 types. 5039 (finish_function): Use c_type_promotes_to when promoting argument 5040 types. 5041 (build_null_declspecs): Handle atomic_p in declspecs. 5042 (declspecs_add_qual): Handle RID_ATOMIC. 5043 * c-parser.c (c_token_starts_typename, c_token_is_qualifier) 5044 (c_token_starts_declspecs): Handle RID_ATOMIC. 5045 (c_parser_declspecs): Handle atomic type specifiers and 5046 qualifiers. 5047 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers 5048 from types of expressions with atomic type. 5049 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue. 5050 (c_parser_attribute_any_word): Handle RID_ATOMIC. 5051 (c_parser_initializer, c_parser_initelt, c_parser_initval) 5052 (c_parser_statement_after_labels, c_parser_switch_statement) 5053 (c_parser_for_statement, c_parser_expr_no_commas) 5054 (c_parser_conditional_expression, c_parser_binary_expression) 5055 (c_parser_cast_expression, c_parser_unary_expression) 5056 (c_parser_postfix_expression) 5057 (c_parser_postfix_expression_after_primary, c_parser_expression): 5058 Use convert_lvalue_to_rvalue. 5059 (c_parser_expression_conv, c_parser_expr_list): Document 5060 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue. 5061 (c_parser_objc_synchronized_statement): Use 5062 convert_lvalue_to_rvalue. 5063 (c_parser_objc_selector): Handle RID_ATOMIC. 5064 (c_parser_objc_receiver, c_parser_array_notation): Use 5065 convert_lvalue_to_rvalue. 5066 * c-tree.h (ctsk_typeof): Adjust comment to mention use for 5067 _Atomic (type-name). 5068 (struct c_declspecs): Add atomic_p field. 5069 (convert_lvalue_to_rvalue): Declare. 5070 * c-typeck.c (c_type_promotes_to): Promote atomic types to 5071 corresponding atomic types. 5072 (qualify_type): Don't add _Atomic qualifiers from second argument. 5073 (comp_target_types): Do not allow _Atomic mismatches. 5074 (type_lists_compatible_p): Do not remove atomic qualifiers when 5075 comparing types. 5076 (really_atomic_lvalue, convert_lvalue_to_rvalue) 5077 (build_atomic_assign): New functions. 5078 (build_unary_op): Use build_atomic_assign for atomic increment and 5079 decrement. 5080 (build_conditional_expr): Do not treat _Atomic void as a qualified 5081 version of void. 5082 (build_modify_expr): Use build_atomic_assign for atomic LHS. 5083 (find_anonymous_field_with_type, convert_to_anonymous_field) 5084 (convert_for_assignment): Do not remove atomic qualifiers when 5085 comparing types. 5086 (digest_init): Do not accept initialization of arrays of atomic 5087 elements by string constants. 5088 (build_asm_expr): Use convert_lvalue_to_rvalue. 5089 (build_binary_op): Do not treat _Atomic void as a qualified 5090 version of void. 5091 50922013-11-06 DJ Delorie <dj@redhat.com> 5093 5094 * c-decl.c (locate_old_decl): If a previous conflicting decl is 5095 both explicit and builtin, print the location of the explicit one. 5096 50972013-11-05 Tobias Burnus <burnus@net-b.de> 5098 5099 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel, 5100 c_parser_omp_distribute, c_parser_omp_teams, 5101 c_parser_omp_target, c_parser_omp_declare): Handle 5102 -fopenmp-simd. 5103 51042013-11-03 Marek Polacek <polacek@redhat.com> 5105 5106 * c-decl.c (grokdeclarator): Add VLA instrumentation. 5107 51082013-11-01 Jakub Jelinek <jakub@redhat.com> 5109 5110 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to 5111 check_dup_generic at the end, unless remove is true. 5112 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after 5113 remove = true;. 5114 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise. 5115 51162013-10-31 Jakub Jelinek <jakub@redhat.com> 5117 5118 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause 5119 with decl that is not pointer nor array. 5120 51212013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com> 5122 5123 * c-decl.c (finish_function): Added a call for insert_cilk_frame when 5124 a spawning function is found. 5125 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define. 5126 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise. 5127 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise. 5128 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC 5129 case. 5130 (c_parser_postfix_expression): Added RID_CILK_SPAWN case. 5131 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma 5132 expr. 5133 (c_finish_return): Added a check to reject _Cilk_spawn in return 5134 expression. 5135 (build_cilk_spawn): New function. 5136 (build_cilk_sync): Likewise. 5137 * Makefile.in (c-decl.o): Added cilk.h in dependency list. 5138 51392013-10-27 Tobias Burnus <burnus@net-b.de> 5140 5141 PR other/33426 5142 * c-parser.c (c_parser_while_statement, c_parser_while_statement, 5143 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'. 5144 (c_parser_statement_after_labels): Update calls. 5145 51462013-10-24 Tobias Burnus <burnus@net-b.de> 5147 5148 PR other/33426 5149 * c-parser.c (c_parser_pragma, c_parser_for_statement): 5150 Handle PRAGMA_IVDEP. 5151 (c_parser_statement_after_labels): Update call. 5152 51532013-10-24 Marek Polacek <polacek@redhat.com> 5154 5155 * c-parser.c (c_parser_struct_declaration): Add a comment. 5156 (c_parser_declarator): Don't allow _Alignas here. 5157 51582013-10-17 Andrew MacLeod <amacleod@redhat.com> 5159 5160 * c-parser.c: Include omp-low.h. 5161 * c-typeck.c: Likewise. 5162 51632013-10-17 Marek Polacek <polacek@redhat.com> 5164 5165 PR c/58267 5166 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter. 5167 Document syntax of the array-declarator. 5168 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs 5169 are not permitted. 5170 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call. 5171 (c_parser_struct_declaration): Likewise. 5172 (c_parser_declarator): Likewise. 5173 (c_parser_direct_declarator_inner): Likewise. 5174 (c_parser_parameter_declaration): Likewise. 5175 (c_parser_type_name): Likewise. 5176 51772013-10-11 Jakub Jelinek <jakub@redhat.com> 5178 5179 * c-lang.h (current_omp_declare_target_attribute): New extern 5180 decl. 5181 * c-parser.c: Include c-lang.h. 5182 (struct c_parser): Change tokens to c_token *. 5183 Add tokens_buf field. Change tokens_avail type to unsigned int. 5184 (c_parser_consume_token): If parser->tokens isn't 5185 &parser->tokens_buf[0], increment parser->tokens. 5186 (c_parser_consume_pragma): Likewise. 5187 (enum pragma_context): Add pragma_struct and pragma_param. 5188 (c_parser_external_declaration): Adjust 5189 c_parser_declaration_or_fndef caller. 5190 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses 5191 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd. 5192 Adjust recursive call. 5193 (c_parser_struct_or_union_specifier): Use pragma_struct instead 5194 of pragma_external. 5195 (c_parser_parameter_declaration): Use pragma_param instead of 5196 pragma_external. 5197 (c_parser_compound_statement_nostart, c_parser_label, 5198 c_parser_for_statement): Adjust 5199 c_parser_declaration_or_fndef callers. 5200 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass 5201 it through to c_parser_conditional_expression. 5202 (c_parser_conditional_expression): Add omp_atomic_lhs argument, 5203 pass it through to c_parser_binary_expression. Adjust recursive 5204 call. 5205 (c_parser_binary_expression): Remove prec argument, add 5206 omp_atomic_lhs argument instead. Always start from PREC_NONE, if 5207 omp_atomic_lhs is non-NULL and one of the arguments of toplevel 5208 binop matches it, use build2 instead of parser_build_binary_op. 5209 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL, 5210 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET, 5211 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION. 5212 Handle pragma_struct and pragma_param the same as pragma_external. 5213 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names. 5214 (c_parser_omp_variable_list): Parse array sections for 5215 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses. 5216 (c_parser_omp_clause_collapse): Fully fold collapse expression. 5217 (c_parser_omp_clause_reduction): Handle user defined reductions. 5218 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind, 5219 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit, 5220 c_parser_omp_clause_aligned, c_parser_omp_clause_linear, 5221 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen, 5222 c_parser_omp_clause_depend, c_parser_omp_clause_map, 5223 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule, 5224 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to, 5225 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions. 5226 (c_parser_omp_all_clauses): Add finish_p argument. Don't call 5227 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses. 5228 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is 5229 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms. 5230 (c_parser_omp_for_loop): Add CODE argument, pass it through 5231 to c_finish_omp_for. Change last argument to cclauses, 5232 and adjust uses to grab parallel clauses from the array of all 5233 the split clauses. Adjust c_parser_binary_expression, 5234 c_parser_declaration_or_fndef and c_finish_omp_for callers. 5235 (omp_split_clauses): New function. 5236 (c_parser_omp_simd): New function. 5237 (c_parser_omp_for): Add p_name, mask and cclauses arguments. 5238 Allow the function to be called also when parsing combined constructs, 5239 and call c_parser_omp_simd when parsing for simd. 5240 (c_parser_omp_sections_scope): If section-sequence doesn't start with 5241 #pragma omp section, require exactly one structured-block instead of 5242 sequence of statements. 5243 (c_parser_omp_sections): Add p_name, mask and cclauses arguments. 5244 Allow the function to be called also when parsing combined constructs. 5245 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments. 5246 Allow the function to be called also when parsing combined 5247 constructs. 5248 (c_parser_omp_taskgroup, c_parser_omp_cancel, 5249 c_parser_omp_cancellation_point, c_parser_omp_distribute, 5250 c_parser_omp_teams, c_parser_omp_target_data, 5251 c_parser_omp_target_update, c_parser_omp_target, 5252 c_parser_omp_declare_simd, c_finish_omp_declare_simd, 5253 c_parser_omp_declare_target, c_parser_omp_end_declare_target, 5254 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions. 5255 (c_parser_omp_construct): Add p_name and mask vars. Handle 5256 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP, 5257 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel 5258 and c_parser_omp_sections callers. 5259 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here. 5260 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK, 5261 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. 5262 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND. 5263 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add 5264 OMP_CLAUSE_DEPEND. 5265 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK, 5266 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK, 5267 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK, 5268 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK, 5269 OMP_DECLARE_SIMD_CLAUSE_MASK): Define. 5270 * c-typeck.c: Include tree-inline.h. 5271 (c_finish_omp_cancel, c_finish_omp_cancellation_point, 5272 handle_omp_array_sections_1, handle_omp_array_sections, 5273 c_clone_omp_udr, c_find_omp_placeholder_r): New functions. 5274 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and 5275 user defined reductions. 5276 (c_tree_equal): New function. 5277 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls, 5278 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal, 5279 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup, 5280 c_check_omp_declare_reduction_r): New prototypes. 5281 * c-decl.c (current_omp_declare_target_attribute): New variable. 5282 (c_decl_attributes): New function. 5283 (start_decl, start_function): Use it instead of decl_attributes. 5284 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id, 5285 c_omp_reduction_decl, c_omp_reduction_lookup, 5286 c_check_omp_declare_reduction_r): New functions. 5287 52882013-09-25 Tom Tromey <tromey@redhat.com> 5289 5290 * Make-lang.in (c/gccspec.o): Remove. 5291 (CFLAGS-c/gccspec.o): New variable. 5292 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o) 5293 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o) 5294 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove. 5295 52962013-09-25 Tom Tromey <tromey@redhat.com> 5297 5298 * Make-lang.in (c/gccspec.o): Don't use subshell. 5299 53002013-09-18 Marek Polacek <polacek@redhat.com> 5301 5302 PR sanitize/58443 5303 * c-typeck.c (build_binary_op): Properly honor -fsanitize options. 5304 Remove unnecessary check. 5305 53062013-09-18 Marek Polacek <polacek@redhat.com> 5307 5308 PR sanitizer/58411 5309 * c-typeck.c (build_binary_op): Don't sanitize function if it has the 5310 no_sanitize_undefined attribute. 5311 53122013-09-13 Kai Tietz <ktietz@redhat.com> 5313 5314 PR target/57848 5315 * c-decl.c (c_builtin_function_ext_scope): Remove 5316 wrong assumption that it is never called on prexisting 5317 symbol. 5318 53192013-09-08 Joern Rennecke <joern.rennecke@embecosm.com> 5320 5321 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p. 5322 53232013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net> 5324 5325 * c-objc-common.c (c_tree_printer): Tidy. 5326 53272013-08-30 Marek Polacek <polacek@redhat.com> 5328 5329 * c-typeck.c (build_binary_op): Add division by zero and shift 5330 instrumentation. 5331 53322013-08-26 Joern Rennecke <joern.rennecke@embecosm.com> 5333 Joseph Myers <joseph@codesourcery.com> 5334 5335 PR c/35649 5336 * c-typeck.c (c_common_type): Prefer double_type_node over 5337 other REAL_TYPE types with the same precision. 5338 (convert_arguments): Likewise. 5339 53402013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net> 5341 5342 * c-objc-common.c (c_tree_printer): Document the nature of the cast. 5343 (c_initialize_diagnostics): Call a destructor for the early printer. 5344 53452013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net> 5346 5347 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty 5348 printer initialization. 5349 53502013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com> 5351 5352 PR c/57490 5353 * c-array-notation.c (fix_conditional_array_notations_1): Added a 5354 check for truth values. 5355 (expand_array_notation_exprs): Added truth values case. Removed an 5356 unwanted else. Added for-loop to walk through subtrees in default 5357 case. 5358 53592013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net> 5360 5361 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base. 5362 53632013-07-23 Joseph Myers <joseph@codesourcery.com> 5364 5365 * c-parser.c (struct c_generic_association): Fix typo. 5366 53672013-07-23 Tom Tromey <tromey@redhat.com> 5368 Joseph Myers <joseph@codesourcery.com> 5369 5370 * c-parser.c (struct c_generic_association): New. 5371 (c_generic_association_d): New typedef. 5372 (c_parser_generic_selection): New function. 5373 (c_parser_postfix_expression): Handle RID_GENERIC. 5374 53752013-07-13 Jason Merrill <jason@redhat.com> 5376 5377 PR c++/57793 5378 * c-decl.c (finish_struct): Check for too-large class. 5379 53802013-07-04 Joern Rennecke <joern.rennecke@embecosm.com> 5381 5382 PR c/57821 5383 * c-typeck.c (set_init_index): When folding, check for index overflow. 5384 53852013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com> 5386 5387 * c-parser.c (c_parser_array_notation): Removed rejection of array 5388 notations in an array of function pointers. 5389 53902013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com> 5391 5392 * c-array-notation.c (make_triplet_val_inv): New function. 5393 (create_cmp_incr): Likewise. 5394 (create_array_refs): Likewise. 5395 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec. 5396 Also modularized common parts between functions and called the function. 5397 (build_array_notation_expr): Likewise. 5398 (fix_conditional_array_notations_1): Likewise. 5399 (fix_array_notation_expr): Likewise. 5400 (fix_array_notation_call_expr): Likewise. 5401 54022013-06-18 Marek Polacek <polacek@redhat.com> 5403 5404 PR c/57630 5405 * c-decl.c (check_for_loop_decls): Improve diagnostics messages. 5406 54072013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com> 5408 5409 * c-array-notation.c (build_array_notation_expr): Reject array notation 5410 mismatch between LHS and RHS even inside a call_expr. Also, removed 5411 a couple while statements that were dead code. 5412 54132013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com> 5414 5415 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded 5416 excessive precision expressions in function parameters. Also removed 5417 couple unwanted while statements. 5418 54192013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com> 5420 5421 * c-array-notation.c (expand_array_notation_exprs): Added 5422 ARRAY_NOTATION_REF case. 5423 54242013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com> 5425 5426 * c-array-notation.c (length_mismatch_in_expr_p): Moved this 5427 function to c-family/array-notation-common.c. 5428 (is_cilkplus_reduce_builtin): Likewise. 5429 (find_rank): Likewise. 5430 (extract_array_notation_exprs): Likewise. 5431 (replace_array_notations): Likewise. 5432 (find_inv_trees): Likewise. 5433 (replace_inv_trees): Likewise. 5434 (contains_array_notation_expr): Likewise. 5435 (find_correct_array_notation_type): Likewise. 5436 (replace_invariant_exprs): Initialized additional_tcodes to NULL. 5437 (struct inv_list): Moved this to c-family/array-notation-common.c. 5438 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype. 5439 54402013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com> 5441 5442 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus 5443 reduction functions outside the for-loop. Added a check if the fundecl 5444 is non-NULL. Finally, removed an unwanted if-statement, and made the 5445 body unconditional. 5446 54472013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com> 5448 5449 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the 5450 condition of the if-statement matches the rank of else-block and then- 5451 block when array notations are used. 5452 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation 5453 expression after the entire function body is parsed. 5454 (c_parser_expr_no_commas): Delayed creating array notation expressions 5455 to the end of function parsing. 5456 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the 5457 whole if-statement instead of just the condition. 5458 (expand_array_notation_exprs): Added MODIFY_EXPR case. 5459 54602013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com> 5461 5462 PR c/57474 5463 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length 5464 array to NULL_TREE if they are unused. Also added a check for the 5465 field to be NULL before its fields are used in future. 5466 54672013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 5468 5469 PR bootstrap/57450 5470 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi. 5471 (build_array_notation_expr): Likewise. 5472 54732013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com> 5474 5475 * c-typeck.c (build_array_ref): Added a check to see if array's 5476 index is greater than one. If true, then emit an error. 5477 (build_function_call_vec): Exclude error reporting and checking 5478 for builtin array-notation functions. 5479 (convert_arguments): Likewise. 5480 (c_finish_return): Added a check for array notations as a return 5481 expression. If true, then emit an error. 5482 (c_finish_loop): Added a check for array notations in a loop 5483 condition. If true then emit an error. 5484 (lvalue_p): Added a ARRAY_NOTATION_REF case. 5485 (build_binary_op): Added a check for array notation expr inside 5486 op1 and op0. If present, we call another function to find correct 5487 type. 5488 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o. 5489 * c-parser.c (c_parser_compound_statement): Check if array 5490 notation code is used in tree, if so, then transform them into 5491 appropriate C code. 5492 (c_parser_expr_no_commas): Check if array notation is used in LHS 5493 or RHS, if so, then build array notation expression instead of 5494 regular modify. 5495 (c_parser_postfix_expression_after_primary): Added a check for 5496 colon(s) after square braces, if so then handle it like an array 5497 notation. Also, break up array notations in unary op if found. 5498 (c_parser_direct_declarator_inner): Added a check for array 5499 notation. 5500 (c_parser_compound_statement): Added a check for array notation in 5501 a stmt. If one is present, then expand array notation expr. 5502 (c_parser_if_statement): Likewise. 5503 (c_parser_switch_statement): Added a check for array notations in 5504 a switch statement's condition. If true, then output an error. 5505 (c_parser_while_statement): Similarly, but for a while. 5506 (c_parser_do_statement): Similarly, but for a do-while. 5507 (c_parser_for_statement): Similarly, but for a for-loop. 5508 (c_parser_unary_expression): Check if array notation is used in a 5509 pre-increment or pre-decrement expression. If true, then expand 5510 them. 5511 (c_parser_array_notation): New function. 5512 * c-array-notation.c: New file. 5513 * c-tree.h (is_cilkplus_reduce_builtin): Protoize. 5514 55152013-05-23 Mike Stump <mikestump@comcast.net> 5516 5517 * c-typeck.c (convert_for_assignment): Handle references to memory 5518 spaces better. 5519 55202013-05-16 Jason Merrill <jason@redhat.com> 5521 5522 * Make-lang.in (cc1$(exeext)): Use link mutex. 5523 55242013-04-24 Paolo Carlini <paolo.carlini@oracle.com> 5525 5526 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns 5527 to simply use OPT_Wpointer_arith. 5528 (build_unary_op): Likewise. 5529 55302013-04-03 Jakub Jelinek <jakub@redhat.com> 5531 5532 PR c/19449 5533 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p 5534 argument. If set, or it temporarily for parsing of the first 5535 argument into force_folding_builtin_constant_p. 5536 (c_parser_postfix_expression): Adjust callers. 5537 55382013-03-21 Richard Biener <rguenther@suse.de> 5539 5540 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P 5541 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly. 5542 55432013-02-12 Marek Polacek <polacek@redhat.com> 5544 5545 PR c/44938 5546 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize 5547 origtypes to NULL. 5548 55492013-01-24 Jakub Jelinek <jakub@redhat.com> 5550 5551 PR c/56078 5552 * c-typeck.c (set_nonincremental_init_from_string): If 5553 constructor_max_index is NULL, treat it as if tree_int_cst_lt 5554 returned false. 5555 (process_init_element): Likewise. 5556 55572012-12-20 Jakub Jelinek <jakub@redhat.com> 5558 5559 PR c++/55619 5560 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P 5561 argument, don't call default_function_array_conversion 5562 nor c_fully_fold here. 5563 (c_parser_asm_statement): Adjust callers. 5564 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs 5565 and outputs here, and call default_function_array_conversion 5566 on inputs that don't need to be addressable. 5567 55682012-12-18 Jakub Jelinek <jakub@redhat.com> 5569 5570 PR c/39464 5571 * c-typeck.c (convert_for_assignment): For -Wpointer-sign 5572 warning require that both c_common_unsigned_type as well as 5573 c_common_signed_type is the same for both mvl and mvr types. 5574 55752012-11-16 Diego Novillo <dnovillo@google.com> 5576 5577 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec) 5578 5579 * c-common.c: Use new vec API in vec.h. 5580 * c-common.h: Likewise. 5581 * c-gimplify.c: Likewise. 5582 * c-pragma.c: Likewise. 5583 * c-pretty-print.c: Likewise. 5584 * c-pretty-print.h: Likewise. 5585 * c-semantics.c: Likewise. 5586 * c-decl.c: Likewise. 5587 * c-parser.c: Likewise. 5588 * c-tree.h: Likewise. 5589 * c-typeck.c: Likewise. 5590 55912012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com> 5592 5593 PR c++/54930 5594 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr. 5595 55962012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org> 5597 5598 PR c/53066 5599 * c-decl.c (warn_if_shadowing): Do not warn if a variable 5600 shadows a function, unless the variable is a function or a 5601 pointer-to-function. 5602 56032012-10-12 Jakub Jelinek <jakub@redhat.com> 5604 5605 PR c/54381 5606 * c-parser.c (struct c_tree_loc_pair): Removed. 5607 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument, 5608 add location_t * and tree * arguments, fill in array of 3 5609 sizeof_arg trees and corresponding locs. 5610 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust 5611 c_parser_expr_list callers. 5612 (c_parser_postfix_expression_after_primary): Likewise. Pass 5613 array of 3 sizeof_arg trees and locs (corresponding to first 5614 3 arguments) to sizeof_pointer_memaccess_warning. 5615 56162012-10-09 Lawrence Crowl <crowl@google.com> 5617 5618 * Make-lang.in (c-decl.o): Add dependence on hash-table.h. 5619 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe 5620 hash table. 5621 56222012-10-09 Paolo Carlini <paolo.carlini@oracle.com> 5623 5624 PR c++/54194 5625 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses 5626 call. 5627 56282012-10-09 Marc Glisse <marc.glisse@inria.fr> 5629 5630 PR c++/54427 5631 * c-typeck.c: Include c-common.h. 5632 (enum stv_conv): Moved to c-common.h. 5633 (scalar_to_vector): Moved to c-common.c. 5634 (build_binary_op): Adapt to scalar_to_vector's new prototype. 5635 * Make-lang.in: c-typeck.c depends on c-common.h. 5636 56372012-10-04 Arnaud Charlet <charlet@adacore.com> 5638 5639 * c-decl.c (c_write_global_declarations): Fix handling of 5640 -fdump-ada-spec*. 5641 56422012-09-30 Sharad Singhai <singhai@google.com> 5643 5644 * c-decl.c (c_write_global_declarations): Use a different method 5645 to determine if the dump has ben initialized. 5646 56472012-09-14 Joseph Myers <joseph@codesourcery.com> 5648 5649 PR c/54552 5650 * c-typeck.c (c_cast_expr): When casting to a type requiring 5651 C_MAYBE_CONST_EXPR to be created, pass the inner expression to 5652 c_fully_fold first. 5653 56542012-09-14 Joseph Myers <joseph@codesourcery.com> 5655 5656 PR c/54103 5657 * c-typeck.c (build_unary_op): Pass original argument of 5658 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove 5659 any C_MAYBE_CONST_EXPR, if it has integer operands. 5660 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR, 5661 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR 5662 to c_objc_common_truthvalue_conversion, then remove any 5663 C_MAYBE_CONST_EXPR, if they have integer operands. Use 5664 c_objc_common_truthvalue_conversion not 5665 c_common_truthvalue_conversion. 5666 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and 5667 call note_integer_operands for arguments with integer operands 5668 that are not integer constants. 5669 56702012-09-13 Jakub Jelinek <jakub@redhat.com> 5671 5672 PR c/54559 5673 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or 5674 COMPLEX_TYPE with in_late_binary_op set temporarily to true. 5675 56762012-08-31 Jakub Jelinek <jakub@redhat.com> 5677 5678 PR c/54428 5679 * c-convert.c (convert): Don't call fold_convert_loc if 5680 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e 5681 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from 5682 COMPLEX_TYPE -> COMPLEX_TYPE conversion. 5683 56842012-08-24 Jakub Jelinek <jakub@redhat.com> 5685 5686 PR c/54355 5687 * c-decl.c (c_parser_label): Pass true as nested and fix up comments 5688 for nested and empty_ok arguments in the call to 5689 c_parser_declaration_or_fndef. 5690 56912012-08-17 Jakub Jelinek <jakub@redhat.com> 5692 5693 * c-tree.h (c_last_sizeof_arg): Declare. 5694 * c-parser.c (struct c_tree_loc_pair): New type. 5695 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if 5696 non-NULL. 5697 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers. 5698 (c_parser_postfix_expression_after_primary): Likewise. Call 5699 sizeof_pointer_memaccess_warning if needed. 5700 (sizeof_ptr_memacc_comptypes): New function. 5701 * c-typeck.c (c_last_sizeof_arg): New global variable. 5702 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it. 5703 57042012-07-24 Uros Bizjak <ubizjak@gmail.com> 5705 5706 * c-lang.h (lang_decl): Add variable_size GTY option. 5707 57082012-07-16 Steven Bosscher <steven@gcc.gnu.org> 5709 5710 * c-decl.c: Include dumpfile.h instead of tree-dump.h. 5711 * Make-lang.in: Fix dependencies. 5712 57132012-06-29 Steven Bosscher <steven@gcc.gnu.org> 5714 5715 * Make-lang.in: New file, rules migrated from gcc/Makefile.in 5716 and add language Makefile hooks. 5717 * config-lang.in: New file. 5718 * c-config-lang.in: Moved from gcc/config-lang.in to here, and 5719 add the required "normal" config-lang.in rules. 5720 * c-lang.h: Moved from gcc/ to here. 5721 * c-tree.h: Likewise. 5722 * c-objc-common.c: Likewise. 5723 * c-objc-common.h: Likewise. 5724 * c-typeck.c: Likewise. 5725 * c-convert.c: Likewise. 5726 * c-lang.c: Likewise. 5727 * c-aux-info.c: Likewise. 5728 * c-errors.c: Likewise. 5729 * gccspec.c: Likewise. 5730 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h. 5731 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h. 5732 5733Copyright (C) 2012-2018 Free Software Foundation, Inc. 5734 5735Copying and distribution of this file, with or without modification, 5736are permitted in any medium without royalty provided the copyright 5737notice and this notice are preserved. 5738