1 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3 * c-decl.c (start_decl): Do not warn if variables is named as main
4 and is a local variable.
6 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
9 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
10 objects of unknown size.
12 2018-08-13 Martin Sebor <msebor@redhat.com>
14 PR tree-optimization/71625
15 * c-parser.c (c_parser_declaration_or_fndef): Call
16 braced_list_to_string.
18 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
21 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
24 2018-08-01 Martin Sebor <msebor@redhat.com>
26 PR tree-optimization/86650
27 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
28 and TREE_BLOCK (t) from within percent_K_format to this callsite.
30 2018-08-01 Jakub Jelinek <jakub@redhat.com>
33 * c-typeck.c (init_field_decl_cmp): New function.
34 (output_pending_init_elements): Use it for field comparisons
35 instead of pure bit_position comparisons.
37 2018-07-12 Jakub Jelinek <jakub@redhat.com>
39 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
40 type here, instead add "omp declare target implicit" attribute.
41 (finish_decl): Diagnose vars without mappable type here.
43 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
44 Thomas Schwinge <thomas@codesourcery.com>
45 Cesar Philippidis <cesar@codesourcery.com>
47 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
48 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
49 to their non-present_or_* counterparts. Make 'self' an alias to
50 PRAGMA_OACC_CLAUSE_HOST.
51 (c_parser_oacc_data_clause): Update GOMP mappings for
52 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
53 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
54 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
55 Remove support for present_or_* clauses.
56 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
57 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
58 (OACC_DECLARE_CLAUSE_MASK): Likewise.
59 (OACC_DATA_CLAUSE_MASK): Likewise.
60 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
61 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
62 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
63 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
64 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
66 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
68 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
69 * gimple-parser.c (c_parser_gimple_statement): Likewise.
70 (c_parser_gimple_unary_expression): Likewise.
72 2018-06-15 Jakub Jelinek <jakub@redhat.com>
75 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
76 before doing POINTER_DIFF_EXPR.
78 2018-06-07 Marek Polacek <polacek@redhat.com>
81 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
82 for loop initial declarations.
84 2018-05-30 David Pagan <dave.pagan@oracle.com>
87 * c-decl.c (grokdeclarator): Update check for return type warnings.
88 (start_function): Likewise.
89 (finish_function): Likewise.
90 * c-typeck.c (c_finish_return): Update check for return type warnings.
91 Pass OPT_Wreturn_type to pedwarn when appropriate.
93 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
95 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
98 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
100 * gimple-parser.c: Include internal-fn.h.
101 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
102 (c_parser_gimple_call_internal): New function.
103 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
104 Fix typos in comment.
106 2018-05-10 Jakub Jelinek <jakub@redhat.com>
109 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
110 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
112 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
113 fold_offsetof_1, pass argtype as TYPE to it and drop the
116 2018-05-02 David Pagan <dave.pagan@oracle.com>
119 * c-decl.c (old_style_parameter_scope): New function.
120 * c-parser.c (c_parser_postfix_expression): Check for statement
121 expressions in old-style function parameter list declarations.
122 * c-parser.h (old_style_parameter_scope): New extern declaration.
124 2018-04-25 Jakub Jelinek <jakub@redhat.com>
127 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
128 it is not TREE_STATIC.
129 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
130 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
131 its COMPOUND_LITERAL_EXPR_DECL.
133 2018-03-21 Joseph Myers <joseph@codesourcery.com>
135 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
136 where all functions return the same _FloatN or _FloatNx type,
137 treat integer types as _Float64 instead of double.
139 2018-03-21 Jakub Jelinek <jakub@redhat.com>
142 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
143 building vector comparison, diagnose it and return error_mark_node.
145 2018-03-15 Jakub Jelinek <jakub@redhat.com>
148 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
149 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
150 INTEGER_TYPE element type.
152 2018-03-13 David Pagan <dave.pagan@oracle.com>
155 * c-typeck.c (output_init_element): Ensure field initializer
156 expression is always evaluated if there are side effects.
158 2018-03-06 Jakub Jelinek <jakub@redhat.com>
161 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
162 !building_stmt_list_p ().
164 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
167 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
168 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
169 and include the BIND_EXPR in the list of things that need to be
172 2018-02-09 Nathan Sidwell <nathan@acm.org>
175 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
176 to strict_aliasing_warning.
178 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
180 * c-typeck.c (really_start_incremental_init, push_init_level,
181 set_nonincremental_init, output_init_element, process_init_element):
182 Use DECL_UNNAMED_BIT_FIELD.
184 2018-01-31 Marek Polacek <polacek@redhat.com>
187 * c-parser.c (c_parser_compound_statement_nostart): Call
188 expansion_point_location_if_in_system_header.
190 2018-01-17 David Malcolm <dmalcolm@redhat.com>
193 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
196 2018-01-13 Jakub Jelinek <jakub@redhat.com>
199 * c-tree.h (decl_constant_value_1): Add a bool argument.
200 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
201 returning a CONSTRUCTOR if it is true. Use error_operand_p.
202 (decl_constant_value): Adjust caller.
203 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
204 decl_constant_value_1 as IN_INIT. Otherwise, punt if
205 decl_constant_value returns initializer that has BLKmode or
207 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
209 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
210 Alan Hayward <alan.hayward@arm.com>
211 David Sherwood <david.sherwood@arm.com>
213 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
214 TYPE_VECTOR_SUBPARTS.
216 2018-01-03 Jakub Jelinek <jakub@redhat.com>
218 Update copyright years.
220 2018-01-01 Jakub Jelinek <jakub@redhat.com>
223 * c-parser.c (c_parser_braced_init, c_parser_initelt,
224 c_parser_conditional_expression, c_parser_cast_expression,
225 c_parser_sizeof_expression, c_parser_alignof_expression,
226 c_parser_postfix_expression, c_parser_omp_declare_reduction,
227 c_parser_transaction_expression): Use set_error () method instead
228 of setting value member to error_mark_node.
230 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
232 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
233 and _Float<N>X built-in functions.
235 2017-12-22 Jakub Jelinek <jakub@redhat.com>
238 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
239 TYPE_STUB_DECL and call rest_of_type_compilation before processing
240 incomplete vars rather than after it.
243 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
244 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
245 and consider empty ones if there are no other stmts. For
246 -Wunused-value walk all statements before the one only followed by
249 2017-12-22 Mike Stump <mikestump@comcast.net>
250 Eric Botcazou <ebotcazou@adacore.com>
252 * c-parser.c (c_parser_while_statement): Add unroll parameter and
253 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
254 (c_parser_do_statement): Likewise.
255 (c_parser_for_statement): Likewise.
256 (c_parser_statement_after_labels): Adjust calls to above.
257 (c_parse_pragma_ivdep): New static function.
258 (c_parser_pragma_unroll): Likewise.
259 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
260 <PRAGMA_UNROLL>: New case.
262 2017-12-19 Jakub Jelinek <jakub@redhat.com>
264 * c-typeck.c (comptypes_internal, function_types_compatible_p,
265 perform_integral_promotions, digest_init): Replace Yoda conditions
266 with typical order conditions.
267 * c-decl.c (check_bitfield_type_and_width): Likewise.
269 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
271 * c-typeck.c (c_safe_arg_type_equiv_p,
272 c_safe_function_type_cast_p): New function.
273 (build_c_cast): Implement -Wcast-function-type.
275 2017-12-14 Richard Biener <rguenther@suse.de>
278 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
279 like REALPART_EXPR for the behavior of whether its operand
282 2017-12-12 Marek Polacek <polacek@redhat.com>
285 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
287 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
289 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
290 * c-parser.c (add_debug_begin_stmt): New.
291 (c_parser_declaration_or_fndef): Call it.
292 (c_parser_compound_statement_nostart): Likewise.
293 (c_parser_statement_after_labels): Likewise.
294 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
296 2017-12-07 Joseph Myers <joseph@codesourcery.com>
298 * c-decl.c (build_compound_literal): Add parameter alignas_align
299 and set alignment of decl if nonzero.
300 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
301 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
303 (c_parser_struct_declaration): Update syntax comment.
304 (c_parser_type_name): Add alignas_ok argument and pass it to
306 (c_parser_cast_expression): Pass true to c_parser_type_name and
307 give error if a cast used an _Alignas specifier.
308 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
309 give error if sizeof (type-name) used an _Alignas specifier.
310 (c_parser_alignof_expression): Pass true to c_parser_type_name and
311 give error if _Alignof (type-name) used an _Alignas specifier.
312 (c_parser_postfix_expression_after_paren_type): Check specified
313 alignment for a compound literal and pass it to
314 build_compound_literal.
315 * c-parser.h (c_parser_type_name): Update prototype.
316 * c-tree.h (build_compound_literal): Update prototype.
318 2017-12-07 Martin Sebor <msebor@redhat.com>
321 * c-decl.c (c_decl_attributes): Look up existing declaration and
322 pass it to decl_attributes.
324 2017-12-06 David Malcolm <dmalcolm@redhat.com>
327 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
328 reserved for use by the implementation.
330 2017-12-06 David Malcolm <dmalcolm@redhat.com>
332 * c-decl.c: Include "c-family/c-spellcheck.h".
334 2017-12-05 Martin Liska <mliska@suse.cz>
335 Jakub Jelinek <jakub@redhat.com>
337 * c-typeck.c (pointer_diff): Add new argument and instrument
339 (build_binary_op): Similar for pointer comparison.
341 2017-12-01 Jakub Jelinek <jakub@redhat.com>
344 * c-parser.c: Include tree-iterator.h.
345 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
346 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
350 * c-tree.h (decl_constant_value_1): Declare.
351 * c-typeck.c (decl_constant_value_1): New function.
352 (decl_constant_value): Use it.
353 * c-fold.c (c_fully_fold_internal): If in_init, use
354 decl_constant_value_1 instead of decl_constant_value.
356 2017-11-30 Jakub Jelinek <jakub@redhat.com>
358 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
360 2017-11-28 Jakub Jelinek <jakub@redhat.com>
363 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
364 c_switch_covers_all_cases_p returns true.
366 2017-11-28 Julia Koval <julia.koval@intel.com>
367 Sebastian Peryt <sebastian.peryt@intel.com>
369 * Make-lang.in (c/c-array-notation.o): Remove.
370 * c-array-notation.c: Delete.
371 * c-decl.c: Remove cilkplus condition.
372 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
373 c_parser_cilk_verify_simd, c_parser_array_notation,
374 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
375 c_parser_cilk_simd_fn_vector_attrs,
376 c_finish_cilk_simd_fn_tokens): Delete.
377 (c_parser_declaration_or_fndef): Remove cilkplus condition.
378 (c_parser_direct_declarator_inner): Ditto.
379 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
380 (c_parser_attributes, c_parser_compound_statement,
381 c_parser_statement_after_labels, c_parser_if_statement,
382 c_parser_switch_statement, c_parser_while_statement,
383 c_parser_do_statement, c_parser_for_statement,
384 c_parser_unary_expression, c_parser_postfix_expression,
385 c_parser_postfix_expression_after_primary,
386 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
387 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
389 * c-typeck.c (build_array_ref, build_function_call_vec,
391 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
392 c_finish_loop, build_binary_op): Remove cilkplus support.
394 2017-11-28 Jakub Jelinek <jakub@redhat.com>
396 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
399 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
401 * Make-lang.in (c.install-plugin): Install backend import library.
403 2017-11-23 Jakub Jelinek <jakub@redhat.com>
405 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
408 2017-11-23 Mike Stump <mikestump@comcast.net>
409 Eric Botcazou <ebotcazou@adacore.com>
411 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
413 (c_parser_do_statement): Likewise.
414 (c_parser_for_statement): Likewise.
416 2017-11-22 David Malcolm <dmalcolm@redhat.com>
419 * c-objc-common.c (c_tree_printer): Convert penultimate param from
420 bool to bool *. Within '%T' handling, if showing an "aka", use
421 "quoted" param to add appropriate quoting.
423 2017-11-22 Marek Polacek <polacek@redhat.com>
428 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
430 2017-11-21 David Malcolm <dmalcolm@redhat.com>
433 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
434 earlier failed lookups.
436 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
438 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
439 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
441 2017-11-20 David Malcolm <dmalcolm@redhat.com>
444 * c-decl.c: Include "c-family/known-headers.h".
445 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
447 (class suggest_missing_header): Move to known-header.h.
448 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
449 than get_c_name_hint.
451 2017-11-20 David Malcolm <dmalcolm@redhat.com>
453 * c-decl.c (get_c_name_hint): New function.
454 (class suggest_missing_header): New class.
455 (lookup_name_fuzzy): Call get_c_name_hint and use it to
456 suggest missing headers to the user.
458 2017-11-20 David Malcolm <dmalcolm@redhat.com>
460 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
461 Include "c-family/name-hint.h"
462 (implicit_decl_warning): Convert "hint" from
463 const char * to name_hint. Pass location to
464 lookup_name_fuzzy. Suppress any deferred diagnostic if the
465 warning was not printed.
466 (undeclared_variable): Likewise for "guessed_id".
467 (lookup_name_fuzzy): Convert return type from const char *
468 to name_hint. Add location_t param.
469 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
470 Include "c-family/name-hint.h"
471 (c_parser_declaration_or_fndef): Convert "hint" from
472 const char * to name_hint. Pass location to lookup_name_fuzzy.
473 (c_parser_parameter_declaration): Likewise.
475 2017-11-19 Jakub Jelinek <jakub@redhat.com>
479 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
481 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
482 handle_omp_array_sections): Likewise.
483 (digest_init): Don't call decl_constant_value_for_optimization.
484 * c-tree.h (decl_constant_value_for_optimization): Removed.
485 * c-fold.c (c_fold_array_ref): New function.
486 (c_fully_fold_internal): Add LVAL argument, propagate it through
487 recursive calls. For VAR_P call decl_constant_value and
488 unshare if not LVAL and either optimizing or IN_INIT. Remove
489 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
490 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
491 (c_fully_fold): Add LVAL argument, pass it through to
492 c_fully_fold_internal.
493 (decl_constant_value_for_optimization): Removed.
495 2017-11-15 Joseph Myers <joseph@codesourcery.com>
498 * c-parser.c (check_tgmath_function): New function.
499 (enum tgmath_parm_kind): New enum.
500 (c_parser_postfix_expression): Handle __builtin_tgmath.
502 2017-10-31 David Malcolm <dmalcolm@redhat.com>
504 * c-decl.c (implicit_decl_warning): Update for renaming of
505 pedwarn_at_rich_loc and warning_at_rich_loc.
506 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
507 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
508 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
509 (c_parser_struct_or_union_specifier): Likewise for renaming of
511 (c_parser_parameter_declaration): Likewise for renaming of
513 * c-typeck.c (build_component_ref): Likewise.
514 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
515 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
516 (set_init_label): Likewise for renaming of error_at_rich_loc.
518 2017-10-30 Richard Biener <rguenther@suse.de>
520 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
523 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
525 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
526 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
528 2017-10-25 David Malcolm <dmalcolm@redhat.com>
531 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
534 2017-10-25 Jakub Jelinek <jakub@redhat.com>
537 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
538 newdecl to corresponding __builtin_ if any.
540 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
543 * c-decl.c (diagnose_mismatched_decls): Use
544 OPT_Wbuiltin_declaration_mismatch.
546 2017-10-12 David Malcolm <dmalcolm@redhat.com>
548 * c-parser.c (c_parser_require): Add "type_is_unique" param and
549 use it to guard calls to maybe_suggest_missing_token_insertion.
550 (c_parser_parms_list_declarator): Override default value of new
551 "type_is_unique" param to c_parser_require.
552 (c_parser_asm_statement): Likewise.
553 * c-parser.h (c_parser_require): Add "type_is_unique" param,
556 2017-10-11 Nathan Sidwell <nathan@acm.org>
558 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
560 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
562 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
563 operating on trees as wide_ints.
564 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
565 (c_tree_equal): Likewise.
567 2017-10-04 David Malcolm <dmalcolm@redhat.com>
569 * c-decl.c (push_parm_decl): Store c_parm's location into the
571 (build_c_parm): Add "loc" param and store it within the c_parm.
572 * c-parser.c (struct c_parser): Add "last_token_location" field.
573 (c_parser_consume_token): Store location of the token into the
575 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
576 when handling a FUNCTION_DECL, if it doesn't already have them.
577 (c_parser_parameter_declaration): Generate a location for the
578 parameter, and pass it to the call to build_c_parm.
579 * c-tree.h (struct c_parm): Add field "loc".
580 (build_c_parm): Add location_t param.
581 * c-typeck.c (get_fndecl_argument_location): New function.
582 (inform_for_arg): New function.
583 (convert_for_assignment): Use inform_for_arg when dealing with
586 2017-09-29 Jakub Jelinek <jakub@redhat.com>
588 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
590 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
591 don't SET_DECL_C_BIT_FIELD here.
594 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
595 instead of trying to set just TREE_READONLY manually.
597 2017-09-16 Tom de Vries <tom@codesourcery.com>
600 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
603 2017-09-15 Joseph Myers <joseph@codesourcery.com>
606 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
608 (build_conditional_expr): For C11, generate result with excess
609 precision when one argument is an integer and the other is of a
610 type using excess precision.
612 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
614 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
616 2017-09-13 Marek Polacek <polacek@redhat.com>
619 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
620 than expr.original_type.
622 2017-09-12 Nathan Sidwell <nathan@acm.org>
624 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
625 resort_sorted_fields): Moved from c-family/c-common.c.
626 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
628 2017-09-01 Joseph Myers <joseph@codesourcery.com>
631 * c-typeck.c (build_atomic_assign): Handle argument with excess
632 precision. Ensure any EXCESS_PRECISION_EXPR is present in
633 argument passed to build_binary_op and convert_for_assignment but
634 not for call to c_fully_fold.
635 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
636 Ensure build_binary_op is called with argument with original
637 semantic type. Avoid calling c_fully_fold with an
638 EXCESS_PRECISION_EXPR from build_binary_op.
640 2017-09-01 Jakub Jelinek <jakub@redhat.com>
643 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
645 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
646 Alan Hayward <alan.hayward@arm.com>
647 David Sherwood <david.sherwood@arm.com>
649 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
650 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
651 m1 and m2 to the signed equivalent of a fixed-point
654 2017-08-24 David Malcolm <dmalcolm@redhat.com>
656 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
657 than CAN_HAVE_LOCATION_P when determining whether to use the
658 location_t value within "value".
660 2017-08-21 David Malcolm <dmalcolm@redhat.com>
662 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
663 rather than peeking the location of the first token.
664 * c-tree.h (c_expr::get_location): New method.
666 2017-08-21 David Malcolm <dmalcolm@redhat.com>
668 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
669 to check_function_arguments.
671 2017-08-18 Marek Polacek <polacek@redhat.com>
673 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
676 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
679 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
680 (check_bitfield_type_and_width): Don't allow bit-field with
681 warn_if_not_aligned type.
683 2017-08-14 Martin Sebor <msebor@redhat.com>
686 * c-objc-common.c (c_objc_common_init): Handle 'G'.
688 2017-08-11 Marek Polacek <polacek@redhat.com>
691 * c-decl.c (pushtag): Only print inform if the warning was printed.
692 (grokdeclarator): Likewise.
694 2017-08-10 David Malcolm <dmalcolm@redhat.com>
696 * c-parser.c (c_parser_error): Rename to...
697 (c_parser_error_richloc): ...this, making static, and adding
698 "richloc" parameter, passing it to the c_parse_error call,
699 rather than calling c_parser_set_source_position_from_token.
700 (c_parser_error): Reintroduce, reimplementing in terms of the
701 above, converting return type from void to bool.
702 (class token_pair): New class.
703 (struct matching_paren_traits): New struct.
704 (matching_parens): New typedef.
705 (struct matching_brace_traits): New struct.
706 (matching_braces): New typedef.
707 (get_matching_symbol): New function.
708 (c_parser_require): Add param MATCHING_LOCATION, using it to
709 highlight matching "opening" tokens for missing "closing" tokens.
710 (c_parser_skip_until_found): Likewise.
711 (c_parser_static_assert_declaration_no_semi): Convert explicit
712 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
713 class matching_parens, so that the pertinent open parenthesis is
714 highlighted when there are problems locating the close
716 (c_parser_struct_or_union_specifier): Likewise.
717 (c_parser_typeof_specifier): Likewise.
718 (c_parser_alignas_specifier): Likewise.
719 (c_parser_simple_asm_expr): Likewise.
720 (c_parser_braced_init): Likewise, for matching_braces.
721 (c_parser_paren_condition): Likewise, for matching_parens.
722 (c_parser_switch_statement): Likewise.
723 (c_parser_for_statement): Likewise.
724 (c_parser_asm_statement): Likewise.
725 (c_parser_asm_operands): Likewise.
726 (c_parser_cast_expression): Likewise.
727 (c_parser_sizeof_expression): Likewise.
728 (c_parser_alignof_expression): Likewise.
729 (c_parser_generic_selection): Likewise.
730 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
731 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
732 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
733 In case CPP_OPEN_PAREN, pass loc_open_paren to the
734 c_parser_skip_until_found call.
735 (c_parser_objc_class_definition): Use class matching_parens as
737 (c_parser_objc_method_decl): Likewise.
738 (c_parser_objc_try_catch_finally_statement): Likewise.
739 (c_parser_objc_synchronized_statement): Likewise.
740 (c_parser_objc_at_property_declaration): Likewise.
741 (c_parser_oacc_wait_list): Likewise.
742 (c_parser_omp_var_list_parens): Likewise.
743 (c_parser_omp_clause_collapse): Likewise.
744 (c_parser_omp_clause_default): Likewise.
745 (c_parser_omp_clause_if): Likewise.
746 (c_parser_omp_clause_num_threads): Likewise.
747 (c_parser_omp_clause_num_tasks): Likewise.
748 (c_parser_omp_clause_grainsize): Likewise.
749 (c_parser_omp_clause_priority): Likewise.
750 (c_parser_omp_clause_hint): Likewise.
751 (c_parser_omp_clause_defaultmap): Likewise.
752 (c_parser_oacc_single_int_clause): Likewise.
753 (c_parser_omp_clause_ordered): Likewise.
754 (c_parser_omp_clause_reduction): Likewise.
755 (c_parser_omp_clause_schedule): Likewise.
756 (c_parser_omp_clause_num_teams): Likewise.
757 (c_parser_omp_clause_thread_limit): Likewise.
758 (c_parser_omp_clause_aligned): Likewise.
759 (c_parser_omp_clause_linear): Likewise.
760 (c_parser_omp_clause_safelen): Likewise.
761 (c_parser_omp_clause_simdlen): Likewise.
762 (c_parser_omp_clause_depend): Likewise.
763 (c_parser_omp_clause_map): Likewise.
764 (c_parser_omp_clause_device): Likewise.
765 (c_parser_omp_clause_dist_schedule): Likewise.
766 (c_parser_omp_clause_proc_bind): Likewise.
767 (c_parser_omp_clause_uniform): Likewise.
768 (c_parser_omp_for_loop): Likewise.
769 (c_parser_cilk_clause_vectorlength): Likewise.
770 (c_parser_cilk_clause_linear): Likewise.
771 (c_parser_transaction_expression): Likewise.
772 * c-parser.h (c_parser_require): Add param matching_location with
773 default UNKNOWN_LOCATION.
774 (c_parser_error): Convert return type from void to bool.
775 (c_parser_skip_until_found): Add param matching_location with
776 default UNKNOWN_LOCATION.
778 2017-08-09 Marek Polacek <polacek@redhat.com>
780 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
781 * c-tree.h (build_external_ref): Update declaration.
782 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
783 (build_external_ref): Change the type of a parameter to bool.
784 (parser_build_binary_op): Use true/false instead of 1/0.
785 (pointer_diff): Likewise.
786 (build_modify_expr): Likewise.
787 (set_designator): Change the type of a parameter to bool.
788 (set_init_index): Use true/false instead of 1/0.
789 (set_init_label): Likewise.
790 (output_init_element): Change the type of a parameter to bool.
791 (output_pending_init_elements): Use true/false instead of 1/0.
792 (process_init_element): Likewise.
793 (build_binary_op): Change the type of a parameter to bool.
795 2017-08-09 Marek Polacek <polacek@redhat.com>
798 * c-typeck.c (pedwarn_init): Make the function take a variable list.
799 Call emit_diagnostic_valist instead of pedwarn.
800 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
801 Print the relevant types in diagnostics.
803 2017-08-09 Marek Polacek <polacek@redhat.com>
806 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
807 build_conditional_expr.
808 * c-parser.c (c_parser_conditional_expression): Create locations for
809 EXP1 and EXP2 from their source ranges. Pass the locations down to
810 build_conditional_expr.
811 * c-tree.h (build_conditional_expr): Update declaration.
812 * c-typeck.c (build_conditional_expr): Add location_t parameters.
813 For -Wsign-compare, also print the types.
815 2017-08-08 Martin Liska <mliska@suse.cz>
817 * c-convert.c: Include header files.
818 * c-typeck.c: Likewise.
820 2017-08-07 Martin Liska <mliska@suse.cz>
822 * c-parser.c (c_parser_attributes): Canonicalize name of an
825 2017-08-02 Marek Polacek <polacek@redhat.com>
828 * c-parser.c (c_parser_unary_expression): Use set_error.
832 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
833 warnings. Avoid walking MACRO_MAP_LOCATIONS.
835 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
836 Martin Liska <mliska@suse.cz>
838 * c-typeck.c (c_finish_goto_label): Build gimple predict
841 2017-07-31 Martin Liska <mliska@suse.cz>
844 * c-convert.c (convert): Guard condition with flag_sanitize_p
845 also with current_function_decl non-null equality.
846 * c-decl.c (grokdeclarator): Likewise.
847 * c-typeck.c (build_binary_op): Likewise.
849 2017-07-25 Marek Polacek <polacek@redhat.com>
851 * c-decl.c (grokfield): Remove local variable.
853 2017-07-25 Marek Polacek <polacek@redhat.com>
856 * c-parser.c (c_parser_else_body): Don't warn about multistatement
857 macro expansion if the body is in { }.
858 (c_parser_while_statement): Likewise.
859 (c_parser_for_statement): Likewise.
861 2017-07-18 Nathan Sidwell <nathan@acm.org>
863 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
865 2017-07-14 David Malcolm <dmalcolm@redhat.com>
867 * c-decl.c (implicitly_declare): When suggesting a missing
868 #include, provide a fix-it hint.
870 2017-07-06 David Malcolm <dmalcolm@redhat.com>
872 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
873 and call that instead.
874 * c-tree.h (selftest::run_c_tests): New decl.
876 2017-06-26 Marek Polacek <polacek@redhat.com>
879 * c-parser.c (c_parser_if_body): Set the location of the
880 body of the conditional after parsing all the labels. Call
881 warn_for_multistatement_macros.
882 (c_parser_else_body): Likewise.
883 (c_parser_switch_statement): Likewise.
884 (c_parser_while_statement): Likewise.
885 (c_parser_for_statement): Likewise.
886 (c_parser_statement): Add a default argument. Save the location
887 after labels have been parsed.
888 (c_parser_c99_block_statement): Likewise.
890 2017-06-19 Richard Biener <rguenther@suse.de>
892 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
893 negated _Literals to parse _Literal (int) -1.
895 2017-06-13 Martin Liska <mliska@suse.cz>
898 * c-convert.c (convert): Use sanitize_flags_p.
899 * c-decl.c (grokdeclarator): Likewise.
900 * c-typeck.c (convert_for_assignment): Likewise.
901 (c_finish_return): Likewise.
902 (build_binary_op): Likewise.
904 2017-06-08 Jakub Jelinek <jakub@redhat.com>
907 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
908 to sizetype before size_binop.
910 2017-06-07 Jakub Jelinek <jakub@redhat.com>
912 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
915 2017-06-06 Marek Polacek <polacek@redhat.com>
918 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
920 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
922 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
924 * c-parser.c (c_parser_binary_expression): Implement the
925 -Wsizeof_pointer_div warning.
926 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
927 from a parenthesized expression.
928 (c_parser_expr_list): Use c_last_sizeof_loc.
929 * c-tree.h (c_last_sizeof_loc): New external.
930 * c-typeck.c (c_last_sizeof_loc): New variable.
931 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
933 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
936 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
938 2017-05-30 David Malcolm <dmalcolm@redhat.com>
940 * c-objc-common.c (c_tree_printer): Gain bool and const char **
943 2017-05-24 Martin Sebor <msebor@redhat.com>
946 * c-fold.c (c_fully_fold_internal): Adjust.
947 * c-typeck.c (parser_build_unary_op): Adjust.
949 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
951 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
952 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
955 2017-05-23 Marek Polacek <polacek@redhat.com>
957 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
960 2017-05-22 Jakub Jelinek <jakub@redhat.com>
962 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
963 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
964 it returned invariant. Call tree_invariant_p unconditionally
965 afterwards to decide whether to return expr or op0.
967 2017-05-22 Nathan Sidwell <nathan@acm.org>
969 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
971 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
973 * c-parser.c (c_parser_omp_clause_default): Handle
974 "OMP_CLAUSE_DEFAULT_PRESENT".
976 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
978 * config-lang.in (gtfiles): Add c-family/c-format.c.
980 2017-05-18 Nathan Sidwell <nathan@acm.org>
982 * c-decl.c (pushdecl_top_level): Delete unused function.
984 2017-05-18 Marek Polacek <polacek@redhat.com>
986 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
987 (check_earlier_gotos): Likewise.
988 (define_label): Likewise.
989 (pending_xref_error): Likewise.
990 (smallest_type_quals_location): Likewise.
991 (grokdeclarator): Likewise.
992 (grokparms): Likewise.
993 (identifier_global_value): Likewise.
994 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
995 (find_init_member): Likewise.
997 2017-05-18 Marek Polacek <polacek@redhat.com>
999 * c-decl.c (start_decl): Use false/true instead of 0/1.
1000 (grokdeclarator): Likewise.
1001 (finish_struct): Likewise.
1002 (start_function): Change the return type to bool. Use false/true
1004 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1005 * c-tree.h (start_function): Update.
1006 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1007 (set_designator): Change the return type to bool. Use false/true
1010 2017-05-17 Marek Polacek <polacek@redhat.com>
1012 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1013 * c-typeck.c: Likewise.
1015 2017-05-17 Marek Polacek <polacek@redhat.com>
1018 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1019 DECL_IGNORED_P even for non-static compound literals.
1021 2017-05-17 Martin Liska <mliska@suse.cz>
1023 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1024 use it instead of int type.
1026 2017-05-17 Marek Polacek <polacek@redhat.com>
1028 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1030 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1031 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1032 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1033 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1035 (c_parser_conditional_expression): Likewise.
1036 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1037 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1038 (process_init_element): Likewise.
1039 (build_binary_op): Likewise.
1040 (handle_omp_array_sections_1): Likewise.
1042 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1044 * c-parser.c (c_parser_omp_clause_num_gangs)
1045 (c_parser_omp_clause_num_workers)
1046 (c_parser_omp_clause_vector_length): Merge functions into...
1047 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1050 2017-05-11 Nathan Sidwell <nathan@acm.org>
1052 * gimple-parser.c: Don't #include tree-dump.h.
1054 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1057 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1059 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1062 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1063 incorrect __MEM syntax.
1065 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1068 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1071 2017-05-09 Nathan Sidwell <nathan@acm.org>
1073 * c-tree.h (pushdecl): Declare.
1075 2017-05-05 David Malcolm <dmalcolm@redhat.com>
1077 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1078 with diagnostic_report_diagnostic.
1079 * c-errors.c (pedwarn_c99): Likewise.
1080 (pedwarn_c90): Likewise.
1082 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1085 * c-gimplify.c (c_gimplify_expr): Remove calls to
1086 cilk_gimplifY_call_params_in_spawned_fn.
1088 2017-04-25 David Malcolm <dmalcolm@redhat.com>
1090 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1091 hint for removing extra semicolon.
1093 2017-04-21 Jakub Jelinek <jakub@redhat.com>
1096 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1097 enabled, set specs->type to integer_type_node.
1099 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
1101 * c-array-notation.c: Fix typo in comment.
1103 2017-03-29 Marek Polacek <polacek@redhat.com>
1106 * c-decl.c (finish_decl): Check VAR_P.
1108 2017-03-27 Jakub Jelinek <jakub@redhat.com>
1111 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1112 * c-typeck.c (c_mark_addressable): Likewise. Look through
1113 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1115 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1117 2017-03-23 Marek Polacek <polacek@redhat.com>
1119 * c-tree.h: Remove a C_RID_YYCODE reference.
1121 2017-03-21 Jakub Jelinek <jakub@redhat.com>
1124 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1125 optional COMPOUND_EXPR with ubsan instrumentation.
1127 2017-03-17 Marek Polacek <polacek@redhat.com>
1129 * c-parser.c: Add C11 references.
1131 2017-03-15 Marek Polacek <polacek@redhat.com>
1133 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1135 2017-03-11 Marek Polacek <polacek@redhat.com>
1137 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1139 2017-03-10 David Malcolm <dmalcolm@redhat.com>
1141 PR translation/79848
1142 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1144 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1146 2017-03-09 Marek Polacek <polacek@redhat.com>
1149 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1150 parameter declarations with initializers.
1152 2017-03-09 Jakub Jelinek <jakub@redhat.com>
1155 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1158 2017-03-07 Jakub Jelinek <jakub@redhat.com>
1161 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1162 for "may only be used in compound statements" diagnostics, change it
1163 such that the same translatable string is used for all pragmas. For
1164 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1166 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1167 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1168 "may only be used in compound statements" diagnostics, such that the
1169 same translatable string is used for all pragmas.
1171 2017-03-04 Marek Polacek <polacek@redhat.com>
1174 * c-decl.c (implicit_decl_warning): Add missing space.
1176 2017-03-03 Marek Polacek <polacek@redhat.com>
1179 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1180 current_function_prototype_arg_types is error_mark_node. Fix
1181 formatting. Use TREE_VALUE instead of TREE_TYPE.
1183 2017-03-03 Jakub Jelinek <jakub@redhat.com>
1186 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1187 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1188 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1192 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1193 instead of %<_Generic>.
1194 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1195 (c_parser_omp_target_exit_data): Use %<release%> instead of
1198 2017-02-28 Jakub Jelinek <jakub@redhat.com>
1200 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1201 instead of just cond ? "..." : "...".
1202 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1203 for "enter"/"exit" keyword.
1204 (c_finish_oacc_routine): Don't use %s to supply portions of the
1207 2017-02-24 Jakub Jelinek <jakub@redhat.com>
1210 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1211 handle -Wrestrict here.
1212 * c-typeck.c (build_function_call_vec): Adjust
1213 check_function_arguments caller.
1215 2017-02-23 Richard Biener <rguenther@suse.de>
1218 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1219 to initialize c_exprs to return.
1220 (c_parser_gimple_binary_expression): Likewise.
1221 (c_parser_gimple_unary_expression): Likewise.
1222 (c_parser_gimple_postfix_expression): Likewise.
1224 2017-02-22 Marek Polacek <polacek@redhat.com>
1227 * c-typeck.c (convert_arguments): Handle error_mark_node.
1229 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1231 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1232 value of c_parser_parse_ssa_name against error_mark_node and emit
1233 error if ssa name is anonymous and written as default definition.
1235 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1237 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1240 2017-02-16 Jakub Jelinek <jakub@redhat.com>
1243 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1244 ignore #pragma omp target even when not followed by identifier.
1246 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1248 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1249 (c_parser_gimple_unary_expression): Likewise.
1251 2017-02-13 Jakub Jelinek <jakub@redhat.com>
1253 * c-parser.c (c_parser_oacc_declare): Add missing space in
1256 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1259 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1260 set_c_expr_source_range when parsing ssa-name.
1262 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1263 Richard Biener <rguenther@suse.de>
1265 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1266 building IL when arguments are error_mark_node.
1267 (c_parser_gimple_unary_expression): Likewise.
1268 (c_parser_gimple_if_stmt): Likewise.
1269 (c_parser_gimple_switch_stmt): Likewise.
1270 (c_parser_gimple_return_stmt): Likewise.
1271 (c_parser_parse_ssa_name): When name lookup fails do not build
1272 an SSA name. Use undeclared rather than not declared in error
1275 2017-02-09 Marek Polacek <polacek@redhat.com>
1278 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1279 instead of c_parser_skip_until_found.
1281 2017-02-09 Jakub Jelinek <jakub@redhat.com>
1284 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1285 symtab_node::get on automatic variables.
1287 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1288 Chung-Lin Tang <cltang@codesourcery.com>
1290 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1291 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1293 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1295 2017-02-07 Richard Biener <rguenther@suse.de>
1297 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1298 (c_parser_gimple_postfix_expression_after_primary):
1299 Do not use c_build_function_call_vec to avoid folding and promotion.
1302 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1305 * c-decl.c (pop_scope): Pass main_input_filename to
1306 build_translation_unit_decl.
1308 2017-01-24 David Malcolm <dmalcolm@redhat.com>
1310 * c-parser.c: Include "read-rtl-function.h" and
1312 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1313 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1314 production. Update for renaming of field "gimple_pass" to
1315 "gimple_or_rtl_pass". If __RTL was seen, call
1316 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1317 to an auto_timevar, to cope with early exit.
1318 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1319 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1320 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1322 (c_parser_parse_rtl_body): New function.
1323 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1324 (struct c_declspecs): Rename field "gimple_pass" to
1325 "gimple_or_rtl_pass". Add field "rtl_p".
1326 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1327 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1328 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1329 (c_parser_gimple_or_rtl_pass_list): ...this.
1331 2017-01-20 Marek Polacek <polacek@redhat.com>
1334 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1336 2017-01-13 Richard Biener <rguenther@suse.de>
1338 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1341 2017-01-13 Richard Biener <rguenther@suse.de>
1343 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1344 _Literal ( type-name ) number.
1346 2017-01-12 Richard Biener <rguenther@suse.de>
1348 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1351 2017-01-11 Jakub Jelinek <jakub@redhat.com>
1354 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1357 2017-01-11 Richard Biener <rguenther@suse.de>
1360 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1361 returns on parse errors.
1363 2017-01-04 Marek Polacek <polacek@redhat.com>
1366 * c-parser.c (c_parser_postfix_expression): Mark zero character
1367 constants by setting original_type in c_expr.
1368 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1369 with a zero character constant.
1370 (char_type_p): New function.
1372 2017-01-04 David Malcolm <dmalcolm@redhat.com>
1374 * c-parser.c (c_parser_declaration_or_fndef): Create a
1375 rich_location at init_loc and parse it to start_init.
1376 (last_init_list_comma): New global.
1377 (c_parser_braced_init): Update last_init_list_comma when parsing
1378 commas. Pass it to pop_init_level. Pass location of closing
1379 brace to pop_init_level.
1380 (c_parser_postfix_expression_after_paren_type): Create a
1381 rich_location at type_loc and parse it to start_init.
1382 (c_parser_omp_declare_reduction): Likewise for loc.
1383 * c-tree.h (start_init): Add rich_location * param.
1384 (pop_init_level): Add location_t param.
1385 * c-typeck.c (struct initializer_stack): Add field
1386 "missing_brace_richloc".
1387 (start_init): Add richloc param, use it to initialize
1388 the stack node's missing_brace_richloc.
1389 (last_init_list_comma): New decl.
1390 (finish_implicit_inits): Pass last_init_list_comma to
1392 (push_init_level): When finding missing open braces, add fix-it
1393 hints to the richloc.
1394 (pop_init_level): Add "insert_before" param and pass it
1395 when calling pop_init_level. Add fixits about missing
1396 close braces to any richloc. Use the richloc for the
1397 -Wmissing-braces warning.
1398 (set_designator): Pass last_init_list_comma to pop_init_level.
1399 (process_init_element): Likewise.
1401 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1403 Update copyright years.
1405 2016-12-21 Jakub Jelinek <jakub@redhat.com>
1408 * c-typeck.c (build_function_call_vec): If check_function_arguments
1409 returns true, set TREE_NO_WARNING on CALL_EXPR.
1412 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1413 to *expr instead of overwriting it.
1415 2016-12-20 Richard Biener <rguenther@suse.de>
1417 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1419 (c_parser_gimple_statement): Only build assigns for non-error
1421 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1423 2016-12-14 Martin Jambor <mjambor@suse.cz>
1425 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1427 (c_finish_oacc_routine): Adjusted call to
1428 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1429 to use their new names.
1430 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1432 (c_parser_oacc_update): Likewise.
1433 (c_parser_omp_simd): Likewise.
1434 (c_parser_omp_target_update): Likewise.
1435 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1436 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1438 (c_finish_omp_cancellation_point): Likewise.
1439 * gimple-parser.c: Do not include omp-low.h
1441 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1442 James Norris <jnorris@codesourcery.com>
1444 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1445 EXIT_DATA,WAIT} are not used in compound statements.
1446 (c_parser_oacc_enter_exit_data): Update diagnostics.
1448 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1451 * c-decl.c (diagnose_mismatched_decls): Use
1452 OPT_Wbuiltin_declaration_mismatch here too.
1454 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
1455 Alan Hayward <alan.hayward@arm.com>
1456 David Sherwood <david.sherwood@arm.com>
1458 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1459 (make_label, finish_struct): Likewise.
1461 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
1462 Richard Biener <rguenther@suse.de>
1464 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1465 * config-lang.in (gtfiles): Add c/c-parser.h.
1466 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1467 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1468 * c-parser.c (enum c_id_kind, struct c_token,
1469 c_parser_next_token_is, c_parser_next_token_is_not,
1470 c_parser_next_token_is_keyword,
1471 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1473 * c-parser.h: ... new header.
1474 * c-parser.c: Include c-parser.h and gimple-parser.h.
1475 (c_parser_peek_token, c_parser_peek_2nd_token,
1476 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1477 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1478 c_parser_error, c_parser_require, c_parser_skip_until_found,
1479 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1480 c_parser_type_name): Export.
1481 (c_parser_tokens_buf): New function.
1482 (c_parser_error): Likewise.
1483 (c_parser_set_error): Likewise.
1484 (c_parser_declspecs): Handle RID_GIMPLE.
1485 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1486 via c_parser_parse_gimple_body.
1487 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1488 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1489 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1490 c_parser_error, c_parser_require, c_parser_skip_until_found,
1491 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1492 c_parser_type_name): Declare.
1493 (struct c_parser): Declare forward.
1494 (c_parser_tokens_buf): Declare.
1495 (c_parser_error): Likewise.
1496 (c_parser_set_error): Likewise.
1497 * gimple-parser.c: New file.
1498 * gimple-parser.h: Likewise.
1500 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1503 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1506 2016-09-11 Le-Chun Wu <lcwu@google.com>
1507 Mark Wielaard <mjw@redhat.com>
1509 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1510 to the given -Wshadow= variant.
1512 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1514 * c-typeck.c: Include memmodel.h.
1516 2016-10-13 Jakub Jelinek <jakub@redhat.com>
1519 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1520 instead of lhd_return_null_tree_v.
1522 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1525 * c-decl.c (smallest_type_quals_location): New static function.
1526 (grokdeclarator): Try to find the correct location for an ignored
1529 2016-09-26 Marek Polacek <polacek@redhat.com>
1532 * c-decl.c (pop_scope): Add gcc_fallthrough.
1534 2016-09-26 Marek Polacek <polacek@redhat.com>
1537 * c-parser.c (struct c_token): Add flags field.
1538 (c_lex_one_token): Pass it to c_lex_with_flags.
1539 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1540 into IFN_FALLTHROUGH.
1541 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1542 attribute fallthrough after a case label or default label.
1543 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1545 2016-09-24 Marek Polacek <polacek@redhat.com>
1548 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1549 have boolean value. Warn about ++/-- on booleans.
1551 2016-09-23 Jakub Jelinek <jakub@redhat.com>
1553 * c-parser.c (incomplete_record_decls): Remove unnecessary
1554 = vNULL initialization of file scope vec.
1556 2016-09-16 Marek Polacek <polacek@redhat.com>
1558 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1560 2016-09-14 Marek Polacek <polacek@redhat.com>
1562 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1563 (fix_array_notation_expr): Likewise.
1564 * c-decl.c (finish_decl): Likewise.
1565 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1566 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1567 (function_to_pointer_conversion): Use false instead of 0.
1568 (convert_lvalue_to_rvalue): Likewise.
1569 (parser_build_unary_op): Likewise.
1570 (build_atomic_assign): Likewise.
1571 (build_unary_op): Change nonconvert parameter type to bool, use
1572 true/false instead of 1/0.
1573 (build_binary_op): Use true instead of 1.
1575 2016-09-13 David Malcolm <dmalcolm@redhat.com>
1577 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1578 of add_fixit_insert to add_fixit_insert_before.
1580 2016-09-13 Marek Polacek <polacek@redhat.com>
1582 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1585 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1588 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1589 COMPOUND_EXPR to warn_for_omitted_condop.
1591 2016-09-07 David Malcolm <dmalcolm@redhat.com>
1593 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1594 c_get_substring_location for this new langhook.
1596 2016-09-02 Jakub Jelinek <jakub@redhat.com>
1599 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1601 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1602 instead of mark_exp_read on low_bound/length expression.
1603 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1604 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1605 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1606 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1607 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1608 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1609 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1610 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1611 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1612 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1613 instead of mark_expr_read.
1614 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1615 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1616 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1617 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1618 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1619 array section bases outside of depend clause, for depend clause
1620 use convert_lvalue_to_rvalue on the base.
1621 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1622 linear, aligned, map, to and from clauses.
1623 (c_omp_clause_copy_ctor): New function.
1625 2016-09-01 Marek Polacek <polacek@redhat.com>
1628 * c-typeck.c (composite_type): Add FALLTHRU comment.
1630 2016-08-31 David Malcolm <dmalcolm@redhat.com>
1632 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1633 to the insertion fixits for "struct", "union", and "enum".
1635 2016-08-30 David Malcolm <dmalcolm@redhat.com>
1637 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1638 rather than add_fixit_misspelled_id.
1639 (undeclared_variable): Likewise.
1640 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1641 now-redundant "here" params from add_fixit_insert method calls.
1642 (c_parser_parameter_declaration): Likewise.
1643 * c-typeck.c (build_component_ref): Remove now-redundant range
1644 param from add_fixit_replace method calls.
1646 2016-08-25 Marek Polacek <polacek@redhat.com>
1648 * c-typeck.c (parser_build_binary_op): Pass LHS to
1649 warn_logical_not_parentheses.
1651 2016-08-25 Marek Polacek <polacek@redhat.com>
1654 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1655 or _FloatN or _FloatNx is not supported.
1656 (finish_declspecs): Set type to integer_type_node when _FloatN or
1657 _FloatNx is not supported.
1659 2016-08-19 Joseph Myers <joseph@codesourcery.com>
1662 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1663 (struct c_declspecs): Add field floatn_nx_idx.
1664 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1665 and _FloatNx type specifiers.
1666 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1667 (c_parser_declspecs, c_parser_attribute_any_word)
1668 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1669 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1670 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1671 narrower than double.
1673 2016-08-12 Jakub Jelinek <jakub@redhat.com>
1674 Martin Liska <mliska@suse.cz>
1677 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1678 % to determine val element to change. Assert that
1679 wchar_bytes * charwidth fits into val array.
1681 2016-08-12 Marek Polacek <polacek@redhat.com>
1684 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1685 (c_parser_postfix_expression): Likewise.
1686 * c-typeck.c (build_unary_op): Adjust fall through comment.
1687 (c_mark_addressable): Likewise.
1689 2016-08-11 Jakub Jelinek <jakub@redhat.com>
1692 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1693 array member through typedef, for orig_qual_indirect == 0 clear
1696 2016-08-08 David Malcolm <dmalcolm@redhat.com>
1699 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1700 this up to selftest::run_c_tests.
1701 (selftest::run_c_tests): New function.
1703 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1705 * c-parser.c (struct oacc_routine_data): Add error_seen and
1706 fndecl_seen members.
1707 (c_finish_oacc_routine): Use these.
1708 (c_parser_declaration_or_fndef): Adjust.
1709 (c_parser_oacc_routine): Likewise. Support more C language
1710 constructs, and improve diagnostics. Move pragma context
1712 (c_parser_pragma): ... here.
1714 * c-parser.c (struct oacc_routine_data): New.
1715 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1717 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1718 declare target" attribute.
1720 2016-08-01 Jan Beulich <jbeulich@suse.com>
1722 * c-fold.c (c_fully_fold_internal): Also emit shift count
1723 warnings for vector types.
1724 * c-typeck.c (build_binary_op): Likewise.
1726 2016-07-29 Marek Polacek <polacek@redhat.com>
1729 * c-decl.c (finish_struct): Rephrase an error message.
1732 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1733 to error node for invalid code.
1736 * c-decl.c (implicitly_declare): Return decl early not only for
1737 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1739 2016-07-29 Jakub Jelinek <jakub@redhat.com>
1742 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1743 on GNU extern inline functions.
1745 2016-07-29 Marek Polacek <polacek@redhat.com>
1748 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1751 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
1753 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1755 2016-07-20 David Malcolm <dmalcolm@redhat.com>
1757 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1759 (best_macro_match): Likewise, converting from a typedef to a
1761 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1762 (lookup_name_fuzzy): Update for change of best_macro_match to a
1763 subclass with a ctor that calls cpp_forall_identifiers.
1765 2016-07-20 David Malcolm <dmalcolm@redhat.com>
1767 * c-decl.c (implicit_decl_warning): Update for conversion of
1768 return type of lookup_name_fuzzy to const char *.
1769 (undeclared_variable): Likewise.
1770 (lookup_name_fuzzy): Convert return type from tree to
1772 * c-parser.c (c_parser_declaration_or_fndef): Update for
1773 conversion of return type of lookup_name_fuzzy to const char *.
1774 (c_parser_parameter_declaration): Likewise.
1776 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1778 * c-parser.c (c_parser_oacc_declare): Don't scan for
1780 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1781 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1782 zero-length subarrays.
1784 2016-07-15 Jakub Jelinek <jakub@redhat.com>
1787 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1788 instead of FUZZY_LOOKUP_NAME.
1789 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1790 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1792 2016-07-14 Jakub Jelinek <jakub@redhat.com>
1795 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1797 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1799 * c-parser.c (c_parser_generic_selection): Make type of variable
1801 (c_parser_omp_declare_simd): Likewise.
1803 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1805 * c-decl.c (struct c_struct_parse_info): Change member types
1806 from vec to auto_vec.
1807 (start_struct): Adjust.
1808 (finish_struct): Likewise.
1810 2016-07-02 Jakub Jelinek <jakub@redhat.com>
1813 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1815 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1817 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1818 Move pragma context checking into...
1819 (c_parser_omp_cancellation_point): ... here, and improve
1820 diagnostic messages.
1821 * c-typeck.c (c_finish_omp_cancel)
1822 (c_finish_omp_cancellation_point): Improve diagnostic messages.
1824 2016-06-29 Jakub Jelinek <jakub@redhat.com>
1827 * c-typeck.c (c_build_qualified_type): Don't clear
1828 C_TYPE_INCOMPLETE_VARS for the main variant.
1830 2016-06-28 Martin Sebor <msebor@redhat.com>
1833 * c-typeck.c (output_init_element): Diagnose incompatible types
1834 before non-constant initializers.
1836 2016-06-28 Jakub Jelinek <jakub@redhat.com>
1838 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1840 2016-06-23 Andi Kleen <ak@linux.intel.com>
1842 * Make-lang.in: Add support for autofdo.
1844 2016-06-22 David Malcolm <dmalcolm@redhat.com>
1847 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1848 (implicit_decl_warning): When issuing warnings for implicit
1849 declarations, attempt to provide a suggestion via
1851 (undeclared_variable): Likewise when issuing errors.
1852 (lookup_name_in_scope): Likewise.
1853 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1854 (best_macro_match): New typedef.
1855 (find_closest_macro_cpp_cb): New function.
1856 (lookup_name_fuzzy): New function.
1857 * c-parser.c: Include gcc-rich-location.h.
1858 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1859 (c_keyword_starts_typename): ...this new function.
1860 (c_parser_declaration_or_fndef): When issuing errors about
1861 missing "struct" etc, add a fixit. For other kinds of errors,
1862 attempt to provide a suggestion via lookup_name_fuzzy.
1863 (c_parser_parms_declarator): When looking ahead to detect typos in
1864 type names, also reject CPP_KEYWORD.
1865 (c_parser_parameter_declaration): When issuing errors about
1866 unknown type names, attempt to provide a suggestion via
1868 * c-tree.h (c_keyword_starts_typename): New prototype.
1870 2016-06-20 Joseph Myers <joseph@codesourcery.com>
1873 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1874 c_common_type returns error_mark_node.
1876 2016-06-19 Martin Sebor <msebor@redhat.com>
1879 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1880 __alignof__ (expression).
1882 2016-06-14 David Malcolm <dmalcolm@redhat.com>
1884 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1886 2016-06-14 David Malcolm <dmalcolm@redhat.com>
1888 * c-typeck.c (build_component_ref): Simplify fixit code by
1889 using gcc_rich_location::add_fixit_misspelled_id.
1890 (set_init_label): Likewise.
1892 2016-06-13 David Malcolm <dmalcolm@redhat.com>
1894 * c-parser.c (c_parser_initelt): Provide location of name for new
1895 location_t param of set_init_label.
1896 * c-tree.h (set_init_label): Add location_t param.
1897 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1898 param and use it when issuing error messages about unrecognized
1899 field names. Attempt to provide a fixit hint if appropriate,
1900 otherwise update the error message to provide the type name.
1902 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1905 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1908 2016-06-08 Martin Sebor <msebor@redhat.com>
1909 Jakub Jelinek <jakub@redhat.com>
1913 * c-typeck.c (convert_arguments): Don't promote last argument
1914 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1916 2016-06-08 Marek Polacek <polacek@redhat.com>
1919 * c-decl.c (grokdeclarator): Check TYPE_P.
1922 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1925 2016-06-07 David Malcolm <dmalcolm@redhat.com>
1927 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1928 and structure element reference, capture the location of the
1929 element name token and pass it to build_component_ref.
1930 (c_parser_postfix_expression_after_primary): Likewise for
1931 structure element dereference.
1932 (c_parser_omp_variable_list): Likewise for
1933 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1934 * c-tree.h (build_component_ref): Add location_t param.
1935 * c-typeck.c (build_component_ref): Add location_t param
1936 COMPONENT_LOC. Use it, if available, when issuing hints about
1937 mispelled member names to provide a fixit replacement hint.
1939 2016-06-06 Marek Polacek <polacek@redhat.com>
1942 * c-parser.c (c_parser_direct_declarator): Set location.
1944 2016-06-06 Marek Polacek <polacek@redhat.com>
1946 * c-typeck.c (comptypes_internal): Handle comparisons of
1947 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1948 TYPE_REF_CAN_ALIAS_ALL.
1950 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1952 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1953 arguments as addressable when async clause exists.
1955 2016-05-30 Jakub Jelinek <jakub@redhat.com>
1958 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1959 when combined with target construct.
1961 2016-05-26 Jakub Jelinek <jakub@redhat.com>
1963 * c-parser.c (c_parser_omp_clause_schedule): Warn if
1964 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1966 2016-05-25 Marek Polacek <polacek@redhat.com>
1969 * c-decl.c (c_make_fname_decl): Don't check seen_error.
1972 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1974 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
1976 * c-parser.c (c_parser_oacc_declare): Add support for
1977 GOMP_MAP_FIRSTPRIVATE_POINTER.
1978 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1979 argument with enum c_omp_region_type ort.
1980 (handle_omp_array_sections): Likewise. Update call to
1981 handle_omp_array_sections_1.
1982 (c_finish_omp_clauses): Add specific errors and warning messages for
1983 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
1984 call to handle_omp_array_sections.
1986 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
1988 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1990 2016-05-24 Richard Biener <rguenther@suse.de>
1994 * c-typeck.c (build_array_ref): Do not complain about indexing
1995 non-lvalue vectors. Adjust for function name change.
1997 2016-05-20 Martin Sebor <msebor@redhat.com>
2000 * c-typeck.c (error_init): Use
2001 expansion_point_location_if_in_system_header.
2002 (warning_init): Same.
2004 2016-05-19 David Malcolm <dmalcolm@redhat.com>
2007 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2009 (c_parser_postfix_expression): Likewise.
2010 * c-tree.h (c_expr::set_error): New method.
2011 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2012 that result's range is initialized.
2014 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2016 * c-typeck.c (parser_build_unary_op): Fix formatting.
2018 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2020 * c-decl.c (grokdeclarator): Remove errmsg and use of
2021 targetm.invalid_return_type.
2022 (grokparms): Remove errmsg and use of
2023 targetm.invalid_parameter_type.
2025 2016-05-13 Joseph Myers <joseph@codesourcery.com>
2027 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2028 function return type.
2030 2016-05-12 Marek Polacek <polacek@redhat.com>
2033 * c-decl.c (build_compound_literal): Pass LOC down to
2034 c_incomplete_type_error.
2035 * c-tree.h (require_complete_type): Adjust declaration.
2036 (c_incomplete_type_error): Likewise.
2037 * c-typeck.c (require_complete_type): Add location parameter, pass it
2038 down to c_incomplete_type_error.
2039 (c_incomplete_type_error): Add location parameter, pass it down to
2041 (build_component_ref): Pass location down to c_incomplete_type_error.
2042 (default_conversion): Pass location down to require_complete_type.
2043 (build_array_ref): Likewise.
2044 (build_function_call_vec): Likewise.
2045 (convert_arguments): Likewise.
2046 (build_unary_op): Likewise.
2047 (build_c_cast): Likewise.
2048 (build_modify_expr): Likewise.
2049 (convert_for_assignment): Likewise.
2050 (c_finish_omp_clauses): Likewise.
2052 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2055 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2057 * c-errors.c (pedwarn_c90): Return true if warned.
2058 * c-tree.h (pedwarn_c90): Change return type to bool.
2059 (enum c_declspec_word): Add new enumerator cdw_atomic.
2061 2016-05-11 Marek Polacek <polacek@redhat.com>
2064 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2065 diagnose_mismatched_attributes and call it.
2067 2016-05-10 Marek Polacek <polacek@redhat.com>
2070 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2071 on a declaration following the definition.
2073 2016-05-05 Jakub Jelinek <jakub@redhat.com>
2075 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2076 parse it through to c_parser_c99_block_statement.
2077 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2080 2016-05-04 Marek Polacek <polacek@redhat.com>
2082 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2085 2016-05-04 Marek Polacek <polacek@redhat.com>
2088 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2089 for macro expansions.
2091 2016-05-03 Marek Polacek <polacek@redhat.com>
2094 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2095 check_builtin_function_arguments.
2097 2016-05-03 Richard Biener <rguenther@suse.de>
2099 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2100 the checksum from the previous stage.
2102 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2104 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2105 c_finish_omp_clauses.
2106 (c_parser_omp_all_clauses): Likewise.
2107 (c_parser_oacc_cache): Likewise.
2108 (c_parser_oacc_loop): Likewise.
2109 (omp_split_clauses): Likewise.
2110 (c_parser_omp_declare_target): Likewise.
2111 (c_parser_cilk_all_clauses): Likewise.
2112 (c_parser_cilk_for): Likewise.
2113 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2114 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2116 2016-05-02 Marek Polacek <polacek@redhat.com>
2119 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2122 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2125 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2126 OACC_LOOP_CLAUSE_MASK.
2127 (c_parser_oacc_kernels_parallel): Update call to
2128 c_oacc_split_loop_clauses.
2130 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
2132 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2133 argument to build_modify_expr in two cases.
2135 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2137 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2138 warn_for_memset instead of warning directly here.
2140 2016-04-26 Marek Polacek <polacek@redhat.com>
2143 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2145 (c_parser_for_statement): ... here.
2146 (c_parser_if_statement): Use it.
2147 (c_parser_switch_statement): Use it.
2148 (c_parser_while_statement): Use it.
2151 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2153 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2156 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2157 instead of c_finish_cilk_clauses.
2158 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2159 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2160 floating-point variables in the linear clause for Cilk Plus.
2162 2016-04-18 Michael Matz <matz@suse.de>
2164 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2165 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2167 2016-04-15 Marek Polacek <polacek@redhat.com>
2170 * c-typeck.c (build_unary_op): Pass location down to error and
2173 2016-04-15 Jakub Jelinek <jakub@redhat.com>
2176 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2178 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2179 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2180 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2181 Adjust c_parser_pragma callers.
2182 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2184 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2186 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2187 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2188 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2189 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2190 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2191 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2192 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2193 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2195 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2196 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2199 2016-04-13 Marek Polacek <polacek@redhat.com>
2202 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2204 (c_parser_statement): Likewise.
2205 (c_parser_c99_block_statement): Likewise.
2206 (c_parser_while_statement): Likewise.
2207 (c_parser_for_statement): Likewise.
2208 (c_parser_if_body): Don't set IF_P here.
2209 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2210 about dangling else here.
2211 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2212 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2213 warn about dangling else here.
2215 2016-04-04 Marek Polacek <polacek@redhat.com>
2218 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2220 2016-03-31 Marek Polacek <polacek@redhat.com>
2223 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2225 2016-03-18 David Malcolm <dmalcolm@redhat.com>
2228 * c-parser.c (c_parser_postfix_expression): Set the source range
2229 for uses of "__builtin_types_compatible_p".
2231 2016-03-17 Jakub Jelinek <jakub@redhat.com>
2234 * c-typeck.c (composite_type): Don't count void_list_node
2235 into len, if the list is terminated by void_list_node, start
2236 with void_list_node instead of NULL for newargs. Stop
2239 2016-03-16 Marek Polacek <polacek@redhat.com>
2242 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2243 nested functions returning VM types.
2245 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2247 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2248 when calling c_finish_omp_clauses.
2250 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2253 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2256 2016-03-04 Marek Polacek <polacek@redhat.com>
2259 * c-parser.c (c_parser_postfix_expression): Call
2260 c_parser_cast_expression rather than c_parser_postfix_expression.
2262 2016-03-01 Jakub Jelinek <jakub@redhat.com>
2266 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2267 of incomplete decls to error_mark_node.
2269 2016-02-24 Marek Polacek <polacek@redhat.com>
2272 * c-decl.c (finish_decl): Don't update the copy of the type of a
2273 different decl type.
2275 2016-02-23 Jakub Jelinek <jakub@redhat.com>
2278 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2279 in id_kind reclassification.
2281 2016-02-16 Jakub Jelinek <jakub@redhat.com>
2284 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2286 2016-02-16 James Norris <jnorris@codesourcery.com>
2289 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2291 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2293 * c-decl.c (build_null_declspecs): Zero the entire struct.
2296 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2297 callers changed. If nested_p is true, use it to call
2298 finish_implicit_inits.
2299 * c-tree.h (finish_implicit_inits): Declare.
2300 * c-typeck.c (finish_implicit_inits): New function. Move code
2302 (push_init_level): ... here.
2303 (set_designator, process_init_element): Call finish_implicit_inits.
2305 2016-02-11 Jakub Jelinek <jakub@redhat.com>
2308 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2309 arguments for -Waddress warning.
2311 2016-02-04 Jakub Jelinek <jakub@redhat.com>
2314 * c-decl.c (finish_enum): When honoring mode attribute,
2315 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2317 2016-01-29 Jakub Jelinek <jakub@redhat.com>
2320 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2321 all type variants, not just TYPE_MAIN_VARIANT.
2323 2016-01-27 Jakub Jelinek <jakub@redhat.com>
2326 * c-decl.c (c_write_global_declarations_1): Warn with
2327 warn_unused_function if static prototype without definition
2330 2016-01-27 Marek Polacek <polacek@redhat.com>
2333 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2334 to unsigned, if needed. Add -Wsign-compare warning.
2336 2016-01-26 Jakub Jelinek <jakub@redhat.com>
2338 PR tree-optimization/69483
2339 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2341 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2344 * c-tree.h (incomplete_record_decls): Declare.
2345 * c-parser.c (incomplete_record_decls): Define.
2346 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2347 report error if any decl has zero size.
2348 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2349 or enum type to incomplete_record_decls.
2351 2016-01-14 Tom de Vries <tom@codesourcery.com>
2353 PR tree-optimization/68773
2354 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2357 2016-01-14 Marek Polacek <polacek@redhat.com>
2360 * c-decl.c (grokdeclarator): Provide more information for invalid
2363 2016-01-06 David Malcolm <dmalcolm@redhat.com>
2365 * c-parser.c (c_parser_unary_expression): For dereferences, build
2366 a combined location before calling build_indirect_ref, so that
2367 error reports cover the full range, manually updating the c_expr
2370 2016-01-06 Marek Polacek <polacek@redhat.com>
2373 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2374 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2377 2016-01-04 Jakub Jelinek <jakub@redhat.com>
2379 Update copyright years.
2381 2016-01-04 Marek Polacek <polacek@redhat.com>
2384 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2385 optimization to use __atomic_fetch_* built-in if possible.
2387 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2389 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2391 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2394 2015-12-22 Marek Polacek <polacek@redhat.com>
2397 * c-typeck.c (build_component_ref): Warn when acessing elements of
2398 atomic structures or unions.
2400 2015-12-21 David Malcolm <dmalcolm@redhat.com>
2402 * c-typeck.c: Include "gcc-rich-location.h".
2403 (build_binary_op): In the two places that call binary_op_error,
2404 create a gcc_rich_location and populate it with the location of
2405 the binary op and its two operands.
2407 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2409 * c-parser.c (c_parser_statement_after_labels): When calling
2410 c_finish_return, Use the return expression's location if it has
2411 one, falling back to the location of the first token within it.
2412 * c-typeck.c (c_finish_return): When issuing warnings about
2413 the incorrect presence/absence of a return value, issue a note
2414 showing the declaration of the function.
2416 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2418 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2420 (c_parser_peek_nth_token): New function.
2421 (c_parser_peek_conflict_marker): New function.
2422 (c_parser_error): Detect conflict markers and report them as such.
2424 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2426 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2427 to preserve range information for the primary expression
2428 in the call to c_parser_postfix_expression_after_primary.
2430 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2432 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2433 expression location, falling back on the first token location,
2434 rather than always using the latter.
2436 2015-12-16 Marek Polacek <polacek@redhat.com>
2439 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2442 2015-12-15 Marek Polacek <polacek@redhat.com>
2445 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2448 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2450 * c-parser.c (c_parser_alignof_expression): Capture location of
2451 closing parenthesis (if any), or of end of unary expression, and
2452 use it to build a src_range for the expression.
2454 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2457 * c-parser.c (c_parser_get_builtin_args): Add
2458 "out_close_paren_loc" param, and write back to it.
2459 (c_parser_postfix_expression): Capture the closing
2460 parenthesis location for RID_CHOOSE_EXPR,
2461 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2462 RID_BUILTIN_SHUFFLE and use it to set the source range
2463 for such expressions; within RID_BUILTIN_COMPLEX set
2464 the underlying location.
2466 2015-12-07 Marek Polacek <polacek@redhat.com>
2469 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2470 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2472 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2474 * c-tree.h (c_build_va_arg): Adjust prototype.
2475 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2476 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2477 parameter, adjust throughout and issue an error if EXPR is a component
2478 with reverse storage order.
2480 2015-12-02 Jason Merrill <jason@redhat.com>
2482 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2483 (c_fully_fold_internal, decl_constant_value_for_optimization):
2484 Move from c-common.c.
2485 * c-tree.h: Declare decl_constant_value_for_optimization.
2486 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2488 2015-12-02 Joseph Myers <joseph@codesourcery.com>
2491 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2492 following link from declarator to next declarator. Track original
2493 qualified type and pass it to c_build_qualified_type.
2494 * c-typeck.c (c_build_qualified_type): Add arguments
2495 orig_qual_type and orig_qual_indirect.
2497 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2499 * c-parser.c (c_parser_omp_clause_name)
2500 (c_parser_oacc_all_clauses): Alphabetical sorting.
2502 2015-12-02 Jakub Jelinek <jakub@redhat.com>
2505 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2508 2015-12-01 Julian Brown <julian@codesourcery.com>
2509 Cesar Philippidis <cesar@codesourcery.com>
2510 James Norris <James_Norris@mentor.com>
2512 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2513 (c_parser_oacc_clause_use_device): New function.
2514 (c_parser_oacc_all_clauses): Add use_device support.
2515 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2516 (c_parser_oacc_host_data): New function.
2517 (c_parser_omp_construct): Add host_data support.
2518 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2519 * c-typeck.c (c_finish_oacc_host_data): New function.
2520 (c_finish_omp_clauses): Add use_device support.
2522 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
2525 * c-decl.c: Set TYPE_PACKED in variants.
2527 2015-11-27 Martin Liska <mliska@suse.cz>
2530 * c-array-notation.c (fix_builtin_array_notation_fn):
2531 Use release_vec_vec instead of vec::release.
2532 (build_array_notation_expr): Likewise.
2533 (fix_conditional_array_notations_1): Likewise.
2534 (fix_array_notation_expr): Likewise.
2535 (fix_array_notation_call_expr): Likewise.
2537 2015-11-27 Jakub Jelinek <jakub@redhat.com>
2540 * c-parser.c (c_parser_compound_statement_nostart): If
2541 last_label is true, use pragma_stmt instead of pragma_compound
2542 as second c_parser_pragma argument.
2543 (c_parser_omp_ordered, c_parser_omp_target_update,
2544 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2545 false as second argument to c_parser_skip_to_pragma_eol after
2546 diagnosing standalone directives used in pragma_stmt context.
2548 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2550 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2551 with "if (ENABLE_OFFLOADING)".
2553 2015-11-23 David Malcolm <dmalcolm@redhat.com>
2556 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2557 for various Objective-C constructs: Class.name syntax,
2558 @selector(), @protocol(), @encode(), and [] message syntax.
2560 2015-11-20 David Malcolm <dmalcolm@redhat.com>
2563 * c-typeck.c (should_suggest_deref_p): New function.
2564 (build_component_ref): Special-case POINTER_TYPE when
2565 generating a "not a structure of union" error message, and
2566 suggest a "->" rather than a ".", providing a fix-it hint.
2568 2015-11-19 David Malcolm <dmalcolm@redhat.com>
2570 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2571 candidate into a new function, find_closest_identifier.
2573 2015-11-19 Marek Polacek <polacek@redhat.com>
2576 * c-typeck.c (parser_build_binary_op): Properly handle
2577 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2579 2015-11-17 David Malcolm <dmalcolm@redhat.com>
2581 * c-parser.c (set_c_expr_source_range): Bulletproof both
2582 overloaded implementations against NULL expr->value.
2583 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2585 (c_parser_unary_expression): Likewise when handling addresses of
2587 (c_parser_postfix_expression): Likewise for statement expressions,
2588 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2589 __builtin_va_arg, and for __builtin_offset_of.
2590 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2591 src_range using the range of the braced initializer.
2592 (c_parser_transaction_expression): Set src_range for "ret" to a
2593 sane pair of values.
2595 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2597 * c-parser.c (c_finish_omp_declare_simd): Look for
2598 "simd" attribute as well. Update error message.
2600 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2602 * c-parser.c (c_parser_omp_declare_target): Adjust.
2604 2015-11-14 Jakub Jelinek <jakub@redhat.com>
2606 * c-typeck.c (c_finish_omp_clauses): Don't mark
2607 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2609 2015-11-14 Marek Polacek <polacek@redhat.com>
2611 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2612 * c-typeck.c: Likewise.
2614 2015-11-13 David Malcolm <dmalcolm@redhat.com>
2616 * c-decl.c (warn_defaults_to): Pass line_table to
2618 * c-errors.c (pedwarn_c99): Likewise.
2619 (pedwarn_c90): Likewise.
2620 * c-parser.c (set_c_expr_source_range): New functions.
2621 (c_token::get_range): New method.
2622 (c_token::get_finish): New method.
2623 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2624 based on the range from the start of the LHS to the end of the
2626 (c_parser_conditional_expression): Likewise, based on the range
2627 from the start of the cond.value to the end of exp2.value.
2628 (c_parser_binary_expression): Call set_c_expr_source_range on
2629 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2630 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2631 based on the cast_loc through to the end of the expr.
2632 (c_parser_unary_expression): Likewise, based on the
2633 op_loc through to the end of op.
2634 (c_parser_sizeof_expression) Likewise, based on the start of the
2635 sizeof token through to either the closing paren or the end of
2637 (c_parser_postfix_expression): Likewise, using the token range,
2638 or from the open paren through to the close paren for
2639 parenthesized expressions.
2640 (c_parser_postfix_expression_after_primary): Likewise, for
2641 various kinds of expression.
2642 * c-tree.h (struct c_expr): Add field "src_range".
2643 (c_expr::get_start): New method.
2644 (c_expr::get_finish): New method.
2645 (set_c_expr_source_range): New decls.
2646 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2647 on ret for prefix unary ops.
2648 (parser_build_binary_op): Likewise, running from the start of
2649 arg1.value through to the end of arg2.value.
2651 2015-11-13 Marek Polacek <polacek@redhat.com>
2654 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2656 2015-11-13 David Malcolm <dmalcolm@redhat.com>
2658 * c-typeck.c: Include spellcheck.h.
2659 (lookup_field_fuzzy_find_candidates): New function.
2660 (lookup_field_fuzzy): New function.
2661 (build_component_ref): If the field was not found, try using
2662 lookup_field_fuzzy and potentially offer a suggestion.
2664 2015-11-12 James Norris <jnorris@codesourcery.com>
2665 Joseph Myers <joseph@codesourcery.com>
2667 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2668 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2669 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2670 and PRAGMA_OMP_CLAUSE_LINK.
2671 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2672 and PRAGMA_OACC_CLAUSE_LINK.
2673 (OACC_DECLARE_CLAUSE_MASK): New definition.
2674 (c_parser_oacc_declare): New function.
2676 2015-11-12 Marek Polacek <polacek@redhat.com>
2679 * c-parser.c (c_parser_for_statement): Reclassify the token in
2682 2015-11-11 Marek Polacek <polacek@redhat.com>
2686 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2687 checking the size of an array.
2689 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
2691 * c-array-notation.c: Remove unused header files.
2692 * c-aux-info.c: Likewise.
2693 * c-convert.c: Likewise.
2694 * c-decl.c: Likewise.
2695 * c-errors.c: Likewise.
2696 * c-lang.c: Likewise.
2697 * c-objc-common.c: Likewise.
2698 * c-parser.c: Likewise.
2699 * c-typeck.c: Likewise.
2700 * gccspec.c: Likewise.
2702 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2703 Cesar Philippidis <cesar@codesourcery.com>
2704 James Norris <jnorris@codesourcery.com>
2705 Julian Brown <julian@codesourcery.com>
2706 Nathan Sidwell <nathan@codesourcery.com>
2709 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2711 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2712 (c_parser_pragma): Parse 'acc routine'.
2713 (OACC_ROUTINE_CLAUSE_MARK): Define.
2714 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2716 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2719 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2720 location of the backward-goto to the start of the loop body.
2722 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2725 * c-parser.c (c_parser_while_statement): Finish the loop before
2726 parsing ahead for misleading indentation.
2727 (c_parser_for_statement): Likewise.
2729 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2731 * c-decl.c (finish_struct): If the structure has reverse storage
2732 order, rewrite the type of array fields with scalar component. Call
2733 maybe_apply_pragma_scalar_storage_order on entry.
2734 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2735 errors on bit-fields and reverse SSO here and not...
2736 (c_mark_addressable): ...here.
2737 (output_init_element): Adjust call to initializer_constant_valid_p.
2738 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2740 2015-11-06 David Malcolm <dmalcolm@redhat.com>
2742 * c-decl.c (warn_defaults_to): Update for change in signature
2743 of diagnostic_set_info.
2744 * c-errors.c (pedwarn_c99): Likewise.
2745 (pedwarn_c90): Likewise.
2746 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2747 for textinfo::set_location.
2749 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2750 Thomas Schwinge <thomas@codesourcery.com>
2751 James Norris <jnorris@codesourcery.com>
2753 * c-parser.c (c_parser_omp_clause_name): Add support for
2754 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2755 (c_parser_omp_clause_default): Add is_oacc argument. Handle
2756 default(none) in OpenACC.
2757 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2759 (c_parser_oacc_clause_tile): New function.
2760 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2761 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2762 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2764 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2765 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2767 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2768 (c_parser_oacc_update): Update the error message for missing clauses.
2769 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2770 and OMP_CLAUSE_INDEPENDENT.
2772 2015-11-05 Marek Polacek <polacek@redhat.com>
2775 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2776 deal with pre-evaluation on invalid types.
2778 2015-11-05 Jakub Jelinek <jakub@redhat.com>
2779 Ilya Verbin <ilya.verbin@intel.com>
2781 * c-parser.c: Include context.h and gimple-expr.h.
2782 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2783 monotonic together with nonmonotonic.
2784 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
2785 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2786 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2787 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2788 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
2789 expressions on combined target teams before the target.
2790 (c_parser_omp_declare_target): If decl has "omp declare target" or
2791 "omp declare target link" attribute, and cgraph or varpool node already
2792 exists, then set corresponding flags. Call c_finish_omp_clauses
2793 in the parenthesized extended-list syntax case.
2794 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2796 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2797 on OMP_CLAUSE_REDUCTION array sections.
2798 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2799 into the constant offset, or for variable low-bound using
2800 POINTER_PLUS_EXPR. For structure element based array sections use
2801 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2802 (c_finish_omp_clauses): Drop generic_field_head, structure
2803 elements are now always mapped even as array section bases,
2804 diagnose same var in data sharing and mapping clauses. Diagnose if
2805 linear step on declare simd is neither a constant nor a uniform
2806 parameter. Look through POINTER_PLUS_EXPR for array section
2807 reductions. Diagnose the same var or function appearing multiple
2808 times on the same directive. Fix up wording for the to clause if t
2809 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
2810 modifier on kinds other than dynamic or guided or nonmonotonic
2811 modifier together with ordered clause.
2813 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2814 Chung-Lin Tang <cltang@codesourcery.com>
2816 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2818 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
2820 * c-array-notation.c: Reorder #include's and remove duplicates.
2821 * c-aux-info.c: Likewise.
2822 * c-convert.c: Likewise.
2823 * c-decl.c: Likewise.
2824 * c-errors.c: Likewise.
2825 * c-lang.c: Likewise.
2826 * c-objc-common.c: Likewise.
2827 * c-parser.c: Likewise.
2828 * c-typeck.c: Likewise.
2830 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
2833 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2834 after calling build_qualified_type.
2836 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2837 Thomas Schwinge <thomas@codesourcery.com>
2838 James Norris <jnorris@codesourcery.com>
2839 Joseph Myers <joseph@codesourcery.com>
2840 Julian Brown <julian@codesourcery.com>
2841 Bernd Schmidt <bschmidt@redhat.com>
2843 * c-parser.c (c_parser_oacc_shape_clause): New.
2844 (c_parser_oacc_simple_clause): New.
2845 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2846 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2848 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2849 James Norris <jnorris@codesourcery.com>
2850 Cesar Philippidis <cesar@codesourcery.com>
2854 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2855 parameters, and handle these. Adjust all users.
2856 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2858 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2860 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2862 (c_finish_omp_construct): Declare function.
2863 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2864 Merge functions into...
2865 (c_finish_omp_construct): ... this new function.
2867 2015-10-22 Richard Biener <rguenther@suse.de>
2869 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2870 before folding a MINUS_EXPR.
2872 2015-10-21 Marek Polacek <polacek@redhat.com>
2875 * c-decl.c (start_function): Warn about vararg functions without
2878 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2880 * c-typeck.c (build_conditional_expr): Use boolean vector
2881 type for vector comparison.
2882 (build_vec_cmp): New.
2883 (build_binary_op): Use build_vec_cmp for comparison.
2885 2015-10-20 Marek Polacek <polacek@redhat.com>
2887 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2889 2015-10-20 Marek Polacek <polacek@redhat.com>
2892 * c-parser.c (c_parser_attributes): Break out of the loop if the
2893 token after an attribute isn't a comma.
2895 2015-10-13 Jakub Jelinek <jakub@redhat.com>
2896 Aldy Hernandez <aldyh@redhat.com>
2898 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2899 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2900 (c_parser_omp_variable_list): Handle structure elements for
2901 map, to and from clauses. Handle array sections in reduction
2902 clause. Formatting fixes.
2903 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2904 if clause modifiers.
2905 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2906 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2907 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2908 c_parser_omp_clause_is_device_ptr): New functions.
2909 (c_parser_omp_clause_ordered): Parse optional parameter.
2910 (c_parser_omp_clause_reduction): Handle array reductions.
2911 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2912 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2914 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2915 (c_parser_omp_clause_depend_sink): New function.
2916 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2917 (c_parser_omp_clause_map): Parse release/delete map kinds and
2918 optional always modifier.
2919 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2920 and c_finish_omp_clauses callers.
2921 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
2922 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2923 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2924 (OMP_CRITICAL_CLAUSE_MASK): Define.
2925 (c_parser_omp_critical): Parse critical clauses.
2926 (c_parser_omp_for_loop): Handle doacross loops, adjust
2927 c_finish_omp_for and c_finish_omp_clauses callers.
2928 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2929 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2930 (OMP_FOR_CLAUSE_MASK): Add linear clause.
2931 (c_parser_omp_for): Disallow ordered clause when combined with
2932 distribute. Disallow linear clause when combined with distribute
2933 and not combined with simd.
2934 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2935 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2936 parse clauses and if depend clause is found, don't parse a body.
2937 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2938 Allow target parallel without for after it.
2939 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2940 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2941 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2943 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2944 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2945 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2946 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2948 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2949 defaultmap and is_device_ptr clauses.
2950 (c_parser_omp_target): Parse target parallel and target simd. Set
2951 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
2952 and target exit data. Diagnose invalid map kinds.
2953 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2954 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2956 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2958 (OMP_TASKLOOP_CLAUSE_MASK): Define.
2959 (c_parser_omp_taskloop): New function.
2960 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2961 handle PRAGMA_OMP_TASKLOOP.
2962 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2963 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2964 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2965 Add IS_OMP argument, handle structure element bases, diagnose
2966 bitfields, pass IS_OMP recursively, diagnose known zero length
2967 array sections in depend clauses, handle array sections in reduction
2968 clause, diagnose negative length even for pointers.
2969 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2970 types, pass IS_OMP down to handle_omp_array_sections_1, handle
2971 array sections in reduction clause, set
2972 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2973 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2974 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2975 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2977 2015-10-06 Marek Polacek <polacek@redhat.com>
2979 * c-parser.c (c_parser_statement_after_labels): Use
2980 protected_set_expr_location.
2981 (c_parser_omp_clause_num_gangs): Likewise.
2982 (c_parser_omp_clause_num_threads): Likewise.
2983 (c_parser_omp_clause_num_workers): Likewise.
2984 (c_parser_omp_clause_vector_length): Likewise.
2985 (c_parser_omp_clause_num_teams): Likewise.
2986 (c_parser_omp_clause_thread_limit): Likewise.
2987 * c-typeck.c (build_c_cast): Likewise.
2988 (c_cast_expr): Likewise.
2990 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2992 * c-typeck.c (c_tree_equal): Use real_equal instead of
2995 2015-10-04 Jason Merrill <jason@redhat.com>
2997 * c-parser.c (c_lex_one_token): Handle @synchronized.
2998 * c-decl.c (match_builtin_function_types): A declaration of a built-in
2999 can change whether the function is transaction_safe.
3001 2015-10-02 Marek Polacek <polacek@redhat.com>
3004 * c-typeck.c (convert_for_assignment): Use the expansion point
3005 location throughout.
3007 2015-10-02 Marek Polacek <polacek@redhat.com>
3010 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3011 and pass it down to c_parser_if_statement.
3012 (c_parser_else_body): Add CHAIN parameter and pass it down to
3013 c_parser_statement_after_labels.
3014 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3015 duplicated if-else-if conditions.
3017 2015-10-01 Marek Polacek <polacek@redhat.com>
3019 * c-typeck.c (convert_for_assignment): Improve commentary.
3021 2015-09-30 Marek Polacek <polacek@redhat.com>
3024 * c-typeck.c (c_finish_return): Use the expansion point location for
3025 certain "return with value" warnings.
3027 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3029 * c-parser.c (pragma_lex): Add loc argument.
3031 2015-09-15 Marek Polacek <polacek@redhat.com>
3034 * c-decl.c (tag_exists_p): New function.
3035 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3036 struct/union/enum keywords are missing.
3037 * c-tree.h (tag_exists_p): Declare.
3039 2015-09-15 Marek Polacek <polacek@redhat.com>
3041 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3042 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3043 Return NULL_TREE instead of 0.
3044 (lookup_name): Return NULL_TREE instead of 0.
3045 (lookup_name_in_scope): Likewise.
3046 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3047 (parser_xref_tag): Use false instead of 0.
3048 (start_struct): Use true instead of 1.
3049 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3051 2015-09-14 Marek Polacek <polacek@redhat.com>
3053 * c-typeck.c (set_nonincremental_init_from_string): Use
3054 HOST_WIDE_INT_M1U when shifting a negative value.
3056 2015-09-09 Mark Wielaard <mjw@redhat.com>
3058 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3061 2015-09-10 Jakub Jelinek <jakub@redhat.com>
3064 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3065 into OMP_FOR_PRE_BODY rather than before the loop.
3067 2015-09-09 Jakub Jelinek <jakub@redhat.com>
3070 * c-parser.c (c_parser_oacc_all_clauses,
3071 c_parser_omp_all_clauses): Remove invalid clause from
3072 list of clauses even if parser->error is set.
3075 * c-parser.c (c_parser_omp_clause_aligned,
3076 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3078 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3082 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3083 instead of c_parser_unary_expression. If the result is !lvalue_p,
3084 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3086 2015-09-04 Marek Polacek <polacek@redhat.com>
3089 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3091 2015-09-03 Martin Sebor <msebor@redhat.com>
3094 * c-typeck.c (convert_arguments, parser_build_unary_op,
3095 build_conditional_expr, c_cast_expr, convert_for_assignment,
3096 build_binary_op, _objc_common_truthvalue_conversion): Call
3098 (c_decl_implicit): Define.
3100 2015-09-02 Marek Polacek <polacek@redhat.com>
3103 * c-parser.c (c_parser_enum_specifier): Give a better error for
3106 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3108 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3110 2015-08-12 Marek Polacek <polacek@redhat.com>
3112 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3115 2015-08-03 Marek Polacek <polacek@redhat.com>
3118 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3120 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3122 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3124 * c-parser.c (c_parser_if_body): Take token_indent_info
3125 argument. Call warn_for_misleading_indentation even when the
3126 body is a semicolon. Extract token_indent_infos corresponding
3127 to the guard, body and next tokens. Adjust call to
3128 warn_for_misleading_indentation accordingly.
3129 (c_parser_else_body): Likewise.
3130 (c_parser_if_statement): Likewise.
3131 (c_parser_while_statement): Likewise.
3132 (c_parser_for_statement): Likewise.
3134 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3135 Manuel López-Ibáñez <manu@gcc.gnu.org>
3137 * c-decl.c (get_parm_info): Remove static var. Update warning
3140 2015-07-27 Marek Polacek <polacek@redhat.com>
3144 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3146 2015-07-20 Marek Polacek <polacek@redhat.com>
3149 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3150 (build_binary_op): Warn about left shift overflows.
3152 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
3154 * c-array-notation.c: Adjust includes for flags.h changes.
3155 * c-objc-common.c: Likewise.
3157 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
3159 * c-array-notation.c: Adjust includes.
3160 * c-aux-info.c: Likewise.
3161 * c-convert.c: Likewise.
3162 * c-decl.c: Likewise.
3163 * c-errors.c: Likewise.
3164 * c-lang.c: Likewise.
3165 * c-objc-common.c: Likewise.
3166 * c-parser.c: Likewise.
3167 * c-typeck.c: Likewise.
3169 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3172 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3174 2015-06-29 Marek Polacek <polacek@redhat.com>
3177 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3178 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3179 about -Wswitch-bool here.
3180 (do_case): Update c_add_case_label call.
3181 (c_finish_case): Update c_do_switch_warnings call.
3183 2015-06-27 Marek Polacek <polacek@redhat.com>
3185 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3187 2015-06-26 Marek Polacek <polacek@redhat.com>
3189 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3191 * c-typeck.c (array_to_pointer_conversion): Likewise.
3192 (build_unary_op): Likewise.
3193 (c_finish_return): Likewise.
3195 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
3197 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3198 * c-parser.c: Likewise.
3200 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3202 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3203 instead of pointer_hash.
3204 (detect_field_duplicates): Likewise.
3206 2015-06-25 Marek Polacek <polacek@redhat.com>
3208 * c-array-notation.c: Use VAR_P throughout.
3209 * c-decl.c: Likewise.
3210 * c-objc-common.c: Likewise.
3211 * c-parser.c: Likewise.
3212 * c-typeck.c: Likewise.
3214 2015-06-25 Marek Polacek <polacek@redhat.com>
3216 * c-decl.c: Use is_global_var throughout.
3217 * c-parser.c: Likewise.
3218 * c-typeck.c: Likewise.
3220 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
3222 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3223 * c-aux-info.c: Likewise.
3224 * c-convert.c: Likewise.
3225 * c-decl.c: Likewise.
3226 * c-errors.c: Likewise.
3227 * c-lang.c: Likewise.
3228 * c-objc-common.c: Likewise.
3229 * c-parser.c: Likewise.
3230 * c-typeck.c: Likewise.
3232 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
3235 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3238 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3240 * c-decl.c (pop_scope): Register the main translation unit
3241 through the new debug hook.
3243 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
3245 * c-array-notation.c : Adjust include files.
3246 * c-aux-info.c : Likewise.
3247 * c-convert.c : Likewise.
3248 * c-decl.c : Likewise.
3249 * c-errors.c : Likewise.
3250 * c-lang.c : Likewise.
3251 * c-lang.h : Likewise.
3252 * c-objc-common.c : Likewise.
3253 * c-parser.c : Likewise.
3254 * c-typeck.c : Likewise.
3256 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
3258 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3259 immediately clobber it.
3260 (c_write_global_declarations_1): Remove call to
3261 check_global_declaration_1.
3262 (c_write_global_declarations_2): Remove.
3263 (c_write_final_cleanups): Rename from c_write_global_declarations.
3264 Remove call to finalize_compilation_unit.
3265 Remove calls to debugging hooks.
3266 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3267 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3268 * c-tree.h: Remove c_write_global_declarations.
3270 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
3272 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3273 * c-aux-info.c: Likewise.
3274 * c-convert.c: Likewise.
3275 * c-decl.c: Likewise.
3276 * c-errors.c: Likewise.
3277 * c-lang.c: Likewise.
3278 * c-objc-common.c: Likewise.
3279 * c-parser.c: Likewise.
3280 * c-typeck.c: Likewise.
3282 2015-06-04 Marek Polacek <polacek@redhat.com>
3285 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3288 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3290 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3291 Warn for empty struct.
3292 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3294 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3296 * c-decl.c (start_function): Call plugin before parsing.
3297 (finish_function): Call plugin after parsing.
3299 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3302 * c-decl.c (merge_decls): Merge DECL_COMMON.
3304 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
3306 * Make-lang.in (check_gcc_pallelize): Define.
3308 2015-05-22 Marek Polacek <polacek@redhat.com>
3311 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3314 2015-05-21 Marek Polacek <polacek@redhat.com>
3316 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3319 2015-05-20 Marek Polacek <polacek@redhat.com>
3321 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3322 * c-typeck.c: Likewise.
3324 2015-05-19 Marek Polacek <polacek@redhat.com>
3326 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3328 2015-05-19 Jakub Jelinek <jakub@redhat.com>
3331 * c-parser.c (c_parser_omp_for_loop): Don't add
3332 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3333 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3334 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3337 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3339 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
3342 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3345 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3348 2015-05-14 Marek Polacek <polacek@redhat.com>
3352 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3355 2015-05-12 David Malcolm <dmalcolm@redhat.com>
3357 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3358 to add a call to warn_for_misleading_indentation.
3359 (c_parser_else_body): Likewise, adding param "else_loc".
3360 (c_parser_if_statement): Check for misleading indentation.
3361 (c_parser_while_statement): Likewise.
3362 (c_parser_for_statement): Likewise.
3364 2015-05-08 Marek Polacek <polacek@redhat.com>
3367 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3368 (output_init_element): Likewise.
3370 2015-05-07 Marek Polacek <polacek@redhat.com>
3373 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3376 2015-04-30 Marek Polacek <polacek@redhat.com>
3378 * c-typeck.c (set_init_label): Call error_at instead of error and
3381 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3384 * c-typeck.c (c_build_va_arg): Clarify the error message.
3386 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3388 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3389 OMP_STANDALONE_CLAUSES.
3391 2015-04-28 Marek Polacek <polacek@redhat.com>
3393 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3395 2015-04-28 Marek Polacek <polacek@redhat.com>
3398 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3400 2015-04-25 Marek Polacek <polacek@redhat.com>
3403 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3406 2015-04-23 Marek Polacek <polacek@redhat.com>
3409 * c-decl.c (set_labels_context_r): New function.
3410 (store_parm_decls): Call it via walk_tree_without_duplicates.
3411 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3412 instead of create_tmp_var. Build TARGET_EXPR instead of
3414 (build_atomic_assign): Use create_tmp_var_raw instead of
3415 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3417 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3419 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3420 (c_parser_omp_target_update): Add missed %> to error_at ().
3422 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3425 * c-decl.c (c_default_pointer_mode): Remove definition.
3426 * c-tree.h (c_default_pointer_mode): Remove declaration.
3428 2015-03-27 Tobias Burnus <burnus@net-b.de>
3431 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3433 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3434 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3435 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3437 2015-03-19 Jakub Jelinek <jakub@redhat.com>
3439 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3440 attribute for DECL_EXTERNAL VAR_DECLs.
3442 2015-03-11 Jakub Jelinek <jakub@redhat.com>
3444 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3447 2015-03-10 Jakub Jelinek <jakub@redhat.com>
3450 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3451 before preparing arguments to warn_logical_not_parentheses.
3453 2015-03-09 Jakub Jelinek <jakub@redhat.com>
3456 * c-typeck.c (parser_build_binary_op): Don't warn for
3457 !!x == y or !b == y where b is _Bool.
3459 2015-03-09 Marek Polacek <polacek@redhat.com>
3461 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3462 * c-decl.c (grokdeclarator): Likewise.
3463 * c-typeck.c (build_binary_op): Likewise.
3465 2015-02-27 Marek Polacek <polacek@redhat.com>
3468 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3470 2015-02-14 Marek Polacek <polacek@redhat.com>
3473 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3474 declared through a typedef name.
3476 2015-02-13 Marek Polacek <polacek@redhat.com>
3479 * c-decl.c (grokdeclarator): Print also the type when giving
3480 the error message about array's incomplete element type.
3482 2015-02-11 Jakub Jelinek <jakub@redhat.com>
3485 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3486 check in the POP macro.
3488 2015-02-09 Marek Polacek <polacek@redhat.com>
3491 * c-typeck.c (process_init_element): Don't always wrap
3492 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3493 initializing a range of elements.
3495 2015-02-04 Jakub Jelinek <jakub@redhat.com>
3499 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3501 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
3503 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3504 processing enum declaration.
3506 2015-01-29 Marek Polacek <polacek@redhat.com>
3509 * c-typeck.c (pop_init_level): If constructor_elements has
3510 exactly one element with integer_zerop value, set constructor_zeroinit
3511 to 1. Remove braces around warning_init call.
3513 2015-01-27 Jakub Jelinek <jakub@redhat.com>
3516 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3517 of FUNCTION_DECLs with error_mark_node.
3519 2015-01-26 Jakub Jelinek <jakub@redhat.com>
3522 * c-typeck.c (convert_arguments): Return -1 if there are
3523 error_args, even if we've diagnosed too many arguments.
3525 2015-01-21 Richard Biener <rguenther@suse.de>
3528 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3529 for builtins the user declared correctly.
3531 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3532 Bernd Schmidt <bernds@codesourcery.com>
3533 Cesar Philippidis <cesar@codesourcery.com>
3534 James Norris <jnorris@codesourcery.com>
3535 Jakub Jelinek <jakub@redhat.com>
3536 Ilmir Usmanov <i.usmanov@samsung.com>
3538 * c-parser.c: Include "gomp-constants.h".
3539 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3540 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3541 Use OMP_CLAUSE_SET_MAP_KIND.
3542 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3543 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3544 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3545 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3546 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3547 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3548 "copyout", "create", "delete", "deviceptr", "gang", "host",
3549 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3550 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3551 "present_or_create", "pcreate", "seq", "self", "vector",
3552 "vector_length", "wait", "worker".
3553 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3554 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3555 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3556 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3557 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3558 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3559 (c_parser_oacc_data_clause_deviceptr)
3560 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3561 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3562 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3563 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3564 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3565 (c_parser_oacc_parallel, c_parser_oacc_update)
3566 (c_parser_oacc_wait): New functions.
3567 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3568 (c_finish_oacc_data): New prototypes.
3569 * c-typeck.c: Include "gomp-constants.h".
3570 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3571 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3572 OMP_CLAUSE_SET_MAP_KIND.
3573 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3574 (c_finish_oacc_data): New functions.
3575 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3576 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3577 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3578 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3579 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3580 GOMP_MAP_FORCE_DEVICEPTR.
3582 2015-01-09 Michael Collison <michael.collison@linaro.org>
3584 * c-array-notation.c: Include hash-set.h, machmode.h,
3585 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3586 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3587 * c-aux-info.c: Ditto.
3588 * c-convert.c: Ditto.
3590 * c-errors.c: Ditto.
3591 * c-lang.c: Dittoxs.
3592 * c-objc-common.c: Ditto.
3593 * c-parser.c: Ditto.
3594 * c-typeck.c: Include hash-set.h, machmode.h,
3595 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3596 fold-const.h, wide-int.h, inchash.h, real.h and
3597 fixed-value.h due to flattening of tree.h.
3599 2015-01-07 Marek Polacek <polacek@redhat.com>
3602 * c-typeck.c (process_init_element): Disallow initialization of
3603 a flexible array member with a string constant if the structure
3606 2015-01-05 Jakub Jelinek <jakub@redhat.com>
3609 * c-typeck.c (convert_for_assignment, c_finish_return): For
3610 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3611 types also set in_late_binary_op around convert call.
3612 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3613 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3614 result on expr as last argument to ubsan_instrument_float_cast,
3615 if in_late_binary_op, don't use c_save_expr but save_expr.
3617 Update copyright years.
3619 2015-01-05 Marek Polacek <polacek@redhat.com>
3622 * c-typeck.c (build_array_ref): Pass loc down to
3623 warn_array_subscript_with_type_char.
3625 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
3627 * c-typeck.c: New behavious for pointers to arrays with qualifiers
3628 (common-pointer-type): For pointers to arrays take qualifiers from
3630 (build_conditional_expr): Add warnings for lost qualifiers.
3631 (comp-target-types): Allow pointers to arrays with different qualifiers.
3632 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
3633 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
3634 to PEDWARN_FOR_QUALIFIERS.
3636 2014-12-17 Jakub Jelinek <jakub@redhat.com>
3639 * c-convert.c: Include ubsan.h.
3640 (convert): For real -> integral casts and
3641 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3642 instead instrument the float cast directly.
3644 2014-11-29 Jakub Jelinek <jakub@redhat.com>
3646 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3647 c_finish_stmt_expr): Remove NULL last argument from
3648 create_tmp_var_raw and create_tmp_var calls.
3649 * c-array-notation.c (fix_builtin_array_notation_fn,
3650 build_array_notation_expr, fix_conditional_array_notations_1,
3651 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3653 2014-11-28 Marek Polacek <polacek@redhat.com>
3656 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3657 convert the right operand to integer type.
3659 2014-11-25 Marek Polacek <polacek@redhat.com>
3662 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3663 for inline functions.
3665 2014-11-21 Jakub Jelinek <jakub@redhat.com>
3668 * c-typeck.c (build_array_ref): Adjust
3669 convert_vector_to_pointer_for_subscript caller. If it returns true,
3670 call non_lvalue_loc on the result.
3672 2014-11-11 Richard Biener <rguenther@suse.de>
3674 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3677 2014-11-10 Andi Kleen <ak@linux.intel.com>
3680 * c-parser.c (c_parser_statement_after_labels): Call
3682 (c_parser_if_statement): Dito.
3683 (c_parser_switch_statement): Dito.
3684 (c_parser_while_statement): Dito.
3685 (c_parser_do_statement): Dito.
3686 (c_parser_for_statement): Dito.
3687 * c-typeck.c (c_finish_loop): Dito.
3689 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3691 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3692 OPT_Wshift_count_overflow in the warnings.
3694 2014-10-30 Marek Polacek <polacek@redhat.com>
3696 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3697 print the stripped version as well, if they're not the same.
3699 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3701 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3704 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
3706 * c-decl.c: Adjust include files.
3707 * c-parser.c: Ditto.
3709 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3710 Tom Tromey <tromey@redhat.com>
3712 * c-tree.h (enum c_oracle_request): New.
3713 (c_binding_oracle_function): New typedef.
3714 (c_binding_oracle, c_pushtag, c_bind): Declare.
3715 * c-decl.c (c_binding_oracle): New global.
3716 (I_SYMBOL_CHECKED): New macro.
3717 (i_symbol_binding): New function.
3718 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3719 (I_TAG_CHECKED): New macro.
3720 (i_tag_binding): New function.
3721 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3722 (I_LABEL_CHECKED): New macro.
3723 (i_label_binding): New function.
3724 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3725 (c_print_identifier): Save and restore c_binding_oracle.
3726 (c_pushtag, c_bind): New functions.
3728 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
3730 * c-typeck.c: Adjust include files.
3732 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3735 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3736 initialization here...
3737 (c_initialize_diagnostics): ... but here. Set defaults after
3738 building pretty-printer.
3740 2014-10-23 Marek Polacek <polacek@redhat.com>
3743 * c-decl.c (pop_scope): Don't print warning in external_scope.
3745 2014-10-19 Marek Polacek <polacek@redhat.com>
3748 * c-typeck.c (output_init_element): Allow initializing objects with
3749 static storage duration with compound literals even in C99 and add
3752 2014-10-17 Marek Polacek <polacek@redhat.com>
3755 * c-typeck.c (digest_init): Allow initializing objects with static
3756 storage duration with compound literals even in C99 and add pedwarn
3759 2014-10-17 Marek Polacek <polacek@redhat.com>
3762 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3763 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3764 error multiple times. Print the type.
3766 2014-10-17 Marek Polacek <polacek@redhat.com>
3769 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3772 2014-10-17 Marek Polacek <polacek@redhat.com>
3774 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3775 (start_function): Use OPT_Wimplicit_int instead of 0.
3776 (store_parm_decls_oldstyle): Likewise.
3778 2014-10-17 Alan Modra <amodra@gmail.com>
3781 * c-decl.c (merge_decls): Don't merge section name or tls model
3782 to newdecl symtab node, instead merge to olddecl. Override
3783 existing olddecl section name. Set tls_model for all thread-local
3784 vars, not just OMP thread-private ones. Remove incorrect comment.
3786 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
3788 * c-decl.c: Adjust include files.
3790 2014-10-14 DJ Delorie <dj@redhat.com>
3792 * c-parser.c (c_parse_init): Add RID entries for each __intN.
3793 (c_token_starts_typename): Check all __intN, not just __int128.
3794 (c_token_starts_declspecs): Likewise.
3795 (c_parser_declspecs): Likewise.
3796 (c_parser_attribute_any_word): Likewise.
3797 (c_parser_objc_selector): Likewise.
3798 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3799 (struct c_declspecs): Add int_n_idx field to record *which* __intN
3801 * c-decl.c (declspecs_add_type): Check for all __intN, not just
3803 (finish_declspecs): Likewise.
3805 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
3807 * c-parser.c (c_parser_all_labels): New function to replace
3809 (c_parser_statement): Call the new function.
3811 2014-10-09 Marek Polacek <polacek@redhat.com>
3814 * c-typeck.c (pop_init_level): Don't warn about initializing
3817 2014-10-07 Marek Polacek <polacek@redhat.com>
3820 * c-decl.c (header_for_builtin_fn): New function.
3821 (implicitly_declare): Suggest which header to include.
3823 2014-10-07 Marek Polacek <polacek@redhat.com>
3825 * c-convert.c (convert): Use error_operand_p.
3826 * c-typeck.c (require_complete_type): Likewise.
3827 (really_atomic_lvalue): Likewise.
3828 (digest_init): Likewise.
3829 (handle_omp_array_sections_1): Likewise.
3831 2014-10-03 Marek Polacek <polacek@redhat.com>
3834 * c-decl.c (pop_scope): Don't warn about "inline function declared
3835 but never defined" for functions marked with gnu_inline attribute.
3837 2014-09-25 Jakub Jelinek <jakub@redhat.com>
3840 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3841 on low_bound and length.
3843 2014-09-24 Marek Polacek <polacek@redhat.com>
3847 * c-parser.c: Don't define CPP_KEYWORD.
3848 (c_parser_switch_statement): Pass original type to c_finish_case.
3849 * c-tree.h (c_finish_case): Update declaration.
3850 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3851 conditionally to c_do_switch_warnings.
3853 2014-09-03 Marek Polacek <polacek@redhat.com>
3856 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3859 2014-09-02 Jakub Jelinek <jakub@redhat.com>
3860 Balaji V. Iyer <balaji.v.iyer@intel.com>
3861 Igor Zamyatin <igor.zamyatin@intel.com>
3863 * c-parser.c (c_parser_cilk_for): New function.
3864 (c_parser_cilk_grainsize): Likewise.
3865 (c_get_temp_regvar): Likewise.
3866 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3867 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3868 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3869 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3872 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3874 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3875 with using HOST_WIDE_INT without truncation to 'int'
3877 2014-08-22 Marek Polacek <polacek@redhat.com>
3880 * c-typeck.c (parser_build_binary_op): Adjust call to
3881 warn_logical_not_parentheses.
3883 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3886 * c-parser.c (c_parser_array_notation): Check for correct
3887 type of an array added.
3889 2014-08-19 Marek Polacek <polacek@redhat.com>
3892 * c-typeck.c (build_binary_op): If either operand of a comparison
3893 is a boolean expression, call maybe_warn_bool_compare.
3895 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3898 * c-typeck.c (build_c_cast): Do a conversion even when the
3899 TYPE_MAIN_VARIANTs are the same.
3901 2014-08-19 Marek Polacek <polacek@redhat.com>
3903 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3904 pedwarn_c99 instead of pedwarn.
3905 (grokfield): Likewise.
3906 (warn_defaults_to): New function.
3907 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3908 Unconditionally call pedwarn_c99 instead of pedwarn.
3909 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3910 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3911 check flag_isoc11 before.
3912 * c-errors.c (pedwarn_c99): Change the return type to bool.
3913 Handle -Wc99-c11-compat.
3914 * c-parser.c (disable_extension_diagnostics): Handle
3915 warn_c99_c11_compat.
3916 (restore_extension_diagnostics): Likewise.
3917 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3918 instead of pedwarn, don't check flag_isoc11 before.
3919 (c_parser_declspecs): Likewise.
3920 (c_parser_alignas_specifier): Likewise.
3921 (c_parser_alignof_expression): Likewise.
3922 (c_parser_generic_selection): Likewise.
3923 * c-tree.h (pedwarn_c99): Update declaration.
3924 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3927 2014-08-19 Marek Polacek <polacek@redhat.com>
3929 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3931 * c-errors.c: Include "opts.h".
3932 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3933 * c-parser.c (disable_extension_diagnostics): Handle negative value
3934 of warn_c90_c99_compat, too.
3935 (restore_extension_diagnostics): Likewise.
3936 (c_parser_compound_statement_nostart): Pass
3937 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3939 2014-08-12 Marek Polacek <polacek@redhat.com>
3941 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3943 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3945 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3947 2014-08-10 Marek Polacek <polacek@redhat.com>
3950 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3951 Call pedwarn_c90 instead of pedwarn.
3952 (check_bitfield_type_and_width): Likewise.
3953 (declspecs_add_qual): Likewise.
3954 (declspecs_add_type): Likewise.
3955 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3956 Adjust to only call pedwarn_c90.
3957 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
3958 pedwarn_c90 instead of pedwarn.
3959 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3960 * c-parser.c (disable_extension_diagnostics): Handle
3961 warn_c90_c99_compat.
3962 (restore_extension_diagnostics): Likewise.
3963 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
3964 pedwarn_c90 instead of pedwarn.
3965 (c_parser_initelt): Likewise.
3966 (c_parser_postfix_expression): Likewise.
3967 (c_parser_postfix_expression_after_paren_type): Likewise.
3968 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3969 * c-tree.h: Fix formatting.
3970 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
3971 pedwarn_c90 instead of pedwarn.
3973 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
3975 * c-typeck.c: Remove include of pointer-set.h.
3977 2014-08-07 Marek Polacek <polacek@redhat.com>
3979 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3981 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3983 * c-typeck.c: Use hash_map instead of pointer_map.
3985 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3987 * c-decl.c: Use hash_set instead of pointer_set.
3989 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
3992 * c-array-notation.c (expand_array_notations): Handling
3995 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
3998 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4001 2014-07-30 Tom Tromey <tromey@redhat.com>
4003 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4005 (really_start_incremental_init, push_init_level): Initialize
4007 (pop_init_level): Set global designator_depth.
4008 (process_init_element): Check for designated_init attribute.
4010 2014-07-20 Marek Polacek <polacek@redhat.com>
4013 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4014 (implicitly_declare): Pass location to implicit_decl_warning.
4016 2014-07-14 Jakub Jelinek <jakub@redhat.com>
4019 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4020 If non-NULL, call c_parser_check_literal_zero.
4021 (c_parser_check_literal_zero): New function.
4022 (c_parser_postfix_expression_after_primary): Adjust
4023 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4025 2014-07-06 Marek Polacek <polacek@redhat.com>
4028 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4029 * c-tree.h (C_ARRAY_PARAMETER): Define.
4030 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4033 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
4034 Chen Gang <gang.chen.5i5j@gmail.com>
4036 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4039 2014-07-01 Marek Polacek <polacek@redhat.com>
4041 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4042 instead of 0 to WARN_FOR_ASSIGNMENT.
4044 2014-07-01 Marek Polacek <polacek@redhat.com>
4047 * c-typeck.c (convert_for_assignment): Pass
4048 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4050 2014-06-30 Marek Polacek <polacek@redhat.com>
4052 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4053 has no_sanitize_undefined attribute.
4055 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4058 * c-array-notation.c (fix_builtin_array_notation_fn):
4059 Check for 0 arguments in builtin call. Check that bultin argument is
4061 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4064 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4066 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4067 qualifiers in __auto_type for atomic types.
4068 (c_parser_typeof_specifier): Discard all type qualifiers in
4069 __typeof__ for atomic types.
4071 2014-06-25 Marek Polacek <polacek@redhat.com>
4074 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4075 the return expression to c_finish_return.
4077 2014-06-25 Jakub Jelinek <jakub@redhat.com>
4079 * c-typeck.c (c_finish_omp_clauses): Make sure
4080 OMP_CLAUSE_LINEAR_STEP has correct type.
4082 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4086 2014-06-24 Jakub Jelinek <jakub@redhat.com>
4088 * c-parser.c (c_parser_omp_for_loop): For
4089 #pragma omp parallel for simd move lastprivate clause from parallel
4090 to for rather than simd.
4092 2014-06-23 Marek Polacek <polacek@redhat.com>
4094 * c-typeck.c (parser_build_binary_op): Don't call
4095 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4097 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
4099 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4100 * c-decl.c (merge_decls): Likewise.
4102 2014-06-09 Marek Polacek <polacek@redhat.com>
4105 * c-typeck.c (error_init): Call inform instead of error_at.
4106 (pedwarn_init): Call inform instead of pedwarn.
4107 (warning_init): Call inform instead of warning_at.
4109 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
4111 * c-decl.c (merge_decls): Use set_decl_section_name.
4112 (duplicate_decls): Remove node if it exists.
4114 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4117 * c-typeck.c (push_init_level, process_init_element,
4118 pop_init_level): Correct check for zero initialization, move
4119 missing brace warning to respect zero initialization.
4121 2014-06-05 Marek Polacek <polacek@redhat.com>
4124 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4126 2014-06-05 Marek Polacek <polacek@redhat.com>
4129 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4130 on the left hand side operand of a comparison.
4132 2014-06-05 Marek Polacek <polacek@redhat.com>
4135 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4136 Print note only if the warning was printed.
4138 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4141 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4144 2014-06-03 Marek Polacek <polacek@redhat.com>
4147 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4149 * c-tree.h (c_start_case): Update.
4150 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4151 switch condition has boolean value.
4153 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
4155 * c-decl.c: Include builtins.h.
4156 * c-parser.c: Likewise.
4158 2014-05-27 Marek Polacek <polacek@redhat.com>
4161 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4162 error and warning calls to error_at and warning_at. Pass location of
4163 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4164 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4165 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4167 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4170 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4171 function parameters.
4173 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
4175 * c-decl.c (merge_decls): Preserve symtab node pointers.
4176 (duplicate_decls): Free new decl.
4178 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4180 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4183 * c-parser.c (c_parser_omp_target): Return bool values.
4185 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4187 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4188 num_teams_loc variable to num_thread_limit_loc.
4190 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4192 * c-array-notation.c (expand_array_notations): Use void_node
4193 instead of void_zero_node.
4195 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4197 * c-decl.c (finish_struct): Adjust.
4198 (finish_enum): Likewise.
4200 (record_inline_static): Likewise.
4201 (push_scope): Likewise.
4202 (make_label): Likewise.
4203 (lookup_label_for_goto): Likewise.
4204 (finish_struct): Likewise.
4205 (finish_enum): Likewise.
4206 (store_parm_decls): Likewise.
4207 (c_push_function_context): Likewise.
4208 * c-lang.h: Remove usage of variable_size gty attribute.
4209 * c-parser.c (c_parse_init): Adjust.
4210 (c_parse_file): Likewise.
4212 2014-05-13 Marek Polacek <polacek@redhat.com>
4215 * c-typeck.c (convert_for_assignment): Pass location to
4216 WARN_FOR_ASSIGNMENT instead of input_location.
4218 2014-05-10 Marek Polacek <polacek@redhat.com>
4220 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4221 maybe_warn_string_init.
4222 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4223 maybe_warn_string_init.
4224 * c-tree.h (maybe_warn_string_init): Update declaration.
4225 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4226 Call pedwarn_init with loc instead of with input_location.
4227 (digest_init): Pass init_loc to maybe_warn_string_init.
4228 (pop_init_level): Call pedwarn_init with loc instead of with
4230 (set_init_index): Likewise.
4231 (process_init_element): Likewise.
4233 2014-05-09 Marek Polacek <polacek@redhat.com>
4236 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4237 (c_parser_initelt): Pass location to set_init_label. Pass array index
4238 location to set_init_index.
4239 * c-tree.h (push_init_level): Update declaration.
4240 (pop_init_level): Likewise.
4241 (set_init_index): Likewise.
4242 (set_init_label): Likewise.
4243 * c-typeck.c (error_init): Add location parameter. Call error_at
4245 (digest_init): Pass init_loc to error_init.
4246 (really_start_incremental_init):
4247 (push_init_level): Add location parameter. Pass loc to pop_init_level
4249 (pop_init_level): Likewise.
4250 (set_designator): Add location parameter. Pass loc to pop_init_level,
4251 push_init_level, and error_init.
4252 (set_init_index): Add location parameter. Pass loc to error_init and
4254 (set_init_label): Likewise.
4255 (output_init_element): Pass loc to error_init.
4256 (process_init_element): Pass loc to error_init, pop_init_level,
4257 pedwarn_init, and push_init_level.
4259 2014-05-09 Marek Polacek <polacek@redhat.com>
4262 * c-parser.c (c_parser_attributes): Parse the arguments as an
4263 expression-list if the attribute takes identifier.
4265 2014-05-08 Marek Polacek <polacek@redhat.com>
4268 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4271 2014-05-08 Marek Polacek <polacek@redhat.com>
4274 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4277 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4278 Mike Stump <mikestump@comcast.net>
4279 Richard Sandiford <rdsandiford@googlemail.com>
4281 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4282 (finish_enum): Use wide-int interfaces.
4283 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4284 * c-typeck.c (build_c_cast): Likewise.
4285 (set_nonincremental_init_from_string): Likewise.
4286 (c_tree_equal): Likewise.
4288 2014-05-02 Marek Polacek <polacek@redhat.com>
4291 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4292 Return size_one_node when the type is not complete.
4293 (pointer_diff): Remove comment.
4294 (build_unary_op): Improve error messages.
4296 2014-05-02 Marek Polacek <polacek@redhat.com>
4298 * c-typeck.c (c_finish_return): Separate warning_at calls.
4300 2014-05-02 Marek Polacek <polacek@redhat.com>
4302 * c-tree.h (error_init): Remove declaration.
4303 (pedwarn_init): Likewise.
4304 * c-typeck.c (error_init): Make static and move above.
4305 (pedwarn_init): Likewise.
4306 (warning_init): Move above.
4307 (maybe_warn_string_init): Likewise.
4309 2014-05-01 Jeff Law <law@redhat.com>
4313 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4314 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4317 2014-05-02 Marek Polacek <polacek@redhat.com>
4320 * c-typeck.c (push_init_level): Set constructor_designated to
4321 p->designated for structures.
4323 2014-05-01 Marek Polacek <polacek@redhat.com>
4326 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4327 function-definition has an attribute after the declarator.
4329 2014-05-01 Marek Polacek <polacek@redhat.com>
4332 * c-typeck.c (warning_init): Add location_t parameter. Call
4333 warning_at instead of warning.
4334 (push_init_level): Pass input_location to warning_init.
4335 (add_pending_init): Add location_t parameter. Pass loc to
4337 (set_nonincremental_init): Pass input_location to add_pending_init.
4338 (set_nonincremental_init_from_string): Likewise.
4339 (output_init_element): Pass loc to warning_init and to
4342 2014-05-01 Marek Polacek <polacek@redhat.com>
4345 * c-typeck.c (c_finish_return): Distinguish between label and variable
4346 when warning about returning local address.
4348 2014-05-01 Marek Polacek <polacek@redhat.com>
4351 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4354 2014-05-01 Marek Polacek <polacek@redhat.com>
4357 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4358 instead of 0 to WARN_FOR_QUALIFIERS.
4360 2014-05-01 Marek Polacek <polacek@redhat.com>
4363 * c-typeck.c (default_conversion): Use better location for
4366 2014-04-30 Marek Polacek <polacek@redhat.com>
4368 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4369 also when SANITIZE_FLOAT_DIVIDE is on.
4371 2014-04-30 Marek Polacek <polacek@redhat.com>
4374 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4375 and pedwarn_init. Use loc insted of input_location.
4377 2014-04-30 Marek Polacek <polacek@redhat.com>
4380 * c-typeck.c (build_binary_op): Use location when warning about
4383 2014-04-25 Marek Polacek <polacek@redhat.com>
4386 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4387 always_inline/noinline and hot/cold attributes.
4389 2014-04-25 Marek Polacek <polacek@redhat.com>
4392 * c-parser.c (c_parser_initelt): Pass input_location to
4393 process_init_element.
4394 (c_parser_initval): Pass loc to process_init_element.
4395 * c-tree.h (process_init_element): Adjust declaration.
4396 * c-typeck.c (push_init_level): Pass input_location to
4397 process_init_element.
4398 (pop_init_level): Likewise.
4399 (set_designator): Likewise.
4400 (output_init_element): Add location_t parameter. Pass loc to
4402 (output_pending_init_elements): Pass input_location to
4403 output_init_element.
4404 (process_init_element): Add location_t parameter. Pass loc to
4405 output_init_element.
4407 2014-04-24 Jakub Jelinek <jakub@redhat.com>
4409 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4410 atomic-clause, allow comma in between atomic-clause and
4413 2014-04-22 Jakub Jelinek <jakub@redhat.com>
4416 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4417 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4419 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4422 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4423 create_tmp_var instead build_decl for creating temps.
4424 (build_array_notation_expr): Likewise.
4425 (fix_conditional_array_notations_1): Likewise.
4426 (fix_array_notation_expr): Likewise.
4427 (fix_array_notation_call_expr): Likewise.
4429 2014-03-28 Jakub Jelinek <jakub@redhat.com>
4432 * c-tree.h (c_build_function_call_vec): New prototype.
4433 * c-typeck.c (build_function_call_vec): Don't call
4434 resolve_overloaded_builtin here.
4435 (c_build_function_call_vec): New wrapper function around
4436 build_function_call_vec. Call resolve_overloaded_builtin here.
4437 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4438 Call c_build_function_call_vec instead of build_function_call_vec.
4439 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4440 * c-decl.c (finish_decl): Likewise.
4442 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4445 * c-typeck.c: Use correct format string in cast-qual warning
4447 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4449 * c-decl.c (c_decl_attributes): Use
4450 lang_hooks.types.omp_mappable_type.
4451 * c-typeck.c (c_finish_omp_clauses): Likewise.
4453 2014-03-06 Marek Polacek <polacek@redhat.com>
4456 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4457 of checking tree code.
4459 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4461 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4462 (c_parser_parameter_declaration): Likewise.
4464 2014-02-19 Marek Polacek <polacek@redhat.com>
4467 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4468 Call mark_exp_read on exp.value.
4469 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4470 TREE_ADDRESSABLE on old instead of val.
4471 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4473 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4475 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4476 C_EXPR_APPEND by vec_safe_push.
4477 * c-tree.h (C_EXPR_APPEND): Remove.
4479 2014-01-31 Marek Polacek <polacek@redhat.com>
4482 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4483 build_function_call_vec.
4484 (build_function_call): Likewise.
4485 (build_atomic_assign): Likewise.
4486 (build_function_call_vec): Add arg_loc parameter. Use it.
4487 (convert_arguments): Likewise.
4488 (convert_for_assignment): Rename rhs_loc to expr_loc.
4489 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4490 (c_parser_objc_keywordexpr): Likewise.
4491 (c_parser_postfix_expression_after_primary): Call
4492 build_function_call_vec with expr_loc rather than op_loc.
4493 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4494 build_function_call_vec.
4495 (c_parser_expr_list): Add locations parameter. Fill it with locations
4496 of function arguments.
4497 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4499 2014-01-30 Marek Polacek <polacek@redhat.com>
4502 * c-typeck.c (build_function_call_vec): Use loc parameter.
4503 (convert_arguments): Add location parameter. Use it.
4504 (ep_convert_and_check): Likewise.
4505 (build_atomic_assign): Adjust convert_for_assignment call.
4506 (build_modify_expr): Likewise.
4507 (digest_init): Likewise.
4508 (c_finish_return): Likewise.
4509 (build_conditional_expr): Adjust ep_convert_and_check calls.
4510 (convert_for_assignment): Add rhs_loc parameter. Use it.
4511 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4514 2014-01-30 Richard Biener <rguenther@suse.de>
4517 * c-typeck.c (build_function_call_vec): Do not replace calls
4518 to a function via an incompatible type with a runtime abort.
4520 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4522 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4523 flag_enable_cilkplus with flag_cilkplus.
4524 (c_parser_direct_declarator_inner): Likewise.
4525 (c_parser_attribute_any_word): Likewise.
4526 (c_parser_attributes): Likewise.
4527 (c_parser_compound_statement): Likewise.
4528 (c_parser_statement_after_labels): Likewise.
4529 (c_parser_if_statement): Likewise.
4530 (c_parser_switch_statement): Likewise.
4531 (c_parser_do_statement): Likewise.
4532 (c_parser_for_statement): Likewise.
4533 (c_parser_unary_expression): Likewise.
4534 (c_parser_postfix_expression): Likewise.
4535 (c_parser_postfix_expression_after_primary): Likewise.
4536 (c_parser_postfix_expression_after_primary): Likewise.
4537 (c_parser_omp_clause_name): Likewise.
4538 (c_finish_omp_declare_simd): Likewise.
4539 (c_parser_cilk_verify_simd): Likewise.
4540 * c-typeck.c (build_array_ref): Likewise.
4541 (build_function_call_vec): Likewise.
4542 (convert_arguments): Likewise.
4543 (build_compound_expr): Likewise.
4544 (c_finish_return): Likewise.
4545 (c_finish_if_stmt): Likewise.
4546 (c_finish_loop): Likewise.
4547 (build_binary_op): Likewise.
4549 2014-01-23 Marek Polacek <polacek@redhat.com>
4552 * c-typeck.c (parser_build_binary_op): Use location instead of
4554 (build_binary_op): Pass location to shorten_compare.
4556 2014-01-23 Marek Polacek <polacek@redhat.com>
4559 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4562 2014-01-23 Marek Polacek <polacek@redhat.com>
4565 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4566 of a comma expression.
4567 (emit_side_effect_warnings): Likewise.
4569 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4572 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4573 function to use walk_tree and moved a lot of its functionality to
4574 expand_array_notations.
4575 (expand_array_notations): New function.
4577 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4579 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4580 attribute an attribute without value.
4582 2014-01-23 Jakub Jelinek <jakub@redhat.com>
4585 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4586 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4588 2014-01-22 Marek Polacek <polacek@redhat.com>
4591 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4592 of remove_c_maybe_const_expr on op1 and op2.
4594 2014-01-15 Jakub Jelinek <jakub@redhat.com>
4597 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4598 effects, preevaluate rhs using SAVE_EXPR first.
4600 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4603 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4604 statements with if-elseif statements.
4606 2014-01-06 Marek Polacek <polacek@redhat.com>
4609 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4610 defined bit-field types only in ISO C.
4612 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4614 Update copyright years
4616 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4618 * c-array-notation.c: Use the standard form for the copyright notice.
4620 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4622 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4623 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4624 field in parser is not empty. If not-empty, call the function
4625 c_parser_finish_omp_declare_simd.
4626 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4627 between SIMD-enabled functions and #pragma simd. Added new parameter.
4628 (c_parser_cilk_all_clauses): Modified the usage of the function
4629 c_parser_cilk_clause_vectorlength as mentioned above.
4630 (c_parser_cilk_simd_fn_vector_attrs): New function.
4631 (c_finish_cilk_simd_fn_tokens): Likewise.
4632 (is_cilkplus_vector_p): Likewise.
4633 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4634 "nomask," and "mask" strings in clause name.
4635 (c_parser_omp_all_clauses): Added 3 new case statements:
4636 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4637 PRAGMA_CILK_CLAUSE_NOMASK.
4638 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4639 check for vector attribute and if so call the function
4640 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4641 called the function c_finish_cilk_simd_fn_tokens.
4642 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4643 parser field is non-empty. If so, parse them as you would parse
4644 the omp declare simd pragma.
4645 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4646 Added a check when step is a parameter and flag it as error.
4647 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4648 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4651 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4653 * c-parser.c (c_parser_omp_parallel): Fix description.
4655 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4657 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4658 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4659 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4660 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4662 2013-12-04 Joseph Myers <joseph@codesourcery.com>
4665 * c-parser.c (c_parser_alignas_specifier): Use
4666 c_sizeof_or_alignof_type instead of c_alignof.
4667 (c_parser_alignof_expression): Likewise, with min_alignof
4668 parameter depending on alignof spelling used.
4670 2013-12-04 Marek Polacek <polacek@redhat.com>
4673 * c-decl.c (start_function): Don't warn for missing prototype for
4676 2013-12-03 Marek Polacek <polacek@redhat.com>
4679 * c-decl.c (build_compound_literal): Allow compound literals with
4680 empty initial value.
4682 2013-12-02 Joseph Myers <joseph@codesourcery.com>
4685 * c-typeck.c (build_modify_expr): Diagnose assignment to
4686 expression with array type.
4688 2013-11-29 Joseph Myers <joseph@codesourcery.com>
4691 * c-typeck.c (process_init_element): Do not treat a string as
4692 initializing a whole array when used with a designator for an
4695 2013-11-29 Joseph Myers <joseph@codesourcery.com>
4698 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4699 an inline function following a static declaration.
4701 2013-11-28 Jakub Jelinek <jakub@redhat.com>
4704 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4705 to p_name before calling c_parser_omp_teams instead of after.
4706 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4707 argument. Remove unused p_name variable.
4709 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
4710 Jakub Jelinek <jakub@redhat.com>
4712 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4713 external_scope is NULL.
4715 2013-11-27 Tom de Vries <tom@codesourcery.com>
4716 Marc Glisse <marc.glisse@inria.fr>
4719 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4721 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
4723 * c-typeck.c: Add required include files from gimple.h.
4725 2013-11-22 David Malcolm <dmalcolm@redhat.com>
4727 * c-decl.c (define_label, shadow_tag_warned)
4728 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4729 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4730 (declspecs_add_type): Remove use of in_system_header macro.
4731 * c-parser.c (c_parser_unary_expression): Likewise.
4732 * c-typeck.c (store_init_value, process_init_element)
4733 (c_start_case): Likewise.
4735 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4738 * c-parser.c (c_parser_set_source_position_from_token): Remove
4739 reference to in_system_header from comment.
4741 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4743 * c-decl.c (grokdeclarator): Update comment to refer to
4744 tree_to_[su]hwi rather than tree_low_cst.
4746 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4748 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4749 tree_to_uhwi throughout.
4751 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4753 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4756 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4758 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4761 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
4763 * c-parser.c (c_parser_cilk_simd): New.
4764 (c_parser_cilk_verify_simd): New.
4765 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4766 (c_parser_omp_for_loop): Add case for NE_EXPR.
4767 Set c_break_label for CILK_SIMD.
4768 (c_parser_cilk_clause_vectorlength): New.
4769 (c_parser_cilk_clause_linear): New.
4770 (c_parser_cilk_clause_name): New.
4771 (c_parser_cilk_all_clauses): New.
4772 * c-typeck.c (build_unary_op): Pass location argument to
4774 (build_modify_expr): Same.
4775 (build_asm_expr): Same.
4776 (c_finish_bc_stmt): Error on break/continue in loops.
4778 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
4780 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4782 2013-11-14 Diego Novillo <dnovillo@google.com>
4784 * c-decl.c: Include print-tree.h.
4785 Include stor-layout.h.
4788 Include stringpool.h.
4789 * c-lang.c: Include fold-const.h.
4790 * c-parser.c: Include stringpool.h.
4792 Include stor-layout.h.
4794 Include trans-mem.h.
4795 * c-typeck.c: Include stor-layout.h.
4796 Include trans-mem.h.
4800 2013-11-13 Joseph Myers <joseph@codesourcery.com>
4802 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4803 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4805 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4806 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4808 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4809 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4810 (c_parser_declarator, c_parser_direct_declarator_inner)
4811 (c_parser_parameter_declaration, c_parser_type_name): All callers
4813 (c_parser_declaration_or_fndef): Handle declarations with type
4814 determined from the initializer.
4816 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
4818 * c-typeck.c: Include gimplify.h.
4820 2013-11-12 Joseph Myers <joseph@codesourcery.com>
4822 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4823 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4825 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4826 or _Thread_local as appropriate in diagnostics.
4827 (build_null_declspecs): Initialize ret->thread_gnu_p.
4828 (declspecs_add_scspec): Handle either __thread or _Thread_local
4829 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
4830 pedantic. Do not disallow _Thread_local extern and _Thread_local
4833 2013-11-07 Joseph Myers <joseph@codesourcery.com>
4834 Andrew MacLeod <amacleod@redhat.com>
4836 * c-aux-info.c (gen_type): Handle atomic qualifier.
4837 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4838 qualifiers when compating types.
4839 (shadow_tag_warned): Handle atomic_p in declspecs.
4840 (quals_from_declspecs): Likewise.
4841 (start_decl): Use c_type_promotes_to when promoting argument
4843 (grokdeclarator): Handle _Atomic.
4844 (get_parm_info): Diagnose any qualifier on "void" as only
4846 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4847 comparing types. Use c_type_promotes_to when promoting argument
4849 (finish_function): Use c_type_promotes_to when promoting argument
4851 (build_null_declspecs): Handle atomic_p in declspecs.
4852 (declspecs_add_qual): Handle RID_ATOMIC.
4853 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4854 (c_token_starts_declspecs): Handle RID_ATOMIC.
4855 (c_parser_declspecs): Handle atomic type specifiers and
4857 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4858 from types of expressions with atomic type.
4859 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4860 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4861 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4862 (c_parser_statement_after_labels, c_parser_switch_statement)
4863 (c_parser_for_statement, c_parser_expr_no_commas)
4864 (c_parser_conditional_expression, c_parser_binary_expression)
4865 (c_parser_cast_expression, c_parser_unary_expression)
4866 (c_parser_postfix_expression)
4867 (c_parser_postfix_expression_after_primary, c_parser_expression):
4868 Use convert_lvalue_to_rvalue.
4869 (c_parser_expression_conv, c_parser_expr_list): Document
4870 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4871 (c_parser_objc_synchronized_statement): Use
4872 convert_lvalue_to_rvalue.
4873 (c_parser_objc_selector): Handle RID_ATOMIC.
4874 (c_parser_objc_receiver, c_parser_array_notation): Use
4875 convert_lvalue_to_rvalue.
4876 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4877 _Atomic (type-name).
4878 (struct c_declspecs): Add atomic_p field.
4879 (convert_lvalue_to_rvalue): Declare.
4880 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4881 corresponding atomic types.
4882 (qualify_type): Don't add _Atomic qualifiers from second argument.
4883 (comp_target_types): Do not allow _Atomic mismatches.
4884 (type_lists_compatible_p): Do not remove atomic qualifiers when
4886 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4887 (build_atomic_assign): New functions.
4888 (build_unary_op): Use build_atomic_assign for atomic increment and
4890 (build_conditional_expr): Do not treat _Atomic void as a qualified
4892 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4893 (find_anonymous_field_with_type, convert_to_anonymous_field)
4894 (convert_for_assignment): Do not remove atomic qualifiers when
4896 (digest_init): Do not accept initialization of arrays of atomic
4897 elements by string constants.
4898 (build_asm_expr): Use convert_lvalue_to_rvalue.
4899 (build_binary_op): Do not treat _Atomic void as a qualified
4902 2013-11-06 DJ Delorie <dj@redhat.com>
4904 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4905 both explicit and builtin, print the location of the explicit one.
4907 2013-11-05 Tobias Burnus <burnus@net-b.de>
4909 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4910 c_parser_omp_distribute, c_parser_omp_teams,
4911 c_parser_omp_target, c_parser_omp_declare): Handle
4914 2013-11-03 Marek Polacek <polacek@redhat.com>
4916 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4918 2013-11-01 Jakub Jelinek <jakub@redhat.com>
4920 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4921 check_dup_generic at the end, unless remove is true.
4922 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4924 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4926 2013-10-31 Jakub Jelinek <jakub@redhat.com>
4928 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4929 with decl that is not pointer nor array.
4931 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4933 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4934 a spawning function is found.
4935 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4936 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4937 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4938 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4940 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4941 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4943 (c_finish_return): Added a check to reject _Cilk_spawn in return
4945 (build_cilk_spawn): New function.
4946 (build_cilk_sync): Likewise.
4947 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4949 2013-10-27 Tobias Burnus <burnus@net-b.de>
4952 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4953 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4954 (c_parser_statement_after_labels): Update calls.
4956 2013-10-24 Tobias Burnus <burnus@net-b.de>
4959 * c-parser.c (c_parser_pragma, c_parser_for_statement):
4960 Handle PRAGMA_IVDEP.
4961 (c_parser_statement_after_labels): Update call.
4963 2013-10-24 Marek Polacek <polacek@redhat.com>
4965 * c-parser.c (c_parser_struct_declaration): Add a comment.
4966 (c_parser_declarator): Don't allow _Alignas here.
4968 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
4970 * c-parser.c: Include omp-low.h.
4971 * c-typeck.c: Likewise.
4973 2013-10-17 Marek Polacek <polacek@redhat.com>
4976 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4977 Document syntax of the array-declarator.
4978 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4980 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4981 (c_parser_struct_declaration): Likewise.
4982 (c_parser_declarator): Likewise.
4983 (c_parser_direct_declarator_inner): Likewise.
4984 (c_parser_parameter_declaration): Likewise.
4985 (c_parser_type_name): Likewise.
4987 2013-10-11 Jakub Jelinek <jakub@redhat.com>
4989 * c-lang.h (current_omp_declare_target_attribute): New extern
4991 * c-parser.c: Include c-lang.h.
4992 (struct c_parser): Change tokens to c_token *.
4993 Add tokens_buf field. Change tokens_avail type to unsigned int.
4994 (c_parser_consume_token): If parser->tokens isn't
4995 &parser->tokens_buf[0], increment parser->tokens.
4996 (c_parser_consume_pragma): Likewise.
4997 (enum pragma_context): Add pragma_struct and pragma_param.
4998 (c_parser_external_declaration): Adjust
4999 c_parser_declaration_or_fndef caller.
5000 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5001 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5002 Adjust recursive call.
5003 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5005 (c_parser_parameter_declaration): Use pragma_param instead of
5007 (c_parser_compound_statement_nostart, c_parser_label,
5008 c_parser_for_statement): Adjust
5009 c_parser_declaration_or_fndef callers.
5010 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5011 it through to c_parser_conditional_expression.
5012 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5013 pass it through to c_parser_binary_expression. Adjust recursive
5015 (c_parser_binary_expression): Remove prec argument, add
5016 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5017 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5018 binop matches it, use build2 instead of parser_build_binary_op.
5019 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5020 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5021 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5022 Handle pragma_struct and pragma_param the same as pragma_external.
5023 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5024 (c_parser_omp_variable_list): Parse array sections for
5025 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5026 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5027 (c_parser_omp_clause_reduction): Handle user defined reductions.
5028 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5029 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5030 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5031 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5032 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5033 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5034 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5035 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5036 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5037 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5038 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5039 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5040 (c_parser_omp_for_loop): Add CODE argument, pass it through
5041 to c_finish_omp_for. Change last argument to cclauses,
5042 and adjust uses to grab parallel clauses from the array of all
5043 the split clauses. Adjust c_parser_binary_expression,
5044 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5045 (omp_split_clauses): New function.
5046 (c_parser_omp_simd): New function.
5047 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5048 Allow the function to be called also when parsing combined constructs,
5049 and call c_parser_omp_simd when parsing for simd.
5050 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5051 #pragma omp section, require exactly one structured-block instead of
5052 sequence of statements.
5053 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5054 Allow the function to be called also when parsing combined constructs.
5055 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5056 Allow the function to be called also when parsing combined
5058 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5059 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5060 c_parser_omp_teams, c_parser_omp_target_data,
5061 c_parser_omp_target_update, c_parser_omp_target,
5062 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5063 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5064 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5065 (c_parser_omp_construct): Add p_name and mask vars. Handle
5066 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5067 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5068 and c_parser_omp_sections callers.
5069 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5070 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5071 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5072 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5073 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5075 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5076 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5077 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5078 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5079 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5080 * c-typeck.c: Include tree-inline.h.
5081 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5082 handle_omp_array_sections_1, handle_omp_array_sections,
5083 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5084 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5085 user defined reductions.
5086 (c_tree_equal): New function.
5087 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5088 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5089 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5090 c_check_omp_declare_reduction_r): New prototypes.
5091 * c-decl.c (current_omp_declare_target_attribute): New variable.
5092 (c_decl_attributes): New function.
5093 (start_decl, start_function): Use it instead of decl_attributes.
5094 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5095 c_omp_reduction_decl, c_omp_reduction_lookup,
5096 c_check_omp_declare_reduction_r): New functions.
5098 2013-09-25 Tom Tromey <tromey@redhat.com>
5100 * Make-lang.in (c/gccspec.o): Remove.
5101 (CFLAGS-c/gccspec.o): New variable.
5102 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5103 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5104 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5106 2013-09-25 Tom Tromey <tromey@redhat.com>
5108 * Make-lang.in (c/gccspec.o): Don't use subshell.
5110 2013-09-18 Marek Polacek <polacek@redhat.com>
5113 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5114 Remove unnecessary check.
5116 2013-09-18 Marek Polacek <polacek@redhat.com>
5119 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5120 no_sanitize_undefined attribute.
5122 2013-09-13 Kai Tietz <ktietz@redhat.com>
5125 * c-decl.c (c_builtin_function_ext_scope): Remove
5126 wrong assumption that it is never called on prexisting
5129 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5131 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5133 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5135 * c-objc-common.c (c_tree_printer): Tidy.
5137 2013-08-30 Marek Polacek <polacek@redhat.com>
5139 * c-typeck.c (build_binary_op): Add division by zero and shift
5142 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
5143 Joseph Myers <joseph@codesourcery.com>
5146 * c-typeck.c (c_common_type): Prefer double_type_node over
5147 other REAL_TYPE types with the same precision.
5148 (convert_arguments): Likewise.
5150 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5152 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5153 (c_initialize_diagnostics): Call a destructor for the early printer.
5155 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5157 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5158 printer initialization.
5160 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
5163 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5164 check for truth values.
5165 (expand_array_notation_exprs): Added truth values case. Removed an
5166 unwanted else. Added for-loop to walk through subtrees in default
5169 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5171 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5173 2013-07-23 Joseph Myers <joseph@codesourcery.com>
5175 * c-parser.c (struct c_generic_association): Fix typo.
5177 2013-07-23 Tom Tromey <tromey@redhat.com>
5178 Joseph Myers <joseph@codesourcery.com>
5180 * c-parser.c (struct c_generic_association): New.
5181 (c_generic_association_d): New typedef.
5182 (c_parser_generic_selection): New function.
5183 (c_parser_postfix_expression): Handle RID_GENERIC.
5185 2013-07-13 Jason Merrill <jason@redhat.com>
5188 * c-decl.c (finish_struct): Check for too-large class.
5190 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
5193 * c-typeck.c (set_init_index): When folding, check for index overflow.
5195 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5197 * c-parser.c (c_parser_array_notation): Removed rejection of array
5198 notations in an array of function pointers.
5200 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5202 * c-array-notation.c (make_triplet_val_inv): New function.
5203 (create_cmp_incr): Likewise.
5204 (create_array_refs): Likewise.
5205 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5206 Also modularized common parts between functions and called the function.
5207 (build_array_notation_expr): Likewise.
5208 (fix_conditional_array_notations_1): Likewise.
5209 (fix_array_notation_expr): Likewise.
5210 (fix_array_notation_call_expr): Likewise.
5212 2013-06-18 Marek Polacek <polacek@redhat.com>
5215 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5217 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5219 * c-array-notation.c (build_array_notation_expr): Reject array notation
5220 mismatch between LHS and RHS even inside a call_expr. Also, removed
5221 a couple while statements that were dead code.
5223 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5225 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5226 excessive precision expressions in function parameters. Also removed
5227 couple unwanted while statements.
5229 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5231 * c-array-notation.c (expand_array_notation_exprs): Added
5232 ARRAY_NOTATION_REF case.
5234 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5236 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5237 function to c-family/array-notation-common.c.
5238 (is_cilkplus_reduce_builtin): Likewise.
5239 (find_rank): Likewise.
5240 (extract_array_notation_exprs): Likewise.
5241 (replace_array_notations): Likewise.
5242 (find_inv_trees): Likewise.
5243 (replace_inv_trees): Likewise.
5244 (contains_array_notation_expr): Likewise.
5245 (find_correct_array_notation_type): Likewise.
5246 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5247 (struct inv_list): Moved this to c-family/array-notation-common.c.
5248 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5250 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5252 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5253 reduction functions outside the for-loop. Added a check if the fundecl
5254 is non-NULL. Finally, removed an unwanted if-statement, and made the
5257 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5259 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5260 condition of the if-statement matches the rank of else-block and then-
5261 block when array notations are used.
5262 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5263 expression after the entire function body is parsed.
5264 (c_parser_expr_no_commas): Delayed creating array notation expressions
5265 to the end of function parsing.
5266 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5267 whole if-statement instead of just the condition.
5268 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5270 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5273 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5274 array to NULL_TREE if they are unused. Also added a check for the
5275 field to be NULL before its fields are used in future.
5277 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5280 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5281 (build_array_notation_expr): Likewise.
5283 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5285 * c-typeck.c (build_array_ref): Added a check to see if array's
5286 index is greater than one. If true, then emit an error.
5287 (build_function_call_vec): Exclude error reporting and checking
5288 for builtin array-notation functions.
5289 (convert_arguments): Likewise.
5290 (c_finish_return): Added a check for array notations as a return
5291 expression. If true, then emit an error.
5292 (c_finish_loop): Added a check for array notations in a loop
5293 condition. If true then emit an error.
5294 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5295 (build_binary_op): Added a check for array notation expr inside
5296 op1 and op0. If present, we call another function to find correct
5298 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5299 * c-parser.c (c_parser_compound_statement): Check if array
5300 notation code is used in tree, if so, then transform them into
5302 (c_parser_expr_no_commas): Check if array notation is used in LHS
5303 or RHS, if so, then build array notation expression instead of
5305 (c_parser_postfix_expression_after_primary): Added a check for
5306 colon(s) after square braces, if so then handle it like an array
5307 notation. Also, break up array notations in unary op if found.
5308 (c_parser_direct_declarator_inner): Added a check for array
5310 (c_parser_compound_statement): Added a check for array notation in
5311 a stmt. If one is present, then expand array notation expr.
5312 (c_parser_if_statement): Likewise.
5313 (c_parser_switch_statement): Added a check for array notations in
5314 a switch statement's condition. If true, then output an error.
5315 (c_parser_while_statement): Similarly, but for a while.
5316 (c_parser_do_statement): Similarly, but for a do-while.
5317 (c_parser_for_statement): Similarly, but for a for-loop.
5318 (c_parser_unary_expression): Check if array notation is used in a
5319 pre-increment or pre-decrement expression. If true, then expand
5321 (c_parser_array_notation): New function.
5322 * c-array-notation.c: New file.
5323 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5325 2013-05-23 Mike Stump <mikestump@comcast.net>
5327 * c-typeck.c (convert_for_assignment): Handle references to memory
5330 2013-05-16 Jason Merrill <jason@redhat.com>
5332 * Make-lang.in (cc1$(exeext)): Use link mutex.
5334 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5336 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5337 to simply use OPT_Wpointer_arith.
5338 (build_unary_op): Likewise.
5340 2013-04-03 Jakub Jelinek <jakub@redhat.com>
5343 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5344 argument. If set, or it temporarily for parsing of the first
5345 argument into force_folding_builtin_constant_p.
5346 (c_parser_postfix_expression): Adjust callers.
5348 2013-03-21 Richard Biener <rguenther@suse.de>
5350 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5351 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5353 2013-02-12 Marek Polacek <polacek@redhat.com>
5356 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5359 2013-01-24 Jakub Jelinek <jakub@redhat.com>
5362 * c-typeck.c (set_nonincremental_init_from_string): If
5363 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5365 (process_init_element): Likewise.
5367 2012-12-20 Jakub Jelinek <jakub@redhat.com>
5370 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5371 argument, don't call default_function_array_conversion
5372 nor c_fully_fold here.
5373 (c_parser_asm_statement): Adjust callers.
5374 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5375 and outputs here, and call default_function_array_conversion
5376 on inputs that don't need to be addressable.
5378 2012-12-18 Jakub Jelinek <jakub@redhat.com>
5381 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5382 warning require that both c_common_unsigned_type as well as
5383 c_common_signed_type is the same for both mvl and mvr types.
5385 2012-11-16 Diego Novillo <dnovillo@google.com>
5387 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5389 * c-common.c: Use new vec API in vec.h.
5390 * c-common.h: Likewise.
5391 * c-gimplify.c: Likewise.
5392 * c-pragma.c: Likewise.
5393 * c-pretty-print.c: Likewise.
5394 * c-pretty-print.h: Likewise.
5395 * c-semantics.c: Likewise.
5396 * c-decl.c: Likewise.
5397 * c-parser.c: Likewise.
5398 * c-tree.h: Likewise.
5399 * c-typeck.c: Likewise.
5401 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5404 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5406 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5409 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5410 shadows a function, unless the variable is a function or a
5411 pointer-to-function.
5413 2012-10-12 Jakub Jelinek <jakub@redhat.com>
5416 * c-parser.c (struct c_tree_loc_pair): Removed.
5417 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5418 add location_t * and tree * arguments, fill in array of 3
5419 sizeof_arg trees and corresponding locs.
5420 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5421 c_parser_expr_list callers.
5422 (c_parser_postfix_expression_after_primary): Likewise. Pass
5423 array of 3 sizeof_arg trees and locs (corresponding to first
5424 3 arguments) to sizeof_pointer_memaccess_warning.
5426 2012-10-09 Lawrence Crowl <crowl@google.com>
5428 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5429 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5432 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5435 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5438 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
5441 * c-typeck.c: Include c-common.h.
5442 (enum stv_conv): Moved to c-common.h.
5443 (scalar_to_vector): Moved to c-common.c.
5444 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5445 * Make-lang.in: c-typeck.c depends on c-common.h.
5447 2012-10-04 Arnaud Charlet <charlet@adacore.com>
5449 * c-decl.c (c_write_global_declarations): Fix handling of
5452 2012-09-30 Sharad Singhai <singhai@google.com>
5454 * c-decl.c (c_write_global_declarations): Use a different method
5455 to determine if the dump has ben initialized.
5457 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5460 * c-typeck.c (c_cast_expr): When casting to a type requiring
5461 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5464 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5467 * c-typeck.c (build_unary_op): Pass original argument of
5468 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5469 any C_MAYBE_CONST_EXPR, if it has integer operands.
5470 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5471 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5472 to c_objc_common_truthvalue_conversion, then remove any
5473 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5474 c_objc_common_truthvalue_conversion not
5475 c_common_truthvalue_conversion.
5476 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5477 call note_integer_operands for arguments with integer operands
5478 that are not integer constants.
5480 2012-09-13 Jakub Jelinek <jakub@redhat.com>
5483 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5484 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5486 2012-08-31 Jakub Jelinek <jakub@redhat.com>
5489 * c-convert.c (convert): Don't call fold_convert_loc if
5490 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5491 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5492 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5494 2012-08-24 Jakub Jelinek <jakub@redhat.com>
5497 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5498 for nested and empty_ok arguments in the call to
5499 c_parser_declaration_or_fndef.
5501 2012-08-17 Jakub Jelinek <jakub@redhat.com>
5503 * c-tree.h (c_last_sizeof_arg): Declare.
5504 * c-parser.c (struct c_tree_loc_pair): New type.
5505 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5507 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5508 (c_parser_postfix_expression_after_primary): Likewise. Call
5509 sizeof_pointer_memaccess_warning if needed.
5510 (sizeof_ptr_memacc_comptypes): New function.
5511 * c-typeck.c (c_last_sizeof_arg): New global variable.
5512 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5514 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
5516 * c-lang.h (lang_decl): Add variable_size GTY option.
5518 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5520 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5521 * Make-lang.in: Fix dependencies.
5523 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5525 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5526 and add language Makefile hooks.
5527 * config-lang.in: New file.
5528 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5529 add the required "normal" config-lang.in rules.
5530 * c-lang.h: Moved from gcc/ to here.
5531 * c-tree.h: Likewise.
5532 * c-objc-common.c: Likewise.
5533 * c-objc-common.h: Likewise.
5534 * c-typeck.c: Likewise.
5535 * c-convert.c: Likewise.
5536 * c-lang.c: Likewise.
5537 * c-aux-info.c: Likewise.
5538 * c-errors.c: Likewise.
5539 * gccspec.c: Likewise.
5540 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5541 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5543 Copyright (C) 2012-2018 Free Software Foundation, Inc.
5545 Copying and distribution of this file, with or without modification,
5546 are permitted in any medium without royalty provided the copyright
5547 notice and this notice are preserved.