1 2018-08-13 Martin Sebor <msebor@redhat.com>
3 PR tree-optimization/71625
4 * c-parser.c (c_parser_declaration_or_fndef): Call
7 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
10 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
13 2018-08-01 Martin Sebor <msebor@redhat.com>
15 PR tree-optimization/86650
16 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
17 and TREE_BLOCK (t) from within percent_K_format to this callsite.
19 2018-08-01 Jakub Jelinek <jakub@redhat.com>
22 * c-typeck.c (init_field_decl_cmp): New function.
23 (output_pending_init_elements): Use it for field comparisons
24 instead of pure bit_position comparisons.
26 2018-07-12 Jakub Jelinek <jakub@redhat.com>
28 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
29 type here, instead add "omp declare target implicit" attribute.
30 (finish_decl): Diagnose vars without mappable type here.
32 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
33 Thomas Schwinge <thomas@codesourcery.com>
34 Cesar Philippidis <cesar@codesourcery.com>
36 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
37 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
38 to their non-present_or_* counterparts. Make 'self' an alias to
39 PRAGMA_OACC_CLAUSE_HOST.
40 (c_parser_oacc_data_clause): Update GOMP mappings for
41 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
42 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
43 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
44 Remove support for present_or_* clauses.
45 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
46 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
47 (OACC_DECLARE_CLAUSE_MASK): Likewise.
48 (OACC_DATA_CLAUSE_MASK): Likewise.
49 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
50 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
51 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
52 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
53 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
55 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
57 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
58 * gimple-parser.c (c_parser_gimple_statement): Likewise.
59 (c_parser_gimple_unary_expression): Likewise.
61 2018-06-15 Jakub Jelinek <jakub@redhat.com>
64 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
65 before doing POINTER_DIFF_EXPR.
67 2018-06-07 Marek Polacek <polacek@redhat.com>
70 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
71 for loop initial declarations.
73 2018-05-30 David Pagan <dave.pagan@oracle.com>
76 * c-decl.c (grokdeclarator): Update check for return type warnings.
77 (start_function): Likewise.
78 (finish_function): Likewise.
79 * c-typeck.c (c_finish_return): Update check for return type warnings.
80 Pass OPT_Wreturn_type to pedwarn when appropriate.
82 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
84 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
87 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
89 * gimple-parser.c: Include internal-fn.h.
90 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
91 (c_parser_gimple_call_internal): New function.
92 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
95 2018-05-10 Jakub Jelinek <jakub@redhat.com>
98 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
99 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
101 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
102 fold_offsetof_1, pass argtype as TYPE to it and drop the
105 2018-05-02 David Pagan <dave.pagan@oracle.com>
108 * c-decl.c (old_style_parameter_scope): New function.
109 * c-parser.c (c_parser_postfix_expression): Check for statement
110 expressions in old-style function parameter list declarations.
111 * c-parser.h (old_style_parameter_scope): New extern declaration.
113 2018-04-25 Jakub Jelinek <jakub@redhat.com>
116 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
117 it is not TREE_STATIC.
118 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
119 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
120 its COMPOUND_LITERAL_EXPR_DECL.
122 2018-03-21 Joseph Myers <joseph@codesourcery.com>
124 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
125 where all functions return the same _FloatN or _FloatNx type,
126 treat integer types as _Float64 instead of double.
128 2018-03-21 Jakub Jelinek <jakub@redhat.com>
131 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
132 building vector comparison, diagnose it and return error_mark_node.
134 2018-03-15 Jakub Jelinek <jakub@redhat.com>
137 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
138 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
139 INTEGER_TYPE element type.
141 2018-03-13 David Pagan <dave.pagan@oracle.com>
144 * c-typeck.c (output_init_element): Ensure field initializer
145 expression is always evaluated if there are side effects.
147 2018-03-06 Jakub Jelinek <jakub@redhat.com>
150 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
151 !building_stmt_list_p ().
153 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
156 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
157 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
158 and include the BIND_EXPR in the list of things that need to be
161 2018-02-09 Nathan Sidwell <nathan@acm.org>
164 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
165 to strict_aliasing_warning.
167 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
169 * c-typeck.c (really_start_incremental_init, push_init_level,
170 set_nonincremental_init, output_init_element, process_init_element):
171 Use DECL_UNNAMED_BIT_FIELD.
173 2018-01-31 Marek Polacek <polacek@redhat.com>
176 * c-parser.c (c_parser_compound_statement_nostart): Call
177 expansion_point_location_if_in_system_header.
179 2018-01-17 David Malcolm <dmalcolm@redhat.com>
182 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
185 2018-01-13 Jakub Jelinek <jakub@redhat.com>
188 * c-tree.h (decl_constant_value_1): Add a bool argument.
189 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
190 returning a CONSTRUCTOR if it is true. Use error_operand_p.
191 (decl_constant_value): Adjust caller.
192 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
193 decl_constant_value_1 as IN_INIT. Otherwise, punt if
194 decl_constant_value returns initializer that has BLKmode or
196 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
198 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
199 Alan Hayward <alan.hayward@arm.com>
200 David Sherwood <david.sherwood@arm.com>
202 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
203 TYPE_VECTOR_SUBPARTS.
205 2018-01-03 Jakub Jelinek <jakub@redhat.com>
207 Update copyright years.
209 2018-01-01 Jakub Jelinek <jakub@redhat.com>
212 * c-parser.c (c_parser_braced_init, c_parser_initelt,
213 c_parser_conditional_expression, c_parser_cast_expression,
214 c_parser_sizeof_expression, c_parser_alignof_expression,
215 c_parser_postfix_expression, c_parser_omp_declare_reduction,
216 c_parser_transaction_expression): Use set_error () method instead
217 of setting value member to error_mark_node.
219 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
221 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
222 and _Float<N>X built-in functions.
224 2017-12-22 Jakub Jelinek <jakub@redhat.com>
227 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
228 TYPE_STUB_DECL and call rest_of_type_compilation before processing
229 incomplete vars rather than after it.
232 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
233 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
234 and consider empty ones if there are no other stmts. For
235 -Wunused-value walk all statements before the one only followed by
238 2017-12-22 Mike Stump <mikestump@comcast.net>
239 Eric Botcazou <ebotcazou@adacore.com>
241 * c-parser.c (c_parser_while_statement): Add unroll parameter and
242 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
243 (c_parser_do_statement): Likewise.
244 (c_parser_for_statement): Likewise.
245 (c_parser_statement_after_labels): Adjust calls to above.
246 (c_parse_pragma_ivdep): New static function.
247 (c_parser_pragma_unroll): Likewise.
248 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
249 <PRAGMA_UNROLL>: New case.
251 2017-12-19 Jakub Jelinek <jakub@redhat.com>
253 * c-typeck.c (comptypes_internal, function_types_compatible_p,
254 perform_integral_promotions, digest_init): Replace Yoda conditions
255 with typical order conditions.
256 * c-decl.c (check_bitfield_type_and_width): Likewise.
258 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
260 * c-typeck.c (c_safe_arg_type_equiv_p,
261 c_safe_function_type_cast_p): New function.
262 (build_c_cast): Implement -Wcast-function-type.
264 2017-12-14 Richard Biener <rguenther@suse.de>
267 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
268 like REALPART_EXPR for the behavior of whether its operand
271 2017-12-12 Marek Polacek <polacek@redhat.com>
274 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
276 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
278 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
279 * c-parser.c (add_debug_begin_stmt): New.
280 (c_parser_declaration_or_fndef): Call it.
281 (c_parser_compound_statement_nostart): Likewise.
282 (c_parser_statement_after_labels): Likewise.
283 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
285 2017-12-07 Joseph Myers <joseph@codesourcery.com>
287 * c-decl.c (build_compound_literal): Add parameter alignas_align
288 and set alignment of decl if nonzero.
289 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
290 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
292 (c_parser_struct_declaration): Update syntax comment.
293 (c_parser_type_name): Add alignas_ok argument and pass it to
295 (c_parser_cast_expression): Pass true to c_parser_type_name and
296 give error if a cast used an _Alignas specifier.
297 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
298 give error if sizeof (type-name) used an _Alignas specifier.
299 (c_parser_alignof_expression): Pass true to c_parser_type_name and
300 give error if _Alignof (type-name) used an _Alignas specifier.
301 (c_parser_postfix_expression_after_paren_type): Check specified
302 alignment for a compound literal and pass it to
303 build_compound_literal.
304 * c-parser.h (c_parser_type_name): Update prototype.
305 * c-tree.h (build_compound_literal): Update prototype.
307 2017-12-07 Martin Sebor <msebor@redhat.com>
310 * c-decl.c (c_decl_attributes): Look up existing declaration and
311 pass it to decl_attributes.
313 2017-12-06 David Malcolm <dmalcolm@redhat.com>
316 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
317 reserved for use by the implementation.
319 2017-12-06 David Malcolm <dmalcolm@redhat.com>
321 * c-decl.c: Include "c-family/c-spellcheck.h".
323 2017-12-05 Martin Liska <mliska@suse.cz>
324 Jakub Jelinek <jakub@redhat.com>
326 * c-typeck.c (pointer_diff): Add new argument and instrument
328 (build_binary_op): Similar for pointer comparison.
330 2017-12-01 Jakub Jelinek <jakub@redhat.com>
333 * c-parser.c: Include tree-iterator.h.
334 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
335 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
339 * c-tree.h (decl_constant_value_1): Declare.
340 * c-typeck.c (decl_constant_value_1): New function.
341 (decl_constant_value): Use it.
342 * c-fold.c (c_fully_fold_internal): If in_init, use
343 decl_constant_value_1 instead of decl_constant_value.
345 2017-11-30 Jakub Jelinek <jakub@redhat.com>
347 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
349 2017-11-28 Jakub Jelinek <jakub@redhat.com>
352 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
353 c_switch_covers_all_cases_p returns true.
355 2017-11-28 Julia Koval <julia.koval@intel.com>
356 Sebastian Peryt <sebastian.peryt@intel.com>
358 * Make-lang.in (c/c-array-notation.o): Remove.
359 * c-array-notation.c: Delete.
360 * c-decl.c: Remove cilkplus condition.
361 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
362 c_parser_cilk_verify_simd, c_parser_array_notation,
363 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
364 c_parser_cilk_simd_fn_vector_attrs,
365 c_finish_cilk_simd_fn_tokens): Delete.
366 (c_parser_declaration_or_fndef): Remove cilkplus condition.
367 (c_parser_direct_declarator_inner): Ditto.
368 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
369 (c_parser_attributes, c_parser_compound_statement,
370 c_parser_statement_after_labels, c_parser_if_statement,
371 c_parser_switch_statement, c_parser_while_statement,
372 c_parser_do_statement, c_parser_for_statement,
373 c_parser_unary_expression, c_parser_postfix_expression,
374 c_parser_postfix_expression_after_primary,
375 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
376 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
378 * c-typeck.c (build_array_ref, build_function_call_vec,
380 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
381 c_finish_loop, build_binary_op): Remove cilkplus support.
383 2017-11-28 Jakub Jelinek <jakub@redhat.com>
385 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
388 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
390 * Make-lang.in (c.install-plugin): Install backend import library.
392 2017-11-23 Jakub Jelinek <jakub@redhat.com>
394 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
397 2017-11-23 Mike Stump <mikestump@comcast.net>
398 Eric Botcazou <ebotcazou@adacore.com>
400 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
402 (c_parser_do_statement): Likewise.
403 (c_parser_for_statement): Likewise.
405 2017-11-22 David Malcolm <dmalcolm@redhat.com>
408 * c-objc-common.c (c_tree_printer): Convert penultimate param from
409 bool to bool *. Within '%T' handling, if showing an "aka", use
410 "quoted" param to add appropriate quoting.
412 2017-11-22 Marek Polacek <polacek@redhat.com>
417 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
419 2017-11-21 David Malcolm <dmalcolm@redhat.com>
422 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
423 earlier failed lookups.
425 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
427 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
428 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
430 2017-11-20 David Malcolm <dmalcolm@redhat.com>
433 * c-decl.c: Include "c-family/known-headers.h".
434 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
436 (class suggest_missing_header): Move to known-header.h.
437 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
438 than get_c_name_hint.
440 2017-11-20 David Malcolm <dmalcolm@redhat.com>
442 * c-decl.c (get_c_name_hint): New function.
443 (class suggest_missing_header): New class.
444 (lookup_name_fuzzy): Call get_c_name_hint and use it to
445 suggest missing headers to the user.
447 2017-11-20 David Malcolm <dmalcolm@redhat.com>
449 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
450 Include "c-family/name-hint.h"
451 (implicit_decl_warning): Convert "hint" from
452 const char * to name_hint. Pass location to
453 lookup_name_fuzzy. Suppress any deferred diagnostic if the
454 warning was not printed.
455 (undeclared_variable): Likewise for "guessed_id".
456 (lookup_name_fuzzy): Convert return type from const char *
457 to name_hint. Add location_t param.
458 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
459 Include "c-family/name-hint.h"
460 (c_parser_declaration_or_fndef): Convert "hint" from
461 const char * to name_hint. Pass location to lookup_name_fuzzy.
462 (c_parser_parameter_declaration): Likewise.
464 2017-11-19 Jakub Jelinek <jakub@redhat.com>
468 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
470 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
471 handle_omp_array_sections): Likewise.
472 (digest_init): Don't call decl_constant_value_for_optimization.
473 * c-tree.h (decl_constant_value_for_optimization): Removed.
474 * c-fold.c (c_fold_array_ref): New function.
475 (c_fully_fold_internal): Add LVAL argument, propagate it through
476 recursive calls. For VAR_P call decl_constant_value and
477 unshare if not LVAL and either optimizing or IN_INIT. Remove
478 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
479 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
480 (c_fully_fold): Add LVAL argument, pass it through to
481 c_fully_fold_internal.
482 (decl_constant_value_for_optimization): Removed.
484 2017-11-15 Joseph Myers <joseph@codesourcery.com>
487 * c-parser.c (check_tgmath_function): New function.
488 (enum tgmath_parm_kind): New enum.
489 (c_parser_postfix_expression): Handle __builtin_tgmath.
491 2017-10-31 David Malcolm <dmalcolm@redhat.com>
493 * c-decl.c (implicit_decl_warning): Update for renaming of
494 pedwarn_at_rich_loc and warning_at_rich_loc.
495 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
496 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
497 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
498 (c_parser_struct_or_union_specifier): Likewise for renaming of
500 (c_parser_parameter_declaration): Likewise for renaming of
502 * c-typeck.c (build_component_ref): Likewise.
503 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
504 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
505 (set_init_label): Likewise for renaming of error_at_rich_loc.
507 2017-10-30 Richard Biener <rguenther@suse.de>
509 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
512 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
514 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
515 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
517 2017-10-25 David Malcolm <dmalcolm@redhat.com>
520 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
523 2017-10-25 Jakub Jelinek <jakub@redhat.com>
526 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
527 newdecl to corresponding __builtin_ if any.
529 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
532 * c-decl.c (diagnose_mismatched_decls): Use
533 OPT_Wbuiltin_declaration_mismatch.
535 2017-10-12 David Malcolm <dmalcolm@redhat.com>
537 * c-parser.c (c_parser_require): Add "type_is_unique" param and
538 use it to guard calls to maybe_suggest_missing_token_insertion.
539 (c_parser_parms_list_declarator): Override default value of new
540 "type_is_unique" param to c_parser_require.
541 (c_parser_asm_statement): Likewise.
542 * c-parser.h (c_parser_require): Add "type_is_unique" param,
545 2017-10-11 Nathan Sidwell <nathan@acm.org>
547 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
549 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
551 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
552 operating on trees as wide_ints.
553 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
554 (c_tree_equal): Likewise.
556 2017-10-04 David Malcolm <dmalcolm@redhat.com>
558 * c-decl.c (push_parm_decl): Store c_parm's location into the
560 (build_c_parm): Add "loc" param and store it within the c_parm.
561 * c-parser.c (struct c_parser): Add "last_token_location" field.
562 (c_parser_consume_token): Store location of the token into the
564 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
565 when handling a FUNCTION_DECL, if it doesn't already have them.
566 (c_parser_parameter_declaration): Generate a location for the
567 parameter, and pass it to the call to build_c_parm.
568 * c-tree.h (struct c_parm): Add field "loc".
569 (build_c_parm): Add location_t param.
570 * c-typeck.c (get_fndecl_argument_location): New function.
571 (inform_for_arg): New function.
572 (convert_for_assignment): Use inform_for_arg when dealing with
575 2017-09-29 Jakub Jelinek <jakub@redhat.com>
577 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
579 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
580 don't SET_DECL_C_BIT_FIELD here.
583 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
584 instead of trying to set just TREE_READONLY manually.
586 2017-09-16 Tom de Vries <tom@codesourcery.com>
589 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
592 2017-09-15 Joseph Myers <joseph@codesourcery.com>
595 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
597 (build_conditional_expr): For C11, generate result with excess
598 precision when one argument is an integer and the other is of a
599 type using excess precision.
601 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
603 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
605 2017-09-13 Marek Polacek <polacek@redhat.com>
608 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
609 than expr.original_type.
611 2017-09-12 Nathan Sidwell <nathan@acm.org>
613 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
614 resort_sorted_fields): Moved from c-family/c-common.c.
615 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
617 2017-09-01 Joseph Myers <joseph@codesourcery.com>
620 * c-typeck.c (build_atomic_assign): Handle argument with excess
621 precision. Ensure any EXCESS_PRECISION_EXPR is present in
622 argument passed to build_binary_op and convert_for_assignment but
623 not for call to c_fully_fold.
624 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
625 Ensure build_binary_op is called with argument with original
626 semantic type. Avoid calling c_fully_fold with an
627 EXCESS_PRECISION_EXPR from build_binary_op.
629 2017-09-01 Jakub Jelinek <jakub@redhat.com>
632 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
634 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
635 Alan Hayward <alan.hayward@arm.com>
636 David Sherwood <david.sherwood@arm.com>
638 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
639 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
640 m1 and m2 to the signed equivalent of a fixed-point
643 2017-08-24 David Malcolm <dmalcolm@redhat.com>
645 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
646 than CAN_HAVE_LOCATION_P when determining whether to use the
647 location_t value within "value".
649 2017-08-21 David Malcolm <dmalcolm@redhat.com>
651 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
652 rather than peeking the location of the first token.
653 * c-tree.h (c_expr::get_location): New method.
655 2017-08-21 David Malcolm <dmalcolm@redhat.com>
657 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
658 to check_function_arguments.
660 2017-08-18 Marek Polacek <polacek@redhat.com>
662 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
665 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
668 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
669 (check_bitfield_type_and_width): Don't allow bit-field with
670 warn_if_not_aligned type.
672 2017-08-14 Martin Sebor <msebor@redhat.com>
675 * c-objc-common.c (c_objc_common_init): Handle 'G'.
677 2017-08-11 Marek Polacek <polacek@redhat.com>
680 * c-decl.c (pushtag): Only print inform if the warning was printed.
681 (grokdeclarator): Likewise.
683 2017-08-10 David Malcolm <dmalcolm@redhat.com>
685 * c-parser.c (c_parser_error): Rename to...
686 (c_parser_error_richloc): ...this, making static, and adding
687 "richloc" parameter, passing it to the c_parse_error call,
688 rather than calling c_parser_set_source_position_from_token.
689 (c_parser_error): Reintroduce, reimplementing in terms of the
690 above, converting return type from void to bool.
691 (class token_pair): New class.
692 (struct matching_paren_traits): New struct.
693 (matching_parens): New typedef.
694 (struct matching_brace_traits): New struct.
695 (matching_braces): New typedef.
696 (get_matching_symbol): New function.
697 (c_parser_require): Add param MATCHING_LOCATION, using it to
698 highlight matching "opening" tokens for missing "closing" tokens.
699 (c_parser_skip_until_found): Likewise.
700 (c_parser_static_assert_declaration_no_semi): Convert explicit
701 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
702 class matching_parens, so that the pertinent open parenthesis is
703 highlighted when there are problems locating the close
705 (c_parser_struct_or_union_specifier): Likewise.
706 (c_parser_typeof_specifier): Likewise.
707 (c_parser_alignas_specifier): Likewise.
708 (c_parser_simple_asm_expr): Likewise.
709 (c_parser_braced_init): Likewise, for matching_braces.
710 (c_parser_paren_condition): Likewise, for matching_parens.
711 (c_parser_switch_statement): Likewise.
712 (c_parser_for_statement): Likewise.
713 (c_parser_asm_statement): Likewise.
714 (c_parser_asm_operands): Likewise.
715 (c_parser_cast_expression): Likewise.
716 (c_parser_sizeof_expression): Likewise.
717 (c_parser_alignof_expression): Likewise.
718 (c_parser_generic_selection): Likewise.
719 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
720 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
721 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
722 In case CPP_OPEN_PAREN, pass loc_open_paren to the
723 c_parser_skip_until_found call.
724 (c_parser_objc_class_definition): Use class matching_parens as
726 (c_parser_objc_method_decl): Likewise.
727 (c_parser_objc_try_catch_finally_statement): Likewise.
728 (c_parser_objc_synchronized_statement): Likewise.
729 (c_parser_objc_at_property_declaration): Likewise.
730 (c_parser_oacc_wait_list): Likewise.
731 (c_parser_omp_var_list_parens): Likewise.
732 (c_parser_omp_clause_collapse): Likewise.
733 (c_parser_omp_clause_default): Likewise.
734 (c_parser_omp_clause_if): Likewise.
735 (c_parser_omp_clause_num_threads): Likewise.
736 (c_parser_omp_clause_num_tasks): Likewise.
737 (c_parser_omp_clause_grainsize): Likewise.
738 (c_parser_omp_clause_priority): Likewise.
739 (c_parser_omp_clause_hint): Likewise.
740 (c_parser_omp_clause_defaultmap): Likewise.
741 (c_parser_oacc_single_int_clause): Likewise.
742 (c_parser_omp_clause_ordered): Likewise.
743 (c_parser_omp_clause_reduction): Likewise.
744 (c_parser_omp_clause_schedule): Likewise.
745 (c_parser_omp_clause_num_teams): Likewise.
746 (c_parser_omp_clause_thread_limit): Likewise.
747 (c_parser_omp_clause_aligned): Likewise.
748 (c_parser_omp_clause_linear): Likewise.
749 (c_parser_omp_clause_safelen): Likewise.
750 (c_parser_omp_clause_simdlen): Likewise.
751 (c_parser_omp_clause_depend): Likewise.
752 (c_parser_omp_clause_map): Likewise.
753 (c_parser_omp_clause_device): Likewise.
754 (c_parser_omp_clause_dist_schedule): Likewise.
755 (c_parser_omp_clause_proc_bind): Likewise.
756 (c_parser_omp_clause_uniform): Likewise.
757 (c_parser_omp_for_loop): Likewise.
758 (c_parser_cilk_clause_vectorlength): Likewise.
759 (c_parser_cilk_clause_linear): Likewise.
760 (c_parser_transaction_expression): Likewise.
761 * c-parser.h (c_parser_require): Add param matching_location with
762 default UNKNOWN_LOCATION.
763 (c_parser_error): Convert return type from void to bool.
764 (c_parser_skip_until_found): Add param matching_location with
765 default UNKNOWN_LOCATION.
767 2017-08-09 Marek Polacek <polacek@redhat.com>
769 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
770 * c-tree.h (build_external_ref): Update declaration.
771 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
772 (build_external_ref): Change the type of a parameter to bool.
773 (parser_build_binary_op): Use true/false instead of 1/0.
774 (pointer_diff): Likewise.
775 (build_modify_expr): Likewise.
776 (set_designator): Change the type of a parameter to bool.
777 (set_init_index): Use true/false instead of 1/0.
778 (set_init_label): Likewise.
779 (output_init_element): Change the type of a parameter to bool.
780 (output_pending_init_elements): Use true/false instead of 1/0.
781 (process_init_element): Likewise.
782 (build_binary_op): Change the type of a parameter to bool.
784 2017-08-09 Marek Polacek <polacek@redhat.com>
787 * c-typeck.c (pedwarn_init): Make the function take a variable list.
788 Call emit_diagnostic_valist instead of pedwarn.
789 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
790 Print the relevant types in diagnostics.
792 2017-08-09 Marek Polacek <polacek@redhat.com>
795 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
796 build_conditional_expr.
797 * c-parser.c (c_parser_conditional_expression): Create locations for
798 EXP1 and EXP2 from their source ranges. Pass the locations down to
799 build_conditional_expr.
800 * c-tree.h (build_conditional_expr): Update declaration.
801 * c-typeck.c (build_conditional_expr): Add location_t parameters.
802 For -Wsign-compare, also print the types.
804 2017-08-08 Martin Liska <mliska@suse.cz>
806 * c-convert.c: Include header files.
807 * c-typeck.c: Likewise.
809 2017-08-07 Martin Liska <mliska@suse.cz>
811 * c-parser.c (c_parser_attributes): Canonicalize name of an
814 2017-08-02 Marek Polacek <polacek@redhat.com>
817 * c-parser.c (c_parser_unary_expression): Use set_error.
821 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
822 warnings. Avoid walking MACRO_MAP_LOCATIONS.
824 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
825 Martin Liska <mliska@suse.cz>
827 * c-typeck.c (c_finish_goto_label): Build gimple predict
830 2017-07-31 Martin Liska <mliska@suse.cz>
833 * c-convert.c (convert): Guard condition with flag_sanitize_p
834 also with current_function_decl non-null equality.
835 * c-decl.c (grokdeclarator): Likewise.
836 * c-typeck.c (build_binary_op): Likewise.
838 2017-07-25 Marek Polacek <polacek@redhat.com>
840 * c-decl.c (grokfield): Remove local variable.
842 2017-07-25 Marek Polacek <polacek@redhat.com>
845 * c-parser.c (c_parser_else_body): Don't warn about multistatement
846 macro expansion if the body is in { }.
847 (c_parser_while_statement): Likewise.
848 (c_parser_for_statement): Likewise.
850 2017-07-18 Nathan Sidwell <nathan@acm.org>
852 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
854 2017-07-14 David Malcolm <dmalcolm@redhat.com>
856 * c-decl.c (implicitly_declare): When suggesting a missing
857 #include, provide a fix-it hint.
859 2017-07-06 David Malcolm <dmalcolm@redhat.com>
861 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
862 and call that instead.
863 * c-tree.h (selftest::run_c_tests): New decl.
865 2017-06-26 Marek Polacek <polacek@redhat.com>
868 * c-parser.c (c_parser_if_body): Set the location of the
869 body of the conditional after parsing all the labels. Call
870 warn_for_multistatement_macros.
871 (c_parser_else_body): Likewise.
872 (c_parser_switch_statement): Likewise.
873 (c_parser_while_statement): Likewise.
874 (c_parser_for_statement): Likewise.
875 (c_parser_statement): Add a default argument. Save the location
876 after labels have been parsed.
877 (c_parser_c99_block_statement): Likewise.
879 2017-06-19 Richard Biener <rguenther@suse.de>
881 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
882 negated _Literals to parse _Literal (int) -1.
884 2017-06-13 Martin Liska <mliska@suse.cz>
887 * c-convert.c (convert): Use sanitize_flags_p.
888 * c-decl.c (grokdeclarator): Likewise.
889 * c-typeck.c (convert_for_assignment): Likewise.
890 (c_finish_return): Likewise.
891 (build_binary_op): Likewise.
893 2017-06-08 Jakub Jelinek <jakub@redhat.com>
896 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
897 to sizetype before size_binop.
899 2017-06-07 Jakub Jelinek <jakub@redhat.com>
901 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
904 2017-06-06 Marek Polacek <polacek@redhat.com>
907 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
909 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
911 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
913 * c-parser.c (c_parser_binary_expression): Implement the
914 -Wsizeof_pointer_div warning.
915 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
916 from a parenthesized expression.
917 (c_parser_expr_list): Use c_last_sizeof_loc.
918 * c-tree.h (c_last_sizeof_loc): New external.
919 * c-typeck.c (c_last_sizeof_loc): New variable.
920 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
922 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
925 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
927 2017-05-30 David Malcolm <dmalcolm@redhat.com>
929 * c-objc-common.c (c_tree_printer): Gain bool and const char **
932 2017-05-24 Martin Sebor <msebor@redhat.com>
935 * c-fold.c (c_fully_fold_internal): Adjust.
936 * c-typeck.c (parser_build_unary_op): Adjust.
938 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
940 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
941 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
944 2017-05-23 Marek Polacek <polacek@redhat.com>
946 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
949 2017-05-22 Jakub Jelinek <jakub@redhat.com>
951 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
952 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
953 it returned invariant. Call tree_invariant_p unconditionally
954 afterwards to decide whether to return expr or op0.
956 2017-05-22 Nathan Sidwell <nathan@acm.org>
958 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
960 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
962 * c-parser.c (c_parser_omp_clause_default): Handle
963 "OMP_CLAUSE_DEFAULT_PRESENT".
965 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
967 * config-lang.in (gtfiles): Add c-family/c-format.c.
969 2017-05-18 Nathan Sidwell <nathan@acm.org>
971 * c-decl.c (pushdecl_top_level): Delete unused function.
973 2017-05-18 Marek Polacek <polacek@redhat.com>
975 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
976 (check_earlier_gotos): Likewise.
977 (define_label): Likewise.
978 (pending_xref_error): Likewise.
979 (smallest_type_quals_location): Likewise.
980 (grokdeclarator): Likewise.
981 (grokparms): Likewise.
982 (identifier_global_value): Likewise.
983 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
984 (find_init_member): Likewise.
986 2017-05-18 Marek Polacek <polacek@redhat.com>
988 * c-decl.c (start_decl): Use false/true instead of 0/1.
989 (grokdeclarator): Likewise.
990 (finish_struct): Likewise.
991 (start_function): Change the return type to bool. Use false/true
993 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
994 * c-tree.h (start_function): Update.
995 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
996 (set_designator): Change the return type to bool. Use false/true
999 2017-05-17 Marek Polacek <polacek@redhat.com>
1001 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
1002 * c-typeck.c: Likewise.
1004 2017-05-17 Marek Polacek <polacek@redhat.com>
1007 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
1008 DECL_IGNORED_P even for non-static compound literals.
1010 2017-05-17 Martin Liska <mliska@suse.cz>
1012 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
1013 use it instead of int type.
1015 2017-05-17 Marek Polacek <polacek@redhat.com>
1017 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
1019 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
1020 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
1021 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
1022 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
1024 (c_parser_conditional_expression): Likewise.
1025 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
1026 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
1027 (process_init_element): Likewise.
1028 (build_binary_op): Likewise.
1029 (handle_omp_array_sections_1): Likewise.
1031 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
1033 * c-parser.c (c_parser_omp_clause_num_gangs)
1034 (c_parser_omp_clause_num_workers)
1035 (c_parser_omp_clause_vector_length): Merge functions into...
1036 (c_parser_oacc_single_int_clause): ... this new function. Adjust
1039 2017-05-11 Nathan Sidwell <nathan@acm.org>
1041 * gimple-parser.c: Don't #include tree-dump.h.
1043 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1046 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
1048 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1051 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1052 incorrect __MEM syntax.
1054 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1057 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1060 2017-05-09 Nathan Sidwell <nathan@acm.org>
1062 * c-tree.h (pushdecl): Declare.
1064 2017-05-05 David Malcolm <dmalcolm@redhat.com>
1066 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1067 with diagnostic_report_diagnostic.
1068 * c-errors.c (pedwarn_c99): Likewise.
1069 (pedwarn_c90): Likewise.
1071 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1074 * c-gimplify.c (c_gimplify_expr): Remove calls to
1075 cilk_gimplifY_call_params_in_spawned_fn.
1077 2017-04-25 David Malcolm <dmalcolm@redhat.com>
1079 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1080 hint for removing extra semicolon.
1082 2017-04-21 Jakub Jelinek <jakub@redhat.com>
1085 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1086 enabled, set specs->type to integer_type_node.
1088 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
1090 * c-array-notation.c: Fix typo in comment.
1092 2017-03-29 Marek Polacek <polacek@redhat.com>
1095 * c-decl.c (finish_decl): Check VAR_P.
1097 2017-03-27 Jakub Jelinek <jakub@redhat.com>
1100 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1101 * c-typeck.c (c_mark_addressable): Likewise. Look through
1102 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1104 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1106 2017-03-23 Marek Polacek <polacek@redhat.com>
1108 * c-tree.h: Remove a C_RID_YYCODE reference.
1110 2017-03-21 Jakub Jelinek <jakub@redhat.com>
1113 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1114 optional COMPOUND_EXPR with ubsan instrumentation.
1116 2017-03-17 Marek Polacek <polacek@redhat.com>
1118 * c-parser.c: Add C11 references.
1120 2017-03-15 Marek Polacek <polacek@redhat.com>
1122 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1124 2017-03-11 Marek Polacek <polacek@redhat.com>
1126 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1128 2017-03-10 David Malcolm <dmalcolm@redhat.com>
1130 PR translation/79848
1131 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1133 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1135 2017-03-09 Marek Polacek <polacek@redhat.com>
1138 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1139 parameter declarations with initializers.
1141 2017-03-09 Jakub Jelinek <jakub@redhat.com>
1144 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1147 2017-03-07 Jakub Jelinek <jakub@redhat.com>
1150 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1151 for "may only be used in compound statements" diagnostics, change it
1152 such that the same translatable string is used for all pragmas. For
1153 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1155 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1156 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1157 "may only be used in compound statements" diagnostics, such that the
1158 same translatable string is used for all pragmas.
1160 2017-03-04 Marek Polacek <polacek@redhat.com>
1163 * c-decl.c (implicit_decl_warning): Add missing space.
1165 2017-03-03 Marek Polacek <polacek@redhat.com>
1168 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1169 current_function_prototype_arg_types is error_mark_node. Fix
1170 formatting. Use TREE_VALUE instead of TREE_TYPE.
1172 2017-03-03 Jakub Jelinek <jakub@redhat.com>
1175 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1176 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1177 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1181 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1182 instead of %<_Generic>.
1183 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1184 (c_parser_omp_target_exit_data): Use %<release%> instead of
1187 2017-02-28 Jakub Jelinek <jakub@redhat.com>
1189 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1190 instead of just cond ? "..." : "...".
1191 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1192 for "enter"/"exit" keyword.
1193 (c_finish_oacc_routine): Don't use %s to supply portions of the
1196 2017-02-24 Jakub Jelinek <jakub@redhat.com>
1199 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1200 handle -Wrestrict here.
1201 * c-typeck.c (build_function_call_vec): Adjust
1202 check_function_arguments caller.
1204 2017-02-23 Richard Biener <rguenther@suse.de>
1207 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1208 to initialize c_exprs to return.
1209 (c_parser_gimple_binary_expression): Likewise.
1210 (c_parser_gimple_unary_expression): Likewise.
1211 (c_parser_gimple_postfix_expression): Likewise.
1213 2017-02-22 Marek Polacek <polacek@redhat.com>
1216 * c-typeck.c (convert_arguments): Handle error_mark_node.
1218 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1220 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1221 value of c_parser_parse_ssa_name against error_mark_node and emit
1222 error if ssa name is anonymous and written as default definition.
1224 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1226 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1229 2017-02-16 Jakub Jelinek <jakub@redhat.com>
1232 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1233 ignore #pragma omp target even when not followed by identifier.
1235 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1237 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1238 (c_parser_gimple_unary_expression): Likewise.
1240 2017-02-13 Jakub Jelinek <jakub@redhat.com>
1242 * c-parser.c (c_parser_oacc_declare): Add missing space in
1245 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1248 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1249 set_c_expr_source_range when parsing ssa-name.
1251 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1252 Richard Biener <rguenther@suse.de>
1254 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1255 building IL when arguments are error_mark_node.
1256 (c_parser_gimple_unary_expression): Likewise.
1257 (c_parser_gimple_if_stmt): Likewise.
1258 (c_parser_gimple_switch_stmt): Likewise.
1259 (c_parser_gimple_return_stmt): Likewise.
1260 (c_parser_parse_ssa_name): When name lookup fails do not build
1261 an SSA name. Use undeclared rather than not declared in error
1264 2017-02-09 Marek Polacek <polacek@redhat.com>
1267 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1268 instead of c_parser_skip_until_found.
1270 2017-02-09 Jakub Jelinek <jakub@redhat.com>
1273 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1274 symtab_node::get on automatic variables.
1276 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1277 Chung-Lin Tang <cltang@codesourcery.com>
1279 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1280 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1282 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1284 2017-02-07 Richard Biener <rguenther@suse.de>
1286 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1287 (c_parser_gimple_postfix_expression_after_primary):
1288 Do not use c_build_function_call_vec to avoid folding and promotion.
1291 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1294 * c-decl.c (pop_scope): Pass main_input_filename to
1295 build_translation_unit_decl.
1297 2017-01-24 David Malcolm <dmalcolm@redhat.com>
1299 * c-parser.c: Include "read-rtl-function.h" and
1301 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1302 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1303 production. Update for renaming of field "gimple_pass" to
1304 "gimple_or_rtl_pass". If __RTL was seen, call
1305 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1306 to an auto_timevar, to cope with early exit.
1307 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1308 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1309 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1311 (c_parser_parse_rtl_body): New function.
1312 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1313 (struct c_declspecs): Rename field "gimple_pass" to
1314 "gimple_or_rtl_pass". Add field "rtl_p".
1315 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1316 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1317 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1318 (c_parser_gimple_or_rtl_pass_list): ...this.
1320 2017-01-20 Marek Polacek <polacek@redhat.com>
1323 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1325 2017-01-13 Richard Biener <rguenther@suse.de>
1327 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1330 2017-01-13 Richard Biener <rguenther@suse.de>
1332 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1333 _Literal ( type-name ) number.
1335 2017-01-12 Richard Biener <rguenther@suse.de>
1337 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1340 2017-01-11 Jakub Jelinek <jakub@redhat.com>
1343 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1346 2017-01-11 Richard Biener <rguenther@suse.de>
1349 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1350 returns on parse errors.
1352 2017-01-04 Marek Polacek <polacek@redhat.com>
1355 * c-parser.c (c_parser_postfix_expression): Mark zero character
1356 constants by setting original_type in c_expr.
1357 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1358 with a zero character constant.
1359 (char_type_p): New function.
1361 2017-01-04 David Malcolm <dmalcolm@redhat.com>
1363 * c-parser.c (c_parser_declaration_or_fndef): Create a
1364 rich_location at init_loc and parse it to start_init.
1365 (last_init_list_comma): New global.
1366 (c_parser_braced_init): Update last_init_list_comma when parsing
1367 commas. Pass it to pop_init_level. Pass location of closing
1368 brace to pop_init_level.
1369 (c_parser_postfix_expression_after_paren_type): Create a
1370 rich_location at type_loc and parse it to start_init.
1371 (c_parser_omp_declare_reduction): Likewise for loc.
1372 * c-tree.h (start_init): Add rich_location * param.
1373 (pop_init_level): Add location_t param.
1374 * c-typeck.c (struct initializer_stack): Add field
1375 "missing_brace_richloc".
1376 (start_init): Add richloc param, use it to initialize
1377 the stack node's missing_brace_richloc.
1378 (last_init_list_comma): New decl.
1379 (finish_implicit_inits): Pass last_init_list_comma to
1381 (push_init_level): When finding missing open braces, add fix-it
1382 hints to the richloc.
1383 (pop_init_level): Add "insert_before" param and pass it
1384 when calling pop_init_level. Add fixits about missing
1385 close braces to any richloc. Use the richloc for the
1386 -Wmissing-braces warning.
1387 (set_designator): Pass last_init_list_comma to pop_init_level.
1388 (process_init_element): Likewise.
1390 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1392 Update copyright years.
1394 2016-12-21 Jakub Jelinek <jakub@redhat.com>
1397 * c-typeck.c (build_function_call_vec): If check_function_arguments
1398 returns true, set TREE_NO_WARNING on CALL_EXPR.
1401 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1402 to *expr instead of overwriting it.
1404 2016-12-20 Richard Biener <rguenther@suse.de>
1406 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1408 (c_parser_gimple_statement): Only build assigns for non-error
1410 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1412 2016-12-14 Martin Jambor <mjambor@suse.cz>
1414 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1416 (c_finish_oacc_routine): Adjusted call to
1417 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1418 to use their new names.
1419 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1421 (c_parser_oacc_update): Likewise.
1422 (c_parser_omp_simd): Likewise.
1423 (c_parser_omp_target_update): Likewise.
1424 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1425 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1427 (c_finish_omp_cancellation_point): Likewise.
1428 * gimple-parser.c: Do not include omp-low.h
1430 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1431 James Norris <jnorris@codesourcery.com>
1433 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1434 EXIT_DATA,WAIT} are not used in compound statements.
1435 (c_parser_oacc_enter_exit_data): Update diagnostics.
1437 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1440 * c-decl.c (diagnose_mismatched_decls): Use
1441 OPT_Wbuiltin_declaration_mismatch here too.
1443 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
1444 Alan Hayward <alan.hayward@arm.com>
1445 David Sherwood <david.sherwood@arm.com>
1447 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1448 (make_label, finish_struct): Likewise.
1450 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
1451 Richard Biener <rguenther@suse.de>
1453 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1454 * config-lang.in (gtfiles): Add c/c-parser.h.
1455 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1456 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1457 * c-parser.c (enum c_id_kind, struct c_token,
1458 c_parser_next_token_is, c_parser_next_token_is_not,
1459 c_parser_next_token_is_keyword,
1460 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1462 * c-parser.h: ... new header.
1463 * c-parser.c: Include c-parser.h and gimple-parser.h.
1464 (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): Export.
1470 (c_parser_tokens_buf): New function.
1471 (c_parser_error): Likewise.
1472 (c_parser_set_error): Likewise.
1473 (c_parser_declspecs): Handle RID_GIMPLE.
1474 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1475 via c_parser_parse_gimple_body.
1476 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1477 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1478 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1479 c_parser_error, c_parser_require, c_parser_skip_until_found,
1480 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1481 c_parser_type_name): Declare.
1482 (struct c_parser): Declare forward.
1483 (c_parser_tokens_buf): Declare.
1484 (c_parser_error): Likewise.
1485 (c_parser_set_error): Likewise.
1486 * gimple-parser.c: New file.
1487 * gimple-parser.h: Likewise.
1489 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1492 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1495 2016-09-11 Le-Chun Wu <lcwu@google.com>
1496 Mark Wielaard <mjw@redhat.com>
1498 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1499 to the given -Wshadow= variant.
1501 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1503 * c-typeck.c: Include memmodel.h.
1505 2016-10-13 Jakub Jelinek <jakub@redhat.com>
1508 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1509 instead of lhd_return_null_tree_v.
1511 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1514 * c-decl.c (smallest_type_quals_location): New static function.
1515 (grokdeclarator): Try to find the correct location for an ignored
1518 2016-09-26 Marek Polacek <polacek@redhat.com>
1521 * c-decl.c (pop_scope): Add gcc_fallthrough.
1523 2016-09-26 Marek Polacek <polacek@redhat.com>
1526 * c-parser.c (struct c_token): Add flags field.
1527 (c_lex_one_token): Pass it to c_lex_with_flags.
1528 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1529 into IFN_FALLTHROUGH.
1530 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1531 attribute fallthrough after a case label or default label.
1532 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1534 2016-09-24 Marek Polacek <polacek@redhat.com>
1537 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1538 have boolean value. Warn about ++/-- on booleans.
1540 2016-09-23 Jakub Jelinek <jakub@redhat.com>
1542 * c-parser.c (incomplete_record_decls): Remove unnecessary
1543 = vNULL initialization of file scope vec.
1545 2016-09-16 Marek Polacek <polacek@redhat.com>
1547 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1549 2016-09-14 Marek Polacek <polacek@redhat.com>
1551 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1552 (fix_array_notation_expr): Likewise.
1553 * c-decl.c (finish_decl): Likewise.
1554 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1555 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1556 (function_to_pointer_conversion): Use false instead of 0.
1557 (convert_lvalue_to_rvalue): Likewise.
1558 (parser_build_unary_op): Likewise.
1559 (build_atomic_assign): Likewise.
1560 (build_unary_op): Change nonconvert parameter type to bool, use
1561 true/false instead of 1/0.
1562 (build_binary_op): Use true instead of 1.
1564 2016-09-13 David Malcolm <dmalcolm@redhat.com>
1566 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1567 of add_fixit_insert to add_fixit_insert_before.
1569 2016-09-13 Marek Polacek <polacek@redhat.com>
1571 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1574 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1577 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1578 COMPOUND_EXPR to warn_for_omitted_condop.
1580 2016-09-07 David Malcolm <dmalcolm@redhat.com>
1582 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1583 c_get_substring_location for this new langhook.
1585 2016-09-02 Jakub Jelinek <jakub@redhat.com>
1588 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1590 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1591 instead of mark_exp_read on low_bound/length expression.
1592 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1593 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1594 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1595 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1596 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1597 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1598 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1599 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1600 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1601 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1602 instead of mark_expr_read.
1603 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1604 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1605 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1606 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1607 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1608 array section bases outside of depend clause, for depend clause
1609 use convert_lvalue_to_rvalue on the base.
1610 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1611 linear, aligned, map, to and from clauses.
1612 (c_omp_clause_copy_ctor): New function.
1614 2016-09-01 Marek Polacek <polacek@redhat.com>
1617 * c-typeck.c (composite_type): Add FALLTHRU comment.
1619 2016-08-31 David Malcolm <dmalcolm@redhat.com>
1621 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1622 to the insertion fixits for "struct", "union", and "enum".
1624 2016-08-30 David Malcolm <dmalcolm@redhat.com>
1626 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1627 rather than add_fixit_misspelled_id.
1628 (undeclared_variable): Likewise.
1629 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1630 now-redundant "here" params from add_fixit_insert method calls.
1631 (c_parser_parameter_declaration): Likewise.
1632 * c-typeck.c (build_component_ref): Remove now-redundant range
1633 param from add_fixit_replace method calls.
1635 2016-08-25 Marek Polacek <polacek@redhat.com>
1637 * c-typeck.c (parser_build_binary_op): Pass LHS to
1638 warn_logical_not_parentheses.
1640 2016-08-25 Marek Polacek <polacek@redhat.com>
1643 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1644 or _FloatN or _FloatNx is not supported.
1645 (finish_declspecs): Set type to integer_type_node when _FloatN or
1646 _FloatNx is not supported.
1648 2016-08-19 Joseph Myers <joseph@codesourcery.com>
1651 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1652 (struct c_declspecs): Add field floatn_nx_idx.
1653 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1654 and _FloatNx type specifiers.
1655 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1656 (c_parser_declspecs, c_parser_attribute_any_word)
1657 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1658 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1659 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1660 narrower than double.
1662 2016-08-12 Jakub Jelinek <jakub@redhat.com>
1663 Martin Liska <mliska@suse.cz>
1666 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1667 % to determine val element to change. Assert that
1668 wchar_bytes * charwidth fits into val array.
1670 2016-08-12 Marek Polacek <polacek@redhat.com>
1673 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1674 (c_parser_postfix_expression): Likewise.
1675 * c-typeck.c (build_unary_op): Adjust fall through comment.
1676 (c_mark_addressable): Likewise.
1678 2016-08-11 Jakub Jelinek <jakub@redhat.com>
1681 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1682 array member through typedef, for orig_qual_indirect == 0 clear
1685 2016-08-08 David Malcolm <dmalcolm@redhat.com>
1688 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1689 this up to selftest::run_c_tests.
1690 (selftest::run_c_tests): New function.
1692 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1694 * c-parser.c (struct oacc_routine_data): Add error_seen and
1695 fndecl_seen members.
1696 (c_finish_oacc_routine): Use these.
1697 (c_parser_declaration_or_fndef): Adjust.
1698 (c_parser_oacc_routine): Likewise. Support more C language
1699 constructs, and improve diagnostics. Move pragma context
1701 (c_parser_pragma): ... here.
1703 * c-parser.c (struct oacc_routine_data): New.
1704 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1706 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1707 declare target" attribute.
1709 2016-08-01 Jan Beulich <jbeulich@suse.com>
1711 * c-fold.c (c_fully_fold_internal): Also emit shift count
1712 warnings for vector types.
1713 * c-typeck.c (build_binary_op): Likewise.
1715 2016-07-29 Marek Polacek <polacek@redhat.com>
1718 * c-decl.c (finish_struct): Rephrase an error message.
1721 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1722 to error node for invalid code.
1725 * c-decl.c (implicitly_declare): Return decl early not only for
1726 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1728 2016-07-29 Jakub Jelinek <jakub@redhat.com>
1731 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1732 on GNU extern inline functions.
1734 2016-07-29 Marek Polacek <polacek@redhat.com>
1737 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1740 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
1742 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1744 2016-07-20 David Malcolm <dmalcolm@redhat.com>
1746 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1748 (best_macro_match): Likewise, converting from a typedef to a
1750 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1751 (lookup_name_fuzzy): Update for change of best_macro_match to a
1752 subclass with a ctor that calls cpp_forall_identifiers.
1754 2016-07-20 David Malcolm <dmalcolm@redhat.com>
1756 * c-decl.c (implicit_decl_warning): Update for conversion of
1757 return type of lookup_name_fuzzy to const char *.
1758 (undeclared_variable): Likewise.
1759 (lookup_name_fuzzy): Convert return type from tree to
1761 * c-parser.c (c_parser_declaration_or_fndef): Update for
1762 conversion of return type of lookup_name_fuzzy to const char *.
1763 (c_parser_parameter_declaration): Likewise.
1765 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1767 * c-parser.c (c_parser_oacc_declare): Don't scan for
1769 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1770 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1771 zero-length subarrays.
1773 2016-07-15 Jakub Jelinek <jakub@redhat.com>
1776 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1777 instead of FUZZY_LOOKUP_NAME.
1778 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1779 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1781 2016-07-14 Jakub Jelinek <jakub@redhat.com>
1784 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1786 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1788 * c-parser.c (c_parser_generic_selection): Make type of variable
1790 (c_parser_omp_declare_simd): Likewise.
1792 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1794 * c-decl.c (struct c_struct_parse_info): Change member types
1795 from vec to auto_vec.
1796 (start_struct): Adjust.
1797 (finish_struct): Likewise.
1799 2016-07-02 Jakub Jelinek <jakub@redhat.com>
1802 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1804 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1806 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1807 Move pragma context checking into...
1808 (c_parser_omp_cancellation_point): ... here, and improve
1809 diagnostic messages.
1810 * c-typeck.c (c_finish_omp_cancel)
1811 (c_finish_omp_cancellation_point): Improve diagnostic messages.
1813 2016-06-29 Jakub Jelinek <jakub@redhat.com>
1816 * c-typeck.c (c_build_qualified_type): Don't clear
1817 C_TYPE_INCOMPLETE_VARS for the main variant.
1819 2016-06-28 Martin Sebor <msebor@redhat.com>
1822 * c-typeck.c (output_init_element): Diagnose incompatible types
1823 before non-constant initializers.
1825 2016-06-28 Jakub Jelinek <jakub@redhat.com>
1827 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1829 2016-06-23 Andi Kleen <ak@linux.intel.com>
1831 * Make-lang.in: Add support for autofdo.
1833 2016-06-22 David Malcolm <dmalcolm@redhat.com>
1836 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1837 (implicit_decl_warning): When issuing warnings for implicit
1838 declarations, attempt to provide a suggestion via
1840 (undeclared_variable): Likewise when issuing errors.
1841 (lookup_name_in_scope): Likewise.
1842 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1843 (best_macro_match): New typedef.
1844 (find_closest_macro_cpp_cb): New function.
1845 (lookup_name_fuzzy): New function.
1846 * c-parser.c: Include gcc-rich-location.h.
1847 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1848 (c_keyword_starts_typename): ...this new function.
1849 (c_parser_declaration_or_fndef): When issuing errors about
1850 missing "struct" etc, add a fixit. For other kinds of errors,
1851 attempt to provide a suggestion via lookup_name_fuzzy.
1852 (c_parser_parms_declarator): When looking ahead to detect typos in
1853 type names, also reject CPP_KEYWORD.
1854 (c_parser_parameter_declaration): When issuing errors about
1855 unknown type names, attempt to provide a suggestion via
1857 * c-tree.h (c_keyword_starts_typename): New prototype.
1859 2016-06-20 Joseph Myers <joseph@codesourcery.com>
1862 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1863 c_common_type returns error_mark_node.
1865 2016-06-19 Martin Sebor <msebor@redhat.com>
1868 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1869 __alignof__ (expression).
1871 2016-06-14 David Malcolm <dmalcolm@redhat.com>
1873 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1875 2016-06-14 David Malcolm <dmalcolm@redhat.com>
1877 * c-typeck.c (build_component_ref): Simplify fixit code by
1878 using gcc_rich_location::add_fixit_misspelled_id.
1879 (set_init_label): Likewise.
1881 2016-06-13 David Malcolm <dmalcolm@redhat.com>
1883 * c-parser.c (c_parser_initelt): Provide location of name for new
1884 location_t param of set_init_label.
1885 * c-tree.h (set_init_label): Add location_t param.
1886 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1887 param and use it when issuing error messages about unrecognized
1888 field names. Attempt to provide a fixit hint if appropriate,
1889 otherwise update the error message to provide the type name.
1891 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1894 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1897 2016-06-08 Martin Sebor <msebor@redhat.com>
1898 Jakub Jelinek <jakub@redhat.com>
1902 * c-typeck.c (convert_arguments): Don't promote last argument
1903 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1905 2016-06-08 Marek Polacek <polacek@redhat.com>
1908 * c-decl.c (grokdeclarator): Check TYPE_P.
1911 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1914 2016-06-07 David Malcolm <dmalcolm@redhat.com>
1916 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1917 and structure element reference, capture the location of the
1918 element name token and pass it to build_component_ref.
1919 (c_parser_postfix_expression_after_primary): Likewise for
1920 structure element dereference.
1921 (c_parser_omp_variable_list): Likewise for
1922 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1923 * c-tree.h (build_component_ref): Add location_t param.
1924 * c-typeck.c (build_component_ref): Add location_t param
1925 COMPONENT_LOC. Use it, if available, when issuing hints about
1926 mispelled member names to provide a fixit replacement hint.
1928 2016-06-06 Marek Polacek <polacek@redhat.com>
1931 * c-parser.c (c_parser_direct_declarator): Set location.
1933 2016-06-06 Marek Polacek <polacek@redhat.com>
1935 * c-typeck.c (comptypes_internal): Handle comparisons of
1936 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1937 TYPE_REF_CAN_ALIAS_ALL.
1939 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1941 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1942 arguments as addressable when async clause exists.
1944 2016-05-30 Jakub Jelinek <jakub@redhat.com>
1947 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1948 when combined with target construct.
1950 2016-05-26 Jakub Jelinek <jakub@redhat.com>
1952 * c-parser.c (c_parser_omp_clause_schedule): Warn if
1953 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1955 2016-05-25 Marek Polacek <polacek@redhat.com>
1958 * c-decl.c (c_make_fname_decl): Don't check seen_error.
1961 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1963 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
1965 * c-parser.c (c_parser_oacc_declare): Add support for
1966 GOMP_MAP_FIRSTPRIVATE_POINTER.
1967 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1968 argument with enum c_omp_region_type ort.
1969 (handle_omp_array_sections): Likewise. Update call to
1970 handle_omp_array_sections_1.
1971 (c_finish_omp_clauses): Add specific errors and warning messages for
1972 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
1973 call to handle_omp_array_sections.
1975 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
1977 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1979 2016-05-24 Richard Biener <rguenther@suse.de>
1983 * c-typeck.c (build_array_ref): Do not complain about indexing
1984 non-lvalue vectors. Adjust for function name change.
1986 2016-05-20 Martin Sebor <msebor@redhat.com>
1989 * c-typeck.c (error_init): Use
1990 expansion_point_location_if_in_system_header.
1991 (warning_init): Same.
1993 2016-05-19 David Malcolm <dmalcolm@redhat.com>
1996 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
1998 (c_parser_postfix_expression): Likewise.
1999 * c-tree.h (c_expr::set_error): New method.
2000 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
2001 that result's range is initialized.
2003 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
2005 * c-typeck.c (parser_build_unary_op): Fix formatting.
2007 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2009 * c-decl.c (grokdeclarator): Remove errmsg and use of
2010 targetm.invalid_return_type.
2011 (grokparms): Remove errmsg and use of
2012 targetm.invalid_parameter_type.
2014 2016-05-13 Joseph Myers <joseph@codesourcery.com>
2016 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
2017 function return type.
2019 2016-05-12 Marek Polacek <polacek@redhat.com>
2022 * c-decl.c (build_compound_literal): Pass LOC down to
2023 c_incomplete_type_error.
2024 * c-tree.h (require_complete_type): Adjust declaration.
2025 (c_incomplete_type_error): Likewise.
2026 * c-typeck.c (require_complete_type): Add location parameter, pass it
2027 down to c_incomplete_type_error.
2028 (c_incomplete_type_error): Add location parameter, pass it down to
2030 (build_component_ref): Pass location down to c_incomplete_type_error.
2031 (default_conversion): Pass location down to require_complete_type.
2032 (build_array_ref): Likewise.
2033 (build_function_call_vec): Likewise.
2034 (convert_arguments): Likewise.
2035 (build_unary_op): Likewise.
2036 (build_c_cast): Likewise.
2037 (build_modify_expr): Likewise.
2038 (convert_for_assignment): Likewise.
2039 (c_finish_omp_clauses): Likewise.
2041 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2044 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
2046 * c-errors.c (pedwarn_c90): Return true if warned.
2047 * c-tree.h (pedwarn_c90): Change return type to bool.
2048 (enum c_declspec_word): Add new enumerator cdw_atomic.
2050 2016-05-11 Marek Polacek <polacek@redhat.com>
2053 * c-decl.c (diagnose_mismatched_decls): Factor out code to
2054 diagnose_mismatched_attributes and call it.
2056 2016-05-10 Marek Polacek <polacek@redhat.com>
2059 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2060 on a declaration following the definition.
2062 2016-05-05 Jakub Jelinek <jakub@redhat.com>
2064 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2065 parse it through to c_parser_c99_block_statement.
2066 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2069 2016-05-04 Marek Polacek <polacek@redhat.com>
2071 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2074 2016-05-04 Marek Polacek <polacek@redhat.com>
2077 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2078 for macro expansions.
2080 2016-05-03 Marek Polacek <polacek@redhat.com>
2083 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2084 check_builtin_function_arguments.
2086 2016-05-03 Richard Biener <rguenther@suse.de>
2088 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2089 the checksum from the previous stage.
2091 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2093 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2094 c_finish_omp_clauses.
2095 (c_parser_omp_all_clauses): Likewise.
2096 (c_parser_oacc_cache): Likewise.
2097 (c_parser_oacc_loop): Likewise.
2098 (omp_split_clauses): Likewise.
2099 (c_parser_omp_declare_target): Likewise.
2100 (c_parser_cilk_all_clauses): Likewise.
2101 (c_parser_cilk_for): Likewise.
2102 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2103 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2105 2016-05-02 Marek Polacek <polacek@redhat.com>
2108 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2111 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2114 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2115 OACC_LOOP_CLAUSE_MASK.
2116 (c_parser_oacc_kernels_parallel): Update call to
2117 c_oacc_split_loop_clauses.
2119 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
2121 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2122 argument to build_modify_expr in two cases.
2124 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2126 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2127 warn_for_memset instead of warning directly here.
2129 2016-04-26 Marek Polacek <polacek@redhat.com>
2132 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2134 (c_parser_for_statement): ... here.
2135 (c_parser_if_statement): Use it.
2136 (c_parser_switch_statement): Use it.
2137 (c_parser_while_statement): Use it.
2140 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2142 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2145 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2146 instead of c_finish_cilk_clauses.
2147 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2148 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2149 floating-point variables in the linear clause for Cilk Plus.
2151 2016-04-18 Michael Matz <matz@suse.de>
2153 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2154 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2156 2016-04-15 Marek Polacek <polacek@redhat.com>
2159 * c-typeck.c (build_unary_op): Pass location down to error and
2162 2016-04-15 Jakub Jelinek <jakub@redhat.com>
2165 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2167 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2168 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2169 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2170 Adjust c_parser_pragma callers.
2171 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2173 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2175 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2176 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2177 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2178 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2179 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2180 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2181 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2182 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2184 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2185 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2188 2016-04-13 Marek Polacek <polacek@redhat.com>
2191 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2193 (c_parser_statement): Likewise.
2194 (c_parser_c99_block_statement): Likewise.
2195 (c_parser_while_statement): Likewise.
2196 (c_parser_for_statement): Likewise.
2197 (c_parser_if_body): Don't set IF_P here.
2198 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2199 about dangling else here.
2200 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2201 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2202 warn about dangling else here.
2204 2016-04-04 Marek Polacek <polacek@redhat.com>
2207 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2209 2016-03-31 Marek Polacek <polacek@redhat.com>
2212 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2214 2016-03-18 David Malcolm <dmalcolm@redhat.com>
2217 * c-parser.c (c_parser_postfix_expression): Set the source range
2218 for uses of "__builtin_types_compatible_p".
2220 2016-03-17 Jakub Jelinek <jakub@redhat.com>
2223 * c-typeck.c (composite_type): Don't count void_list_node
2224 into len, if the list is terminated by void_list_node, start
2225 with void_list_node instead of NULL for newargs. Stop
2228 2016-03-16 Marek Polacek <polacek@redhat.com>
2231 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2232 nested functions returning VM types.
2234 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2236 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2237 when calling c_finish_omp_clauses.
2239 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2242 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2245 2016-03-04 Marek Polacek <polacek@redhat.com>
2248 * c-parser.c (c_parser_postfix_expression): Call
2249 c_parser_cast_expression rather than c_parser_postfix_expression.
2251 2016-03-01 Jakub Jelinek <jakub@redhat.com>
2255 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2256 of incomplete decls to error_mark_node.
2258 2016-02-24 Marek Polacek <polacek@redhat.com>
2261 * c-decl.c (finish_decl): Don't update the copy of the type of a
2262 different decl type.
2264 2016-02-23 Jakub Jelinek <jakub@redhat.com>
2267 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2268 in id_kind reclassification.
2270 2016-02-16 Jakub Jelinek <jakub@redhat.com>
2273 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2275 2016-02-16 James Norris <jnorris@codesourcery.com>
2278 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2280 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2282 * c-decl.c (build_null_declspecs): Zero the entire struct.
2285 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2286 callers changed. If nested_p is true, use it to call
2287 finish_implicit_inits.
2288 * c-tree.h (finish_implicit_inits): Declare.
2289 * c-typeck.c (finish_implicit_inits): New function. Move code
2291 (push_init_level): ... here.
2292 (set_designator, process_init_element): Call finish_implicit_inits.
2294 2016-02-11 Jakub Jelinek <jakub@redhat.com>
2297 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2298 arguments for -Waddress warning.
2300 2016-02-04 Jakub Jelinek <jakub@redhat.com>
2303 * c-decl.c (finish_enum): When honoring mode attribute,
2304 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2306 2016-01-29 Jakub Jelinek <jakub@redhat.com>
2309 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2310 all type variants, not just TYPE_MAIN_VARIANT.
2312 2016-01-27 Jakub Jelinek <jakub@redhat.com>
2315 * c-decl.c (c_write_global_declarations_1): Warn with
2316 warn_unused_function if static prototype without definition
2319 2016-01-27 Marek Polacek <polacek@redhat.com>
2322 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2323 to unsigned, if needed. Add -Wsign-compare warning.
2325 2016-01-26 Jakub Jelinek <jakub@redhat.com>
2327 PR tree-optimization/69483
2328 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2330 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2333 * c-tree.h (incomplete_record_decls): Declare.
2334 * c-parser.c (incomplete_record_decls): Define.
2335 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2336 report error if any decl has zero size.
2337 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2338 or enum type to incomplete_record_decls.
2340 2016-01-14 Tom de Vries <tom@codesourcery.com>
2342 PR tree-optimization/68773
2343 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2346 2016-01-14 Marek Polacek <polacek@redhat.com>
2349 * c-decl.c (grokdeclarator): Provide more information for invalid
2352 2016-01-06 David Malcolm <dmalcolm@redhat.com>
2354 * c-parser.c (c_parser_unary_expression): For dereferences, build
2355 a combined location before calling build_indirect_ref, so that
2356 error reports cover the full range, manually updating the c_expr
2359 2016-01-06 Marek Polacek <polacek@redhat.com>
2362 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2363 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2366 2016-01-04 Jakub Jelinek <jakub@redhat.com>
2368 Update copyright years.
2370 2016-01-04 Marek Polacek <polacek@redhat.com>
2373 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2374 optimization to use __atomic_fetch_* built-in if possible.
2376 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2378 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2380 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2383 2015-12-22 Marek Polacek <polacek@redhat.com>
2386 * c-typeck.c (build_component_ref): Warn when acessing elements of
2387 atomic structures or unions.
2389 2015-12-21 David Malcolm <dmalcolm@redhat.com>
2391 * c-typeck.c: Include "gcc-rich-location.h".
2392 (build_binary_op): In the two places that call binary_op_error,
2393 create a gcc_rich_location and populate it with the location of
2394 the binary op and its two operands.
2396 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2398 * c-parser.c (c_parser_statement_after_labels): When calling
2399 c_finish_return, Use the return expression's location if it has
2400 one, falling back to the location of the first token within it.
2401 * c-typeck.c (c_finish_return): When issuing warnings about
2402 the incorrect presence/absence of a return value, issue a note
2403 showing the declaration of the function.
2405 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2407 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2409 (c_parser_peek_nth_token): New function.
2410 (c_parser_peek_conflict_marker): New function.
2411 (c_parser_error): Detect conflict markers and report them as such.
2413 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2415 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2416 to preserve range information for the primary expression
2417 in the call to c_parser_postfix_expression_after_primary.
2419 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2421 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2422 expression location, falling back on the first token location,
2423 rather than always using the latter.
2425 2015-12-16 Marek Polacek <polacek@redhat.com>
2428 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2431 2015-12-15 Marek Polacek <polacek@redhat.com>
2434 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2437 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2439 * c-parser.c (c_parser_alignof_expression): Capture location of
2440 closing parenthesis (if any), or of end of unary expression, and
2441 use it to build a src_range for the expression.
2443 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2446 * c-parser.c (c_parser_get_builtin_args): Add
2447 "out_close_paren_loc" param, and write back to it.
2448 (c_parser_postfix_expression): Capture the closing
2449 parenthesis location for RID_CHOOSE_EXPR,
2450 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2451 RID_BUILTIN_SHUFFLE and use it to set the source range
2452 for such expressions; within RID_BUILTIN_COMPLEX set
2453 the underlying location.
2455 2015-12-07 Marek Polacek <polacek@redhat.com>
2458 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2459 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2461 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2463 * c-tree.h (c_build_va_arg): Adjust prototype.
2464 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2465 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2466 parameter, adjust throughout and issue an error if EXPR is a component
2467 with reverse storage order.
2469 2015-12-02 Jason Merrill <jason@redhat.com>
2471 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2472 (c_fully_fold_internal, decl_constant_value_for_optimization):
2473 Move from c-common.c.
2474 * c-tree.h: Declare decl_constant_value_for_optimization.
2475 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2477 2015-12-02 Joseph Myers <joseph@codesourcery.com>
2480 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2481 following link from declarator to next declarator. Track original
2482 qualified type and pass it to c_build_qualified_type.
2483 * c-typeck.c (c_build_qualified_type): Add arguments
2484 orig_qual_type and orig_qual_indirect.
2486 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2488 * c-parser.c (c_parser_omp_clause_name)
2489 (c_parser_oacc_all_clauses): Alphabetical sorting.
2491 2015-12-02 Jakub Jelinek <jakub@redhat.com>
2494 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2497 2015-12-01 Julian Brown <julian@codesourcery.com>
2498 Cesar Philippidis <cesar@codesourcery.com>
2499 James Norris <James_Norris@mentor.com>
2501 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2502 (c_parser_oacc_clause_use_device): New function.
2503 (c_parser_oacc_all_clauses): Add use_device support.
2504 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2505 (c_parser_oacc_host_data): New function.
2506 (c_parser_omp_construct): Add host_data support.
2507 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2508 * c-typeck.c (c_finish_oacc_host_data): New function.
2509 (c_finish_omp_clauses): Add use_device support.
2511 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
2514 * c-decl.c: Set TYPE_PACKED in variants.
2516 2015-11-27 Martin Liska <mliska@suse.cz>
2519 * c-array-notation.c (fix_builtin_array_notation_fn):
2520 Use release_vec_vec instead of vec::release.
2521 (build_array_notation_expr): Likewise.
2522 (fix_conditional_array_notations_1): Likewise.
2523 (fix_array_notation_expr): Likewise.
2524 (fix_array_notation_call_expr): Likewise.
2526 2015-11-27 Jakub Jelinek <jakub@redhat.com>
2529 * c-parser.c (c_parser_compound_statement_nostart): If
2530 last_label is true, use pragma_stmt instead of pragma_compound
2531 as second c_parser_pragma argument.
2532 (c_parser_omp_ordered, c_parser_omp_target_update,
2533 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2534 false as second argument to c_parser_skip_to_pragma_eol after
2535 diagnosing standalone directives used in pragma_stmt context.
2537 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2539 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2540 with "if (ENABLE_OFFLOADING)".
2542 2015-11-23 David Malcolm <dmalcolm@redhat.com>
2545 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2546 for various Objective-C constructs: Class.name syntax,
2547 @selector(), @protocol(), @encode(), and [] message syntax.
2549 2015-11-20 David Malcolm <dmalcolm@redhat.com>
2552 * c-typeck.c (should_suggest_deref_p): New function.
2553 (build_component_ref): Special-case POINTER_TYPE when
2554 generating a "not a structure of union" error message, and
2555 suggest a "->" rather than a ".", providing a fix-it hint.
2557 2015-11-19 David Malcolm <dmalcolm@redhat.com>
2559 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2560 candidate into a new function, find_closest_identifier.
2562 2015-11-19 Marek Polacek <polacek@redhat.com>
2565 * c-typeck.c (parser_build_binary_op): Properly handle
2566 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2568 2015-11-17 David Malcolm <dmalcolm@redhat.com>
2570 * c-parser.c (set_c_expr_source_range): Bulletproof both
2571 overloaded implementations against NULL expr->value.
2572 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2574 (c_parser_unary_expression): Likewise when handling addresses of
2576 (c_parser_postfix_expression): Likewise for statement expressions,
2577 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2578 __builtin_va_arg, and for __builtin_offset_of.
2579 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2580 src_range using the range of the braced initializer.
2581 (c_parser_transaction_expression): Set src_range for "ret" to a
2582 sane pair of values.
2584 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2586 * c-parser.c (c_finish_omp_declare_simd): Look for
2587 "simd" attribute as well. Update error message.
2589 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2591 * c-parser.c (c_parser_omp_declare_target): Adjust.
2593 2015-11-14 Jakub Jelinek <jakub@redhat.com>
2595 * c-typeck.c (c_finish_omp_clauses): Don't mark
2596 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2598 2015-11-14 Marek Polacek <polacek@redhat.com>
2600 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2601 * c-typeck.c: Likewise.
2603 2015-11-13 David Malcolm <dmalcolm@redhat.com>
2605 * c-decl.c (warn_defaults_to): Pass line_table to
2607 * c-errors.c (pedwarn_c99): Likewise.
2608 (pedwarn_c90): Likewise.
2609 * c-parser.c (set_c_expr_source_range): New functions.
2610 (c_token::get_range): New method.
2611 (c_token::get_finish): New method.
2612 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2613 based on the range from the start of the LHS to the end of the
2615 (c_parser_conditional_expression): Likewise, based on the range
2616 from the start of the cond.value to the end of exp2.value.
2617 (c_parser_binary_expression): Call set_c_expr_source_range on
2618 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2619 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2620 based on the cast_loc through to the end of the expr.
2621 (c_parser_unary_expression): Likewise, based on the
2622 op_loc through to the end of op.
2623 (c_parser_sizeof_expression) Likewise, based on the start of the
2624 sizeof token through to either the closing paren or the end of
2626 (c_parser_postfix_expression): Likewise, using the token range,
2627 or from the open paren through to the close paren for
2628 parenthesized expressions.
2629 (c_parser_postfix_expression_after_primary): Likewise, for
2630 various kinds of expression.
2631 * c-tree.h (struct c_expr): Add field "src_range".
2632 (c_expr::get_start): New method.
2633 (c_expr::get_finish): New method.
2634 (set_c_expr_source_range): New decls.
2635 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2636 on ret for prefix unary ops.
2637 (parser_build_binary_op): Likewise, running from the start of
2638 arg1.value through to the end of arg2.value.
2640 2015-11-13 Marek Polacek <polacek@redhat.com>
2643 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2645 2015-11-13 David Malcolm <dmalcolm@redhat.com>
2647 * c-typeck.c: Include spellcheck.h.
2648 (lookup_field_fuzzy_find_candidates): New function.
2649 (lookup_field_fuzzy): New function.
2650 (build_component_ref): If the field was not found, try using
2651 lookup_field_fuzzy and potentially offer a suggestion.
2653 2015-11-12 James Norris <jnorris@codesourcery.com>
2654 Joseph Myers <joseph@codesourcery.com>
2656 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2657 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2658 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2659 and PRAGMA_OMP_CLAUSE_LINK.
2660 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2661 and PRAGMA_OACC_CLAUSE_LINK.
2662 (OACC_DECLARE_CLAUSE_MASK): New definition.
2663 (c_parser_oacc_declare): New function.
2665 2015-11-12 Marek Polacek <polacek@redhat.com>
2668 * c-parser.c (c_parser_for_statement): Reclassify the token in
2671 2015-11-11 Marek Polacek <polacek@redhat.com>
2675 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2676 checking the size of an array.
2678 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
2680 * c-array-notation.c: Remove unused header files.
2681 * c-aux-info.c: Likewise.
2682 * c-convert.c: Likewise.
2683 * c-decl.c: Likewise.
2684 * c-errors.c: Likewise.
2685 * c-lang.c: Likewise.
2686 * c-objc-common.c: Likewise.
2687 * c-parser.c: Likewise.
2688 * c-typeck.c: Likewise.
2689 * gccspec.c: Likewise.
2691 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2692 Cesar Philippidis <cesar@codesourcery.com>
2693 James Norris <jnorris@codesourcery.com>
2694 Julian Brown <julian@codesourcery.com>
2695 Nathan Sidwell <nathan@codesourcery.com>
2698 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2700 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2701 (c_parser_pragma): Parse 'acc routine'.
2702 (OACC_ROUTINE_CLAUSE_MARK): Define.
2703 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2705 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2708 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2709 location of the backward-goto to the start of the loop body.
2711 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2714 * c-parser.c (c_parser_while_statement): Finish the loop before
2715 parsing ahead for misleading indentation.
2716 (c_parser_for_statement): Likewise.
2718 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2720 * c-decl.c (finish_struct): If the structure has reverse storage
2721 order, rewrite the type of array fields with scalar component. Call
2722 maybe_apply_pragma_scalar_storage_order on entry.
2723 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2724 errors on bit-fields and reverse SSO here and not...
2725 (c_mark_addressable): ...here.
2726 (output_init_element): Adjust call to initializer_constant_valid_p.
2727 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2729 2015-11-06 David Malcolm <dmalcolm@redhat.com>
2731 * c-decl.c (warn_defaults_to): Update for change in signature
2732 of diagnostic_set_info.
2733 * c-errors.c (pedwarn_c99): Likewise.
2734 (pedwarn_c90): Likewise.
2735 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2736 for textinfo::set_location.
2738 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2739 Thomas Schwinge <thomas@codesourcery.com>
2740 James Norris <jnorris@codesourcery.com>
2742 * c-parser.c (c_parser_omp_clause_name): Add support for
2743 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2744 (c_parser_omp_clause_default): Add is_oacc argument. Handle
2745 default(none) in OpenACC.
2746 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2748 (c_parser_oacc_clause_tile): New function.
2749 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2750 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2751 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2753 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2754 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2756 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2757 (c_parser_oacc_update): Update the error message for missing clauses.
2758 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2759 and OMP_CLAUSE_INDEPENDENT.
2761 2015-11-05 Marek Polacek <polacek@redhat.com>
2764 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2765 deal with pre-evaluation on invalid types.
2767 2015-11-05 Jakub Jelinek <jakub@redhat.com>
2768 Ilya Verbin <ilya.verbin@intel.com>
2770 * c-parser.c: Include context.h and gimple-expr.h.
2771 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2772 monotonic together with nonmonotonic.
2773 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
2774 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2775 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2776 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2777 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
2778 expressions on combined target teams before the target.
2779 (c_parser_omp_declare_target): If decl has "omp declare target" or
2780 "omp declare target link" attribute, and cgraph or varpool node already
2781 exists, then set corresponding flags. Call c_finish_omp_clauses
2782 in the parenthesized extended-list syntax case.
2783 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2785 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2786 on OMP_CLAUSE_REDUCTION array sections.
2787 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2788 into the constant offset, or for variable low-bound using
2789 POINTER_PLUS_EXPR. For structure element based array sections use
2790 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2791 (c_finish_omp_clauses): Drop generic_field_head, structure
2792 elements are now always mapped even as array section bases,
2793 diagnose same var in data sharing and mapping clauses. Diagnose if
2794 linear step on declare simd is neither a constant nor a uniform
2795 parameter. Look through POINTER_PLUS_EXPR for array section
2796 reductions. Diagnose the same var or function appearing multiple
2797 times on the same directive. Fix up wording for the to clause if t
2798 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
2799 modifier on kinds other than dynamic or guided or nonmonotonic
2800 modifier together with ordered clause.
2802 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2803 Chung-Lin Tang <cltang@codesourcery.com>
2805 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2807 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
2809 * c-array-notation.c: Reorder #include's and remove duplicates.
2810 * c-aux-info.c: Likewise.
2811 * c-convert.c: Likewise.
2812 * c-decl.c: Likewise.
2813 * c-errors.c: Likewise.
2814 * c-lang.c: Likewise.
2815 * c-objc-common.c: Likewise.
2816 * c-parser.c: Likewise.
2817 * c-typeck.c: Likewise.
2819 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
2822 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2823 after calling build_qualified_type.
2825 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2826 Thomas Schwinge <thomas@codesourcery.com>
2827 James Norris <jnorris@codesourcery.com>
2828 Joseph Myers <joseph@codesourcery.com>
2829 Julian Brown <julian@codesourcery.com>
2830 Bernd Schmidt <bschmidt@redhat.com>
2832 * c-parser.c (c_parser_oacc_shape_clause): New.
2833 (c_parser_oacc_simple_clause): New.
2834 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2835 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2837 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2838 James Norris <jnorris@codesourcery.com>
2839 Cesar Philippidis <cesar@codesourcery.com>
2843 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2844 parameters, and handle these. Adjust all users.
2845 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2847 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2849 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2851 (c_finish_omp_construct): Declare function.
2852 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2853 Merge functions into...
2854 (c_finish_omp_construct): ... this new function.
2856 2015-10-22 Richard Biener <rguenther@suse.de>
2858 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2859 before folding a MINUS_EXPR.
2861 2015-10-21 Marek Polacek <polacek@redhat.com>
2864 * c-decl.c (start_function): Warn about vararg functions without
2867 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2869 * c-typeck.c (build_conditional_expr): Use boolean vector
2870 type for vector comparison.
2871 (build_vec_cmp): New.
2872 (build_binary_op): Use build_vec_cmp for comparison.
2874 2015-10-20 Marek Polacek <polacek@redhat.com>
2876 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2878 2015-10-20 Marek Polacek <polacek@redhat.com>
2881 * c-parser.c (c_parser_attributes): Break out of the loop if the
2882 token after an attribute isn't a comma.
2884 2015-10-13 Jakub Jelinek <jakub@redhat.com>
2885 Aldy Hernandez <aldyh@redhat.com>
2887 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2888 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2889 (c_parser_omp_variable_list): Handle structure elements for
2890 map, to and from clauses. Handle array sections in reduction
2891 clause. Formatting fixes.
2892 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2893 if clause modifiers.
2894 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2895 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2896 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2897 c_parser_omp_clause_is_device_ptr): New functions.
2898 (c_parser_omp_clause_ordered): Parse optional parameter.
2899 (c_parser_omp_clause_reduction): Handle array reductions.
2900 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2901 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2903 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2904 (c_parser_omp_clause_depend_sink): New function.
2905 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2906 (c_parser_omp_clause_map): Parse release/delete map kinds and
2907 optional always modifier.
2908 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2909 and c_finish_omp_clauses callers.
2910 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
2911 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2912 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2913 (OMP_CRITICAL_CLAUSE_MASK): Define.
2914 (c_parser_omp_critical): Parse critical clauses.
2915 (c_parser_omp_for_loop): Handle doacross loops, adjust
2916 c_finish_omp_for and c_finish_omp_clauses callers.
2917 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2918 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2919 (OMP_FOR_CLAUSE_MASK): Add linear clause.
2920 (c_parser_omp_for): Disallow ordered clause when combined with
2921 distribute. Disallow linear clause when combined with distribute
2922 and not combined with simd.
2923 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2924 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2925 parse clauses and if depend clause is found, don't parse a body.
2926 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2927 Allow target parallel without for after it.
2928 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2929 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2930 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2932 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2933 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2934 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2935 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2937 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2938 defaultmap and is_device_ptr clauses.
2939 (c_parser_omp_target): Parse target parallel and target simd. Set
2940 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
2941 and target exit data. Diagnose invalid map kinds.
2942 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2943 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2945 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2947 (OMP_TASKLOOP_CLAUSE_MASK): Define.
2948 (c_parser_omp_taskloop): New function.
2949 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2950 handle PRAGMA_OMP_TASKLOOP.
2951 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2952 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2953 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2954 Add IS_OMP argument, handle structure element bases, diagnose
2955 bitfields, pass IS_OMP recursively, diagnose known zero length
2956 array sections in depend clauses, handle array sections in reduction
2957 clause, diagnose negative length even for pointers.
2958 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2959 types, pass IS_OMP down to handle_omp_array_sections_1, handle
2960 array sections in reduction clause, set
2961 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2962 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2963 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2964 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2966 2015-10-06 Marek Polacek <polacek@redhat.com>
2968 * c-parser.c (c_parser_statement_after_labels): Use
2969 protected_set_expr_location.
2970 (c_parser_omp_clause_num_gangs): Likewise.
2971 (c_parser_omp_clause_num_threads): Likewise.
2972 (c_parser_omp_clause_num_workers): Likewise.
2973 (c_parser_omp_clause_vector_length): Likewise.
2974 (c_parser_omp_clause_num_teams): Likewise.
2975 (c_parser_omp_clause_thread_limit): Likewise.
2976 * c-typeck.c (build_c_cast): Likewise.
2977 (c_cast_expr): Likewise.
2979 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2981 * c-typeck.c (c_tree_equal): Use real_equal instead of
2984 2015-10-04 Jason Merrill <jason@redhat.com>
2986 * c-parser.c (c_lex_one_token): Handle @synchronized.
2987 * c-decl.c (match_builtin_function_types): A declaration of a built-in
2988 can change whether the function is transaction_safe.
2990 2015-10-02 Marek Polacek <polacek@redhat.com>
2993 * c-typeck.c (convert_for_assignment): Use the expansion point
2994 location throughout.
2996 2015-10-02 Marek Polacek <polacek@redhat.com>
2999 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
3000 and pass it down to c_parser_if_statement.
3001 (c_parser_else_body): Add CHAIN parameter and pass it down to
3002 c_parser_statement_after_labels.
3003 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
3004 duplicated if-else-if conditions.
3006 2015-10-01 Marek Polacek <polacek@redhat.com>
3008 * c-typeck.c (convert_for_assignment): Improve commentary.
3010 2015-09-30 Marek Polacek <polacek@redhat.com>
3013 * c-typeck.c (c_finish_return): Use the expansion point location for
3014 certain "return with value" warnings.
3016 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3018 * c-parser.c (pragma_lex): Add loc argument.
3020 2015-09-15 Marek Polacek <polacek@redhat.com>
3023 * c-decl.c (tag_exists_p): New function.
3024 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
3025 struct/union/enum keywords are missing.
3026 * c-tree.h (tag_exists_p): Declare.
3028 2015-09-15 Marek Polacek <polacek@redhat.com>
3030 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
3031 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
3032 Return NULL_TREE instead of 0.
3033 (lookup_name): Return NULL_TREE instead of 0.
3034 (lookup_name_in_scope): Likewise.
3035 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
3036 (parser_xref_tag): Use false instead of 0.
3037 (start_struct): Use true instead of 1.
3038 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
3040 2015-09-14 Marek Polacek <polacek@redhat.com>
3042 * c-typeck.c (set_nonincremental_init_from_string): Use
3043 HOST_WIDE_INT_M1U when shifting a negative value.
3045 2015-09-09 Mark Wielaard <mjw@redhat.com>
3047 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
3050 2015-09-10 Jakub Jelinek <jakub@redhat.com>
3053 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
3054 into OMP_FOR_PRE_BODY rather than before the loop.
3056 2015-09-09 Jakub Jelinek <jakub@redhat.com>
3059 * c-parser.c (c_parser_oacc_all_clauses,
3060 c_parser_omp_all_clauses): Remove invalid clause from
3061 list of clauses even if parser->error is set.
3064 * c-parser.c (c_parser_omp_clause_aligned,
3065 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3067 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3071 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3072 instead of c_parser_unary_expression. If the result is !lvalue_p,
3073 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3075 2015-09-04 Marek Polacek <polacek@redhat.com>
3078 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3080 2015-09-03 Martin Sebor <msebor@redhat.com>
3083 * c-typeck.c (convert_arguments, parser_build_unary_op,
3084 build_conditional_expr, c_cast_expr, convert_for_assignment,
3085 build_binary_op, _objc_common_truthvalue_conversion): Call
3087 (c_decl_implicit): Define.
3089 2015-09-02 Marek Polacek <polacek@redhat.com>
3092 * c-parser.c (c_parser_enum_specifier): Give a better error for
3095 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3097 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3099 2015-08-12 Marek Polacek <polacek@redhat.com>
3101 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3104 2015-08-03 Marek Polacek <polacek@redhat.com>
3107 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3109 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3111 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3113 * c-parser.c (c_parser_if_body): Take token_indent_info
3114 argument. Call warn_for_misleading_indentation even when the
3115 body is a semicolon. Extract token_indent_infos corresponding
3116 to the guard, body and next tokens. Adjust call to
3117 warn_for_misleading_indentation accordingly.
3118 (c_parser_else_body): Likewise.
3119 (c_parser_if_statement): Likewise.
3120 (c_parser_while_statement): Likewise.
3121 (c_parser_for_statement): Likewise.
3123 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3124 Manuel López-Ibáñez <manu@gcc.gnu.org>
3126 * c-decl.c (get_parm_info): Remove static var. Update warning
3129 2015-07-27 Marek Polacek <polacek@redhat.com>
3133 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3135 2015-07-20 Marek Polacek <polacek@redhat.com>
3138 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3139 (build_binary_op): Warn about left shift overflows.
3141 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
3143 * c-array-notation.c: Adjust includes for flags.h changes.
3144 * c-objc-common.c: Likewise.
3146 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
3148 * c-array-notation.c: Adjust includes.
3149 * c-aux-info.c: Likewise.
3150 * c-convert.c: Likewise.
3151 * c-decl.c: Likewise.
3152 * c-errors.c: Likewise.
3153 * c-lang.c: Likewise.
3154 * c-objc-common.c: Likewise.
3155 * c-parser.c: Likewise.
3156 * c-typeck.c: Likewise.
3158 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3161 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3163 2015-06-29 Marek Polacek <polacek@redhat.com>
3166 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3167 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3168 about -Wswitch-bool here.
3169 (do_case): Update c_add_case_label call.
3170 (c_finish_case): Update c_do_switch_warnings call.
3172 2015-06-27 Marek Polacek <polacek@redhat.com>
3174 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3176 2015-06-26 Marek Polacek <polacek@redhat.com>
3178 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3180 * c-typeck.c (array_to_pointer_conversion): Likewise.
3181 (build_unary_op): Likewise.
3182 (c_finish_return): Likewise.
3184 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
3186 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3187 * c-parser.c: Likewise.
3189 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3191 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3192 instead of pointer_hash.
3193 (detect_field_duplicates): Likewise.
3195 2015-06-25 Marek Polacek <polacek@redhat.com>
3197 * c-array-notation.c: Use VAR_P throughout.
3198 * c-decl.c: Likewise.
3199 * c-objc-common.c: Likewise.
3200 * c-parser.c: Likewise.
3201 * c-typeck.c: Likewise.
3203 2015-06-25 Marek Polacek <polacek@redhat.com>
3205 * c-decl.c: Use is_global_var throughout.
3206 * c-parser.c: Likewise.
3207 * c-typeck.c: Likewise.
3209 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
3211 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3212 * c-aux-info.c: Likewise.
3213 * c-convert.c: Likewise.
3214 * c-decl.c: Likewise.
3215 * c-errors.c: Likewise.
3216 * c-lang.c: Likewise.
3217 * c-objc-common.c: Likewise.
3218 * c-parser.c: Likewise.
3219 * c-typeck.c: Likewise.
3221 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
3224 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3227 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3229 * c-decl.c (pop_scope): Register the main translation unit
3230 through the new debug hook.
3232 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
3234 * c-array-notation.c : Adjust include files.
3235 * c-aux-info.c : Likewise.
3236 * c-convert.c : Likewise.
3237 * c-decl.c : Likewise.
3238 * c-errors.c : Likewise.
3239 * c-lang.c : Likewise.
3240 * c-lang.h : Likewise.
3241 * c-objc-common.c : Likewise.
3242 * c-parser.c : Likewise.
3243 * c-typeck.c : Likewise.
3245 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
3247 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3248 immediately clobber it.
3249 (c_write_global_declarations_1): Remove call to
3250 check_global_declaration_1.
3251 (c_write_global_declarations_2): Remove.
3252 (c_write_final_cleanups): Rename from c_write_global_declarations.
3253 Remove call to finalize_compilation_unit.
3254 Remove calls to debugging hooks.
3255 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3256 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3257 * c-tree.h: Remove c_write_global_declarations.
3259 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
3261 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3262 * c-aux-info.c: Likewise.
3263 * c-convert.c: Likewise.
3264 * c-decl.c: Likewise.
3265 * c-errors.c: Likewise.
3266 * c-lang.c: Likewise.
3267 * c-objc-common.c: Likewise.
3268 * c-parser.c: Likewise.
3269 * c-typeck.c: Likewise.
3271 2015-06-04 Marek Polacek <polacek@redhat.com>
3274 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3277 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3279 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3280 Warn for empty struct.
3281 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3283 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3285 * c-decl.c (start_function): Call plugin before parsing.
3286 (finish_function): Call plugin after parsing.
3288 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3291 * c-decl.c (merge_decls): Merge DECL_COMMON.
3293 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
3295 * Make-lang.in (check_gcc_pallelize): Define.
3297 2015-05-22 Marek Polacek <polacek@redhat.com>
3300 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3303 2015-05-21 Marek Polacek <polacek@redhat.com>
3305 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3308 2015-05-20 Marek Polacek <polacek@redhat.com>
3310 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3311 * c-typeck.c: Likewise.
3313 2015-05-19 Marek Polacek <polacek@redhat.com>
3315 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3317 2015-05-19 Jakub Jelinek <jakub@redhat.com>
3320 * c-parser.c (c_parser_omp_for_loop): Don't add
3321 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3322 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3323 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3326 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3328 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
3331 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3334 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3337 2015-05-14 Marek Polacek <polacek@redhat.com>
3341 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3344 2015-05-12 David Malcolm <dmalcolm@redhat.com>
3346 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3347 to add a call to warn_for_misleading_indentation.
3348 (c_parser_else_body): Likewise, adding param "else_loc".
3349 (c_parser_if_statement): Check for misleading indentation.
3350 (c_parser_while_statement): Likewise.
3351 (c_parser_for_statement): Likewise.
3353 2015-05-08 Marek Polacek <polacek@redhat.com>
3356 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3357 (output_init_element): Likewise.
3359 2015-05-07 Marek Polacek <polacek@redhat.com>
3362 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3365 2015-04-30 Marek Polacek <polacek@redhat.com>
3367 * c-typeck.c (set_init_label): Call error_at instead of error and
3370 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3373 * c-typeck.c (c_build_va_arg): Clarify the error message.
3375 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3377 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3378 OMP_STANDALONE_CLAUSES.
3380 2015-04-28 Marek Polacek <polacek@redhat.com>
3382 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3384 2015-04-28 Marek Polacek <polacek@redhat.com>
3387 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3389 2015-04-25 Marek Polacek <polacek@redhat.com>
3392 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3395 2015-04-23 Marek Polacek <polacek@redhat.com>
3398 * c-decl.c (set_labels_context_r): New function.
3399 (store_parm_decls): Call it via walk_tree_without_duplicates.
3400 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3401 instead of create_tmp_var. Build TARGET_EXPR instead of
3403 (build_atomic_assign): Use create_tmp_var_raw instead of
3404 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3406 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3408 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3409 (c_parser_omp_target_update): Add missed %> to error_at ().
3411 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3414 * c-decl.c (c_default_pointer_mode): Remove definition.
3415 * c-tree.h (c_default_pointer_mode): Remove declaration.
3417 2015-03-27 Tobias Burnus <burnus@net-b.de>
3420 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3422 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3423 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3424 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3426 2015-03-19 Jakub Jelinek <jakub@redhat.com>
3428 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3429 attribute for DECL_EXTERNAL VAR_DECLs.
3431 2015-03-11 Jakub Jelinek <jakub@redhat.com>
3433 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3436 2015-03-10 Jakub Jelinek <jakub@redhat.com>
3439 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3440 before preparing arguments to warn_logical_not_parentheses.
3442 2015-03-09 Jakub Jelinek <jakub@redhat.com>
3445 * c-typeck.c (parser_build_binary_op): Don't warn for
3446 !!x == y or !b == y where b is _Bool.
3448 2015-03-09 Marek Polacek <polacek@redhat.com>
3450 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3451 * c-decl.c (grokdeclarator): Likewise.
3452 * c-typeck.c (build_binary_op): Likewise.
3454 2015-02-27 Marek Polacek <polacek@redhat.com>
3457 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3459 2015-02-14 Marek Polacek <polacek@redhat.com>
3462 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3463 declared through a typedef name.
3465 2015-02-13 Marek Polacek <polacek@redhat.com>
3468 * c-decl.c (grokdeclarator): Print also the type when giving
3469 the error message about array's incomplete element type.
3471 2015-02-11 Jakub Jelinek <jakub@redhat.com>
3474 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3475 check in the POP macro.
3477 2015-02-09 Marek Polacek <polacek@redhat.com>
3480 * c-typeck.c (process_init_element): Don't always wrap
3481 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3482 initializing a range of elements.
3484 2015-02-04 Jakub Jelinek <jakub@redhat.com>
3488 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3490 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
3492 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3493 processing enum declaration.
3495 2015-01-29 Marek Polacek <polacek@redhat.com>
3498 * c-typeck.c (pop_init_level): If constructor_elements has
3499 exactly one element with integer_zerop value, set constructor_zeroinit
3500 to 1. Remove braces around warning_init call.
3502 2015-01-27 Jakub Jelinek <jakub@redhat.com>
3505 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3506 of FUNCTION_DECLs with error_mark_node.
3508 2015-01-26 Jakub Jelinek <jakub@redhat.com>
3511 * c-typeck.c (convert_arguments): Return -1 if there are
3512 error_args, even if we've diagnosed too many arguments.
3514 2015-01-21 Richard Biener <rguenther@suse.de>
3517 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3518 for builtins the user declared correctly.
3520 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3521 Bernd Schmidt <bernds@codesourcery.com>
3522 Cesar Philippidis <cesar@codesourcery.com>
3523 James Norris <jnorris@codesourcery.com>
3524 Jakub Jelinek <jakub@redhat.com>
3525 Ilmir Usmanov <i.usmanov@samsung.com>
3527 * c-parser.c: Include "gomp-constants.h".
3528 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3529 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3530 Use OMP_CLAUSE_SET_MAP_KIND.
3531 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3532 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3533 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3534 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3535 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3536 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3537 "copyout", "create", "delete", "deviceptr", "gang", "host",
3538 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3539 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3540 "present_or_create", "pcreate", "seq", "self", "vector",
3541 "vector_length", "wait", "worker".
3542 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3543 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3544 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3545 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3546 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3547 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3548 (c_parser_oacc_data_clause_deviceptr)
3549 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3550 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3551 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3552 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3553 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3554 (c_parser_oacc_parallel, c_parser_oacc_update)
3555 (c_parser_oacc_wait): New functions.
3556 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3557 (c_finish_oacc_data): New prototypes.
3558 * c-typeck.c: Include "gomp-constants.h".
3559 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3560 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3561 OMP_CLAUSE_SET_MAP_KIND.
3562 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3563 (c_finish_oacc_data): New functions.
3564 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3565 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3566 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3567 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3568 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3569 GOMP_MAP_FORCE_DEVICEPTR.
3571 2015-01-09 Michael Collison <michael.collison@linaro.org>
3573 * c-array-notation.c: Include hash-set.h, machmode.h,
3574 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3575 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3576 * c-aux-info.c: Ditto.
3577 * c-convert.c: Ditto.
3579 * c-errors.c: Ditto.
3580 * c-lang.c: Dittoxs.
3581 * c-objc-common.c: Ditto.
3582 * c-parser.c: Ditto.
3583 * c-typeck.c: Include hash-set.h, machmode.h,
3584 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3585 fold-const.h, wide-int.h, inchash.h, real.h and
3586 fixed-value.h due to flattening of tree.h.
3588 2015-01-07 Marek Polacek <polacek@redhat.com>
3591 * c-typeck.c (process_init_element): Disallow initialization of
3592 a flexible array member with a string constant if the structure
3595 2015-01-05 Jakub Jelinek <jakub@redhat.com>
3598 * c-typeck.c (convert_for_assignment, c_finish_return): For
3599 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3600 types also set in_late_binary_op around convert call.
3601 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3602 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3603 result on expr as last argument to ubsan_instrument_float_cast,
3604 if in_late_binary_op, don't use c_save_expr but save_expr.
3606 Update copyright years.
3608 2015-01-05 Marek Polacek <polacek@redhat.com>
3611 * c-typeck.c (build_array_ref): Pass loc down to
3612 warn_array_subscript_with_type_char.
3614 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
3616 * c-typeck.c: New behavious for pointers to arrays with qualifiers
3617 (common-pointer-type): For pointers to arrays take qualifiers from
3619 (build_conditional_expr): Add warnings for lost qualifiers.
3620 (comp-target-types): Allow pointers to arrays with different qualifiers.
3621 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
3622 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
3623 to PEDWARN_FOR_QUALIFIERS.
3625 2014-12-17 Jakub Jelinek <jakub@redhat.com>
3628 * c-convert.c: Include ubsan.h.
3629 (convert): For real -> integral casts and
3630 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3631 instead instrument the float cast directly.
3633 2014-11-29 Jakub Jelinek <jakub@redhat.com>
3635 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3636 c_finish_stmt_expr): Remove NULL last argument from
3637 create_tmp_var_raw and create_tmp_var calls.
3638 * c-array-notation.c (fix_builtin_array_notation_fn,
3639 build_array_notation_expr, fix_conditional_array_notations_1,
3640 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3642 2014-11-28 Marek Polacek <polacek@redhat.com>
3645 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3646 convert the right operand to integer type.
3648 2014-11-25 Marek Polacek <polacek@redhat.com>
3651 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3652 for inline functions.
3654 2014-11-21 Jakub Jelinek <jakub@redhat.com>
3657 * c-typeck.c (build_array_ref): Adjust
3658 convert_vector_to_pointer_for_subscript caller. If it returns true,
3659 call non_lvalue_loc on the result.
3661 2014-11-11 Richard Biener <rguenther@suse.de>
3663 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3666 2014-11-10 Andi Kleen <ak@linux.intel.com>
3669 * c-parser.c (c_parser_statement_after_labels): Call
3671 (c_parser_if_statement): Dito.
3672 (c_parser_switch_statement): Dito.
3673 (c_parser_while_statement): Dito.
3674 (c_parser_do_statement): Dito.
3675 (c_parser_for_statement): Dito.
3676 * c-typeck.c (c_finish_loop): Dito.
3678 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3680 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3681 OPT_Wshift_count_overflow in the warnings.
3683 2014-10-30 Marek Polacek <polacek@redhat.com>
3685 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3686 print the stripped version as well, if they're not the same.
3688 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3690 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3693 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
3695 * c-decl.c: Adjust include files.
3696 * c-parser.c: Ditto.
3698 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3699 Tom Tromey <tromey@redhat.com>
3701 * c-tree.h (enum c_oracle_request): New.
3702 (c_binding_oracle_function): New typedef.
3703 (c_binding_oracle, c_pushtag, c_bind): Declare.
3704 * c-decl.c (c_binding_oracle): New global.
3705 (I_SYMBOL_CHECKED): New macro.
3706 (i_symbol_binding): New function.
3707 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3708 (I_TAG_CHECKED): New macro.
3709 (i_tag_binding): New function.
3710 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3711 (I_LABEL_CHECKED): New macro.
3712 (i_label_binding): New function.
3713 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3714 (c_print_identifier): Save and restore c_binding_oracle.
3715 (c_pushtag, c_bind): New functions.
3717 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
3719 * c-typeck.c: Adjust include files.
3721 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3724 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3725 initialization here...
3726 (c_initialize_diagnostics): ... but here. Set defaults after
3727 building pretty-printer.
3729 2014-10-23 Marek Polacek <polacek@redhat.com>
3732 * c-decl.c (pop_scope): Don't print warning in external_scope.
3734 2014-10-19 Marek Polacek <polacek@redhat.com>
3737 * c-typeck.c (output_init_element): Allow initializing objects with
3738 static storage duration with compound literals even in C99 and add
3741 2014-10-17 Marek Polacek <polacek@redhat.com>
3744 * c-typeck.c (digest_init): Allow initializing objects with static
3745 storage duration with compound literals even in C99 and add pedwarn
3748 2014-10-17 Marek Polacek <polacek@redhat.com>
3751 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3752 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3753 error multiple times. Print the type.
3755 2014-10-17 Marek Polacek <polacek@redhat.com>
3758 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3761 2014-10-17 Marek Polacek <polacek@redhat.com>
3763 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3764 (start_function): Use OPT_Wimplicit_int instead of 0.
3765 (store_parm_decls_oldstyle): Likewise.
3767 2014-10-17 Alan Modra <amodra@gmail.com>
3770 * c-decl.c (merge_decls): Don't merge section name or tls model
3771 to newdecl symtab node, instead merge to olddecl. Override
3772 existing olddecl section name. Set tls_model for all thread-local
3773 vars, not just OMP thread-private ones. Remove incorrect comment.
3775 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
3777 * c-decl.c: Adjust include files.
3779 2014-10-14 DJ Delorie <dj@redhat.com>
3781 * c-parser.c (c_parse_init): Add RID entries for each __intN.
3782 (c_token_starts_typename): Check all __intN, not just __int128.
3783 (c_token_starts_declspecs): Likewise.
3784 (c_parser_declspecs): Likewise.
3785 (c_parser_attribute_any_word): Likewise.
3786 (c_parser_objc_selector): Likewise.
3787 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3788 (struct c_declspecs): Add int_n_idx field to record *which* __intN
3790 * c-decl.c (declspecs_add_type): Check for all __intN, not just
3792 (finish_declspecs): Likewise.
3794 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
3796 * c-parser.c (c_parser_all_labels): New function to replace
3798 (c_parser_statement): Call the new function.
3800 2014-10-09 Marek Polacek <polacek@redhat.com>
3803 * c-typeck.c (pop_init_level): Don't warn about initializing
3806 2014-10-07 Marek Polacek <polacek@redhat.com>
3809 * c-decl.c (header_for_builtin_fn): New function.
3810 (implicitly_declare): Suggest which header to include.
3812 2014-10-07 Marek Polacek <polacek@redhat.com>
3814 * c-convert.c (convert): Use error_operand_p.
3815 * c-typeck.c (require_complete_type): Likewise.
3816 (really_atomic_lvalue): Likewise.
3817 (digest_init): Likewise.
3818 (handle_omp_array_sections_1): Likewise.
3820 2014-10-03 Marek Polacek <polacek@redhat.com>
3823 * c-decl.c (pop_scope): Don't warn about "inline function declared
3824 but never defined" for functions marked with gnu_inline attribute.
3826 2014-09-25 Jakub Jelinek <jakub@redhat.com>
3829 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3830 on low_bound and length.
3832 2014-09-24 Marek Polacek <polacek@redhat.com>
3836 * c-parser.c: Don't define CPP_KEYWORD.
3837 (c_parser_switch_statement): Pass original type to c_finish_case.
3838 * c-tree.h (c_finish_case): Update declaration.
3839 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3840 conditionally to c_do_switch_warnings.
3842 2014-09-03 Marek Polacek <polacek@redhat.com>
3845 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3848 2014-09-02 Jakub Jelinek <jakub@redhat.com>
3849 Balaji V. Iyer <balaji.v.iyer@intel.com>
3850 Igor Zamyatin <igor.zamyatin@intel.com>
3852 * c-parser.c (c_parser_cilk_for): New function.
3853 (c_parser_cilk_grainsize): Likewise.
3854 (c_get_temp_regvar): Likewise.
3855 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3856 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3857 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3858 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3861 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3863 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3864 with using HOST_WIDE_INT without truncation to 'int'
3866 2014-08-22 Marek Polacek <polacek@redhat.com>
3869 * c-typeck.c (parser_build_binary_op): Adjust call to
3870 warn_logical_not_parentheses.
3872 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3875 * c-parser.c (c_parser_array_notation): Check for correct
3876 type of an array added.
3878 2014-08-19 Marek Polacek <polacek@redhat.com>
3881 * c-typeck.c (build_binary_op): If either operand of a comparison
3882 is a boolean expression, call maybe_warn_bool_compare.
3884 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3887 * c-typeck.c (build_c_cast): Do a conversion even when the
3888 TYPE_MAIN_VARIANTs are the same.
3890 2014-08-19 Marek Polacek <polacek@redhat.com>
3892 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3893 pedwarn_c99 instead of pedwarn.
3894 (grokfield): Likewise.
3895 (warn_defaults_to): New function.
3896 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3897 Unconditionally call pedwarn_c99 instead of pedwarn.
3898 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3899 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3900 check flag_isoc11 before.
3901 * c-errors.c (pedwarn_c99): Change the return type to bool.
3902 Handle -Wc99-c11-compat.
3903 * c-parser.c (disable_extension_diagnostics): Handle
3904 warn_c99_c11_compat.
3905 (restore_extension_diagnostics): Likewise.
3906 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3907 instead of pedwarn, don't check flag_isoc11 before.
3908 (c_parser_declspecs): Likewise.
3909 (c_parser_alignas_specifier): Likewise.
3910 (c_parser_alignof_expression): Likewise.
3911 (c_parser_generic_selection): Likewise.
3912 * c-tree.h (pedwarn_c99): Update declaration.
3913 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3916 2014-08-19 Marek Polacek <polacek@redhat.com>
3918 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3920 * c-errors.c: Include "opts.h".
3921 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3922 * c-parser.c (disable_extension_diagnostics): Handle negative value
3923 of warn_c90_c99_compat, too.
3924 (restore_extension_diagnostics): Likewise.
3925 (c_parser_compound_statement_nostart): Pass
3926 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3928 2014-08-12 Marek Polacek <polacek@redhat.com>
3930 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3932 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3934 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3936 2014-08-10 Marek Polacek <polacek@redhat.com>
3939 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3940 Call pedwarn_c90 instead of pedwarn.
3941 (check_bitfield_type_and_width): Likewise.
3942 (declspecs_add_qual): Likewise.
3943 (declspecs_add_type): Likewise.
3944 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3945 Adjust to only call pedwarn_c90.
3946 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
3947 pedwarn_c90 instead of pedwarn.
3948 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3949 * c-parser.c (disable_extension_diagnostics): Handle
3950 warn_c90_c99_compat.
3951 (restore_extension_diagnostics): Likewise.
3952 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
3953 pedwarn_c90 instead of pedwarn.
3954 (c_parser_initelt): Likewise.
3955 (c_parser_postfix_expression): Likewise.
3956 (c_parser_postfix_expression_after_paren_type): Likewise.
3957 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3958 * c-tree.h: Fix formatting.
3959 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
3960 pedwarn_c90 instead of pedwarn.
3962 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
3964 * c-typeck.c: Remove include of pointer-set.h.
3966 2014-08-07 Marek Polacek <polacek@redhat.com>
3968 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3970 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3972 * c-typeck.c: Use hash_map instead of pointer_map.
3974 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3976 * c-decl.c: Use hash_set instead of pointer_set.
3978 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
3981 * c-array-notation.c (expand_array_notations): Handling
3984 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
3987 * c-typeck.c (c_finish_return): Return 0 instead of the address of
3990 2014-07-30 Tom Tromey <tromey@redhat.com>
3992 * c-typeck.c (struct constructor_stack) <designator_depth>: New
3994 (really_start_incremental_init, push_init_level): Initialize
3996 (pop_init_level): Set global designator_depth.
3997 (process_init_element): Check for designated_init attribute.
3999 2014-07-20 Marek Polacek <polacek@redhat.com>
4002 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
4003 (implicitly_declare): Pass location to implicit_decl_warning.
4005 2014-07-14 Jakub Jelinek <jakub@redhat.com>
4008 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
4009 If non-NULL, call c_parser_check_literal_zero.
4010 (c_parser_check_literal_zero): New function.
4011 (c_parser_postfix_expression_after_primary): Adjust
4012 c_parser_expr_list caller, handle -Wmemset-transposed-args.
4014 2014-07-06 Marek Polacek <polacek@redhat.com>
4017 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
4018 * c-tree.h (C_ARRAY_PARAMETER): Define.
4019 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
4022 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
4023 Chen Gang <gang.chen.5i5j@gmail.com>
4025 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
4028 2014-07-01 Marek Polacek <polacek@redhat.com>
4030 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
4031 instead of 0 to WARN_FOR_ASSIGNMENT.
4033 2014-07-01 Marek Polacek <polacek@redhat.com>
4036 * c-typeck.c (convert_for_assignment): Pass
4037 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
4039 2014-06-30 Marek Polacek <polacek@redhat.com>
4041 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
4042 has no_sanitize_undefined attribute.
4044 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
4047 * c-array-notation.c (fix_builtin_array_notation_fn):
4048 Check for 0 arguments in builtin call. Check that bultin argument is
4050 * c-parser.c (c_parser_array_notation): Check for incorrect initial
4053 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
4055 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
4056 qualifiers in __auto_type for atomic types.
4057 (c_parser_typeof_specifier): Discard all type qualifiers in
4058 __typeof__ for atomic types.
4060 2014-06-25 Marek Polacek <polacek@redhat.com>
4063 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4064 the return expression to c_finish_return.
4066 2014-06-25 Jakub Jelinek <jakub@redhat.com>
4068 * c-typeck.c (c_finish_omp_clauses): Make sure
4069 OMP_CLAUSE_LINEAR_STEP has correct type.
4071 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4075 2014-06-24 Jakub Jelinek <jakub@redhat.com>
4077 * c-parser.c (c_parser_omp_for_loop): For
4078 #pragma omp parallel for simd move lastprivate clause from parallel
4079 to for rather than simd.
4081 2014-06-23 Marek Polacek <polacek@redhat.com>
4083 * c-typeck.c (parser_build_binary_op): Don't call
4084 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4086 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
4088 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4089 * c-decl.c (merge_decls): Likewise.
4091 2014-06-09 Marek Polacek <polacek@redhat.com>
4094 * c-typeck.c (error_init): Call inform instead of error_at.
4095 (pedwarn_init): Call inform instead of pedwarn.
4096 (warning_init): Call inform instead of warning_at.
4098 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
4100 * c-decl.c (merge_decls): Use set_decl_section_name.
4101 (duplicate_decls): Remove node if it exists.
4103 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4106 * c-typeck.c (push_init_level, process_init_element,
4107 pop_init_level): Correct check for zero initialization, move
4108 missing brace warning to respect zero initialization.
4110 2014-06-05 Marek Polacek <polacek@redhat.com>
4113 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4115 2014-06-05 Marek Polacek <polacek@redhat.com>
4118 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4119 on the left hand side operand of a comparison.
4121 2014-06-05 Marek Polacek <polacek@redhat.com>
4124 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4125 Print note only if the warning was printed.
4127 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4130 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4133 2014-06-03 Marek Polacek <polacek@redhat.com>
4136 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4138 * c-tree.h (c_start_case): Update.
4139 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4140 switch condition has boolean value.
4142 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
4144 * c-decl.c: Include builtins.h.
4145 * c-parser.c: Likewise.
4147 2014-05-27 Marek Polacek <polacek@redhat.com>
4150 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4151 error and warning calls to error_at and warning_at. Pass location of
4152 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4153 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4154 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4156 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4159 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4160 function parameters.
4162 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
4164 * c-decl.c (merge_decls): Preserve symtab node pointers.
4165 (duplicate_decls): Free new decl.
4167 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4169 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4172 * c-parser.c (c_parser_omp_target): Return bool values.
4174 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4176 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4177 num_teams_loc variable to num_thread_limit_loc.
4179 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4181 * c-array-notation.c (expand_array_notations): Use void_node
4182 instead of void_zero_node.
4184 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4186 * c-decl.c (finish_struct): Adjust.
4187 (finish_enum): Likewise.
4189 (record_inline_static): Likewise.
4190 (push_scope): Likewise.
4191 (make_label): Likewise.
4192 (lookup_label_for_goto): Likewise.
4193 (finish_struct): Likewise.
4194 (finish_enum): Likewise.
4195 (store_parm_decls): Likewise.
4196 (c_push_function_context): Likewise.
4197 * c-lang.h: Remove usage of variable_size gty attribute.
4198 * c-parser.c (c_parse_init): Adjust.
4199 (c_parse_file): Likewise.
4201 2014-05-13 Marek Polacek <polacek@redhat.com>
4204 * c-typeck.c (convert_for_assignment): Pass location to
4205 WARN_FOR_ASSIGNMENT instead of input_location.
4207 2014-05-10 Marek Polacek <polacek@redhat.com>
4209 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4210 maybe_warn_string_init.
4211 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4212 maybe_warn_string_init.
4213 * c-tree.h (maybe_warn_string_init): Update declaration.
4214 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4215 Call pedwarn_init with loc instead of with input_location.
4216 (digest_init): Pass init_loc to maybe_warn_string_init.
4217 (pop_init_level): Call pedwarn_init with loc instead of with
4219 (set_init_index): Likewise.
4220 (process_init_element): Likewise.
4222 2014-05-09 Marek Polacek <polacek@redhat.com>
4225 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4226 (c_parser_initelt): Pass location to set_init_label. Pass array index
4227 location to set_init_index.
4228 * c-tree.h (push_init_level): Update declaration.
4229 (pop_init_level): Likewise.
4230 (set_init_index): Likewise.
4231 (set_init_label): Likewise.
4232 * c-typeck.c (error_init): Add location parameter. Call error_at
4234 (digest_init): Pass init_loc to error_init.
4235 (really_start_incremental_init):
4236 (push_init_level): Add location parameter. Pass loc to pop_init_level
4238 (pop_init_level): Likewise.
4239 (set_designator): Add location parameter. Pass loc to pop_init_level,
4240 push_init_level, and error_init.
4241 (set_init_index): Add location parameter. Pass loc to error_init and
4243 (set_init_label): Likewise.
4244 (output_init_element): Pass loc to error_init.
4245 (process_init_element): Pass loc to error_init, pop_init_level,
4246 pedwarn_init, and push_init_level.
4248 2014-05-09 Marek Polacek <polacek@redhat.com>
4251 * c-parser.c (c_parser_attributes): Parse the arguments as an
4252 expression-list if the attribute takes identifier.
4254 2014-05-08 Marek Polacek <polacek@redhat.com>
4257 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4260 2014-05-08 Marek Polacek <polacek@redhat.com>
4263 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4266 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4267 Mike Stump <mikestump@comcast.net>
4268 Richard Sandiford <rdsandiford@googlemail.com>
4270 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4271 (finish_enum): Use wide-int interfaces.
4272 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4273 * c-typeck.c (build_c_cast): Likewise.
4274 (set_nonincremental_init_from_string): Likewise.
4275 (c_tree_equal): Likewise.
4277 2014-05-02 Marek Polacek <polacek@redhat.com>
4280 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4281 Return size_one_node when the type is not complete.
4282 (pointer_diff): Remove comment.
4283 (build_unary_op): Improve error messages.
4285 2014-05-02 Marek Polacek <polacek@redhat.com>
4287 * c-typeck.c (c_finish_return): Separate warning_at calls.
4289 2014-05-02 Marek Polacek <polacek@redhat.com>
4291 * c-tree.h (error_init): Remove declaration.
4292 (pedwarn_init): Likewise.
4293 * c-typeck.c (error_init): Make static and move above.
4294 (pedwarn_init): Likewise.
4295 (warning_init): Move above.
4296 (maybe_warn_string_init): Likewise.
4298 2014-05-01 Jeff Law <law@redhat.com>
4302 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4303 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4306 2014-05-02 Marek Polacek <polacek@redhat.com>
4309 * c-typeck.c (push_init_level): Set constructor_designated to
4310 p->designated for structures.
4312 2014-05-01 Marek Polacek <polacek@redhat.com>
4315 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4316 function-definition has an attribute after the declarator.
4318 2014-05-01 Marek Polacek <polacek@redhat.com>
4321 * c-typeck.c (warning_init): Add location_t parameter. Call
4322 warning_at instead of warning.
4323 (push_init_level): Pass input_location to warning_init.
4324 (add_pending_init): Add location_t parameter. Pass loc to
4326 (set_nonincremental_init): Pass input_location to add_pending_init.
4327 (set_nonincremental_init_from_string): Likewise.
4328 (output_init_element): Pass loc to warning_init and to
4331 2014-05-01 Marek Polacek <polacek@redhat.com>
4334 * c-typeck.c (c_finish_return): Distinguish between label and variable
4335 when warning about returning local address.
4337 2014-05-01 Marek Polacek <polacek@redhat.com>
4340 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4343 2014-05-01 Marek Polacek <polacek@redhat.com>
4346 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4347 instead of 0 to WARN_FOR_QUALIFIERS.
4349 2014-05-01 Marek Polacek <polacek@redhat.com>
4352 * c-typeck.c (default_conversion): Use better location for
4355 2014-04-30 Marek Polacek <polacek@redhat.com>
4357 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4358 also when SANITIZE_FLOAT_DIVIDE is on.
4360 2014-04-30 Marek Polacek <polacek@redhat.com>
4363 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4364 and pedwarn_init. Use loc insted of input_location.
4366 2014-04-30 Marek Polacek <polacek@redhat.com>
4369 * c-typeck.c (build_binary_op): Use location when warning about
4372 2014-04-25 Marek Polacek <polacek@redhat.com>
4375 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4376 always_inline/noinline and hot/cold attributes.
4378 2014-04-25 Marek Polacek <polacek@redhat.com>
4381 * c-parser.c (c_parser_initelt): Pass input_location to
4382 process_init_element.
4383 (c_parser_initval): Pass loc to process_init_element.
4384 * c-tree.h (process_init_element): Adjust declaration.
4385 * c-typeck.c (push_init_level): Pass input_location to
4386 process_init_element.
4387 (pop_init_level): Likewise.
4388 (set_designator): Likewise.
4389 (output_init_element): Add location_t parameter. Pass loc to
4391 (output_pending_init_elements): Pass input_location to
4392 output_init_element.
4393 (process_init_element): Add location_t parameter. Pass loc to
4394 output_init_element.
4396 2014-04-24 Jakub Jelinek <jakub@redhat.com>
4398 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4399 atomic-clause, allow comma in between atomic-clause and
4402 2014-04-22 Jakub Jelinek <jakub@redhat.com>
4405 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4406 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4408 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4411 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4412 create_tmp_var instead build_decl for creating temps.
4413 (build_array_notation_expr): Likewise.
4414 (fix_conditional_array_notations_1): Likewise.
4415 (fix_array_notation_expr): Likewise.
4416 (fix_array_notation_call_expr): Likewise.
4418 2014-03-28 Jakub Jelinek <jakub@redhat.com>
4421 * c-tree.h (c_build_function_call_vec): New prototype.
4422 * c-typeck.c (build_function_call_vec): Don't call
4423 resolve_overloaded_builtin here.
4424 (c_build_function_call_vec): New wrapper function around
4425 build_function_call_vec. Call resolve_overloaded_builtin here.
4426 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4427 Call c_build_function_call_vec instead of build_function_call_vec.
4428 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4429 * c-decl.c (finish_decl): Likewise.
4431 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4434 * c-typeck.c: Use correct format string in cast-qual warning
4436 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4438 * c-decl.c (c_decl_attributes): Use
4439 lang_hooks.types.omp_mappable_type.
4440 * c-typeck.c (c_finish_omp_clauses): Likewise.
4442 2014-03-06 Marek Polacek <polacek@redhat.com>
4445 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4446 of checking tree code.
4448 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4450 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4451 (c_parser_parameter_declaration): Likewise.
4453 2014-02-19 Marek Polacek <polacek@redhat.com>
4456 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4457 Call mark_exp_read on exp.value.
4458 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4459 TREE_ADDRESSABLE on old instead of val.
4460 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4462 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4464 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4465 C_EXPR_APPEND by vec_safe_push.
4466 * c-tree.h (C_EXPR_APPEND): Remove.
4468 2014-01-31 Marek Polacek <polacek@redhat.com>
4471 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4472 build_function_call_vec.
4473 (build_function_call): Likewise.
4474 (build_atomic_assign): Likewise.
4475 (build_function_call_vec): Add arg_loc parameter. Use it.
4476 (convert_arguments): Likewise.
4477 (convert_for_assignment): Rename rhs_loc to expr_loc.
4478 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4479 (c_parser_objc_keywordexpr): Likewise.
4480 (c_parser_postfix_expression_after_primary): Call
4481 build_function_call_vec with expr_loc rather than op_loc.
4482 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4483 build_function_call_vec.
4484 (c_parser_expr_list): Add locations parameter. Fill it with locations
4485 of function arguments.
4486 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4488 2014-01-30 Marek Polacek <polacek@redhat.com>
4491 * c-typeck.c (build_function_call_vec): Use loc parameter.
4492 (convert_arguments): Add location parameter. Use it.
4493 (ep_convert_and_check): Likewise.
4494 (build_atomic_assign): Adjust convert_for_assignment call.
4495 (build_modify_expr): Likewise.
4496 (digest_init): Likewise.
4497 (c_finish_return): Likewise.
4498 (build_conditional_expr): Adjust ep_convert_and_check calls.
4499 (convert_for_assignment): Add rhs_loc parameter. Use it.
4500 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4503 2014-01-30 Richard Biener <rguenther@suse.de>
4506 * c-typeck.c (build_function_call_vec): Do not replace calls
4507 to a function via an incompatible type with a runtime abort.
4509 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4511 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4512 flag_enable_cilkplus with flag_cilkplus.
4513 (c_parser_direct_declarator_inner): Likewise.
4514 (c_parser_attribute_any_word): Likewise.
4515 (c_parser_attributes): Likewise.
4516 (c_parser_compound_statement): Likewise.
4517 (c_parser_statement_after_labels): Likewise.
4518 (c_parser_if_statement): Likewise.
4519 (c_parser_switch_statement): Likewise.
4520 (c_parser_do_statement): Likewise.
4521 (c_parser_for_statement): Likewise.
4522 (c_parser_unary_expression): Likewise.
4523 (c_parser_postfix_expression): Likewise.
4524 (c_parser_postfix_expression_after_primary): Likewise.
4525 (c_parser_postfix_expression_after_primary): Likewise.
4526 (c_parser_omp_clause_name): Likewise.
4527 (c_finish_omp_declare_simd): Likewise.
4528 (c_parser_cilk_verify_simd): Likewise.
4529 * c-typeck.c (build_array_ref): Likewise.
4530 (build_function_call_vec): Likewise.
4531 (convert_arguments): Likewise.
4532 (build_compound_expr): Likewise.
4533 (c_finish_return): Likewise.
4534 (c_finish_if_stmt): Likewise.
4535 (c_finish_loop): Likewise.
4536 (build_binary_op): Likewise.
4538 2014-01-23 Marek Polacek <polacek@redhat.com>
4541 * c-typeck.c (parser_build_binary_op): Use location instead of
4543 (build_binary_op): Pass location to shorten_compare.
4545 2014-01-23 Marek Polacek <polacek@redhat.com>
4548 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4551 2014-01-23 Marek Polacek <polacek@redhat.com>
4554 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4555 of a comma expression.
4556 (emit_side_effect_warnings): Likewise.
4558 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4561 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4562 function to use walk_tree and moved a lot of its functionality to
4563 expand_array_notations.
4564 (expand_array_notations): New function.
4566 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4568 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4569 attribute an attribute without value.
4571 2014-01-23 Jakub Jelinek <jakub@redhat.com>
4574 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4575 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4577 2014-01-22 Marek Polacek <polacek@redhat.com>
4580 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4581 of remove_c_maybe_const_expr on op1 and op2.
4583 2014-01-15 Jakub Jelinek <jakub@redhat.com>
4586 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4587 effects, preevaluate rhs using SAVE_EXPR first.
4589 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4592 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4593 statements with if-elseif statements.
4595 2014-01-06 Marek Polacek <polacek@redhat.com>
4598 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4599 defined bit-field types only in ISO C.
4601 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4603 Update copyright years
4605 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4607 * c-array-notation.c: Use the standard form for the copyright notice.
4609 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4611 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4612 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4613 field in parser is not empty. If not-empty, call the function
4614 c_parser_finish_omp_declare_simd.
4615 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4616 between SIMD-enabled functions and #pragma simd. Added new parameter.
4617 (c_parser_cilk_all_clauses): Modified the usage of the function
4618 c_parser_cilk_clause_vectorlength as mentioned above.
4619 (c_parser_cilk_simd_fn_vector_attrs): New function.
4620 (c_finish_cilk_simd_fn_tokens): Likewise.
4621 (is_cilkplus_vector_p): Likewise.
4622 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4623 "nomask," and "mask" strings in clause name.
4624 (c_parser_omp_all_clauses): Added 3 new case statements:
4625 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4626 PRAGMA_CILK_CLAUSE_NOMASK.
4627 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4628 check for vector attribute and if so call the function
4629 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4630 called the function c_finish_cilk_simd_fn_tokens.
4631 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4632 parser field is non-empty. If so, parse them as you would parse
4633 the omp declare simd pragma.
4634 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4635 Added a check when step is a parameter and flag it as error.
4636 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4637 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4640 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4642 * c-parser.c (c_parser_omp_parallel): Fix description.
4644 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4646 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4647 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4648 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4649 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4651 2013-12-04 Joseph Myers <joseph@codesourcery.com>
4654 * c-parser.c (c_parser_alignas_specifier): Use
4655 c_sizeof_or_alignof_type instead of c_alignof.
4656 (c_parser_alignof_expression): Likewise, with min_alignof
4657 parameter depending on alignof spelling used.
4659 2013-12-04 Marek Polacek <polacek@redhat.com>
4662 * c-decl.c (start_function): Don't warn for missing prototype for
4665 2013-12-03 Marek Polacek <polacek@redhat.com>
4668 * c-decl.c (build_compound_literal): Allow compound literals with
4669 empty initial value.
4671 2013-12-02 Joseph Myers <joseph@codesourcery.com>
4674 * c-typeck.c (build_modify_expr): Diagnose assignment to
4675 expression with array type.
4677 2013-11-29 Joseph Myers <joseph@codesourcery.com>
4680 * c-typeck.c (process_init_element): Do not treat a string as
4681 initializing a whole array when used with a designator for an
4684 2013-11-29 Joseph Myers <joseph@codesourcery.com>
4687 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4688 an inline function following a static declaration.
4690 2013-11-28 Jakub Jelinek <jakub@redhat.com>
4693 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4694 to p_name before calling c_parser_omp_teams instead of after.
4695 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4696 argument. Remove unused p_name variable.
4698 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
4699 Jakub Jelinek <jakub@redhat.com>
4701 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4702 external_scope is NULL.
4704 2013-11-27 Tom de Vries <tom@codesourcery.com>
4705 Marc Glisse <marc.glisse@inria.fr>
4708 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4710 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
4712 * c-typeck.c: Add required include files from gimple.h.
4714 2013-11-22 David Malcolm <dmalcolm@redhat.com>
4716 * c-decl.c (define_label, shadow_tag_warned)
4717 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4718 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4719 (declspecs_add_type): Remove use of in_system_header macro.
4720 * c-parser.c (c_parser_unary_expression): Likewise.
4721 * c-typeck.c (store_init_value, process_init_element)
4722 (c_start_case): Likewise.
4724 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4727 * c-parser.c (c_parser_set_source_position_from_token): Remove
4728 reference to in_system_header from comment.
4730 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4732 * c-decl.c (grokdeclarator): Update comment to refer to
4733 tree_to_[su]hwi rather than tree_low_cst.
4735 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4737 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4738 tree_to_uhwi throughout.
4740 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4742 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4745 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4747 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4750 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
4752 * c-parser.c (c_parser_cilk_simd): New.
4753 (c_parser_cilk_verify_simd): New.
4754 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4755 (c_parser_omp_for_loop): Add case for NE_EXPR.
4756 Set c_break_label for CILK_SIMD.
4757 (c_parser_cilk_clause_vectorlength): New.
4758 (c_parser_cilk_clause_linear): New.
4759 (c_parser_cilk_clause_name): New.
4760 (c_parser_cilk_all_clauses): New.
4761 * c-typeck.c (build_unary_op): Pass location argument to
4763 (build_modify_expr): Same.
4764 (build_asm_expr): Same.
4765 (c_finish_bc_stmt): Error on break/continue in loops.
4767 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
4769 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4771 2013-11-14 Diego Novillo <dnovillo@google.com>
4773 * c-decl.c: Include print-tree.h.
4774 Include stor-layout.h.
4777 Include stringpool.h.
4778 * c-lang.c: Include fold-const.h.
4779 * c-parser.c: Include stringpool.h.
4781 Include stor-layout.h.
4783 Include trans-mem.h.
4784 * c-typeck.c: Include stor-layout.h.
4785 Include trans-mem.h.
4789 2013-11-13 Joseph Myers <joseph@codesourcery.com>
4791 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4792 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4794 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4795 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4797 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4798 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4799 (c_parser_declarator, c_parser_direct_declarator_inner)
4800 (c_parser_parameter_declaration, c_parser_type_name): All callers
4802 (c_parser_declaration_or_fndef): Handle declarations with type
4803 determined from the initializer.
4805 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
4807 * c-typeck.c: Include gimplify.h.
4809 2013-11-12 Joseph Myers <joseph@codesourcery.com>
4811 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4812 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4814 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4815 or _Thread_local as appropriate in diagnostics.
4816 (build_null_declspecs): Initialize ret->thread_gnu_p.
4817 (declspecs_add_scspec): Handle either __thread or _Thread_local
4818 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
4819 pedantic. Do not disallow _Thread_local extern and _Thread_local
4822 2013-11-07 Joseph Myers <joseph@codesourcery.com>
4823 Andrew MacLeod <amacleod@redhat.com>
4825 * c-aux-info.c (gen_type): Handle atomic qualifier.
4826 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4827 qualifiers when compating types.
4828 (shadow_tag_warned): Handle atomic_p in declspecs.
4829 (quals_from_declspecs): Likewise.
4830 (start_decl): Use c_type_promotes_to when promoting argument
4832 (grokdeclarator): Handle _Atomic.
4833 (get_parm_info): Diagnose any qualifier on "void" as only
4835 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4836 comparing types. Use c_type_promotes_to when promoting argument
4838 (finish_function): Use c_type_promotes_to when promoting argument
4840 (build_null_declspecs): Handle atomic_p in declspecs.
4841 (declspecs_add_qual): Handle RID_ATOMIC.
4842 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4843 (c_token_starts_declspecs): Handle RID_ATOMIC.
4844 (c_parser_declspecs): Handle atomic type specifiers and
4846 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4847 from types of expressions with atomic type.
4848 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4849 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4850 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4851 (c_parser_statement_after_labels, c_parser_switch_statement)
4852 (c_parser_for_statement, c_parser_expr_no_commas)
4853 (c_parser_conditional_expression, c_parser_binary_expression)
4854 (c_parser_cast_expression, c_parser_unary_expression)
4855 (c_parser_postfix_expression)
4856 (c_parser_postfix_expression_after_primary, c_parser_expression):
4857 Use convert_lvalue_to_rvalue.
4858 (c_parser_expression_conv, c_parser_expr_list): Document
4859 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4860 (c_parser_objc_synchronized_statement): Use
4861 convert_lvalue_to_rvalue.
4862 (c_parser_objc_selector): Handle RID_ATOMIC.
4863 (c_parser_objc_receiver, c_parser_array_notation): Use
4864 convert_lvalue_to_rvalue.
4865 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4866 _Atomic (type-name).
4867 (struct c_declspecs): Add atomic_p field.
4868 (convert_lvalue_to_rvalue): Declare.
4869 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4870 corresponding atomic types.
4871 (qualify_type): Don't add _Atomic qualifiers from second argument.
4872 (comp_target_types): Do not allow _Atomic mismatches.
4873 (type_lists_compatible_p): Do not remove atomic qualifiers when
4875 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4876 (build_atomic_assign): New functions.
4877 (build_unary_op): Use build_atomic_assign for atomic increment and
4879 (build_conditional_expr): Do not treat _Atomic void as a qualified
4881 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4882 (find_anonymous_field_with_type, convert_to_anonymous_field)
4883 (convert_for_assignment): Do not remove atomic qualifiers when
4885 (digest_init): Do not accept initialization of arrays of atomic
4886 elements by string constants.
4887 (build_asm_expr): Use convert_lvalue_to_rvalue.
4888 (build_binary_op): Do not treat _Atomic void as a qualified
4891 2013-11-06 DJ Delorie <dj@redhat.com>
4893 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4894 both explicit and builtin, print the location of the explicit one.
4896 2013-11-05 Tobias Burnus <burnus@net-b.de>
4898 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4899 c_parser_omp_distribute, c_parser_omp_teams,
4900 c_parser_omp_target, c_parser_omp_declare): Handle
4903 2013-11-03 Marek Polacek <polacek@redhat.com>
4905 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4907 2013-11-01 Jakub Jelinek <jakub@redhat.com>
4909 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4910 check_dup_generic at the end, unless remove is true.
4911 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4913 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4915 2013-10-31 Jakub Jelinek <jakub@redhat.com>
4917 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4918 with decl that is not pointer nor array.
4920 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4922 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4923 a spawning function is found.
4924 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4925 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4926 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4927 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4929 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4930 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4932 (c_finish_return): Added a check to reject _Cilk_spawn in return
4934 (build_cilk_spawn): New function.
4935 (build_cilk_sync): Likewise.
4936 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4938 2013-10-27 Tobias Burnus <burnus@net-b.de>
4941 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4942 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4943 (c_parser_statement_after_labels): Update calls.
4945 2013-10-24 Tobias Burnus <burnus@net-b.de>
4948 * c-parser.c (c_parser_pragma, c_parser_for_statement):
4949 Handle PRAGMA_IVDEP.
4950 (c_parser_statement_after_labels): Update call.
4952 2013-10-24 Marek Polacek <polacek@redhat.com>
4954 * c-parser.c (c_parser_struct_declaration): Add a comment.
4955 (c_parser_declarator): Don't allow _Alignas here.
4957 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
4959 * c-parser.c: Include omp-low.h.
4960 * c-typeck.c: Likewise.
4962 2013-10-17 Marek Polacek <polacek@redhat.com>
4965 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4966 Document syntax of the array-declarator.
4967 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4969 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4970 (c_parser_struct_declaration): Likewise.
4971 (c_parser_declarator): Likewise.
4972 (c_parser_direct_declarator_inner): Likewise.
4973 (c_parser_parameter_declaration): Likewise.
4974 (c_parser_type_name): Likewise.
4976 2013-10-11 Jakub Jelinek <jakub@redhat.com>
4978 * c-lang.h (current_omp_declare_target_attribute): New extern
4980 * c-parser.c: Include c-lang.h.
4981 (struct c_parser): Change tokens to c_token *.
4982 Add tokens_buf field. Change tokens_avail type to unsigned int.
4983 (c_parser_consume_token): If parser->tokens isn't
4984 &parser->tokens_buf[0], increment parser->tokens.
4985 (c_parser_consume_pragma): Likewise.
4986 (enum pragma_context): Add pragma_struct and pragma_param.
4987 (c_parser_external_declaration): Adjust
4988 c_parser_declaration_or_fndef caller.
4989 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4990 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4991 Adjust recursive call.
4992 (c_parser_struct_or_union_specifier): Use pragma_struct instead
4994 (c_parser_parameter_declaration): Use pragma_param instead of
4996 (c_parser_compound_statement_nostart, c_parser_label,
4997 c_parser_for_statement): Adjust
4998 c_parser_declaration_or_fndef callers.
4999 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
5000 it through to c_parser_conditional_expression.
5001 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
5002 pass it through to c_parser_binary_expression. Adjust recursive
5004 (c_parser_binary_expression): Remove prec argument, add
5005 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
5006 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
5007 binop matches it, use build2 instead of parser_build_binary_op.
5008 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
5009 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
5010 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
5011 Handle pragma_struct and pragma_param the same as pragma_external.
5012 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
5013 (c_parser_omp_variable_list): Parse array sections for
5014 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
5015 (c_parser_omp_clause_collapse): Fully fold collapse expression.
5016 (c_parser_omp_clause_reduction): Handle user defined reductions.
5017 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
5018 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
5019 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
5020 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
5021 c_parser_omp_clause_depend, c_parser_omp_clause_map,
5022 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
5023 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
5024 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
5025 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
5026 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
5027 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
5028 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
5029 (c_parser_omp_for_loop): Add CODE argument, pass it through
5030 to c_finish_omp_for. Change last argument to cclauses,
5031 and adjust uses to grab parallel clauses from the array of all
5032 the split clauses. Adjust c_parser_binary_expression,
5033 c_parser_declaration_or_fndef and c_finish_omp_for callers.
5034 (omp_split_clauses): New function.
5035 (c_parser_omp_simd): New function.
5036 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
5037 Allow the function to be called also when parsing combined constructs,
5038 and call c_parser_omp_simd when parsing for simd.
5039 (c_parser_omp_sections_scope): If section-sequence doesn't start with
5040 #pragma omp section, require exactly one structured-block instead of
5041 sequence of statements.
5042 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
5043 Allow the function to be called also when parsing combined constructs.
5044 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
5045 Allow the function to be called also when parsing combined
5047 (c_parser_omp_taskgroup, c_parser_omp_cancel,
5048 c_parser_omp_cancellation_point, c_parser_omp_distribute,
5049 c_parser_omp_teams, c_parser_omp_target_data,
5050 c_parser_omp_target_update, c_parser_omp_target,
5051 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
5052 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
5053 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
5054 (c_parser_omp_construct): Add p_name and mask vars. Handle
5055 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
5056 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
5057 and c_parser_omp_sections callers.
5058 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
5059 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5060 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5061 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5062 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5064 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5065 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5066 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5067 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5068 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5069 * c-typeck.c: Include tree-inline.h.
5070 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5071 handle_omp_array_sections_1, handle_omp_array_sections,
5072 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5073 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5074 user defined reductions.
5075 (c_tree_equal): New function.
5076 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5077 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5078 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5079 c_check_omp_declare_reduction_r): New prototypes.
5080 * c-decl.c (current_omp_declare_target_attribute): New variable.
5081 (c_decl_attributes): New function.
5082 (start_decl, start_function): Use it instead of decl_attributes.
5083 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5084 c_omp_reduction_decl, c_omp_reduction_lookup,
5085 c_check_omp_declare_reduction_r): New functions.
5087 2013-09-25 Tom Tromey <tromey@redhat.com>
5089 * Make-lang.in (c/gccspec.o): Remove.
5090 (CFLAGS-c/gccspec.o): New variable.
5091 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5092 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5093 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5095 2013-09-25 Tom Tromey <tromey@redhat.com>
5097 * Make-lang.in (c/gccspec.o): Don't use subshell.
5099 2013-09-18 Marek Polacek <polacek@redhat.com>
5102 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5103 Remove unnecessary check.
5105 2013-09-18 Marek Polacek <polacek@redhat.com>
5108 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5109 no_sanitize_undefined attribute.
5111 2013-09-13 Kai Tietz <ktietz@redhat.com>
5114 * c-decl.c (c_builtin_function_ext_scope): Remove
5115 wrong assumption that it is never called on prexisting
5118 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5120 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5122 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5124 * c-objc-common.c (c_tree_printer): Tidy.
5126 2013-08-30 Marek Polacek <polacek@redhat.com>
5128 * c-typeck.c (build_binary_op): Add division by zero and shift
5131 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
5132 Joseph Myers <joseph@codesourcery.com>
5135 * c-typeck.c (c_common_type): Prefer double_type_node over
5136 other REAL_TYPE types with the same precision.
5137 (convert_arguments): Likewise.
5139 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5141 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5142 (c_initialize_diagnostics): Call a destructor for the early printer.
5144 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5146 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5147 printer initialization.
5149 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
5152 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5153 check for truth values.
5154 (expand_array_notation_exprs): Added truth values case. Removed an
5155 unwanted else. Added for-loop to walk through subtrees in default
5158 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5160 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5162 2013-07-23 Joseph Myers <joseph@codesourcery.com>
5164 * c-parser.c (struct c_generic_association): Fix typo.
5166 2013-07-23 Tom Tromey <tromey@redhat.com>
5167 Joseph Myers <joseph@codesourcery.com>
5169 * c-parser.c (struct c_generic_association): New.
5170 (c_generic_association_d): New typedef.
5171 (c_parser_generic_selection): New function.
5172 (c_parser_postfix_expression): Handle RID_GENERIC.
5174 2013-07-13 Jason Merrill <jason@redhat.com>
5177 * c-decl.c (finish_struct): Check for too-large class.
5179 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
5182 * c-typeck.c (set_init_index): When folding, check for index overflow.
5184 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5186 * c-parser.c (c_parser_array_notation): Removed rejection of array
5187 notations in an array of function pointers.
5189 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5191 * c-array-notation.c (make_triplet_val_inv): New function.
5192 (create_cmp_incr): Likewise.
5193 (create_array_refs): Likewise.
5194 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5195 Also modularized common parts between functions and called the function.
5196 (build_array_notation_expr): Likewise.
5197 (fix_conditional_array_notations_1): Likewise.
5198 (fix_array_notation_expr): Likewise.
5199 (fix_array_notation_call_expr): Likewise.
5201 2013-06-18 Marek Polacek <polacek@redhat.com>
5204 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5206 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5208 * c-array-notation.c (build_array_notation_expr): Reject array notation
5209 mismatch between LHS and RHS even inside a call_expr. Also, removed
5210 a couple while statements that were dead code.
5212 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5214 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5215 excessive precision expressions in function parameters. Also removed
5216 couple unwanted while statements.
5218 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5220 * c-array-notation.c (expand_array_notation_exprs): Added
5221 ARRAY_NOTATION_REF case.
5223 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5225 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5226 function to c-family/array-notation-common.c.
5227 (is_cilkplus_reduce_builtin): Likewise.
5228 (find_rank): Likewise.
5229 (extract_array_notation_exprs): Likewise.
5230 (replace_array_notations): Likewise.
5231 (find_inv_trees): Likewise.
5232 (replace_inv_trees): Likewise.
5233 (contains_array_notation_expr): Likewise.
5234 (find_correct_array_notation_type): Likewise.
5235 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5236 (struct inv_list): Moved this to c-family/array-notation-common.c.
5237 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5239 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5241 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5242 reduction functions outside the for-loop. Added a check if the fundecl
5243 is non-NULL. Finally, removed an unwanted if-statement, and made the
5246 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5248 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5249 condition of the if-statement matches the rank of else-block and then-
5250 block when array notations are used.
5251 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5252 expression after the entire function body is parsed.
5253 (c_parser_expr_no_commas): Delayed creating array notation expressions
5254 to the end of function parsing.
5255 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5256 whole if-statement instead of just the condition.
5257 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5259 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5262 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5263 array to NULL_TREE if they are unused. Also added a check for the
5264 field to be NULL before its fields are used in future.
5266 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5269 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5270 (build_array_notation_expr): Likewise.
5272 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5274 * c-typeck.c (build_array_ref): Added a check to see if array's
5275 index is greater than one. If true, then emit an error.
5276 (build_function_call_vec): Exclude error reporting and checking
5277 for builtin array-notation functions.
5278 (convert_arguments): Likewise.
5279 (c_finish_return): Added a check for array notations as a return
5280 expression. If true, then emit an error.
5281 (c_finish_loop): Added a check for array notations in a loop
5282 condition. If true then emit an error.
5283 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5284 (build_binary_op): Added a check for array notation expr inside
5285 op1 and op0. If present, we call another function to find correct
5287 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5288 * c-parser.c (c_parser_compound_statement): Check if array
5289 notation code is used in tree, if so, then transform them into
5291 (c_parser_expr_no_commas): Check if array notation is used in LHS
5292 or RHS, if so, then build array notation expression instead of
5294 (c_parser_postfix_expression_after_primary): Added a check for
5295 colon(s) after square braces, if so then handle it like an array
5296 notation. Also, break up array notations in unary op if found.
5297 (c_parser_direct_declarator_inner): Added a check for array
5299 (c_parser_compound_statement): Added a check for array notation in
5300 a stmt. If one is present, then expand array notation expr.
5301 (c_parser_if_statement): Likewise.
5302 (c_parser_switch_statement): Added a check for array notations in
5303 a switch statement's condition. If true, then output an error.
5304 (c_parser_while_statement): Similarly, but for a while.
5305 (c_parser_do_statement): Similarly, but for a do-while.
5306 (c_parser_for_statement): Similarly, but for a for-loop.
5307 (c_parser_unary_expression): Check if array notation is used in a
5308 pre-increment or pre-decrement expression. If true, then expand
5310 (c_parser_array_notation): New function.
5311 * c-array-notation.c: New file.
5312 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5314 2013-05-23 Mike Stump <mikestump@comcast.net>
5316 * c-typeck.c (convert_for_assignment): Handle references to memory
5319 2013-05-16 Jason Merrill <jason@redhat.com>
5321 * Make-lang.in (cc1$(exeext)): Use link mutex.
5323 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5325 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5326 to simply use OPT_Wpointer_arith.
5327 (build_unary_op): Likewise.
5329 2013-04-03 Jakub Jelinek <jakub@redhat.com>
5332 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5333 argument. If set, or it temporarily for parsing of the first
5334 argument into force_folding_builtin_constant_p.
5335 (c_parser_postfix_expression): Adjust callers.
5337 2013-03-21 Richard Biener <rguenther@suse.de>
5339 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5340 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5342 2013-02-12 Marek Polacek <polacek@redhat.com>
5345 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5348 2013-01-24 Jakub Jelinek <jakub@redhat.com>
5351 * c-typeck.c (set_nonincremental_init_from_string): If
5352 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5354 (process_init_element): Likewise.
5356 2012-12-20 Jakub Jelinek <jakub@redhat.com>
5359 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5360 argument, don't call default_function_array_conversion
5361 nor c_fully_fold here.
5362 (c_parser_asm_statement): Adjust callers.
5363 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5364 and outputs here, and call default_function_array_conversion
5365 on inputs that don't need to be addressable.
5367 2012-12-18 Jakub Jelinek <jakub@redhat.com>
5370 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5371 warning require that both c_common_unsigned_type as well as
5372 c_common_signed_type is the same for both mvl and mvr types.
5374 2012-11-16 Diego Novillo <dnovillo@google.com>
5376 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5378 * c-common.c: Use new vec API in vec.h.
5379 * c-common.h: Likewise.
5380 * c-gimplify.c: Likewise.
5381 * c-pragma.c: Likewise.
5382 * c-pretty-print.c: Likewise.
5383 * c-pretty-print.h: Likewise.
5384 * c-semantics.c: Likewise.
5385 * c-decl.c: Likewise.
5386 * c-parser.c: Likewise.
5387 * c-tree.h: Likewise.
5388 * c-typeck.c: Likewise.
5390 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5393 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5395 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5398 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5399 shadows a function, unless the variable is a function or a
5400 pointer-to-function.
5402 2012-10-12 Jakub Jelinek <jakub@redhat.com>
5405 * c-parser.c (struct c_tree_loc_pair): Removed.
5406 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5407 add location_t * and tree * arguments, fill in array of 3
5408 sizeof_arg trees and corresponding locs.
5409 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5410 c_parser_expr_list callers.
5411 (c_parser_postfix_expression_after_primary): Likewise. Pass
5412 array of 3 sizeof_arg trees and locs (corresponding to first
5413 3 arguments) to sizeof_pointer_memaccess_warning.
5415 2012-10-09 Lawrence Crowl <crowl@google.com>
5417 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5418 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5421 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5424 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5427 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
5430 * c-typeck.c: Include c-common.h.
5431 (enum stv_conv): Moved to c-common.h.
5432 (scalar_to_vector): Moved to c-common.c.
5433 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5434 * Make-lang.in: c-typeck.c depends on c-common.h.
5436 2012-10-04 Arnaud Charlet <charlet@adacore.com>
5438 * c-decl.c (c_write_global_declarations): Fix handling of
5441 2012-09-30 Sharad Singhai <singhai@google.com>
5443 * c-decl.c (c_write_global_declarations): Use a different method
5444 to determine if the dump has ben initialized.
5446 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5449 * c-typeck.c (c_cast_expr): When casting to a type requiring
5450 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5453 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5456 * c-typeck.c (build_unary_op): Pass original argument of
5457 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5458 any C_MAYBE_CONST_EXPR, if it has integer operands.
5459 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5460 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5461 to c_objc_common_truthvalue_conversion, then remove any
5462 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5463 c_objc_common_truthvalue_conversion not
5464 c_common_truthvalue_conversion.
5465 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5466 call note_integer_operands for arguments with integer operands
5467 that are not integer constants.
5469 2012-09-13 Jakub Jelinek <jakub@redhat.com>
5472 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5473 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5475 2012-08-31 Jakub Jelinek <jakub@redhat.com>
5478 * c-convert.c (convert): Don't call fold_convert_loc if
5479 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5480 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5481 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5483 2012-08-24 Jakub Jelinek <jakub@redhat.com>
5486 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5487 for nested and empty_ok arguments in the call to
5488 c_parser_declaration_or_fndef.
5490 2012-08-17 Jakub Jelinek <jakub@redhat.com>
5492 * c-tree.h (c_last_sizeof_arg): Declare.
5493 * c-parser.c (struct c_tree_loc_pair): New type.
5494 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5496 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5497 (c_parser_postfix_expression_after_primary): Likewise. Call
5498 sizeof_pointer_memaccess_warning if needed.
5499 (sizeof_ptr_memacc_comptypes): New function.
5500 * c-typeck.c (c_last_sizeof_arg): New global variable.
5501 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5503 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
5505 * c-lang.h (lang_decl): Add variable_size GTY option.
5507 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5509 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5510 * Make-lang.in: Fix dependencies.
5512 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5514 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5515 and add language Makefile hooks.
5516 * config-lang.in: New file.
5517 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5518 add the required "normal" config-lang.in rules.
5519 * c-lang.h: Moved from gcc/ to here.
5520 * c-tree.h: Likewise.
5521 * c-objc-common.c: Likewise.
5522 * c-objc-common.h: Likewise.
5523 * c-typeck.c: Likewise.
5524 * c-convert.c: Likewise.
5525 * c-lang.c: Likewise.
5526 * c-aux-info.c: Likewise.
5527 * c-errors.c: Likewise.
5528 * gccspec.c: Likewise.
5529 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5530 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5532 Copyright (C) 2012-2018 Free Software Foundation, Inc.
5534 Copying and distribution of this file, with or without modification,
5535 are permitted in any medium without royalty provided the copyright
5536 notice and this notice are preserved.