1 2018-06-15 Jakub Jelinek <jakub@redhat.com>
4 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
5 before doing POINTER_DIFF_EXPR.
7 2018-06-07 Marek Polacek <polacek@redhat.com>
10 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
11 for loop initial declarations.
13 2018-05-30 David Pagan <dave.pagan@oracle.com>
16 * c-decl.c (grokdeclarator): Update check for return type warnings.
17 (start_function): Likewise.
18 (finish_function): Likewise.
19 * c-typeck.c (c_finish_return): Update check for return type warnings.
20 Pass OPT_Wreturn_type to pedwarn when appropriate.
22 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
24 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
27 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
29 * gimple-parser.c: Include internal-fn.h.
30 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
31 (c_parser_gimple_call_internal): New function.
32 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
35 2018-05-10 Jakub Jelinek <jakub@redhat.com>
38 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
39 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
41 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
42 fold_offsetof_1, pass argtype as TYPE to it and drop the
45 2018-05-02 David Pagan <dave.pagan@oracle.com>
48 * c-decl.c (old_style_parameter_scope): New function.
49 * c-parser.c (c_parser_postfix_expression): Check for statement
50 expressions in old-style function parameter list declarations.
51 * c-parser.h (old_style_parameter_scope): New extern declaration.
53 2018-04-25 Jakub Jelinek <jakub@redhat.com>
56 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
57 it is not TREE_STATIC.
58 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
59 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
60 its COMPOUND_LITERAL_EXPR_DECL.
62 2018-03-21 Joseph Myers <joseph@codesourcery.com>
64 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
65 where all functions return the same _FloatN or _FloatNx type,
66 treat integer types as _Float64 instead of double.
68 2018-03-21 Jakub Jelinek <jakub@redhat.com>
71 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
72 building vector comparison, diagnose it and return error_mark_node.
74 2018-03-15 Jakub Jelinek <jakub@redhat.com>
77 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
78 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
79 INTEGER_TYPE element type.
81 2018-03-13 David Pagan <dave.pagan@oracle.com>
84 * c-typeck.c (output_init_element): Ensure field initializer
85 expression is always evaluated if there are side effects.
87 2018-03-06 Jakub Jelinek <jakub@redhat.com>
90 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
91 !building_stmt_list_p ().
93 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
96 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
97 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
98 and include the BIND_EXPR in the list of things that need to be
101 2018-02-09 Nathan Sidwell <nathan@acm.org>
104 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
105 to strict_aliasing_warning.
107 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
109 * c-typeck.c (really_start_incremental_init, push_init_level,
110 set_nonincremental_init, output_init_element, process_init_element):
111 Use DECL_UNNAMED_BIT_FIELD.
113 2018-01-31 Marek Polacek <polacek@redhat.com>
116 * c-parser.c (c_parser_compound_statement_nostart): Call
117 expansion_point_location_if_in_system_header.
119 2018-01-17 David Malcolm <dmalcolm@redhat.com>
122 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
125 2018-01-13 Jakub Jelinek <jakub@redhat.com>
128 * c-tree.h (decl_constant_value_1): Add a bool argument.
129 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
130 returning a CONSTRUCTOR if it is true. Use error_operand_p.
131 (decl_constant_value): Adjust caller.
132 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
133 decl_constant_value_1 as IN_INIT. Otherwise, punt if
134 decl_constant_value returns initializer that has BLKmode or
136 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
138 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
139 Alan Hayward <alan.hayward@arm.com>
140 David Sherwood <david.sherwood@arm.com>
142 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
143 TYPE_VECTOR_SUBPARTS.
145 2018-01-03 Jakub Jelinek <jakub@redhat.com>
147 Update copyright years.
149 2018-01-01 Jakub Jelinek <jakub@redhat.com>
152 * c-parser.c (c_parser_braced_init, c_parser_initelt,
153 c_parser_conditional_expression, c_parser_cast_expression,
154 c_parser_sizeof_expression, c_parser_alignof_expression,
155 c_parser_postfix_expression, c_parser_omp_declare_reduction,
156 c_parser_transaction_expression): Use set_error () method instead
157 of setting value member to error_mark_node.
159 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
161 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
162 and _Float<N>X built-in functions.
164 2017-12-22 Jakub Jelinek <jakub@redhat.com>
167 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
168 TYPE_STUB_DECL and call rest_of_type_compilation before processing
169 incomplete vars rather than after it.
172 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
173 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
174 and consider empty ones if there are no other stmts. For
175 -Wunused-value walk all statements before the one only followed by
178 2017-12-22 Mike Stump <mikestump@comcast.net>
179 Eric Botcazou <ebotcazou@adacore.com>
181 * c-parser.c (c_parser_while_statement): Add unroll parameter and
182 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
183 (c_parser_do_statement): Likewise.
184 (c_parser_for_statement): Likewise.
185 (c_parser_statement_after_labels): Adjust calls to above.
186 (c_parse_pragma_ivdep): New static function.
187 (c_parser_pragma_unroll): Likewise.
188 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
189 <PRAGMA_UNROLL>: New case.
191 2017-12-19 Jakub Jelinek <jakub@redhat.com>
193 * c-typeck.c (comptypes_internal, function_types_compatible_p,
194 perform_integral_promotions, digest_init): Replace Yoda conditions
195 with typical order conditions.
196 * c-decl.c (check_bitfield_type_and_width): Likewise.
198 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
200 * c-typeck.c (c_safe_arg_type_equiv_p,
201 c_safe_function_type_cast_p): New function.
202 (build_c_cast): Implement -Wcast-function-type.
204 2017-12-14 Richard Biener <rguenther@suse.de>
207 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
208 like REALPART_EXPR for the behavior of whether its operand
211 2017-12-12 Marek Polacek <polacek@redhat.com>
214 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
216 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
218 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
219 * c-parser.c (add_debug_begin_stmt): New.
220 (c_parser_declaration_or_fndef): Call it.
221 (c_parser_compound_statement_nostart): Likewise.
222 (c_parser_statement_after_labels): Likewise.
223 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
225 2017-12-07 Joseph Myers <joseph@codesourcery.com>
227 * c-decl.c (build_compound_literal): Add parameter alignas_align
228 and set alignment of decl if nonzero.
229 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
230 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
232 (c_parser_struct_declaration): Update syntax comment.
233 (c_parser_type_name): Add alignas_ok argument and pass it to
235 (c_parser_cast_expression): Pass true to c_parser_type_name and
236 give error if a cast used an _Alignas specifier.
237 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
238 give error if sizeof (type-name) used an _Alignas specifier.
239 (c_parser_alignof_expression): Pass true to c_parser_type_name and
240 give error if _Alignof (type-name) used an _Alignas specifier.
241 (c_parser_postfix_expression_after_paren_type): Check specified
242 alignment for a compound literal and pass it to
243 build_compound_literal.
244 * c-parser.h (c_parser_type_name): Update prototype.
245 * c-tree.h (build_compound_literal): Update prototype.
247 2017-12-07 Martin Sebor <msebor@redhat.com>
250 * c-decl.c (c_decl_attributes): Look up existing declaration and
251 pass it to decl_attributes.
253 2017-12-06 David Malcolm <dmalcolm@redhat.com>
256 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
257 reserved for use by the implementation.
259 2017-12-06 David Malcolm <dmalcolm@redhat.com>
261 * c-decl.c: Include "c-family/c-spellcheck.h".
263 2017-12-05 Martin Liska <mliska@suse.cz>
264 Jakub Jelinek <jakub@redhat.com>
266 * c-typeck.c (pointer_diff): Add new argument and instrument
268 (build_binary_op): Similar for pointer comparison.
270 2017-12-01 Jakub Jelinek <jakub@redhat.com>
273 * c-parser.c: Include tree-iterator.h.
274 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
275 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
279 * c-tree.h (decl_constant_value_1): Declare.
280 * c-typeck.c (decl_constant_value_1): New function.
281 (decl_constant_value): Use it.
282 * c-fold.c (c_fully_fold_internal): If in_init, use
283 decl_constant_value_1 instead of decl_constant_value.
285 2017-11-30 Jakub Jelinek <jakub@redhat.com>
287 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
289 2017-11-28 Jakub Jelinek <jakub@redhat.com>
292 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
293 c_switch_covers_all_cases_p returns true.
295 2017-11-28 Julia Koval <julia.koval@intel.com>
296 Sebastian Peryt <sebastian.peryt@intel.com>
298 * Make-lang.in (c/c-array-notation.o): Remove.
299 * c-array-notation.c: Delete.
300 * c-decl.c: Remove cilkplus condition.
301 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
302 c_parser_cilk_verify_simd, c_parser_array_notation,
303 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
304 c_parser_cilk_simd_fn_vector_attrs,
305 c_finish_cilk_simd_fn_tokens): Delete.
306 (c_parser_declaration_or_fndef): Remove cilkplus condition.
307 (c_parser_direct_declarator_inner): Ditto.
308 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
309 (c_parser_attributes, c_parser_compound_statement,
310 c_parser_statement_after_labels, c_parser_if_statement,
311 c_parser_switch_statement, c_parser_while_statement,
312 c_parser_do_statement, c_parser_for_statement,
313 c_parser_unary_expression, c_parser_postfix_expression,
314 c_parser_postfix_expression_after_primary,
315 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
316 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
318 * c-typeck.c (build_array_ref, build_function_call_vec,
320 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
321 c_finish_loop, build_binary_op): Remove cilkplus support.
323 2017-11-28 Jakub Jelinek <jakub@redhat.com>
325 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
328 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
330 * Make-lang.in (c.install-plugin): Install backend import library.
332 2017-11-23 Jakub Jelinek <jakub@redhat.com>
334 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
337 2017-11-23 Mike Stump <mikestump@comcast.net>
338 Eric Botcazou <ebotcazou@adacore.com>
340 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
342 (c_parser_do_statement): Likewise.
343 (c_parser_for_statement): Likewise.
345 2017-11-22 David Malcolm <dmalcolm@redhat.com>
348 * c-objc-common.c (c_tree_printer): Convert penultimate param from
349 bool to bool *. Within '%T' handling, if showing an "aka", use
350 "quoted" param to add appropriate quoting.
352 2017-11-22 Marek Polacek <polacek@redhat.com>
357 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
359 2017-11-21 David Malcolm <dmalcolm@redhat.com>
362 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
363 earlier failed lookups.
365 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
367 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
368 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
370 2017-11-20 David Malcolm <dmalcolm@redhat.com>
373 * c-decl.c: Include "c-family/known-headers.h".
374 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
376 (class suggest_missing_header): Move to known-header.h.
377 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
378 than get_c_name_hint.
380 2017-11-20 David Malcolm <dmalcolm@redhat.com>
382 * c-decl.c (get_c_name_hint): New function.
383 (class suggest_missing_header): New class.
384 (lookup_name_fuzzy): Call get_c_name_hint and use it to
385 suggest missing headers to the user.
387 2017-11-20 David Malcolm <dmalcolm@redhat.com>
389 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
390 Include "c-family/name-hint.h"
391 (implicit_decl_warning): Convert "hint" from
392 const char * to name_hint. Pass location to
393 lookup_name_fuzzy. Suppress any deferred diagnostic if the
394 warning was not printed.
395 (undeclared_variable): Likewise for "guessed_id".
396 (lookup_name_fuzzy): Convert return type from const char *
397 to name_hint. Add location_t param.
398 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
399 Include "c-family/name-hint.h"
400 (c_parser_declaration_or_fndef): Convert "hint" from
401 const char * to name_hint. Pass location to lookup_name_fuzzy.
402 (c_parser_parameter_declaration): Likewise.
404 2017-11-19 Jakub Jelinek <jakub@redhat.com>
408 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
410 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
411 handle_omp_array_sections): Likewise.
412 (digest_init): Don't call decl_constant_value_for_optimization.
413 * c-tree.h (decl_constant_value_for_optimization): Removed.
414 * c-fold.c (c_fold_array_ref): New function.
415 (c_fully_fold_internal): Add LVAL argument, propagate it through
416 recursive calls. For VAR_P call decl_constant_value and
417 unshare if not LVAL and either optimizing or IN_INIT. Remove
418 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
419 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
420 (c_fully_fold): Add LVAL argument, pass it through to
421 c_fully_fold_internal.
422 (decl_constant_value_for_optimization): Removed.
424 2017-11-15 Joseph Myers <joseph@codesourcery.com>
427 * c-parser.c (check_tgmath_function): New function.
428 (enum tgmath_parm_kind): New enum.
429 (c_parser_postfix_expression): Handle __builtin_tgmath.
431 2017-10-31 David Malcolm <dmalcolm@redhat.com>
433 * c-decl.c (implicit_decl_warning): Update for renaming of
434 pedwarn_at_rich_loc and warning_at_rich_loc.
435 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
436 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
437 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
438 (c_parser_struct_or_union_specifier): Likewise for renaming of
440 (c_parser_parameter_declaration): Likewise for renaming of
442 * c-typeck.c (build_component_ref): Likewise.
443 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
444 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
445 (set_init_label): Likewise for renaming of error_at_rich_loc.
447 2017-10-30 Richard Biener <rguenther@suse.de>
449 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
452 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
454 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
455 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
457 2017-10-25 David Malcolm <dmalcolm@redhat.com>
460 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
463 2017-10-25 Jakub Jelinek <jakub@redhat.com>
466 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
467 newdecl to corresponding __builtin_ if any.
469 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
472 * c-decl.c (diagnose_mismatched_decls): Use
473 OPT_Wbuiltin_declaration_mismatch.
475 2017-10-12 David Malcolm <dmalcolm@redhat.com>
477 * c-parser.c (c_parser_require): Add "type_is_unique" param and
478 use it to guard calls to maybe_suggest_missing_token_insertion.
479 (c_parser_parms_list_declarator): Override default value of new
480 "type_is_unique" param to c_parser_require.
481 (c_parser_asm_statement): Likewise.
482 * c-parser.h (c_parser_require): Add "type_is_unique" param,
485 2017-10-11 Nathan Sidwell <nathan@acm.org>
487 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
489 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
491 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
492 operating on trees as wide_ints.
493 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
494 (c_tree_equal): Likewise.
496 2017-10-04 David Malcolm <dmalcolm@redhat.com>
498 * c-decl.c (push_parm_decl): Store c_parm's location into the
500 (build_c_parm): Add "loc" param and store it within the c_parm.
501 * c-parser.c (struct c_parser): Add "last_token_location" field.
502 (c_parser_consume_token): Store location of the token into the
504 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
505 when handling a FUNCTION_DECL, if it doesn't already have them.
506 (c_parser_parameter_declaration): Generate a location for the
507 parameter, and pass it to the call to build_c_parm.
508 * c-tree.h (struct c_parm): Add field "loc".
509 (build_c_parm): Add location_t param.
510 * c-typeck.c (get_fndecl_argument_location): New function.
511 (inform_for_arg): New function.
512 (convert_for_assignment): Use inform_for_arg when dealing with
515 2017-09-29 Jakub Jelinek <jakub@redhat.com>
517 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
519 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
520 don't SET_DECL_C_BIT_FIELD here.
523 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
524 instead of trying to set just TREE_READONLY manually.
526 2017-09-16 Tom de Vries <tom@codesourcery.com>
529 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
532 2017-09-15 Joseph Myers <joseph@codesourcery.com>
535 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
537 (build_conditional_expr): For C11, generate result with excess
538 precision when one argument is an integer and the other is of a
539 type using excess precision.
541 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
543 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
545 2017-09-13 Marek Polacek <polacek@redhat.com>
548 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
549 than expr.original_type.
551 2017-09-12 Nathan Sidwell <nathan@acm.org>
553 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
554 resort_sorted_fields): Moved from c-family/c-common.c.
555 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
557 2017-09-01 Joseph Myers <joseph@codesourcery.com>
560 * c-typeck.c (build_atomic_assign): Handle argument with excess
561 precision. Ensure any EXCESS_PRECISION_EXPR is present in
562 argument passed to build_binary_op and convert_for_assignment but
563 not for call to c_fully_fold.
564 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
565 Ensure build_binary_op is called with argument with original
566 semantic type. Avoid calling c_fully_fold with an
567 EXCESS_PRECISION_EXPR from build_binary_op.
569 2017-09-01 Jakub Jelinek <jakub@redhat.com>
572 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
574 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
575 Alan Hayward <alan.hayward@arm.com>
576 David Sherwood <david.sherwood@arm.com>
578 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
579 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
580 m1 and m2 to the signed equivalent of a fixed-point
583 2017-08-24 David Malcolm <dmalcolm@redhat.com>
585 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
586 than CAN_HAVE_LOCATION_P when determining whether to use the
587 location_t value within "value".
589 2017-08-21 David Malcolm <dmalcolm@redhat.com>
591 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
592 rather than peeking the location of the first token.
593 * c-tree.h (c_expr::get_location): New method.
595 2017-08-21 David Malcolm <dmalcolm@redhat.com>
597 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
598 to check_function_arguments.
600 2017-08-18 Marek Polacek <polacek@redhat.com>
602 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
605 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
608 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
609 (check_bitfield_type_and_width): Don't allow bit-field with
610 warn_if_not_aligned type.
612 2017-08-14 Martin Sebor <msebor@redhat.com>
615 * c-objc-common.c (c_objc_common_init): Handle 'G'.
617 2017-08-11 Marek Polacek <polacek@redhat.com>
620 * c-decl.c (pushtag): Only print inform if the warning was printed.
621 (grokdeclarator): Likewise.
623 2017-08-10 David Malcolm <dmalcolm@redhat.com>
625 * c-parser.c (c_parser_error): Rename to...
626 (c_parser_error_richloc): ...this, making static, and adding
627 "richloc" parameter, passing it to the c_parse_error call,
628 rather than calling c_parser_set_source_position_from_token.
629 (c_parser_error): Reintroduce, reimplementing in terms of the
630 above, converting return type from void to bool.
631 (class token_pair): New class.
632 (struct matching_paren_traits): New struct.
633 (matching_parens): New typedef.
634 (struct matching_brace_traits): New struct.
635 (matching_braces): New typedef.
636 (get_matching_symbol): New function.
637 (c_parser_require): Add param MATCHING_LOCATION, using it to
638 highlight matching "opening" tokens for missing "closing" tokens.
639 (c_parser_skip_until_found): Likewise.
640 (c_parser_static_assert_declaration_no_semi): Convert explicit
641 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
642 class matching_parens, so that the pertinent open parenthesis is
643 highlighted when there are problems locating the close
645 (c_parser_struct_or_union_specifier): Likewise.
646 (c_parser_typeof_specifier): Likewise.
647 (c_parser_alignas_specifier): Likewise.
648 (c_parser_simple_asm_expr): Likewise.
649 (c_parser_braced_init): Likewise, for matching_braces.
650 (c_parser_paren_condition): Likewise, for matching_parens.
651 (c_parser_switch_statement): Likewise.
652 (c_parser_for_statement): Likewise.
653 (c_parser_asm_statement): Likewise.
654 (c_parser_asm_operands): Likewise.
655 (c_parser_cast_expression): Likewise.
656 (c_parser_sizeof_expression): Likewise.
657 (c_parser_alignof_expression): Likewise.
658 (c_parser_generic_selection): Likewise.
659 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
660 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
661 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
662 In case CPP_OPEN_PAREN, pass loc_open_paren to the
663 c_parser_skip_until_found call.
664 (c_parser_objc_class_definition): Use class matching_parens as
666 (c_parser_objc_method_decl): Likewise.
667 (c_parser_objc_try_catch_finally_statement): Likewise.
668 (c_parser_objc_synchronized_statement): Likewise.
669 (c_parser_objc_at_property_declaration): Likewise.
670 (c_parser_oacc_wait_list): Likewise.
671 (c_parser_omp_var_list_parens): Likewise.
672 (c_parser_omp_clause_collapse): Likewise.
673 (c_parser_omp_clause_default): Likewise.
674 (c_parser_omp_clause_if): Likewise.
675 (c_parser_omp_clause_num_threads): Likewise.
676 (c_parser_omp_clause_num_tasks): Likewise.
677 (c_parser_omp_clause_grainsize): Likewise.
678 (c_parser_omp_clause_priority): Likewise.
679 (c_parser_omp_clause_hint): Likewise.
680 (c_parser_omp_clause_defaultmap): Likewise.
681 (c_parser_oacc_single_int_clause): Likewise.
682 (c_parser_omp_clause_ordered): Likewise.
683 (c_parser_omp_clause_reduction): Likewise.
684 (c_parser_omp_clause_schedule): Likewise.
685 (c_parser_omp_clause_num_teams): Likewise.
686 (c_parser_omp_clause_thread_limit): Likewise.
687 (c_parser_omp_clause_aligned): Likewise.
688 (c_parser_omp_clause_linear): Likewise.
689 (c_parser_omp_clause_safelen): Likewise.
690 (c_parser_omp_clause_simdlen): Likewise.
691 (c_parser_omp_clause_depend): Likewise.
692 (c_parser_omp_clause_map): Likewise.
693 (c_parser_omp_clause_device): Likewise.
694 (c_parser_omp_clause_dist_schedule): Likewise.
695 (c_parser_omp_clause_proc_bind): Likewise.
696 (c_parser_omp_clause_uniform): Likewise.
697 (c_parser_omp_for_loop): Likewise.
698 (c_parser_cilk_clause_vectorlength): Likewise.
699 (c_parser_cilk_clause_linear): Likewise.
700 (c_parser_transaction_expression): Likewise.
701 * c-parser.h (c_parser_require): Add param matching_location with
702 default UNKNOWN_LOCATION.
703 (c_parser_error): Convert return type from void to bool.
704 (c_parser_skip_until_found): Add param matching_location with
705 default UNKNOWN_LOCATION.
707 2017-08-09 Marek Polacek <polacek@redhat.com>
709 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
710 * c-tree.h (build_external_ref): Update declaration.
711 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
712 (build_external_ref): Change the type of a parameter to bool.
713 (parser_build_binary_op): Use true/false instead of 1/0.
714 (pointer_diff): Likewise.
715 (build_modify_expr): Likewise.
716 (set_designator): Change the type of a parameter to bool.
717 (set_init_index): Use true/false instead of 1/0.
718 (set_init_label): Likewise.
719 (output_init_element): Change the type of a parameter to bool.
720 (output_pending_init_elements): Use true/false instead of 1/0.
721 (process_init_element): Likewise.
722 (build_binary_op): Change the type of a parameter to bool.
724 2017-08-09 Marek Polacek <polacek@redhat.com>
727 * c-typeck.c (pedwarn_init): Make the function take a variable list.
728 Call emit_diagnostic_valist instead of pedwarn.
729 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
730 Print the relevant types in diagnostics.
732 2017-08-09 Marek Polacek <polacek@redhat.com>
735 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
736 build_conditional_expr.
737 * c-parser.c (c_parser_conditional_expression): Create locations for
738 EXP1 and EXP2 from their source ranges. Pass the locations down to
739 build_conditional_expr.
740 * c-tree.h (build_conditional_expr): Update declaration.
741 * c-typeck.c (build_conditional_expr): Add location_t parameters.
742 For -Wsign-compare, also print the types.
744 2017-08-08 Martin Liska <mliska@suse.cz>
746 * c-convert.c: Include header files.
747 * c-typeck.c: Likewise.
749 2017-08-07 Martin Liska <mliska@suse.cz>
751 * c-parser.c (c_parser_attributes): Canonicalize name of an
754 2017-08-02 Marek Polacek <polacek@redhat.com>
757 * c-parser.c (c_parser_unary_expression): Use set_error.
761 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
762 warnings. Avoid walking MACRO_MAP_LOCATIONS.
764 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
765 Martin Liska <mliska@suse.cz>
767 * c-typeck.c (c_finish_goto_label): Build gimple predict
770 2017-07-31 Martin Liska <mliska@suse.cz>
773 * c-convert.c (convert): Guard condition with flag_sanitize_p
774 also with current_function_decl non-null equality.
775 * c-decl.c (grokdeclarator): Likewise.
776 * c-typeck.c (build_binary_op): Likewise.
778 2017-07-25 Marek Polacek <polacek@redhat.com>
780 * c-decl.c (grokfield): Remove local variable.
782 2017-07-25 Marek Polacek <polacek@redhat.com>
785 * c-parser.c (c_parser_else_body): Don't warn about multistatement
786 macro expansion if the body is in { }.
787 (c_parser_while_statement): Likewise.
788 (c_parser_for_statement): Likewise.
790 2017-07-18 Nathan Sidwell <nathan@acm.org>
792 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
794 2017-07-14 David Malcolm <dmalcolm@redhat.com>
796 * c-decl.c (implicitly_declare): When suggesting a missing
797 #include, provide a fix-it hint.
799 2017-07-06 David Malcolm <dmalcolm@redhat.com>
801 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
802 and call that instead.
803 * c-tree.h (selftest::run_c_tests): New decl.
805 2017-06-26 Marek Polacek <polacek@redhat.com>
808 * c-parser.c (c_parser_if_body): Set the location of the
809 body of the conditional after parsing all the labels. Call
810 warn_for_multistatement_macros.
811 (c_parser_else_body): Likewise.
812 (c_parser_switch_statement): Likewise.
813 (c_parser_while_statement): Likewise.
814 (c_parser_for_statement): Likewise.
815 (c_parser_statement): Add a default argument. Save the location
816 after labels have been parsed.
817 (c_parser_c99_block_statement): Likewise.
819 2017-06-19 Richard Biener <rguenther@suse.de>
821 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
822 negated _Literals to parse _Literal (int) -1.
824 2017-06-13 Martin Liska <mliska@suse.cz>
827 * c-convert.c (convert): Use sanitize_flags_p.
828 * c-decl.c (grokdeclarator): Likewise.
829 * c-typeck.c (convert_for_assignment): Likewise.
830 (c_finish_return): Likewise.
831 (build_binary_op): Likewise.
833 2017-06-08 Jakub Jelinek <jakub@redhat.com>
836 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
837 to sizetype before size_binop.
839 2017-06-07 Jakub Jelinek <jakub@redhat.com>
841 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
844 2017-06-06 Marek Polacek <polacek@redhat.com>
847 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
849 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
851 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
853 * c-parser.c (c_parser_binary_expression): Implement the
854 -Wsizeof_pointer_div warning.
855 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
856 from a parenthesized expression.
857 (c_parser_expr_list): Use c_last_sizeof_loc.
858 * c-tree.h (c_last_sizeof_loc): New external.
859 * c-typeck.c (c_last_sizeof_loc): New variable.
860 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
862 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
865 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
867 2017-05-30 David Malcolm <dmalcolm@redhat.com>
869 * c-objc-common.c (c_tree_printer): Gain bool and const char **
872 2017-05-24 Martin Sebor <msebor@redhat.com>
875 * c-fold.c (c_fully_fold_internal): Adjust.
876 * c-typeck.c (parser_build_unary_op): Adjust.
878 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
880 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
881 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
884 2017-05-23 Marek Polacek <polacek@redhat.com>
886 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
889 2017-05-22 Jakub Jelinek <jakub@redhat.com>
891 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
892 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
893 it returned invariant. Call tree_invariant_p unconditionally
894 afterwards to decide whether to return expr or op0.
896 2017-05-22 Nathan Sidwell <nathan@acm.org>
898 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
900 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
902 * c-parser.c (c_parser_omp_clause_default): Handle
903 "OMP_CLAUSE_DEFAULT_PRESENT".
905 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
907 * config-lang.in (gtfiles): Add c-family/c-format.c.
909 2017-05-18 Nathan Sidwell <nathan@acm.org>
911 * c-decl.c (pushdecl_top_level): Delete unused function.
913 2017-05-18 Marek Polacek <polacek@redhat.com>
915 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
916 (check_earlier_gotos): Likewise.
917 (define_label): Likewise.
918 (pending_xref_error): Likewise.
919 (smallest_type_quals_location): Likewise.
920 (grokdeclarator): Likewise.
921 (grokparms): Likewise.
922 (identifier_global_value): Likewise.
923 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
924 (find_init_member): Likewise.
926 2017-05-18 Marek Polacek <polacek@redhat.com>
928 * c-decl.c (start_decl): Use false/true instead of 0/1.
929 (grokdeclarator): Likewise.
930 (finish_struct): Likewise.
931 (start_function): Change the return type to bool. Use false/true
933 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
934 * c-tree.h (start_function): Update.
935 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
936 (set_designator): Change the return type to bool. Use false/true
939 2017-05-17 Marek Polacek <polacek@redhat.com>
941 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
942 * c-typeck.c: Likewise.
944 2017-05-17 Marek Polacek <polacek@redhat.com>
947 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
948 DECL_IGNORED_P even for non-static compound literals.
950 2017-05-17 Martin Liska <mliska@suse.cz>
952 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
953 use it instead of int type.
955 2017-05-17 Marek Polacek <polacek@redhat.com>
957 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
959 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
960 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
961 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
962 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
964 (c_parser_conditional_expression): Likewise.
965 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
966 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
967 (process_init_element): Likewise.
968 (build_binary_op): Likewise.
969 (handle_omp_array_sections_1): Likewise.
971 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
973 * c-parser.c (c_parser_omp_clause_num_gangs)
974 (c_parser_omp_clause_num_workers)
975 (c_parser_omp_clause_vector_length): Merge functions into...
976 (c_parser_oacc_single_int_clause): ... this new function. Adjust
979 2017-05-11 Nathan Sidwell <nathan@acm.org>
981 * gimple-parser.c: Don't #include tree-dump.h.
983 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
986 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
988 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
991 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
992 incorrect __MEM syntax.
994 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
997 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
1000 2017-05-09 Nathan Sidwell <nathan@acm.org>
1002 * c-tree.h (pushdecl): Declare.
1004 2017-05-05 David Malcolm <dmalcolm@redhat.com>
1006 * c-decl.c (warn_defaults_to): Replace report_diagnostic
1007 with diagnostic_report_diagnostic.
1008 * c-errors.c (pedwarn_c99): Likewise.
1009 (pedwarn_c90): Likewise.
1011 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1014 * c-gimplify.c (c_gimplify_expr): Remove calls to
1015 cilk_gimplifY_call_params_in_spawned_fn.
1017 2017-04-25 David Malcolm <dmalcolm@redhat.com>
1019 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
1020 hint for removing extra semicolon.
1022 2017-04-21 Jakub Jelinek <jakub@redhat.com>
1025 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
1026 enabled, set specs->type to integer_type_node.
1028 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
1030 * c-array-notation.c: Fix typo in comment.
1032 2017-03-29 Marek Polacek <polacek@redhat.com>
1035 * c-decl.c (finish_decl): Check VAR_P.
1037 2017-03-27 Jakub Jelinek <jakub@redhat.com>
1040 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1041 * c-typeck.c (c_mark_addressable): Likewise. Look through
1042 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1044 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1046 2017-03-23 Marek Polacek <polacek@redhat.com>
1048 * c-tree.h: Remove a C_RID_YYCODE reference.
1050 2017-03-21 Jakub Jelinek <jakub@redhat.com>
1053 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1054 optional COMPOUND_EXPR with ubsan instrumentation.
1056 2017-03-17 Marek Polacek <polacek@redhat.com>
1058 * c-parser.c: Add C11 references.
1060 2017-03-15 Marek Polacek <polacek@redhat.com>
1062 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1064 2017-03-11 Marek Polacek <polacek@redhat.com>
1066 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1068 2017-03-10 David Malcolm <dmalcolm@redhat.com>
1070 PR translation/79848
1071 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1073 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1075 2017-03-09 Marek Polacek <polacek@redhat.com>
1078 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1079 parameter declarations with initializers.
1081 2017-03-09 Jakub Jelinek <jakub@redhat.com>
1084 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1087 2017-03-07 Jakub Jelinek <jakub@redhat.com>
1090 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1091 for "may only be used in compound statements" diagnostics, change it
1092 such that the same translatable string is used for all pragmas. For
1093 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1095 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1096 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1097 "may only be used in compound statements" diagnostics, such that the
1098 same translatable string is used for all pragmas.
1100 2017-03-04 Marek Polacek <polacek@redhat.com>
1103 * c-decl.c (implicit_decl_warning): Add missing space.
1105 2017-03-03 Marek Polacek <polacek@redhat.com>
1108 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1109 current_function_prototype_arg_types is error_mark_node. Fix
1110 formatting. Use TREE_VALUE instead of TREE_TYPE.
1112 2017-03-03 Jakub Jelinek <jakub@redhat.com>
1115 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1116 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1117 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1121 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1122 instead of %<_Generic>.
1123 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1124 (c_parser_omp_target_exit_data): Use %<release%> instead of
1127 2017-02-28 Jakub Jelinek <jakub@redhat.com>
1129 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1130 instead of just cond ? "..." : "...".
1131 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1132 for "enter"/"exit" keyword.
1133 (c_finish_oacc_routine): Don't use %s to supply portions of the
1136 2017-02-24 Jakub Jelinek <jakub@redhat.com>
1139 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1140 handle -Wrestrict here.
1141 * c-typeck.c (build_function_call_vec): Adjust
1142 check_function_arguments caller.
1144 2017-02-23 Richard Biener <rguenther@suse.de>
1147 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1148 to initialize c_exprs to return.
1149 (c_parser_gimple_binary_expression): Likewise.
1150 (c_parser_gimple_unary_expression): Likewise.
1151 (c_parser_gimple_postfix_expression): Likewise.
1153 2017-02-22 Marek Polacek <polacek@redhat.com>
1156 * c-typeck.c (convert_arguments): Handle error_mark_node.
1158 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1160 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1161 value of c_parser_parse_ssa_name against error_mark_node and emit
1162 error if ssa name is anonymous and written as default definition.
1164 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1166 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1169 2017-02-16 Jakub Jelinek <jakub@redhat.com>
1172 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1173 ignore #pragma omp target even when not followed by identifier.
1175 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1177 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1178 (c_parser_gimple_unary_expression): Likewise.
1180 2017-02-13 Jakub Jelinek <jakub@redhat.com>
1182 * c-parser.c (c_parser_oacc_declare): Add missing space in
1185 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1188 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1189 set_c_expr_source_range when parsing ssa-name.
1191 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1192 Richard Biener <rguenther@suse.de>
1194 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1195 building IL when arguments are error_mark_node.
1196 (c_parser_gimple_unary_expression): Likewise.
1197 (c_parser_gimple_if_stmt): Likewise.
1198 (c_parser_gimple_switch_stmt): Likewise.
1199 (c_parser_gimple_return_stmt): Likewise.
1200 (c_parser_parse_ssa_name): When name lookup fails do not build
1201 an SSA name. Use undeclared rather than not declared in error
1204 2017-02-09 Marek Polacek <polacek@redhat.com>
1207 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1208 instead of c_parser_skip_until_found.
1210 2017-02-09 Jakub Jelinek <jakub@redhat.com>
1213 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1214 symtab_node::get on automatic variables.
1216 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1217 Chung-Lin Tang <cltang@codesourcery.com>
1219 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1220 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1222 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1224 2017-02-07 Richard Biener <rguenther@suse.de>
1226 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1227 (c_parser_gimple_postfix_expression_after_primary):
1228 Do not use c_build_function_call_vec to avoid folding and promotion.
1231 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1234 * c-decl.c (pop_scope): Pass main_input_filename to
1235 build_translation_unit_decl.
1237 2017-01-24 David Malcolm <dmalcolm@redhat.com>
1239 * c-parser.c: Include "read-rtl-function.h" and
1241 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1242 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1243 production. Update for renaming of field "gimple_pass" to
1244 "gimple_or_rtl_pass". If __RTL was seen, call
1245 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1246 to an auto_timevar, to cope with early exit.
1247 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1248 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1249 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1251 (c_parser_parse_rtl_body): New function.
1252 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1253 (struct c_declspecs): Rename field "gimple_pass" to
1254 "gimple_or_rtl_pass". Add field "rtl_p".
1255 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1256 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1257 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1258 (c_parser_gimple_or_rtl_pass_list): ...this.
1260 2017-01-20 Marek Polacek <polacek@redhat.com>
1263 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1265 2017-01-13 Richard Biener <rguenther@suse.de>
1267 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1270 2017-01-13 Richard Biener <rguenther@suse.de>
1272 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1273 _Literal ( type-name ) number.
1275 2017-01-12 Richard Biener <rguenther@suse.de>
1277 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1280 2017-01-11 Jakub Jelinek <jakub@redhat.com>
1283 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1286 2017-01-11 Richard Biener <rguenther@suse.de>
1289 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1290 returns on parse errors.
1292 2017-01-04 Marek Polacek <polacek@redhat.com>
1295 * c-parser.c (c_parser_postfix_expression): Mark zero character
1296 constants by setting original_type in c_expr.
1297 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1298 with a zero character constant.
1299 (char_type_p): New function.
1301 2017-01-04 David Malcolm <dmalcolm@redhat.com>
1303 * c-parser.c (c_parser_declaration_or_fndef): Create a
1304 rich_location at init_loc and parse it to start_init.
1305 (last_init_list_comma): New global.
1306 (c_parser_braced_init): Update last_init_list_comma when parsing
1307 commas. Pass it to pop_init_level. Pass location of closing
1308 brace to pop_init_level.
1309 (c_parser_postfix_expression_after_paren_type): Create a
1310 rich_location at type_loc and parse it to start_init.
1311 (c_parser_omp_declare_reduction): Likewise for loc.
1312 * c-tree.h (start_init): Add rich_location * param.
1313 (pop_init_level): Add location_t param.
1314 * c-typeck.c (struct initializer_stack): Add field
1315 "missing_brace_richloc".
1316 (start_init): Add richloc param, use it to initialize
1317 the stack node's missing_brace_richloc.
1318 (last_init_list_comma): New decl.
1319 (finish_implicit_inits): Pass last_init_list_comma to
1321 (push_init_level): When finding missing open braces, add fix-it
1322 hints to the richloc.
1323 (pop_init_level): Add "insert_before" param and pass it
1324 when calling pop_init_level. Add fixits about missing
1325 close braces to any richloc. Use the richloc for the
1326 -Wmissing-braces warning.
1327 (set_designator): Pass last_init_list_comma to pop_init_level.
1328 (process_init_element): Likewise.
1330 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1332 Update copyright years.
1334 2016-12-21 Jakub Jelinek <jakub@redhat.com>
1337 * c-typeck.c (build_function_call_vec): If check_function_arguments
1338 returns true, set TREE_NO_WARNING on CALL_EXPR.
1341 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1342 to *expr instead of overwriting it.
1344 2016-12-20 Richard Biener <rguenther@suse.de>
1346 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1348 (c_parser_gimple_statement): Only build assigns for non-error
1350 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1352 2016-12-14 Martin Jambor <mjambor@suse.cz>
1354 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1356 (c_finish_oacc_routine): Adjusted call to
1357 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1358 to use their new names.
1359 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1361 (c_parser_oacc_update): Likewise.
1362 (c_parser_omp_simd): Likewise.
1363 (c_parser_omp_target_update): Likewise.
1364 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1365 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1367 (c_finish_omp_cancellation_point): Likewise.
1368 * gimple-parser.c: Do not include omp-low.h
1370 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1371 James Norris <jnorris@codesourcery.com>
1373 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1374 EXIT_DATA,WAIT} are not used in compound statements.
1375 (c_parser_oacc_enter_exit_data): Update diagnostics.
1377 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1380 * c-decl.c (diagnose_mismatched_decls): Use
1381 OPT_Wbuiltin_declaration_mismatch here too.
1383 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
1384 Alan Hayward <alan.hayward@arm.com>
1385 David Sherwood <david.sherwood@arm.com>
1387 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1388 (make_label, finish_struct): Likewise.
1390 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
1391 Richard Biener <rguenther@suse.de>
1393 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1394 * config-lang.in (gtfiles): Add c/c-parser.h.
1395 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1396 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1397 * c-parser.c (enum c_id_kind, struct c_token,
1398 c_parser_next_token_is, c_parser_next_token_is_not,
1399 c_parser_next_token_is_keyword,
1400 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1402 * c-parser.h: ... new header.
1403 * c-parser.c: Include c-parser.h and gimple-parser.h.
1404 (c_parser_peek_token, c_parser_peek_2nd_token,
1405 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1406 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1407 c_parser_error, c_parser_require, c_parser_skip_until_found,
1408 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1409 c_parser_type_name): Export.
1410 (c_parser_tokens_buf): New function.
1411 (c_parser_error): Likewise.
1412 (c_parser_set_error): Likewise.
1413 (c_parser_declspecs): Handle RID_GIMPLE.
1414 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1415 via c_parser_parse_gimple_body.
1416 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1417 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1418 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1419 c_parser_error, c_parser_require, c_parser_skip_until_found,
1420 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1421 c_parser_type_name): Declare.
1422 (struct c_parser): Declare forward.
1423 (c_parser_tokens_buf): Declare.
1424 (c_parser_error): Likewise.
1425 (c_parser_set_error): Likewise.
1426 * gimple-parser.c: New file.
1427 * gimple-parser.h: Likewise.
1429 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1432 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1435 2016-09-11 Le-Chun Wu <lcwu@google.com>
1436 Mark Wielaard <mjw@redhat.com>
1438 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1439 to the given -Wshadow= variant.
1441 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1443 * c-typeck.c: Include memmodel.h.
1445 2016-10-13 Jakub Jelinek <jakub@redhat.com>
1448 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1449 instead of lhd_return_null_tree_v.
1451 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1454 * c-decl.c (smallest_type_quals_location): New static function.
1455 (grokdeclarator): Try to find the correct location for an ignored
1458 2016-09-26 Marek Polacek <polacek@redhat.com>
1461 * c-decl.c (pop_scope): Add gcc_fallthrough.
1463 2016-09-26 Marek Polacek <polacek@redhat.com>
1466 * c-parser.c (struct c_token): Add flags field.
1467 (c_lex_one_token): Pass it to c_lex_with_flags.
1468 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1469 into IFN_FALLTHROUGH.
1470 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1471 attribute fallthrough after a case label or default label.
1472 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1474 2016-09-24 Marek Polacek <polacek@redhat.com>
1477 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1478 have boolean value. Warn about ++/-- on booleans.
1480 2016-09-23 Jakub Jelinek <jakub@redhat.com>
1482 * c-parser.c (incomplete_record_decls): Remove unnecessary
1483 = vNULL initialization of file scope vec.
1485 2016-09-16 Marek Polacek <polacek@redhat.com>
1487 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1489 2016-09-14 Marek Polacek <polacek@redhat.com>
1491 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1492 (fix_array_notation_expr): Likewise.
1493 * c-decl.c (finish_decl): Likewise.
1494 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1495 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1496 (function_to_pointer_conversion): Use false instead of 0.
1497 (convert_lvalue_to_rvalue): Likewise.
1498 (parser_build_unary_op): Likewise.
1499 (build_atomic_assign): Likewise.
1500 (build_unary_op): Change nonconvert parameter type to bool, use
1501 true/false instead of 1/0.
1502 (build_binary_op): Use true instead of 1.
1504 2016-09-13 David Malcolm <dmalcolm@redhat.com>
1506 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1507 of add_fixit_insert to add_fixit_insert_before.
1509 2016-09-13 Marek Polacek <polacek@redhat.com>
1511 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1514 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1517 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1518 COMPOUND_EXPR to warn_for_omitted_condop.
1520 2016-09-07 David Malcolm <dmalcolm@redhat.com>
1522 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1523 c_get_substring_location for this new langhook.
1525 2016-09-02 Jakub Jelinek <jakub@redhat.com>
1528 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1530 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1531 instead of mark_exp_read on low_bound/length expression.
1532 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1533 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1534 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1535 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1536 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1537 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1538 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1539 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1540 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1541 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1542 instead of mark_expr_read.
1543 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1544 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1545 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1546 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1547 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1548 array section bases outside of depend clause, for depend clause
1549 use convert_lvalue_to_rvalue on the base.
1550 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1551 linear, aligned, map, to and from clauses.
1552 (c_omp_clause_copy_ctor): New function.
1554 2016-09-01 Marek Polacek <polacek@redhat.com>
1557 * c-typeck.c (composite_type): Add FALLTHRU comment.
1559 2016-08-31 David Malcolm <dmalcolm@redhat.com>
1561 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1562 to the insertion fixits for "struct", "union", and "enum".
1564 2016-08-30 David Malcolm <dmalcolm@redhat.com>
1566 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1567 rather than add_fixit_misspelled_id.
1568 (undeclared_variable): Likewise.
1569 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1570 now-redundant "here" params from add_fixit_insert method calls.
1571 (c_parser_parameter_declaration): Likewise.
1572 * c-typeck.c (build_component_ref): Remove now-redundant range
1573 param from add_fixit_replace method calls.
1575 2016-08-25 Marek Polacek <polacek@redhat.com>
1577 * c-typeck.c (parser_build_binary_op): Pass LHS to
1578 warn_logical_not_parentheses.
1580 2016-08-25 Marek Polacek <polacek@redhat.com>
1583 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1584 or _FloatN or _FloatNx is not supported.
1585 (finish_declspecs): Set type to integer_type_node when _FloatN or
1586 _FloatNx is not supported.
1588 2016-08-19 Joseph Myers <joseph@codesourcery.com>
1591 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1592 (struct c_declspecs): Add field floatn_nx_idx.
1593 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1594 and _FloatNx type specifiers.
1595 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1596 (c_parser_declspecs, c_parser_attribute_any_word)
1597 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1598 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1599 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1600 narrower than double.
1602 2016-08-12 Jakub Jelinek <jakub@redhat.com>
1603 Martin Liska <mliska@suse.cz>
1606 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1607 % to determine val element to change. Assert that
1608 wchar_bytes * charwidth fits into val array.
1610 2016-08-12 Marek Polacek <polacek@redhat.com>
1613 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1614 (c_parser_postfix_expression): Likewise.
1615 * c-typeck.c (build_unary_op): Adjust fall through comment.
1616 (c_mark_addressable): Likewise.
1618 2016-08-11 Jakub Jelinek <jakub@redhat.com>
1621 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1622 array member through typedef, for orig_qual_indirect == 0 clear
1625 2016-08-08 David Malcolm <dmalcolm@redhat.com>
1628 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1629 this up to selftest::run_c_tests.
1630 (selftest::run_c_tests): New function.
1632 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1634 * c-parser.c (struct oacc_routine_data): Add error_seen and
1635 fndecl_seen members.
1636 (c_finish_oacc_routine): Use these.
1637 (c_parser_declaration_or_fndef): Adjust.
1638 (c_parser_oacc_routine): Likewise. Support more C language
1639 constructs, and improve diagnostics. Move pragma context
1641 (c_parser_pragma): ... here.
1643 * c-parser.c (struct oacc_routine_data): New.
1644 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1646 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1647 declare target" attribute.
1649 2016-08-01 Jan Beulich <jbeulich@suse.com>
1651 * c-fold.c (c_fully_fold_internal): Also emit shift count
1652 warnings for vector types.
1653 * c-typeck.c (build_binary_op): Likewise.
1655 2016-07-29 Marek Polacek <polacek@redhat.com>
1658 * c-decl.c (finish_struct): Rephrase an error message.
1661 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1662 to error node for invalid code.
1665 * c-decl.c (implicitly_declare): Return decl early not only for
1666 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1668 2016-07-29 Jakub Jelinek <jakub@redhat.com>
1671 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1672 on GNU extern inline functions.
1674 2016-07-29 Marek Polacek <polacek@redhat.com>
1677 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1680 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
1682 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1684 2016-07-20 David Malcolm <dmalcolm@redhat.com>
1686 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1688 (best_macro_match): Likewise, converting from a typedef to a
1690 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1691 (lookup_name_fuzzy): Update for change of best_macro_match to a
1692 subclass with a ctor that calls cpp_forall_identifiers.
1694 2016-07-20 David Malcolm <dmalcolm@redhat.com>
1696 * c-decl.c (implicit_decl_warning): Update for conversion of
1697 return type of lookup_name_fuzzy to const char *.
1698 (undeclared_variable): Likewise.
1699 (lookup_name_fuzzy): Convert return type from tree to
1701 * c-parser.c (c_parser_declaration_or_fndef): Update for
1702 conversion of return type of lookup_name_fuzzy to const char *.
1703 (c_parser_parameter_declaration): Likewise.
1705 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1707 * c-parser.c (c_parser_oacc_declare): Don't scan for
1709 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1710 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1711 zero-length subarrays.
1713 2016-07-15 Jakub Jelinek <jakub@redhat.com>
1716 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1717 instead of FUZZY_LOOKUP_NAME.
1718 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1719 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1721 2016-07-14 Jakub Jelinek <jakub@redhat.com>
1724 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1726 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1728 * c-parser.c (c_parser_generic_selection): Make type of variable
1730 (c_parser_omp_declare_simd): Likewise.
1732 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1734 * c-decl.c (struct c_struct_parse_info): Change member types
1735 from vec to auto_vec.
1736 (start_struct): Adjust.
1737 (finish_struct): Likewise.
1739 2016-07-02 Jakub Jelinek <jakub@redhat.com>
1742 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1744 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1746 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1747 Move pragma context checking into...
1748 (c_parser_omp_cancellation_point): ... here, and improve
1749 diagnostic messages.
1750 * c-typeck.c (c_finish_omp_cancel)
1751 (c_finish_omp_cancellation_point): Improve diagnostic messages.
1753 2016-06-29 Jakub Jelinek <jakub@redhat.com>
1756 * c-typeck.c (c_build_qualified_type): Don't clear
1757 C_TYPE_INCOMPLETE_VARS for the main variant.
1759 2016-06-28 Martin Sebor <msebor@redhat.com>
1762 * c-typeck.c (output_init_element): Diagnose incompatible types
1763 before non-constant initializers.
1765 2016-06-28 Jakub Jelinek <jakub@redhat.com>
1767 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1769 2016-06-23 Andi Kleen <ak@linux.intel.com>
1771 * Make-lang.in: Add support for autofdo.
1773 2016-06-22 David Malcolm <dmalcolm@redhat.com>
1776 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1777 (implicit_decl_warning): When issuing warnings for implicit
1778 declarations, attempt to provide a suggestion via
1780 (undeclared_variable): Likewise when issuing errors.
1781 (lookup_name_in_scope): Likewise.
1782 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1783 (best_macro_match): New typedef.
1784 (find_closest_macro_cpp_cb): New function.
1785 (lookup_name_fuzzy): New function.
1786 * c-parser.c: Include gcc-rich-location.h.
1787 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1788 (c_keyword_starts_typename): ...this new function.
1789 (c_parser_declaration_or_fndef): When issuing errors about
1790 missing "struct" etc, add a fixit. For other kinds of errors,
1791 attempt to provide a suggestion via lookup_name_fuzzy.
1792 (c_parser_parms_declarator): When looking ahead to detect typos in
1793 type names, also reject CPP_KEYWORD.
1794 (c_parser_parameter_declaration): When issuing errors about
1795 unknown type names, attempt to provide a suggestion via
1797 * c-tree.h (c_keyword_starts_typename): New prototype.
1799 2016-06-20 Joseph Myers <joseph@codesourcery.com>
1802 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1803 c_common_type returns error_mark_node.
1805 2016-06-19 Martin Sebor <msebor@redhat.com>
1808 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1809 __alignof__ (expression).
1811 2016-06-14 David Malcolm <dmalcolm@redhat.com>
1813 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1815 2016-06-14 David Malcolm <dmalcolm@redhat.com>
1817 * c-typeck.c (build_component_ref): Simplify fixit code by
1818 using gcc_rich_location::add_fixit_misspelled_id.
1819 (set_init_label): Likewise.
1821 2016-06-13 David Malcolm <dmalcolm@redhat.com>
1823 * c-parser.c (c_parser_initelt): Provide location of name for new
1824 location_t param of set_init_label.
1825 * c-tree.h (set_init_label): Add location_t param.
1826 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1827 param and use it when issuing error messages about unrecognized
1828 field names. Attempt to provide a fixit hint if appropriate,
1829 otherwise update the error message to provide the type name.
1831 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1834 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1837 2016-06-08 Martin Sebor <msebor@redhat.com>
1838 Jakub Jelinek <jakub@redhat.com>
1842 * c-typeck.c (convert_arguments): Don't promote last argument
1843 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1845 2016-06-08 Marek Polacek <polacek@redhat.com>
1848 * c-decl.c (grokdeclarator): Check TYPE_P.
1851 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1854 2016-06-07 David Malcolm <dmalcolm@redhat.com>
1856 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1857 and structure element reference, capture the location of the
1858 element name token and pass it to build_component_ref.
1859 (c_parser_postfix_expression_after_primary): Likewise for
1860 structure element dereference.
1861 (c_parser_omp_variable_list): Likewise for
1862 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1863 * c-tree.h (build_component_ref): Add location_t param.
1864 * c-typeck.c (build_component_ref): Add location_t param
1865 COMPONENT_LOC. Use it, if available, when issuing hints about
1866 mispelled member names to provide a fixit replacement hint.
1868 2016-06-06 Marek Polacek <polacek@redhat.com>
1871 * c-parser.c (c_parser_direct_declarator): Set location.
1873 2016-06-06 Marek Polacek <polacek@redhat.com>
1875 * c-typeck.c (comptypes_internal): Handle comparisons of
1876 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1877 TYPE_REF_CAN_ALIAS_ALL.
1879 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1881 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1882 arguments as addressable when async clause exists.
1884 2016-05-30 Jakub Jelinek <jakub@redhat.com>
1887 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1888 when combined with target construct.
1890 2016-05-26 Jakub Jelinek <jakub@redhat.com>
1892 * c-parser.c (c_parser_omp_clause_schedule): Warn if
1893 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1895 2016-05-25 Marek Polacek <polacek@redhat.com>
1898 * c-decl.c (c_make_fname_decl): Don't check seen_error.
1901 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1903 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
1905 * c-parser.c (c_parser_oacc_declare): Add support for
1906 GOMP_MAP_FIRSTPRIVATE_POINTER.
1907 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1908 argument with enum c_omp_region_type ort.
1909 (handle_omp_array_sections): Likewise. Update call to
1910 handle_omp_array_sections_1.
1911 (c_finish_omp_clauses): Add specific errors and warning messages for
1912 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
1913 call to handle_omp_array_sections.
1915 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
1917 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1919 2016-05-24 Richard Biener <rguenther@suse.de>
1923 * c-typeck.c (build_array_ref): Do not complain about indexing
1924 non-lvalue vectors. Adjust for function name change.
1926 2016-05-20 Martin Sebor <msebor@redhat.com>
1929 * c-typeck.c (error_init): Use
1930 expansion_point_location_if_in_system_header.
1931 (warning_init): Same.
1933 2016-05-19 David Malcolm <dmalcolm@redhat.com>
1936 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
1938 (c_parser_postfix_expression): Likewise.
1939 * c-tree.h (c_expr::set_error): New method.
1940 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
1941 that result's range is initialized.
1943 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
1945 * c-typeck.c (parser_build_unary_op): Fix formatting.
1947 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
1949 * c-decl.c (grokdeclarator): Remove errmsg and use of
1950 targetm.invalid_return_type.
1951 (grokparms): Remove errmsg and use of
1952 targetm.invalid_parameter_type.
1954 2016-05-13 Joseph Myers <joseph@codesourcery.com>
1956 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
1957 function return type.
1959 2016-05-12 Marek Polacek <polacek@redhat.com>
1962 * c-decl.c (build_compound_literal): Pass LOC down to
1963 c_incomplete_type_error.
1964 * c-tree.h (require_complete_type): Adjust declaration.
1965 (c_incomplete_type_error): Likewise.
1966 * c-typeck.c (require_complete_type): Add location parameter, pass it
1967 down to c_incomplete_type_error.
1968 (c_incomplete_type_error): Add location parameter, pass it down to
1970 (build_component_ref): Pass location down to c_incomplete_type_error.
1971 (default_conversion): Pass location down to require_complete_type.
1972 (build_array_ref): Likewise.
1973 (build_function_call_vec): Likewise.
1974 (convert_arguments): Likewise.
1975 (build_unary_op): Likewise.
1976 (build_c_cast): Likewise.
1977 (build_modify_expr): Likewise.
1978 (convert_for_assignment): Likewise.
1979 (c_finish_omp_clauses): Likewise.
1981 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1984 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
1986 * c-errors.c (pedwarn_c90): Return true if warned.
1987 * c-tree.h (pedwarn_c90): Change return type to bool.
1988 (enum c_declspec_word): Add new enumerator cdw_atomic.
1990 2016-05-11 Marek Polacek <polacek@redhat.com>
1993 * c-decl.c (diagnose_mismatched_decls): Factor out code to
1994 diagnose_mismatched_attributes and call it.
1996 2016-05-10 Marek Polacek <polacek@redhat.com>
1999 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
2000 on a declaration following the definition.
2002 2016-05-05 Jakub Jelinek <jakub@redhat.com>
2004 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
2005 parse it through to c_parser_c99_block_statement.
2006 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
2009 2016-05-04 Marek Polacek <polacek@redhat.com>
2011 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
2014 2016-05-04 Marek Polacek <polacek@redhat.com>
2017 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
2018 for macro expansions.
2020 2016-05-03 Marek Polacek <polacek@redhat.com>
2023 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
2024 check_builtin_function_arguments.
2026 2016-05-03 Richard Biener <rguenther@suse.de>
2028 * Make-lang.in (cc1-checksum.c): For stage-final re-use
2029 the checksum from the previous stage.
2031 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2033 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2034 c_finish_omp_clauses.
2035 (c_parser_omp_all_clauses): Likewise.
2036 (c_parser_oacc_cache): Likewise.
2037 (c_parser_oacc_loop): Likewise.
2038 (omp_split_clauses): Likewise.
2039 (c_parser_omp_declare_target): Likewise.
2040 (c_parser_cilk_all_clauses): Likewise.
2041 (c_parser_cilk_for): Likewise.
2042 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2043 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2045 2016-05-02 Marek Polacek <polacek@redhat.com>
2048 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2051 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2054 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2055 OACC_LOOP_CLAUSE_MASK.
2056 (c_parser_oacc_kernels_parallel): Update call to
2057 c_oacc_split_loop_clauses.
2059 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
2061 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2062 argument to build_modify_expr in two cases.
2064 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2066 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2067 warn_for_memset instead of warning directly here.
2069 2016-04-26 Marek Polacek <polacek@redhat.com>
2072 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2074 (c_parser_for_statement): ... here.
2075 (c_parser_if_statement): Use it.
2076 (c_parser_switch_statement): Use it.
2077 (c_parser_while_statement): Use it.
2080 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2082 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2085 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2086 instead of c_finish_cilk_clauses.
2087 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2088 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2089 floating-point variables in the linear clause for Cilk Plus.
2091 2016-04-18 Michael Matz <matz@suse.de>
2093 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2094 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2096 2016-04-15 Marek Polacek <polacek@redhat.com>
2099 * c-typeck.c (build_unary_op): Pass location down to error and
2102 2016-04-15 Jakub Jelinek <jakub@redhat.com>
2105 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2107 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2108 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2109 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2110 Adjust c_parser_pragma callers.
2111 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2113 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2115 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2116 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2117 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2118 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2119 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2120 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2121 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2122 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2124 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2125 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2128 2016-04-13 Marek Polacek <polacek@redhat.com>
2131 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2133 (c_parser_statement): Likewise.
2134 (c_parser_c99_block_statement): Likewise.
2135 (c_parser_while_statement): Likewise.
2136 (c_parser_for_statement): Likewise.
2137 (c_parser_if_body): Don't set IF_P here.
2138 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2139 about dangling else here.
2140 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2141 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2142 warn about dangling else here.
2144 2016-04-04 Marek Polacek <polacek@redhat.com>
2147 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2149 2016-03-31 Marek Polacek <polacek@redhat.com>
2152 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2154 2016-03-18 David Malcolm <dmalcolm@redhat.com>
2157 * c-parser.c (c_parser_postfix_expression): Set the source range
2158 for uses of "__builtin_types_compatible_p".
2160 2016-03-17 Jakub Jelinek <jakub@redhat.com>
2163 * c-typeck.c (composite_type): Don't count void_list_node
2164 into len, if the list is terminated by void_list_node, start
2165 with void_list_node instead of NULL for newargs. Stop
2168 2016-03-16 Marek Polacek <polacek@redhat.com>
2171 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2172 nested functions returning VM types.
2174 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2176 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2177 when calling c_finish_omp_clauses.
2179 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2182 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2185 2016-03-04 Marek Polacek <polacek@redhat.com>
2188 * c-parser.c (c_parser_postfix_expression): Call
2189 c_parser_cast_expression rather than c_parser_postfix_expression.
2191 2016-03-01 Jakub Jelinek <jakub@redhat.com>
2195 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2196 of incomplete decls to error_mark_node.
2198 2016-02-24 Marek Polacek <polacek@redhat.com>
2201 * c-decl.c (finish_decl): Don't update the copy of the type of a
2202 different decl type.
2204 2016-02-23 Jakub Jelinek <jakub@redhat.com>
2207 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2208 in id_kind reclassification.
2210 2016-02-16 Jakub Jelinek <jakub@redhat.com>
2213 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2215 2016-02-16 James Norris <jnorris@codesourcery.com>
2218 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2220 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2222 * c-decl.c (build_null_declspecs): Zero the entire struct.
2225 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2226 callers changed. If nested_p is true, use it to call
2227 finish_implicit_inits.
2228 * c-tree.h (finish_implicit_inits): Declare.
2229 * c-typeck.c (finish_implicit_inits): New function. Move code
2231 (push_init_level): ... here.
2232 (set_designator, process_init_element): Call finish_implicit_inits.
2234 2016-02-11 Jakub Jelinek <jakub@redhat.com>
2237 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2238 arguments for -Waddress warning.
2240 2016-02-04 Jakub Jelinek <jakub@redhat.com>
2243 * c-decl.c (finish_enum): When honoring mode attribute,
2244 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2246 2016-01-29 Jakub Jelinek <jakub@redhat.com>
2249 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2250 all type variants, not just TYPE_MAIN_VARIANT.
2252 2016-01-27 Jakub Jelinek <jakub@redhat.com>
2255 * c-decl.c (c_write_global_declarations_1): Warn with
2256 warn_unused_function if static prototype without definition
2259 2016-01-27 Marek Polacek <polacek@redhat.com>
2262 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2263 to unsigned, if needed. Add -Wsign-compare warning.
2265 2016-01-26 Jakub Jelinek <jakub@redhat.com>
2267 PR tree-optimization/69483
2268 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2270 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2273 * c-tree.h (incomplete_record_decls): Declare.
2274 * c-parser.c (incomplete_record_decls): Define.
2275 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2276 report error if any decl has zero size.
2277 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2278 or enum type to incomplete_record_decls.
2280 2016-01-14 Tom de Vries <tom@codesourcery.com>
2282 PR tree-optimization/68773
2283 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2286 2016-01-14 Marek Polacek <polacek@redhat.com>
2289 * c-decl.c (grokdeclarator): Provide more information for invalid
2292 2016-01-06 David Malcolm <dmalcolm@redhat.com>
2294 * c-parser.c (c_parser_unary_expression): For dereferences, build
2295 a combined location before calling build_indirect_ref, so that
2296 error reports cover the full range, manually updating the c_expr
2299 2016-01-06 Marek Polacek <polacek@redhat.com>
2302 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2303 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2306 2016-01-04 Jakub Jelinek <jakub@redhat.com>
2308 Update copyright years.
2310 2016-01-04 Marek Polacek <polacek@redhat.com>
2313 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2314 optimization to use __atomic_fetch_* built-in if possible.
2316 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2318 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2320 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2323 2015-12-22 Marek Polacek <polacek@redhat.com>
2326 * c-typeck.c (build_component_ref): Warn when acessing elements of
2327 atomic structures or unions.
2329 2015-12-21 David Malcolm <dmalcolm@redhat.com>
2331 * c-typeck.c: Include "gcc-rich-location.h".
2332 (build_binary_op): In the two places that call binary_op_error,
2333 create a gcc_rich_location and populate it with the location of
2334 the binary op and its two operands.
2336 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2338 * c-parser.c (c_parser_statement_after_labels): When calling
2339 c_finish_return, Use the return expression's location if it has
2340 one, falling back to the location of the first token within it.
2341 * c-typeck.c (c_finish_return): When issuing warnings about
2342 the incorrect presence/absence of a return value, issue a note
2343 showing the declaration of the function.
2345 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2347 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2349 (c_parser_peek_nth_token): New function.
2350 (c_parser_peek_conflict_marker): New function.
2351 (c_parser_error): Detect conflict markers and report them as such.
2353 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2355 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2356 to preserve range information for the primary expression
2357 in the call to c_parser_postfix_expression_after_primary.
2359 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2361 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2362 expression location, falling back on the first token location,
2363 rather than always using the latter.
2365 2015-12-16 Marek Polacek <polacek@redhat.com>
2368 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2371 2015-12-15 Marek Polacek <polacek@redhat.com>
2374 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2377 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2379 * c-parser.c (c_parser_alignof_expression): Capture location of
2380 closing parenthesis (if any), or of end of unary expression, and
2381 use it to build a src_range for the expression.
2383 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2386 * c-parser.c (c_parser_get_builtin_args): Add
2387 "out_close_paren_loc" param, and write back to it.
2388 (c_parser_postfix_expression): Capture the closing
2389 parenthesis location for RID_CHOOSE_EXPR,
2390 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2391 RID_BUILTIN_SHUFFLE and use it to set the source range
2392 for such expressions; within RID_BUILTIN_COMPLEX set
2393 the underlying location.
2395 2015-12-07 Marek Polacek <polacek@redhat.com>
2398 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2399 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2401 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2403 * c-tree.h (c_build_va_arg): Adjust prototype.
2404 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2405 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2406 parameter, adjust throughout and issue an error if EXPR is a component
2407 with reverse storage order.
2409 2015-12-02 Jason Merrill <jason@redhat.com>
2411 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2412 (c_fully_fold_internal, decl_constant_value_for_optimization):
2413 Move from c-common.c.
2414 * c-tree.h: Declare decl_constant_value_for_optimization.
2415 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2417 2015-12-02 Joseph Myers <joseph@codesourcery.com>
2420 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2421 following link from declarator to next declarator. Track original
2422 qualified type and pass it to c_build_qualified_type.
2423 * c-typeck.c (c_build_qualified_type): Add arguments
2424 orig_qual_type and orig_qual_indirect.
2426 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2428 * c-parser.c (c_parser_omp_clause_name)
2429 (c_parser_oacc_all_clauses): Alphabetical sorting.
2431 2015-12-02 Jakub Jelinek <jakub@redhat.com>
2434 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2437 2015-12-01 Julian Brown <julian@codesourcery.com>
2438 Cesar Philippidis <cesar@codesourcery.com>
2439 James Norris <James_Norris@mentor.com>
2441 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2442 (c_parser_oacc_clause_use_device): New function.
2443 (c_parser_oacc_all_clauses): Add use_device support.
2444 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2445 (c_parser_oacc_host_data): New function.
2446 (c_parser_omp_construct): Add host_data support.
2447 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2448 * c-typeck.c (c_finish_oacc_host_data): New function.
2449 (c_finish_omp_clauses): Add use_device support.
2451 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
2454 * c-decl.c: Set TYPE_PACKED in variants.
2456 2015-11-27 Martin Liska <mliska@suse.cz>
2459 * c-array-notation.c (fix_builtin_array_notation_fn):
2460 Use release_vec_vec instead of vec::release.
2461 (build_array_notation_expr): Likewise.
2462 (fix_conditional_array_notations_1): Likewise.
2463 (fix_array_notation_expr): Likewise.
2464 (fix_array_notation_call_expr): Likewise.
2466 2015-11-27 Jakub Jelinek <jakub@redhat.com>
2469 * c-parser.c (c_parser_compound_statement_nostart): If
2470 last_label is true, use pragma_stmt instead of pragma_compound
2471 as second c_parser_pragma argument.
2472 (c_parser_omp_ordered, c_parser_omp_target_update,
2473 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2474 false as second argument to c_parser_skip_to_pragma_eol after
2475 diagnosing standalone directives used in pragma_stmt context.
2477 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2479 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2480 with "if (ENABLE_OFFLOADING)".
2482 2015-11-23 David Malcolm <dmalcolm@redhat.com>
2485 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2486 for various Objective-C constructs: Class.name syntax,
2487 @selector(), @protocol(), @encode(), and [] message syntax.
2489 2015-11-20 David Malcolm <dmalcolm@redhat.com>
2492 * c-typeck.c (should_suggest_deref_p): New function.
2493 (build_component_ref): Special-case POINTER_TYPE when
2494 generating a "not a structure of union" error message, and
2495 suggest a "->" rather than a ".", providing a fix-it hint.
2497 2015-11-19 David Malcolm <dmalcolm@redhat.com>
2499 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2500 candidate into a new function, find_closest_identifier.
2502 2015-11-19 Marek Polacek <polacek@redhat.com>
2505 * c-typeck.c (parser_build_binary_op): Properly handle
2506 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2508 2015-11-17 David Malcolm <dmalcolm@redhat.com>
2510 * c-parser.c (set_c_expr_source_range): Bulletproof both
2511 overloaded implementations against NULL expr->value.
2512 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2514 (c_parser_unary_expression): Likewise when handling addresses of
2516 (c_parser_postfix_expression): Likewise for statement expressions,
2517 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2518 __builtin_va_arg, and for __builtin_offset_of.
2519 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2520 src_range using the range of the braced initializer.
2521 (c_parser_transaction_expression): Set src_range for "ret" to a
2522 sane pair of values.
2524 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2526 * c-parser.c (c_finish_omp_declare_simd): Look for
2527 "simd" attribute as well. Update error message.
2529 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2531 * c-parser.c (c_parser_omp_declare_target): Adjust.
2533 2015-11-14 Jakub Jelinek <jakub@redhat.com>
2535 * c-typeck.c (c_finish_omp_clauses): Don't mark
2536 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2538 2015-11-14 Marek Polacek <polacek@redhat.com>
2540 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2541 * c-typeck.c: Likewise.
2543 2015-11-13 David Malcolm <dmalcolm@redhat.com>
2545 * c-decl.c (warn_defaults_to): Pass line_table to
2547 * c-errors.c (pedwarn_c99): Likewise.
2548 (pedwarn_c90): Likewise.
2549 * c-parser.c (set_c_expr_source_range): New functions.
2550 (c_token::get_range): New method.
2551 (c_token::get_finish): New method.
2552 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2553 based on the range from the start of the LHS to the end of the
2555 (c_parser_conditional_expression): Likewise, based on the range
2556 from the start of the cond.value to the end of exp2.value.
2557 (c_parser_binary_expression): Call set_c_expr_source_range on
2558 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2559 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2560 based on the cast_loc through to the end of the expr.
2561 (c_parser_unary_expression): Likewise, based on the
2562 op_loc through to the end of op.
2563 (c_parser_sizeof_expression) Likewise, based on the start of the
2564 sizeof token through to either the closing paren or the end of
2566 (c_parser_postfix_expression): Likewise, using the token range,
2567 or from the open paren through to the close paren for
2568 parenthesized expressions.
2569 (c_parser_postfix_expression_after_primary): Likewise, for
2570 various kinds of expression.
2571 * c-tree.h (struct c_expr): Add field "src_range".
2572 (c_expr::get_start): New method.
2573 (c_expr::get_finish): New method.
2574 (set_c_expr_source_range): New decls.
2575 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2576 on ret for prefix unary ops.
2577 (parser_build_binary_op): Likewise, running from the start of
2578 arg1.value through to the end of arg2.value.
2580 2015-11-13 Marek Polacek <polacek@redhat.com>
2583 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2585 2015-11-13 David Malcolm <dmalcolm@redhat.com>
2587 * c-typeck.c: Include spellcheck.h.
2588 (lookup_field_fuzzy_find_candidates): New function.
2589 (lookup_field_fuzzy): New function.
2590 (build_component_ref): If the field was not found, try using
2591 lookup_field_fuzzy and potentially offer a suggestion.
2593 2015-11-12 James Norris <jnorris@codesourcery.com>
2594 Joseph Myers <joseph@codesourcery.com>
2596 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2597 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2598 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2599 and PRAGMA_OMP_CLAUSE_LINK.
2600 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2601 and PRAGMA_OACC_CLAUSE_LINK.
2602 (OACC_DECLARE_CLAUSE_MASK): New definition.
2603 (c_parser_oacc_declare): New function.
2605 2015-11-12 Marek Polacek <polacek@redhat.com>
2608 * c-parser.c (c_parser_for_statement): Reclassify the token in
2611 2015-11-11 Marek Polacek <polacek@redhat.com>
2615 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2616 checking the size of an array.
2618 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
2620 * c-array-notation.c: Remove unused header files.
2621 * c-aux-info.c: Likewise.
2622 * c-convert.c: Likewise.
2623 * c-decl.c: Likewise.
2624 * c-errors.c: Likewise.
2625 * c-lang.c: Likewise.
2626 * c-objc-common.c: Likewise.
2627 * c-parser.c: Likewise.
2628 * c-typeck.c: Likewise.
2629 * gccspec.c: Likewise.
2631 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2632 Cesar Philippidis <cesar@codesourcery.com>
2633 James Norris <jnorris@codesourcery.com>
2634 Julian Brown <julian@codesourcery.com>
2635 Nathan Sidwell <nathan@codesourcery.com>
2638 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2640 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2641 (c_parser_pragma): Parse 'acc routine'.
2642 (OACC_ROUTINE_CLAUSE_MARK): Define.
2643 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2645 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2648 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2649 location of the backward-goto to the start of the loop body.
2651 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2654 * c-parser.c (c_parser_while_statement): Finish the loop before
2655 parsing ahead for misleading indentation.
2656 (c_parser_for_statement): Likewise.
2658 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2660 * c-decl.c (finish_struct): If the structure has reverse storage
2661 order, rewrite the type of array fields with scalar component. Call
2662 maybe_apply_pragma_scalar_storage_order on entry.
2663 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2664 errors on bit-fields and reverse SSO here and not...
2665 (c_mark_addressable): ...here.
2666 (output_init_element): Adjust call to initializer_constant_valid_p.
2667 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2669 2015-11-06 David Malcolm <dmalcolm@redhat.com>
2671 * c-decl.c (warn_defaults_to): Update for change in signature
2672 of diagnostic_set_info.
2673 * c-errors.c (pedwarn_c99): Likewise.
2674 (pedwarn_c90): Likewise.
2675 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2676 for textinfo::set_location.
2678 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2679 Thomas Schwinge <thomas@codesourcery.com>
2680 James Norris <jnorris@codesourcery.com>
2682 * c-parser.c (c_parser_omp_clause_name): Add support for
2683 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2684 (c_parser_omp_clause_default): Add is_oacc argument. Handle
2685 default(none) in OpenACC.
2686 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2688 (c_parser_oacc_clause_tile): New function.
2689 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2690 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2691 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2693 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2694 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2696 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2697 (c_parser_oacc_update): Update the error message for missing clauses.
2698 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2699 and OMP_CLAUSE_INDEPENDENT.
2701 2015-11-05 Marek Polacek <polacek@redhat.com>
2704 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2705 deal with pre-evaluation on invalid types.
2707 2015-11-05 Jakub Jelinek <jakub@redhat.com>
2708 Ilya Verbin <ilya.verbin@intel.com>
2710 * c-parser.c: Include context.h and gimple-expr.h.
2711 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2712 monotonic together with nonmonotonic.
2713 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
2714 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2715 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2716 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2717 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
2718 expressions on combined target teams before the target.
2719 (c_parser_omp_declare_target): If decl has "omp declare target" or
2720 "omp declare target link" attribute, and cgraph or varpool node already
2721 exists, then set corresponding flags. Call c_finish_omp_clauses
2722 in the parenthesized extended-list syntax case.
2723 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2725 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2726 on OMP_CLAUSE_REDUCTION array sections.
2727 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2728 into the constant offset, or for variable low-bound using
2729 POINTER_PLUS_EXPR. For structure element based array sections use
2730 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2731 (c_finish_omp_clauses): Drop generic_field_head, structure
2732 elements are now always mapped even as array section bases,
2733 diagnose same var in data sharing and mapping clauses. Diagnose if
2734 linear step on declare simd is neither a constant nor a uniform
2735 parameter. Look through POINTER_PLUS_EXPR for array section
2736 reductions. Diagnose the same var or function appearing multiple
2737 times on the same directive. Fix up wording for the to clause if t
2738 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
2739 modifier on kinds other than dynamic or guided or nonmonotonic
2740 modifier together with ordered clause.
2742 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2743 Chung-Lin Tang <cltang@codesourcery.com>
2745 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2747 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
2749 * c-array-notation.c: Reorder #include's and remove duplicates.
2750 * c-aux-info.c: Likewise.
2751 * c-convert.c: Likewise.
2752 * c-decl.c: Likewise.
2753 * c-errors.c: Likewise.
2754 * c-lang.c: Likewise.
2755 * c-objc-common.c: Likewise.
2756 * c-parser.c: Likewise.
2757 * c-typeck.c: Likewise.
2759 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
2762 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2763 after calling build_qualified_type.
2765 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2766 Thomas Schwinge <thomas@codesourcery.com>
2767 James Norris <jnorris@codesourcery.com>
2768 Joseph Myers <joseph@codesourcery.com>
2769 Julian Brown <julian@codesourcery.com>
2770 Bernd Schmidt <bschmidt@redhat.com>
2772 * c-parser.c (c_parser_oacc_shape_clause): New.
2773 (c_parser_oacc_simple_clause): New.
2774 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2775 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2777 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2778 James Norris <jnorris@codesourcery.com>
2779 Cesar Philippidis <cesar@codesourcery.com>
2783 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2784 parameters, and handle these. Adjust all users.
2785 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2787 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2789 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2791 (c_finish_omp_construct): Declare function.
2792 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2793 Merge functions into...
2794 (c_finish_omp_construct): ... this new function.
2796 2015-10-22 Richard Biener <rguenther@suse.de>
2798 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2799 before folding a MINUS_EXPR.
2801 2015-10-21 Marek Polacek <polacek@redhat.com>
2804 * c-decl.c (start_function): Warn about vararg functions without
2807 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2809 * c-typeck.c (build_conditional_expr): Use boolean vector
2810 type for vector comparison.
2811 (build_vec_cmp): New.
2812 (build_binary_op): Use build_vec_cmp for comparison.
2814 2015-10-20 Marek Polacek <polacek@redhat.com>
2816 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2818 2015-10-20 Marek Polacek <polacek@redhat.com>
2821 * c-parser.c (c_parser_attributes): Break out of the loop if the
2822 token after an attribute isn't a comma.
2824 2015-10-13 Jakub Jelinek <jakub@redhat.com>
2825 Aldy Hernandez <aldyh@redhat.com>
2827 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2828 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2829 (c_parser_omp_variable_list): Handle structure elements for
2830 map, to and from clauses. Handle array sections in reduction
2831 clause. Formatting fixes.
2832 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2833 if clause modifiers.
2834 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2835 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2836 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2837 c_parser_omp_clause_is_device_ptr): New functions.
2838 (c_parser_omp_clause_ordered): Parse optional parameter.
2839 (c_parser_omp_clause_reduction): Handle array reductions.
2840 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2841 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2843 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2844 (c_parser_omp_clause_depend_sink): New function.
2845 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2846 (c_parser_omp_clause_map): Parse release/delete map kinds and
2847 optional always modifier.
2848 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2849 and c_finish_omp_clauses callers.
2850 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
2851 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2852 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2853 (OMP_CRITICAL_CLAUSE_MASK): Define.
2854 (c_parser_omp_critical): Parse critical clauses.
2855 (c_parser_omp_for_loop): Handle doacross loops, adjust
2856 c_finish_omp_for and c_finish_omp_clauses callers.
2857 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2858 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2859 (OMP_FOR_CLAUSE_MASK): Add linear clause.
2860 (c_parser_omp_for): Disallow ordered clause when combined with
2861 distribute. Disallow linear clause when combined with distribute
2862 and not combined with simd.
2863 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2864 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2865 parse clauses and if depend clause is found, don't parse a body.
2866 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2867 Allow target parallel without for after it.
2868 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2869 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2870 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2872 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2873 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2874 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2875 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2877 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2878 defaultmap and is_device_ptr clauses.
2879 (c_parser_omp_target): Parse target parallel and target simd. Set
2880 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
2881 and target exit data. Diagnose invalid map kinds.
2882 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2883 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2885 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2887 (OMP_TASKLOOP_CLAUSE_MASK): Define.
2888 (c_parser_omp_taskloop): New function.
2889 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2890 handle PRAGMA_OMP_TASKLOOP.
2891 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2892 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2893 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2894 Add IS_OMP argument, handle structure element bases, diagnose
2895 bitfields, pass IS_OMP recursively, diagnose known zero length
2896 array sections in depend clauses, handle array sections in reduction
2897 clause, diagnose negative length even for pointers.
2898 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2899 types, pass IS_OMP down to handle_omp_array_sections_1, handle
2900 array sections in reduction clause, set
2901 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2902 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2903 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2904 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2906 2015-10-06 Marek Polacek <polacek@redhat.com>
2908 * c-parser.c (c_parser_statement_after_labels): Use
2909 protected_set_expr_location.
2910 (c_parser_omp_clause_num_gangs): Likewise.
2911 (c_parser_omp_clause_num_threads): Likewise.
2912 (c_parser_omp_clause_num_workers): Likewise.
2913 (c_parser_omp_clause_vector_length): Likewise.
2914 (c_parser_omp_clause_num_teams): Likewise.
2915 (c_parser_omp_clause_thread_limit): Likewise.
2916 * c-typeck.c (build_c_cast): Likewise.
2917 (c_cast_expr): Likewise.
2919 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2921 * c-typeck.c (c_tree_equal): Use real_equal instead of
2924 2015-10-04 Jason Merrill <jason@redhat.com>
2926 * c-parser.c (c_lex_one_token): Handle @synchronized.
2927 * c-decl.c (match_builtin_function_types): A declaration of a built-in
2928 can change whether the function is transaction_safe.
2930 2015-10-02 Marek Polacek <polacek@redhat.com>
2933 * c-typeck.c (convert_for_assignment): Use the expansion point
2934 location throughout.
2936 2015-10-02 Marek Polacek <polacek@redhat.com>
2939 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
2940 and pass it down to c_parser_if_statement.
2941 (c_parser_else_body): Add CHAIN parameter and pass it down to
2942 c_parser_statement_after_labels.
2943 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
2944 duplicated if-else-if conditions.
2946 2015-10-01 Marek Polacek <polacek@redhat.com>
2948 * c-typeck.c (convert_for_assignment): Improve commentary.
2950 2015-09-30 Marek Polacek <polacek@redhat.com>
2953 * c-typeck.c (c_finish_return): Use the expansion point location for
2954 certain "return with value" warnings.
2956 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2958 * c-parser.c (pragma_lex): Add loc argument.
2960 2015-09-15 Marek Polacek <polacek@redhat.com>
2963 * c-decl.c (tag_exists_p): New function.
2964 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
2965 struct/union/enum keywords are missing.
2966 * c-tree.h (tag_exists_p): Declare.
2968 2015-09-15 Marek Polacek <polacek@redhat.com>
2970 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
2971 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
2972 Return NULL_TREE instead of 0.
2973 (lookup_name): Return NULL_TREE instead of 0.
2974 (lookup_name_in_scope): Likewise.
2975 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
2976 (parser_xref_tag): Use false instead of 0.
2977 (start_struct): Use true instead of 1.
2978 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2980 2015-09-14 Marek Polacek <polacek@redhat.com>
2982 * c-typeck.c (set_nonincremental_init_from_string): Use
2983 HOST_WIDE_INT_M1U when shifting a negative value.
2985 2015-09-09 Mark Wielaard <mjw@redhat.com>
2987 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
2990 2015-09-10 Jakub Jelinek <jakub@redhat.com>
2993 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
2994 into OMP_FOR_PRE_BODY rather than before the loop.
2996 2015-09-09 Jakub Jelinek <jakub@redhat.com>
2999 * c-parser.c (c_parser_oacc_all_clauses,
3000 c_parser_omp_all_clauses): Remove invalid clause from
3001 list of clauses even if parser->error is set.
3004 * c-parser.c (c_parser_omp_clause_aligned,
3005 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
3007 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
3011 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
3012 instead of c_parser_unary_expression. If the result is !lvalue_p,
3013 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
3015 2015-09-04 Marek Polacek <polacek@redhat.com>
3018 * c-typeck.c (build_binary_op): Don't instrument static initializers.
3020 2015-09-03 Martin Sebor <msebor@redhat.com>
3023 * c-typeck.c (convert_arguments, parser_build_unary_op,
3024 build_conditional_expr, c_cast_expr, convert_for_assignment,
3025 build_binary_op, _objc_common_truthvalue_conversion): Call
3027 (c_decl_implicit): Define.
3029 2015-09-02 Marek Polacek <polacek@redhat.com>
3032 * c-parser.c (c_parser_enum_specifier): Give a better error for
3035 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3037 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3039 2015-08-12 Marek Polacek <polacek@redhat.com>
3041 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3044 2015-08-03 Marek Polacek <polacek@redhat.com>
3047 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3049 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3051 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3053 * c-parser.c (c_parser_if_body): Take token_indent_info
3054 argument. Call warn_for_misleading_indentation even when the
3055 body is a semicolon. Extract token_indent_infos corresponding
3056 to the guard, body and next tokens. Adjust call to
3057 warn_for_misleading_indentation accordingly.
3058 (c_parser_else_body): Likewise.
3059 (c_parser_if_statement): Likewise.
3060 (c_parser_while_statement): Likewise.
3061 (c_parser_for_statement): Likewise.
3063 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3064 Manuel López-Ibáñez <manu@gcc.gnu.org>
3066 * c-decl.c (get_parm_info): Remove static var. Update warning
3069 2015-07-27 Marek Polacek <polacek@redhat.com>
3073 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3075 2015-07-20 Marek Polacek <polacek@redhat.com>
3078 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3079 (build_binary_op): Warn about left shift overflows.
3081 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
3083 * c-array-notation.c: Adjust includes for flags.h changes.
3084 * c-objc-common.c: Likewise.
3086 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
3088 * c-array-notation.c: Adjust includes.
3089 * c-aux-info.c: Likewise.
3090 * c-convert.c: Likewise.
3091 * c-decl.c: Likewise.
3092 * c-errors.c: Likewise.
3093 * c-lang.c: Likewise.
3094 * c-objc-common.c: Likewise.
3095 * c-parser.c: Likewise.
3096 * c-typeck.c: Likewise.
3098 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3101 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3103 2015-06-29 Marek Polacek <polacek@redhat.com>
3106 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3107 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3108 about -Wswitch-bool here.
3109 (do_case): Update c_add_case_label call.
3110 (c_finish_case): Update c_do_switch_warnings call.
3112 2015-06-27 Marek Polacek <polacek@redhat.com>
3114 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3116 2015-06-26 Marek Polacek <polacek@redhat.com>
3118 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3120 * c-typeck.c (array_to_pointer_conversion): Likewise.
3121 (build_unary_op): Likewise.
3122 (c_finish_return): Likewise.
3124 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
3126 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3127 * c-parser.c: Likewise.
3129 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3131 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3132 instead of pointer_hash.
3133 (detect_field_duplicates): Likewise.
3135 2015-06-25 Marek Polacek <polacek@redhat.com>
3137 * c-array-notation.c: Use VAR_P throughout.
3138 * c-decl.c: Likewise.
3139 * c-objc-common.c: Likewise.
3140 * c-parser.c: Likewise.
3141 * c-typeck.c: Likewise.
3143 2015-06-25 Marek Polacek <polacek@redhat.com>
3145 * c-decl.c: Use is_global_var throughout.
3146 * c-parser.c: Likewise.
3147 * c-typeck.c: Likewise.
3149 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
3151 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3152 * c-aux-info.c: Likewise.
3153 * c-convert.c: Likewise.
3154 * c-decl.c: Likewise.
3155 * c-errors.c: Likewise.
3156 * c-lang.c: Likewise.
3157 * c-objc-common.c: Likewise.
3158 * c-parser.c: Likewise.
3159 * c-typeck.c: Likewise.
3161 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
3164 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3167 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3169 * c-decl.c (pop_scope): Register the main translation unit
3170 through the new debug hook.
3172 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
3174 * c-array-notation.c : Adjust include files.
3175 * c-aux-info.c : Likewise.
3176 * c-convert.c : Likewise.
3177 * c-decl.c : Likewise.
3178 * c-errors.c : Likewise.
3179 * c-lang.c : Likewise.
3180 * c-lang.h : Likewise.
3181 * c-objc-common.c : Likewise.
3182 * c-parser.c : Likewise.
3183 * c-typeck.c : Likewise.
3185 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
3187 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3188 immediately clobber it.
3189 (c_write_global_declarations_1): Remove call to
3190 check_global_declaration_1.
3191 (c_write_global_declarations_2): Remove.
3192 (c_write_final_cleanups): Rename from c_write_global_declarations.
3193 Remove call to finalize_compilation_unit.
3194 Remove calls to debugging hooks.
3195 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3196 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3197 * c-tree.h: Remove c_write_global_declarations.
3199 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
3201 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3202 * c-aux-info.c: Likewise.
3203 * c-convert.c: Likewise.
3204 * c-decl.c: Likewise.
3205 * c-errors.c: Likewise.
3206 * c-lang.c: Likewise.
3207 * c-objc-common.c: Likewise.
3208 * c-parser.c: Likewise.
3209 * c-typeck.c: Likewise.
3211 2015-06-04 Marek Polacek <polacek@redhat.com>
3214 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3217 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3219 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3220 Warn for empty struct.
3221 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3223 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3225 * c-decl.c (start_function): Call plugin before parsing.
3226 (finish_function): Call plugin after parsing.
3228 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3231 * c-decl.c (merge_decls): Merge DECL_COMMON.
3233 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
3235 * Make-lang.in (check_gcc_pallelize): Define.
3237 2015-05-22 Marek Polacek <polacek@redhat.com>
3240 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3243 2015-05-21 Marek Polacek <polacek@redhat.com>
3245 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3248 2015-05-20 Marek Polacek <polacek@redhat.com>
3250 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3251 * c-typeck.c: Likewise.
3253 2015-05-19 Marek Polacek <polacek@redhat.com>
3255 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3257 2015-05-19 Jakub Jelinek <jakub@redhat.com>
3260 * c-parser.c (c_parser_omp_for_loop): Don't add
3261 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3262 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3263 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3266 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3268 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
3271 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3274 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3277 2015-05-14 Marek Polacek <polacek@redhat.com>
3281 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3284 2015-05-12 David Malcolm <dmalcolm@redhat.com>
3286 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3287 to add a call to warn_for_misleading_indentation.
3288 (c_parser_else_body): Likewise, adding param "else_loc".
3289 (c_parser_if_statement): Check for misleading indentation.
3290 (c_parser_while_statement): Likewise.
3291 (c_parser_for_statement): Likewise.
3293 2015-05-08 Marek Polacek <polacek@redhat.com>
3296 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3297 (output_init_element): Likewise.
3299 2015-05-07 Marek Polacek <polacek@redhat.com>
3302 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3305 2015-04-30 Marek Polacek <polacek@redhat.com>
3307 * c-typeck.c (set_init_label): Call error_at instead of error and
3310 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3313 * c-typeck.c (c_build_va_arg): Clarify the error message.
3315 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3317 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3318 OMP_STANDALONE_CLAUSES.
3320 2015-04-28 Marek Polacek <polacek@redhat.com>
3322 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3324 2015-04-28 Marek Polacek <polacek@redhat.com>
3327 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3329 2015-04-25 Marek Polacek <polacek@redhat.com>
3332 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3335 2015-04-23 Marek Polacek <polacek@redhat.com>
3338 * c-decl.c (set_labels_context_r): New function.
3339 (store_parm_decls): Call it via walk_tree_without_duplicates.
3340 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3341 instead of create_tmp_var. Build TARGET_EXPR instead of
3343 (build_atomic_assign): Use create_tmp_var_raw instead of
3344 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3346 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3348 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3349 (c_parser_omp_target_update): Add missed %> to error_at ().
3351 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3354 * c-decl.c (c_default_pointer_mode): Remove definition.
3355 * c-tree.h (c_default_pointer_mode): Remove declaration.
3357 2015-03-27 Tobias Burnus <burnus@net-b.de>
3360 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3362 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3363 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3364 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3366 2015-03-19 Jakub Jelinek <jakub@redhat.com>
3368 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3369 attribute for DECL_EXTERNAL VAR_DECLs.
3371 2015-03-11 Jakub Jelinek <jakub@redhat.com>
3373 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3376 2015-03-10 Jakub Jelinek <jakub@redhat.com>
3379 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3380 before preparing arguments to warn_logical_not_parentheses.
3382 2015-03-09 Jakub Jelinek <jakub@redhat.com>
3385 * c-typeck.c (parser_build_binary_op): Don't warn for
3386 !!x == y or !b == y where b is _Bool.
3388 2015-03-09 Marek Polacek <polacek@redhat.com>
3390 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3391 * c-decl.c (grokdeclarator): Likewise.
3392 * c-typeck.c (build_binary_op): Likewise.
3394 2015-02-27 Marek Polacek <polacek@redhat.com>
3397 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3399 2015-02-14 Marek Polacek <polacek@redhat.com>
3402 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3403 declared through a typedef name.
3405 2015-02-13 Marek Polacek <polacek@redhat.com>
3408 * c-decl.c (grokdeclarator): Print also the type when giving
3409 the error message about array's incomplete element type.
3411 2015-02-11 Jakub Jelinek <jakub@redhat.com>
3414 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3415 check in the POP macro.
3417 2015-02-09 Marek Polacek <polacek@redhat.com>
3420 * c-typeck.c (process_init_element): Don't always wrap
3421 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3422 initializing a range of elements.
3424 2015-02-04 Jakub Jelinek <jakub@redhat.com>
3428 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3430 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
3432 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3433 processing enum declaration.
3435 2015-01-29 Marek Polacek <polacek@redhat.com>
3438 * c-typeck.c (pop_init_level): If constructor_elements has
3439 exactly one element with integer_zerop value, set constructor_zeroinit
3440 to 1. Remove braces around warning_init call.
3442 2015-01-27 Jakub Jelinek <jakub@redhat.com>
3445 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3446 of FUNCTION_DECLs with error_mark_node.
3448 2015-01-26 Jakub Jelinek <jakub@redhat.com>
3451 * c-typeck.c (convert_arguments): Return -1 if there are
3452 error_args, even if we've diagnosed too many arguments.
3454 2015-01-21 Richard Biener <rguenther@suse.de>
3457 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3458 for builtins the user declared correctly.
3460 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3461 Bernd Schmidt <bernds@codesourcery.com>
3462 Cesar Philippidis <cesar@codesourcery.com>
3463 James Norris <jnorris@codesourcery.com>
3464 Jakub Jelinek <jakub@redhat.com>
3465 Ilmir Usmanov <i.usmanov@samsung.com>
3467 * c-parser.c: Include "gomp-constants.h".
3468 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3469 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3470 Use OMP_CLAUSE_SET_MAP_KIND.
3471 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3472 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3473 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3474 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3475 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3476 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3477 "copyout", "create", "delete", "deviceptr", "gang", "host",
3478 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3479 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3480 "present_or_create", "pcreate", "seq", "self", "vector",
3481 "vector_length", "wait", "worker".
3482 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3483 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3484 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3485 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3486 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3487 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3488 (c_parser_oacc_data_clause_deviceptr)
3489 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3490 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3491 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3492 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3493 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3494 (c_parser_oacc_parallel, c_parser_oacc_update)
3495 (c_parser_oacc_wait): New functions.
3496 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3497 (c_finish_oacc_data): New prototypes.
3498 * c-typeck.c: Include "gomp-constants.h".
3499 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3500 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3501 OMP_CLAUSE_SET_MAP_KIND.
3502 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3503 (c_finish_oacc_data): New functions.
3504 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3505 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3506 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3507 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3508 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3509 GOMP_MAP_FORCE_DEVICEPTR.
3511 2015-01-09 Michael Collison <michael.collison@linaro.org>
3513 * c-array-notation.c: Include hash-set.h, machmode.h,
3514 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3515 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3516 * c-aux-info.c: Ditto.
3517 * c-convert.c: Ditto.
3519 * c-errors.c: Ditto.
3520 * c-lang.c: Dittoxs.
3521 * c-objc-common.c: Ditto.
3522 * c-parser.c: Ditto.
3523 * c-typeck.c: Include hash-set.h, machmode.h,
3524 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3525 fold-const.h, wide-int.h, inchash.h, real.h and
3526 fixed-value.h due to flattening of tree.h.
3528 2015-01-07 Marek Polacek <polacek@redhat.com>
3531 * c-typeck.c (process_init_element): Disallow initialization of
3532 a flexible array member with a string constant if the structure
3535 2015-01-05 Jakub Jelinek <jakub@redhat.com>
3538 * c-typeck.c (convert_for_assignment, c_finish_return): For
3539 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3540 types also set in_late_binary_op around convert call.
3541 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3542 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3543 result on expr as last argument to ubsan_instrument_float_cast,
3544 if in_late_binary_op, don't use c_save_expr but save_expr.
3546 Update copyright years.
3548 2015-01-05 Marek Polacek <polacek@redhat.com>
3551 * c-typeck.c (build_array_ref): Pass loc down to
3552 warn_array_subscript_with_type_char.
3554 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
3556 * c-typeck.c: New behavious for pointers to arrays with qualifiers
3557 (common-pointer-type): For pointers to arrays take qualifiers from
3559 (build_conditional_expr): Add warnings for lost qualifiers.
3560 (comp-target-types): Allow pointers to arrays with different qualifiers.
3561 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
3562 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
3563 to PEDWARN_FOR_QUALIFIERS.
3565 2014-12-17 Jakub Jelinek <jakub@redhat.com>
3568 * c-convert.c: Include ubsan.h.
3569 (convert): For real -> integral casts and
3570 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3571 instead instrument the float cast directly.
3573 2014-11-29 Jakub Jelinek <jakub@redhat.com>
3575 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3576 c_finish_stmt_expr): Remove NULL last argument from
3577 create_tmp_var_raw and create_tmp_var calls.
3578 * c-array-notation.c (fix_builtin_array_notation_fn,
3579 build_array_notation_expr, fix_conditional_array_notations_1,
3580 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3582 2014-11-28 Marek Polacek <polacek@redhat.com>
3585 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3586 convert the right operand to integer type.
3588 2014-11-25 Marek Polacek <polacek@redhat.com>
3591 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3592 for inline functions.
3594 2014-11-21 Jakub Jelinek <jakub@redhat.com>
3597 * c-typeck.c (build_array_ref): Adjust
3598 convert_vector_to_pointer_for_subscript caller. If it returns true,
3599 call non_lvalue_loc on the result.
3601 2014-11-11 Richard Biener <rguenther@suse.de>
3603 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3606 2014-11-10 Andi Kleen <ak@linux.intel.com>
3609 * c-parser.c (c_parser_statement_after_labels): Call
3611 (c_parser_if_statement): Dito.
3612 (c_parser_switch_statement): Dito.
3613 (c_parser_while_statement): Dito.
3614 (c_parser_do_statement): Dito.
3615 (c_parser_for_statement): Dito.
3616 * c-typeck.c (c_finish_loop): Dito.
3618 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3620 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3621 OPT_Wshift_count_overflow in the warnings.
3623 2014-10-30 Marek Polacek <polacek@redhat.com>
3625 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3626 print the stripped version as well, if they're not the same.
3628 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3630 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3633 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
3635 * c-decl.c: Adjust include files.
3636 * c-parser.c: Ditto.
3638 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3639 Tom Tromey <tromey@redhat.com>
3641 * c-tree.h (enum c_oracle_request): New.
3642 (c_binding_oracle_function): New typedef.
3643 (c_binding_oracle, c_pushtag, c_bind): Declare.
3644 * c-decl.c (c_binding_oracle): New global.
3645 (I_SYMBOL_CHECKED): New macro.
3646 (i_symbol_binding): New function.
3647 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3648 (I_TAG_CHECKED): New macro.
3649 (i_tag_binding): New function.
3650 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3651 (I_LABEL_CHECKED): New macro.
3652 (i_label_binding): New function.
3653 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3654 (c_print_identifier): Save and restore c_binding_oracle.
3655 (c_pushtag, c_bind): New functions.
3657 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
3659 * c-typeck.c: Adjust include files.
3661 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3664 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3665 initialization here...
3666 (c_initialize_diagnostics): ... but here. Set defaults after
3667 building pretty-printer.
3669 2014-10-23 Marek Polacek <polacek@redhat.com>
3672 * c-decl.c (pop_scope): Don't print warning in external_scope.
3674 2014-10-19 Marek Polacek <polacek@redhat.com>
3677 * c-typeck.c (output_init_element): Allow initializing objects with
3678 static storage duration with compound literals even in C99 and add
3681 2014-10-17 Marek Polacek <polacek@redhat.com>
3684 * c-typeck.c (digest_init): Allow initializing objects with static
3685 storage duration with compound literals even in C99 and add pedwarn
3688 2014-10-17 Marek Polacek <polacek@redhat.com>
3691 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3692 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3693 error multiple times. Print the type.
3695 2014-10-17 Marek Polacek <polacek@redhat.com>
3698 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3701 2014-10-17 Marek Polacek <polacek@redhat.com>
3703 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3704 (start_function): Use OPT_Wimplicit_int instead of 0.
3705 (store_parm_decls_oldstyle): Likewise.
3707 2014-10-17 Alan Modra <amodra@gmail.com>
3710 * c-decl.c (merge_decls): Don't merge section name or tls model
3711 to newdecl symtab node, instead merge to olddecl. Override
3712 existing olddecl section name. Set tls_model for all thread-local
3713 vars, not just OMP thread-private ones. Remove incorrect comment.
3715 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
3717 * c-decl.c: Adjust include files.
3719 2014-10-14 DJ Delorie <dj@redhat.com>
3721 * c-parser.c (c_parse_init): Add RID entries for each __intN.
3722 (c_token_starts_typename): Check all __intN, not just __int128.
3723 (c_token_starts_declspecs): Likewise.
3724 (c_parser_declspecs): Likewise.
3725 (c_parser_attribute_any_word): Likewise.
3726 (c_parser_objc_selector): Likewise.
3727 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3728 (struct c_declspecs): Add int_n_idx field to record *which* __intN
3730 * c-decl.c (declspecs_add_type): Check for all __intN, not just
3732 (finish_declspecs): Likewise.
3734 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
3736 * c-parser.c (c_parser_all_labels): New function to replace
3738 (c_parser_statement): Call the new function.
3740 2014-10-09 Marek Polacek <polacek@redhat.com>
3743 * c-typeck.c (pop_init_level): Don't warn about initializing
3746 2014-10-07 Marek Polacek <polacek@redhat.com>
3749 * c-decl.c (header_for_builtin_fn): New function.
3750 (implicitly_declare): Suggest which header to include.
3752 2014-10-07 Marek Polacek <polacek@redhat.com>
3754 * c-convert.c (convert): Use error_operand_p.
3755 * c-typeck.c (require_complete_type): Likewise.
3756 (really_atomic_lvalue): Likewise.
3757 (digest_init): Likewise.
3758 (handle_omp_array_sections_1): Likewise.
3760 2014-10-03 Marek Polacek <polacek@redhat.com>
3763 * c-decl.c (pop_scope): Don't warn about "inline function declared
3764 but never defined" for functions marked with gnu_inline attribute.
3766 2014-09-25 Jakub Jelinek <jakub@redhat.com>
3769 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3770 on low_bound and length.
3772 2014-09-24 Marek Polacek <polacek@redhat.com>
3776 * c-parser.c: Don't define CPP_KEYWORD.
3777 (c_parser_switch_statement): Pass original type to c_finish_case.
3778 * c-tree.h (c_finish_case): Update declaration.
3779 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3780 conditionally to c_do_switch_warnings.
3782 2014-09-03 Marek Polacek <polacek@redhat.com>
3785 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3788 2014-09-02 Jakub Jelinek <jakub@redhat.com>
3789 Balaji V. Iyer <balaji.v.iyer@intel.com>
3790 Igor Zamyatin <igor.zamyatin@intel.com>
3792 * c-parser.c (c_parser_cilk_for): New function.
3793 (c_parser_cilk_grainsize): Likewise.
3794 (c_get_temp_regvar): Likewise.
3795 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3796 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3797 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3798 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3801 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3803 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3804 with using HOST_WIDE_INT without truncation to 'int'
3806 2014-08-22 Marek Polacek <polacek@redhat.com>
3809 * c-typeck.c (parser_build_binary_op): Adjust call to
3810 warn_logical_not_parentheses.
3812 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3815 * c-parser.c (c_parser_array_notation): Check for correct
3816 type of an array added.
3818 2014-08-19 Marek Polacek <polacek@redhat.com>
3821 * c-typeck.c (build_binary_op): If either operand of a comparison
3822 is a boolean expression, call maybe_warn_bool_compare.
3824 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3827 * c-typeck.c (build_c_cast): Do a conversion even when the
3828 TYPE_MAIN_VARIANTs are the same.
3830 2014-08-19 Marek Polacek <polacek@redhat.com>
3832 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3833 pedwarn_c99 instead of pedwarn.
3834 (grokfield): Likewise.
3835 (warn_defaults_to): New function.
3836 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3837 Unconditionally call pedwarn_c99 instead of pedwarn.
3838 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3839 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3840 check flag_isoc11 before.
3841 * c-errors.c (pedwarn_c99): Change the return type to bool.
3842 Handle -Wc99-c11-compat.
3843 * c-parser.c (disable_extension_diagnostics): Handle
3844 warn_c99_c11_compat.
3845 (restore_extension_diagnostics): Likewise.
3846 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3847 instead of pedwarn, don't check flag_isoc11 before.
3848 (c_parser_declspecs): Likewise.
3849 (c_parser_alignas_specifier): Likewise.
3850 (c_parser_alignof_expression): Likewise.
3851 (c_parser_generic_selection): Likewise.
3852 * c-tree.h (pedwarn_c99): Update declaration.
3853 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3856 2014-08-19 Marek Polacek <polacek@redhat.com>
3858 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3860 * c-errors.c: Include "opts.h".
3861 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3862 * c-parser.c (disable_extension_diagnostics): Handle negative value
3863 of warn_c90_c99_compat, too.
3864 (restore_extension_diagnostics): Likewise.
3865 (c_parser_compound_statement_nostart): Pass
3866 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3868 2014-08-12 Marek Polacek <polacek@redhat.com>
3870 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3872 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3874 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3876 2014-08-10 Marek Polacek <polacek@redhat.com>
3879 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3880 Call pedwarn_c90 instead of pedwarn.
3881 (check_bitfield_type_and_width): Likewise.
3882 (declspecs_add_qual): Likewise.
3883 (declspecs_add_type): Likewise.
3884 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3885 Adjust to only call pedwarn_c90.
3886 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
3887 pedwarn_c90 instead of pedwarn.
3888 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3889 * c-parser.c (disable_extension_diagnostics): Handle
3890 warn_c90_c99_compat.
3891 (restore_extension_diagnostics): Likewise.
3892 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
3893 pedwarn_c90 instead of pedwarn.
3894 (c_parser_initelt): Likewise.
3895 (c_parser_postfix_expression): Likewise.
3896 (c_parser_postfix_expression_after_paren_type): Likewise.
3897 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3898 * c-tree.h: Fix formatting.
3899 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
3900 pedwarn_c90 instead of pedwarn.
3902 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
3904 * c-typeck.c: Remove include of pointer-set.h.
3906 2014-08-07 Marek Polacek <polacek@redhat.com>
3908 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3910 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3912 * c-typeck.c: Use hash_map instead of pointer_map.
3914 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3916 * c-decl.c: Use hash_set instead of pointer_set.
3918 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
3921 * c-array-notation.c (expand_array_notations): Handling
3924 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
3927 * c-typeck.c (c_finish_return): Return 0 instead of the address of
3930 2014-07-30 Tom Tromey <tromey@redhat.com>
3932 * c-typeck.c (struct constructor_stack) <designator_depth>: New
3934 (really_start_incremental_init, push_init_level): Initialize
3936 (pop_init_level): Set global designator_depth.
3937 (process_init_element): Check for designated_init attribute.
3939 2014-07-20 Marek Polacek <polacek@redhat.com>
3942 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
3943 (implicitly_declare): Pass location to implicit_decl_warning.
3945 2014-07-14 Jakub Jelinek <jakub@redhat.com>
3948 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
3949 If non-NULL, call c_parser_check_literal_zero.
3950 (c_parser_check_literal_zero): New function.
3951 (c_parser_postfix_expression_after_primary): Adjust
3952 c_parser_expr_list caller, handle -Wmemset-transposed-args.
3954 2014-07-06 Marek Polacek <polacek@redhat.com>
3957 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
3958 * c-tree.h (C_ARRAY_PARAMETER): Define.
3959 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
3962 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
3963 Chen Gang <gang.chen.5i5j@gmail.com>
3965 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
3968 2014-07-01 Marek Polacek <polacek@redhat.com>
3970 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
3971 instead of 0 to WARN_FOR_ASSIGNMENT.
3973 2014-07-01 Marek Polacek <polacek@redhat.com>
3976 * c-typeck.c (convert_for_assignment): Pass
3977 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
3979 2014-06-30 Marek Polacek <polacek@redhat.com>
3981 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
3982 has no_sanitize_undefined attribute.
3984 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
3987 * c-array-notation.c (fix_builtin_array_notation_fn):
3988 Check for 0 arguments in builtin call. Check that bultin argument is
3990 * c-parser.c (c_parser_array_notation): Check for incorrect initial
3993 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
3995 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3996 qualifiers in __auto_type for atomic types.
3997 (c_parser_typeof_specifier): Discard all type qualifiers in
3998 __typeof__ for atomic types.
4000 2014-06-25 Marek Polacek <polacek@redhat.com>
4003 * c-parser.c (c_parser_statement_after_labels): Pass the location of
4004 the return expression to c_finish_return.
4006 2014-06-25 Jakub Jelinek <jakub@redhat.com>
4008 * c-typeck.c (c_finish_omp_clauses): Make sure
4009 OMP_CLAUSE_LINEAR_STEP has correct type.
4011 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
4015 2014-06-24 Jakub Jelinek <jakub@redhat.com>
4017 * c-parser.c (c_parser_omp_for_loop): For
4018 #pragma omp parallel for simd move lastprivate clause from parallel
4019 to for rather than simd.
4021 2014-06-23 Marek Polacek <polacek@redhat.com>
4023 * c-typeck.c (parser_build_binary_op): Don't call
4024 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
4026 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
4028 * c-parser.c (c_parser_omp_threadprivate): Likewise.
4029 * c-decl.c (merge_decls): Likewise.
4031 2014-06-09 Marek Polacek <polacek@redhat.com>
4034 * c-typeck.c (error_init): Call inform instead of error_at.
4035 (pedwarn_init): Call inform instead of pedwarn.
4036 (warning_init): Call inform instead of warning_at.
4038 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
4040 * c-decl.c (merge_decls): Use set_decl_section_name.
4041 (duplicate_decls): Remove node if it exists.
4043 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4046 * c-typeck.c (push_init_level, process_init_element,
4047 pop_init_level): Correct check for zero initialization, move
4048 missing brace warning to respect zero initialization.
4050 2014-06-05 Marek Polacek <polacek@redhat.com>
4053 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4055 2014-06-05 Marek Polacek <polacek@redhat.com>
4058 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4059 on the left hand side operand of a comparison.
4061 2014-06-05 Marek Polacek <polacek@redhat.com>
4064 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4065 Print note only if the warning was printed.
4067 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4070 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4073 2014-06-03 Marek Polacek <polacek@redhat.com>
4076 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4078 * c-tree.h (c_start_case): Update.
4079 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4080 switch condition has boolean value.
4082 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
4084 * c-decl.c: Include builtins.h.
4085 * c-parser.c: Likewise.
4087 2014-05-27 Marek Polacek <polacek@redhat.com>
4090 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4091 error and warning calls to error_at and warning_at. Pass location of
4092 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4093 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4094 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4096 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4099 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4100 function parameters.
4102 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
4104 * c-decl.c (merge_decls): Preserve symtab node pointers.
4105 (duplicate_decls): Free new decl.
4107 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4109 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4112 * c-parser.c (c_parser_omp_target): Return bool values.
4114 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4116 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4117 num_teams_loc variable to num_thread_limit_loc.
4119 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4121 * c-array-notation.c (expand_array_notations): Use void_node
4122 instead of void_zero_node.
4124 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4126 * c-decl.c (finish_struct): Adjust.
4127 (finish_enum): Likewise.
4129 (record_inline_static): Likewise.
4130 (push_scope): Likewise.
4131 (make_label): Likewise.
4132 (lookup_label_for_goto): Likewise.
4133 (finish_struct): Likewise.
4134 (finish_enum): Likewise.
4135 (store_parm_decls): Likewise.
4136 (c_push_function_context): Likewise.
4137 * c-lang.h: Remove usage of variable_size gty attribute.
4138 * c-parser.c (c_parse_init): Adjust.
4139 (c_parse_file): Likewise.
4141 2014-05-13 Marek Polacek <polacek@redhat.com>
4144 * c-typeck.c (convert_for_assignment): Pass location to
4145 WARN_FOR_ASSIGNMENT instead of input_location.
4147 2014-05-10 Marek Polacek <polacek@redhat.com>
4149 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4150 maybe_warn_string_init.
4151 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4152 maybe_warn_string_init.
4153 * c-tree.h (maybe_warn_string_init): Update declaration.
4154 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4155 Call pedwarn_init with loc instead of with input_location.
4156 (digest_init): Pass init_loc to maybe_warn_string_init.
4157 (pop_init_level): Call pedwarn_init with loc instead of with
4159 (set_init_index): Likewise.
4160 (process_init_element): Likewise.
4162 2014-05-09 Marek Polacek <polacek@redhat.com>
4165 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4166 (c_parser_initelt): Pass location to set_init_label. Pass array index
4167 location to set_init_index.
4168 * c-tree.h (push_init_level): Update declaration.
4169 (pop_init_level): Likewise.
4170 (set_init_index): Likewise.
4171 (set_init_label): Likewise.
4172 * c-typeck.c (error_init): Add location parameter. Call error_at
4174 (digest_init): Pass init_loc to error_init.
4175 (really_start_incremental_init):
4176 (push_init_level): Add location parameter. Pass loc to pop_init_level
4178 (pop_init_level): Likewise.
4179 (set_designator): Add location parameter. Pass loc to pop_init_level,
4180 push_init_level, and error_init.
4181 (set_init_index): Add location parameter. Pass loc to error_init and
4183 (set_init_label): Likewise.
4184 (output_init_element): Pass loc to error_init.
4185 (process_init_element): Pass loc to error_init, pop_init_level,
4186 pedwarn_init, and push_init_level.
4188 2014-05-09 Marek Polacek <polacek@redhat.com>
4191 * c-parser.c (c_parser_attributes): Parse the arguments as an
4192 expression-list if the attribute takes identifier.
4194 2014-05-08 Marek Polacek <polacek@redhat.com>
4197 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4200 2014-05-08 Marek Polacek <polacek@redhat.com>
4203 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4206 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4207 Mike Stump <mikestump@comcast.net>
4208 Richard Sandiford <rdsandiford@googlemail.com>
4210 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4211 (finish_enum): Use wide-int interfaces.
4212 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4213 * c-typeck.c (build_c_cast): Likewise.
4214 (set_nonincremental_init_from_string): Likewise.
4215 (c_tree_equal): Likewise.
4217 2014-05-02 Marek Polacek <polacek@redhat.com>
4220 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4221 Return size_one_node when the type is not complete.
4222 (pointer_diff): Remove comment.
4223 (build_unary_op): Improve error messages.
4225 2014-05-02 Marek Polacek <polacek@redhat.com>
4227 * c-typeck.c (c_finish_return): Separate warning_at calls.
4229 2014-05-02 Marek Polacek <polacek@redhat.com>
4231 * c-tree.h (error_init): Remove declaration.
4232 (pedwarn_init): Likewise.
4233 * c-typeck.c (error_init): Make static and move above.
4234 (pedwarn_init): Likewise.
4235 (warning_init): Move above.
4236 (maybe_warn_string_init): Likewise.
4238 2014-05-01 Jeff Law <law@redhat.com>
4242 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4243 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4246 2014-05-02 Marek Polacek <polacek@redhat.com>
4249 * c-typeck.c (push_init_level): Set constructor_designated to
4250 p->designated for structures.
4252 2014-05-01 Marek Polacek <polacek@redhat.com>
4255 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4256 function-definition has an attribute after the declarator.
4258 2014-05-01 Marek Polacek <polacek@redhat.com>
4261 * c-typeck.c (warning_init): Add location_t parameter. Call
4262 warning_at instead of warning.
4263 (push_init_level): Pass input_location to warning_init.
4264 (add_pending_init): Add location_t parameter. Pass loc to
4266 (set_nonincremental_init): Pass input_location to add_pending_init.
4267 (set_nonincremental_init_from_string): Likewise.
4268 (output_init_element): Pass loc to warning_init and to
4271 2014-05-01 Marek Polacek <polacek@redhat.com>
4274 * c-typeck.c (c_finish_return): Distinguish between label and variable
4275 when warning about returning local address.
4277 2014-05-01 Marek Polacek <polacek@redhat.com>
4280 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4283 2014-05-01 Marek Polacek <polacek@redhat.com>
4286 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4287 instead of 0 to WARN_FOR_QUALIFIERS.
4289 2014-05-01 Marek Polacek <polacek@redhat.com>
4292 * c-typeck.c (default_conversion): Use better location for
4295 2014-04-30 Marek Polacek <polacek@redhat.com>
4297 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4298 also when SANITIZE_FLOAT_DIVIDE is on.
4300 2014-04-30 Marek Polacek <polacek@redhat.com>
4303 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4304 and pedwarn_init. Use loc insted of input_location.
4306 2014-04-30 Marek Polacek <polacek@redhat.com>
4309 * c-typeck.c (build_binary_op): Use location when warning about
4312 2014-04-25 Marek Polacek <polacek@redhat.com>
4315 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4316 always_inline/noinline and hot/cold attributes.
4318 2014-04-25 Marek Polacek <polacek@redhat.com>
4321 * c-parser.c (c_parser_initelt): Pass input_location to
4322 process_init_element.
4323 (c_parser_initval): Pass loc to process_init_element.
4324 * c-tree.h (process_init_element): Adjust declaration.
4325 * c-typeck.c (push_init_level): Pass input_location to
4326 process_init_element.
4327 (pop_init_level): Likewise.
4328 (set_designator): Likewise.
4329 (output_init_element): Add location_t parameter. Pass loc to
4331 (output_pending_init_elements): Pass input_location to
4332 output_init_element.
4333 (process_init_element): Add location_t parameter. Pass loc to
4334 output_init_element.
4336 2014-04-24 Jakub Jelinek <jakub@redhat.com>
4338 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4339 atomic-clause, allow comma in between atomic-clause and
4342 2014-04-22 Jakub Jelinek <jakub@redhat.com>
4345 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4346 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4348 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4351 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4352 create_tmp_var instead build_decl for creating temps.
4353 (build_array_notation_expr): Likewise.
4354 (fix_conditional_array_notations_1): Likewise.
4355 (fix_array_notation_expr): Likewise.
4356 (fix_array_notation_call_expr): Likewise.
4358 2014-03-28 Jakub Jelinek <jakub@redhat.com>
4361 * c-tree.h (c_build_function_call_vec): New prototype.
4362 * c-typeck.c (build_function_call_vec): Don't call
4363 resolve_overloaded_builtin here.
4364 (c_build_function_call_vec): New wrapper function around
4365 build_function_call_vec. Call resolve_overloaded_builtin here.
4366 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4367 Call c_build_function_call_vec instead of build_function_call_vec.
4368 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4369 * c-decl.c (finish_decl): Likewise.
4371 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4374 * c-typeck.c: Use correct format string in cast-qual warning
4376 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4378 * c-decl.c (c_decl_attributes): Use
4379 lang_hooks.types.omp_mappable_type.
4380 * c-typeck.c (c_finish_omp_clauses): Likewise.
4382 2014-03-06 Marek Polacek <polacek@redhat.com>
4385 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4386 of checking tree code.
4388 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4390 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4391 (c_parser_parameter_declaration): Likewise.
4393 2014-02-19 Marek Polacek <polacek@redhat.com>
4396 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4397 Call mark_exp_read on exp.value.
4398 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4399 TREE_ADDRESSABLE on old instead of val.
4400 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4402 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4404 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4405 C_EXPR_APPEND by vec_safe_push.
4406 * c-tree.h (C_EXPR_APPEND): Remove.
4408 2014-01-31 Marek Polacek <polacek@redhat.com>
4411 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4412 build_function_call_vec.
4413 (build_function_call): Likewise.
4414 (build_atomic_assign): Likewise.
4415 (build_function_call_vec): Add arg_loc parameter. Use it.
4416 (convert_arguments): Likewise.
4417 (convert_for_assignment): Rename rhs_loc to expr_loc.
4418 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4419 (c_parser_objc_keywordexpr): Likewise.
4420 (c_parser_postfix_expression_after_primary): Call
4421 build_function_call_vec with expr_loc rather than op_loc.
4422 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4423 build_function_call_vec.
4424 (c_parser_expr_list): Add locations parameter. Fill it with locations
4425 of function arguments.
4426 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4428 2014-01-30 Marek Polacek <polacek@redhat.com>
4431 * c-typeck.c (build_function_call_vec): Use loc parameter.
4432 (convert_arguments): Add location parameter. Use it.
4433 (ep_convert_and_check): Likewise.
4434 (build_atomic_assign): Adjust convert_for_assignment call.
4435 (build_modify_expr): Likewise.
4436 (digest_init): Likewise.
4437 (c_finish_return): Likewise.
4438 (build_conditional_expr): Adjust ep_convert_and_check calls.
4439 (convert_for_assignment): Add rhs_loc parameter. Use it.
4440 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4443 2014-01-30 Richard Biener <rguenther@suse.de>
4446 * c-typeck.c (build_function_call_vec): Do not replace calls
4447 to a function via an incompatible type with a runtime abort.
4449 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4451 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4452 flag_enable_cilkplus with flag_cilkplus.
4453 (c_parser_direct_declarator_inner): Likewise.
4454 (c_parser_attribute_any_word): Likewise.
4455 (c_parser_attributes): Likewise.
4456 (c_parser_compound_statement): Likewise.
4457 (c_parser_statement_after_labels): Likewise.
4458 (c_parser_if_statement): Likewise.
4459 (c_parser_switch_statement): Likewise.
4460 (c_parser_do_statement): Likewise.
4461 (c_parser_for_statement): Likewise.
4462 (c_parser_unary_expression): Likewise.
4463 (c_parser_postfix_expression): Likewise.
4464 (c_parser_postfix_expression_after_primary): Likewise.
4465 (c_parser_postfix_expression_after_primary): Likewise.
4466 (c_parser_omp_clause_name): Likewise.
4467 (c_finish_omp_declare_simd): Likewise.
4468 (c_parser_cilk_verify_simd): Likewise.
4469 * c-typeck.c (build_array_ref): Likewise.
4470 (build_function_call_vec): Likewise.
4471 (convert_arguments): Likewise.
4472 (build_compound_expr): Likewise.
4473 (c_finish_return): Likewise.
4474 (c_finish_if_stmt): Likewise.
4475 (c_finish_loop): Likewise.
4476 (build_binary_op): Likewise.
4478 2014-01-23 Marek Polacek <polacek@redhat.com>
4481 * c-typeck.c (parser_build_binary_op): Use location instead of
4483 (build_binary_op): Pass location to shorten_compare.
4485 2014-01-23 Marek Polacek <polacek@redhat.com>
4488 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4491 2014-01-23 Marek Polacek <polacek@redhat.com>
4494 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4495 of a comma expression.
4496 (emit_side_effect_warnings): Likewise.
4498 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4501 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4502 function to use walk_tree and moved a lot of its functionality to
4503 expand_array_notations.
4504 (expand_array_notations): New function.
4506 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4508 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4509 attribute an attribute without value.
4511 2014-01-23 Jakub Jelinek <jakub@redhat.com>
4514 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4515 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4517 2014-01-22 Marek Polacek <polacek@redhat.com>
4520 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4521 of remove_c_maybe_const_expr on op1 and op2.
4523 2014-01-15 Jakub Jelinek <jakub@redhat.com>
4526 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4527 effects, preevaluate rhs using SAVE_EXPR first.
4529 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4532 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4533 statements with if-elseif statements.
4535 2014-01-06 Marek Polacek <polacek@redhat.com>
4538 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4539 defined bit-field types only in ISO C.
4541 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4543 Update copyright years
4545 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4547 * c-array-notation.c: Use the standard form for the copyright notice.
4549 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4551 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4552 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4553 field in parser is not empty. If not-empty, call the function
4554 c_parser_finish_omp_declare_simd.
4555 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4556 between SIMD-enabled functions and #pragma simd. Added new parameter.
4557 (c_parser_cilk_all_clauses): Modified the usage of the function
4558 c_parser_cilk_clause_vectorlength as mentioned above.
4559 (c_parser_cilk_simd_fn_vector_attrs): New function.
4560 (c_finish_cilk_simd_fn_tokens): Likewise.
4561 (is_cilkplus_vector_p): Likewise.
4562 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4563 "nomask," and "mask" strings in clause name.
4564 (c_parser_omp_all_clauses): Added 3 new case statements:
4565 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4566 PRAGMA_CILK_CLAUSE_NOMASK.
4567 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4568 check for vector attribute and if so call the function
4569 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4570 called the function c_finish_cilk_simd_fn_tokens.
4571 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4572 parser field is non-empty. If so, parse them as you would parse
4573 the omp declare simd pragma.
4574 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4575 Added a check when step is a parameter and flag it as error.
4576 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4577 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4580 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4582 * c-parser.c (c_parser_omp_parallel): Fix description.
4584 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4586 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4587 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4588 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4589 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4591 2013-12-04 Joseph Myers <joseph@codesourcery.com>
4594 * c-parser.c (c_parser_alignas_specifier): Use
4595 c_sizeof_or_alignof_type instead of c_alignof.
4596 (c_parser_alignof_expression): Likewise, with min_alignof
4597 parameter depending on alignof spelling used.
4599 2013-12-04 Marek Polacek <polacek@redhat.com>
4602 * c-decl.c (start_function): Don't warn for missing prototype for
4605 2013-12-03 Marek Polacek <polacek@redhat.com>
4608 * c-decl.c (build_compound_literal): Allow compound literals with
4609 empty initial value.
4611 2013-12-02 Joseph Myers <joseph@codesourcery.com>
4614 * c-typeck.c (build_modify_expr): Diagnose assignment to
4615 expression with array type.
4617 2013-11-29 Joseph Myers <joseph@codesourcery.com>
4620 * c-typeck.c (process_init_element): Do not treat a string as
4621 initializing a whole array when used with a designator for an
4624 2013-11-29 Joseph Myers <joseph@codesourcery.com>
4627 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4628 an inline function following a static declaration.
4630 2013-11-28 Jakub Jelinek <jakub@redhat.com>
4633 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4634 to p_name before calling c_parser_omp_teams instead of after.
4635 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4636 argument. Remove unused p_name variable.
4638 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
4639 Jakub Jelinek <jakub@redhat.com>
4641 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4642 external_scope is NULL.
4644 2013-11-27 Tom de Vries <tom@codesourcery.com>
4645 Marc Glisse <marc.glisse@inria.fr>
4648 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4650 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
4652 * c-typeck.c: Add required include files from gimple.h.
4654 2013-11-22 David Malcolm <dmalcolm@redhat.com>
4656 * c-decl.c (define_label, shadow_tag_warned)
4657 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4658 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4659 (declspecs_add_type): Remove use of in_system_header macro.
4660 * c-parser.c (c_parser_unary_expression): Likewise.
4661 * c-typeck.c (store_init_value, process_init_element)
4662 (c_start_case): Likewise.
4664 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4667 * c-parser.c (c_parser_set_source_position_from_token): Remove
4668 reference to in_system_header from comment.
4670 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4672 * c-decl.c (grokdeclarator): Update comment to refer to
4673 tree_to_[su]hwi rather than tree_low_cst.
4675 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4677 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4678 tree_to_uhwi throughout.
4680 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4682 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4685 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4687 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4690 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
4692 * c-parser.c (c_parser_cilk_simd): New.
4693 (c_parser_cilk_verify_simd): New.
4694 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4695 (c_parser_omp_for_loop): Add case for NE_EXPR.
4696 Set c_break_label for CILK_SIMD.
4697 (c_parser_cilk_clause_vectorlength): New.
4698 (c_parser_cilk_clause_linear): New.
4699 (c_parser_cilk_clause_name): New.
4700 (c_parser_cilk_all_clauses): New.
4701 * c-typeck.c (build_unary_op): Pass location argument to
4703 (build_modify_expr): Same.
4704 (build_asm_expr): Same.
4705 (c_finish_bc_stmt): Error on break/continue in loops.
4707 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
4709 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4711 2013-11-14 Diego Novillo <dnovillo@google.com>
4713 * c-decl.c: Include print-tree.h.
4714 Include stor-layout.h.
4717 Include stringpool.h.
4718 * c-lang.c: Include fold-const.h.
4719 * c-parser.c: Include stringpool.h.
4721 Include stor-layout.h.
4723 Include trans-mem.h.
4724 * c-typeck.c: Include stor-layout.h.
4725 Include trans-mem.h.
4729 2013-11-13 Joseph Myers <joseph@codesourcery.com>
4731 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4732 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4734 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4735 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4737 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4738 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4739 (c_parser_declarator, c_parser_direct_declarator_inner)
4740 (c_parser_parameter_declaration, c_parser_type_name): All callers
4742 (c_parser_declaration_or_fndef): Handle declarations with type
4743 determined from the initializer.
4745 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
4747 * c-typeck.c: Include gimplify.h.
4749 2013-11-12 Joseph Myers <joseph@codesourcery.com>
4751 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4752 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4754 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4755 or _Thread_local as appropriate in diagnostics.
4756 (build_null_declspecs): Initialize ret->thread_gnu_p.
4757 (declspecs_add_scspec): Handle either __thread or _Thread_local
4758 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
4759 pedantic. Do not disallow _Thread_local extern and _Thread_local
4762 2013-11-07 Joseph Myers <joseph@codesourcery.com>
4763 Andrew MacLeod <amacleod@redhat.com>
4765 * c-aux-info.c (gen_type): Handle atomic qualifier.
4766 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4767 qualifiers when compating types.
4768 (shadow_tag_warned): Handle atomic_p in declspecs.
4769 (quals_from_declspecs): Likewise.
4770 (start_decl): Use c_type_promotes_to when promoting argument
4772 (grokdeclarator): Handle _Atomic.
4773 (get_parm_info): Diagnose any qualifier on "void" as only
4775 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4776 comparing types. Use c_type_promotes_to when promoting argument
4778 (finish_function): Use c_type_promotes_to when promoting argument
4780 (build_null_declspecs): Handle atomic_p in declspecs.
4781 (declspecs_add_qual): Handle RID_ATOMIC.
4782 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4783 (c_token_starts_declspecs): Handle RID_ATOMIC.
4784 (c_parser_declspecs): Handle atomic type specifiers and
4786 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4787 from types of expressions with atomic type.
4788 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4789 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4790 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4791 (c_parser_statement_after_labels, c_parser_switch_statement)
4792 (c_parser_for_statement, c_parser_expr_no_commas)
4793 (c_parser_conditional_expression, c_parser_binary_expression)
4794 (c_parser_cast_expression, c_parser_unary_expression)
4795 (c_parser_postfix_expression)
4796 (c_parser_postfix_expression_after_primary, c_parser_expression):
4797 Use convert_lvalue_to_rvalue.
4798 (c_parser_expression_conv, c_parser_expr_list): Document
4799 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4800 (c_parser_objc_synchronized_statement): Use
4801 convert_lvalue_to_rvalue.
4802 (c_parser_objc_selector): Handle RID_ATOMIC.
4803 (c_parser_objc_receiver, c_parser_array_notation): Use
4804 convert_lvalue_to_rvalue.
4805 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4806 _Atomic (type-name).
4807 (struct c_declspecs): Add atomic_p field.
4808 (convert_lvalue_to_rvalue): Declare.
4809 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4810 corresponding atomic types.
4811 (qualify_type): Don't add _Atomic qualifiers from second argument.
4812 (comp_target_types): Do not allow _Atomic mismatches.
4813 (type_lists_compatible_p): Do not remove atomic qualifiers when
4815 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4816 (build_atomic_assign): New functions.
4817 (build_unary_op): Use build_atomic_assign for atomic increment and
4819 (build_conditional_expr): Do not treat _Atomic void as a qualified
4821 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4822 (find_anonymous_field_with_type, convert_to_anonymous_field)
4823 (convert_for_assignment): Do not remove atomic qualifiers when
4825 (digest_init): Do not accept initialization of arrays of atomic
4826 elements by string constants.
4827 (build_asm_expr): Use convert_lvalue_to_rvalue.
4828 (build_binary_op): Do not treat _Atomic void as a qualified
4831 2013-11-06 DJ Delorie <dj@redhat.com>
4833 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4834 both explicit and builtin, print the location of the explicit one.
4836 2013-11-05 Tobias Burnus <burnus@net-b.de>
4838 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4839 c_parser_omp_distribute, c_parser_omp_teams,
4840 c_parser_omp_target, c_parser_omp_declare): Handle
4843 2013-11-03 Marek Polacek <polacek@redhat.com>
4845 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4847 2013-11-01 Jakub Jelinek <jakub@redhat.com>
4849 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4850 check_dup_generic at the end, unless remove is true.
4851 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4853 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4855 2013-10-31 Jakub Jelinek <jakub@redhat.com>
4857 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4858 with decl that is not pointer nor array.
4860 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4862 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4863 a spawning function is found.
4864 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4865 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4866 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4867 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4869 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4870 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4872 (c_finish_return): Added a check to reject _Cilk_spawn in return
4874 (build_cilk_spawn): New function.
4875 (build_cilk_sync): Likewise.
4876 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4878 2013-10-27 Tobias Burnus <burnus@net-b.de>
4881 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4882 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4883 (c_parser_statement_after_labels): Update calls.
4885 2013-10-24 Tobias Burnus <burnus@net-b.de>
4888 * c-parser.c (c_parser_pragma, c_parser_for_statement):
4889 Handle PRAGMA_IVDEP.
4890 (c_parser_statement_after_labels): Update call.
4892 2013-10-24 Marek Polacek <polacek@redhat.com>
4894 * c-parser.c (c_parser_struct_declaration): Add a comment.
4895 (c_parser_declarator): Don't allow _Alignas here.
4897 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
4899 * c-parser.c: Include omp-low.h.
4900 * c-typeck.c: Likewise.
4902 2013-10-17 Marek Polacek <polacek@redhat.com>
4905 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4906 Document syntax of the array-declarator.
4907 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4909 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4910 (c_parser_struct_declaration): Likewise.
4911 (c_parser_declarator): Likewise.
4912 (c_parser_direct_declarator_inner): Likewise.
4913 (c_parser_parameter_declaration): Likewise.
4914 (c_parser_type_name): Likewise.
4916 2013-10-11 Jakub Jelinek <jakub@redhat.com>
4918 * c-lang.h (current_omp_declare_target_attribute): New extern
4920 * c-parser.c: Include c-lang.h.
4921 (struct c_parser): Change tokens to c_token *.
4922 Add tokens_buf field. Change tokens_avail type to unsigned int.
4923 (c_parser_consume_token): If parser->tokens isn't
4924 &parser->tokens_buf[0], increment parser->tokens.
4925 (c_parser_consume_pragma): Likewise.
4926 (enum pragma_context): Add pragma_struct and pragma_param.
4927 (c_parser_external_declaration): Adjust
4928 c_parser_declaration_or_fndef caller.
4929 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4930 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4931 Adjust recursive call.
4932 (c_parser_struct_or_union_specifier): Use pragma_struct instead
4934 (c_parser_parameter_declaration): Use pragma_param instead of
4936 (c_parser_compound_statement_nostart, c_parser_label,
4937 c_parser_for_statement): Adjust
4938 c_parser_declaration_or_fndef callers.
4939 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
4940 it through to c_parser_conditional_expression.
4941 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
4942 pass it through to c_parser_binary_expression. Adjust recursive
4944 (c_parser_binary_expression): Remove prec argument, add
4945 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
4946 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
4947 binop matches it, use build2 instead of parser_build_binary_op.
4948 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
4949 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
4950 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
4951 Handle pragma_struct and pragma_param the same as pragma_external.
4952 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
4953 (c_parser_omp_variable_list): Parse array sections for
4954 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
4955 (c_parser_omp_clause_collapse): Fully fold collapse expression.
4956 (c_parser_omp_clause_reduction): Handle user defined reductions.
4957 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
4958 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
4959 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
4960 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
4961 c_parser_omp_clause_depend, c_parser_omp_clause_map,
4962 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
4963 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
4964 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
4965 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
4966 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
4967 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
4968 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
4969 (c_parser_omp_for_loop): Add CODE argument, pass it through
4970 to c_finish_omp_for. Change last argument to cclauses,
4971 and adjust uses to grab parallel clauses from the array of all
4972 the split clauses. Adjust c_parser_binary_expression,
4973 c_parser_declaration_or_fndef and c_finish_omp_for callers.
4974 (omp_split_clauses): New function.
4975 (c_parser_omp_simd): New function.
4976 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
4977 Allow the function to be called also when parsing combined constructs,
4978 and call c_parser_omp_simd when parsing for simd.
4979 (c_parser_omp_sections_scope): If section-sequence doesn't start with
4980 #pragma omp section, require exactly one structured-block instead of
4981 sequence of statements.
4982 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
4983 Allow the function to be called also when parsing combined constructs.
4984 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
4985 Allow the function to be called also when parsing combined
4987 (c_parser_omp_taskgroup, c_parser_omp_cancel,
4988 c_parser_omp_cancellation_point, c_parser_omp_distribute,
4989 c_parser_omp_teams, c_parser_omp_target_data,
4990 c_parser_omp_target_update, c_parser_omp_target,
4991 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
4992 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
4993 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
4994 (c_parser_omp_construct): Add p_name and mask vars. Handle
4995 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4996 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
4997 and c_parser_omp_sections callers.
4998 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4999 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
5000 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
5001 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
5002 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
5004 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
5005 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
5006 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
5007 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
5008 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
5009 * c-typeck.c: Include tree-inline.h.
5010 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
5011 handle_omp_array_sections_1, handle_omp_array_sections,
5012 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
5013 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
5014 user defined reductions.
5015 (c_tree_equal): New function.
5016 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
5017 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
5018 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
5019 c_check_omp_declare_reduction_r): New prototypes.
5020 * c-decl.c (current_omp_declare_target_attribute): New variable.
5021 (c_decl_attributes): New function.
5022 (start_decl, start_function): Use it instead of decl_attributes.
5023 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
5024 c_omp_reduction_decl, c_omp_reduction_lookup,
5025 c_check_omp_declare_reduction_r): New functions.
5027 2013-09-25 Tom Tromey <tromey@redhat.com>
5029 * Make-lang.in (c/gccspec.o): Remove.
5030 (CFLAGS-c/gccspec.o): New variable.
5031 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
5032 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
5033 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5035 2013-09-25 Tom Tromey <tromey@redhat.com>
5037 * Make-lang.in (c/gccspec.o): Don't use subshell.
5039 2013-09-18 Marek Polacek <polacek@redhat.com>
5042 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5043 Remove unnecessary check.
5045 2013-09-18 Marek Polacek <polacek@redhat.com>
5048 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5049 no_sanitize_undefined attribute.
5051 2013-09-13 Kai Tietz <ktietz@redhat.com>
5054 * c-decl.c (c_builtin_function_ext_scope): Remove
5055 wrong assumption that it is never called on prexisting
5058 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5060 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5062 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5064 * c-objc-common.c (c_tree_printer): Tidy.
5066 2013-08-30 Marek Polacek <polacek@redhat.com>
5068 * c-typeck.c (build_binary_op): Add division by zero and shift
5071 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
5072 Joseph Myers <joseph@codesourcery.com>
5075 * c-typeck.c (c_common_type): Prefer double_type_node over
5076 other REAL_TYPE types with the same precision.
5077 (convert_arguments): Likewise.
5079 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5081 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5082 (c_initialize_diagnostics): Call a destructor for the early printer.
5084 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5086 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5087 printer initialization.
5089 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
5092 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5093 check for truth values.
5094 (expand_array_notation_exprs): Added truth values case. Removed an
5095 unwanted else. Added for-loop to walk through subtrees in default
5098 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5100 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5102 2013-07-23 Joseph Myers <joseph@codesourcery.com>
5104 * c-parser.c (struct c_generic_association): Fix typo.
5106 2013-07-23 Tom Tromey <tromey@redhat.com>
5107 Joseph Myers <joseph@codesourcery.com>
5109 * c-parser.c (struct c_generic_association): New.
5110 (c_generic_association_d): New typedef.
5111 (c_parser_generic_selection): New function.
5112 (c_parser_postfix_expression): Handle RID_GENERIC.
5114 2013-07-13 Jason Merrill <jason@redhat.com>
5117 * c-decl.c (finish_struct): Check for too-large class.
5119 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
5122 * c-typeck.c (set_init_index): When folding, check for index overflow.
5124 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5126 * c-parser.c (c_parser_array_notation): Removed rejection of array
5127 notations in an array of function pointers.
5129 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5131 * c-array-notation.c (make_triplet_val_inv): New function.
5132 (create_cmp_incr): Likewise.
5133 (create_array_refs): Likewise.
5134 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5135 Also modularized common parts between functions and called the function.
5136 (build_array_notation_expr): Likewise.
5137 (fix_conditional_array_notations_1): Likewise.
5138 (fix_array_notation_expr): Likewise.
5139 (fix_array_notation_call_expr): Likewise.
5141 2013-06-18 Marek Polacek <polacek@redhat.com>
5144 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5146 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5148 * c-array-notation.c (build_array_notation_expr): Reject array notation
5149 mismatch between LHS and RHS even inside a call_expr. Also, removed
5150 a couple while statements that were dead code.
5152 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5154 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5155 excessive precision expressions in function parameters. Also removed
5156 couple unwanted while statements.
5158 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5160 * c-array-notation.c (expand_array_notation_exprs): Added
5161 ARRAY_NOTATION_REF case.
5163 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5165 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5166 function to c-family/array-notation-common.c.
5167 (is_cilkplus_reduce_builtin): Likewise.
5168 (find_rank): Likewise.
5169 (extract_array_notation_exprs): Likewise.
5170 (replace_array_notations): Likewise.
5171 (find_inv_trees): Likewise.
5172 (replace_inv_trees): Likewise.
5173 (contains_array_notation_expr): Likewise.
5174 (find_correct_array_notation_type): Likewise.
5175 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5176 (struct inv_list): Moved this to c-family/array-notation-common.c.
5177 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5179 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5181 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5182 reduction functions outside the for-loop. Added a check if the fundecl
5183 is non-NULL. Finally, removed an unwanted if-statement, and made the
5186 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5188 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5189 condition of the if-statement matches the rank of else-block and then-
5190 block when array notations are used.
5191 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5192 expression after the entire function body is parsed.
5193 (c_parser_expr_no_commas): Delayed creating array notation expressions
5194 to the end of function parsing.
5195 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5196 whole if-statement instead of just the condition.
5197 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5199 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5202 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5203 array to NULL_TREE if they are unused. Also added a check for the
5204 field to be NULL before its fields are used in future.
5206 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5209 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5210 (build_array_notation_expr): Likewise.
5212 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5214 * c-typeck.c (build_array_ref): Added a check to see if array's
5215 index is greater than one. If true, then emit an error.
5216 (build_function_call_vec): Exclude error reporting and checking
5217 for builtin array-notation functions.
5218 (convert_arguments): Likewise.
5219 (c_finish_return): Added a check for array notations as a return
5220 expression. If true, then emit an error.
5221 (c_finish_loop): Added a check for array notations in a loop
5222 condition. If true then emit an error.
5223 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5224 (build_binary_op): Added a check for array notation expr inside
5225 op1 and op0. If present, we call another function to find correct
5227 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5228 * c-parser.c (c_parser_compound_statement): Check if array
5229 notation code is used in tree, if so, then transform them into
5231 (c_parser_expr_no_commas): Check if array notation is used in LHS
5232 or RHS, if so, then build array notation expression instead of
5234 (c_parser_postfix_expression_after_primary): Added a check for
5235 colon(s) after square braces, if so then handle it like an array
5236 notation. Also, break up array notations in unary op if found.
5237 (c_parser_direct_declarator_inner): Added a check for array
5239 (c_parser_compound_statement): Added a check for array notation in
5240 a stmt. If one is present, then expand array notation expr.
5241 (c_parser_if_statement): Likewise.
5242 (c_parser_switch_statement): Added a check for array notations in
5243 a switch statement's condition. If true, then output an error.
5244 (c_parser_while_statement): Similarly, but for a while.
5245 (c_parser_do_statement): Similarly, but for a do-while.
5246 (c_parser_for_statement): Similarly, but for a for-loop.
5247 (c_parser_unary_expression): Check if array notation is used in a
5248 pre-increment or pre-decrement expression. If true, then expand
5250 (c_parser_array_notation): New function.
5251 * c-array-notation.c: New file.
5252 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5254 2013-05-23 Mike Stump <mikestump@comcast.net>
5256 * c-typeck.c (convert_for_assignment): Handle references to memory
5259 2013-05-16 Jason Merrill <jason@redhat.com>
5261 * Make-lang.in (cc1$(exeext)): Use link mutex.
5263 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5265 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5266 to simply use OPT_Wpointer_arith.
5267 (build_unary_op): Likewise.
5269 2013-04-03 Jakub Jelinek <jakub@redhat.com>
5272 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5273 argument. If set, or it temporarily for parsing of the first
5274 argument into force_folding_builtin_constant_p.
5275 (c_parser_postfix_expression): Adjust callers.
5277 2013-03-21 Richard Biener <rguenther@suse.de>
5279 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5280 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5282 2013-02-12 Marek Polacek <polacek@redhat.com>
5285 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5288 2013-01-24 Jakub Jelinek <jakub@redhat.com>
5291 * c-typeck.c (set_nonincremental_init_from_string): If
5292 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5294 (process_init_element): Likewise.
5296 2012-12-20 Jakub Jelinek <jakub@redhat.com>
5299 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5300 argument, don't call default_function_array_conversion
5301 nor c_fully_fold here.
5302 (c_parser_asm_statement): Adjust callers.
5303 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5304 and outputs here, and call default_function_array_conversion
5305 on inputs that don't need to be addressable.
5307 2012-12-18 Jakub Jelinek <jakub@redhat.com>
5310 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5311 warning require that both c_common_unsigned_type as well as
5312 c_common_signed_type is the same for both mvl and mvr types.
5314 2012-11-16 Diego Novillo <dnovillo@google.com>
5316 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5318 * c-common.c: Use new vec API in vec.h.
5319 * c-common.h: Likewise.
5320 * c-gimplify.c: Likewise.
5321 * c-pragma.c: Likewise.
5322 * c-pretty-print.c: Likewise.
5323 * c-pretty-print.h: Likewise.
5324 * c-semantics.c: Likewise.
5325 * c-decl.c: Likewise.
5326 * c-parser.c: Likewise.
5327 * c-tree.h: Likewise.
5328 * c-typeck.c: Likewise.
5330 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5333 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5335 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5338 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5339 shadows a function, unless the variable is a function or a
5340 pointer-to-function.
5342 2012-10-12 Jakub Jelinek <jakub@redhat.com>
5345 * c-parser.c (struct c_tree_loc_pair): Removed.
5346 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5347 add location_t * and tree * arguments, fill in array of 3
5348 sizeof_arg trees and corresponding locs.
5349 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5350 c_parser_expr_list callers.
5351 (c_parser_postfix_expression_after_primary): Likewise. Pass
5352 array of 3 sizeof_arg trees and locs (corresponding to first
5353 3 arguments) to sizeof_pointer_memaccess_warning.
5355 2012-10-09 Lawrence Crowl <crowl@google.com>
5357 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5358 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5361 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5364 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5367 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
5370 * c-typeck.c: Include c-common.h.
5371 (enum stv_conv): Moved to c-common.h.
5372 (scalar_to_vector): Moved to c-common.c.
5373 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5374 * Make-lang.in: c-typeck.c depends on c-common.h.
5376 2012-10-04 Arnaud Charlet <charlet@adacore.com>
5378 * c-decl.c (c_write_global_declarations): Fix handling of
5381 2012-09-30 Sharad Singhai <singhai@google.com>
5383 * c-decl.c (c_write_global_declarations): Use a different method
5384 to determine if the dump has ben initialized.
5386 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5389 * c-typeck.c (c_cast_expr): When casting to a type requiring
5390 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5393 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5396 * c-typeck.c (build_unary_op): Pass original argument of
5397 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5398 any C_MAYBE_CONST_EXPR, if it has integer operands.
5399 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5400 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5401 to c_objc_common_truthvalue_conversion, then remove any
5402 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5403 c_objc_common_truthvalue_conversion not
5404 c_common_truthvalue_conversion.
5405 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5406 call note_integer_operands for arguments with integer operands
5407 that are not integer constants.
5409 2012-09-13 Jakub Jelinek <jakub@redhat.com>
5412 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5413 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5415 2012-08-31 Jakub Jelinek <jakub@redhat.com>
5418 * c-convert.c (convert): Don't call fold_convert_loc if
5419 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5420 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5421 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5423 2012-08-24 Jakub Jelinek <jakub@redhat.com>
5426 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5427 for nested and empty_ok arguments in the call to
5428 c_parser_declaration_or_fndef.
5430 2012-08-17 Jakub Jelinek <jakub@redhat.com>
5432 * c-tree.h (c_last_sizeof_arg): Declare.
5433 * c-parser.c (struct c_tree_loc_pair): New type.
5434 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5436 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5437 (c_parser_postfix_expression_after_primary): Likewise. Call
5438 sizeof_pointer_memaccess_warning if needed.
5439 (sizeof_ptr_memacc_comptypes): New function.
5440 * c-typeck.c (c_last_sizeof_arg): New global variable.
5441 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5443 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
5445 * c-lang.h (lang_decl): Add variable_size GTY option.
5447 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5449 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5450 * Make-lang.in: Fix dependencies.
5452 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5454 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5455 and add language Makefile hooks.
5456 * config-lang.in: New file.
5457 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5458 add the required "normal" config-lang.in rules.
5459 * c-lang.h: Moved from gcc/ to here.
5460 * c-tree.h: Likewise.
5461 * c-objc-common.c: Likewise.
5462 * c-objc-common.h: Likewise.
5463 * c-typeck.c: Likewise.
5464 * c-convert.c: Likewise.
5465 * c-lang.c: Likewise.
5466 * c-aux-info.c: Likewise.
5467 * c-errors.c: Likewise.
5468 * gccspec.c: Likewise.
5469 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5470 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5472 Copyright (C) 2012-2018 Free Software Foundation, Inc.
5474 Copying and distribution of this file, with or without modification,
5475 are permitted in any medium without royalty provided the copyright
5476 notice and this notice are preserved.