1 2018-08-27 Martin Liska <mliska@suse.cz>
3 * c-decl.c (locate_old_decl): Use new function
4 fndecl_built_in_p and remove check for FUNCTION_DECL if
6 (diagnose_mismatched_decls): Likewise.
7 (merge_decls): Likewise.
8 (warn_if_shadowing): Likewise.
10 (implicitly_declare): Likewise.
11 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
12 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
13 * c-typeck.c (build_function_call_vec): Likewise.
14 (convert_arguments): Likewise.
16 2018-08-20 David Malcolm <dmalcolm@redhat.com>
19 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
20 (diagnose_mismatched_decls): Likewise, in various places.
21 (warn_if_shadowing): Likewise.
22 (implicit_decl_warning): Likewise.
23 (implicitly_declare): Likewise.
24 (undeclared_variable): Likewise.
25 (declare_label): Likewise.
26 (grokdeclarator): Likewise.
27 (start_function): Likewise.
28 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
29 (c_parser_parameter_declaration): Likewise.
30 (c_parser_binary_expression): Likewise.
31 * c-typeck.c (c_expr_sizeof_expr): Likewise.
32 (parser_build_binary_op): Likewise.
33 (build_unary_op): Likewise.
34 (error_init): Likewise.
35 (pedwarn_init): Likewise.
36 (warning_init): Likewise.
37 (convert_for_assignment): Likewise.
39 2018-08-15 David Malcolm <dmalcolm@redhat.com>
41 * c-objc-common.c: Include "gcc-rich-location.h".
42 (c_tree_printer): Move implemenation of '%T' to...
43 (print_type): ...this new function.
44 (range_label_for_type_mismatch::get_text): New function.
45 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
46 range for the various ic_argpass cases.
47 (class maybe_range_label_for_tree_type_mismatch): New class.
48 (build_binary_op): Use it when calling binary_op_error.
50 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
52 * c-decl.c (start_decl): Do not warn if variables is named as main
53 and is a local variable.
55 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
58 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
59 objects of unknown size.
61 2018-08-13 Martin Sebor <msebor@redhat.com>
63 PR tree-optimization/71625
64 * c-parser.c (c_parser_declaration_or_fndef): Call
65 braced_list_to_string.
67 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
70 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
73 2018-08-01 Martin Sebor <msebor@redhat.com>
75 PR tree-optimization/86650
76 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
77 and TREE_BLOCK (t) from within percent_K_format to this callsite.
79 2018-08-01 Jakub Jelinek <jakub@redhat.com>
82 * c-typeck.c (init_field_decl_cmp): New function.
83 (output_pending_init_elements): Use it for field comparisons
84 instead of pure bit_position comparisons.
86 2018-07-12 Jakub Jelinek <jakub@redhat.com>
88 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
89 type here, instead add "omp declare target implicit" attribute.
90 (finish_decl): Diagnose vars without mappable type here.
92 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
93 Thomas Schwinge <thomas@codesourcery.com>
94 Cesar Philippidis <cesar@codesourcery.com>
96 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
97 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
98 to their non-present_or_* counterparts. Make 'self' an alias to
99 PRAGMA_OACC_CLAUSE_HOST.
100 (c_parser_oacc_data_clause): Update GOMP mappings for
101 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
102 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
103 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
104 Remove support for present_or_* clauses.
105 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
106 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
107 (OACC_DECLARE_CLAUSE_MASK): Likewise.
108 (OACC_DATA_CLAUSE_MASK): Likewise.
109 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
110 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
111 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
112 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
113 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
115 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
117 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
118 * gimple-parser.c (c_parser_gimple_statement): Likewise.
119 (c_parser_gimple_unary_expression): Likewise.
121 2018-06-15 Jakub Jelinek <jakub@redhat.com>
124 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
125 before doing POINTER_DIFF_EXPR.
127 2018-06-07 Marek Polacek <polacek@redhat.com>
130 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
131 for loop initial declarations.
133 2018-05-30 David Pagan <dave.pagan@oracle.com>
136 * c-decl.c (grokdeclarator): Update check for return type warnings.
137 (start_function): Likewise.
138 (finish_function): Likewise.
139 * c-typeck.c (c_finish_return): Update check for return type warnings.
140 Pass OPT_Wreturn_type to pedwarn when appropriate.
142 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
144 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
147 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
149 * gimple-parser.c: Include internal-fn.h.
150 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
151 (c_parser_gimple_call_internal): New function.
152 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
153 Fix typos in comment.
155 2018-05-10 Jakub Jelinek <jakub@redhat.com>
158 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
159 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
161 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
162 fold_offsetof_1, pass argtype as TYPE to it and drop the
165 2018-05-02 David Pagan <dave.pagan@oracle.com>
168 * c-decl.c (old_style_parameter_scope): New function.
169 * c-parser.c (c_parser_postfix_expression): Check for statement
170 expressions in old-style function parameter list declarations.
171 * c-parser.h (old_style_parameter_scope): New extern declaration.
173 2018-04-25 Jakub Jelinek <jakub@redhat.com>
176 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
177 it is not TREE_STATIC.
178 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
179 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
180 its COMPOUND_LITERAL_EXPR_DECL.
182 2018-03-21 Joseph Myers <joseph@codesourcery.com>
184 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
185 where all functions return the same _FloatN or _FloatNx type,
186 treat integer types as _Float64 instead of double.
188 2018-03-21 Jakub Jelinek <jakub@redhat.com>
191 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
192 building vector comparison, diagnose it and return error_mark_node.
194 2018-03-15 Jakub Jelinek <jakub@redhat.com>
197 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
198 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
199 INTEGER_TYPE element type.
201 2018-03-13 David Pagan <dave.pagan@oracle.com>
204 * c-typeck.c (output_init_element): Ensure field initializer
205 expression is always evaluated if there are side effects.
207 2018-03-06 Jakub Jelinek <jakub@redhat.com>
210 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
211 !building_stmt_list_p ().
213 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
216 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
217 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
218 and include the BIND_EXPR in the list of things that need to be
221 2018-02-09 Nathan Sidwell <nathan@acm.org>
224 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
225 to strict_aliasing_warning.
227 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
229 * c-typeck.c (really_start_incremental_init, push_init_level,
230 set_nonincremental_init, output_init_element, process_init_element):
231 Use DECL_UNNAMED_BIT_FIELD.
233 2018-01-31 Marek Polacek <polacek@redhat.com>
236 * c-parser.c (c_parser_compound_statement_nostart): Call
237 expansion_point_location_if_in_system_header.
239 2018-01-17 David Malcolm <dmalcolm@redhat.com>
242 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
245 2018-01-13 Jakub Jelinek <jakub@redhat.com>
248 * c-tree.h (decl_constant_value_1): Add a bool argument.
249 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
250 returning a CONSTRUCTOR if it is true. Use error_operand_p.
251 (decl_constant_value): Adjust caller.
252 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
253 decl_constant_value_1 as IN_INIT. Otherwise, punt if
254 decl_constant_value returns initializer that has BLKmode or
256 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
258 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
259 Alan Hayward <alan.hayward@arm.com>
260 David Sherwood <david.sherwood@arm.com>
262 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
263 TYPE_VECTOR_SUBPARTS.
265 2018-01-03 Jakub Jelinek <jakub@redhat.com>
267 Update copyright years.
269 2018-01-01 Jakub Jelinek <jakub@redhat.com>
272 * c-parser.c (c_parser_braced_init, c_parser_initelt,
273 c_parser_conditional_expression, c_parser_cast_expression,
274 c_parser_sizeof_expression, c_parser_alignof_expression,
275 c_parser_postfix_expression, c_parser_omp_declare_reduction,
276 c_parser_transaction_expression): Use set_error () method instead
277 of setting value member to error_mark_node.
279 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
281 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
282 and _Float<N>X built-in functions.
284 2017-12-22 Jakub Jelinek <jakub@redhat.com>
287 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
288 TYPE_STUB_DECL and call rest_of_type_compilation before processing
289 incomplete vars rather than after it.
292 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
293 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
294 and consider empty ones if there are no other stmts. For
295 -Wunused-value walk all statements before the one only followed by
298 2017-12-22 Mike Stump <mikestump@comcast.net>
299 Eric Botcazou <ebotcazou@adacore.com>
301 * c-parser.c (c_parser_while_statement): Add unroll parameter and
302 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
303 (c_parser_do_statement): Likewise.
304 (c_parser_for_statement): Likewise.
305 (c_parser_statement_after_labels): Adjust calls to above.
306 (c_parse_pragma_ivdep): New static function.
307 (c_parser_pragma_unroll): Likewise.
308 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
309 <PRAGMA_UNROLL>: New case.
311 2017-12-19 Jakub Jelinek <jakub@redhat.com>
313 * c-typeck.c (comptypes_internal, function_types_compatible_p,
314 perform_integral_promotions, digest_init): Replace Yoda conditions
315 with typical order conditions.
316 * c-decl.c (check_bitfield_type_and_width): Likewise.
318 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
320 * c-typeck.c (c_safe_arg_type_equiv_p,
321 c_safe_function_type_cast_p): New function.
322 (build_c_cast): Implement -Wcast-function-type.
324 2017-12-14 Richard Biener <rguenther@suse.de>
327 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
328 like REALPART_EXPR for the behavior of whether its operand
331 2017-12-12 Marek Polacek <polacek@redhat.com>
334 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
336 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
338 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
339 * c-parser.c (add_debug_begin_stmt): New.
340 (c_parser_declaration_or_fndef): Call it.
341 (c_parser_compound_statement_nostart): Likewise.
342 (c_parser_statement_after_labels): Likewise.
343 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
345 2017-12-07 Joseph Myers <joseph@codesourcery.com>
347 * c-decl.c (build_compound_literal): Add parameter alignas_align
348 and set alignment of decl if nonzero.
349 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
350 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
352 (c_parser_struct_declaration): Update syntax comment.
353 (c_parser_type_name): Add alignas_ok argument and pass it to
355 (c_parser_cast_expression): Pass true to c_parser_type_name and
356 give error if a cast used an _Alignas specifier.
357 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
358 give error if sizeof (type-name) used an _Alignas specifier.
359 (c_parser_alignof_expression): Pass true to c_parser_type_name and
360 give error if _Alignof (type-name) used an _Alignas specifier.
361 (c_parser_postfix_expression_after_paren_type): Check specified
362 alignment for a compound literal and pass it to
363 build_compound_literal.
364 * c-parser.h (c_parser_type_name): Update prototype.
365 * c-tree.h (build_compound_literal): Update prototype.
367 2017-12-07 Martin Sebor <msebor@redhat.com>
370 * c-decl.c (c_decl_attributes): Look up existing declaration and
371 pass it to decl_attributes.
373 2017-12-06 David Malcolm <dmalcolm@redhat.com>
376 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
377 reserved for use by the implementation.
379 2017-12-06 David Malcolm <dmalcolm@redhat.com>
381 * c-decl.c: Include "c-family/c-spellcheck.h".
383 2017-12-05 Martin Liska <mliska@suse.cz>
384 Jakub Jelinek <jakub@redhat.com>
386 * c-typeck.c (pointer_diff): Add new argument and instrument
388 (build_binary_op): Similar for pointer comparison.
390 2017-12-01 Jakub Jelinek <jakub@redhat.com>
393 * c-parser.c: Include tree-iterator.h.
394 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
395 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
399 * c-tree.h (decl_constant_value_1): Declare.
400 * c-typeck.c (decl_constant_value_1): New function.
401 (decl_constant_value): Use it.
402 * c-fold.c (c_fully_fold_internal): If in_init, use
403 decl_constant_value_1 instead of decl_constant_value.
405 2017-11-30 Jakub Jelinek <jakub@redhat.com>
407 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
409 2017-11-28 Jakub Jelinek <jakub@redhat.com>
412 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
413 c_switch_covers_all_cases_p returns true.
415 2017-11-28 Julia Koval <julia.koval@intel.com>
416 Sebastian Peryt <sebastian.peryt@intel.com>
418 * Make-lang.in (c/c-array-notation.o): Remove.
419 * c-array-notation.c: Delete.
420 * c-decl.c: Remove cilkplus condition.
421 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
422 c_parser_cilk_verify_simd, c_parser_array_notation,
423 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
424 c_parser_cilk_simd_fn_vector_attrs,
425 c_finish_cilk_simd_fn_tokens): Delete.
426 (c_parser_declaration_or_fndef): Remove cilkplus condition.
427 (c_parser_direct_declarator_inner): Ditto.
428 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
429 (c_parser_attributes, c_parser_compound_statement,
430 c_parser_statement_after_labels, c_parser_if_statement,
431 c_parser_switch_statement, c_parser_while_statement,
432 c_parser_do_statement, c_parser_for_statement,
433 c_parser_unary_expression, c_parser_postfix_expression,
434 c_parser_postfix_expression_after_primary,
435 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
436 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
438 * c-typeck.c (build_array_ref, build_function_call_vec,
440 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
441 c_finish_loop, build_binary_op): Remove cilkplus support.
443 2017-11-28 Jakub Jelinek <jakub@redhat.com>
445 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
448 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
450 * Make-lang.in (c.install-plugin): Install backend import library.
452 2017-11-23 Jakub Jelinek <jakub@redhat.com>
454 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
457 2017-11-23 Mike Stump <mikestump@comcast.net>
458 Eric Botcazou <ebotcazou@adacore.com>
460 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
462 (c_parser_do_statement): Likewise.
463 (c_parser_for_statement): Likewise.
465 2017-11-22 David Malcolm <dmalcolm@redhat.com>
468 * c-objc-common.c (c_tree_printer): Convert penultimate param from
469 bool to bool *. Within '%T' handling, if showing an "aka", use
470 "quoted" param to add appropriate quoting.
472 2017-11-22 Marek Polacek <polacek@redhat.com>
477 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
479 2017-11-21 David Malcolm <dmalcolm@redhat.com>
482 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
483 earlier failed lookups.
485 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
487 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
488 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
490 2017-11-20 David Malcolm <dmalcolm@redhat.com>
493 * c-decl.c: Include "c-family/known-headers.h".
494 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
496 (class suggest_missing_header): Move to known-header.h.
497 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
498 than get_c_name_hint.
500 2017-11-20 David Malcolm <dmalcolm@redhat.com>
502 * c-decl.c (get_c_name_hint): New function.
503 (class suggest_missing_header): New class.
504 (lookup_name_fuzzy): Call get_c_name_hint and use it to
505 suggest missing headers to the user.
507 2017-11-20 David Malcolm <dmalcolm@redhat.com>
509 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
510 Include "c-family/name-hint.h"
511 (implicit_decl_warning): Convert "hint" from
512 const char * to name_hint. Pass location to
513 lookup_name_fuzzy. Suppress any deferred diagnostic if the
514 warning was not printed.
515 (undeclared_variable): Likewise for "guessed_id".
516 (lookup_name_fuzzy): Convert return type from const char *
517 to name_hint. Add location_t param.
518 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
519 Include "c-family/name-hint.h"
520 (c_parser_declaration_or_fndef): Convert "hint" from
521 const char * to name_hint. Pass location to lookup_name_fuzzy.
522 (c_parser_parameter_declaration): Likewise.
524 2017-11-19 Jakub Jelinek <jakub@redhat.com>
528 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
530 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
531 handle_omp_array_sections): Likewise.
532 (digest_init): Don't call decl_constant_value_for_optimization.
533 * c-tree.h (decl_constant_value_for_optimization): Removed.
534 * c-fold.c (c_fold_array_ref): New function.
535 (c_fully_fold_internal): Add LVAL argument, propagate it through
536 recursive calls. For VAR_P call decl_constant_value and
537 unshare if not LVAL and either optimizing or IN_INIT. Remove
538 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
539 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
540 (c_fully_fold): Add LVAL argument, pass it through to
541 c_fully_fold_internal.
542 (decl_constant_value_for_optimization): Removed.
544 2017-11-15 Joseph Myers <joseph@codesourcery.com>
547 * c-parser.c (check_tgmath_function): New function.
548 (enum tgmath_parm_kind): New enum.
549 (c_parser_postfix_expression): Handle __builtin_tgmath.
551 2017-10-31 David Malcolm <dmalcolm@redhat.com>
553 * c-decl.c (implicit_decl_warning): Update for renaming of
554 pedwarn_at_rich_loc and warning_at_rich_loc.
555 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
556 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
557 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
558 (c_parser_struct_or_union_specifier): Likewise for renaming of
560 (c_parser_parameter_declaration): Likewise for renaming of
562 * c-typeck.c (build_component_ref): Likewise.
563 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
564 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
565 (set_init_label): Likewise for renaming of error_at_rich_loc.
567 2017-10-30 Richard Biener <rguenther@suse.de>
569 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
572 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
574 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
575 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
577 2017-10-25 David Malcolm <dmalcolm@redhat.com>
580 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
583 2017-10-25 Jakub Jelinek <jakub@redhat.com>
586 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
587 newdecl to corresponding __builtin_ if any.
589 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
592 * c-decl.c (diagnose_mismatched_decls): Use
593 OPT_Wbuiltin_declaration_mismatch.
595 2017-10-12 David Malcolm <dmalcolm@redhat.com>
597 * c-parser.c (c_parser_require): Add "type_is_unique" param and
598 use it to guard calls to maybe_suggest_missing_token_insertion.
599 (c_parser_parms_list_declarator): Override default value of new
600 "type_is_unique" param to c_parser_require.
601 (c_parser_asm_statement): Likewise.
602 * c-parser.h (c_parser_require): Add "type_is_unique" param,
605 2017-10-11 Nathan Sidwell <nathan@acm.org>
607 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
609 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
611 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
612 operating on trees as wide_ints.
613 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
614 (c_tree_equal): Likewise.
616 2017-10-04 David Malcolm <dmalcolm@redhat.com>
618 * c-decl.c (push_parm_decl): Store c_parm's location into the
620 (build_c_parm): Add "loc" param and store it within the c_parm.
621 * c-parser.c (struct c_parser): Add "last_token_location" field.
622 (c_parser_consume_token): Store location of the token into the
624 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
625 when handling a FUNCTION_DECL, if it doesn't already have them.
626 (c_parser_parameter_declaration): Generate a location for the
627 parameter, and pass it to the call to build_c_parm.
628 * c-tree.h (struct c_parm): Add field "loc".
629 (build_c_parm): Add location_t param.
630 * c-typeck.c (get_fndecl_argument_location): New function.
631 (inform_for_arg): New function.
632 (convert_for_assignment): Use inform_for_arg when dealing with
635 2017-09-29 Jakub Jelinek <jakub@redhat.com>
637 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
639 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
640 don't SET_DECL_C_BIT_FIELD here.
643 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
644 instead of trying to set just TREE_READONLY manually.
646 2017-09-16 Tom de Vries <tom@codesourcery.com>
649 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
652 2017-09-15 Joseph Myers <joseph@codesourcery.com>
655 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
657 (build_conditional_expr): For C11, generate result with excess
658 precision when one argument is an integer and the other is of a
659 type using excess precision.
661 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
663 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
665 2017-09-13 Marek Polacek <polacek@redhat.com>
668 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
669 than expr.original_type.
671 2017-09-12 Nathan Sidwell <nathan@acm.org>
673 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
674 resort_sorted_fields): Moved from c-family/c-common.c.
675 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
677 2017-09-01 Joseph Myers <joseph@codesourcery.com>
680 * c-typeck.c (build_atomic_assign): Handle argument with excess
681 precision. Ensure any EXCESS_PRECISION_EXPR is present in
682 argument passed to build_binary_op and convert_for_assignment but
683 not for call to c_fully_fold.
684 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
685 Ensure build_binary_op is called with argument with original
686 semantic type. Avoid calling c_fully_fold with an
687 EXCESS_PRECISION_EXPR from build_binary_op.
689 2017-09-01 Jakub Jelinek <jakub@redhat.com>
692 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
694 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
695 Alan Hayward <alan.hayward@arm.com>
696 David Sherwood <david.sherwood@arm.com>
698 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
699 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
700 m1 and m2 to the signed equivalent of a fixed-point
703 2017-08-24 David Malcolm <dmalcolm@redhat.com>
705 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
706 than CAN_HAVE_LOCATION_P when determining whether to use the
707 location_t value within "value".
709 2017-08-21 David Malcolm <dmalcolm@redhat.com>
711 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
712 rather than peeking the location of the first token.
713 * c-tree.h (c_expr::get_location): New method.
715 2017-08-21 David Malcolm <dmalcolm@redhat.com>
717 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
718 to check_function_arguments.
720 2017-08-18 Marek Polacek <polacek@redhat.com>
722 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
725 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
728 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
729 (check_bitfield_type_and_width): Don't allow bit-field with
730 warn_if_not_aligned type.
732 2017-08-14 Martin Sebor <msebor@redhat.com>
735 * c-objc-common.c (c_objc_common_init): Handle 'G'.
737 2017-08-11 Marek Polacek <polacek@redhat.com>
740 * c-decl.c (pushtag): Only print inform if the warning was printed.
741 (grokdeclarator): Likewise.
743 2017-08-10 David Malcolm <dmalcolm@redhat.com>
745 * c-parser.c (c_parser_error): Rename to...
746 (c_parser_error_richloc): ...this, making static, and adding
747 "richloc" parameter, passing it to the c_parse_error call,
748 rather than calling c_parser_set_source_position_from_token.
749 (c_parser_error): Reintroduce, reimplementing in terms of the
750 above, converting return type from void to bool.
751 (class token_pair): New class.
752 (struct matching_paren_traits): New struct.
753 (matching_parens): New typedef.
754 (struct matching_brace_traits): New struct.
755 (matching_braces): New typedef.
756 (get_matching_symbol): New function.
757 (c_parser_require): Add param MATCHING_LOCATION, using it to
758 highlight matching "opening" tokens for missing "closing" tokens.
759 (c_parser_skip_until_found): Likewise.
760 (c_parser_static_assert_declaration_no_semi): Convert explicit
761 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
762 class matching_parens, so that the pertinent open parenthesis is
763 highlighted when there are problems locating the close
765 (c_parser_struct_or_union_specifier): Likewise.
766 (c_parser_typeof_specifier): Likewise.
767 (c_parser_alignas_specifier): Likewise.
768 (c_parser_simple_asm_expr): Likewise.
769 (c_parser_braced_init): Likewise, for matching_braces.
770 (c_parser_paren_condition): Likewise, for matching_parens.
771 (c_parser_switch_statement): Likewise.
772 (c_parser_for_statement): Likewise.
773 (c_parser_asm_statement): Likewise.
774 (c_parser_asm_operands): Likewise.
775 (c_parser_cast_expression): Likewise.
776 (c_parser_sizeof_expression): Likewise.
777 (c_parser_alignof_expression): Likewise.
778 (c_parser_generic_selection): Likewise.
779 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
780 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
781 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
782 In case CPP_OPEN_PAREN, pass loc_open_paren to the
783 c_parser_skip_until_found call.
784 (c_parser_objc_class_definition): Use class matching_parens as
786 (c_parser_objc_method_decl): Likewise.
787 (c_parser_objc_try_catch_finally_statement): Likewise.
788 (c_parser_objc_synchronized_statement): Likewise.
789 (c_parser_objc_at_property_declaration): Likewise.
790 (c_parser_oacc_wait_list): Likewise.
791 (c_parser_omp_var_list_parens): Likewise.
792 (c_parser_omp_clause_collapse): Likewise.
793 (c_parser_omp_clause_default): Likewise.
794 (c_parser_omp_clause_if): Likewise.
795 (c_parser_omp_clause_num_threads): Likewise.
796 (c_parser_omp_clause_num_tasks): Likewise.
797 (c_parser_omp_clause_grainsize): Likewise.
798 (c_parser_omp_clause_priority): Likewise.
799 (c_parser_omp_clause_hint): Likewise.
800 (c_parser_omp_clause_defaultmap): Likewise.
801 (c_parser_oacc_single_int_clause): Likewise.
802 (c_parser_omp_clause_ordered): Likewise.
803 (c_parser_omp_clause_reduction): Likewise.
804 (c_parser_omp_clause_schedule): Likewise.
805 (c_parser_omp_clause_num_teams): Likewise.
806 (c_parser_omp_clause_thread_limit): Likewise.
807 (c_parser_omp_clause_aligned): Likewise.
808 (c_parser_omp_clause_linear): Likewise.
809 (c_parser_omp_clause_safelen): Likewise.
810 (c_parser_omp_clause_simdlen): Likewise.
811 (c_parser_omp_clause_depend): Likewise.
812 (c_parser_omp_clause_map): Likewise.
813 (c_parser_omp_clause_device): Likewise.
814 (c_parser_omp_clause_dist_schedule): Likewise.
815 (c_parser_omp_clause_proc_bind): Likewise.
816 (c_parser_omp_clause_uniform): Likewise.
817 (c_parser_omp_for_loop): Likewise.
818 (c_parser_cilk_clause_vectorlength): Likewise.
819 (c_parser_cilk_clause_linear): Likewise.
820 (c_parser_transaction_expression): Likewise.
821 * c-parser.h (c_parser_require): Add param matching_location with
822 default UNKNOWN_LOCATION.
823 (c_parser_error): Convert return type from void to bool.
824 (c_parser_skip_until_found): Add param matching_location with
825 default UNKNOWN_LOCATION.
827 2017-08-09 Marek Polacek <polacek@redhat.com>
829 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
830 * c-tree.h (build_external_ref): Update declaration.
831 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
832 (build_external_ref): Change the type of a parameter to bool.
833 (parser_build_binary_op): Use true/false instead of 1/0.
834 (pointer_diff): Likewise.
835 (build_modify_expr): Likewise.
836 (set_designator): Change the type of a parameter to bool.
837 (set_init_index): Use true/false instead of 1/0.
838 (set_init_label): Likewise.
839 (output_init_element): Change the type of a parameter to bool.
840 (output_pending_init_elements): Use true/false instead of 1/0.
841 (process_init_element): Likewise.
842 (build_binary_op): Change the type of a parameter to bool.
844 2017-08-09 Marek Polacek <polacek@redhat.com>
847 * c-typeck.c (pedwarn_init): Make the function take a variable list.
848 Call emit_diagnostic_valist instead of pedwarn.
849 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
850 Print the relevant types in diagnostics.
852 2017-08-09 Marek Polacek <polacek@redhat.com>
855 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
856 build_conditional_expr.
857 * c-parser.c (c_parser_conditional_expression): Create locations for
858 EXP1 and EXP2 from their source ranges. Pass the locations down to
859 build_conditional_expr.
860 * c-tree.h (build_conditional_expr): Update declaration.
861 * c-typeck.c (build_conditional_expr): Add location_t parameters.
862 For -Wsign-compare, also print the types.
864 2017-08-08 Martin Liska <mliska@suse.cz>
866 * c-convert.c: Include header files.
867 * c-typeck.c: Likewise.
869 2017-08-07 Martin Liska <mliska@suse.cz>
871 * c-parser.c (c_parser_attributes): Canonicalize name of an
874 2017-08-02 Marek Polacek <polacek@redhat.com>
877 * c-parser.c (c_parser_unary_expression): Use set_error.
881 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
882 warnings. Avoid walking MACRO_MAP_LOCATIONS.
884 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
885 Martin Liska <mliska@suse.cz>
887 * c-typeck.c (c_finish_goto_label): Build gimple predict
890 2017-07-31 Martin Liska <mliska@suse.cz>
893 * c-convert.c (convert): Guard condition with flag_sanitize_p
894 also with current_function_decl non-null equality.
895 * c-decl.c (grokdeclarator): Likewise.
896 * c-typeck.c (build_binary_op): Likewise.
898 2017-07-25 Marek Polacek <polacek@redhat.com>
900 * c-decl.c (grokfield): Remove local variable.
902 2017-07-25 Marek Polacek <polacek@redhat.com>
905 * c-parser.c (c_parser_else_body): Don't warn about multistatement
906 macro expansion if the body is in { }.
907 (c_parser_while_statement): Likewise.
908 (c_parser_for_statement): Likewise.
910 2017-07-18 Nathan Sidwell <nathan@acm.org>
912 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
914 2017-07-14 David Malcolm <dmalcolm@redhat.com>
916 * c-decl.c (implicitly_declare): When suggesting a missing
917 #include, provide a fix-it hint.
919 2017-07-06 David Malcolm <dmalcolm@redhat.com>
921 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
922 and call that instead.
923 * c-tree.h (selftest::run_c_tests): New decl.
925 2017-06-26 Marek Polacek <polacek@redhat.com>
928 * c-parser.c (c_parser_if_body): Set the location of the
929 body of the conditional after parsing all the labels. Call
930 warn_for_multistatement_macros.
931 (c_parser_else_body): Likewise.
932 (c_parser_switch_statement): Likewise.
933 (c_parser_while_statement): Likewise.
934 (c_parser_for_statement): Likewise.
935 (c_parser_statement): Add a default argument. Save the location
936 after labels have been parsed.
937 (c_parser_c99_block_statement): Likewise.
939 2017-06-19 Richard Biener <rguenther@suse.de>
941 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
942 negated _Literals to parse _Literal (int) -1.
944 2017-06-13 Martin Liska <mliska@suse.cz>
947 * c-convert.c (convert): Use sanitize_flags_p.
948 * c-decl.c (grokdeclarator): Likewise.
949 * c-typeck.c (convert_for_assignment): Likewise.
950 (c_finish_return): Likewise.
951 (build_binary_op): Likewise.
953 2017-06-08 Jakub Jelinek <jakub@redhat.com>
956 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
957 to sizetype before size_binop.
959 2017-06-07 Jakub Jelinek <jakub@redhat.com>
961 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
964 2017-06-06 Marek Polacek <polacek@redhat.com>
967 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
969 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
971 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
973 * c-parser.c (c_parser_binary_expression): Implement the
974 -Wsizeof_pointer_div warning.
975 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
976 from a parenthesized expression.
977 (c_parser_expr_list): Use c_last_sizeof_loc.
978 * c-tree.h (c_last_sizeof_loc): New external.
979 * c-typeck.c (c_last_sizeof_loc): New variable.
980 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
982 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
985 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
987 2017-05-30 David Malcolm <dmalcolm@redhat.com>
989 * c-objc-common.c (c_tree_printer): Gain bool and const char **
992 2017-05-24 Martin Sebor <msebor@redhat.com>
995 * c-fold.c (c_fully_fold_internal): Adjust.
996 * c-typeck.c (parser_build_unary_op): Adjust.
998 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
1000 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
1001 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
1004 2017-05-23 Marek Polacek <polacek@redhat.com>
1006 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
1009 2017-05-22 Jakub Jelinek <jakub@redhat.com>
1011 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
1012 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
1013 it returned invariant. Call tree_invariant_p unconditionally
1014 afterwards to decide whether to return expr or op0.
1016 2017-05-22 Nathan Sidwell <nathan@acm.org>
1018 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
1020 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
1022 * c-parser.c (c_parser_omp_clause_default): Handle
1023 "OMP_CLAUSE_DEFAULT_PRESENT".
1025 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1027 * config-lang.in (gtfiles): Add c-family/c-format.c.
1029 2017-05-18 Nathan Sidwell <nathan@acm.org>
1031 * c-decl.c (pushdecl_top_level): Delete unused function.
1033 2017-05-18 Marek Polacek <polacek@redhat.com>
1035 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
1036 (check_earlier_gotos): Likewise.
1037 (define_label): Likewise.
1038 (pending_xref_error): Likewise.
1039 (smallest_type_quals_location): Likewise.
1040 (grokdeclarator): Likewise.
1041 (grokparms): Likewise.
1042 (identifier_global_value): Likewise.
1043 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
1044 (find_init_member): Likewise.
1046 2017-05-18 Marek Polacek <polacek@redhat.com>
1048 * c-decl.c (start_decl): Use false/true instead of 0/1.
1049 (grokdeclarator): Likewise.
1050 (finish_struct): Likewise.
1051 (start_function): Change the return type to bool. Use false/true
1053 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
1054 * c-tree.h (start_function): Update.
1055 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
1056 (set_designator): Change the return type to bool. Use false/true
1059 2017-05-17 Marek Polacek <polacek@redhat.com>
1061 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1062 * c-typeck.c: Likewise.
1064 2017-05-17 Marek Polacek <polacek@redhat.com>
1067 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1068 DECL_IGNORED_P even for non-static compound literals.
1070 2017-05-17 Martin Liska <mliska@suse.cz>
1072 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1073 use it instead of int type.
1075 2017-05-17 Marek Polacek <polacek@redhat.com>
1077 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1079 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1080 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1081 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1082 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1084 (c_parser_conditional_expression): Likewise.
1085 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1086 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1087 (process_init_element): Likewise.
1088 (build_binary_op): Likewise.
1089 (handle_omp_array_sections_1): Likewise.
1091 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1093 * c-parser.c (c_parser_omp_clause_num_gangs)
1094 (c_parser_omp_clause_num_workers)
1095 (c_parser_omp_clause_vector_length): Merge functions into...
1096 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1099 2017-05-11 Nathan Sidwell <nathan@acm.org>
1101 * gimple-parser.c: Don't #include tree-dump.h.
1103 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1106 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1108 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1111 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1112 incorrect __MEM syntax.
1114 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1117 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1120 2017-05-09 Nathan Sidwell <nathan@acm.org>
1122 * c-tree.h (pushdecl): Declare.
1124 2017-05-05 David Malcolm <dmalcolm@redhat.com>
1126 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1127 with diagnostic_report_diagnostic.
1128 * c-errors.c (pedwarn_c99): Likewise.
1129 (pedwarn_c90): Likewise.
1131 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1134 * c-gimplify.c (c_gimplify_expr): Remove calls to
1135 cilk_gimplifY_call_params_in_spawned_fn.
1137 2017-04-25 David Malcolm <dmalcolm@redhat.com>
1139 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1140 hint for removing extra semicolon.
1142 2017-04-21 Jakub Jelinek <jakub@redhat.com>
1145 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1146 enabled, set specs->type to integer_type_node.
1148 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
1150 * c-array-notation.c: Fix typo in comment.
1152 2017-03-29 Marek Polacek <polacek@redhat.com>
1155 * c-decl.c (finish_decl): Check VAR_P.
1157 2017-03-27 Jakub Jelinek <jakub@redhat.com>
1160 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1161 * c-typeck.c (c_mark_addressable): Likewise. Look through
1162 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1164 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1166 2017-03-23 Marek Polacek <polacek@redhat.com>
1168 * c-tree.h: Remove a C_RID_YYCODE reference.
1170 2017-03-21 Jakub Jelinek <jakub@redhat.com>
1173 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1174 optional COMPOUND_EXPR with ubsan instrumentation.
1176 2017-03-17 Marek Polacek <polacek@redhat.com>
1178 * c-parser.c: Add C11 references.
1180 2017-03-15 Marek Polacek <polacek@redhat.com>
1182 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1184 2017-03-11 Marek Polacek <polacek@redhat.com>
1186 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1188 2017-03-10 David Malcolm <dmalcolm@redhat.com>
1190 PR translation/79848
1191 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1193 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1195 2017-03-09 Marek Polacek <polacek@redhat.com>
1198 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1199 parameter declarations with initializers.
1201 2017-03-09 Jakub Jelinek <jakub@redhat.com>
1204 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1207 2017-03-07 Jakub Jelinek <jakub@redhat.com>
1210 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1211 for "may only be used in compound statements" diagnostics, change it
1212 such that the same translatable string is used for all pragmas. For
1213 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1215 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1216 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1217 "may only be used in compound statements" diagnostics, such that the
1218 same translatable string is used for all pragmas.
1220 2017-03-04 Marek Polacek <polacek@redhat.com>
1223 * c-decl.c (implicit_decl_warning): Add missing space.
1225 2017-03-03 Marek Polacek <polacek@redhat.com>
1228 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1229 current_function_prototype_arg_types is error_mark_node. Fix
1230 formatting. Use TREE_VALUE instead of TREE_TYPE.
1232 2017-03-03 Jakub Jelinek <jakub@redhat.com>
1235 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1236 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1237 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1241 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1242 instead of %<_Generic>.
1243 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1244 (c_parser_omp_target_exit_data): Use %<release%> instead of
1247 2017-02-28 Jakub Jelinek <jakub@redhat.com>
1249 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1250 instead of just cond ? "..." : "...".
1251 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1252 for "enter"/"exit" keyword.
1253 (c_finish_oacc_routine): Don't use %s to supply portions of the
1256 2017-02-24 Jakub Jelinek <jakub@redhat.com>
1259 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1260 handle -Wrestrict here.
1261 * c-typeck.c (build_function_call_vec): Adjust
1262 check_function_arguments caller.
1264 2017-02-23 Richard Biener <rguenther@suse.de>
1267 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1268 to initialize c_exprs to return.
1269 (c_parser_gimple_binary_expression): Likewise.
1270 (c_parser_gimple_unary_expression): Likewise.
1271 (c_parser_gimple_postfix_expression): Likewise.
1273 2017-02-22 Marek Polacek <polacek@redhat.com>
1276 * c-typeck.c (convert_arguments): Handle error_mark_node.
1278 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1280 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1281 value of c_parser_parse_ssa_name against error_mark_node and emit
1282 error if ssa name is anonymous and written as default definition.
1284 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1286 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1289 2017-02-16 Jakub Jelinek <jakub@redhat.com>
1292 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1293 ignore #pragma omp target even when not followed by identifier.
1295 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1297 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1298 (c_parser_gimple_unary_expression): Likewise.
1300 2017-02-13 Jakub Jelinek <jakub@redhat.com>
1302 * c-parser.c (c_parser_oacc_declare): Add missing space in
1305 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1308 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1309 set_c_expr_source_range when parsing ssa-name.
1311 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1312 Richard Biener <rguenther@suse.de>
1314 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1315 building IL when arguments are error_mark_node.
1316 (c_parser_gimple_unary_expression): Likewise.
1317 (c_parser_gimple_if_stmt): Likewise.
1318 (c_parser_gimple_switch_stmt): Likewise.
1319 (c_parser_gimple_return_stmt): Likewise.
1320 (c_parser_parse_ssa_name): When name lookup fails do not build
1321 an SSA name. Use undeclared rather than not declared in error
1324 2017-02-09 Marek Polacek <polacek@redhat.com>
1327 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1328 instead of c_parser_skip_until_found.
1330 2017-02-09 Jakub Jelinek <jakub@redhat.com>
1333 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1334 symtab_node::get on automatic variables.
1336 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1337 Chung-Lin Tang <cltang@codesourcery.com>
1339 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1340 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1342 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1344 2017-02-07 Richard Biener <rguenther@suse.de>
1346 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1347 (c_parser_gimple_postfix_expression_after_primary):
1348 Do not use c_build_function_call_vec to avoid folding and promotion.
1351 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1354 * c-decl.c (pop_scope): Pass main_input_filename to
1355 build_translation_unit_decl.
1357 2017-01-24 David Malcolm <dmalcolm@redhat.com>
1359 * c-parser.c: Include "read-rtl-function.h" and
1361 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1362 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1363 production. Update for renaming of field "gimple_pass" to
1364 "gimple_or_rtl_pass". If __RTL was seen, call
1365 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1366 to an auto_timevar, to cope with early exit.
1367 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1368 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1369 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1371 (c_parser_parse_rtl_body): New function.
1372 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1373 (struct c_declspecs): Rename field "gimple_pass" to
1374 "gimple_or_rtl_pass". Add field "rtl_p".
1375 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1376 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1377 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1378 (c_parser_gimple_or_rtl_pass_list): ...this.
1380 2017-01-20 Marek Polacek <polacek@redhat.com>
1383 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1385 2017-01-13 Richard Biener <rguenther@suse.de>
1387 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1390 2017-01-13 Richard Biener <rguenther@suse.de>
1392 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1393 _Literal ( type-name ) number.
1395 2017-01-12 Richard Biener <rguenther@suse.de>
1397 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1400 2017-01-11 Jakub Jelinek <jakub@redhat.com>
1403 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1406 2017-01-11 Richard Biener <rguenther@suse.de>
1409 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1410 returns on parse errors.
1412 2017-01-04 Marek Polacek <polacek@redhat.com>
1415 * c-parser.c (c_parser_postfix_expression): Mark zero character
1416 constants by setting original_type in c_expr.
1417 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1418 with a zero character constant.
1419 (char_type_p): New function.
1421 2017-01-04 David Malcolm <dmalcolm@redhat.com>
1423 * c-parser.c (c_parser_declaration_or_fndef): Create a
1424 rich_location at init_loc and parse it to start_init.
1425 (last_init_list_comma): New global.
1426 (c_parser_braced_init): Update last_init_list_comma when parsing
1427 commas. Pass it to pop_init_level. Pass location of closing
1428 brace to pop_init_level.
1429 (c_parser_postfix_expression_after_paren_type): Create a
1430 rich_location at type_loc and parse it to start_init.
1431 (c_parser_omp_declare_reduction): Likewise for loc.
1432 * c-tree.h (start_init): Add rich_location * param.
1433 (pop_init_level): Add location_t param.
1434 * c-typeck.c (struct initializer_stack): Add field
1435 "missing_brace_richloc".
1436 (start_init): Add richloc param, use it to initialize
1437 the stack node's missing_brace_richloc.
1438 (last_init_list_comma): New decl.
1439 (finish_implicit_inits): Pass last_init_list_comma to
1441 (push_init_level): When finding missing open braces, add fix-it
1442 hints to the richloc.
1443 (pop_init_level): Add "insert_before" param and pass it
1444 when calling pop_init_level. Add fixits about missing
1445 close braces to any richloc. Use the richloc for the
1446 -Wmissing-braces warning.
1447 (set_designator): Pass last_init_list_comma to pop_init_level.
1448 (process_init_element): Likewise.
1450 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1452 Update copyright years.
1454 2016-12-21 Jakub Jelinek <jakub@redhat.com>
1457 * c-typeck.c (build_function_call_vec): If check_function_arguments
1458 returns true, set TREE_NO_WARNING on CALL_EXPR.
1461 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1462 to *expr instead of overwriting it.
1464 2016-12-20 Richard Biener <rguenther@suse.de>
1466 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1468 (c_parser_gimple_statement): Only build assigns for non-error
1470 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1472 2016-12-14 Martin Jambor <mjambor@suse.cz>
1474 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1476 (c_finish_oacc_routine): Adjusted call to
1477 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1478 to use their new names.
1479 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1481 (c_parser_oacc_update): Likewise.
1482 (c_parser_omp_simd): Likewise.
1483 (c_parser_omp_target_update): Likewise.
1484 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1485 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1487 (c_finish_omp_cancellation_point): Likewise.
1488 * gimple-parser.c: Do not include omp-low.h
1490 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1491 James Norris <jnorris@codesourcery.com>
1493 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1494 EXIT_DATA,WAIT} are not used in compound statements.
1495 (c_parser_oacc_enter_exit_data): Update diagnostics.
1497 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1500 * c-decl.c (diagnose_mismatched_decls): Use
1501 OPT_Wbuiltin_declaration_mismatch here too.
1503 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
1504 Alan Hayward <alan.hayward@arm.com>
1505 David Sherwood <david.sherwood@arm.com>
1507 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1508 (make_label, finish_struct): Likewise.
1510 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
1511 Richard Biener <rguenther@suse.de>
1513 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1514 * config-lang.in (gtfiles): Add c/c-parser.h.
1515 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1516 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1517 * c-parser.c (enum c_id_kind, struct c_token,
1518 c_parser_next_token_is, c_parser_next_token_is_not,
1519 c_parser_next_token_is_keyword,
1520 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1522 * c-parser.h: ... new header.
1523 * c-parser.c: Include c-parser.h and gimple-parser.h.
1524 (c_parser_peek_token, c_parser_peek_2nd_token,
1525 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1526 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1527 c_parser_error, c_parser_require, c_parser_skip_until_found,
1528 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1529 c_parser_type_name): Export.
1530 (c_parser_tokens_buf): New function.
1531 (c_parser_error): Likewise.
1532 (c_parser_set_error): Likewise.
1533 (c_parser_declspecs): Handle RID_GIMPLE.
1534 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1535 via c_parser_parse_gimple_body.
1536 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1537 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1538 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1539 c_parser_error, c_parser_require, c_parser_skip_until_found,
1540 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1541 c_parser_type_name): Declare.
1542 (struct c_parser): Declare forward.
1543 (c_parser_tokens_buf): Declare.
1544 (c_parser_error): Likewise.
1545 (c_parser_set_error): Likewise.
1546 * gimple-parser.c: New file.
1547 * gimple-parser.h: Likewise.
1549 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1552 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1555 2016-09-11 Le-Chun Wu <lcwu@google.com>
1556 Mark Wielaard <mjw@redhat.com>
1558 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1559 to the given -Wshadow= variant.
1561 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1563 * c-typeck.c: Include memmodel.h.
1565 2016-10-13 Jakub Jelinek <jakub@redhat.com>
1568 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1569 instead of lhd_return_null_tree_v.
1571 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1574 * c-decl.c (smallest_type_quals_location): New static function.
1575 (grokdeclarator): Try to find the correct location for an ignored
1578 2016-09-26 Marek Polacek <polacek@redhat.com>
1581 * c-decl.c (pop_scope): Add gcc_fallthrough.
1583 2016-09-26 Marek Polacek <polacek@redhat.com>
1586 * c-parser.c (struct c_token): Add flags field.
1587 (c_lex_one_token): Pass it to c_lex_with_flags.
1588 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1589 into IFN_FALLTHROUGH.
1590 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1591 attribute fallthrough after a case label or default label.
1592 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1594 2016-09-24 Marek Polacek <polacek@redhat.com>
1597 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1598 have boolean value. Warn about ++/-- on booleans.
1600 2016-09-23 Jakub Jelinek <jakub@redhat.com>
1602 * c-parser.c (incomplete_record_decls): Remove unnecessary
1603 = vNULL initialization of file scope vec.
1605 2016-09-16 Marek Polacek <polacek@redhat.com>
1607 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1609 2016-09-14 Marek Polacek <polacek@redhat.com>
1611 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1612 (fix_array_notation_expr): Likewise.
1613 * c-decl.c (finish_decl): Likewise.
1614 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1615 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1616 (function_to_pointer_conversion): Use false instead of 0.
1617 (convert_lvalue_to_rvalue): Likewise.
1618 (parser_build_unary_op): Likewise.
1619 (build_atomic_assign): Likewise.
1620 (build_unary_op): Change nonconvert parameter type to bool, use
1621 true/false instead of 1/0.
1622 (build_binary_op): Use true instead of 1.
1624 2016-09-13 David Malcolm <dmalcolm@redhat.com>
1626 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1627 of add_fixit_insert to add_fixit_insert_before.
1629 2016-09-13 Marek Polacek <polacek@redhat.com>
1631 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1634 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1637 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1638 COMPOUND_EXPR to warn_for_omitted_condop.
1640 2016-09-07 David Malcolm <dmalcolm@redhat.com>
1642 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1643 c_get_substring_location for this new langhook.
1645 2016-09-02 Jakub Jelinek <jakub@redhat.com>
1648 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1650 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1651 instead of mark_exp_read on low_bound/length expression.
1652 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1653 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1654 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1655 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1656 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1657 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1658 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1659 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1660 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1661 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1662 instead of mark_expr_read.
1663 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1664 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1665 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1666 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1667 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1668 array section bases outside of depend clause, for depend clause
1669 use convert_lvalue_to_rvalue on the base.
1670 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1671 linear, aligned, map, to and from clauses.
1672 (c_omp_clause_copy_ctor): New function.
1674 2016-09-01 Marek Polacek <polacek@redhat.com>
1677 * c-typeck.c (composite_type): Add FALLTHRU comment.
1679 2016-08-31 David Malcolm <dmalcolm@redhat.com>
1681 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1682 to the insertion fixits for "struct", "union", and "enum".
1684 2016-08-30 David Malcolm <dmalcolm@redhat.com>
1686 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1687 rather than add_fixit_misspelled_id.
1688 (undeclared_variable): Likewise.
1689 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1690 now-redundant "here" params from add_fixit_insert method calls.
1691 (c_parser_parameter_declaration): Likewise.
1692 * c-typeck.c (build_component_ref): Remove now-redundant range
1693 param from add_fixit_replace method calls.
1695 2016-08-25 Marek Polacek <polacek@redhat.com>
1697 * c-typeck.c (parser_build_binary_op): Pass LHS to
1698 warn_logical_not_parentheses.
1700 2016-08-25 Marek Polacek <polacek@redhat.com>
1703 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1704 or _FloatN or _FloatNx is not supported.
1705 (finish_declspecs): Set type to integer_type_node when _FloatN or
1706 _FloatNx is not supported.
1708 2016-08-19 Joseph Myers <joseph@codesourcery.com>
1711 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1712 (struct c_declspecs): Add field floatn_nx_idx.
1713 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1714 and _FloatNx type specifiers.
1715 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1716 (c_parser_declspecs, c_parser_attribute_any_word)
1717 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1718 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1719 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1720 narrower than double.
1722 2016-08-12 Jakub Jelinek <jakub@redhat.com>
1723 Martin Liska <mliska@suse.cz>
1726 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1727 % to determine val element to change. Assert that
1728 wchar_bytes * charwidth fits into val array.
1730 2016-08-12 Marek Polacek <polacek@redhat.com>
1733 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1734 (c_parser_postfix_expression): Likewise.
1735 * c-typeck.c (build_unary_op): Adjust fall through comment.
1736 (c_mark_addressable): Likewise.
1738 2016-08-11 Jakub Jelinek <jakub@redhat.com>
1741 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1742 array member through typedef, for orig_qual_indirect == 0 clear
1745 2016-08-08 David Malcolm <dmalcolm@redhat.com>
1748 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1749 this up to selftest::run_c_tests.
1750 (selftest::run_c_tests): New function.
1752 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1754 * c-parser.c (struct oacc_routine_data): Add error_seen and
1755 fndecl_seen members.
1756 (c_finish_oacc_routine): Use these.
1757 (c_parser_declaration_or_fndef): Adjust.
1758 (c_parser_oacc_routine): Likewise. Support more C language
1759 constructs, and improve diagnostics. Move pragma context
1761 (c_parser_pragma): ... here.
1763 * c-parser.c (struct oacc_routine_data): New.
1764 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1766 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1767 declare target" attribute.
1769 2016-08-01 Jan Beulich <jbeulich@suse.com>
1771 * c-fold.c (c_fully_fold_internal): Also emit shift count
1772 warnings for vector types.
1773 * c-typeck.c (build_binary_op): Likewise.
1775 2016-07-29 Marek Polacek <polacek@redhat.com>
1778 * c-decl.c (finish_struct): Rephrase an error message.
1781 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1782 to error node for invalid code.
1785 * c-decl.c (implicitly_declare): Return decl early not only for
1786 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1788 2016-07-29 Jakub Jelinek <jakub@redhat.com>
1791 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1792 on GNU extern inline functions.
1794 2016-07-29 Marek Polacek <polacek@redhat.com>
1797 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1800 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
1802 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1804 2016-07-20 David Malcolm <dmalcolm@redhat.com>
1806 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1808 (best_macro_match): Likewise, converting from a typedef to a
1810 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1811 (lookup_name_fuzzy): Update for change of best_macro_match to a
1812 subclass with a ctor that calls cpp_forall_identifiers.
1814 2016-07-20 David Malcolm <dmalcolm@redhat.com>
1816 * c-decl.c (implicit_decl_warning): Update for conversion of
1817 return type of lookup_name_fuzzy to const char *.
1818 (undeclared_variable): Likewise.
1819 (lookup_name_fuzzy): Convert return type from tree to
1821 * c-parser.c (c_parser_declaration_or_fndef): Update for
1822 conversion of return type of lookup_name_fuzzy to const char *.
1823 (c_parser_parameter_declaration): Likewise.
1825 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1827 * c-parser.c (c_parser_oacc_declare): Don't scan for
1829 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1830 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1831 zero-length subarrays.
1833 2016-07-15 Jakub Jelinek <jakub@redhat.com>
1836 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1837 instead of FUZZY_LOOKUP_NAME.
1838 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1839 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1841 2016-07-14 Jakub Jelinek <jakub@redhat.com>
1844 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1846 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1848 * c-parser.c (c_parser_generic_selection): Make type of variable
1850 (c_parser_omp_declare_simd): Likewise.
1852 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1854 * c-decl.c (struct c_struct_parse_info): Change member types
1855 from vec to auto_vec.
1856 (start_struct): Adjust.
1857 (finish_struct): Likewise.
1859 2016-07-02 Jakub Jelinek <jakub@redhat.com>
1862 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1864 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1866 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1867 Move pragma context checking into...
1868 (c_parser_omp_cancellation_point): ... here, and improve
1869 diagnostic messages.
1870 * c-typeck.c (c_finish_omp_cancel)
1871 (c_finish_omp_cancellation_point): Improve diagnostic messages.
1873 2016-06-29 Jakub Jelinek <jakub@redhat.com>
1876 * c-typeck.c (c_build_qualified_type): Don't clear
1877 C_TYPE_INCOMPLETE_VARS for the main variant.
1879 2016-06-28 Martin Sebor <msebor@redhat.com>
1882 * c-typeck.c (output_init_element): Diagnose incompatible types
1883 before non-constant initializers.
1885 2016-06-28 Jakub Jelinek <jakub@redhat.com>
1887 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1889 2016-06-23 Andi Kleen <ak@linux.intel.com>
1891 * Make-lang.in: Add support for autofdo.
1893 2016-06-22 David Malcolm <dmalcolm@redhat.com>
1896 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1897 (implicit_decl_warning): When issuing warnings for implicit
1898 declarations, attempt to provide a suggestion via
1900 (undeclared_variable): Likewise when issuing errors.
1901 (lookup_name_in_scope): Likewise.
1902 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1903 (best_macro_match): New typedef.
1904 (find_closest_macro_cpp_cb): New function.
1905 (lookup_name_fuzzy): New function.
1906 * c-parser.c: Include gcc-rich-location.h.
1907 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1908 (c_keyword_starts_typename): ...this new function.
1909 (c_parser_declaration_or_fndef): When issuing errors about
1910 missing "struct" etc, add a fixit. For other kinds of errors,
1911 attempt to provide a suggestion via lookup_name_fuzzy.
1912 (c_parser_parms_declarator): When looking ahead to detect typos in
1913 type names, also reject CPP_KEYWORD.
1914 (c_parser_parameter_declaration): When issuing errors about
1915 unknown type names, attempt to provide a suggestion via
1917 * c-tree.h (c_keyword_starts_typename): New prototype.
1919 2016-06-20 Joseph Myers <joseph@codesourcery.com>
1922 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1923 c_common_type returns error_mark_node.
1925 2016-06-19 Martin Sebor <msebor@redhat.com>
1928 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1929 __alignof__ (expression).
1931 2016-06-14 David Malcolm <dmalcolm@redhat.com>
1933 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1935 2016-06-14 David Malcolm <dmalcolm@redhat.com>
1937 * c-typeck.c (build_component_ref): Simplify fixit code by
1938 using gcc_rich_location::add_fixit_misspelled_id.
1939 (set_init_label): Likewise.
1941 2016-06-13 David Malcolm <dmalcolm@redhat.com>
1943 * c-parser.c (c_parser_initelt): Provide location of name for new
1944 location_t param of set_init_label.
1945 * c-tree.h (set_init_label): Add location_t param.
1946 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1947 param and use it when issuing error messages about unrecognized
1948 field names. Attempt to provide a fixit hint if appropriate,
1949 otherwise update the error message to provide the type name.
1951 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1954 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1957 2016-06-08 Martin Sebor <msebor@redhat.com>
1958 Jakub Jelinek <jakub@redhat.com>
1962 * c-typeck.c (convert_arguments): Don't promote last argument
1963 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1965 2016-06-08 Marek Polacek <polacek@redhat.com>
1968 * c-decl.c (grokdeclarator): Check TYPE_P.
1971 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1974 2016-06-07 David Malcolm <dmalcolm@redhat.com>
1976 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1977 and structure element reference, capture the location of the
1978 element name token and pass it to build_component_ref.
1979 (c_parser_postfix_expression_after_primary): Likewise for
1980 structure element dereference.
1981 (c_parser_omp_variable_list): Likewise for
1982 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1983 * c-tree.h (build_component_ref): Add location_t param.
1984 * c-typeck.c (build_component_ref): Add location_t param
1985 COMPONENT_LOC. Use it, if available, when issuing hints about
1986 mispelled member names to provide a fixit replacement hint.
1988 2016-06-06 Marek Polacek <polacek@redhat.com>
1991 * c-parser.c (c_parser_direct_declarator): Set location.
1993 2016-06-06 Marek Polacek <polacek@redhat.com>
1995 * c-typeck.c (comptypes_internal): Handle comparisons of
1996 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1997 TYPE_REF_CAN_ALIAS_ALL.
1999 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
2001 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
2002 arguments as addressable when async clause exists.
2004 2016-05-30 Jakub Jelinek <jakub@redhat.com>
2007 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
2008 when combined with target construct.
2010 2016-05-26 Jakub Jelinek <jakub@redhat.com>
2012 * c-parser.c (c_parser_omp_clause_schedule): Warn if
2013 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
2015 2016-05-25 Marek Polacek <polacek@redhat.com>
2018 * c-decl.c (c_make_fname_decl): Don't check seen_error.
2021 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
2023 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
2025 * c-parser.c (c_parser_oacc_declare): Add support for
2026 GOMP_MAP_FIRSTPRIVATE_POINTER.
2027 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
2028 argument with enum c_omp_region_type ort.
2029 (handle_omp_array_sections): Likewise. Update call to
2030 handle_omp_array_sections_1.
2031 (c_finish_omp_clauses): Add specific errors and warning messages for
2032 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
2033 call to handle_omp_array_sections.
2035 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
2037 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
2039 2016-05-24 Richard Biener <rguenther@suse.de>
2043 * c-typeck.c (build_array_ref): Do not complain about indexing
2044 non-lvalue vectors. Adjust for function name change.
2046 2016-05-20 Martin Sebor <msebor@redhat.com>
2049 * c-typeck.c (error_init): Use
2050 expansion_point_location_if_in_system_header.
2051 (warning_init): Same.
2053 2016-05-19 David Malcolm <dmalcolm@redhat.com>
2056 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
2058 (c_parser_postfix_expression): Likewise.
2059 * c-tree.h (c_expr::set_error): New method.
2060 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2061 that result's range is initialized.
2063 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2065 * c-typeck.c (parser_build_unary_op): Fix formatting.
2067 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2069 * c-decl.c (grokdeclarator): Remove errmsg and use of
2070 targetm.invalid_return_type.
2071 (grokparms): Remove errmsg and use of
2072 targetm.invalid_parameter_type.
2074 2016-05-13 Joseph Myers <joseph@codesourcery.com>
2076 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2077 function return type.
2079 2016-05-12 Marek Polacek <polacek@redhat.com>
2082 * c-decl.c (build_compound_literal): Pass LOC down to
2083 c_incomplete_type_error.
2084 * c-tree.h (require_complete_type): Adjust declaration.
2085 (c_incomplete_type_error): Likewise.
2086 * c-typeck.c (require_complete_type): Add location parameter, pass it
2087 down to c_incomplete_type_error.
2088 (c_incomplete_type_error): Add location parameter, pass it down to
2090 (build_component_ref): Pass location down to c_incomplete_type_error.
2091 (default_conversion): Pass location down to require_complete_type.
2092 (build_array_ref): Likewise.
2093 (build_function_call_vec): Likewise.
2094 (convert_arguments): Likewise.
2095 (build_unary_op): Likewise.
2096 (build_c_cast): Likewise.
2097 (build_modify_expr): Likewise.
2098 (convert_for_assignment): Likewise.
2099 (c_finish_omp_clauses): Likewise.
2101 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2104 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2106 * c-errors.c (pedwarn_c90): Return true if warned.
2107 * c-tree.h (pedwarn_c90): Change return type to bool.
2108 (enum c_declspec_word): Add new enumerator cdw_atomic.
2110 2016-05-11 Marek Polacek <polacek@redhat.com>
2113 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2114 diagnose_mismatched_attributes and call it.
2116 2016-05-10 Marek Polacek <polacek@redhat.com>
2119 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2120 on a declaration following the definition.
2122 2016-05-05 Jakub Jelinek <jakub@redhat.com>
2124 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2125 parse it through to c_parser_c99_block_statement.
2126 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2129 2016-05-04 Marek Polacek <polacek@redhat.com>
2131 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2134 2016-05-04 Marek Polacek <polacek@redhat.com>
2137 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2138 for macro expansions.
2140 2016-05-03 Marek Polacek <polacek@redhat.com>
2143 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2144 check_builtin_function_arguments.
2146 2016-05-03 Richard Biener <rguenther@suse.de>
2148 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2149 the checksum from the previous stage.
2151 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2153 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2154 c_finish_omp_clauses.
2155 (c_parser_omp_all_clauses): Likewise.
2156 (c_parser_oacc_cache): Likewise.
2157 (c_parser_oacc_loop): Likewise.
2158 (omp_split_clauses): Likewise.
2159 (c_parser_omp_declare_target): Likewise.
2160 (c_parser_cilk_all_clauses): Likewise.
2161 (c_parser_cilk_for): Likewise.
2162 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2163 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2165 2016-05-02 Marek Polacek <polacek@redhat.com>
2168 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2171 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2174 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2175 OACC_LOOP_CLAUSE_MASK.
2176 (c_parser_oacc_kernels_parallel): Update call to
2177 c_oacc_split_loop_clauses.
2179 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
2181 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2182 argument to build_modify_expr in two cases.
2184 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2186 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2187 warn_for_memset instead of warning directly here.
2189 2016-04-26 Marek Polacek <polacek@redhat.com>
2192 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2194 (c_parser_for_statement): ... here.
2195 (c_parser_if_statement): Use it.
2196 (c_parser_switch_statement): Use it.
2197 (c_parser_while_statement): Use it.
2200 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2202 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2205 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2206 instead of c_finish_cilk_clauses.
2207 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2208 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2209 floating-point variables in the linear clause for Cilk Plus.
2211 2016-04-18 Michael Matz <matz@suse.de>
2213 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2214 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2216 2016-04-15 Marek Polacek <polacek@redhat.com>
2219 * c-typeck.c (build_unary_op): Pass location down to error and
2222 2016-04-15 Jakub Jelinek <jakub@redhat.com>
2225 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2227 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2228 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2229 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2230 Adjust c_parser_pragma callers.
2231 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2233 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2235 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2236 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2237 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2238 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2239 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2240 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2241 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2242 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2244 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2245 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2248 2016-04-13 Marek Polacek <polacek@redhat.com>
2251 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2253 (c_parser_statement): Likewise.
2254 (c_parser_c99_block_statement): Likewise.
2255 (c_parser_while_statement): Likewise.
2256 (c_parser_for_statement): Likewise.
2257 (c_parser_if_body): Don't set IF_P here.
2258 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2259 about dangling else here.
2260 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2261 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2262 warn about dangling else here.
2264 2016-04-04 Marek Polacek <polacek@redhat.com>
2267 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2269 2016-03-31 Marek Polacek <polacek@redhat.com>
2272 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2274 2016-03-18 David Malcolm <dmalcolm@redhat.com>
2277 * c-parser.c (c_parser_postfix_expression): Set the source range
2278 for uses of "__builtin_types_compatible_p".
2280 2016-03-17 Jakub Jelinek <jakub@redhat.com>
2283 * c-typeck.c (composite_type): Don't count void_list_node
2284 into len, if the list is terminated by void_list_node, start
2285 with void_list_node instead of NULL for newargs. Stop
2288 2016-03-16 Marek Polacek <polacek@redhat.com>
2291 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2292 nested functions returning VM types.
2294 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2296 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2297 when calling c_finish_omp_clauses.
2299 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2302 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2305 2016-03-04 Marek Polacek <polacek@redhat.com>
2308 * c-parser.c (c_parser_postfix_expression): Call
2309 c_parser_cast_expression rather than c_parser_postfix_expression.
2311 2016-03-01 Jakub Jelinek <jakub@redhat.com>
2315 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2316 of incomplete decls to error_mark_node.
2318 2016-02-24 Marek Polacek <polacek@redhat.com>
2321 * c-decl.c (finish_decl): Don't update the copy of the type of a
2322 different decl type.
2324 2016-02-23 Jakub Jelinek <jakub@redhat.com>
2327 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2328 in id_kind reclassification.
2330 2016-02-16 Jakub Jelinek <jakub@redhat.com>
2333 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2335 2016-02-16 James Norris <jnorris@codesourcery.com>
2338 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2340 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2342 * c-decl.c (build_null_declspecs): Zero the entire struct.
2345 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2346 callers changed. If nested_p is true, use it to call
2347 finish_implicit_inits.
2348 * c-tree.h (finish_implicit_inits): Declare.
2349 * c-typeck.c (finish_implicit_inits): New function. Move code
2351 (push_init_level): ... here.
2352 (set_designator, process_init_element): Call finish_implicit_inits.
2354 2016-02-11 Jakub Jelinek <jakub@redhat.com>
2357 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2358 arguments for -Waddress warning.
2360 2016-02-04 Jakub Jelinek <jakub@redhat.com>
2363 * c-decl.c (finish_enum): When honoring mode attribute,
2364 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2366 2016-01-29 Jakub Jelinek <jakub@redhat.com>
2369 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2370 all type variants, not just TYPE_MAIN_VARIANT.
2372 2016-01-27 Jakub Jelinek <jakub@redhat.com>
2375 * c-decl.c (c_write_global_declarations_1): Warn with
2376 warn_unused_function if static prototype without definition
2379 2016-01-27 Marek Polacek <polacek@redhat.com>
2382 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2383 to unsigned, if needed. Add -Wsign-compare warning.
2385 2016-01-26 Jakub Jelinek <jakub@redhat.com>
2387 PR tree-optimization/69483
2388 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2390 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2393 * c-tree.h (incomplete_record_decls): Declare.
2394 * c-parser.c (incomplete_record_decls): Define.
2395 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2396 report error if any decl has zero size.
2397 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2398 or enum type to incomplete_record_decls.
2400 2016-01-14 Tom de Vries <tom@codesourcery.com>
2402 PR tree-optimization/68773
2403 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2406 2016-01-14 Marek Polacek <polacek@redhat.com>
2409 * c-decl.c (grokdeclarator): Provide more information for invalid
2412 2016-01-06 David Malcolm <dmalcolm@redhat.com>
2414 * c-parser.c (c_parser_unary_expression): For dereferences, build
2415 a combined location before calling build_indirect_ref, so that
2416 error reports cover the full range, manually updating the c_expr
2419 2016-01-06 Marek Polacek <polacek@redhat.com>
2422 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2423 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2426 2016-01-04 Jakub Jelinek <jakub@redhat.com>
2428 Update copyright years.
2430 2016-01-04 Marek Polacek <polacek@redhat.com>
2433 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2434 optimization to use __atomic_fetch_* built-in if possible.
2436 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2438 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2440 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2443 2015-12-22 Marek Polacek <polacek@redhat.com>
2446 * c-typeck.c (build_component_ref): Warn when acessing elements of
2447 atomic structures or unions.
2449 2015-12-21 David Malcolm <dmalcolm@redhat.com>
2451 * c-typeck.c: Include "gcc-rich-location.h".
2452 (build_binary_op): In the two places that call binary_op_error,
2453 create a gcc_rich_location and populate it with the location of
2454 the binary op and its two operands.
2456 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2458 * c-parser.c (c_parser_statement_after_labels): When calling
2459 c_finish_return, Use the return expression's location if it has
2460 one, falling back to the location of the first token within it.
2461 * c-typeck.c (c_finish_return): When issuing warnings about
2462 the incorrect presence/absence of a return value, issue a note
2463 showing the declaration of the function.
2465 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2467 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2469 (c_parser_peek_nth_token): New function.
2470 (c_parser_peek_conflict_marker): New function.
2471 (c_parser_error): Detect conflict markers and report them as such.
2473 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2475 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2476 to preserve range information for the primary expression
2477 in the call to c_parser_postfix_expression_after_primary.
2479 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2481 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2482 expression location, falling back on the first token location,
2483 rather than always using the latter.
2485 2015-12-16 Marek Polacek <polacek@redhat.com>
2488 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2491 2015-12-15 Marek Polacek <polacek@redhat.com>
2494 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2497 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2499 * c-parser.c (c_parser_alignof_expression): Capture location of
2500 closing parenthesis (if any), or of end of unary expression, and
2501 use it to build a src_range for the expression.
2503 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2506 * c-parser.c (c_parser_get_builtin_args): Add
2507 "out_close_paren_loc" param, and write back to it.
2508 (c_parser_postfix_expression): Capture the closing
2509 parenthesis location for RID_CHOOSE_EXPR,
2510 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2511 RID_BUILTIN_SHUFFLE and use it to set the source range
2512 for such expressions; within RID_BUILTIN_COMPLEX set
2513 the underlying location.
2515 2015-12-07 Marek Polacek <polacek@redhat.com>
2518 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2519 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2521 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2523 * c-tree.h (c_build_va_arg): Adjust prototype.
2524 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2525 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2526 parameter, adjust throughout and issue an error if EXPR is a component
2527 with reverse storage order.
2529 2015-12-02 Jason Merrill <jason@redhat.com>
2531 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2532 (c_fully_fold_internal, decl_constant_value_for_optimization):
2533 Move from c-common.c.
2534 * c-tree.h: Declare decl_constant_value_for_optimization.
2535 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2537 2015-12-02 Joseph Myers <joseph@codesourcery.com>
2540 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2541 following link from declarator to next declarator. Track original
2542 qualified type and pass it to c_build_qualified_type.
2543 * c-typeck.c (c_build_qualified_type): Add arguments
2544 orig_qual_type and orig_qual_indirect.
2546 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2548 * c-parser.c (c_parser_omp_clause_name)
2549 (c_parser_oacc_all_clauses): Alphabetical sorting.
2551 2015-12-02 Jakub Jelinek <jakub@redhat.com>
2554 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2557 2015-12-01 Julian Brown <julian@codesourcery.com>
2558 Cesar Philippidis <cesar@codesourcery.com>
2559 James Norris <James_Norris@mentor.com>
2561 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2562 (c_parser_oacc_clause_use_device): New function.
2563 (c_parser_oacc_all_clauses): Add use_device support.
2564 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2565 (c_parser_oacc_host_data): New function.
2566 (c_parser_omp_construct): Add host_data support.
2567 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2568 * c-typeck.c (c_finish_oacc_host_data): New function.
2569 (c_finish_omp_clauses): Add use_device support.
2571 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
2574 * c-decl.c: Set TYPE_PACKED in variants.
2576 2015-11-27 Martin Liska <mliska@suse.cz>
2579 * c-array-notation.c (fix_builtin_array_notation_fn):
2580 Use release_vec_vec instead of vec::release.
2581 (build_array_notation_expr): Likewise.
2582 (fix_conditional_array_notations_1): Likewise.
2583 (fix_array_notation_expr): Likewise.
2584 (fix_array_notation_call_expr): Likewise.
2586 2015-11-27 Jakub Jelinek <jakub@redhat.com>
2589 * c-parser.c (c_parser_compound_statement_nostart): If
2590 last_label is true, use pragma_stmt instead of pragma_compound
2591 as second c_parser_pragma argument.
2592 (c_parser_omp_ordered, c_parser_omp_target_update,
2593 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2594 false as second argument to c_parser_skip_to_pragma_eol after
2595 diagnosing standalone directives used in pragma_stmt context.
2597 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2599 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2600 with "if (ENABLE_OFFLOADING)".
2602 2015-11-23 David Malcolm <dmalcolm@redhat.com>
2605 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2606 for various Objective-C constructs: Class.name syntax,
2607 @selector(), @protocol(), @encode(), and [] message syntax.
2609 2015-11-20 David Malcolm <dmalcolm@redhat.com>
2612 * c-typeck.c (should_suggest_deref_p): New function.
2613 (build_component_ref): Special-case POINTER_TYPE when
2614 generating a "not a structure of union" error message, and
2615 suggest a "->" rather than a ".", providing a fix-it hint.
2617 2015-11-19 David Malcolm <dmalcolm@redhat.com>
2619 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2620 candidate into a new function, find_closest_identifier.
2622 2015-11-19 Marek Polacek <polacek@redhat.com>
2625 * c-typeck.c (parser_build_binary_op): Properly handle
2626 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2628 2015-11-17 David Malcolm <dmalcolm@redhat.com>
2630 * c-parser.c (set_c_expr_source_range): Bulletproof both
2631 overloaded implementations against NULL expr->value.
2632 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2634 (c_parser_unary_expression): Likewise when handling addresses of
2636 (c_parser_postfix_expression): Likewise for statement expressions,
2637 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2638 __builtin_va_arg, and for __builtin_offset_of.
2639 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2640 src_range using the range of the braced initializer.
2641 (c_parser_transaction_expression): Set src_range for "ret" to a
2642 sane pair of values.
2644 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2646 * c-parser.c (c_finish_omp_declare_simd): Look for
2647 "simd" attribute as well. Update error message.
2649 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2651 * c-parser.c (c_parser_omp_declare_target): Adjust.
2653 2015-11-14 Jakub Jelinek <jakub@redhat.com>
2655 * c-typeck.c (c_finish_omp_clauses): Don't mark
2656 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2658 2015-11-14 Marek Polacek <polacek@redhat.com>
2660 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2661 * c-typeck.c: Likewise.
2663 2015-11-13 David Malcolm <dmalcolm@redhat.com>
2665 * c-decl.c (warn_defaults_to): Pass line_table to
2667 * c-errors.c (pedwarn_c99): Likewise.
2668 (pedwarn_c90): Likewise.
2669 * c-parser.c (set_c_expr_source_range): New functions.
2670 (c_token::get_range): New method.
2671 (c_token::get_finish): New method.
2672 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2673 based on the range from the start of the LHS to the end of the
2675 (c_parser_conditional_expression): Likewise, based on the range
2676 from the start of the cond.value to the end of exp2.value.
2677 (c_parser_binary_expression): Call set_c_expr_source_range on
2678 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2679 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2680 based on the cast_loc through to the end of the expr.
2681 (c_parser_unary_expression): Likewise, based on the
2682 op_loc through to the end of op.
2683 (c_parser_sizeof_expression) Likewise, based on the start of the
2684 sizeof token through to either the closing paren or the end of
2686 (c_parser_postfix_expression): Likewise, using the token range,
2687 or from the open paren through to the close paren for
2688 parenthesized expressions.
2689 (c_parser_postfix_expression_after_primary): Likewise, for
2690 various kinds of expression.
2691 * c-tree.h (struct c_expr): Add field "src_range".
2692 (c_expr::get_start): New method.
2693 (c_expr::get_finish): New method.
2694 (set_c_expr_source_range): New decls.
2695 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2696 on ret for prefix unary ops.
2697 (parser_build_binary_op): Likewise, running from the start of
2698 arg1.value through to the end of arg2.value.
2700 2015-11-13 Marek Polacek <polacek@redhat.com>
2703 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2705 2015-11-13 David Malcolm <dmalcolm@redhat.com>
2707 * c-typeck.c: Include spellcheck.h.
2708 (lookup_field_fuzzy_find_candidates): New function.
2709 (lookup_field_fuzzy): New function.
2710 (build_component_ref): If the field was not found, try using
2711 lookup_field_fuzzy and potentially offer a suggestion.
2713 2015-11-12 James Norris <jnorris@codesourcery.com>
2714 Joseph Myers <joseph@codesourcery.com>
2716 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2717 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2718 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2719 and PRAGMA_OMP_CLAUSE_LINK.
2720 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2721 and PRAGMA_OACC_CLAUSE_LINK.
2722 (OACC_DECLARE_CLAUSE_MASK): New definition.
2723 (c_parser_oacc_declare): New function.
2725 2015-11-12 Marek Polacek <polacek@redhat.com>
2728 * c-parser.c (c_parser_for_statement): Reclassify the token in
2731 2015-11-11 Marek Polacek <polacek@redhat.com>
2735 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2736 checking the size of an array.
2738 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
2740 * c-array-notation.c: Remove unused header files.
2741 * c-aux-info.c: Likewise.
2742 * c-convert.c: Likewise.
2743 * c-decl.c: Likewise.
2744 * c-errors.c: Likewise.
2745 * c-lang.c: Likewise.
2746 * c-objc-common.c: Likewise.
2747 * c-parser.c: Likewise.
2748 * c-typeck.c: Likewise.
2749 * gccspec.c: Likewise.
2751 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2752 Cesar Philippidis <cesar@codesourcery.com>
2753 James Norris <jnorris@codesourcery.com>
2754 Julian Brown <julian@codesourcery.com>
2755 Nathan Sidwell <nathan@codesourcery.com>
2758 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2760 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2761 (c_parser_pragma): Parse 'acc routine'.
2762 (OACC_ROUTINE_CLAUSE_MARK): Define.
2763 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2765 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2768 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2769 location of the backward-goto to the start of the loop body.
2771 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2774 * c-parser.c (c_parser_while_statement): Finish the loop before
2775 parsing ahead for misleading indentation.
2776 (c_parser_for_statement): Likewise.
2778 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2780 * c-decl.c (finish_struct): If the structure has reverse storage
2781 order, rewrite the type of array fields with scalar component. Call
2782 maybe_apply_pragma_scalar_storage_order on entry.
2783 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2784 errors on bit-fields and reverse SSO here and not...
2785 (c_mark_addressable): ...here.
2786 (output_init_element): Adjust call to initializer_constant_valid_p.
2787 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2789 2015-11-06 David Malcolm <dmalcolm@redhat.com>
2791 * c-decl.c (warn_defaults_to): Update for change in signature
2792 of diagnostic_set_info.
2793 * c-errors.c (pedwarn_c99): Likewise.
2794 (pedwarn_c90): Likewise.
2795 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2796 for textinfo::set_location.
2798 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2799 Thomas Schwinge <thomas@codesourcery.com>
2800 James Norris <jnorris@codesourcery.com>
2802 * c-parser.c (c_parser_omp_clause_name): Add support for
2803 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2804 (c_parser_omp_clause_default): Add is_oacc argument. Handle
2805 default(none) in OpenACC.
2806 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2808 (c_parser_oacc_clause_tile): New function.
2809 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2810 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2811 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2813 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2814 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2816 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2817 (c_parser_oacc_update): Update the error message for missing clauses.
2818 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2819 and OMP_CLAUSE_INDEPENDENT.
2821 2015-11-05 Marek Polacek <polacek@redhat.com>
2824 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2825 deal with pre-evaluation on invalid types.
2827 2015-11-05 Jakub Jelinek <jakub@redhat.com>
2828 Ilya Verbin <ilya.verbin@intel.com>
2830 * c-parser.c: Include context.h and gimple-expr.h.
2831 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2832 monotonic together with nonmonotonic.
2833 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
2834 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2835 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2836 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2837 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
2838 expressions on combined target teams before the target.
2839 (c_parser_omp_declare_target): If decl has "omp declare target" or
2840 "omp declare target link" attribute, and cgraph or varpool node already
2841 exists, then set corresponding flags. Call c_finish_omp_clauses
2842 in the parenthesized extended-list syntax case.
2843 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2845 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2846 on OMP_CLAUSE_REDUCTION array sections.
2847 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2848 into the constant offset, or for variable low-bound using
2849 POINTER_PLUS_EXPR. For structure element based array sections use
2850 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2851 (c_finish_omp_clauses): Drop generic_field_head, structure
2852 elements are now always mapped even as array section bases,
2853 diagnose same var in data sharing and mapping clauses. Diagnose if
2854 linear step on declare simd is neither a constant nor a uniform
2855 parameter. Look through POINTER_PLUS_EXPR for array section
2856 reductions. Diagnose the same var or function appearing multiple
2857 times on the same directive. Fix up wording for the to clause if t
2858 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
2859 modifier on kinds other than dynamic or guided or nonmonotonic
2860 modifier together with ordered clause.
2862 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2863 Chung-Lin Tang <cltang@codesourcery.com>
2865 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2867 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
2869 * c-array-notation.c: Reorder #include's and remove duplicates.
2870 * c-aux-info.c: Likewise.
2871 * c-convert.c: Likewise.
2872 * c-decl.c: Likewise.
2873 * c-errors.c: Likewise.
2874 * c-lang.c: Likewise.
2875 * c-objc-common.c: Likewise.
2876 * c-parser.c: Likewise.
2877 * c-typeck.c: Likewise.
2879 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
2882 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2883 after calling build_qualified_type.
2885 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2886 Thomas Schwinge <thomas@codesourcery.com>
2887 James Norris <jnorris@codesourcery.com>
2888 Joseph Myers <joseph@codesourcery.com>
2889 Julian Brown <julian@codesourcery.com>
2890 Bernd Schmidt <bschmidt@redhat.com>
2892 * c-parser.c (c_parser_oacc_shape_clause): New.
2893 (c_parser_oacc_simple_clause): New.
2894 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2895 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2897 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2898 James Norris <jnorris@codesourcery.com>
2899 Cesar Philippidis <cesar@codesourcery.com>
2903 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2904 parameters, and handle these. Adjust all users.
2905 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2907 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2909 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2911 (c_finish_omp_construct): Declare function.
2912 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2913 Merge functions into...
2914 (c_finish_omp_construct): ... this new function.
2916 2015-10-22 Richard Biener <rguenther@suse.de>
2918 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2919 before folding a MINUS_EXPR.
2921 2015-10-21 Marek Polacek <polacek@redhat.com>
2924 * c-decl.c (start_function): Warn about vararg functions without
2927 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2929 * c-typeck.c (build_conditional_expr): Use boolean vector
2930 type for vector comparison.
2931 (build_vec_cmp): New.
2932 (build_binary_op): Use build_vec_cmp for comparison.
2934 2015-10-20 Marek Polacek <polacek@redhat.com>
2936 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2938 2015-10-20 Marek Polacek <polacek@redhat.com>
2941 * c-parser.c (c_parser_attributes): Break out of the loop if the
2942 token after an attribute isn't a comma.
2944 2015-10-13 Jakub Jelinek <jakub@redhat.com>
2945 Aldy Hernandez <aldyh@redhat.com>
2947 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2948 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2949 (c_parser_omp_variable_list): Handle structure elements for
2950 map, to and from clauses. Handle array sections in reduction
2951 clause. Formatting fixes.
2952 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2953 if clause modifiers.
2954 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2955 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2956 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2957 c_parser_omp_clause_is_device_ptr): New functions.
2958 (c_parser_omp_clause_ordered): Parse optional parameter.
2959 (c_parser_omp_clause_reduction): Handle array reductions.
2960 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2961 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2963 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2964 (c_parser_omp_clause_depend_sink): New function.
2965 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2966 (c_parser_omp_clause_map): Parse release/delete map kinds and
2967 optional always modifier.
2968 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2969 and c_finish_omp_clauses callers.
2970 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
2971 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2972 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2973 (OMP_CRITICAL_CLAUSE_MASK): Define.
2974 (c_parser_omp_critical): Parse critical clauses.
2975 (c_parser_omp_for_loop): Handle doacross loops, adjust
2976 c_finish_omp_for and c_finish_omp_clauses callers.
2977 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2978 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2979 (OMP_FOR_CLAUSE_MASK): Add linear clause.
2980 (c_parser_omp_for): Disallow ordered clause when combined with
2981 distribute. Disallow linear clause when combined with distribute
2982 and not combined with simd.
2983 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2984 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2985 parse clauses and if depend clause is found, don't parse a body.
2986 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2987 Allow target parallel without for after it.
2988 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2989 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2990 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2992 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2993 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2994 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2995 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2997 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2998 defaultmap and is_device_ptr clauses.
2999 (c_parser_omp_target): Parse target parallel and target simd. Set
3000 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
3001 and target exit data. Diagnose invalid map kinds.
3002 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
3003 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
3005 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
3007 (OMP_TASKLOOP_CLAUSE_MASK): Define.
3008 (c_parser_omp_taskloop): New function.
3009 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
3010 handle PRAGMA_OMP_TASKLOOP.
3011 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
3012 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
3013 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
3014 Add IS_OMP argument, handle structure element bases, diagnose
3015 bitfields, pass IS_OMP recursively, diagnose known zero length
3016 array sections in depend clauses, handle array sections in reduction
3017 clause, diagnose negative length even for pointers.
3018 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
3019 types, pass IS_OMP down to handle_omp_array_sections_1, handle
3020 array sections in reduction clause, set
3021 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
3022 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
3023 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
3024 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
3026 2015-10-06 Marek Polacek <polacek@redhat.com>
3028 * c-parser.c (c_parser_statement_after_labels): Use
3029 protected_set_expr_location.
3030 (c_parser_omp_clause_num_gangs): Likewise.
3031 (c_parser_omp_clause_num_threads): Likewise.
3032 (c_parser_omp_clause_num_workers): Likewise.
3033 (c_parser_omp_clause_vector_length): Likewise.
3034 (c_parser_omp_clause_num_teams): Likewise.
3035 (c_parser_omp_clause_thread_limit): Likewise.
3036 * c-typeck.c (build_c_cast): Likewise.
3037 (c_cast_expr): Likewise.
3039 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3041 * c-typeck.c (c_tree_equal): Use real_equal instead of
3044 2015-10-04 Jason Merrill <jason@redhat.com>
3046 * c-parser.c (c_lex_one_token): Handle @synchronized.
3047 * c-decl.c (match_builtin_function_types): A declaration of a built-in
3048 can change whether the function is transaction_safe.
3050 2015-10-02 Marek Polacek <polacek@redhat.com>
3053 * c-typeck.c (convert_for_assignment): Use the expansion point
3054 location throughout.
3056 2015-10-02 Marek Polacek <polacek@redhat.com>
3059 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3060 and pass it down to c_parser_if_statement.
3061 (c_parser_else_body): Add CHAIN parameter and pass it down to
3062 c_parser_statement_after_labels.
3063 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3064 duplicated if-else-if conditions.
3066 2015-10-01 Marek Polacek <polacek@redhat.com>
3068 * c-typeck.c (convert_for_assignment): Improve commentary.
3070 2015-09-30 Marek Polacek <polacek@redhat.com>
3073 * c-typeck.c (c_finish_return): Use the expansion point location for
3074 certain "return with value" warnings.
3076 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3078 * c-parser.c (pragma_lex): Add loc argument.
3080 2015-09-15 Marek Polacek <polacek@redhat.com>
3083 * c-decl.c (tag_exists_p): New function.
3084 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3085 struct/union/enum keywords are missing.
3086 * c-tree.h (tag_exists_p): Declare.
3088 2015-09-15 Marek Polacek <polacek@redhat.com>
3090 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3091 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3092 Return NULL_TREE instead of 0.
3093 (lookup_name): Return NULL_TREE instead of 0.
3094 (lookup_name_in_scope): Likewise.
3095 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3096 (parser_xref_tag): Use false instead of 0.
3097 (start_struct): Use true instead of 1.
3098 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3100 2015-09-14 Marek Polacek <polacek@redhat.com>
3102 * c-typeck.c (set_nonincremental_init_from_string): Use
3103 HOST_WIDE_INT_M1U when shifting a negative value.
3105 2015-09-09 Mark Wielaard <mjw@redhat.com>
3107 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3110 2015-09-10 Jakub Jelinek <jakub@redhat.com>
3113 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3114 into OMP_FOR_PRE_BODY rather than before the loop.
3116 2015-09-09 Jakub Jelinek <jakub@redhat.com>
3119 * c-parser.c (c_parser_oacc_all_clauses,
3120 c_parser_omp_all_clauses): Remove invalid clause from
3121 list of clauses even if parser->error is set.
3124 * c-parser.c (c_parser_omp_clause_aligned,
3125 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3127 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3131 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3132 instead of c_parser_unary_expression. If the result is !lvalue_p,
3133 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3135 2015-09-04 Marek Polacek <polacek@redhat.com>
3138 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3140 2015-09-03 Martin Sebor <msebor@redhat.com>
3143 * c-typeck.c (convert_arguments, parser_build_unary_op,
3144 build_conditional_expr, c_cast_expr, convert_for_assignment,
3145 build_binary_op, _objc_common_truthvalue_conversion): Call
3147 (c_decl_implicit): Define.
3149 2015-09-02 Marek Polacek <polacek@redhat.com>
3152 * c-parser.c (c_parser_enum_specifier): Give a better error for
3155 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3157 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3159 2015-08-12 Marek Polacek <polacek@redhat.com>
3161 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3164 2015-08-03 Marek Polacek <polacek@redhat.com>
3167 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3169 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3171 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3173 * c-parser.c (c_parser_if_body): Take token_indent_info
3174 argument. Call warn_for_misleading_indentation even when the
3175 body is a semicolon. Extract token_indent_infos corresponding
3176 to the guard, body and next tokens. Adjust call to
3177 warn_for_misleading_indentation accordingly.
3178 (c_parser_else_body): Likewise.
3179 (c_parser_if_statement): Likewise.
3180 (c_parser_while_statement): Likewise.
3181 (c_parser_for_statement): Likewise.
3183 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3184 Manuel López-Ibáñez <manu@gcc.gnu.org>
3186 * c-decl.c (get_parm_info): Remove static var. Update warning
3189 2015-07-27 Marek Polacek <polacek@redhat.com>
3193 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3195 2015-07-20 Marek Polacek <polacek@redhat.com>
3198 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3199 (build_binary_op): Warn about left shift overflows.
3201 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
3203 * c-array-notation.c: Adjust includes for flags.h changes.
3204 * c-objc-common.c: Likewise.
3206 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
3208 * c-array-notation.c: Adjust includes.
3209 * c-aux-info.c: Likewise.
3210 * c-convert.c: Likewise.
3211 * c-decl.c: Likewise.
3212 * c-errors.c: Likewise.
3213 * c-lang.c: Likewise.
3214 * c-objc-common.c: Likewise.
3215 * c-parser.c: Likewise.
3216 * c-typeck.c: Likewise.
3218 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3221 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3223 2015-06-29 Marek Polacek <polacek@redhat.com>
3226 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3227 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3228 about -Wswitch-bool here.
3229 (do_case): Update c_add_case_label call.
3230 (c_finish_case): Update c_do_switch_warnings call.
3232 2015-06-27 Marek Polacek <polacek@redhat.com>
3234 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3236 2015-06-26 Marek Polacek <polacek@redhat.com>
3238 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3240 * c-typeck.c (array_to_pointer_conversion): Likewise.
3241 (build_unary_op): Likewise.
3242 (c_finish_return): Likewise.
3244 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
3246 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3247 * c-parser.c: Likewise.
3249 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3251 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3252 instead of pointer_hash.
3253 (detect_field_duplicates): Likewise.
3255 2015-06-25 Marek Polacek <polacek@redhat.com>
3257 * c-array-notation.c: Use VAR_P throughout.
3258 * c-decl.c: Likewise.
3259 * c-objc-common.c: Likewise.
3260 * c-parser.c: Likewise.
3261 * c-typeck.c: Likewise.
3263 2015-06-25 Marek Polacek <polacek@redhat.com>
3265 * c-decl.c: Use is_global_var throughout.
3266 * c-parser.c: Likewise.
3267 * c-typeck.c: Likewise.
3269 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
3271 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3272 * c-aux-info.c: Likewise.
3273 * c-convert.c: Likewise.
3274 * c-decl.c: Likewise.
3275 * c-errors.c: Likewise.
3276 * c-lang.c: Likewise.
3277 * c-objc-common.c: Likewise.
3278 * c-parser.c: Likewise.
3279 * c-typeck.c: Likewise.
3281 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
3284 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3287 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3289 * c-decl.c (pop_scope): Register the main translation unit
3290 through the new debug hook.
3292 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
3294 * c-array-notation.c : Adjust include files.
3295 * c-aux-info.c : Likewise.
3296 * c-convert.c : Likewise.
3297 * c-decl.c : Likewise.
3298 * c-errors.c : Likewise.
3299 * c-lang.c : Likewise.
3300 * c-lang.h : Likewise.
3301 * c-objc-common.c : Likewise.
3302 * c-parser.c : Likewise.
3303 * c-typeck.c : Likewise.
3305 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
3307 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3308 immediately clobber it.
3309 (c_write_global_declarations_1): Remove call to
3310 check_global_declaration_1.
3311 (c_write_global_declarations_2): Remove.
3312 (c_write_final_cleanups): Rename from c_write_global_declarations.
3313 Remove call to finalize_compilation_unit.
3314 Remove calls to debugging hooks.
3315 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3316 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3317 * c-tree.h: Remove c_write_global_declarations.
3319 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
3321 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3322 * c-aux-info.c: Likewise.
3323 * c-convert.c: Likewise.
3324 * c-decl.c: Likewise.
3325 * c-errors.c: Likewise.
3326 * c-lang.c: Likewise.
3327 * c-objc-common.c: Likewise.
3328 * c-parser.c: Likewise.
3329 * c-typeck.c: Likewise.
3331 2015-06-04 Marek Polacek <polacek@redhat.com>
3334 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3337 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3339 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3340 Warn for empty struct.
3341 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3343 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3345 * c-decl.c (start_function): Call plugin before parsing.
3346 (finish_function): Call plugin after parsing.
3348 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3351 * c-decl.c (merge_decls): Merge DECL_COMMON.
3353 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
3355 * Make-lang.in (check_gcc_pallelize): Define.
3357 2015-05-22 Marek Polacek <polacek@redhat.com>
3360 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3363 2015-05-21 Marek Polacek <polacek@redhat.com>
3365 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3368 2015-05-20 Marek Polacek <polacek@redhat.com>
3370 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3371 * c-typeck.c: Likewise.
3373 2015-05-19 Marek Polacek <polacek@redhat.com>
3375 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3377 2015-05-19 Jakub Jelinek <jakub@redhat.com>
3380 * c-parser.c (c_parser_omp_for_loop): Don't add
3381 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3382 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3383 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3386 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3388 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
3391 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3394 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3397 2015-05-14 Marek Polacek <polacek@redhat.com>
3401 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3404 2015-05-12 David Malcolm <dmalcolm@redhat.com>
3406 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3407 to add a call to warn_for_misleading_indentation.
3408 (c_parser_else_body): Likewise, adding param "else_loc".
3409 (c_parser_if_statement): Check for misleading indentation.
3410 (c_parser_while_statement): Likewise.
3411 (c_parser_for_statement): Likewise.
3413 2015-05-08 Marek Polacek <polacek@redhat.com>
3416 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3417 (output_init_element): Likewise.
3419 2015-05-07 Marek Polacek <polacek@redhat.com>
3422 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3425 2015-04-30 Marek Polacek <polacek@redhat.com>
3427 * c-typeck.c (set_init_label): Call error_at instead of error and
3430 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3433 * c-typeck.c (c_build_va_arg): Clarify the error message.
3435 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3437 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3438 OMP_STANDALONE_CLAUSES.
3440 2015-04-28 Marek Polacek <polacek@redhat.com>
3442 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3444 2015-04-28 Marek Polacek <polacek@redhat.com>
3447 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3449 2015-04-25 Marek Polacek <polacek@redhat.com>
3452 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3455 2015-04-23 Marek Polacek <polacek@redhat.com>
3458 * c-decl.c (set_labels_context_r): New function.
3459 (store_parm_decls): Call it via walk_tree_without_duplicates.
3460 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3461 instead of create_tmp_var. Build TARGET_EXPR instead of
3463 (build_atomic_assign): Use create_tmp_var_raw instead of
3464 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3466 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3468 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3469 (c_parser_omp_target_update): Add missed %> to error_at ().
3471 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3474 * c-decl.c (c_default_pointer_mode): Remove definition.
3475 * c-tree.h (c_default_pointer_mode): Remove declaration.
3477 2015-03-27 Tobias Burnus <burnus@net-b.de>
3480 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3482 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3483 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3484 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3486 2015-03-19 Jakub Jelinek <jakub@redhat.com>
3488 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3489 attribute for DECL_EXTERNAL VAR_DECLs.
3491 2015-03-11 Jakub Jelinek <jakub@redhat.com>
3493 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3496 2015-03-10 Jakub Jelinek <jakub@redhat.com>
3499 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3500 before preparing arguments to warn_logical_not_parentheses.
3502 2015-03-09 Jakub Jelinek <jakub@redhat.com>
3505 * c-typeck.c (parser_build_binary_op): Don't warn for
3506 !!x == y or !b == y where b is _Bool.
3508 2015-03-09 Marek Polacek <polacek@redhat.com>
3510 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3511 * c-decl.c (grokdeclarator): Likewise.
3512 * c-typeck.c (build_binary_op): Likewise.
3514 2015-02-27 Marek Polacek <polacek@redhat.com>
3517 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3519 2015-02-14 Marek Polacek <polacek@redhat.com>
3522 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3523 declared through a typedef name.
3525 2015-02-13 Marek Polacek <polacek@redhat.com>
3528 * c-decl.c (grokdeclarator): Print also the type when giving
3529 the error message about array's incomplete element type.
3531 2015-02-11 Jakub Jelinek <jakub@redhat.com>
3534 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3535 check in the POP macro.
3537 2015-02-09 Marek Polacek <polacek@redhat.com>
3540 * c-typeck.c (process_init_element): Don't always wrap
3541 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3542 initializing a range of elements.
3544 2015-02-04 Jakub Jelinek <jakub@redhat.com>
3548 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3550 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
3552 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3553 processing enum declaration.
3555 2015-01-29 Marek Polacek <polacek@redhat.com>
3558 * c-typeck.c (pop_init_level): If constructor_elements has
3559 exactly one element with integer_zerop value, set constructor_zeroinit
3560 to 1. Remove braces around warning_init call.
3562 2015-01-27 Jakub Jelinek <jakub@redhat.com>
3565 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3566 of FUNCTION_DECLs with error_mark_node.
3568 2015-01-26 Jakub Jelinek <jakub@redhat.com>
3571 * c-typeck.c (convert_arguments): Return -1 if there are
3572 error_args, even if we've diagnosed too many arguments.
3574 2015-01-21 Richard Biener <rguenther@suse.de>
3577 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3578 for builtins the user declared correctly.
3580 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3581 Bernd Schmidt <bernds@codesourcery.com>
3582 Cesar Philippidis <cesar@codesourcery.com>
3583 James Norris <jnorris@codesourcery.com>
3584 Jakub Jelinek <jakub@redhat.com>
3585 Ilmir Usmanov <i.usmanov@samsung.com>
3587 * c-parser.c: Include "gomp-constants.h".
3588 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3589 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3590 Use OMP_CLAUSE_SET_MAP_KIND.
3591 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3592 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3593 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3594 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3595 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3596 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3597 "copyout", "create", "delete", "deviceptr", "gang", "host",
3598 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3599 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3600 "present_or_create", "pcreate", "seq", "self", "vector",
3601 "vector_length", "wait", "worker".
3602 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3603 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3604 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3605 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3606 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3607 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3608 (c_parser_oacc_data_clause_deviceptr)
3609 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3610 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3611 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3612 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3613 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3614 (c_parser_oacc_parallel, c_parser_oacc_update)
3615 (c_parser_oacc_wait): New functions.
3616 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3617 (c_finish_oacc_data): New prototypes.
3618 * c-typeck.c: Include "gomp-constants.h".
3619 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3620 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3621 OMP_CLAUSE_SET_MAP_KIND.
3622 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3623 (c_finish_oacc_data): New functions.
3624 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3625 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3626 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3627 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3628 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3629 GOMP_MAP_FORCE_DEVICEPTR.
3631 2015-01-09 Michael Collison <michael.collison@linaro.org>
3633 * c-array-notation.c: Include hash-set.h, machmode.h,
3634 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3635 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3636 * c-aux-info.c: Ditto.
3637 * c-convert.c: Ditto.
3639 * c-errors.c: Ditto.
3640 * c-lang.c: Dittoxs.
3641 * c-objc-common.c: Ditto.
3642 * c-parser.c: Ditto.
3643 * c-typeck.c: Include hash-set.h, machmode.h,
3644 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3645 fold-const.h, wide-int.h, inchash.h, real.h and
3646 fixed-value.h due to flattening of tree.h.
3648 2015-01-07 Marek Polacek <polacek@redhat.com>
3651 * c-typeck.c (process_init_element): Disallow initialization of
3652 a flexible array member with a string constant if the structure
3655 2015-01-05 Jakub Jelinek <jakub@redhat.com>
3658 * c-typeck.c (convert_for_assignment, c_finish_return): For
3659 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3660 types also set in_late_binary_op around convert call.
3661 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3662 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3663 result on expr as last argument to ubsan_instrument_float_cast,
3664 if in_late_binary_op, don't use c_save_expr but save_expr.
3666 Update copyright years.
3668 2015-01-05 Marek Polacek <polacek@redhat.com>
3671 * c-typeck.c (build_array_ref): Pass loc down to
3672 warn_array_subscript_with_type_char.
3674 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
3676 * c-typeck.c: New behavious for pointers to arrays with qualifiers
3677 (common-pointer-type): For pointers to arrays take qualifiers from
3679 (build_conditional_expr): Add warnings for lost qualifiers.
3680 (comp-target-types): Allow pointers to arrays with different qualifiers.
3681 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
3682 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
3683 to PEDWARN_FOR_QUALIFIERS.
3685 2014-12-17 Jakub Jelinek <jakub@redhat.com>
3688 * c-convert.c: Include ubsan.h.
3689 (convert): For real -> integral casts and
3690 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3691 instead instrument the float cast directly.
3693 2014-11-29 Jakub Jelinek <jakub@redhat.com>
3695 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3696 c_finish_stmt_expr): Remove NULL last argument from
3697 create_tmp_var_raw and create_tmp_var calls.
3698 * c-array-notation.c (fix_builtin_array_notation_fn,
3699 build_array_notation_expr, fix_conditional_array_notations_1,
3700 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3702 2014-11-28 Marek Polacek <polacek@redhat.com>
3705 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3706 convert the right operand to integer type.
3708 2014-11-25 Marek Polacek <polacek@redhat.com>
3711 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3712 for inline functions.
3714 2014-11-21 Jakub Jelinek <jakub@redhat.com>
3717 * c-typeck.c (build_array_ref): Adjust
3718 convert_vector_to_pointer_for_subscript caller. If it returns true,
3719 call non_lvalue_loc on the result.
3721 2014-11-11 Richard Biener <rguenther@suse.de>
3723 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3726 2014-11-10 Andi Kleen <ak@linux.intel.com>
3729 * c-parser.c (c_parser_statement_after_labels): Call
3731 (c_parser_if_statement): Dito.
3732 (c_parser_switch_statement): Dito.
3733 (c_parser_while_statement): Dito.
3734 (c_parser_do_statement): Dito.
3735 (c_parser_for_statement): Dito.
3736 * c-typeck.c (c_finish_loop): Dito.
3738 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3740 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3741 OPT_Wshift_count_overflow in the warnings.
3743 2014-10-30 Marek Polacek <polacek@redhat.com>
3745 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3746 print the stripped version as well, if they're not the same.
3748 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3750 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3753 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
3755 * c-decl.c: Adjust include files.
3756 * c-parser.c: Ditto.
3758 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3759 Tom Tromey <tromey@redhat.com>
3761 * c-tree.h (enum c_oracle_request): New.
3762 (c_binding_oracle_function): New typedef.
3763 (c_binding_oracle, c_pushtag, c_bind): Declare.
3764 * c-decl.c (c_binding_oracle): New global.
3765 (I_SYMBOL_CHECKED): New macro.
3766 (i_symbol_binding): New function.
3767 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3768 (I_TAG_CHECKED): New macro.
3769 (i_tag_binding): New function.
3770 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3771 (I_LABEL_CHECKED): New macro.
3772 (i_label_binding): New function.
3773 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3774 (c_print_identifier): Save and restore c_binding_oracle.
3775 (c_pushtag, c_bind): New functions.
3777 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
3779 * c-typeck.c: Adjust include files.
3781 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3784 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3785 initialization here...
3786 (c_initialize_diagnostics): ... but here. Set defaults after
3787 building pretty-printer.
3789 2014-10-23 Marek Polacek <polacek@redhat.com>
3792 * c-decl.c (pop_scope): Don't print warning in external_scope.
3794 2014-10-19 Marek Polacek <polacek@redhat.com>
3797 * c-typeck.c (output_init_element): Allow initializing objects with
3798 static storage duration with compound literals even in C99 and add
3801 2014-10-17 Marek Polacek <polacek@redhat.com>
3804 * c-typeck.c (digest_init): Allow initializing objects with static
3805 storage duration with compound literals even in C99 and add pedwarn
3808 2014-10-17 Marek Polacek <polacek@redhat.com>
3811 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3812 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3813 error multiple times. Print the type.
3815 2014-10-17 Marek Polacek <polacek@redhat.com>
3818 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3821 2014-10-17 Marek Polacek <polacek@redhat.com>
3823 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3824 (start_function): Use OPT_Wimplicit_int instead of 0.
3825 (store_parm_decls_oldstyle): Likewise.
3827 2014-10-17 Alan Modra <amodra@gmail.com>
3830 * c-decl.c (merge_decls): Don't merge section name or tls model
3831 to newdecl symtab node, instead merge to olddecl. Override
3832 existing olddecl section name. Set tls_model for all thread-local
3833 vars, not just OMP thread-private ones. Remove incorrect comment.
3835 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
3837 * c-decl.c: Adjust include files.
3839 2014-10-14 DJ Delorie <dj@redhat.com>
3841 * c-parser.c (c_parse_init): Add RID entries for each __intN.
3842 (c_token_starts_typename): Check all __intN, not just __int128.
3843 (c_token_starts_declspecs): Likewise.
3844 (c_parser_declspecs): Likewise.
3845 (c_parser_attribute_any_word): Likewise.
3846 (c_parser_objc_selector): Likewise.
3847 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3848 (struct c_declspecs): Add int_n_idx field to record *which* __intN
3850 * c-decl.c (declspecs_add_type): Check for all __intN, not just
3852 (finish_declspecs): Likewise.
3854 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
3856 * c-parser.c (c_parser_all_labels): New function to replace
3858 (c_parser_statement): Call the new function.
3860 2014-10-09 Marek Polacek <polacek@redhat.com>
3863 * c-typeck.c (pop_init_level): Don't warn about initializing
3866 2014-10-07 Marek Polacek <polacek@redhat.com>
3869 * c-decl.c (header_for_builtin_fn): New function.
3870 (implicitly_declare): Suggest which header to include.
3872 2014-10-07 Marek Polacek <polacek@redhat.com>
3874 * c-convert.c (convert): Use error_operand_p.
3875 * c-typeck.c (require_complete_type): Likewise.
3876 (really_atomic_lvalue): Likewise.
3877 (digest_init): Likewise.
3878 (handle_omp_array_sections_1): Likewise.
3880 2014-10-03 Marek Polacek <polacek@redhat.com>
3883 * c-decl.c (pop_scope): Don't warn about "inline function declared
3884 but never defined" for functions marked with gnu_inline attribute.
3886 2014-09-25 Jakub Jelinek <jakub@redhat.com>
3889 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3890 on low_bound and length.
3892 2014-09-24 Marek Polacek <polacek@redhat.com>
3896 * c-parser.c: Don't define CPP_KEYWORD.
3897 (c_parser_switch_statement): Pass original type to c_finish_case.
3898 * c-tree.h (c_finish_case): Update declaration.
3899 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3900 conditionally to c_do_switch_warnings.
3902 2014-09-03 Marek Polacek <polacek@redhat.com>
3905 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3908 2014-09-02 Jakub Jelinek <jakub@redhat.com>
3909 Balaji V. Iyer <balaji.v.iyer@intel.com>
3910 Igor Zamyatin <igor.zamyatin@intel.com>
3912 * c-parser.c (c_parser_cilk_for): New function.
3913 (c_parser_cilk_grainsize): Likewise.
3914 (c_get_temp_regvar): Likewise.
3915 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3916 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3917 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3918 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3921 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3923 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3924 with using HOST_WIDE_INT without truncation to 'int'
3926 2014-08-22 Marek Polacek <polacek@redhat.com>
3929 * c-typeck.c (parser_build_binary_op): Adjust call to
3930 warn_logical_not_parentheses.
3932 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3935 * c-parser.c (c_parser_array_notation): Check for correct
3936 type of an array added.
3938 2014-08-19 Marek Polacek <polacek@redhat.com>
3941 * c-typeck.c (build_binary_op): If either operand of a comparison
3942 is a boolean expression, call maybe_warn_bool_compare.
3944 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3947 * c-typeck.c (build_c_cast): Do a conversion even when the
3948 TYPE_MAIN_VARIANTs are the same.
3950 2014-08-19 Marek Polacek <polacek@redhat.com>
3952 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3953 pedwarn_c99 instead of pedwarn.
3954 (grokfield): Likewise.
3955 (warn_defaults_to): New function.
3956 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3957 Unconditionally call pedwarn_c99 instead of pedwarn.
3958 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3959 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3960 check flag_isoc11 before.
3961 * c-errors.c (pedwarn_c99): Change the return type to bool.
3962 Handle -Wc99-c11-compat.
3963 * c-parser.c (disable_extension_diagnostics): Handle
3964 warn_c99_c11_compat.
3965 (restore_extension_diagnostics): Likewise.
3966 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3967 instead of pedwarn, don't check flag_isoc11 before.
3968 (c_parser_declspecs): Likewise.
3969 (c_parser_alignas_specifier): Likewise.
3970 (c_parser_alignof_expression): Likewise.
3971 (c_parser_generic_selection): Likewise.
3972 * c-tree.h (pedwarn_c99): Update declaration.
3973 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3976 2014-08-19 Marek Polacek <polacek@redhat.com>
3978 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3980 * c-errors.c: Include "opts.h".
3981 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3982 * c-parser.c (disable_extension_diagnostics): Handle negative value
3983 of warn_c90_c99_compat, too.
3984 (restore_extension_diagnostics): Likewise.
3985 (c_parser_compound_statement_nostart): Pass
3986 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3988 2014-08-12 Marek Polacek <polacek@redhat.com>
3990 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3992 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3994 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3996 2014-08-10 Marek Polacek <polacek@redhat.com>
3999 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
4000 Call pedwarn_c90 instead of pedwarn.
4001 (check_bitfield_type_and_width): Likewise.
4002 (declspecs_add_qual): Likewise.
4003 (declspecs_add_type): Likewise.
4004 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
4005 Adjust to only call pedwarn_c90.
4006 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
4007 pedwarn_c90 instead of pedwarn.
4008 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
4009 * c-parser.c (disable_extension_diagnostics): Handle
4010 warn_c90_c99_compat.
4011 (restore_extension_diagnostics): Likewise.
4012 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
4013 pedwarn_c90 instead of pedwarn.
4014 (c_parser_initelt): Likewise.
4015 (c_parser_postfix_expression): Likewise.
4016 (c_parser_postfix_expression_after_paren_type): Likewise.
4017 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
4018 * c-tree.h: Fix formatting.
4019 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
4020 pedwarn_c90 instead of pedwarn.
4022 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4024 * c-typeck.c: Remove include of pointer-set.h.
4026 2014-08-07 Marek Polacek <polacek@redhat.com>
4028 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
4030 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4032 * c-typeck.c: Use hash_map instead of pointer_map.
4034 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4036 * c-decl.c: Use hash_set instead of pointer_set.
4038 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4041 * c-array-notation.c (expand_array_notations): Handling
4044 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
4047 * c-typeck.c (c_finish_return): Return 0 instead of the address of
4050 2014-07-30 Tom Tromey <tromey@redhat.com>
4052 * c-typeck.c (struct constructor_stack) <designator_depth>: New
4054 (really_start_incremental_init, push_init_level): Initialize
4056 (pop_init_level): Set global designator_depth.
4057 (process_init_element): Check for designated_init attribute.
4059 2014-07-20 Marek Polacek <polacek@redhat.com>
4062 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4063 (implicitly_declare): Pass location to implicit_decl_warning.
4065 2014-07-14 Jakub Jelinek <jakub@redhat.com>
4068 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4069 If non-NULL, call c_parser_check_literal_zero.
4070 (c_parser_check_literal_zero): New function.
4071 (c_parser_postfix_expression_after_primary): Adjust
4072 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4074 2014-07-06 Marek Polacek <polacek@redhat.com>
4077 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4078 * c-tree.h (C_ARRAY_PARAMETER): Define.
4079 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4082 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
4083 Chen Gang <gang.chen.5i5j@gmail.com>
4085 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4088 2014-07-01 Marek Polacek <polacek@redhat.com>
4090 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4091 instead of 0 to WARN_FOR_ASSIGNMENT.
4093 2014-07-01 Marek Polacek <polacek@redhat.com>
4096 * c-typeck.c (convert_for_assignment): Pass
4097 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4099 2014-06-30 Marek Polacek <polacek@redhat.com>
4101 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4102 has no_sanitize_undefined attribute.
4104 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4107 * c-array-notation.c (fix_builtin_array_notation_fn):
4108 Check for 0 arguments in builtin call. Check that bultin argument is
4110 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4113 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4115 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4116 qualifiers in __auto_type for atomic types.
4117 (c_parser_typeof_specifier): Discard all type qualifiers in
4118 __typeof__ for atomic types.
4120 2014-06-25 Marek Polacek <polacek@redhat.com>
4123 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4124 the return expression to c_finish_return.
4126 2014-06-25 Jakub Jelinek <jakub@redhat.com>
4128 * c-typeck.c (c_finish_omp_clauses): Make sure
4129 OMP_CLAUSE_LINEAR_STEP has correct type.
4131 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4135 2014-06-24 Jakub Jelinek <jakub@redhat.com>
4137 * c-parser.c (c_parser_omp_for_loop): For
4138 #pragma omp parallel for simd move lastprivate clause from parallel
4139 to for rather than simd.
4141 2014-06-23 Marek Polacek <polacek@redhat.com>
4143 * c-typeck.c (parser_build_binary_op): Don't call
4144 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4146 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
4148 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4149 * c-decl.c (merge_decls): Likewise.
4151 2014-06-09 Marek Polacek <polacek@redhat.com>
4154 * c-typeck.c (error_init): Call inform instead of error_at.
4155 (pedwarn_init): Call inform instead of pedwarn.
4156 (warning_init): Call inform instead of warning_at.
4158 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
4160 * c-decl.c (merge_decls): Use set_decl_section_name.
4161 (duplicate_decls): Remove node if it exists.
4163 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4166 * c-typeck.c (push_init_level, process_init_element,
4167 pop_init_level): Correct check for zero initialization, move
4168 missing brace warning to respect zero initialization.
4170 2014-06-05 Marek Polacek <polacek@redhat.com>
4173 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4175 2014-06-05 Marek Polacek <polacek@redhat.com>
4178 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4179 on the left hand side operand of a comparison.
4181 2014-06-05 Marek Polacek <polacek@redhat.com>
4184 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4185 Print note only if the warning was printed.
4187 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4190 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4193 2014-06-03 Marek Polacek <polacek@redhat.com>
4196 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4198 * c-tree.h (c_start_case): Update.
4199 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4200 switch condition has boolean value.
4202 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
4204 * c-decl.c: Include builtins.h.
4205 * c-parser.c: Likewise.
4207 2014-05-27 Marek Polacek <polacek@redhat.com>
4210 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4211 error and warning calls to error_at and warning_at. Pass location of
4212 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4213 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4214 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4216 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4219 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4220 function parameters.
4222 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
4224 * c-decl.c (merge_decls): Preserve symtab node pointers.
4225 (duplicate_decls): Free new decl.
4227 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4229 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4232 * c-parser.c (c_parser_omp_target): Return bool values.
4234 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4236 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4237 num_teams_loc variable to num_thread_limit_loc.
4239 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4241 * c-array-notation.c (expand_array_notations): Use void_node
4242 instead of void_zero_node.
4244 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4246 * c-decl.c (finish_struct): Adjust.
4247 (finish_enum): Likewise.
4249 (record_inline_static): Likewise.
4250 (push_scope): Likewise.
4251 (make_label): Likewise.
4252 (lookup_label_for_goto): Likewise.
4253 (finish_struct): Likewise.
4254 (finish_enum): Likewise.
4255 (store_parm_decls): Likewise.
4256 (c_push_function_context): Likewise.
4257 * c-lang.h: Remove usage of variable_size gty attribute.
4258 * c-parser.c (c_parse_init): Adjust.
4259 (c_parse_file): Likewise.
4261 2014-05-13 Marek Polacek <polacek@redhat.com>
4264 * c-typeck.c (convert_for_assignment): Pass location to
4265 WARN_FOR_ASSIGNMENT instead of input_location.
4267 2014-05-10 Marek Polacek <polacek@redhat.com>
4269 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4270 maybe_warn_string_init.
4271 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4272 maybe_warn_string_init.
4273 * c-tree.h (maybe_warn_string_init): Update declaration.
4274 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4275 Call pedwarn_init with loc instead of with input_location.
4276 (digest_init): Pass init_loc to maybe_warn_string_init.
4277 (pop_init_level): Call pedwarn_init with loc instead of with
4279 (set_init_index): Likewise.
4280 (process_init_element): Likewise.
4282 2014-05-09 Marek Polacek <polacek@redhat.com>
4285 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4286 (c_parser_initelt): Pass location to set_init_label. Pass array index
4287 location to set_init_index.
4288 * c-tree.h (push_init_level): Update declaration.
4289 (pop_init_level): Likewise.
4290 (set_init_index): Likewise.
4291 (set_init_label): Likewise.
4292 * c-typeck.c (error_init): Add location parameter. Call error_at
4294 (digest_init): Pass init_loc to error_init.
4295 (really_start_incremental_init):
4296 (push_init_level): Add location parameter. Pass loc to pop_init_level
4298 (pop_init_level): Likewise.
4299 (set_designator): Add location parameter. Pass loc to pop_init_level,
4300 push_init_level, and error_init.
4301 (set_init_index): Add location parameter. Pass loc to error_init and
4303 (set_init_label): Likewise.
4304 (output_init_element): Pass loc to error_init.
4305 (process_init_element): Pass loc to error_init, pop_init_level,
4306 pedwarn_init, and push_init_level.
4308 2014-05-09 Marek Polacek <polacek@redhat.com>
4311 * c-parser.c (c_parser_attributes): Parse the arguments as an
4312 expression-list if the attribute takes identifier.
4314 2014-05-08 Marek Polacek <polacek@redhat.com>
4317 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4320 2014-05-08 Marek Polacek <polacek@redhat.com>
4323 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4326 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4327 Mike Stump <mikestump@comcast.net>
4328 Richard Sandiford <rdsandiford@googlemail.com>
4330 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4331 (finish_enum): Use wide-int interfaces.
4332 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4333 * c-typeck.c (build_c_cast): Likewise.
4334 (set_nonincremental_init_from_string): Likewise.
4335 (c_tree_equal): Likewise.
4337 2014-05-02 Marek Polacek <polacek@redhat.com>
4340 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4341 Return size_one_node when the type is not complete.
4342 (pointer_diff): Remove comment.
4343 (build_unary_op): Improve error messages.
4345 2014-05-02 Marek Polacek <polacek@redhat.com>
4347 * c-typeck.c (c_finish_return): Separate warning_at calls.
4349 2014-05-02 Marek Polacek <polacek@redhat.com>
4351 * c-tree.h (error_init): Remove declaration.
4352 (pedwarn_init): Likewise.
4353 * c-typeck.c (error_init): Make static and move above.
4354 (pedwarn_init): Likewise.
4355 (warning_init): Move above.
4356 (maybe_warn_string_init): Likewise.
4358 2014-05-01 Jeff Law <law@redhat.com>
4362 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4363 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4366 2014-05-02 Marek Polacek <polacek@redhat.com>
4369 * c-typeck.c (push_init_level): Set constructor_designated to
4370 p->designated for structures.
4372 2014-05-01 Marek Polacek <polacek@redhat.com>
4375 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4376 function-definition has an attribute after the declarator.
4378 2014-05-01 Marek Polacek <polacek@redhat.com>
4381 * c-typeck.c (warning_init): Add location_t parameter. Call
4382 warning_at instead of warning.
4383 (push_init_level): Pass input_location to warning_init.
4384 (add_pending_init): Add location_t parameter. Pass loc to
4386 (set_nonincremental_init): Pass input_location to add_pending_init.
4387 (set_nonincremental_init_from_string): Likewise.
4388 (output_init_element): Pass loc to warning_init and to
4391 2014-05-01 Marek Polacek <polacek@redhat.com>
4394 * c-typeck.c (c_finish_return): Distinguish between label and variable
4395 when warning about returning local address.
4397 2014-05-01 Marek Polacek <polacek@redhat.com>
4400 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4403 2014-05-01 Marek Polacek <polacek@redhat.com>
4406 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4407 instead of 0 to WARN_FOR_QUALIFIERS.
4409 2014-05-01 Marek Polacek <polacek@redhat.com>
4412 * c-typeck.c (default_conversion): Use better location for
4415 2014-04-30 Marek Polacek <polacek@redhat.com>
4417 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4418 also when SANITIZE_FLOAT_DIVIDE is on.
4420 2014-04-30 Marek Polacek <polacek@redhat.com>
4423 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4424 and pedwarn_init. Use loc insted of input_location.
4426 2014-04-30 Marek Polacek <polacek@redhat.com>
4429 * c-typeck.c (build_binary_op): Use location when warning about
4432 2014-04-25 Marek Polacek <polacek@redhat.com>
4435 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4436 always_inline/noinline and hot/cold attributes.
4438 2014-04-25 Marek Polacek <polacek@redhat.com>
4441 * c-parser.c (c_parser_initelt): Pass input_location to
4442 process_init_element.
4443 (c_parser_initval): Pass loc to process_init_element.
4444 * c-tree.h (process_init_element): Adjust declaration.
4445 * c-typeck.c (push_init_level): Pass input_location to
4446 process_init_element.
4447 (pop_init_level): Likewise.
4448 (set_designator): Likewise.
4449 (output_init_element): Add location_t parameter. Pass loc to
4451 (output_pending_init_elements): Pass input_location to
4452 output_init_element.
4453 (process_init_element): Add location_t parameter. Pass loc to
4454 output_init_element.
4456 2014-04-24 Jakub Jelinek <jakub@redhat.com>
4458 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4459 atomic-clause, allow comma in between atomic-clause and
4462 2014-04-22 Jakub Jelinek <jakub@redhat.com>
4465 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4466 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4468 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4471 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4472 create_tmp_var instead build_decl for creating temps.
4473 (build_array_notation_expr): Likewise.
4474 (fix_conditional_array_notations_1): Likewise.
4475 (fix_array_notation_expr): Likewise.
4476 (fix_array_notation_call_expr): Likewise.
4478 2014-03-28 Jakub Jelinek <jakub@redhat.com>
4481 * c-tree.h (c_build_function_call_vec): New prototype.
4482 * c-typeck.c (build_function_call_vec): Don't call
4483 resolve_overloaded_builtin here.
4484 (c_build_function_call_vec): New wrapper function around
4485 build_function_call_vec. Call resolve_overloaded_builtin here.
4486 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4487 Call c_build_function_call_vec instead of build_function_call_vec.
4488 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4489 * c-decl.c (finish_decl): Likewise.
4491 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4494 * c-typeck.c: Use correct format string in cast-qual warning
4496 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4498 * c-decl.c (c_decl_attributes): Use
4499 lang_hooks.types.omp_mappable_type.
4500 * c-typeck.c (c_finish_omp_clauses): Likewise.
4502 2014-03-06 Marek Polacek <polacek@redhat.com>
4505 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4506 of checking tree code.
4508 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4510 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4511 (c_parser_parameter_declaration): Likewise.
4513 2014-02-19 Marek Polacek <polacek@redhat.com>
4516 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4517 Call mark_exp_read on exp.value.
4518 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4519 TREE_ADDRESSABLE on old instead of val.
4520 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4522 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4524 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4525 C_EXPR_APPEND by vec_safe_push.
4526 * c-tree.h (C_EXPR_APPEND): Remove.
4528 2014-01-31 Marek Polacek <polacek@redhat.com>
4531 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4532 build_function_call_vec.
4533 (build_function_call): Likewise.
4534 (build_atomic_assign): Likewise.
4535 (build_function_call_vec): Add arg_loc parameter. Use it.
4536 (convert_arguments): Likewise.
4537 (convert_for_assignment): Rename rhs_loc to expr_loc.
4538 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4539 (c_parser_objc_keywordexpr): Likewise.
4540 (c_parser_postfix_expression_after_primary): Call
4541 build_function_call_vec with expr_loc rather than op_loc.
4542 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4543 build_function_call_vec.
4544 (c_parser_expr_list): Add locations parameter. Fill it with locations
4545 of function arguments.
4546 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4548 2014-01-30 Marek Polacek <polacek@redhat.com>
4551 * c-typeck.c (build_function_call_vec): Use loc parameter.
4552 (convert_arguments): Add location parameter. Use it.
4553 (ep_convert_and_check): Likewise.
4554 (build_atomic_assign): Adjust convert_for_assignment call.
4555 (build_modify_expr): Likewise.
4556 (digest_init): Likewise.
4557 (c_finish_return): Likewise.
4558 (build_conditional_expr): Adjust ep_convert_and_check calls.
4559 (convert_for_assignment): Add rhs_loc parameter. Use it.
4560 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4563 2014-01-30 Richard Biener <rguenther@suse.de>
4566 * c-typeck.c (build_function_call_vec): Do not replace calls
4567 to a function via an incompatible type with a runtime abort.
4569 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4571 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4572 flag_enable_cilkplus with flag_cilkplus.
4573 (c_parser_direct_declarator_inner): Likewise.
4574 (c_parser_attribute_any_word): Likewise.
4575 (c_parser_attributes): Likewise.
4576 (c_parser_compound_statement): Likewise.
4577 (c_parser_statement_after_labels): Likewise.
4578 (c_parser_if_statement): Likewise.
4579 (c_parser_switch_statement): Likewise.
4580 (c_parser_do_statement): Likewise.
4581 (c_parser_for_statement): Likewise.
4582 (c_parser_unary_expression): Likewise.
4583 (c_parser_postfix_expression): Likewise.
4584 (c_parser_postfix_expression_after_primary): Likewise.
4585 (c_parser_postfix_expression_after_primary): Likewise.
4586 (c_parser_omp_clause_name): Likewise.
4587 (c_finish_omp_declare_simd): Likewise.
4588 (c_parser_cilk_verify_simd): Likewise.
4589 * c-typeck.c (build_array_ref): Likewise.
4590 (build_function_call_vec): Likewise.
4591 (convert_arguments): Likewise.
4592 (build_compound_expr): Likewise.
4593 (c_finish_return): Likewise.
4594 (c_finish_if_stmt): Likewise.
4595 (c_finish_loop): Likewise.
4596 (build_binary_op): Likewise.
4598 2014-01-23 Marek Polacek <polacek@redhat.com>
4601 * c-typeck.c (parser_build_binary_op): Use location instead of
4603 (build_binary_op): Pass location to shorten_compare.
4605 2014-01-23 Marek Polacek <polacek@redhat.com>
4608 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4611 2014-01-23 Marek Polacek <polacek@redhat.com>
4614 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4615 of a comma expression.
4616 (emit_side_effect_warnings): Likewise.
4618 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4621 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4622 function to use walk_tree and moved a lot of its functionality to
4623 expand_array_notations.
4624 (expand_array_notations): New function.
4626 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4628 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4629 attribute an attribute without value.
4631 2014-01-23 Jakub Jelinek <jakub@redhat.com>
4634 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4635 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4637 2014-01-22 Marek Polacek <polacek@redhat.com>
4640 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4641 of remove_c_maybe_const_expr on op1 and op2.
4643 2014-01-15 Jakub Jelinek <jakub@redhat.com>
4646 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4647 effects, preevaluate rhs using SAVE_EXPR first.
4649 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4652 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4653 statements with if-elseif statements.
4655 2014-01-06 Marek Polacek <polacek@redhat.com>
4658 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4659 defined bit-field types only in ISO C.
4661 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4663 Update copyright years
4665 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4667 * c-array-notation.c: Use the standard form for the copyright notice.
4669 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4671 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4672 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4673 field in parser is not empty. If not-empty, call the function
4674 c_parser_finish_omp_declare_simd.
4675 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4676 between SIMD-enabled functions and #pragma simd. Added new parameter.
4677 (c_parser_cilk_all_clauses): Modified the usage of the function
4678 c_parser_cilk_clause_vectorlength as mentioned above.
4679 (c_parser_cilk_simd_fn_vector_attrs): New function.
4680 (c_finish_cilk_simd_fn_tokens): Likewise.
4681 (is_cilkplus_vector_p): Likewise.
4682 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4683 "nomask," and "mask" strings in clause name.
4684 (c_parser_omp_all_clauses): Added 3 new case statements:
4685 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4686 PRAGMA_CILK_CLAUSE_NOMASK.
4687 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4688 check for vector attribute and if so call the function
4689 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4690 called the function c_finish_cilk_simd_fn_tokens.
4691 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4692 parser field is non-empty. If so, parse them as you would parse
4693 the omp declare simd pragma.
4694 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4695 Added a check when step is a parameter and flag it as error.
4696 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4697 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4700 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4702 * c-parser.c (c_parser_omp_parallel): Fix description.
4704 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4706 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4707 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4708 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4709 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4711 2013-12-04 Joseph Myers <joseph@codesourcery.com>
4714 * c-parser.c (c_parser_alignas_specifier): Use
4715 c_sizeof_or_alignof_type instead of c_alignof.
4716 (c_parser_alignof_expression): Likewise, with min_alignof
4717 parameter depending on alignof spelling used.
4719 2013-12-04 Marek Polacek <polacek@redhat.com>
4722 * c-decl.c (start_function): Don't warn for missing prototype for
4725 2013-12-03 Marek Polacek <polacek@redhat.com>
4728 * c-decl.c (build_compound_literal): Allow compound literals with
4729 empty initial value.
4731 2013-12-02 Joseph Myers <joseph@codesourcery.com>
4734 * c-typeck.c (build_modify_expr): Diagnose assignment to
4735 expression with array type.
4737 2013-11-29 Joseph Myers <joseph@codesourcery.com>
4740 * c-typeck.c (process_init_element): Do not treat a string as
4741 initializing a whole array when used with a designator for an
4744 2013-11-29 Joseph Myers <joseph@codesourcery.com>
4747 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4748 an inline function following a static declaration.
4750 2013-11-28 Jakub Jelinek <jakub@redhat.com>
4753 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4754 to p_name before calling c_parser_omp_teams instead of after.
4755 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4756 argument. Remove unused p_name variable.
4758 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
4759 Jakub Jelinek <jakub@redhat.com>
4761 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4762 external_scope is NULL.
4764 2013-11-27 Tom de Vries <tom@codesourcery.com>
4765 Marc Glisse <marc.glisse@inria.fr>
4768 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4770 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
4772 * c-typeck.c: Add required include files from gimple.h.
4774 2013-11-22 David Malcolm <dmalcolm@redhat.com>
4776 * c-decl.c (define_label, shadow_tag_warned)
4777 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4778 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4779 (declspecs_add_type): Remove use of in_system_header macro.
4780 * c-parser.c (c_parser_unary_expression): Likewise.
4781 * c-typeck.c (store_init_value, process_init_element)
4782 (c_start_case): Likewise.
4784 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4787 * c-parser.c (c_parser_set_source_position_from_token): Remove
4788 reference to in_system_header from comment.
4790 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4792 * c-decl.c (grokdeclarator): Update comment to refer to
4793 tree_to_[su]hwi rather than tree_low_cst.
4795 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4797 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4798 tree_to_uhwi throughout.
4800 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4802 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4805 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4807 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4810 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
4812 * c-parser.c (c_parser_cilk_simd): New.
4813 (c_parser_cilk_verify_simd): New.
4814 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4815 (c_parser_omp_for_loop): Add case for NE_EXPR.
4816 Set c_break_label for CILK_SIMD.
4817 (c_parser_cilk_clause_vectorlength): New.
4818 (c_parser_cilk_clause_linear): New.
4819 (c_parser_cilk_clause_name): New.
4820 (c_parser_cilk_all_clauses): New.
4821 * c-typeck.c (build_unary_op): Pass location argument to
4823 (build_modify_expr): Same.
4824 (build_asm_expr): Same.
4825 (c_finish_bc_stmt): Error on break/continue in loops.
4827 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
4829 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4831 2013-11-14 Diego Novillo <dnovillo@google.com>
4833 * c-decl.c: Include print-tree.h.
4834 Include stor-layout.h.
4837 Include stringpool.h.
4838 * c-lang.c: Include fold-const.h.
4839 * c-parser.c: Include stringpool.h.
4841 Include stor-layout.h.
4843 Include trans-mem.h.
4844 * c-typeck.c: Include stor-layout.h.
4845 Include trans-mem.h.
4849 2013-11-13 Joseph Myers <joseph@codesourcery.com>
4851 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4852 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4854 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4855 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4857 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4858 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4859 (c_parser_declarator, c_parser_direct_declarator_inner)
4860 (c_parser_parameter_declaration, c_parser_type_name): All callers
4862 (c_parser_declaration_or_fndef): Handle declarations with type
4863 determined from the initializer.
4865 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
4867 * c-typeck.c: Include gimplify.h.
4869 2013-11-12 Joseph Myers <joseph@codesourcery.com>
4871 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4872 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4874 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4875 or _Thread_local as appropriate in diagnostics.
4876 (build_null_declspecs): Initialize ret->thread_gnu_p.
4877 (declspecs_add_scspec): Handle either __thread or _Thread_local
4878 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
4879 pedantic. Do not disallow _Thread_local extern and _Thread_local
4882 2013-11-07 Joseph Myers <joseph@codesourcery.com>
4883 Andrew MacLeod <amacleod@redhat.com>
4885 * c-aux-info.c (gen_type): Handle atomic qualifier.
4886 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4887 qualifiers when compating types.
4888 (shadow_tag_warned): Handle atomic_p in declspecs.
4889 (quals_from_declspecs): Likewise.
4890 (start_decl): Use c_type_promotes_to when promoting argument
4892 (grokdeclarator): Handle _Atomic.
4893 (get_parm_info): Diagnose any qualifier on "void" as only
4895 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4896 comparing types. Use c_type_promotes_to when promoting argument
4898 (finish_function): Use c_type_promotes_to when promoting argument
4900 (build_null_declspecs): Handle atomic_p in declspecs.
4901 (declspecs_add_qual): Handle RID_ATOMIC.
4902 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4903 (c_token_starts_declspecs): Handle RID_ATOMIC.
4904 (c_parser_declspecs): Handle atomic type specifiers and
4906 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4907 from types of expressions with atomic type.
4908 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4909 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4910 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4911 (c_parser_statement_after_labels, c_parser_switch_statement)
4912 (c_parser_for_statement, c_parser_expr_no_commas)
4913 (c_parser_conditional_expression, c_parser_binary_expression)
4914 (c_parser_cast_expression, c_parser_unary_expression)
4915 (c_parser_postfix_expression)
4916 (c_parser_postfix_expression_after_primary, c_parser_expression):
4917 Use convert_lvalue_to_rvalue.
4918 (c_parser_expression_conv, c_parser_expr_list): Document
4919 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4920 (c_parser_objc_synchronized_statement): Use
4921 convert_lvalue_to_rvalue.
4922 (c_parser_objc_selector): Handle RID_ATOMIC.
4923 (c_parser_objc_receiver, c_parser_array_notation): Use
4924 convert_lvalue_to_rvalue.
4925 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4926 _Atomic (type-name).
4927 (struct c_declspecs): Add atomic_p field.
4928 (convert_lvalue_to_rvalue): Declare.
4929 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4930 corresponding atomic types.
4931 (qualify_type): Don't add _Atomic qualifiers from second argument.
4932 (comp_target_types): Do not allow _Atomic mismatches.
4933 (type_lists_compatible_p): Do not remove atomic qualifiers when
4935 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4936 (build_atomic_assign): New functions.
4937 (build_unary_op): Use build_atomic_assign for atomic increment and
4939 (build_conditional_expr): Do not treat _Atomic void as a qualified
4941 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4942 (find_anonymous_field_with_type, convert_to_anonymous_field)
4943 (convert_for_assignment): Do not remove atomic qualifiers when
4945 (digest_init): Do not accept initialization of arrays of atomic
4946 elements by string constants.
4947 (build_asm_expr): Use convert_lvalue_to_rvalue.
4948 (build_binary_op): Do not treat _Atomic void as a qualified
4951 2013-11-06 DJ Delorie <dj@redhat.com>
4953 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4954 both explicit and builtin, print the location of the explicit one.
4956 2013-11-05 Tobias Burnus <burnus@net-b.de>
4958 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4959 c_parser_omp_distribute, c_parser_omp_teams,
4960 c_parser_omp_target, c_parser_omp_declare): Handle
4963 2013-11-03 Marek Polacek <polacek@redhat.com>
4965 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4967 2013-11-01 Jakub Jelinek <jakub@redhat.com>
4969 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4970 check_dup_generic at the end, unless remove is true.
4971 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4973 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4975 2013-10-31 Jakub Jelinek <jakub@redhat.com>
4977 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4978 with decl that is not pointer nor array.
4980 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4982 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4983 a spawning function is found.
4984 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4985 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4986 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4987 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4989 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4990 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4992 (c_finish_return): Added a check to reject _Cilk_spawn in return
4994 (build_cilk_spawn): New function.
4995 (build_cilk_sync): Likewise.
4996 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4998 2013-10-27 Tobias Burnus <burnus@net-b.de>
5001 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
5002 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
5003 (c_parser_statement_after_labels): Update calls.
5005 2013-10-24 Tobias Burnus <burnus@net-b.de>
5008 * c-parser.c (c_parser_pragma, c_parser_for_statement):
5009 Handle PRAGMA_IVDEP.
5010 (c_parser_statement_after_labels): Update call.
5012 2013-10-24 Marek Polacek <polacek@redhat.com>
5014 * c-parser.c (c_parser_struct_declaration): Add a comment.
5015 (c_parser_declarator): Don't allow _Alignas here.
5017 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
5019 * c-parser.c: Include omp-low.h.
5020 * c-typeck.c: Likewise.
5022 2013-10-17 Marek Polacek <polacek@redhat.com>
5025 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
5026 Document syntax of the array-declarator.
5027 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
5029 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
5030 (c_parser_struct_declaration): Likewise.
5031 (c_parser_declarator): Likewise.
5032 (c_parser_direct_declarator_inner): Likewise.
5033 (c_parser_parameter_declaration): Likewise.
5034 (c_parser_type_name): Likewise.
5036 2013-10-11 Jakub Jelinek <jakub@redhat.com>
5038 * c-lang.h (current_omp_declare_target_attribute): New extern
5040 * c-parser.c: Include c-lang.h.
5041 (struct c_parser): Change tokens to c_token *.
5042 Add tokens_buf field. Change tokens_avail type to unsigned int.
5043 (c_parser_consume_token): If parser->tokens isn't
5044 &parser->tokens_buf[0], increment parser->tokens.
5045 (c_parser_consume_pragma): Likewise.
5046 (enum pragma_context): Add pragma_struct and pragma_param.
5047 (c_parser_external_declaration): Adjust
5048 c_parser_declaration_or_fndef caller.
5049 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
5050 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
5051 Adjust recursive call.
5052 (c_parser_struct_or_union_specifier): Use pragma_struct instead
5054 (c_parser_parameter_declaration): Use pragma_param instead of
5056 (c_parser_compound_statement_nostart, c_parser_label,
5057 c_parser_for_statement): Adjust
5058 c_parser_declaration_or_fndef callers.
5059 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5060 it through to c_parser_conditional_expression.
5061 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5062 pass it through to c_parser_binary_expression. Adjust recursive
5064 (c_parser_binary_expression): Remove prec argument, add
5065 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5066 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5067 binop matches it, use build2 instead of parser_build_binary_op.
5068 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5069 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5070 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5071 Handle pragma_struct and pragma_param the same as pragma_external.
5072 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5073 (c_parser_omp_variable_list): Parse array sections for
5074 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5075 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5076 (c_parser_omp_clause_reduction): Handle user defined reductions.
5077 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5078 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5079 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5080 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5081 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5082 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5083 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5084 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5085 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5086 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5087 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5088 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5089 (c_parser_omp_for_loop): Add CODE argument, pass it through
5090 to c_finish_omp_for. Change last argument to cclauses,
5091 and adjust uses to grab parallel clauses from the array of all
5092 the split clauses. Adjust c_parser_binary_expression,
5093 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5094 (omp_split_clauses): New function.
5095 (c_parser_omp_simd): New function.
5096 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5097 Allow the function to be called also when parsing combined constructs,
5098 and call c_parser_omp_simd when parsing for simd.
5099 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5100 #pragma omp section, require exactly one structured-block instead of
5101 sequence of statements.
5102 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5103 Allow the function to be called also when parsing combined constructs.
5104 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5105 Allow the function to be called also when parsing combined
5107 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5108 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5109 c_parser_omp_teams, c_parser_omp_target_data,
5110 c_parser_omp_target_update, c_parser_omp_target,
5111 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5112 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5113 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5114 (c_parser_omp_construct): Add p_name and mask vars. Handle
5115 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5116 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5117 and c_parser_omp_sections callers.
5118 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5119 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5120 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5121 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5122 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5124 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5125 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5126 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5127 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5128 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5129 * c-typeck.c: Include tree-inline.h.
5130 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5131 handle_omp_array_sections_1, handle_omp_array_sections,
5132 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5133 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5134 user defined reductions.
5135 (c_tree_equal): New function.
5136 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5137 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5138 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5139 c_check_omp_declare_reduction_r): New prototypes.
5140 * c-decl.c (current_omp_declare_target_attribute): New variable.
5141 (c_decl_attributes): New function.
5142 (start_decl, start_function): Use it instead of decl_attributes.
5143 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5144 c_omp_reduction_decl, c_omp_reduction_lookup,
5145 c_check_omp_declare_reduction_r): New functions.
5147 2013-09-25 Tom Tromey <tromey@redhat.com>
5149 * Make-lang.in (c/gccspec.o): Remove.
5150 (CFLAGS-c/gccspec.o): New variable.
5151 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5152 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5153 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5155 2013-09-25 Tom Tromey <tromey@redhat.com>
5157 * Make-lang.in (c/gccspec.o): Don't use subshell.
5159 2013-09-18 Marek Polacek <polacek@redhat.com>
5162 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5163 Remove unnecessary check.
5165 2013-09-18 Marek Polacek <polacek@redhat.com>
5168 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5169 no_sanitize_undefined attribute.
5171 2013-09-13 Kai Tietz <ktietz@redhat.com>
5174 * c-decl.c (c_builtin_function_ext_scope): Remove
5175 wrong assumption that it is never called on prexisting
5178 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5180 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5182 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5184 * c-objc-common.c (c_tree_printer): Tidy.
5186 2013-08-30 Marek Polacek <polacek@redhat.com>
5188 * c-typeck.c (build_binary_op): Add division by zero and shift
5191 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
5192 Joseph Myers <joseph@codesourcery.com>
5195 * c-typeck.c (c_common_type): Prefer double_type_node over
5196 other REAL_TYPE types with the same precision.
5197 (convert_arguments): Likewise.
5199 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5201 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5202 (c_initialize_diagnostics): Call a destructor for the early printer.
5204 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5206 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5207 printer initialization.
5209 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
5212 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5213 check for truth values.
5214 (expand_array_notation_exprs): Added truth values case. Removed an
5215 unwanted else. Added for-loop to walk through subtrees in default
5218 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5220 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5222 2013-07-23 Joseph Myers <joseph@codesourcery.com>
5224 * c-parser.c (struct c_generic_association): Fix typo.
5226 2013-07-23 Tom Tromey <tromey@redhat.com>
5227 Joseph Myers <joseph@codesourcery.com>
5229 * c-parser.c (struct c_generic_association): New.
5230 (c_generic_association_d): New typedef.
5231 (c_parser_generic_selection): New function.
5232 (c_parser_postfix_expression): Handle RID_GENERIC.
5234 2013-07-13 Jason Merrill <jason@redhat.com>
5237 * c-decl.c (finish_struct): Check for too-large class.
5239 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
5242 * c-typeck.c (set_init_index): When folding, check for index overflow.
5244 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5246 * c-parser.c (c_parser_array_notation): Removed rejection of array
5247 notations in an array of function pointers.
5249 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5251 * c-array-notation.c (make_triplet_val_inv): New function.
5252 (create_cmp_incr): Likewise.
5253 (create_array_refs): Likewise.
5254 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5255 Also modularized common parts between functions and called the function.
5256 (build_array_notation_expr): Likewise.
5257 (fix_conditional_array_notations_1): Likewise.
5258 (fix_array_notation_expr): Likewise.
5259 (fix_array_notation_call_expr): Likewise.
5261 2013-06-18 Marek Polacek <polacek@redhat.com>
5264 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5266 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5268 * c-array-notation.c (build_array_notation_expr): Reject array notation
5269 mismatch between LHS and RHS even inside a call_expr. Also, removed
5270 a couple while statements that were dead code.
5272 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5274 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5275 excessive precision expressions in function parameters. Also removed
5276 couple unwanted while statements.
5278 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5280 * c-array-notation.c (expand_array_notation_exprs): Added
5281 ARRAY_NOTATION_REF case.
5283 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5285 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5286 function to c-family/array-notation-common.c.
5287 (is_cilkplus_reduce_builtin): Likewise.
5288 (find_rank): Likewise.
5289 (extract_array_notation_exprs): Likewise.
5290 (replace_array_notations): Likewise.
5291 (find_inv_trees): Likewise.
5292 (replace_inv_trees): Likewise.
5293 (contains_array_notation_expr): Likewise.
5294 (find_correct_array_notation_type): Likewise.
5295 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5296 (struct inv_list): Moved this to c-family/array-notation-common.c.
5297 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5299 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5301 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5302 reduction functions outside the for-loop. Added a check if the fundecl
5303 is non-NULL. Finally, removed an unwanted if-statement, and made the
5306 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5308 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5309 condition of the if-statement matches the rank of else-block and then-
5310 block when array notations are used.
5311 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5312 expression after the entire function body is parsed.
5313 (c_parser_expr_no_commas): Delayed creating array notation expressions
5314 to the end of function parsing.
5315 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5316 whole if-statement instead of just the condition.
5317 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5319 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5322 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5323 array to NULL_TREE if they are unused. Also added a check for the
5324 field to be NULL before its fields are used in future.
5326 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5329 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5330 (build_array_notation_expr): Likewise.
5332 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5334 * c-typeck.c (build_array_ref): Added a check to see if array's
5335 index is greater than one. If true, then emit an error.
5336 (build_function_call_vec): Exclude error reporting and checking
5337 for builtin array-notation functions.
5338 (convert_arguments): Likewise.
5339 (c_finish_return): Added a check for array notations as a return
5340 expression. If true, then emit an error.
5341 (c_finish_loop): Added a check for array notations in a loop
5342 condition. If true then emit an error.
5343 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5344 (build_binary_op): Added a check for array notation expr inside
5345 op1 and op0. If present, we call another function to find correct
5347 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5348 * c-parser.c (c_parser_compound_statement): Check if array
5349 notation code is used in tree, if so, then transform them into
5351 (c_parser_expr_no_commas): Check if array notation is used in LHS
5352 or RHS, if so, then build array notation expression instead of
5354 (c_parser_postfix_expression_after_primary): Added a check for
5355 colon(s) after square braces, if so then handle it like an array
5356 notation. Also, break up array notations in unary op if found.
5357 (c_parser_direct_declarator_inner): Added a check for array
5359 (c_parser_compound_statement): Added a check for array notation in
5360 a stmt. If one is present, then expand array notation expr.
5361 (c_parser_if_statement): Likewise.
5362 (c_parser_switch_statement): Added a check for array notations in
5363 a switch statement's condition. If true, then output an error.
5364 (c_parser_while_statement): Similarly, but for a while.
5365 (c_parser_do_statement): Similarly, but for a do-while.
5366 (c_parser_for_statement): Similarly, but for a for-loop.
5367 (c_parser_unary_expression): Check if array notation is used in a
5368 pre-increment or pre-decrement expression. If true, then expand
5370 (c_parser_array_notation): New function.
5371 * c-array-notation.c: New file.
5372 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5374 2013-05-23 Mike Stump <mikestump@comcast.net>
5376 * c-typeck.c (convert_for_assignment): Handle references to memory
5379 2013-05-16 Jason Merrill <jason@redhat.com>
5381 * Make-lang.in (cc1$(exeext)): Use link mutex.
5383 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5385 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5386 to simply use OPT_Wpointer_arith.
5387 (build_unary_op): Likewise.
5389 2013-04-03 Jakub Jelinek <jakub@redhat.com>
5392 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5393 argument. If set, or it temporarily for parsing of the first
5394 argument into force_folding_builtin_constant_p.
5395 (c_parser_postfix_expression): Adjust callers.
5397 2013-03-21 Richard Biener <rguenther@suse.de>
5399 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5400 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5402 2013-02-12 Marek Polacek <polacek@redhat.com>
5405 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5408 2013-01-24 Jakub Jelinek <jakub@redhat.com>
5411 * c-typeck.c (set_nonincremental_init_from_string): If
5412 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5414 (process_init_element): Likewise.
5416 2012-12-20 Jakub Jelinek <jakub@redhat.com>
5419 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5420 argument, don't call default_function_array_conversion
5421 nor c_fully_fold here.
5422 (c_parser_asm_statement): Adjust callers.
5423 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5424 and outputs here, and call default_function_array_conversion
5425 on inputs that don't need to be addressable.
5427 2012-12-18 Jakub Jelinek <jakub@redhat.com>
5430 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5431 warning require that both c_common_unsigned_type as well as
5432 c_common_signed_type is the same for both mvl and mvr types.
5434 2012-11-16 Diego Novillo <dnovillo@google.com>
5436 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5438 * c-common.c: Use new vec API in vec.h.
5439 * c-common.h: Likewise.
5440 * c-gimplify.c: Likewise.
5441 * c-pragma.c: Likewise.
5442 * c-pretty-print.c: Likewise.
5443 * c-pretty-print.h: Likewise.
5444 * c-semantics.c: Likewise.
5445 * c-decl.c: Likewise.
5446 * c-parser.c: Likewise.
5447 * c-tree.h: Likewise.
5448 * c-typeck.c: Likewise.
5450 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5453 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5455 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5458 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5459 shadows a function, unless the variable is a function or a
5460 pointer-to-function.
5462 2012-10-12 Jakub Jelinek <jakub@redhat.com>
5465 * c-parser.c (struct c_tree_loc_pair): Removed.
5466 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5467 add location_t * and tree * arguments, fill in array of 3
5468 sizeof_arg trees and corresponding locs.
5469 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5470 c_parser_expr_list callers.
5471 (c_parser_postfix_expression_after_primary): Likewise. Pass
5472 array of 3 sizeof_arg trees and locs (corresponding to first
5473 3 arguments) to sizeof_pointer_memaccess_warning.
5475 2012-10-09 Lawrence Crowl <crowl@google.com>
5477 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5478 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5481 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5484 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5487 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
5490 * c-typeck.c: Include c-common.h.
5491 (enum stv_conv): Moved to c-common.h.
5492 (scalar_to_vector): Moved to c-common.c.
5493 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5494 * Make-lang.in: c-typeck.c depends on c-common.h.
5496 2012-10-04 Arnaud Charlet <charlet@adacore.com>
5498 * c-decl.c (c_write_global_declarations): Fix handling of
5501 2012-09-30 Sharad Singhai <singhai@google.com>
5503 * c-decl.c (c_write_global_declarations): Use a different method
5504 to determine if the dump has ben initialized.
5506 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5509 * c-typeck.c (c_cast_expr): When casting to a type requiring
5510 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5513 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5516 * c-typeck.c (build_unary_op): Pass original argument of
5517 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5518 any C_MAYBE_CONST_EXPR, if it has integer operands.
5519 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5520 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5521 to c_objc_common_truthvalue_conversion, then remove any
5522 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5523 c_objc_common_truthvalue_conversion not
5524 c_common_truthvalue_conversion.
5525 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5526 call note_integer_operands for arguments with integer operands
5527 that are not integer constants.
5529 2012-09-13 Jakub Jelinek <jakub@redhat.com>
5532 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5533 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5535 2012-08-31 Jakub Jelinek <jakub@redhat.com>
5538 * c-convert.c (convert): Don't call fold_convert_loc if
5539 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5540 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5541 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5543 2012-08-24 Jakub Jelinek <jakub@redhat.com>
5546 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5547 for nested and empty_ok arguments in the call to
5548 c_parser_declaration_or_fndef.
5550 2012-08-17 Jakub Jelinek <jakub@redhat.com>
5552 * c-tree.h (c_last_sizeof_arg): Declare.
5553 * c-parser.c (struct c_tree_loc_pair): New type.
5554 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5556 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5557 (c_parser_postfix_expression_after_primary): Likewise. Call
5558 sizeof_pointer_memaccess_warning if needed.
5559 (sizeof_ptr_memacc_comptypes): New function.
5560 * c-typeck.c (c_last_sizeof_arg): New global variable.
5561 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5563 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
5565 * c-lang.h (lang_decl): Add variable_size GTY option.
5567 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5569 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5570 * Make-lang.in: Fix dependencies.
5572 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5574 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5575 and add language Makefile hooks.
5576 * config-lang.in: New file.
5577 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5578 add the required "normal" config-lang.in rules.
5579 * c-lang.h: Moved from gcc/ to here.
5580 * c-tree.h: Likewise.
5581 * c-objc-common.c: Likewise.
5582 * c-objc-common.h: Likewise.
5583 * c-typeck.c: Likewise.
5584 * c-convert.c: Likewise.
5585 * c-lang.c: Likewise.
5586 * c-aux-info.c: Likewise.
5587 * c-errors.c: Likewise.
5588 * gccspec.c: Likewise.
5589 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5590 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5592 Copyright (C) 2012-2018 Free Software Foundation, Inc.
5594 Copying and distribution of this file, with or without modification,
5595 are permitted in any medium without royalty provided the copyright
5596 notice and this notice are preserved.