1 2018-08-01 Martin Sebor <msebor@redhat.com>
3 PR tree-optimization/86650
4 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
5 and TREE_BLOCK (t) from within percent_K_format to this callsite.
7 2018-08-01 Jakub Jelinek <jakub@redhat.com>
10 * c-typeck.c (init_field_decl_cmp): New function.
11 (output_pending_init_elements): Use it for field comparisons
12 instead of pure bit_position comparisons.
14 2018-07-12 Jakub Jelinek <jakub@redhat.com>
16 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
17 type here, instead add "omp declare target implicit" attribute.
18 (finish_decl): Diagnose vars without mappable type here.
20 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
21 Thomas Schwinge <thomas@codesourcery.com>
22 Cesar Philippidis <cesar@codesourcery.com>
24 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
25 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
26 to their non-present_or_* counterparts. Make 'self' an alias to
27 PRAGMA_OACC_CLAUSE_HOST.
28 (c_parser_oacc_data_clause): Update GOMP mappings for
29 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
30 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
31 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
32 Remove support for present_or_* clauses.
33 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
34 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
35 (OACC_DECLARE_CLAUSE_MASK): Likewise.
36 (OACC_DATA_CLAUSE_MASK): Likewise.
37 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
38 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
39 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
40 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
41 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
43 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
45 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
46 * gimple-parser.c (c_parser_gimple_statement): Likewise.
47 (c_parser_gimple_unary_expression): Likewise.
49 2018-06-15 Jakub Jelinek <jakub@redhat.com>
52 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
53 before doing POINTER_DIFF_EXPR.
55 2018-06-07 Marek Polacek <polacek@redhat.com>
58 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
59 for loop initial declarations.
61 2018-05-30 David Pagan <dave.pagan@oracle.com>
64 * c-decl.c (grokdeclarator): Update check for return type warnings.
65 (start_function): Likewise.
66 (finish_function): Likewise.
67 * c-typeck.c (c_finish_return): Update check for return type warnings.
68 Pass OPT_Wreturn_type to pedwarn when appropriate.
70 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
72 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
75 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
77 * gimple-parser.c: Include internal-fn.h.
78 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
79 (c_parser_gimple_call_internal): New function.
80 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
83 2018-05-10 Jakub Jelinek <jakub@redhat.com>
86 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
87 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
89 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
90 fold_offsetof_1, pass argtype as TYPE to it and drop the
93 2018-05-02 David Pagan <dave.pagan@oracle.com>
96 * c-decl.c (old_style_parameter_scope): New function.
97 * c-parser.c (c_parser_postfix_expression): Check for statement
98 expressions in old-style function parameter list declarations.
99 * c-parser.h (old_style_parameter_scope): New extern declaration.
101 2018-04-25 Jakub Jelinek <jakub@redhat.com>
104 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
105 it is not TREE_STATIC.
106 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
107 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
108 its COMPOUND_LITERAL_EXPR_DECL.
110 2018-03-21 Joseph Myers <joseph@codesourcery.com>
112 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
113 where all functions return the same _FloatN or _FloatNx type,
114 treat integer types as _Float64 instead of double.
116 2018-03-21 Jakub Jelinek <jakub@redhat.com>
119 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
120 building vector comparison, diagnose it and return error_mark_node.
122 2018-03-15 Jakub Jelinek <jakub@redhat.com>
125 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
126 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
127 INTEGER_TYPE element type.
129 2018-03-13 David Pagan <dave.pagan@oracle.com>
132 * c-typeck.c (output_init_element): Ensure field initializer
133 expression is always evaluated if there are side effects.
135 2018-03-06 Jakub Jelinek <jakub@redhat.com>
138 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
139 !building_stmt_list_p ().
141 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
144 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
145 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
146 and include the BIND_EXPR in the list of things that need to be
149 2018-02-09 Nathan Sidwell <nathan@acm.org>
152 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
153 to strict_aliasing_warning.
155 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
157 * c-typeck.c (really_start_incremental_init, push_init_level,
158 set_nonincremental_init, output_init_element, process_init_element):
159 Use DECL_UNNAMED_BIT_FIELD.
161 2018-01-31 Marek Polacek <polacek@redhat.com>
164 * c-parser.c (c_parser_compound_statement_nostart): Call
165 expansion_point_location_if_in_system_header.
167 2018-01-17 David Malcolm <dmalcolm@redhat.com>
170 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
173 2018-01-13 Jakub Jelinek <jakub@redhat.com>
176 * c-tree.h (decl_constant_value_1): Add a bool argument.
177 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
178 returning a CONSTRUCTOR if it is true. Use error_operand_p.
179 (decl_constant_value): Adjust caller.
180 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
181 decl_constant_value_1 as IN_INIT. Otherwise, punt if
182 decl_constant_value returns initializer that has BLKmode or
184 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
186 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
187 Alan Hayward <alan.hayward@arm.com>
188 David Sherwood <david.sherwood@arm.com>
190 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
191 TYPE_VECTOR_SUBPARTS.
193 2018-01-03 Jakub Jelinek <jakub@redhat.com>
195 Update copyright years.
197 2018-01-01 Jakub Jelinek <jakub@redhat.com>
200 * c-parser.c (c_parser_braced_init, c_parser_initelt,
201 c_parser_conditional_expression, c_parser_cast_expression,
202 c_parser_sizeof_expression, c_parser_alignof_expression,
203 c_parser_postfix_expression, c_parser_omp_declare_reduction,
204 c_parser_transaction_expression): Use set_error () method instead
205 of setting value member to error_mark_node.
207 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
209 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
210 and _Float<N>X built-in functions.
212 2017-12-22 Jakub Jelinek <jakub@redhat.com>
215 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
216 TYPE_STUB_DECL and call rest_of_type_compilation before processing
217 incomplete vars rather than after it.
220 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
221 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
222 and consider empty ones if there are no other stmts. For
223 -Wunused-value walk all statements before the one only followed by
226 2017-12-22 Mike Stump <mikestump@comcast.net>
227 Eric Botcazou <ebotcazou@adacore.com>
229 * c-parser.c (c_parser_while_statement): Add unroll parameter and
230 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
231 (c_parser_do_statement): Likewise.
232 (c_parser_for_statement): Likewise.
233 (c_parser_statement_after_labels): Adjust calls to above.
234 (c_parse_pragma_ivdep): New static function.
235 (c_parser_pragma_unroll): Likewise.
236 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
237 <PRAGMA_UNROLL>: New case.
239 2017-12-19 Jakub Jelinek <jakub@redhat.com>
241 * c-typeck.c (comptypes_internal, function_types_compatible_p,
242 perform_integral_promotions, digest_init): Replace Yoda conditions
243 with typical order conditions.
244 * c-decl.c (check_bitfield_type_and_width): Likewise.
246 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
248 * c-typeck.c (c_safe_arg_type_equiv_p,
249 c_safe_function_type_cast_p): New function.
250 (build_c_cast): Implement -Wcast-function-type.
252 2017-12-14 Richard Biener <rguenther@suse.de>
255 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
256 like REALPART_EXPR for the behavior of whether its operand
259 2017-12-12 Marek Polacek <polacek@redhat.com>
262 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
264 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
266 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
267 * c-parser.c (add_debug_begin_stmt): New.
268 (c_parser_declaration_or_fndef): Call it.
269 (c_parser_compound_statement_nostart): Likewise.
270 (c_parser_statement_after_labels): Likewise.
271 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
273 2017-12-07 Joseph Myers <joseph@codesourcery.com>
275 * c-decl.c (build_compound_literal): Add parameter alignas_align
276 and set alignment of decl if nonzero.
277 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
278 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
280 (c_parser_struct_declaration): Update syntax comment.
281 (c_parser_type_name): Add alignas_ok argument and pass it to
283 (c_parser_cast_expression): Pass true to c_parser_type_name and
284 give error if a cast used an _Alignas specifier.
285 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
286 give error if sizeof (type-name) used an _Alignas specifier.
287 (c_parser_alignof_expression): Pass true to c_parser_type_name and
288 give error if _Alignof (type-name) used an _Alignas specifier.
289 (c_parser_postfix_expression_after_paren_type): Check specified
290 alignment for a compound literal and pass it to
291 build_compound_literal.
292 * c-parser.h (c_parser_type_name): Update prototype.
293 * c-tree.h (build_compound_literal): Update prototype.
295 2017-12-07 Martin Sebor <msebor@redhat.com>
298 * c-decl.c (c_decl_attributes): Look up existing declaration and
299 pass it to decl_attributes.
301 2017-12-06 David Malcolm <dmalcolm@redhat.com>
304 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
305 reserved for use by the implementation.
307 2017-12-06 David Malcolm <dmalcolm@redhat.com>
309 * c-decl.c: Include "c-family/c-spellcheck.h".
311 2017-12-05 Martin Liska <mliska@suse.cz>
312 Jakub Jelinek <jakub@redhat.com>
314 * c-typeck.c (pointer_diff): Add new argument and instrument
316 (build_binary_op): Similar for pointer comparison.
318 2017-12-01 Jakub Jelinek <jakub@redhat.com>
321 * c-parser.c: Include tree-iterator.h.
322 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
323 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
327 * c-tree.h (decl_constant_value_1): Declare.
328 * c-typeck.c (decl_constant_value_1): New function.
329 (decl_constant_value): Use it.
330 * c-fold.c (c_fully_fold_internal): If in_init, use
331 decl_constant_value_1 instead of decl_constant_value.
333 2017-11-30 Jakub Jelinek <jakub@redhat.com>
335 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
337 2017-11-28 Jakub Jelinek <jakub@redhat.com>
340 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
341 c_switch_covers_all_cases_p returns true.
343 2017-11-28 Julia Koval <julia.koval@intel.com>
344 Sebastian Peryt <sebastian.peryt@intel.com>
346 * Make-lang.in (c/c-array-notation.o): Remove.
347 * c-array-notation.c: Delete.
348 * c-decl.c: Remove cilkplus condition.
349 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
350 c_parser_cilk_verify_simd, c_parser_array_notation,
351 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
352 c_parser_cilk_simd_fn_vector_attrs,
353 c_finish_cilk_simd_fn_tokens): Delete.
354 (c_parser_declaration_or_fndef): Remove cilkplus condition.
355 (c_parser_direct_declarator_inner): Ditto.
356 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
357 (c_parser_attributes, c_parser_compound_statement,
358 c_parser_statement_after_labels, c_parser_if_statement,
359 c_parser_switch_statement, c_parser_while_statement,
360 c_parser_do_statement, c_parser_for_statement,
361 c_parser_unary_expression, c_parser_postfix_expression,
362 c_parser_postfix_expression_after_primary,
363 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
364 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
366 * c-typeck.c (build_array_ref, build_function_call_vec,
368 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
369 c_finish_loop, build_binary_op): Remove cilkplus support.
371 2017-11-28 Jakub Jelinek <jakub@redhat.com>
373 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
376 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
378 * Make-lang.in (c.install-plugin): Install backend import library.
380 2017-11-23 Jakub Jelinek <jakub@redhat.com>
382 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
385 2017-11-23 Mike Stump <mikestump@comcast.net>
386 Eric Botcazou <ebotcazou@adacore.com>
388 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
390 (c_parser_do_statement): Likewise.
391 (c_parser_for_statement): Likewise.
393 2017-11-22 David Malcolm <dmalcolm@redhat.com>
396 * c-objc-common.c (c_tree_printer): Convert penultimate param from
397 bool to bool *. Within '%T' handling, if showing an "aka", use
398 "quoted" param to add appropriate quoting.
400 2017-11-22 Marek Polacek <polacek@redhat.com>
405 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
407 2017-11-21 David Malcolm <dmalcolm@redhat.com>
410 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
411 earlier failed lookups.
413 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
415 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
416 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
418 2017-11-20 David Malcolm <dmalcolm@redhat.com>
421 * c-decl.c: Include "c-family/known-headers.h".
422 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
424 (class suggest_missing_header): Move to known-header.h.
425 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
426 than get_c_name_hint.
428 2017-11-20 David Malcolm <dmalcolm@redhat.com>
430 * c-decl.c (get_c_name_hint): New function.
431 (class suggest_missing_header): New class.
432 (lookup_name_fuzzy): Call get_c_name_hint and use it to
433 suggest missing headers to the user.
435 2017-11-20 David Malcolm <dmalcolm@redhat.com>
437 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
438 Include "c-family/name-hint.h"
439 (implicit_decl_warning): Convert "hint" from
440 const char * to name_hint. Pass location to
441 lookup_name_fuzzy. Suppress any deferred diagnostic if the
442 warning was not printed.
443 (undeclared_variable): Likewise for "guessed_id".
444 (lookup_name_fuzzy): Convert return type from const char *
445 to name_hint. Add location_t param.
446 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
447 Include "c-family/name-hint.h"
448 (c_parser_declaration_or_fndef): Convert "hint" from
449 const char * to name_hint. Pass location to lookup_name_fuzzy.
450 (c_parser_parameter_declaration): Likewise.
452 2017-11-19 Jakub Jelinek <jakub@redhat.com>
456 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
458 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
459 handle_omp_array_sections): Likewise.
460 (digest_init): Don't call decl_constant_value_for_optimization.
461 * c-tree.h (decl_constant_value_for_optimization): Removed.
462 * c-fold.c (c_fold_array_ref): New function.
463 (c_fully_fold_internal): Add LVAL argument, propagate it through
464 recursive calls. For VAR_P call decl_constant_value and
465 unshare if not LVAL and either optimizing or IN_INIT. Remove
466 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
467 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
468 (c_fully_fold): Add LVAL argument, pass it through to
469 c_fully_fold_internal.
470 (decl_constant_value_for_optimization): Removed.
472 2017-11-15 Joseph Myers <joseph@codesourcery.com>
475 * c-parser.c (check_tgmath_function): New function.
476 (enum tgmath_parm_kind): New enum.
477 (c_parser_postfix_expression): Handle __builtin_tgmath.
479 2017-10-31 David Malcolm <dmalcolm@redhat.com>
481 * c-decl.c (implicit_decl_warning): Update for renaming of
482 pedwarn_at_rich_loc and warning_at_rich_loc.
483 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
484 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
485 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
486 (c_parser_struct_or_union_specifier): Likewise for renaming of
488 (c_parser_parameter_declaration): Likewise for renaming of
490 * c-typeck.c (build_component_ref): Likewise.
491 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
492 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
493 (set_init_label): Likewise for renaming of error_at_rich_loc.
495 2017-10-30 Richard Biener <rguenther@suse.de>
497 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
500 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
502 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
503 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
505 2017-10-25 David Malcolm <dmalcolm@redhat.com>
508 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
511 2017-10-25 Jakub Jelinek <jakub@redhat.com>
514 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
515 newdecl to corresponding __builtin_ if any.
517 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
520 * c-decl.c (diagnose_mismatched_decls): Use
521 OPT_Wbuiltin_declaration_mismatch.
523 2017-10-12 David Malcolm <dmalcolm@redhat.com>
525 * c-parser.c (c_parser_require): Add "type_is_unique" param and
526 use it to guard calls to maybe_suggest_missing_token_insertion.
527 (c_parser_parms_list_declarator): Override default value of new
528 "type_is_unique" param to c_parser_require.
529 (c_parser_asm_statement): Likewise.
530 * c-parser.h (c_parser_require): Add "type_is_unique" param,
533 2017-10-11 Nathan Sidwell <nathan@acm.org>
535 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
537 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
539 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
540 operating on trees as wide_ints.
541 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
542 (c_tree_equal): Likewise.
544 2017-10-04 David Malcolm <dmalcolm@redhat.com>
546 * c-decl.c (push_parm_decl): Store c_parm's location into the
548 (build_c_parm): Add "loc" param and store it within the c_parm.
549 * c-parser.c (struct c_parser): Add "last_token_location" field.
550 (c_parser_consume_token): Store location of the token into the
552 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
553 when handling a FUNCTION_DECL, if it doesn't already have them.
554 (c_parser_parameter_declaration): Generate a location for the
555 parameter, and pass it to the call to build_c_parm.
556 * c-tree.h (struct c_parm): Add field "loc".
557 (build_c_parm): Add location_t param.
558 * c-typeck.c (get_fndecl_argument_location): New function.
559 (inform_for_arg): New function.
560 (convert_for_assignment): Use inform_for_arg when dealing with
563 2017-09-29 Jakub Jelinek <jakub@redhat.com>
565 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
567 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
568 don't SET_DECL_C_BIT_FIELD here.
571 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
572 instead of trying to set just TREE_READONLY manually.
574 2017-09-16 Tom de Vries <tom@codesourcery.com>
577 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
580 2017-09-15 Joseph Myers <joseph@codesourcery.com>
583 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
585 (build_conditional_expr): For C11, generate result with excess
586 precision when one argument is an integer and the other is of a
587 type using excess precision.
589 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
591 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
593 2017-09-13 Marek Polacek <polacek@redhat.com>
596 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
597 than expr.original_type.
599 2017-09-12 Nathan Sidwell <nathan@acm.org>
601 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
602 resort_sorted_fields): Moved from c-family/c-common.c.
603 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
605 2017-09-01 Joseph Myers <joseph@codesourcery.com>
608 * c-typeck.c (build_atomic_assign): Handle argument with excess
609 precision. Ensure any EXCESS_PRECISION_EXPR is present in
610 argument passed to build_binary_op and convert_for_assignment but
611 not for call to c_fully_fold.
612 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
613 Ensure build_binary_op is called with argument with original
614 semantic type. Avoid calling c_fully_fold with an
615 EXCESS_PRECISION_EXPR from build_binary_op.
617 2017-09-01 Jakub Jelinek <jakub@redhat.com>
620 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
622 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
623 Alan Hayward <alan.hayward@arm.com>
624 David Sherwood <david.sherwood@arm.com>
626 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
627 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
628 m1 and m2 to the signed equivalent of a fixed-point
631 2017-08-24 David Malcolm <dmalcolm@redhat.com>
633 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
634 than CAN_HAVE_LOCATION_P when determining whether to use the
635 location_t value within "value".
637 2017-08-21 David Malcolm <dmalcolm@redhat.com>
639 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
640 rather than peeking the location of the first token.
641 * c-tree.h (c_expr::get_location): New method.
643 2017-08-21 David Malcolm <dmalcolm@redhat.com>
645 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
646 to check_function_arguments.
648 2017-08-18 Marek Polacek <polacek@redhat.com>
650 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
653 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
656 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
657 (check_bitfield_type_and_width): Don't allow bit-field with
658 warn_if_not_aligned type.
660 2017-08-14 Martin Sebor <msebor@redhat.com>
663 * c-objc-common.c (c_objc_common_init): Handle 'G'.
665 2017-08-11 Marek Polacek <polacek@redhat.com>
668 * c-decl.c (pushtag): Only print inform if the warning was printed.
669 (grokdeclarator): Likewise.
671 2017-08-10 David Malcolm <dmalcolm@redhat.com>
673 * c-parser.c (c_parser_error): Rename to...
674 (c_parser_error_richloc): ...this, making static, and adding
675 "richloc" parameter, passing it to the c_parse_error call,
676 rather than calling c_parser_set_source_position_from_token.
677 (c_parser_error): Reintroduce, reimplementing in terms of the
678 above, converting return type from void to bool.
679 (class token_pair): New class.
680 (struct matching_paren_traits): New struct.
681 (matching_parens): New typedef.
682 (struct matching_brace_traits): New struct.
683 (matching_braces): New typedef.
684 (get_matching_symbol): New function.
685 (c_parser_require): Add param MATCHING_LOCATION, using it to
686 highlight matching "opening" tokens for missing "closing" tokens.
687 (c_parser_skip_until_found): Likewise.
688 (c_parser_static_assert_declaration_no_semi): Convert explicit
689 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
690 class matching_parens, so that the pertinent open parenthesis is
691 highlighted when there are problems locating the close
693 (c_parser_struct_or_union_specifier): Likewise.
694 (c_parser_typeof_specifier): Likewise.
695 (c_parser_alignas_specifier): Likewise.
696 (c_parser_simple_asm_expr): Likewise.
697 (c_parser_braced_init): Likewise, for matching_braces.
698 (c_parser_paren_condition): Likewise, for matching_parens.
699 (c_parser_switch_statement): Likewise.
700 (c_parser_for_statement): Likewise.
701 (c_parser_asm_statement): Likewise.
702 (c_parser_asm_operands): Likewise.
703 (c_parser_cast_expression): Likewise.
704 (c_parser_sizeof_expression): Likewise.
705 (c_parser_alignof_expression): Likewise.
706 (c_parser_generic_selection): Likewise.
707 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
708 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
709 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
710 In case CPP_OPEN_PAREN, pass loc_open_paren to the
711 c_parser_skip_until_found call.
712 (c_parser_objc_class_definition): Use class matching_parens as
714 (c_parser_objc_method_decl): Likewise.
715 (c_parser_objc_try_catch_finally_statement): Likewise.
716 (c_parser_objc_synchronized_statement): Likewise.
717 (c_parser_objc_at_property_declaration): Likewise.
718 (c_parser_oacc_wait_list): Likewise.
719 (c_parser_omp_var_list_parens): Likewise.
720 (c_parser_omp_clause_collapse): Likewise.
721 (c_parser_omp_clause_default): Likewise.
722 (c_parser_omp_clause_if): Likewise.
723 (c_parser_omp_clause_num_threads): Likewise.
724 (c_parser_omp_clause_num_tasks): Likewise.
725 (c_parser_omp_clause_grainsize): Likewise.
726 (c_parser_omp_clause_priority): Likewise.
727 (c_parser_omp_clause_hint): Likewise.
728 (c_parser_omp_clause_defaultmap): Likewise.
729 (c_parser_oacc_single_int_clause): Likewise.
730 (c_parser_omp_clause_ordered): Likewise.
731 (c_parser_omp_clause_reduction): Likewise.
732 (c_parser_omp_clause_schedule): Likewise.
733 (c_parser_omp_clause_num_teams): Likewise.
734 (c_parser_omp_clause_thread_limit): Likewise.
735 (c_parser_omp_clause_aligned): Likewise.
736 (c_parser_omp_clause_linear): Likewise.
737 (c_parser_omp_clause_safelen): Likewise.
738 (c_parser_omp_clause_simdlen): Likewise.
739 (c_parser_omp_clause_depend): Likewise.
740 (c_parser_omp_clause_map): Likewise.
741 (c_parser_omp_clause_device): Likewise.
742 (c_parser_omp_clause_dist_schedule): Likewise.
743 (c_parser_omp_clause_proc_bind): Likewise.
744 (c_parser_omp_clause_uniform): Likewise.
745 (c_parser_omp_for_loop): Likewise.
746 (c_parser_cilk_clause_vectorlength): Likewise.
747 (c_parser_cilk_clause_linear): Likewise.
748 (c_parser_transaction_expression): Likewise.
749 * c-parser.h (c_parser_require): Add param matching_location with
750 default UNKNOWN_LOCATION.
751 (c_parser_error): Convert return type from void to bool.
752 (c_parser_skip_until_found): Add param matching_location with
753 default UNKNOWN_LOCATION.
755 2017-08-09 Marek Polacek <polacek@redhat.com>
757 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
758 * c-tree.h (build_external_ref): Update declaration.
759 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
760 (build_external_ref): Change the type of a parameter to bool.
761 (parser_build_binary_op): Use true/false instead of 1/0.
762 (pointer_diff): Likewise.
763 (build_modify_expr): Likewise.
764 (set_designator): Change the type of a parameter to bool.
765 (set_init_index): Use true/false instead of 1/0.
766 (set_init_label): Likewise.
767 (output_init_element): Change the type of a parameter to bool.
768 (output_pending_init_elements): Use true/false instead of 1/0.
769 (process_init_element): Likewise.
770 (build_binary_op): Change the type of a parameter to bool.
772 2017-08-09 Marek Polacek <polacek@redhat.com>
775 * c-typeck.c (pedwarn_init): Make the function take a variable list.
776 Call emit_diagnostic_valist instead of pedwarn.
777 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
778 Print the relevant types in diagnostics.
780 2017-08-09 Marek Polacek <polacek@redhat.com>
783 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
784 build_conditional_expr.
785 * c-parser.c (c_parser_conditional_expression): Create locations for
786 EXP1 and EXP2 from their source ranges. Pass the locations down to
787 build_conditional_expr.
788 * c-tree.h (build_conditional_expr): Update declaration.
789 * c-typeck.c (build_conditional_expr): Add location_t parameters.
790 For -Wsign-compare, also print the types.
792 2017-08-08 Martin Liska <mliska@suse.cz>
794 * c-convert.c: Include header files.
795 * c-typeck.c: Likewise.
797 2017-08-07 Martin Liska <mliska@suse.cz>
799 * c-parser.c (c_parser_attributes): Canonicalize name of an
802 2017-08-02 Marek Polacek <polacek@redhat.com>
805 * c-parser.c (c_parser_unary_expression): Use set_error.
809 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
810 warnings. Avoid walking MACRO_MAP_LOCATIONS.
812 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
813 Martin Liska <mliska@suse.cz>
815 * c-typeck.c (c_finish_goto_label): Build gimple predict
818 2017-07-31 Martin Liska <mliska@suse.cz>
821 * c-convert.c (convert): Guard condition with flag_sanitize_p
822 also with current_function_decl non-null equality.
823 * c-decl.c (grokdeclarator): Likewise.
824 * c-typeck.c (build_binary_op): Likewise.
826 2017-07-25 Marek Polacek <polacek@redhat.com>
828 * c-decl.c (grokfield): Remove local variable.
830 2017-07-25 Marek Polacek <polacek@redhat.com>
833 * c-parser.c (c_parser_else_body): Don't warn about multistatement
834 macro expansion if the body is in { }.
835 (c_parser_while_statement): Likewise.
836 (c_parser_for_statement): Likewise.
838 2017-07-18 Nathan Sidwell <nathan@acm.org>
840 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
842 2017-07-14 David Malcolm <dmalcolm@redhat.com>
844 * c-decl.c (implicitly_declare): When suggesting a missing
845 #include, provide a fix-it hint.
847 2017-07-06 David Malcolm <dmalcolm@redhat.com>
849 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
850 and call that instead.
851 * c-tree.h (selftest::run_c_tests): New decl.
853 2017-06-26 Marek Polacek <polacek@redhat.com>
856 * c-parser.c (c_parser_if_body): Set the location of the
857 body of the conditional after parsing all the labels. Call
858 warn_for_multistatement_macros.
859 (c_parser_else_body): Likewise.
860 (c_parser_switch_statement): Likewise.
861 (c_parser_while_statement): Likewise.
862 (c_parser_for_statement): Likewise.
863 (c_parser_statement): Add a default argument. Save the location
864 after labels have been parsed.
865 (c_parser_c99_block_statement): Likewise.
867 2017-06-19 Richard Biener <rguenther@suse.de>
869 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
870 negated _Literals to parse _Literal (int) -1.
872 2017-06-13 Martin Liska <mliska@suse.cz>
875 * c-convert.c (convert): Use sanitize_flags_p.
876 * c-decl.c (grokdeclarator): Likewise.
877 * c-typeck.c (convert_for_assignment): Likewise.
878 (c_finish_return): Likewise.
879 (build_binary_op): Likewise.
881 2017-06-08 Jakub Jelinek <jakub@redhat.com>
884 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
885 to sizetype before size_binop.
887 2017-06-07 Jakub Jelinek <jakub@redhat.com>
889 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
892 2017-06-06 Marek Polacek <polacek@redhat.com>
895 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
897 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
899 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
901 * c-parser.c (c_parser_binary_expression): Implement the
902 -Wsizeof_pointer_div warning.
903 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
904 from a parenthesized expression.
905 (c_parser_expr_list): Use c_last_sizeof_loc.
906 * c-tree.h (c_last_sizeof_loc): New external.
907 * c-typeck.c (c_last_sizeof_loc): New variable.
908 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
910 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
913 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
915 2017-05-30 David Malcolm <dmalcolm@redhat.com>
917 * c-objc-common.c (c_tree_printer): Gain bool and const char **
920 2017-05-24 Martin Sebor <msebor@redhat.com>
923 * c-fold.c (c_fully_fold_internal): Adjust.
924 * c-typeck.c (parser_build_unary_op): Adjust.
926 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
928 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
929 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
932 2017-05-23 Marek Polacek <polacek@redhat.com>
934 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
937 2017-05-22 Jakub Jelinek <jakub@redhat.com>
939 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
940 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
941 it returned invariant. Call tree_invariant_p unconditionally
942 afterwards to decide whether to return expr or op0.
944 2017-05-22 Nathan Sidwell <nathan@acm.org>
946 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
948 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
950 * c-parser.c (c_parser_omp_clause_default): Handle
951 "OMP_CLAUSE_DEFAULT_PRESENT".
953 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
955 * config-lang.in (gtfiles): Add c-family/c-format.c.
957 2017-05-18 Nathan Sidwell <nathan@acm.org>
959 * c-decl.c (pushdecl_top_level): Delete unused function.
961 2017-05-18 Marek Polacek <polacek@redhat.com>
963 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
964 (check_earlier_gotos): Likewise.
965 (define_label): Likewise.
966 (pending_xref_error): Likewise.
967 (smallest_type_quals_location): Likewise.
968 (grokdeclarator): Likewise.
969 (grokparms): Likewise.
970 (identifier_global_value): Likewise.
971 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
972 (find_init_member): Likewise.
974 2017-05-18 Marek Polacek <polacek@redhat.com>
976 * c-decl.c (start_decl): Use false/true instead of 0/1.
977 (grokdeclarator): Likewise.
978 (finish_struct): Likewise.
979 (start_function): Change the return type to bool. Use false/true
981 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
982 * c-tree.h (start_function): Update.
983 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
984 (set_designator): Change the return type to bool. Use false/true
987 2017-05-17 Marek Polacek <polacek@redhat.com>
989 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
990 * c-typeck.c: Likewise.
992 2017-05-17 Marek Polacek <polacek@redhat.com>
995 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
996 DECL_IGNORED_P even for non-static compound literals.
998 2017-05-17 Martin Liska <mliska@suse.cz>
1000 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1001 use it instead of int type.
1003 2017-05-17 Marek Polacek <polacek@redhat.com>
1005 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1007 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1008 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1009 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1010 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1012 (c_parser_conditional_expression): Likewise.
1013 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1014 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1015 (process_init_element): Likewise.
1016 (build_binary_op): Likewise.
1017 (handle_omp_array_sections_1): Likewise.
1019 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1021 * c-parser.c (c_parser_omp_clause_num_gangs)
1022 (c_parser_omp_clause_num_workers)
1023 (c_parser_omp_clause_vector_length): Merge functions into...
1024 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1027 2017-05-11 Nathan Sidwell <nathan@acm.org>
1029 * gimple-parser.c: Don't #include tree-dump.h.
1031 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1034 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1036 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1039 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1040 incorrect __MEM syntax.
1042 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1045 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1048 2017-05-09 Nathan Sidwell <nathan@acm.org>
1050 * c-tree.h (pushdecl): Declare.
1052 2017-05-05 David Malcolm <dmalcolm@redhat.com>
1054 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1055 with diagnostic_report_diagnostic.
1056 * c-errors.c (pedwarn_c99): Likewise.
1057 (pedwarn_c90): Likewise.
1059 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1062 * c-gimplify.c (c_gimplify_expr): Remove calls to
1063 cilk_gimplifY_call_params_in_spawned_fn.
1065 2017-04-25 David Malcolm <dmalcolm@redhat.com>
1067 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1068 hint for removing extra semicolon.
1070 2017-04-21 Jakub Jelinek <jakub@redhat.com>
1073 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1074 enabled, set specs->type to integer_type_node.
1076 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
1078 * c-array-notation.c: Fix typo in comment.
1080 2017-03-29 Marek Polacek <polacek@redhat.com>
1083 * c-decl.c (finish_decl): Check VAR_P.
1085 2017-03-27 Jakub Jelinek <jakub@redhat.com>
1088 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1089 * c-typeck.c (c_mark_addressable): Likewise. Look through
1090 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1092 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1094 2017-03-23 Marek Polacek <polacek@redhat.com>
1096 * c-tree.h: Remove a C_RID_YYCODE reference.
1098 2017-03-21 Jakub Jelinek <jakub@redhat.com>
1101 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1102 optional COMPOUND_EXPR with ubsan instrumentation.
1104 2017-03-17 Marek Polacek <polacek@redhat.com>
1106 * c-parser.c: Add C11 references.
1108 2017-03-15 Marek Polacek <polacek@redhat.com>
1110 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1112 2017-03-11 Marek Polacek <polacek@redhat.com>
1114 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1116 2017-03-10 David Malcolm <dmalcolm@redhat.com>
1118 PR translation/79848
1119 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1121 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1123 2017-03-09 Marek Polacek <polacek@redhat.com>
1126 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1127 parameter declarations with initializers.
1129 2017-03-09 Jakub Jelinek <jakub@redhat.com>
1132 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1135 2017-03-07 Jakub Jelinek <jakub@redhat.com>
1138 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1139 for "may only be used in compound statements" diagnostics, change it
1140 such that the same translatable string is used for all pragmas. For
1141 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1143 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1144 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1145 "may only be used in compound statements" diagnostics, such that the
1146 same translatable string is used for all pragmas.
1148 2017-03-04 Marek Polacek <polacek@redhat.com>
1151 * c-decl.c (implicit_decl_warning): Add missing space.
1153 2017-03-03 Marek Polacek <polacek@redhat.com>
1156 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1157 current_function_prototype_arg_types is error_mark_node. Fix
1158 formatting. Use TREE_VALUE instead of TREE_TYPE.
1160 2017-03-03 Jakub Jelinek <jakub@redhat.com>
1163 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1164 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1165 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1169 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1170 instead of %<_Generic>.
1171 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1172 (c_parser_omp_target_exit_data): Use %<release%> instead of
1175 2017-02-28 Jakub Jelinek <jakub@redhat.com>
1177 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1178 instead of just cond ? "..." : "...".
1179 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1180 for "enter"/"exit" keyword.
1181 (c_finish_oacc_routine): Don't use %s to supply portions of the
1184 2017-02-24 Jakub Jelinek <jakub@redhat.com>
1187 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1188 handle -Wrestrict here.
1189 * c-typeck.c (build_function_call_vec): Adjust
1190 check_function_arguments caller.
1192 2017-02-23 Richard Biener <rguenther@suse.de>
1195 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1196 to initialize c_exprs to return.
1197 (c_parser_gimple_binary_expression): Likewise.
1198 (c_parser_gimple_unary_expression): Likewise.
1199 (c_parser_gimple_postfix_expression): Likewise.
1201 2017-02-22 Marek Polacek <polacek@redhat.com>
1204 * c-typeck.c (convert_arguments): Handle error_mark_node.
1206 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1208 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1209 value of c_parser_parse_ssa_name against error_mark_node and emit
1210 error if ssa name is anonymous and written as default definition.
1212 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1214 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1217 2017-02-16 Jakub Jelinek <jakub@redhat.com>
1220 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1221 ignore #pragma omp target even when not followed by identifier.
1223 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1225 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1226 (c_parser_gimple_unary_expression): Likewise.
1228 2017-02-13 Jakub Jelinek <jakub@redhat.com>
1230 * c-parser.c (c_parser_oacc_declare): Add missing space in
1233 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1236 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1237 set_c_expr_source_range when parsing ssa-name.
1239 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1240 Richard Biener <rguenther@suse.de>
1242 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1243 building IL when arguments are error_mark_node.
1244 (c_parser_gimple_unary_expression): Likewise.
1245 (c_parser_gimple_if_stmt): Likewise.
1246 (c_parser_gimple_switch_stmt): Likewise.
1247 (c_parser_gimple_return_stmt): Likewise.
1248 (c_parser_parse_ssa_name): When name lookup fails do not build
1249 an SSA name. Use undeclared rather than not declared in error
1252 2017-02-09 Marek Polacek <polacek@redhat.com>
1255 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1256 instead of c_parser_skip_until_found.
1258 2017-02-09 Jakub Jelinek <jakub@redhat.com>
1261 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1262 symtab_node::get on automatic variables.
1264 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1265 Chung-Lin Tang <cltang@codesourcery.com>
1267 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1268 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1270 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1272 2017-02-07 Richard Biener <rguenther@suse.de>
1274 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1275 (c_parser_gimple_postfix_expression_after_primary):
1276 Do not use c_build_function_call_vec to avoid folding and promotion.
1279 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1282 * c-decl.c (pop_scope): Pass main_input_filename to
1283 build_translation_unit_decl.
1285 2017-01-24 David Malcolm <dmalcolm@redhat.com>
1287 * c-parser.c: Include "read-rtl-function.h" and
1289 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1290 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1291 production. Update for renaming of field "gimple_pass" to
1292 "gimple_or_rtl_pass". If __RTL was seen, call
1293 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1294 to an auto_timevar, to cope with early exit.
1295 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1296 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1297 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1299 (c_parser_parse_rtl_body): New function.
1300 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1301 (struct c_declspecs): Rename field "gimple_pass" to
1302 "gimple_or_rtl_pass". Add field "rtl_p".
1303 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1304 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1305 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1306 (c_parser_gimple_or_rtl_pass_list): ...this.
1308 2017-01-20 Marek Polacek <polacek@redhat.com>
1311 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1313 2017-01-13 Richard Biener <rguenther@suse.de>
1315 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1318 2017-01-13 Richard Biener <rguenther@suse.de>
1320 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1321 _Literal ( type-name ) number.
1323 2017-01-12 Richard Biener <rguenther@suse.de>
1325 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1328 2017-01-11 Jakub Jelinek <jakub@redhat.com>
1331 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1334 2017-01-11 Richard Biener <rguenther@suse.de>
1337 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1338 returns on parse errors.
1340 2017-01-04 Marek Polacek <polacek@redhat.com>
1343 * c-parser.c (c_parser_postfix_expression): Mark zero character
1344 constants by setting original_type in c_expr.
1345 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1346 with a zero character constant.
1347 (char_type_p): New function.
1349 2017-01-04 David Malcolm <dmalcolm@redhat.com>
1351 * c-parser.c (c_parser_declaration_or_fndef): Create a
1352 rich_location at init_loc and parse it to start_init.
1353 (last_init_list_comma): New global.
1354 (c_parser_braced_init): Update last_init_list_comma when parsing
1355 commas. Pass it to pop_init_level. Pass location of closing
1356 brace to pop_init_level.
1357 (c_parser_postfix_expression_after_paren_type): Create a
1358 rich_location at type_loc and parse it to start_init.
1359 (c_parser_omp_declare_reduction): Likewise for loc.
1360 * c-tree.h (start_init): Add rich_location * param.
1361 (pop_init_level): Add location_t param.
1362 * c-typeck.c (struct initializer_stack): Add field
1363 "missing_brace_richloc".
1364 (start_init): Add richloc param, use it to initialize
1365 the stack node's missing_brace_richloc.
1366 (last_init_list_comma): New decl.
1367 (finish_implicit_inits): Pass last_init_list_comma to
1369 (push_init_level): When finding missing open braces, add fix-it
1370 hints to the richloc.
1371 (pop_init_level): Add "insert_before" param and pass it
1372 when calling pop_init_level. Add fixits about missing
1373 close braces to any richloc. Use the richloc for the
1374 -Wmissing-braces warning.
1375 (set_designator): Pass last_init_list_comma to pop_init_level.
1376 (process_init_element): Likewise.
1378 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1380 Update copyright years.
1382 2016-12-21 Jakub Jelinek <jakub@redhat.com>
1385 * c-typeck.c (build_function_call_vec): If check_function_arguments
1386 returns true, set TREE_NO_WARNING on CALL_EXPR.
1389 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1390 to *expr instead of overwriting it.
1392 2016-12-20 Richard Biener <rguenther@suse.de>
1394 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1396 (c_parser_gimple_statement): Only build assigns for non-error
1398 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1400 2016-12-14 Martin Jambor <mjambor@suse.cz>
1402 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1404 (c_finish_oacc_routine): Adjusted call to
1405 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1406 to use their new names.
1407 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1409 (c_parser_oacc_update): Likewise.
1410 (c_parser_omp_simd): Likewise.
1411 (c_parser_omp_target_update): Likewise.
1412 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1413 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1415 (c_finish_omp_cancellation_point): Likewise.
1416 * gimple-parser.c: Do not include omp-low.h
1418 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1419 James Norris <jnorris@codesourcery.com>
1421 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1422 EXIT_DATA,WAIT} are not used in compound statements.
1423 (c_parser_oacc_enter_exit_data): Update diagnostics.
1425 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1428 * c-decl.c (diagnose_mismatched_decls): Use
1429 OPT_Wbuiltin_declaration_mismatch here too.
1431 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
1432 Alan Hayward <alan.hayward@arm.com>
1433 David Sherwood <david.sherwood@arm.com>
1435 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1436 (make_label, finish_struct): Likewise.
1438 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
1439 Richard Biener <rguenther@suse.de>
1441 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1442 * config-lang.in (gtfiles): Add c/c-parser.h.
1443 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1444 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1445 * c-parser.c (enum c_id_kind, struct c_token,
1446 c_parser_next_token_is, c_parser_next_token_is_not,
1447 c_parser_next_token_is_keyword,
1448 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1450 * c-parser.h: ... new header.
1451 * c-parser.c: Include c-parser.h and gimple-parser.h.
1452 (c_parser_peek_token, c_parser_peek_2nd_token,
1453 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1454 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1455 c_parser_error, c_parser_require, c_parser_skip_until_found,
1456 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1457 c_parser_type_name): Export.
1458 (c_parser_tokens_buf): New function.
1459 (c_parser_error): Likewise.
1460 (c_parser_set_error): Likewise.
1461 (c_parser_declspecs): Handle RID_GIMPLE.
1462 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1463 via c_parser_parse_gimple_body.
1464 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1465 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1466 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1467 c_parser_error, c_parser_require, c_parser_skip_until_found,
1468 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1469 c_parser_type_name): Declare.
1470 (struct c_parser): Declare forward.
1471 (c_parser_tokens_buf): Declare.
1472 (c_parser_error): Likewise.
1473 (c_parser_set_error): Likewise.
1474 * gimple-parser.c: New file.
1475 * gimple-parser.h: Likewise.
1477 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1480 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1483 2016-09-11 Le-Chun Wu <lcwu@google.com>
1484 Mark Wielaard <mjw@redhat.com>
1486 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1487 to the given -Wshadow= variant.
1489 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1491 * c-typeck.c: Include memmodel.h.
1493 2016-10-13 Jakub Jelinek <jakub@redhat.com>
1496 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1497 instead of lhd_return_null_tree_v.
1499 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1502 * c-decl.c (smallest_type_quals_location): New static function.
1503 (grokdeclarator): Try to find the correct location for an ignored
1506 2016-09-26 Marek Polacek <polacek@redhat.com>
1509 * c-decl.c (pop_scope): Add gcc_fallthrough.
1511 2016-09-26 Marek Polacek <polacek@redhat.com>
1514 * c-parser.c (struct c_token): Add flags field.
1515 (c_lex_one_token): Pass it to c_lex_with_flags.
1516 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1517 into IFN_FALLTHROUGH.
1518 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1519 attribute fallthrough after a case label or default label.
1520 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1522 2016-09-24 Marek Polacek <polacek@redhat.com>
1525 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1526 have boolean value. Warn about ++/-- on booleans.
1528 2016-09-23 Jakub Jelinek <jakub@redhat.com>
1530 * c-parser.c (incomplete_record_decls): Remove unnecessary
1531 = vNULL initialization of file scope vec.
1533 2016-09-16 Marek Polacek <polacek@redhat.com>
1535 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1537 2016-09-14 Marek Polacek <polacek@redhat.com>
1539 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1540 (fix_array_notation_expr): Likewise.
1541 * c-decl.c (finish_decl): Likewise.
1542 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1543 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1544 (function_to_pointer_conversion): Use false instead of 0.
1545 (convert_lvalue_to_rvalue): Likewise.
1546 (parser_build_unary_op): Likewise.
1547 (build_atomic_assign): Likewise.
1548 (build_unary_op): Change nonconvert parameter type to bool, use
1549 true/false instead of 1/0.
1550 (build_binary_op): Use true instead of 1.
1552 2016-09-13 David Malcolm <dmalcolm@redhat.com>
1554 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1555 of add_fixit_insert to add_fixit_insert_before.
1557 2016-09-13 Marek Polacek <polacek@redhat.com>
1559 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1562 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1565 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1566 COMPOUND_EXPR to warn_for_omitted_condop.
1568 2016-09-07 David Malcolm <dmalcolm@redhat.com>
1570 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1571 c_get_substring_location for this new langhook.
1573 2016-09-02 Jakub Jelinek <jakub@redhat.com>
1576 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1578 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1579 instead of mark_exp_read on low_bound/length expression.
1580 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1581 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1582 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1583 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1584 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1585 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1586 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1587 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1588 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1589 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1590 instead of mark_expr_read.
1591 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1592 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1593 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1594 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1595 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1596 array section bases outside of depend clause, for depend clause
1597 use convert_lvalue_to_rvalue on the base.
1598 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1599 linear, aligned, map, to and from clauses.
1600 (c_omp_clause_copy_ctor): New function.
1602 2016-09-01 Marek Polacek <polacek@redhat.com>
1605 * c-typeck.c (composite_type): Add FALLTHRU comment.
1607 2016-08-31 David Malcolm <dmalcolm@redhat.com>
1609 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1610 to the insertion fixits for "struct", "union", and "enum".
1612 2016-08-30 David Malcolm <dmalcolm@redhat.com>
1614 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1615 rather than add_fixit_misspelled_id.
1616 (undeclared_variable): Likewise.
1617 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1618 now-redundant "here" params from add_fixit_insert method calls.
1619 (c_parser_parameter_declaration): Likewise.
1620 * c-typeck.c (build_component_ref): Remove now-redundant range
1621 param from add_fixit_replace method calls.
1623 2016-08-25 Marek Polacek <polacek@redhat.com>
1625 * c-typeck.c (parser_build_binary_op): Pass LHS to
1626 warn_logical_not_parentheses.
1628 2016-08-25 Marek Polacek <polacek@redhat.com>
1631 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1632 or _FloatN or _FloatNx is not supported.
1633 (finish_declspecs): Set type to integer_type_node when _FloatN or
1634 _FloatNx is not supported.
1636 2016-08-19 Joseph Myers <joseph@codesourcery.com>
1639 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1640 (struct c_declspecs): Add field floatn_nx_idx.
1641 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1642 and _FloatNx type specifiers.
1643 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1644 (c_parser_declspecs, c_parser_attribute_any_word)
1645 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1646 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1647 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1648 narrower than double.
1650 2016-08-12 Jakub Jelinek <jakub@redhat.com>
1651 Martin Liska <mliska@suse.cz>
1654 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1655 % to determine val element to change. Assert that
1656 wchar_bytes * charwidth fits into val array.
1658 2016-08-12 Marek Polacek <polacek@redhat.com>
1661 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1662 (c_parser_postfix_expression): Likewise.
1663 * c-typeck.c (build_unary_op): Adjust fall through comment.
1664 (c_mark_addressable): Likewise.
1666 2016-08-11 Jakub Jelinek <jakub@redhat.com>
1669 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1670 array member through typedef, for orig_qual_indirect == 0 clear
1673 2016-08-08 David Malcolm <dmalcolm@redhat.com>
1676 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1677 this up to selftest::run_c_tests.
1678 (selftest::run_c_tests): New function.
1680 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1682 * c-parser.c (struct oacc_routine_data): Add error_seen and
1683 fndecl_seen members.
1684 (c_finish_oacc_routine): Use these.
1685 (c_parser_declaration_or_fndef): Adjust.
1686 (c_parser_oacc_routine): Likewise. Support more C language
1687 constructs, and improve diagnostics. Move pragma context
1689 (c_parser_pragma): ... here.
1691 * c-parser.c (struct oacc_routine_data): New.
1692 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1694 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1695 declare target" attribute.
1697 2016-08-01 Jan Beulich <jbeulich@suse.com>
1699 * c-fold.c (c_fully_fold_internal): Also emit shift count
1700 warnings for vector types.
1701 * c-typeck.c (build_binary_op): Likewise.
1703 2016-07-29 Marek Polacek <polacek@redhat.com>
1706 * c-decl.c (finish_struct): Rephrase an error message.
1709 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1710 to error node for invalid code.
1713 * c-decl.c (implicitly_declare): Return decl early not only for
1714 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1716 2016-07-29 Jakub Jelinek <jakub@redhat.com>
1719 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1720 on GNU extern inline functions.
1722 2016-07-29 Marek Polacek <polacek@redhat.com>
1725 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1728 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
1730 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1732 2016-07-20 David Malcolm <dmalcolm@redhat.com>
1734 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1736 (best_macro_match): Likewise, converting from a typedef to a
1738 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1739 (lookup_name_fuzzy): Update for change of best_macro_match to a
1740 subclass with a ctor that calls cpp_forall_identifiers.
1742 2016-07-20 David Malcolm <dmalcolm@redhat.com>
1744 * c-decl.c (implicit_decl_warning): Update for conversion of
1745 return type of lookup_name_fuzzy to const char *.
1746 (undeclared_variable): Likewise.
1747 (lookup_name_fuzzy): Convert return type from tree to
1749 * c-parser.c (c_parser_declaration_or_fndef): Update for
1750 conversion of return type of lookup_name_fuzzy to const char *.
1751 (c_parser_parameter_declaration): Likewise.
1753 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1755 * c-parser.c (c_parser_oacc_declare): Don't scan for
1757 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1758 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1759 zero-length subarrays.
1761 2016-07-15 Jakub Jelinek <jakub@redhat.com>
1764 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1765 instead of FUZZY_LOOKUP_NAME.
1766 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1767 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1769 2016-07-14 Jakub Jelinek <jakub@redhat.com>
1772 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1774 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1776 * c-parser.c (c_parser_generic_selection): Make type of variable
1778 (c_parser_omp_declare_simd): Likewise.
1780 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1782 * c-decl.c (struct c_struct_parse_info): Change member types
1783 from vec to auto_vec.
1784 (start_struct): Adjust.
1785 (finish_struct): Likewise.
1787 2016-07-02 Jakub Jelinek <jakub@redhat.com>
1790 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1792 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1794 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1795 Move pragma context checking into...
1796 (c_parser_omp_cancellation_point): ... here, and improve
1797 diagnostic messages.
1798 * c-typeck.c (c_finish_omp_cancel)
1799 (c_finish_omp_cancellation_point): Improve diagnostic messages.
1801 2016-06-29 Jakub Jelinek <jakub@redhat.com>
1804 * c-typeck.c (c_build_qualified_type): Don't clear
1805 C_TYPE_INCOMPLETE_VARS for the main variant.
1807 2016-06-28 Martin Sebor <msebor@redhat.com>
1810 * c-typeck.c (output_init_element): Diagnose incompatible types
1811 before non-constant initializers.
1813 2016-06-28 Jakub Jelinek <jakub@redhat.com>
1815 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1817 2016-06-23 Andi Kleen <ak@linux.intel.com>
1819 * Make-lang.in: Add support for autofdo.
1821 2016-06-22 David Malcolm <dmalcolm@redhat.com>
1824 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1825 (implicit_decl_warning): When issuing warnings for implicit
1826 declarations, attempt to provide a suggestion via
1828 (undeclared_variable): Likewise when issuing errors.
1829 (lookup_name_in_scope): Likewise.
1830 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1831 (best_macro_match): New typedef.
1832 (find_closest_macro_cpp_cb): New function.
1833 (lookup_name_fuzzy): New function.
1834 * c-parser.c: Include gcc-rich-location.h.
1835 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1836 (c_keyword_starts_typename): ...this new function.
1837 (c_parser_declaration_or_fndef): When issuing errors about
1838 missing "struct" etc, add a fixit. For other kinds of errors,
1839 attempt to provide a suggestion via lookup_name_fuzzy.
1840 (c_parser_parms_declarator): When looking ahead to detect typos in
1841 type names, also reject CPP_KEYWORD.
1842 (c_parser_parameter_declaration): When issuing errors about
1843 unknown type names, attempt to provide a suggestion via
1845 * c-tree.h (c_keyword_starts_typename): New prototype.
1847 2016-06-20 Joseph Myers <joseph@codesourcery.com>
1850 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1851 c_common_type returns error_mark_node.
1853 2016-06-19 Martin Sebor <msebor@redhat.com>
1856 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1857 __alignof__ (expression).
1859 2016-06-14 David Malcolm <dmalcolm@redhat.com>
1861 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1863 2016-06-14 David Malcolm <dmalcolm@redhat.com>
1865 * c-typeck.c (build_component_ref): Simplify fixit code by
1866 using gcc_rich_location::add_fixit_misspelled_id.
1867 (set_init_label): Likewise.
1869 2016-06-13 David Malcolm <dmalcolm@redhat.com>
1871 * c-parser.c (c_parser_initelt): Provide location of name for new
1872 location_t param of set_init_label.
1873 * c-tree.h (set_init_label): Add location_t param.
1874 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1875 param and use it when issuing error messages about unrecognized
1876 field names. Attempt to provide a fixit hint if appropriate,
1877 otherwise update the error message to provide the type name.
1879 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1882 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1885 2016-06-08 Martin Sebor <msebor@redhat.com>
1886 Jakub Jelinek <jakub@redhat.com>
1890 * c-typeck.c (convert_arguments): Don't promote last argument
1891 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1893 2016-06-08 Marek Polacek <polacek@redhat.com>
1896 * c-decl.c (grokdeclarator): Check TYPE_P.
1899 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1902 2016-06-07 David Malcolm <dmalcolm@redhat.com>
1904 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1905 and structure element reference, capture the location of the
1906 element name token and pass it to build_component_ref.
1907 (c_parser_postfix_expression_after_primary): Likewise for
1908 structure element dereference.
1909 (c_parser_omp_variable_list): Likewise for
1910 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1911 * c-tree.h (build_component_ref): Add location_t param.
1912 * c-typeck.c (build_component_ref): Add location_t param
1913 COMPONENT_LOC. Use it, if available, when issuing hints about
1914 mispelled member names to provide a fixit replacement hint.
1916 2016-06-06 Marek Polacek <polacek@redhat.com>
1919 * c-parser.c (c_parser_direct_declarator): Set location.
1921 2016-06-06 Marek Polacek <polacek@redhat.com>
1923 * c-typeck.c (comptypes_internal): Handle comparisons of
1924 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1925 TYPE_REF_CAN_ALIAS_ALL.
1927 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1929 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1930 arguments as addressable when async clause exists.
1932 2016-05-30 Jakub Jelinek <jakub@redhat.com>
1935 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1936 when combined with target construct.
1938 2016-05-26 Jakub Jelinek <jakub@redhat.com>
1940 * c-parser.c (c_parser_omp_clause_schedule): Warn if
1941 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1943 2016-05-25 Marek Polacek <polacek@redhat.com>
1946 * c-decl.c (c_make_fname_decl): Don't check seen_error.
1949 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1951 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
1953 * c-parser.c (c_parser_oacc_declare): Add support for
1954 GOMP_MAP_FIRSTPRIVATE_POINTER.
1955 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1956 argument with enum c_omp_region_type ort.
1957 (handle_omp_array_sections): Likewise. Update call to
1958 handle_omp_array_sections_1.
1959 (c_finish_omp_clauses): Add specific errors and warning messages for
1960 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
1961 call to handle_omp_array_sections.
1963 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
1965 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1967 2016-05-24 Richard Biener <rguenther@suse.de>
1971 * c-typeck.c (build_array_ref): Do not complain about indexing
1972 non-lvalue vectors. Adjust for function name change.
1974 2016-05-20 Martin Sebor <msebor@redhat.com>
1977 * c-typeck.c (error_init): Use
1978 expansion_point_location_if_in_system_header.
1979 (warning_init): Same.
1981 2016-05-19 David Malcolm <dmalcolm@redhat.com>
1984 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
1986 (c_parser_postfix_expression): Likewise.
1987 * c-tree.h (c_expr::set_error): New method.
1988 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
1989 that result's range is initialized.
1991 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
1993 * c-typeck.c (parser_build_unary_op): Fix formatting.
1995 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
1997 * c-decl.c (grokdeclarator): Remove errmsg and use of
1998 targetm.invalid_return_type.
1999 (grokparms): Remove errmsg and use of
2000 targetm.invalid_parameter_type.
2002 2016-05-13 Joseph Myers <joseph@codesourcery.com>
2004 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2005 function return type.
2007 2016-05-12 Marek Polacek <polacek@redhat.com>
2010 * c-decl.c (build_compound_literal): Pass LOC down to
2011 c_incomplete_type_error.
2012 * c-tree.h (require_complete_type): Adjust declaration.
2013 (c_incomplete_type_error): Likewise.
2014 * c-typeck.c (require_complete_type): Add location parameter, pass it
2015 down to c_incomplete_type_error.
2016 (c_incomplete_type_error): Add location parameter, pass it down to
2018 (build_component_ref): Pass location down to c_incomplete_type_error.
2019 (default_conversion): Pass location down to require_complete_type.
2020 (build_array_ref): Likewise.
2021 (build_function_call_vec): Likewise.
2022 (convert_arguments): Likewise.
2023 (build_unary_op): Likewise.
2024 (build_c_cast): Likewise.
2025 (build_modify_expr): Likewise.
2026 (convert_for_assignment): Likewise.
2027 (c_finish_omp_clauses): Likewise.
2029 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2032 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2034 * c-errors.c (pedwarn_c90): Return true if warned.
2035 * c-tree.h (pedwarn_c90): Change return type to bool.
2036 (enum c_declspec_word): Add new enumerator cdw_atomic.
2038 2016-05-11 Marek Polacek <polacek@redhat.com>
2041 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2042 diagnose_mismatched_attributes and call it.
2044 2016-05-10 Marek Polacek <polacek@redhat.com>
2047 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2048 on a declaration following the definition.
2050 2016-05-05 Jakub Jelinek <jakub@redhat.com>
2052 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2053 parse it through to c_parser_c99_block_statement.
2054 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2057 2016-05-04 Marek Polacek <polacek@redhat.com>
2059 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2062 2016-05-04 Marek Polacek <polacek@redhat.com>
2065 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2066 for macro expansions.
2068 2016-05-03 Marek Polacek <polacek@redhat.com>
2071 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2072 check_builtin_function_arguments.
2074 2016-05-03 Richard Biener <rguenther@suse.de>
2076 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2077 the checksum from the previous stage.
2079 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2081 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2082 c_finish_omp_clauses.
2083 (c_parser_omp_all_clauses): Likewise.
2084 (c_parser_oacc_cache): Likewise.
2085 (c_parser_oacc_loop): Likewise.
2086 (omp_split_clauses): Likewise.
2087 (c_parser_omp_declare_target): Likewise.
2088 (c_parser_cilk_all_clauses): Likewise.
2089 (c_parser_cilk_for): Likewise.
2090 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2091 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2093 2016-05-02 Marek Polacek <polacek@redhat.com>
2096 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2099 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2102 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2103 OACC_LOOP_CLAUSE_MASK.
2104 (c_parser_oacc_kernels_parallel): Update call to
2105 c_oacc_split_loop_clauses.
2107 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
2109 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2110 argument to build_modify_expr in two cases.
2112 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2114 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2115 warn_for_memset instead of warning directly here.
2117 2016-04-26 Marek Polacek <polacek@redhat.com>
2120 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2122 (c_parser_for_statement): ... here.
2123 (c_parser_if_statement): Use it.
2124 (c_parser_switch_statement): Use it.
2125 (c_parser_while_statement): Use it.
2128 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2130 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2133 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2134 instead of c_finish_cilk_clauses.
2135 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2136 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2137 floating-point variables in the linear clause for Cilk Plus.
2139 2016-04-18 Michael Matz <matz@suse.de>
2141 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2142 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2144 2016-04-15 Marek Polacek <polacek@redhat.com>
2147 * c-typeck.c (build_unary_op): Pass location down to error and
2150 2016-04-15 Jakub Jelinek <jakub@redhat.com>
2153 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2155 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2156 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2157 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2158 Adjust c_parser_pragma callers.
2159 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2161 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2163 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2164 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2165 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2166 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2167 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2168 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2169 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2170 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2172 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2173 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2176 2016-04-13 Marek Polacek <polacek@redhat.com>
2179 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2181 (c_parser_statement): Likewise.
2182 (c_parser_c99_block_statement): Likewise.
2183 (c_parser_while_statement): Likewise.
2184 (c_parser_for_statement): Likewise.
2185 (c_parser_if_body): Don't set IF_P here.
2186 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2187 about dangling else here.
2188 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2189 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2190 warn about dangling else here.
2192 2016-04-04 Marek Polacek <polacek@redhat.com>
2195 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2197 2016-03-31 Marek Polacek <polacek@redhat.com>
2200 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2202 2016-03-18 David Malcolm <dmalcolm@redhat.com>
2205 * c-parser.c (c_parser_postfix_expression): Set the source range
2206 for uses of "__builtin_types_compatible_p".
2208 2016-03-17 Jakub Jelinek <jakub@redhat.com>
2211 * c-typeck.c (composite_type): Don't count void_list_node
2212 into len, if the list is terminated by void_list_node, start
2213 with void_list_node instead of NULL for newargs. Stop
2216 2016-03-16 Marek Polacek <polacek@redhat.com>
2219 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2220 nested functions returning VM types.
2222 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2224 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2225 when calling c_finish_omp_clauses.
2227 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2230 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2233 2016-03-04 Marek Polacek <polacek@redhat.com>
2236 * c-parser.c (c_parser_postfix_expression): Call
2237 c_parser_cast_expression rather than c_parser_postfix_expression.
2239 2016-03-01 Jakub Jelinek <jakub@redhat.com>
2243 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2244 of incomplete decls to error_mark_node.
2246 2016-02-24 Marek Polacek <polacek@redhat.com>
2249 * c-decl.c (finish_decl): Don't update the copy of the type of a
2250 different decl type.
2252 2016-02-23 Jakub Jelinek <jakub@redhat.com>
2255 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2256 in id_kind reclassification.
2258 2016-02-16 Jakub Jelinek <jakub@redhat.com>
2261 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2263 2016-02-16 James Norris <jnorris@codesourcery.com>
2266 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2268 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2270 * c-decl.c (build_null_declspecs): Zero the entire struct.
2273 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2274 callers changed. If nested_p is true, use it to call
2275 finish_implicit_inits.
2276 * c-tree.h (finish_implicit_inits): Declare.
2277 * c-typeck.c (finish_implicit_inits): New function. Move code
2279 (push_init_level): ... here.
2280 (set_designator, process_init_element): Call finish_implicit_inits.
2282 2016-02-11 Jakub Jelinek <jakub@redhat.com>
2285 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2286 arguments for -Waddress warning.
2288 2016-02-04 Jakub Jelinek <jakub@redhat.com>
2291 * c-decl.c (finish_enum): When honoring mode attribute,
2292 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2294 2016-01-29 Jakub Jelinek <jakub@redhat.com>
2297 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2298 all type variants, not just TYPE_MAIN_VARIANT.
2300 2016-01-27 Jakub Jelinek <jakub@redhat.com>
2303 * c-decl.c (c_write_global_declarations_1): Warn with
2304 warn_unused_function if static prototype without definition
2307 2016-01-27 Marek Polacek <polacek@redhat.com>
2310 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2311 to unsigned, if needed. Add -Wsign-compare warning.
2313 2016-01-26 Jakub Jelinek <jakub@redhat.com>
2315 PR tree-optimization/69483
2316 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2318 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2321 * c-tree.h (incomplete_record_decls): Declare.
2322 * c-parser.c (incomplete_record_decls): Define.
2323 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2324 report error if any decl has zero size.
2325 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2326 or enum type to incomplete_record_decls.
2328 2016-01-14 Tom de Vries <tom@codesourcery.com>
2330 PR tree-optimization/68773
2331 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2334 2016-01-14 Marek Polacek <polacek@redhat.com>
2337 * c-decl.c (grokdeclarator): Provide more information for invalid
2340 2016-01-06 David Malcolm <dmalcolm@redhat.com>
2342 * c-parser.c (c_parser_unary_expression): For dereferences, build
2343 a combined location before calling build_indirect_ref, so that
2344 error reports cover the full range, manually updating the c_expr
2347 2016-01-06 Marek Polacek <polacek@redhat.com>
2350 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2351 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2354 2016-01-04 Jakub Jelinek <jakub@redhat.com>
2356 Update copyright years.
2358 2016-01-04 Marek Polacek <polacek@redhat.com>
2361 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2362 optimization to use __atomic_fetch_* built-in if possible.
2364 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2366 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2368 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2371 2015-12-22 Marek Polacek <polacek@redhat.com>
2374 * c-typeck.c (build_component_ref): Warn when acessing elements of
2375 atomic structures or unions.
2377 2015-12-21 David Malcolm <dmalcolm@redhat.com>
2379 * c-typeck.c: Include "gcc-rich-location.h".
2380 (build_binary_op): In the two places that call binary_op_error,
2381 create a gcc_rich_location and populate it with the location of
2382 the binary op and its two operands.
2384 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2386 * c-parser.c (c_parser_statement_after_labels): When calling
2387 c_finish_return, Use the return expression's location if it has
2388 one, falling back to the location of the first token within it.
2389 * c-typeck.c (c_finish_return): When issuing warnings about
2390 the incorrect presence/absence of a return value, issue a note
2391 showing the declaration of the function.
2393 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2395 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2397 (c_parser_peek_nth_token): New function.
2398 (c_parser_peek_conflict_marker): New function.
2399 (c_parser_error): Detect conflict markers and report them as such.
2401 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2403 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2404 to preserve range information for the primary expression
2405 in the call to c_parser_postfix_expression_after_primary.
2407 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2409 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2410 expression location, falling back on the first token location,
2411 rather than always using the latter.
2413 2015-12-16 Marek Polacek <polacek@redhat.com>
2416 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2419 2015-12-15 Marek Polacek <polacek@redhat.com>
2422 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2425 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2427 * c-parser.c (c_parser_alignof_expression): Capture location of
2428 closing parenthesis (if any), or of end of unary expression, and
2429 use it to build a src_range for the expression.
2431 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2434 * c-parser.c (c_parser_get_builtin_args): Add
2435 "out_close_paren_loc" param, and write back to it.
2436 (c_parser_postfix_expression): Capture the closing
2437 parenthesis location for RID_CHOOSE_EXPR,
2438 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2439 RID_BUILTIN_SHUFFLE and use it to set the source range
2440 for such expressions; within RID_BUILTIN_COMPLEX set
2441 the underlying location.
2443 2015-12-07 Marek Polacek <polacek@redhat.com>
2446 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2447 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2449 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2451 * c-tree.h (c_build_va_arg): Adjust prototype.
2452 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2453 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2454 parameter, adjust throughout and issue an error if EXPR is a component
2455 with reverse storage order.
2457 2015-12-02 Jason Merrill <jason@redhat.com>
2459 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2460 (c_fully_fold_internal, decl_constant_value_for_optimization):
2461 Move from c-common.c.
2462 * c-tree.h: Declare decl_constant_value_for_optimization.
2463 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2465 2015-12-02 Joseph Myers <joseph@codesourcery.com>
2468 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2469 following link from declarator to next declarator. Track original
2470 qualified type and pass it to c_build_qualified_type.
2471 * c-typeck.c (c_build_qualified_type): Add arguments
2472 orig_qual_type and orig_qual_indirect.
2474 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2476 * c-parser.c (c_parser_omp_clause_name)
2477 (c_parser_oacc_all_clauses): Alphabetical sorting.
2479 2015-12-02 Jakub Jelinek <jakub@redhat.com>
2482 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2485 2015-12-01 Julian Brown <julian@codesourcery.com>
2486 Cesar Philippidis <cesar@codesourcery.com>
2487 James Norris <James_Norris@mentor.com>
2489 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2490 (c_parser_oacc_clause_use_device): New function.
2491 (c_parser_oacc_all_clauses): Add use_device support.
2492 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2493 (c_parser_oacc_host_data): New function.
2494 (c_parser_omp_construct): Add host_data support.
2495 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2496 * c-typeck.c (c_finish_oacc_host_data): New function.
2497 (c_finish_omp_clauses): Add use_device support.
2499 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
2502 * c-decl.c: Set TYPE_PACKED in variants.
2504 2015-11-27 Martin Liska <mliska@suse.cz>
2507 * c-array-notation.c (fix_builtin_array_notation_fn):
2508 Use release_vec_vec instead of vec::release.
2509 (build_array_notation_expr): Likewise.
2510 (fix_conditional_array_notations_1): Likewise.
2511 (fix_array_notation_expr): Likewise.
2512 (fix_array_notation_call_expr): Likewise.
2514 2015-11-27 Jakub Jelinek <jakub@redhat.com>
2517 * c-parser.c (c_parser_compound_statement_nostart): If
2518 last_label is true, use pragma_stmt instead of pragma_compound
2519 as second c_parser_pragma argument.
2520 (c_parser_omp_ordered, c_parser_omp_target_update,
2521 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2522 false as second argument to c_parser_skip_to_pragma_eol after
2523 diagnosing standalone directives used in pragma_stmt context.
2525 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2527 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2528 with "if (ENABLE_OFFLOADING)".
2530 2015-11-23 David Malcolm <dmalcolm@redhat.com>
2533 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2534 for various Objective-C constructs: Class.name syntax,
2535 @selector(), @protocol(), @encode(), and [] message syntax.
2537 2015-11-20 David Malcolm <dmalcolm@redhat.com>
2540 * c-typeck.c (should_suggest_deref_p): New function.
2541 (build_component_ref): Special-case POINTER_TYPE when
2542 generating a "not a structure of union" error message, and
2543 suggest a "->" rather than a ".", providing a fix-it hint.
2545 2015-11-19 David Malcolm <dmalcolm@redhat.com>
2547 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2548 candidate into a new function, find_closest_identifier.
2550 2015-11-19 Marek Polacek <polacek@redhat.com>
2553 * c-typeck.c (parser_build_binary_op): Properly handle
2554 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2556 2015-11-17 David Malcolm <dmalcolm@redhat.com>
2558 * c-parser.c (set_c_expr_source_range): Bulletproof both
2559 overloaded implementations against NULL expr->value.
2560 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2562 (c_parser_unary_expression): Likewise when handling addresses of
2564 (c_parser_postfix_expression): Likewise for statement expressions,
2565 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2566 __builtin_va_arg, and for __builtin_offset_of.
2567 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2568 src_range using the range of the braced initializer.
2569 (c_parser_transaction_expression): Set src_range for "ret" to a
2570 sane pair of values.
2572 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2574 * c-parser.c (c_finish_omp_declare_simd): Look for
2575 "simd" attribute as well. Update error message.
2577 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2579 * c-parser.c (c_parser_omp_declare_target): Adjust.
2581 2015-11-14 Jakub Jelinek <jakub@redhat.com>
2583 * c-typeck.c (c_finish_omp_clauses): Don't mark
2584 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2586 2015-11-14 Marek Polacek <polacek@redhat.com>
2588 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2589 * c-typeck.c: Likewise.
2591 2015-11-13 David Malcolm <dmalcolm@redhat.com>
2593 * c-decl.c (warn_defaults_to): Pass line_table to
2595 * c-errors.c (pedwarn_c99): Likewise.
2596 (pedwarn_c90): Likewise.
2597 * c-parser.c (set_c_expr_source_range): New functions.
2598 (c_token::get_range): New method.
2599 (c_token::get_finish): New method.
2600 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2601 based on the range from the start of the LHS to the end of the
2603 (c_parser_conditional_expression): Likewise, based on the range
2604 from the start of the cond.value to the end of exp2.value.
2605 (c_parser_binary_expression): Call set_c_expr_source_range on
2606 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2607 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2608 based on the cast_loc through to the end of the expr.
2609 (c_parser_unary_expression): Likewise, based on the
2610 op_loc through to the end of op.
2611 (c_parser_sizeof_expression) Likewise, based on the start of the
2612 sizeof token through to either the closing paren or the end of
2614 (c_parser_postfix_expression): Likewise, using the token range,
2615 or from the open paren through to the close paren for
2616 parenthesized expressions.
2617 (c_parser_postfix_expression_after_primary): Likewise, for
2618 various kinds of expression.
2619 * c-tree.h (struct c_expr): Add field "src_range".
2620 (c_expr::get_start): New method.
2621 (c_expr::get_finish): New method.
2622 (set_c_expr_source_range): New decls.
2623 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2624 on ret for prefix unary ops.
2625 (parser_build_binary_op): Likewise, running from the start of
2626 arg1.value through to the end of arg2.value.
2628 2015-11-13 Marek Polacek <polacek@redhat.com>
2631 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2633 2015-11-13 David Malcolm <dmalcolm@redhat.com>
2635 * c-typeck.c: Include spellcheck.h.
2636 (lookup_field_fuzzy_find_candidates): New function.
2637 (lookup_field_fuzzy): New function.
2638 (build_component_ref): If the field was not found, try using
2639 lookup_field_fuzzy and potentially offer a suggestion.
2641 2015-11-12 James Norris <jnorris@codesourcery.com>
2642 Joseph Myers <joseph@codesourcery.com>
2644 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2645 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2646 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2647 and PRAGMA_OMP_CLAUSE_LINK.
2648 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2649 and PRAGMA_OACC_CLAUSE_LINK.
2650 (OACC_DECLARE_CLAUSE_MASK): New definition.
2651 (c_parser_oacc_declare): New function.
2653 2015-11-12 Marek Polacek <polacek@redhat.com>
2656 * c-parser.c (c_parser_for_statement): Reclassify the token in
2659 2015-11-11 Marek Polacek <polacek@redhat.com>
2663 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2664 checking the size of an array.
2666 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
2668 * c-array-notation.c: Remove unused header files.
2669 * c-aux-info.c: Likewise.
2670 * c-convert.c: Likewise.
2671 * c-decl.c: Likewise.
2672 * c-errors.c: Likewise.
2673 * c-lang.c: Likewise.
2674 * c-objc-common.c: Likewise.
2675 * c-parser.c: Likewise.
2676 * c-typeck.c: Likewise.
2677 * gccspec.c: Likewise.
2679 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2680 Cesar Philippidis <cesar@codesourcery.com>
2681 James Norris <jnorris@codesourcery.com>
2682 Julian Brown <julian@codesourcery.com>
2683 Nathan Sidwell <nathan@codesourcery.com>
2686 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2688 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2689 (c_parser_pragma): Parse 'acc routine'.
2690 (OACC_ROUTINE_CLAUSE_MARK): Define.
2691 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2693 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2696 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2697 location of the backward-goto to the start of the loop body.
2699 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2702 * c-parser.c (c_parser_while_statement): Finish the loop before
2703 parsing ahead for misleading indentation.
2704 (c_parser_for_statement): Likewise.
2706 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2708 * c-decl.c (finish_struct): If the structure has reverse storage
2709 order, rewrite the type of array fields with scalar component. Call
2710 maybe_apply_pragma_scalar_storage_order on entry.
2711 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2712 errors on bit-fields and reverse SSO here and not...
2713 (c_mark_addressable): ...here.
2714 (output_init_element): Adjust call to initializer_constant_valid_p.
2715 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2717 2015-11-06 David Malcolm <dmalcolm@redhat.com>
2719 * c-decl.c (warn_defaults_to): Update for change in signature
2720 of diagnostic_set_info.
2721 * c-errors.c (pedwarn_c99): Likewise.
2722 (pedwarn_c90): Likewise.
2723 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2724 for textinfo::set_location.
2726 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2727 Thomas Schwinge <thomas@codesourcery.com>
2728 James Norris <jnorris@codesourcery.com>
2730 * c-parser.c (c_parser_omp_clause_name): Add support for
2731 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2732 (c_parser_omp_clause_default): Add is_oacc argument. Handle
2733 default(none) in OpenACC.
2734 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2736 (c_parser_oacc_clause_tile): New function.
2737 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2738 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2739 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2741 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2742 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2744 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2745 (c_parser_oacc_update): Update the error message for missing clauses.
2746 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2747 and OMP_CLAUSE_INDEPENDENT.
2749 2015-11-05 Marek Polacek <polacek@redhat.com>
2752 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2753 deal with pre-evaluation on invalid types.
2755 2015-11-05 Jakub Jelinek <jakub@redhat.com>
2756 Ilya Verbin <ilya.verbin@intel.com>
2758 * c-parser.c: Include context.h and gimple-expr.h.
2759 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2760 monotonic together with nonmonotonic.
2761 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
2762 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2763 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2764 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2765 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
2766 expressions on combined target teams before the target.
2767 (c_parser_omp_declare_target): If decl has "omp declare target" or
2768 "omp declare target link" attribute, and cgraph or varpool node already
2769 exists, then set corresponding flags. Call c_finish_omp_clauses
2770 in the parenthesized extended-list syntax case.
2771 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2773 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2774 on OMP_CLAUSE_REDUCTION array sections.
2775 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2776 into the constant offset, or for variable low-bound using
2777 POINTER_PLUS_EXPR. For structure element based array sections use
2778 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2779 (c_finish_omp_clauses): Drop generic_field_head, structure
2780 elements are now always mapped even as array section bases,
2781 diagnose same var in data sharing and mapping clauses. Diagnose if
2782 linear step on declare simd is neither a constant nor a uniform
2783 parameter. Look through POINTER_PLUS_EXPR for array section
2784 reductions. Diagnose the same var or function appearing multiple
2785 times on the same directive. Fix up wording for the to clause if t
2786 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
2787 modifier on kinds other than dynamic or guided or nonmonotonic
2788 modifier together with ordered clause.
2790 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2791 Chung-Lin Tang <cltang@codesourcery.com>
2793 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2795 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
2797 * c-array-notation.c: Reorder #include's and remove duplicates.
2798 * c-aux-info.c: Likewise.
2799 * c-convert.c: Likewise.
2800 * c-decl.c: Likewise.
2801 * c-errors.c: Likewise.
2802 * c-lang.c: Likewise.
2803 * c-objc-common.c: Likewise.
2804 * c-parser.c: Likewise.
2805 * c-typeck.c: Likewise.
2807 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
2810 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2811 after calling build_qualified_type.
2813 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2814 Thomas Schwinge <thomas@codesourcery.com>
2815 James Norris <jnorris@codesourcery.com>
2816 Joseph Myers <joseph@codesourcery.com>
2817 Julian Brown <julian@codesourcery.com>
2818 Bernd Schmidt <bschmidt@redhat.com>
2820 * c-parser.c (c_parser_oacc_shape_clause): New.
2821 (c_parser_oacc_simple_clause): New.
2822 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2823 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2825 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2826 James Norris <jnorris@codesourcery.com>
2827 Cesar Philippidis <cesar@codesourcery.com>
2831 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2832 parameters, and handle these. Adjust all users.
2833 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2835 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2837 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2839 (c_finish_omp_construct): Declare function.
2840 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2841 Merge functions into...
2842 (c_finish_omp_construct): ... this new function.
2844 2015-10-22 Richard Biener <rguenther@suse.de>
2846 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2847 before folding a MINUS_EXPR.
2849 2015-10-21 Marek Polacek <polacek@redhat.com>
2852 * c-decl.c (start_function): Warn about vararg functions without
2855 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2857 * c-typeck.c (build_conditional_expr): Use boolean vector
2858 type for vector comparison.
2859 (build_vec_cmp): New.
2860 (build_binary_op): Use build_vec_cmp for comparison.
2862 2015-10-20 Marek Polacek <polacek@redhat.com>
2864 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2866 2015-10-20 Marek Polacek <polacek@redhat.com>
2869 * c-parser.c (c_parser_attributes): Break out of the loop if the
2870 token after an attribute isn't a comma.
2872 2015-10-13 Jakub Jelinek <jakub@redhat.com>
2873 Aldy Hernandez <aldyh@redhat.com>
2875 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2876 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2877 (c_parser_omp_variable_list): Handle structure elements for
2878 map, to and from clauses. Handle array sections in reduction
2879 clause. Formatting fixes.
2880 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2881 if clause modifiers.
2882 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2883 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2884 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2885 c_parser_omp_clause_is_device_ptr): New functions.
2886 (c_parser_omp_clause_ordered): Parse optional parameter.
2887 (c_parser_omp_clause_reduction): Handle array reductions.
2888 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2889 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2891 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2892 (c_parser_omp_clause_depend_sink): New function.
2893 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2894 (c_parser_omp_clause_map): Parse release/delete map kinds and
2895 optional always modifier.
2896 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2897 and c_finish_omp_clauses callers.
2898 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
2899 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2900 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2901 (OMP_CRITICAL_CLAUSE_MASK): Define.
2902 (c_parser_omp_critical): Parse critical clauses.
2903 (c_parser_omp_for_loop): Handle doacross loops, adjust
2904 c_finish_omp_for and c_finish_omp_clauses callers.
2905 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2906 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2907 (OMP_FOR_CLAUSE_MASK): Add linear clause.
2908 (c_parser_omp_for): Disallow ordered clause when combined with
2909 distribute. Disallow linear clause when combined with distribute
2910 and not combined with simd.
2911 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2912 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2913 parse clauses and if depend clause is found, don't parse a body.
2914 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2915 Allow target parallel without for after it.
2916 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2917 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2918 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2920 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2921 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2922 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2923 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2925 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2926 defaultmap and is_device_ptr clauses.
2927 (c_parser_omp_target): Parse target parallel and target simd. Set
2928 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
2929 and target exit data. Diagnose invalid map kinds.
2930 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2931 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2933 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2935 (OMP_TASKLOOP_CLAUSE_MASK): Define.
2936 (c_parser_omp_taskloop): New function.
2937 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2938 handle PRAGMA_OMP_TASKLOOP.
2939 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2940 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2941 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2942 Add IS_OMP argument, handle structure element bases, diagnose
2943 bitfields, pass IS_OMP recursively, diagnose known zero length
2944 array sections in depend clauses, handle array sections in reduction
2945 clause, diagnose negative length even for pointers.
2946 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2947 types, pass IS_OMP down to handle_omp_array_sections_1, handle
2948 array sections in reduction clause, set
2949 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2950 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2951 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2952 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2954 2015-10-06 Marek Polacek <polacek@redhat.com>
2956 * c-parser.c (c_parser_statement_after_labels): Use
2957 protected_set_expr_location.
2958 (c_parser_omp_clause_num_gangs): Likewise.
2959 (c_parser_omp_clause_num_threads): Likewise.
2960 (c_parser_omp_clause_num_workers): Likewise.
2961 (c_parser_omp_clause_vector_length): Likewise.
2962 (c_parser_omp_clause_num_teams): Likewise.
2963 (c_parser_omp_clause_thread_limit): Likewise.
2964 * c-typeck.c (build_c_cast): Likewise.
2965 (c_cast_expr): Likewise.
2967 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2969 * c-typeck.c (c_tree_equal): Use real_equal instead of
2972 2015-10-04 Jason Merrill <jason@redhat.com>
2974 * c-parser.c (c_lex_one_token): Handle @synchronized.
2975 * c-decl.c (match_builtin_function_types): A declaration of a built-in
2976 can change whether the function is transaction_safe.
2978 2015-10-02 Marek Polacek <polacek@redhat.com>
2981 * c-typeck.c (convert_for_assignment): Use the expansion point
2982 location throughout.
2984 2015-10-02 Marek Polacek <polacek@redhat.com>
2987 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
2988 and pass it down to c_parser_if_statement.
2989 (c_parser_else_body): Add CHAIN parameter and pass it down to
2990 c_parser_statement_after_labels.
2991 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
2992 duplicated if-else-if conditions.
2994 2015-10-01 Marek Polacek <polacek@redhat.com>
2996 * c-typeck.c (convert_for_assignment): Improve commentary.
2998 2015-09-30 Marek Polacek <polacek@redhat.com>
3001 * c-typeck.c (c_finish_return): Use the expansion point location for
3002 certain "return with value" warnings.
3004 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3006 * c-parser.c (pragma_lex): Add loc argument.
3008 2015-09-15 Marek Polacek <polacek@redhat.com>
3011 * c-decl.c (tag_exists_p): New function.
3012 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3013 struct/union/enum keywords are missing.
3014 * c-tree.h (tag_exists_p): Declare.
3016 2015-09-15 Marek Polacek <polacek@redhat.com>
3018 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3019 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3020 Return NULL_TREE instead of 0.
3021 (lookup_name): Return NULL_TREE instead of 0.
3022 (lookup_name_in_scope): Likewise.
3023 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3024 (parser_xref_tag): Use false instead of 0.
3025 (start_struct): Use true instead of 1.
3026 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3028 2015-09-14 Marek Polacek <polacek@redhat.com>
3030 * c-typeck.c (set_nonincremental_init_from_string): Use
3031 HOST_WIDE_INT_M1U when shifting a negative value.
3033 2015-09-09 Mark Wielaard <mjw@redhat.com>
3035 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3038 2015-09-10 Jakub Jelinek <jakub@redhat.com>
3041 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3042 into OMP_FOR_PRE_BODY rather than before the loop.
3044 2015-09-09 Jakub Jelinek <jakub@redhat.com>
3047 * c-parser.c (c_parser_oacc_all_clauses,
3048 c_parser_omp_all_clauses): Remove invalid clause from
3049 list of clauses even if parser->error is set.
3052 * c-parser.c (c_parser_omp_clause_aligned,
3053 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3055 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3059 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3060 instead of c_parser_unary_expression. If the result is !lvalue_p,
3061 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3063 2015-09-04 Marek Polacek <polacek@redhat.com>
3066 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3068 2015-09-03 Martin Sebor <msebor@redhat.com>
3071 * c-typeck.c (convert_arguments, parser_build_unary_op,
3072 build_conditional_expr, c_cast_expr, convert_for_assignment,
3073 build_binary_op, _objc_common_truthvalue_conversion): Call
3075 (c_decl_implicit): Define.
3077 2015-09-02 Marek Polacek <polacek@redhat.com>
3080 * c-parser.c (c_parser_enum_specifier): Give a better error for
3083 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3085 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3087 2015-08-12 Marek Polacek <polacek@redhat.com>
3089 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3092 2015-08-03 Marek Polacek <polacek@redhat.com>
3095 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3097 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3099 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3101 * c-parser.c (c_parser_if_body): Take token_indent_info
3102 argument. Call warn_for_misleading_indentation even when the
3103 body is a semicolon. Extract token_indent_infos corresponding
3104 to the guard, body and next tokens. Adjust call to
3105 warn_for_misleading_indentation accordingly.
3106 (c_parser_else_body): Likewise.
3107 (c_parser_if_statement): Likewise.
3108 (c_parser_while_statement): Likewise.
3109 (c_parser_for_statement): Likewise.
3111 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3112 Manuel López-Ibáñez <manu@gcc.gnu.org>
3114 * c-decl.c (get_parm_info): Remove static var. Update warning
3117 2015-07-27 Marek Polacek <polacek@redhat.com>
3121 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3123 2015-07-20 Marek Polacek <polacek@redhat.com>
3126 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3127 (build_binary_op): Warn about left shift overflows.
3129 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
3131 * c-array-notation.c: Adjust includes for flags.h changes.
3132 * c-objc-common.c: Likewise.
3134 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
3136 * c-array-notation.c: Adjust includes.
3137 * c-aux-info.c: Likewise.
3138 * c-convert.c: Likewise.
3139 * c-decl.c: Likewise.
3140 * c-errors.c: Likewise.
3141 * c-lang.c: Likewise.
3142 * c-objc-common.c: Likewise.
3143 * c-parser.c: Likewise.
3144 * c-typeck.c: Likewise.
3146 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3149 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3151 2015-06-29 Marek Polacek <polacek@redhat.com>
3154 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3155 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3156 about -Wswitch-bool here.
3157 (do_case): Update c_add_case_label call.
3158 (c_finish_case): Update c_do_switch_warnings call.
3160 2015-06-27 Marek Polacek <polacek@redhat.com>
3162 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3164 2015-06-26 Marek Polacek <polacek@redhat.com>
3166 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3168 * c-typeck.c (array_to_pointer_conversion): Likewise.
3169 (build_unary_op): Likewise.
3170 (c_finish_return): Likewise.
3172 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
3174 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3175 * c-parser.c: Likewise.
3177 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3179 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3180 instead of pointer_hash.
3181 (detect_field_duplicates): Likewise.
3183 2015-06-25 Marek Polacek <polacek@redhat.com>
3185 * c-array-notation.c: Use VAR_P throughout.
3186 * c-decl.c: Likewise.
3187 * c-objc-common.c: Likewise.
3188 * c-parser.c: Likewise.
3189 * c-typeck.c: Likewise.
3191 2015-06-25 Marek Polacek <polacek@redhat.com>
3193 * c-decl.c: Use is_global_var throughout.
3194 * c-parser.c: Likewise.
3195 * c-typeck.c: Likewise.
3197 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
3199 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3200 * c-aux-info.c: Likewise.
3201 * c-convert.c: Likewise.
3202 * c-decl.c: Likewise.
3203 * c-errors.c: Likewise.
3204 * c-lang.c: Likewise.
3205 * c-objc-common.c: Likewise.
3206 * c-parser.c: Likewise.
3207 * c-typeck.c: Likewise.
3209 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
3212 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3215 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3217 * c-decl.c (pop_scope): Register the main translation unit
3218 through the new debug hook.
3220 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
3222 * c-array-notation.c : Adjust include files.
3223 * c-aux-info.c : Likewise.
3224 * c-convert.c : Likewise.
3225 * c-decl.c : Likewise.
3226 * c-errors.c : Likewise.
3227 * c-lang.c : Likewise.
3228 * c-lang.h : Likewise.
3229 * c-objc-common.c : Likewise.
3230 * c-parser.c : Likewise.
3231 * c-typeck.c : Likewise.
3233 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
3235 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3236 immediately clobber it.
3237 (c_write_global_declarations_1): Remove call to
3238 check_global_declaration_1.
3239 (c_write_global_declarations_2): Remove.
3240 (c_write_final_cleanups): Rename from c_write_global_declarations.
3241 Remove call to finalize_compilation_unit.
3242 Remove calls to debugging hooks.
3243 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3244 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3245 * c-tree.h: Remove c_write_global_declarations.
3247 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
3249 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3250 * c-aux-info.c: Likewise.
3251 * c-convert.c: Likewise.
3252 * c-decl.c: Likewise.
3253 * c-errors.c: Likewise.
3254 * c-lang.c: Likewise.
3255 * c-objc-common.c: Likewise.
3256 * c-parser.c: Likewise.
3257 * c-typeck.c: Likewise.
3259 2015-06-04 Marek Polacek <polacek@redhat.com>
3262 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3265 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3267 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3268 Warn for empty struct.
3269 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3271 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3273 * c-decl.c (start_function): Call plugin before parsing.
3274 (finish_function): Call plugin after parsing.
3276 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3279 * c-decl.c (merge_decls): Merge DECL_COMMON.
3281 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
3283 * Make-lang.in (check_gcc_pallelize): Define.
3285 2015-05-22 Marek Polacek <polacek@redhat.com>
3288 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3291 2015-05-21 Marek Polacek <polacek@redhat.com>
3293 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3296 2015-05-20 Marek Polacek <polacek@redhat.com>
3298 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3299 * c-typeck.c: Likewise.
3301 2015-05-19 Marek Polacek <polacek@redhat.com>
3303 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3305 2015-05-19 Jakub Jelinek <jakub@redhat.com>
3308 * c-parser.c (c_parser_omp_for_loop): Don't add
3309 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3310 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3311 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3314 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3316 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
3319 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3322 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3325 2015-05-14 Marek Polacek <polacek@redhat.com>
3329 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3332 2015-05-12 David Malcolm <dmalcolm@redhat.com>
3334 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3335 to add a call to warn_for_misleading_indentation.
3336 (c_parser_else_body): Likewise, adding param "else_loc".
3337 (c_parser_if_statement): Check for misleading indentation.
3338 (c_parser_while_statement): Likewise.
3339 (c_parser_for_statement): Likewise.
3341 2015-05-08 Marek Polacek <polacek@redhat.com>
3344 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3345 (output_init_element): Likewise.
3347 2015-05-07 Marek Polacek <polacek@redhat.com>
3350 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3353 2015-04-30 Marek Polacek <polacek@redhat.com>
3355 * c-typeck.c (set_init_label): Call error_at instead of error and
3358 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3361 * c-typeck.c (c_build_va_arg): Clarify the error message.
3363 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3365 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3366 OMP_STANDALONE_CLAUSES.
3368 2015-04-28 Marek Polacek <polacek@redhat.com>
3370 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3372 2015-04-28 Marek Polacek <polacek@redhat.com>
3375 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3377 2015-04-25 Marek Polacek <polacek@redhat.com>
3380 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3383 2015-04-23 Marek Polacek <polacek@redhat.com>
3386 * c-decl.c (set_labels_context_r): New function.
3387 (store_parm_decls): Call it via walk_tree_without_duplicates.
3388 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3389 instead of create_tmp_var. Build TARGET_EXPR instead of
3391 (build_atomic_assign): Use create_tmp_var_raw instead of
3392 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3394 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3396 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3397 (c_parser_omp_target_update): Add missed %> to error_at ().
3399 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3402 * c-decl.c (c_default_pointer_mode): Remove definition.
3403 * c-tree.h (c_default_pointer_mode): Remove declaration.
3405 2015-03-27 Tobias Burnus <burnus@net-b.de>
3408 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3410 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3411 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3412 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3414 2015-03-19 Jakub Jelinek <jakub@redhat.com>
3416 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3417 attribute for DECL_EXTERNAL VAR_DECLs.
3419 2015-03-11 Jakub Jelinek <jakub@redhat.com>
3421 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3424 2015-03-10 Jakub Jelinek <jakub@redhat.com>
3427 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3428 before preparing arguments to warn_logical_not_parentheses.
3430 2015-03-09 Jakub Jelinek <jakub@redhat.com>
3433 * c-typeck.c (parser_build_binary_op): Don't warn for
3434 !!x == y or !b == y where b is _Bool.
3436 2015-03-09 Marek Polacek <polacek@redhat.com>
3438 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3439 * c-decl.c (grokdeclarator): Likewise.
3440 * c-typeck.c (build_binary_op): Likewise.
3442 2015-02-27 Marek Polacek <polacek@redhat.com>
3445 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3447 2015-02-14 Marek Polacek <polacek@redhat.com>
3450 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3451 declared through a typedef name.
3453 2015-02-13 Marek Polacek <polacek@redhat.com>
3456 * c-decl.c (grokdeclarator): Print also the type when giving
3457 the error message about array's incomplete element type.
3459 2015-02-11 Jakub Jelinek <jakub@redhat.com>
3462 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3463 check in the POP macro.
3465 2015-02-09 Marek Polacek <polacek@redhat.com>
3468 * c-typeck.c (process_init_element): Don't always wrap
3469 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3470 initializing a range of elements.
3472 2015-02-04 Jakub Jelinek <jakub@redhat.com>
3476 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3478 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
3480 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3481 processing enum declaration.
3483 2015-01-29 Marek Polacek <polacek@redhat.com>
3486 * c-typeck.c (pop_init_level): If constructor_elements has
3487 exactly one element with integer_zerop value, set constructor_zeroinit
3488 to 1. Remove braces around warning_init call.
3490 2015-01-27 Jakub Jelinek <jakub@redhat.com>
3493 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3494 of FUNCTION_DECLs with error_mark_node.
3496 2015-01-26 Jakub Jelinek <jakub@redhat.com>
3499 * c-typeck.c (convert_arguments): Return -1 if there are
3500 error_args, even if we've diagnosed too many arguments.
3502 2015-01-21 Richard Biener <rguenther@suse.de>
3505 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3506 for builtins the user declared correctly.
3508 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3509 Bernd Schmidt <bernds@codesourcery.com>
3510 Cesar Philippidis <cesar@codesourcery.com>
3511 James Norris <jnorris@codesourcery.com>
3512 Jakub Jelinek <jakub@redhat.com>
3513 Ilmir Usmanov <i.usmanov@samsung.com>
3515 * c-parser.c: Include "gomp-constants.h".
3516 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3517 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3518 Use OMP_CLAUSE_SET_MAP_KIND.
3519 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3520 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3521 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3522 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3523 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3524 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3525 "copyout", "create", "delete", "deviceptr", "gang", "host",
3526 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3527 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3528 "present_or_create", "pcreate", "seq", "self", "vector",
3529 "vector_length", "wait", "worker".
3530 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3531 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3532 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3533 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3534 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3535 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3536 (c_parser_oacc_data_clause_deviceptr)
3537 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3538 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3539 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3540 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3541 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3542 (c_parser_oacc_parallel, c_parser_oacc_update)
3543 (c_parser_oacc_wait): New functions.
3544 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3545 (c_finish_oacc_data): New prototypes.
3546 * c-typeck.c: Include "gomp-constants.h".
3547 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3548 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3549 OMP_CLAUSE_SET_MAP_KIND.
3550 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3551 (c_finish_oacc_data): New functions.
3552 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3553 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3554 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3555 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3556 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3557 GOMP_MAP_FORCE_DEVICEPTR.
3559 2015-01-09 Michael Collison <michael.collison@linaro.org>
3561 * c-array-notation.c: Include hash-set.h, machmode.h,
3562 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3563 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3564 * c-aux-info.c: Ditto.
3565 * c-convert.c: Ditto.
3567 * c-errors.c: Ditto.
3568 * c-lang.c: Dittoxs.
3569 * c-objc-common.c: Ditto.
3570 * c-parser.c: Ditto.
3571 * c-typeck.c: Include hash-set.h, machmode.h,
3572 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3573 fold-const.h, wide-int.h, inchash.h, real.h and
3574 fixed-value.h due to flattening of tree.h.
3576 2015-01-07 Marek Polacek <polacek@redhat.com>
3579 * c-typeck.c (process_init_element): Disallow initialization of
3580 a flexible array member with a string constant if the structure
3583 2015-01-05 Jakub Jelinek <jakub@redhat.com>
3586 * c-typeck.c (convert_for_assignment, c_finish_return): For
3587 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3588 types also set in_late_binary_op around convert call.
3589 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3590 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3591 result on expr as last argument to ubsan_instrument_float_cast,
3592 if in_late_binary_op, don't use c_save_expr but save_expr.
3594 Update copyright years.
3596 2015-01-05 Marek Polacek <polacek@redhat.com>
3599 * c-typeck.c (build_array_ref): Pass loc down to
3600 warn_array_subscript_with_type_char.
3602 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
3604 * c-typeck.c: New behavious for pointers to arrays with qualifiers
3605 (common-pointer-type): For pointers to arrays take qualifiers from
3607 (build_conditional_expr): Add warnings for lost qualifiers.
3608 (comp-target-types): Allow pointers to arrays with different qualifiers.
3609 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
3610 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
3611 to PEDWARN_FOR_QUALIFIERS.
3613 2014-12-17 Jakub Jelinek <jakub@redhat.com>
3616 * c-convert.c: Include ubsan.h.
3617 (convert): For real -> integral casts and
3618 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3619 instead instrument the float cast directly.
3621 2014-11-29 Jakub Jelinek <jakub@redhat.com>
3623 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3624 c_finish_stmt_expr): Remove NULL last argument from
3625 create_tmp_var_raw and create_tmp_var calls.
3626 * c-array-notation.c (fix_builtin_array_notation_fn,
3627 build_array_notation_expr, fix_conditional_array_notations_1,
3628 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3630 2014-11-28 Marek Polacek <polacek@redhat.com>
3633 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3634 convert the right operand to integer type.
3636 2014-11-25 Marek Polacek <polacek@redhat.com>
3639 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3640 for inline functions.
3642 2014-11-21 Jakub Jelinek <jakub@redhat.com>
3645 * c-typeck.c (build_array_ref): Adjust
3646 convert_vector_to_pointer_for_subscript caller. If it returns true,
3647 call non_lvalue_loc on the result.
3649 2014-11-11 Richard Biener <rguenther@suse.de>
3651 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3654 2014-11-10 Andi Kleen <ak@linux.intel.com>
3657 * c-parser.c (c_parser_statement_after_labels): Call
3659 (c_parser_if_statement): Dito.
3660 (c_parser_switch_statement): Dito.
3661 (c_parser_while_statement): Dito.
3662 (c_parser_do_statement): Dito.
3663 (c_parser_for_statement): Dito.
3664 * c-typeck.c (c_finish_loop): Dito.
3666 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3668 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3669 OPT_Wshift_count_overflow in the warnings.
3671 2014-10-30 Marek Polacek <polacek@redhat.com>
3673 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3674 print the stripped version as well, if they're not the same.
3676 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3678 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3681 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
3683 * c-decl.c: Adjust include files.
3684 * c-parser.c: Ditto.
3686 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3687 Tom Tromey <tromey@redhat.com>
3689 * c-tree.h (enum c_oracle_request): New.
3690 (c_binding_oracle_function): New typedef.
3691 (c_binding_oracle, c_pushtag, c_bind): Declare.
3692 * c-decl.c (c_binding_oracle): New global.
3693 (I_SYMBOL_CHECKED): New macro.
3694 (i_symbol_binding): New function.
3695 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3696 (I_TAG_CHECKED): New macro.
3697 (i_tag_binding): New function.
3698 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3699 (I_LABEL_CHECKED): New macro.
3700 (i_label_binding): New function.
3701 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3702 (c_print_identifier): Save and restore c_binding_oracle.
3703 (c_pushtag, c_bind): New functions.
3705 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
3707 * c-typeck.c: Adjust include files.
3709 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3712 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3713 initialization here...
3714 (c_initialize_diagnostics): ... but here. Set defaults after
3715 building pretty-printer.
3717 2014-10-23 Marek Polacek <polacek@redhat.com>
3720 * c-decl.c (pop_scope): Don't print warning in external_scope.
3722 2014-10-19 Marek Polacek <polacek@redhat.com>
3725 * c-typeck.c (output_init_element): Allow initializing objects with
3726 static storage duration with compound literals even in C99 and add
3729 2014-10-17 Marek Polacek <polacek@redhat.com>
3732 * c-typeck.c (digest_init): Allow initializing objects with static
3733 storage duration with compound literals even in C99 and add pedwarn
3736 2014-10-17 Marek Polacek <polacek@redhat.com>
3739 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3740 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3741 error multiple times. Print the type.
3743 2014-10-17 Marek Polacek <polacek@redhat.com>
3746 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3749 2014-10-17 Marek Polacek <polacek@redhat.com>
3751 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3752 (start_function): Use OPT_Wimplicit_int instead of 0.
3753 (store_parm_decls_oldstyle): Likewise.
3755 2014-10-17 Alan Modra <amodra@gmail.com>
3758 * c-decl.c (merge_decls): Don't merge section name or tls model
3759 to newdecl symtab node, instead merge to olddecl. Override
3760 existing olddecl section name. Set tls_model for all thread-local
3761 vars, not just OMP thread-private ones. Remove incorrect comment.
3763 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
3765 * c-decl.c: Adjust include files.
3767 2014-10-14 DJ Delorie <dj@redhat.com>
3769 * c-parser.c (c_parse_init): Add RID entries for each __intN.
3770 (c_token_starts_typename): Check all __intN, not just __int128.
3771 (c_token_starts_declspecs): Likewise.
3772 (c_parser_declspecs): Likewise.
3773 (c_parser_attribute_any_word): Likewise.
3774 (c_parser_objc_selector): Likewise.
3775 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3776 (struct c_declspecs): Add int_n_idx field to record *which* __intN
3778 * c-decl.c (declspecs_add_type): Check for all __intN, not just
3780 (finish_declspecs): Likewise.
3782 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
3784 * c-parser.c (c_parser_all_labels): New function to replace
3786 (c_parser_statement): Call the new function.
3788 2014-10-09 Marek Polacek <polacek@redhat.com>
3791 * c-typeck.c (pop_init_level): Don't warn about initializing
3794 2014-10-07 Marek Polacek <polacek@redhat.com>
3797 * c-decl.c (header_for_builtin_fn): New function.
3798 (implicitly_declare): Suggest which header to include.
3800 2014-10-07 Marek Polacek <polacek@redhat.com>
3802 * c-convert.c (convert): Use error_operand_p.
3803 * c-typeck.c (require_complete_type): Likewise.
3804 (really_atomic_lvalue): Likewise.
3805 (digest_init): Likewise.
3806 (handle_omp_array_sections_1): Likewise.
3808 2014-10-03 Marek Polacek <polacek@redhat.com>
3811 * c-decl.c (pop_scope): Don't warn about "inline function declared
3812 but never defined" for functions marked with gnu_inline attribute.
3814 2014-09-25 Jakub Jelinek <jakub@redhat.com>
3817 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3818 on low_bound and length.
3820 2014-09-24 Marek Polacek <polacek@redhat.com>
3824 * c-parser.c: Don't define CPP_KEYWORD.
3825 (c_parser_switch_statement): Pass original type to c_finish_case.
3826 * c-tree.h (c_finish_case): Update declaration.
3827 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3828 conditionally to c_do_switch_warnings.
3830 2014-09-03 Marek Polacek <polacek@redhat.com>
3833 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3836 2014-09-02 Jakub Jelinek <jakub@redhat.com>
3837 Balaji V. Iyer <balaji.v.iyer@intel.com>
3838 Igor Zamyatin <igor.zamyatin@intel.com>
3840 * c-parser.c (c_parser_cilk_for): New function.
3841 (c_parser_cilk_grainsize): Likewise.
3842 (c_get_temp_regvar): Likewise.
3843 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3844 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3845 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3846 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3849 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3851 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3852 with using HOST_WIDE_INT without truncation to 'int'
3854 2014-08-22 Marek Polacek <polacek@redhat.com>
3857 * c-typeck.c (parser_build_binary_op): Adjust call to
3858 warn_logical_not_parentheses.
3860 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3863 * c-parser.c (c_parser_array_notation): Check for correct
3864 type of an array added.
3866 2014-08-19 Marek Polacek <polacek@redhat.com>
3869 * c-typeck.c (build_binary_op): If either operand of a comparison
3870 is a boolean expression, call maybe_warn_bool_compare.
3872 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3875 * c-typeck.c (build_c_cast): Do a conversion even when the
3876 TYPE_MAIN_VARIANTs are the same.
3878 2014-08-19 Marek Polacek <polacek@redhat.com>
3880 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3881 pedwarn_c99 instead of pedwarn.
3882 (grokfield): Likewise.
3883 (warn_defaults_to): New function.
3884 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3885 Unconditionally call pedwarn_c99 instead of pedwarn.
3886 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3887 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3888 check flag_isoc11 before.
3889 * c-errors.c (pedwarn_c99): Change the return type to bool.
3890 Handle -Wc99-c11-compat.
3891 * c-parser.c (disable_extension_diagnostics): Handle
3892 warn_c99_c11_compat.
3893 (restore_extension_diagnostics): Likewise.
3894 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3895 instead of pedwarn, don't check flag_isoc11 before.
3896 (c_parser_declspecs): Likewise.
3897 (c_parser_alignas_specifier): Likewise.
3898 (c_parser_alignof_expression): Likewise.
3899 (c_parser_generic_selection): Likewise.
3900 * c-tree.h (pedwarn_c99): Update declaration.
3901 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3904 2014-08-19 Marek Polacek <polacek@redhat.com>
3906 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3908 * c-errors.c: Include "opts.h".
3909 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3910 * c-parser.c (disable_extension_diagnostics): Handle negative value
3911 of warn_c90_c99_compat, too.
3912 (restore_extension_diagnostics): Likewise.
3913 (c_parser_compound_statement_nostart): Pass
3914 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3916 2014-08-12 Marek Polacek <polacek@redhat.com>
3918 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3920 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3922 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3924 2014-08-10 Marek Polacek <polacek@redhat.com>
3927 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3928 Call pedwarn_c90 instead of pedwarn.
3929 (check_bitfield_type_and_width): Likewise.
3930 (declspecs_add_qual): Likewise.
3931 (declspecs_add_type): Likewise.
3932 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3933 Adjust to only call pedwarn_c90.
3934 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
3935 pedwarn_c90 instead of pedwarn.
3936 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3937 * c-parser.c (disable_extension_diagnostics): Handle
3938 warn_c90_c99_compat.
3939 (restore_extension_diagnostics): Likewise.
3940 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
3941 pedwarn_c90 instead of pedwarn.
3942 (c_parser_initelt): Likewise.
3943 (c_parser_postfix_expression): Likewise.
3944 (c_parser_postfix_expression_after_paren_type): Likewise.
3945 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3946 * c-tree.h: Fix formatting.
3947 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
3948 pedwarn_c90 instead of pedwarn.
3950 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
3952 * c-typeck.c: Remove include of pointer-set.h.
3954 2014-08-07 Marek Polacek <polacek@redhat.com>
3956 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3958 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3960 * c-typeck.c: Use hash_map instead of pointer_map.
3962 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3964 * c-decl.c: Use hash_set instead of pointer_set.
3966 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
3969 * c-array-notation.c (expand_array_notations): Handling
3972 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
3975 * c-typeck.c (c_finish_return): Return 0 instead of the address of
3978 2014-07-30 Tom Tromey <tromey@redhat.com>
3980 * c-typeck.c (struct constructor_stack) <designator_depth>: New
3982 (really_start_incremental_init, push_init_level): Initialize
3984 (pop_init_level): Set global designator_depth.
3985 (process_init_element): Check for designated_init attribute.
3987 2014-07-20 Marek Polacek <polacek@redhat.com>
3990 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
3991 (implicitly_declare): Pass location to implicit_decl_warning.
3993 2014-07-14 Jakub Jelinek <jakub@redhat.com>
3996 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
3997 If non-NULL, call c_parser_check_literal_zero.
3998 (c_parser_check_literal_zero): New function.
3999 (c_parser_postfix_expression_after_primary): Adjust
4000 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4002 2014-07-06 Marek Polacek <polacek@redhat.com>
4005 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4006 * c-tree.h (C_ARRAY_PARAMETER): Define.
4007 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4010 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
4011 Chen Gang <gang.chen.5i5j@gmail.com>
4013 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4016 2014-07-01 Marek Polacek <polacek@redhat.com>
4018 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4019 instead of 0 to WARN_FOR_ASSIGNMENT.
4021 2014-07-01 Marek Polacek <polacek@redhat.com>
4024 * c-typeck.c (convert_for_assignment): Pass
4025 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4027 2014-06-30 Marek Polacek <polacek@redhat.com>
4029 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4030 has no_sanitize_undefined attribute.
4032 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4035 * c-array-notation.c (fix_builtin_array_notation_fn):
4036 Check for 0 arguments in builtin call. Check that bultin argument is
4038 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4041 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4043 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4044 qualifiers in __auto_type for atomic types.
4045 (c_parser_typeof_specifier): Discard all type qualifiers in
4046 __typeof__ for atomic types.
4048 2014-06-25 Marek Polacek <polacek@redhat.com>
4051 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4052 the return expression to c_finish_return.
4054 2014-06-25 Jakub Jelinek <jakub@redhat.com>
4056 * c-typeck.c (c_finish_omp_clauses): Make sure
4057 OMP_CLAUSE_LINEAR_STEP has correct type.
4059 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4063 2014-06-24 Jakub Jelinek <jakub@redhat.com>
4065 * c-parser.c (c_parser_omp_for_loop): For
4066 #pragma omp parallel for simd move lastprivate clause from parallel
4067 to for rather than simd.
4069 2014-06-23 Marek Polacek <polacek@redhat.com>
4071 * c-typeck.c (parser_build_binary_op): Don't call
4072 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4074 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
4076 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4077 * c-decl.c (merge_decls): Likewise.
4079 2014-06-09 Marek Polacek <polacek@redhat.com>
4082 * c-typeck.c (error_init): Call inform instead of error_at.
4083 (pedwarn_init): Call inform instead of pedwarn.
4084 (warning_init): Call inform instead of warning_at.
4086 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
4088 * c-decl.c (merge_decls): Use set_decl_section_name.
4089 (duplicate_decls): Remove node if it exists.
4091 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4094 * c-typeck.c (push_init_level, process_init_element,
4095 pop_init_level): Correct check for zero initialization, move
4096 missing brace warning to respect zero initialization.
4098 2014-06-05 Marek Polacek <polacek@redhat.com>
4101 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4103 2014-06-05 Marek Polacek <polacek@redhat.com>
4106 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4107 on the left hand side operand of a comparison.
4109 2014-06-05 Marek Polacek <polacek@redhat.com>
4112 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4113 Print note only if the warning was printed.
4115 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4118 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4121 2014-06-03 Marek Polacek <polacek@redhat.com>
4124 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4126 * c-tree.h (c_start_case): Update.
4127 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4128 switch condition has boolean value.
4130 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
4132 * c-decl.c: Include builtins.h.
4133 * c-parser.c: Likewise.
4135 2014-05-27 Marek Polacek <polacek@redhat.com>
4138 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4139 error and warning calls to error_at and warning_at. Pass location of
4140 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4141 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4142 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4144 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4147 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4148 function parameters.
4150 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
4152 * c-decl.c (merge_decls): Preserve symtab node pointers.
4153 (duplicate_decls): Free new decl.
4155 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4157 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4160 * c-parser.c (c_parser_omp_target): Return bool values.
4162 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4164 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4165 num_teams_loc variable to num_thread_limit_loc.
4167 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4169 * c-array-notation.c (expand_array_notations): Use void_node
4170 instead of void_zero_node.
4172 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4174 * c-decl.c (finish_struct): Adjust.
4175 (finish_enum): Likewise.
4177 (record_inline_static): Likewise.
4178 (push_scope): Likewise.
4179 (make_label): Likewise.
4180 (lookup_label_for_goto): Likewise.
4181 (finish_struct): Likewise.
4182 (finish_enum): Likewise.
4183 (store_parm_decls): Likewise.
4184 (c_push_function_context): Likewise.
4185 * c-lang.h: Remove usage of variable_size gty attribute.
4186 * c-parser.c (c_parse_init): Adjust.
4187 (c_parse_file): Likewise.
4189 2014-05-13 Marek Polacek <polacek@redhat.com>
4192 * c-typeck.c (convert_for_assignment): Pass location to
4193 WARN_FOR_ASSIGNMENT instead of input_location.
4195 2014-05-10 Marek Polacek <polacek@redhat.com>
4197 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4198 maybe_warn_string_init.
4199 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4200 maybe_warn_string_init.
4201 * c-tree.h (maybe_warn_string_init): Update declaration.
4202 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4203 Call pedwarn_init with loc instead of with input_location.
4204 (digest_init): Pass init_loc to maybe_warn_string_init.
4205 (pop_init_level): Call pedwarn_init with loc instead of with
4207 (set_init_index): Likewise.
4208 (process_init_element): Likewise.
4210 2014-05-09 Marek Polacek <polacek@redhat.com>
4213 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4214 (c_parser_initelt): Pass location to set_init_label. Pass array index
4215 location to set_init_index.
4216 * c-tree.h (push_init_level): Update declaration.
4217 (pop_init_level): Likewise.
4218 (set_init_index): Likewise.
4219 (set_init_label): Likewise.
4220 * c-typeck.c (error_init): Add location parameter. Call error_at
4222 (digest_init): Pass init_loc to error_init.
4223 (really_start_incremental_init):
4224 (push_init_level): Add location parameter. Pass loc to pop_init_level
4226 (pop_init_level): Likewise.
4227 (set_designator): Add location parameter. Pass loc to pop_init_level,
4228 push_init_level, and error_init.
4229 (set_init_index): Add location parameter. Pass loc to error_init and
4231 (set_init_label): Likewise.
4232 (output_init_element): Pass loc to error_init.
4233 (process_init_element): Pass loc to error_init, pop_init_level,
4234 pedwarn_init, and push_init_level.
4236 2014-05-09 Marek Polacek <polacek@redhat.com>
4239 * c-parser.c (c_parser_attributes): Parse the arguments as an
4240 expression-list if the attribute takes identifier.
4242 2014-05-08 Marek Polacek <polacek@redhat.com>
4245 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4248 2014-05-08 Marek Polacek <polacek@redhat.com>
4251 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4254 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4255 Mike Stump <mikestump@comcast.net>
4256 Richard Sandiford <rdsandiford@googlemail.com>
4258 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4259 (finish_enum): Use wide-int interfaces.
4260 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4261 * c-typeck.c (build_c_cast): Likewise.
4262 (set_nonincremental_init_from_string): Likewise.
4263 (c_tree_equal): Likewise.
4265 2014-05-02 Marek Polacek <polacek@redhat.com>
4268 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4269 Return size_one_node when the type is not complete.
4270 (pointer_diff): Remove comment.
4271 (build_unary_op): Improve error messages.
4273 2014-05-02 Marek Polacek <polacek@redhat.com>
4275 * c-typeck.c (c_finish_return): Separate warning_at calls.
4277 2014-05-02 Marek Polacek <polacek@redhat.com>
4279 * c-tree.h (error_init): Remove declaration.
4280 (pedwarn_init): Likewise.
4281 * c-typeck.c (error_init): Make static and move above.
4282 (pedwarn_init): Likewise.
4283 (warning_init): Move above.
4284 (maybe_warn_string_init): Likewise.
4286 2014-05-01 Jeff Law <law@redhat.com>
4290 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4291 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4294 2014-05-02 Marek Polacek <polacek@redhat.com>
4297 * c-typeck.c (push_init_level): Set constructor_designated to
4298 p->designated for structures.
4300 2014-05-01 Marek Polacek <polacek@redhat.com>
4303 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4304 function-definition has an attribute after the declarator.
4306 2014-05-01 Marek Polacek <polacek@redhat.com>
4309 * c-typeck.c (warning_init): Add location_t parameter. Call
4310 warning_at instead of warning.
4311 (push_init_level): Pass input_location to warning_init.
4312 (add_pending_init): Add location_t parameter. Pass loc to
4314 (set_nonincremental_init): Pass input_location to add_pending_init.
4315 (set_nonincremental_init_from_string): Likewise.
4316 (output_init_element): Pass loc to warning_init and to
4319 2014-05-01 Marek Polacek <polacek@redhat.com>
4322 * c-typeck.c (c_finish_return): Distinguish between label and variable
4323 when warning about returning local address.
4325 2014-05-01 Marek Polacek <polacek@redhat.com>
4328 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4331 2014-05-01 Marek Polacek <polacek@redhat.com>
4334 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4335 instead of 0 to WARN_FOR_QUALIFIERS.
4337 2014-05-01 Marek Polacek <polacek@redhat.com>
4340 * c-typeck.c (default_conversion): Use better location for
4343 2014-04-30 Marek Polacek <polacek@redhat.com>
4345 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4346 also when SANITIZE_FLOAT_DIVIDE is on.
4348 2014-04-30 Marek Polacek <polacek@redhat.com>
4351 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4352 and pedwarn_init. Use loc insted of input_location.
4354 2014-04-30 Marek Polacek <polacek@redhat.com>
4357 * c-typeck.c (build_binary_op): Use location when warning about
4360 2014-04-25 Marek Polacek <polacek@redhat.com>
4363 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4364 always_inline/noinline and hot/cold attributes.
4366 2014-04-25 Marek Polacek <polacek@redhat.com>
4369 * c-parser.c (c_parser_initelt): Pass input_location to
4370 process_init_element.
4371 (c_parser_initval): Pass loc to process_init_element.
4372 * c-tree.h (process_init_element): Adjust declaration.
4373 * c-typeck.c (push_init_level): Pass input_location to
4374 process_init_element.
4375 (pop_init_level): Likewise.
4376 (set_designator): Likewise.
4377 (output_init_element): Add location_t parameter. Pass loc to
4379 (output_pending_init_elements): Pass input_location to
4380 output_init_element.
4381 (process_init_element): Add location_t parameter. Pass loc to
4382 output_init_element.
4384 2014-04-24 Jakub Jelinek <jakub@redhat.com>
4386 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4387 atomic-clause, allow comma in between atomic-clause and
4390 2014-04-22 Jakub Jelinek <jakub@redhat.com>
4393 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4394 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4396 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4399 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4400 create_tmp_var instead build_decl for creating temps.
4401 (build_array_notation_expr): Likewise.
4402 (fix_conditional_array_notations_1): Likewise.
4403 (fix_array_notation_expr): Likewise.
4404 (fix_array_notation_call_expr): Likewise.
4406 2014-03-28 Jakub Jelinek <jakub@redhat.com>
4409 * c-tree.h (c_build_function_call_vec): New prototype.
4410 * c-typeck.c (build_function_call_vec): Don't call
4411 resolve_overloaded_builtin here.
4412 (c_build_function_call_vec): New wrapper function around
4413 build_function_call_vec. Call resolve_overloaded_builtin here.
4414 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4415 Call c_build_function_call_vec instead of build_function_call_vec.
4416 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4417 * c-decl.c (finish_decl): Likewise.
4419 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4422 * c-typeck.c: Use correct format string in cast-qual warning
4424 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4426 * c-decl.c (c_decl_attributes): Use
4427 lang_hooks.types.omp_mappable_type.
4428 * c-typeck.c (c_finish_omp_clauses): Likewise.
4430 2014-03-06 Marek Polacek <polacek@redhat.com>
4433 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4434 of checking tree code.
4436 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4438 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4439 (c_parser_parameter_declaration): Likewise.
4441 2014-02-19 Marek Polacek <polacek@redhat.com>
4444 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4445 Call mark_exp_read on exp.value.
4446 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4447 TREE_ADDRESSABLE on old instead of val.
4448 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4450 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4452 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4453 C_EXPR_APPEND by vec_safe_push.
4454 * c-tree.h (C_EXPR_APPEND): Remove.
4456 2014-01-31 Marek Polacek <polacek@redhat.com>
4459 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4460 build_function_call_vec.
4461 (build_function_call): Likewise.
4462 (build_atomic_assign): Likewise.
4463 (build_function_call_vec): Add arg_loc parameter. Use it.
4464 (convert_arguments): Likewise.
4465 (convert_for_assignment): Rename rhs_loc to expr_loc.
4466 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4467 (c_parser_objc_keywordexpr): Likewise.
4468 (c_parser_postfix_expression_after_primary): Call
4469 build_function_call_vec with expr_loc rather than op_loc.
4470 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4471 build_function_call_vec.
4472 (c_parser_expr_list): Add locations parameter. Fill it with locations
4473 of function arguments.
4474 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4476 2014-01-30 Marek Polacek <polacek@redhat.com>
4479 * c-typeck.c (build_function_call_vec): Use loc parameter.
4480 (convert_arguments): Add location parameter. Use it.
4481 (ep_convert_and_check): Likewise.
4482 (build_atomic_assign): Adjust convert_for_assignment call.
4483 (build_modify_expr): Likewise.
4484 (digest_init): Likewise.
4485 (c_finish_return): Likewise.
4486 (build_conditional_expr): Adjust ep_convert_and_check calls.
4487 (convert_for_assignment): Add rhs_loc parameter. Use it.
4488 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4491 2014-01-30 Richard Biener <rguenther@suse.de>
4494 * c-typeck.c (build_function_call_vec): Do not replace calls
4495 to a function via an incompatible type with a runtime abort.
4497 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4499 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4500 flag_enable_cilkplus with flag_cilkplus.
4501 (c_parser_direct_declarator_inner): Likewise.
4502 (c_parser_attribute_any_word): Likewise.
4503 (c_parser_attributes): Likewise.
4504 (c_parser_compound_statement): Likewise.
4505 (c_parser_statement_after_labels): Likewise.
4506 (c_parser_if_statement): Likewise.
4507 (c_parser_switch_statement): Likewise.
4508 (c_parser_do_statement): Likewise.
4509 (c_parser_for_statement): Likewise.
4510 (c_parser_unary_expression): Likewise.
4511 (c_parser_postfix_expression): Likewise.
4512 (c_parser_postfix_expression_after_primary): Likewise.
4513 (c_parser_postfix_expression_after_primary): Likewise.
4514 (c_parser_omp_clause_name): Likewise.
4515 (c_finish_omp_declare_simd): Likewise.
4516 (c_parser_cilk_verify_simd): Likewise.
4517 * c-typeck.c (build_array_ref): Likewise.
4518 (build_function_call_vec): Likewise.
4519 (convert_arguments): Likewise.
4520 (build_compound_expr): Likewise.
4521 (c_finish_return): Likewise.
4522 (c_finish_if_stmt): Likewise.
4523 (c_finish_loop): Likewise.
4524 (build_binary_op): Likewise.
4526 2014-01-23 Marek Polacek <polacek@redhat.com>
4529 * c-typeck.c (parser_build_binary_op): Use location instead of
4531 (build_binary_op): Pass location to shorten_compare.
4533 2014-01-23 Marek Polacek <polacek@redhat.com>
4536 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4539 2014-01-23 Marek Polacek <polacek@redhat.com>
4542 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4543 of a comma expression.
4544 (emit_side_effect_warnings): Likewise.
4546 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4549 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4550 function to use walk_tree and moved a lot of its functionality to
4551 expand_array_notations.
4552 (expand_array_notations): New function.
4554 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4556 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4557 attribute an attribute without value.
4559 2014-01-23 Jakub Jelinek <jakub@redhat.com>
4562 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4563 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4565 2014-01-22 Marek Polacek <polacek@redhat.com>
4568 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4569 of remove_c_maybe_const_expr on op1 and op2.
4571 2014-01-15 Jakub Jelinek <jakub@redhat.com>
4574 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4575 effects, preevaluate rhs using SAVE_EXPR first.
4577 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4580 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4581 statements with if-elseif statements.
4583 2014-01-06 Marek Polacek <polacek@redhat.com>
4586 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4587 defined bit-field types only in ISO C.
4589 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4591 Update copyright years
4593 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4595 * c-array-notation.c: Use the standard form for the copyright notice.
4597 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4599 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4600 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4601 field in parser is not empty. If not-empty, call the function
4602 c_parser_finish_omp_declare_simd.
4603 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4604 between SIMD-enabled functions and #pragma simd. Added new parameter.
4605 (c_parser_cilk_all_clauses): Modified the usage of the function
4606 c_parser_cilk_clause_vectorlength as mentioned above.
4607 (c_parser_cilk_simd_fn_vector_attrs): New function.
4608 (c_finish_cilk_simd_fn_tokens): Likewise.
4609 (is_cilkplus_vector_p): Likewise.
4610 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4611 "nomask," and "mask" strings in clause name.
4612 (c_parser_omp_all_clauses): Added 3 new case statements:
4613 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4614 PRAGMA_CILK_CLAUSE_NOMASK.
4615 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4616 check for vector attribute and if so call the function
4617 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4618 called the function c_finish_cilk_simd_fn_tokens.
4619 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4620 parser field is non-empty. If so, parse them as you would parse
4621 the omp declare simd pragma.
4622 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4623 Added a check when step is a parameter and flag it as error.
4624 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4625 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4628 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4630 * c-parser.c (c_parser_omp_parallel): Fix description.
4632 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4634 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4635 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4636 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4637 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4639 2013-12-04 Joseph Myers <joseph@codesourcery.com>
4642 * c-parser.c (c_parser_alignas_specifier): Use
4643 c_sizeof_or_alignof_type instead of c_alignof.
4644 (c_parser_alignof_expression): Likewise, with min_alignof
4645 parameter depending on alignof spelling used.
4647 2013-12-04 Marek Polacek <polacek@redhat.com>
4650 * c-decl.c (start_function): Don't warn for missing prototype for
4653 2013-12-03 Marek Polacek <polacek@redhat.com>
4656 * c-decl.c (build_compound_literal): Allow compound literals with
4657 empty initial value.
4659 2013-12-02 Joseph Myers <joseph@codesourcery.com>
4662 * c-typeck.c (build_modify_expr): Diagnose assignment to
4663 expression with array type.
4665 2013-11-29 Joseph Myers <joseph@codesourcery.com>
4668 * c-typeck.c (process_init_element): Do not treat a string as
4669 initializing a whole array when used with a designator for an
4672 2013-11-29 Joseph Myers <joseph@codesourcery.com>
4675 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4676 an inline function following a static declaration.
4678 2013-11-28 Jakub Jelinek <jakub@redhat.com>
4681 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4682 to p_name before calling c_parser_omp_teams instead of after.
4683 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4684 argument. Remove unused p_name variable.
4686 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
4687 Jakub Jelinek <jakub@redhat.com>
4689 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4690 external_scope is NULL.
4692 2013-11-27 Tom de Vries <tom@codesourcery.com>
4693 Marc Glisse <marc.glisse@inria.fr>
4696 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4698 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
4700 * c-typeck.c: Add required include files from gimple.h.
4702 2013-11-22 David Malcolm <dmalcolm@redhat.com>
4704 * c-decl.c (define_label, shadow_tag_warned)
4705 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4706 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4707 (declspecs_add_type): Remove use of in_system_header macro.
4708 * c-parser.c (c_parser_unary_expression): Likewise.
4709 * c-typeck.c (store_init_value, process_init_element)
4710 (c_start_case): Likewise.
4712 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4715 * c-parser.c (c_parser_set_source_position_from_token): Remove
4716 reference to in_system_header from comment.
4718 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4720 * c-decl.c (grokdeclarator): Update comment to refer to
4721 tree_to_[su]hwi rather than tree_low_cst.
4723 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4725 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4726 tree_to_uhwi throughout.
4728 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4730 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4733 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4735 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4738 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
4740 * c-parser.c (c_parser_cilk_simd): New.
4741 (c_parser_cilk_verify_simd): New.
4742 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4743 (c_parser_omp_for_loop): Add case for NE_EXPR.
4744 Set c_break_label for CILK_SIMD.
4745 (c_parser_cilk_clause_vectorlength): New.
4746 (c_parser_cilk_clause_linear): New.
4747 (c_parser_cilk_clause_name): New.
4748 (c_parser_cilk_all_clauses): New.
4749 * c-typeck.c (build_unary_op): Pass location argument to
4751 (build_modify_expr): Same.
4752 (build_asm_expr): Same.
4753 (c_finish_bc_stmt): Error on break/continue in loops.
4755 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
4757 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4759 2013-11-14 Diego Novillo <dnovillo@google.com>
4761 * c-decl.c: Include print-tree.h.
4762 Include stor-layout.h.
4765 Include stringpool.h.
4766 * c-lang.c: Include fold-const.h.
4767 * c-parser.c: Include stringpool.h.
4769 Include stor-layout.h.
4771 Include trans-mem.h.
4772 * c-typeck.c: Include stor-layout.h.
4773 Include trans-mem.h.
4777 2013-11-13 Joseph Myers <joseph@codesourcery.com>
4779 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4780 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4782 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4783 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4785 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4786 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4787 (c_parser_declarator, c_parser_direct_declarator_inner)
4788 (c_parser_parameter_declaration, c_parser_type_name): All callers
4790 (c_parser_declaration_or_fndef): Handle declarations with type
4791 determined from the initializer.
4793 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
4795 * c-typeck.c: Include gimplify.h.
4797 2013-11-12 Joseph Myers <joseph@codesourcery.com>
4799 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4800 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4802 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4803 or _Thread_local as appropriate in diagnostics.
4804 (build_null_declspecs): Initialize ret->thread_gnu_p.
4805 (declspecs_add_scspec): Handle either __thread or _Thread_local
4806 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
4807 pedantic. Do not disallow _Thread_local extern and _Thread_local
4810 2013-11-07 Joseph Myers <joseph@codesourcery.com>
4811 Andrew MacLeod <amacleod@redhat.com>
4813 * c-aux-info.c (gen_type): Handle atomic qualifier.
4814 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4815 qualifiers when compating types.
4816 (shadow_tag_warned): Handle atomic_p in declspecs.
4817 (quals_from_declspecs): Likewise.
4818 (start_decl): Use c_type_promotes_to when promoting argument
4820 (grokdeclarator): Handle _Atomic.
4821 (get_parm_info): Diagnose any qualifier on "void" as only
4823 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4824 comparing types. Use c_type_promotes_to when promoting argument
4826 (finish_function): Use c_type_promotes_to when promoting argument
4828 (build_null_declspecs): Handle atomic_p in declspecs.
4829 (declspecs_add_qual): Handle RID_ATOMIC.
4830 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4831 (c_token_starts_declspecs): Handle RID_ATOMIC.
4832 (c_parser_declspecs): Handle atomic type specifiers and
4834 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4835 from types of expressions with atomic type.
4836 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4837 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4838 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4839 (c_parser_statement_after_labels, c_parser_switch_statement)
4840 (c_parser_for_statement, c_parser_expr_no_commas)
4841 (c_parser_conditional_expression, c_parser_binary_expression)
4842 (c_parser_cast_expression, c_parser_unary_expression)
4843 (c_parser_postfix_expression)
4844 (c_parser_postfix_expression_after_primary, c_parser_expression):
4845 Use convert_lvalue_to_rvalue.
4846 (c_parser_expression_conv, c_parser_expr_list): Document
4847 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4848 (c_parser_objc_synchronized_statement): Use
4849 convert_lvalue_to_rvalue.
4850 (c_parser_objc_selector): Handle RID_ATOMIC.
4851 (c_parser_objc_receiver, c_parser_array_notation): Use
4852 convert_lvalue_to_rvalue.
4853 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4854 _Atomic (type-name).
4855 (struct c_declspecs): Add atomic_p field.
4856 (convert_lvalue_to_rvalue): Declare.
4857 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4858 corresponding atomic types.
4859 (qualify_type): Don't add _Atomic qualifiers from second argument.
4860 (comp_target_types): Do not allow _Atomic mismatches.
4861 (type_lists_compatible_p): Do not remove atomic qualifiers when
4863 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4864 (build_atomic_assign): New functions.
4865 (build_unary_op): Use build_atomic_assign for atomic increment and
4867 (build_conditional_expr): Do not treat _Atomic void as a qualified
4869 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4870 (find_anonymous_field_with_type, convert_to_anonymous_field)
4871 (convert_for_assignment): Do not remove atomic qualifiers when
4873 (digest_init): Do not accept initialization of arrays of atomic
4874 elements by string constants.
4875 (build_asm_expr): Use convert_lvalue_to_rvalue.
4876 (build_binary_op): Do not treat _Atomic void as a qualified
4879 2013-11-06 DJ Delorie <dj@redhat.com>
4881 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4882 both explicit and builtin, print the location of the explicit one.
4884 2013-11-05 Tobias Burnus <burnus@net-b.de>
4886 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4887 c_parser_omp_distribute, c_parser_omp_teams,
4888 c_parser_omp_target, c_parser_omp_declare): Handle
4891 2013-11-03 Marek Polacek <polacek@redhat.com>
4893 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4895 2013-11-01 Jakub Jelinek <jakub@redhat.com>
4897 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4898 check_dup_generic at the end, unless remove is true.
4899 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4901 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4903 2013-10-31 Jakub Jelinek <jakub@redhat.com>
4905 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4906 with decl that is not pointer nor array.
4908 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4910 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4911 a spawning function is found.
4912 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4913 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4914 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4915 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4917 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4918 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4920 (c_finish_return): Added a check to reject _Cilk_spawn in return
4922 (build_cilk_spawn): New function.
4923 (build_cilk_sync): Likewise.
4924 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4926 2013-10-27 Tobias Burnus <burnus@net-b.de>
4929 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4930 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4931 (c_parser_statement_after_labels): Update calls.
4933 2013-10-24 Tobias Burnus <burnus@net-b.de>
4936 * c-parser.c (c_parser_pragma, c_parser_for_statement):
4937 Handle PRAGMA_IVDEP.
4938 (c_parser_statement_after_labels): Update call.
4940 2013-10-24 Marek Polacek <polacek@redhat.com>
4942 * c-parser.c (c_parser_struct_declaration): Add a comment.
4943 (c_parser_declarator): Don't allow _Alignas here.
4945 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
4947 * c-parser.c: Include omp-low.h.
4948 * c-typeck.c: Likewise.
4950 2013-10-17 Marek Polacek <polacek@redhat.com>
4953 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4954 Document syntax of the array-declarator.
4955 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4957 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4958 (c_parser_struct_declaration): Likewise.
4959 (c_parser_declarator): Likewise.
4960 (c_parser_direct_declarator_inner): Likewise.
4961 (c_parser_parameter_declaration): Likewise.
4962 (c_parser_type_name): Likewise.
4964 2013-10-11 Jakub Jelinek <jakub@redhat.com>
4966 * c-lang.h (current_omp_declare_target_attribute): New extern
4968 * c-parser.c: Include c-lang.h.
4969 (struct c_parser): Change tokens to c_token *.
4970 Add tokens_buf field. Change tokens_avail type to unsigned int.
4971 (c_parser_consume_token): If parser->tokens isn't
4972 &parser->tokens_buf[0], increment parser->tokens.
4973 (c_parser_consume_pragma): Likewise.
4974 (enum pragma_context): Add pragma_struct and pragma_param.
4975 (c_parser_external_declaration): Adjust
4976 c_parser_declaration_or_fndef caller.
4977 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4978 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4979 Adjust recursive call.
4980 (c_parser_struct_or_union_specifier): Use pragma_struct instead
4982 (c_parser_parameter_declaration): Use pragma_param instead of
4984 (c_parser_compound_statement_nostart, c_parser_label,
4985 c_parser_for_statement): Adjust
4986 c_parser_declaration_or_fndef callers.
4987 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
4988 it through to c_parser_conditional_expression.
4989 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
4990 pass it through to c_parser_binary_expression. Adjust recursive
4992 (c_parser_binary_expression): Remove prec argument, add
4993 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
4994 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
4995 binop matches it, use build2 instead of parser_build_binary_op.
4996 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
4997 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
4998 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
4999 Handle pragma_struct and pragma_param the same as pragma_external.
5000 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5001 (c_parser_omp_variable_list): Parse array sections for
5002 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5003 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5004 (c_parser_omp_clause_reduction): Handle user defined reductions.
5005 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5006 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5007 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5008 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5009 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5010 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5011 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5012 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5013 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5014 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5015 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5016 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5017 (c_parser_omp_for_loop): Add CODE argument, pass it through
5018 to c_finish_omp_for. Change last argument to cclauses,
5019 and adjust uses to grab parallel clauses from the array of all
5020 the split clauses. Adjust c_parser_binary_expression,
5021 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5022 (omp_split_clauses): New function.
5023 (c_parser_omp_simd): New function.
5024 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5025 Allow the function to be called also when parsing combined constructs,
5026 and call c_parser_omp_simd when parsing for simd.
5027 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5028 #pragma omp section, require exactly one structured-block instead of
5029 sequence of statements.
5030 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5031 Allow the function to be called also when parsing combined constructs.
5032 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5033 Allow the function to be called also when parsing combined
5035 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5036 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5037 c_parser_omp_teams, c_parser_omp_target_data,
5038 c_parser_omp_target_update, c_parser_omp_target,
5039 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5040 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5041 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5042 (c_parser_omp_construct): Add p_name and mask vars. Handle
5043 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5044 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5045 and c_parser_omp_sections callers.
5046 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5047 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5048 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5049 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5050 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5052 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5053 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5054 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5055 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5056 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5057 * c-typeck.c: Include tree-inline.h.
5058 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5059 handle_omp_array_sections_1, handle_omp_array_sections,
5060 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5061 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5062 user defined reductions.
5063 (c_tree_equal): New function.
5064 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5065 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5066 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5067 c_check_omp_declare_reduction_r): New prototypes.
5068 * c-decl.c (current_omp_declare_target_attribute): New variable.
5069 (c_decl_attributes): New function.
5070 (start_decl, start_function): Use it instead of decl_attributes.
5071 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5072 c_omp_reduction_decl, c_omp_reduction_lookup,
5073 c_check_omp_declare_reduction_r): New functions.
5075 2013-09-25 Tom Tromey <tromey@redhat.com>
5077 * Make-lang.in (c/gccspec.o): Remove.
5078 (CFLAGS-c/gccspec.o): New variable.
5079 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5080 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5081 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5083 2013-09-25 Tom Tromey <tromey@redhat.com>
5085 * Make-lang.in (c/gccspec.o): Don't use subshell.
5087 2013-09-18 Marek Polacek <polacek@redhat.com>
5090 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5091 Remove unnecessary check.
5093 2013-09-18 Marek Polacek <polacek@redhat.com>
5096 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5097 no_sanitize_undefined attribute.
5099 2013-09-13 Kai Tietz <ktietz@redhat.com>
5102 * c-decl.c (c_builtin_function_ext_scope): Remove
5103 wrong assumption that it is never called on prexisting
5106 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5108 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5110 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5112 * c-objc-common.c (c_tree_printer): Tidy.
5114 2013-08-30 Marek Polacek <polacek@redhat.com>
5116 * c-typeck.c (build_binary_op): Add division by zero and shift
5119 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
5120 Joseph Myers <joseph@codesourcery.com>
5123 * c-typeck.c (c_common_type): Prefer double_type_node over
5124 other REAL_TYPE types with the same precision.
5125 (convert_arguments): Likewise.
5127 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5129 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5130 (c_initialize_diagnostics): Call a destructor for the early printer.
5132 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5134 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5135 printer initialization.
5137 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
5140 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5141 check for truth values.
5142 (expand_array_notation_exprs): Added truth values case. Removed an
5143 unwanted else. Added for-loop to walk through subtrees in default
5146 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5148 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5150 2013-07-23 Joseph Myers <joseph@codesourcery.com>
5152 * c-parser.c (struct c_generic_association): Fix typo.
5154 2013-07-23 Tom Tromey <tromey@redhat.com>
5155 Joseph Myers <joseph@codesourcery.com>
5157 * c-parser.c (struct c_generic_association): New.
5158 (c_generic_association_d): New typedef.
5159 (c_parser_generic_selection): New function.
5160 (c_parser_postfix_expression): Handle RID_GENERIC.
5162 2013-07-13 Jason Merrill <jason@redhat.com>
5165 * c-decl.c (finish_struct): Check for too-large class.
5167 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
5170 * c-typeck.c (set_init_index): When folding, check for index overflow.
5172 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5174 * c-parser.c (c_parser_array_notation): Removed rejection of array
5175 notations in an array of function pointers.
5177 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5179 * c-array-notation.c (make_triplet_val_inv): New function.
5180 (create_cmp_incr): Likewise.
5181 (create_array_refs): Likewise.
5182 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5183 Also modularized common parts between functions and called the function.
5184 (build_array_notation_expr): Likewise.
5185 (fix_conditional_array_notations_1): Likewise.
5186 (fix_array_notation_expr): Likewise.
5187 (fix_array_notation_call_expr): Likewise.
5189 2013-06-18 Marek Polacek <polacek@redhat.com>
5192 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5194 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5196 * c-array-notation.c (build_array_notation_expr): Reject array notation
5197 mismatch between LHS and RHS even inside a call_expr. Also, removed
5198 a couple while statements that were dead code.
5200 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5202 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5203 excessive precision expressions in function parameters. Also removed
5204 couple unwanted while statements.
5206 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5208 * c-array-notation.c (expand_array_notation_exprs): Added
5209 ARRAY_NOTATION_REF case.
5211 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5213 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5214 function to c-family/array-notation-common.c.
5215 (is_cilkplus_reduce_builtin): Likewise.
5216 (find_rank): Likewise.
5217 (extract_array_notation_exprs): Likewise.
5218 (replace_array_notations): Likewise.
5219 (find_inv_trees): Likewise.
5220 (replace_inv_trees): Likewise.
5221 (contains_array_notation_expr): Likewise.
5222 (find_correct_array_notation_type): Likewise.
5223 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5224 (struct inv_list): Moved this to c-family/array-notation-common.c.
5225 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5227 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5229 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5230 reduction functions outside the for-loop. Added a check if the fundecl
5231 is non-NULL. Finally, removed an unwanted if-statement, and made the
5234 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5236 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5237 condition of the if-statement matches the rank of else-block and then-
5238 block when array notations are used.
5239 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5240 expression after the entire function body is parsed.
5241 (c_parser_expr_no_commas): Delayed creating array notation expressions
5242 to the end of function parsing.
5243 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5244 whole if-statement instead of just the condition.
5245 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5247 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5250 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5251 array to NULL_TREE if they are unused. Also added a check for the
5252 field to be NULL before its fields are used in future.
5254 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5257 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5258 (build_array_notation_expr): Likewise.
5260 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5262 * c-typeck.c (build_array_ref): Added a check to see if array's
5263 index is greater than one. If true, then emit an error.
5264 (build_function_call_vec): Exclude error reporting and checking
5265 for builtin array-notation functions.
5266 (convert_arguments): Likewise.
5267 (c_finish_return): Added a check for array notations as a return
5268 expression. If true, then emit an error.
5269 (c_finish_loop): Added a check for array notations in a loop
5270 condition. If true then emit an error.
5271 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5272 (build_binary_op): Added a check for array notation expr inside
5273 op1 and op0. If present, we call another function to find correct
5275 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5276 * c-parser.c (c_parser_compound_statement): Check if array
5277 notation code is used in tree, if so, then transform them into
5279 (c_parser_expr_no_commas): Check if array notation is used in LHS
5280 or RHS, if so, then build array notation expression instead of
5282 (c_parser_postfix_expression_after_primary): Added a check for
5283 colon(s) after square braces, if so then handle it like an array
5284 notation. Also, break up array notations in unary op if found.
5285 (c_parser_direct_declarator_inner): Added a check for array
5287 (c_parser_compound_statement): Added a check for array notation in
5288 a stmt. If one is present, then expand array notation expr.
5289 (c_parser_if_statement): Likewise.
5290 (c_parser_switch_statement): Added a check for array notations in
5291 a switch statement's condition. If true, then output an error.
5292 (c_parser_while_statement): Similarly, but for a while.
5293 (c_parser_do_statement): Similarly, but for a do-while.
5294 (c_parser_for_statement): Similarly, but for a for-loop.
5295 (c_parser_unary_expression): Check if array notation is used in a
5296 pre-increment or pre-decrement expression. If true, then expand
5298 (c_parser_array_notation): New function.
5299 * c-array-notation.c: New file.
5300 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5302 2013-05-23 Mike Stump <mikestump@comcast.net>
5304 * c-typeck.c (convert_for_assignment): Handle references to memory
5307 2013-05-16 Jason Merrill <jason@redhat.com>
5309 * Make-lang.in (cc1$(exeext)): Use link mutex.
5311 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5313 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5314 to simply use OPT_Wpointer_arith.
5315 (build_unary_op): Likewise.
5317 2013-04-03 Jakub Jelinek <jakub@redhat.com>
5320 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5321 argument. If set, or it temporarily for parsing of the first
5322 argument into force_folding_builtin_constant_p.
5323 (c_parser_postfix_expression): Adjust callers.
5325 2013-03-21 Richard Biener <rguenther@suse.de>
5327 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5328 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5330 2013-02-12 Marek Polacek <polacek@redhat.com>
5333 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5336 2013-01-24 Jakub Jelinek <jakub@redhat.com>
5339 * c-typeck.c (set_nonincremental_init_from_string): If
5340 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5342 (process_init_element): Likewise.
5344 2012-12-20 Jakub Jelinek <jakub@redhat.com>
5347 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5348 argument, don't call default_function_array_conversion
5349 nor c_fully_fold here.
5350 (c_parser_asm_statement): Adjust callers.
5351 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5352 and outputs here, and call default_function_array_conversion
5353 on inputs that don't need to be addressable.
5355 2012-12-18 Jakub Jelinek <jakub@redhat.com>
5358 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5359 warning require that both c_common_unsigned_type as well as
5360 c_common_signed_type is the same for both mvl and mvr types.
5362 2012-11-16 Diego Novillo <dnovillo@google.com>
5364 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5366 * c-common.c: Use new vec API in vec.h.
5367 * c-common.h: Likewise.
5368 * c-gimplify.c: Likewise.
5369 * c-pragma.c: Likewise.
5370 * c-pretty-print.c: Likewise.
5371 * c-pretty-print.h: Likewise.
5372 * c-semantics.c: Likewise.
5373 * c-decl.c: Likewise.
5374 * c-parser.c: Likewise.
5375 * c-tree.h: Likewise.
5376 * c-typeck.c: Likewise.
5378 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5381 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5383 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5386 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5387 shadows a function, unless the variable is a function or a
5388 pointer-to-function.
5390 2012-10-12 Jakub Jelinek <jakub@redhat.com>
5393 * c-parser.c (struct c_tree_loc_pair): Removed.
5394 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5395 add location_t * and tree * arguments, fill in array of 3
5396 sizeof_arg trees and corresponding locs.
5397 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5398 c_parser_expr_list callers.
5399 (c_parser_postfix_expression_after_primary): Likewise. Pass
5400 array of 3 sizeof_arg trees and locs (corresponding to first
5401 3 arguments) to sizeof_pointer_memaccess_warning.
5403 2012-10-09 Lawrence Crowl <crowl@google.com>
5405 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5406 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5409 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5412 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5415 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
5418 * c-typeck.c: Include c-common.h.
5419 (enum stv_conv): Moved to c-common.h.
5420 (scalar_to_vector): Moved to c-common.c.
5421 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5422 * Make-lang.in: c-typeck.c depends on c-common.h.
5424 2012-10-04 Arnaud Charlet <charlet@adacore.com>
5426 * c-decl.c (c_write_global_declarations): Fix handling of
5429 2012-09-30 Sharad Singhai <singhai@google.com>
5431 * c-decl.c (c_write_global_declarations): Use a different method
5432 to determine if the dump has ben initialized.
5434 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5437 * c-typeck.c (c_cast_expr): When casting to a type requiring
5438 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5441 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5444 * c-typeck.c (build_unary_op): Pass original argument of
5445 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5446 any C_MAYBE_CONST_EXPR, if it has integer operands.
5447 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5448 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5449 to c_objc_common_truthvalue_conversion, then remove any
5450 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5451 c_objc_common_truthvalue_conversion not
5452 c_common_truthvalue_conversion.
5453 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5454 call note_integer_operands for arguments with integer operands
5455 that are not integer constants.
5457 2012-09-13 Jakub Jelinek <jakub@redhat.com>
5460 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5461 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5463 2012-08-31 Jakub Jelinek <jakub@redhat.com>
5466 * c-convert.c (convert): Don't call fold_convert_loc if
5467 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5468 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5469 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5471 2012-08-24 Jakub Jelinek <jakub@redhat.com>
5474 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5475 for nested and empty_ok arguments in the call to
5476 c_parser_declaration_or_fndef.
5478 2012-08-17 Jakub Jelinek <jakub@redhat.com>
5480 * c-tree.h (c_last_sizeof_arg): Declare.
5481 * c-parser.c (struct c_tree_loc_pair): New type.
5482 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5484 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5485 (c_parser_postfix_expression_after_primary): Likewise. Call
5486 sizeof_pointer_memaccess_warning if needed.
5487 (sizeof_ptr_memacc_comptypes): New function.
5488 * c-typeck.c (c_last_sizeof_arg): New global variable.
5489 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5491 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
5493 * c-lang.h (lang_decl): Add variable_size GTY option.
5495 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5497 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5498 * Make-lang.in: Fix dependencies.
5500 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5502 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5503 and add language Makefile hooks.
5504 * config-lang.in: New file.
5505 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5506 add the required "normal" config-lang.in rules.
5507 * c-lang.h: Moved from gcc/ to here.
5508 * c-tree.h: Likewise.
5509 * c-objc-common.c: Likewise.
5510 * c-objc-common.h: Likewise.
5511 * c-typeck.c: Likewise.
5512 * c-convert.c: Likewise.
5513 * c-lang.c: Likewise.
5514 * c-aux-info.c: Likewise.
5515 * c-errors.c: Likewise.
5516 * gccspec.c: Likewise.
5517 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5518 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5520 Copyright (C) 2012-2018 Free Software Foundation, Inc.
5522 Copying and distribution of this file, with or without modification,
5523 are permitted in any medium without royalty provided the copyright
5524 notice and this notice are preserved.