1 2018-05-10 Jakub Jelinek <jakub@redhat.com>
4 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
5 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
7 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
8 fold_offsetof_1, pass argtype as TYPE to it and drop the
11 2018-05-02 David Pagan <dave.pagan@oracle.com>
14 * c-decl.c (old_style_parameter_scope): New function.
15 * c-parser.c (c_parser_postfix_expression): Check for statement
16 expressions in old-style function parameter list declarations.
17 * c-parser.h (old_style_parameter_scope): New extern declaration.
19 2018-04-25 Jakub Jelinek <jakub@redhat.com>
22 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
23 it is not TREE_STATIC.
24 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
25 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
26 its COMPOUND_LITERAL_EXPR_DECL.
28 2018-03-21 Joseph Myers <joseph@codesourcery.com>
30 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
31 where all functions return the same _FloatN or _FloatNx type,
32 treat integer types as _Float64 instead of double.
34 2018-03-21 Jakub Jelinek <jakub@redhat.com>
37 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
38 building vector comparison, diagnose it and return error_mark_node.
40 2018-03-15 Jakub Jelinek <jakub@redhat.com>
43 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
44 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
45 INTEGER_TYPE element type.
47 2018-03-13 David Pagan <dave.pagan@oracle.com>
50 * c-typeck.c (output_init_element): Ensure field initializer
51 expression is always evaluated if there are side effects.
53 2018-03-06 Jakub Jelinek <jakub@redhat.com>
56 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
57 !building_stmt_list_p ().
59 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
62 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
63 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
64 and include the BIND_EXPR in the list of things that need to be
67 2018-02-09 Nathan Sidwell <nathan@acm.org>
70 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
71 to strict_aliasing_warning.
73 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
75 * c-typeck.c (really_start_incremental_init, push_init_level,
76 set_nonincremental_init, output_init_element, process_init_element):
77 Use DECL_UNNAMED_BIT_FIELD.
79 2018-01-31 Marek Polacek <polacek@redhat.com>
82 * c-parser.c (c_parser_compound_statement_nostart): Call
83 expansion_point_location_if_in_system_header.
85 2018-01-17 David Malcolm <dmalcolm@redhat.com>
88 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
91 2018-01-13 Jakub Jelinek <jakub@redhat.com>
94 * c-tree.h (decl_constant_value_1): Add a bool argument.
95 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
96 returning a CONSTRUCTOR if it is true. Use error_operand_p.
97 (decl_constant_value): Adjust caller.
98 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
99 decl_constant_value_1 as IN_INIT. Otherwise, punt if
100 decl_constant_value returns initializer that has BLKmode or
102 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
104 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
105 Alan Hayward <alan.hayward@arm.com>
106 David Sherwood <david.sherwood@arm.com>
108 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
109 TYPE_VECTOR_SUBPARTS.
111 2018-01-03 Jakub Jelinek <jakub@redhat.com>
113 Update copyright years.
115 2018-01-01 Jakub Jelinek <jakub@redhat.com>
118 * c-parser.c (c_parser_braced_init, c_parser_initelt,
119 c_parser_conditional_expression, c_parser_cast_expression,
120 c_parser_sizeof_expression, c_parser_alignof_expression,
121 c_parser_postfix_expression, c_parser_omp_declare_reduction,
122 c_parser_transaction_expression): Use set_error () method instead
123 of setting value member to error_mark_node.
125 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
127 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
128 and _Float<N>X built-in functions.
130 2017-12-22 Jakub Jelinek <jakub@redhat.com>
133 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
134 TYPE_STUB_DECL and call rest_of_type_compilation before processing
135 incomplete vars rather than after it.
138 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
139 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
140 and consider empty ones if there are no other stmts. For
141 -Wunused-value walk all statements before the one only followed by
144 2017-12-22 Mike Stump <mikestump@comcast.net>
145 Eric Botcazou <ebotcazou@adacore.com>
147 * c-parser.c (c_parser_while_statement): Add unroll parameter and
148 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
149 (c_parser_do_statement): Likewise.
150 (c_parser_for_statement): Likewise.
151 (c_parser_statement_after_labels): Adjust calls to above.
152 (c_parse_pragma_ivdep): New static function.
153 (c_parser_pragma_unroll): Likewise.
154 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
155 <PRAGMA_UNROLL>: New case.
157 2017-12-19 Jakub Jelinek <jakub@redhat.com>
159 * c-typeck.c (comptypes_internal, function_types_compatible_p,
160 perform_integral_promotions, digest_init): Replace Yoda conditions
161 with typical order conditions.
162 * c-decl.c (check_bitfield_type_and_width): Likewise.
164 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
166 * c-typeck.c (c_safe_arg_type_equiv_p,
167 c_safe_function_type_cast_p): New function.
168 (build_c_cast): Implement -Wcast-function-type.
170 2017-12-14 Richard Biener <rguenther@suse.de>
173 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
174 like REALPART_EXPR for the behavior of whether its operand
177 2017-12-12 Marek Polacek <polacek@redhat.com>
180 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
182 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
184 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
185 * c-parser.c (add_debug_begin_stmt): New.
186 (c_parser_declaration_or_fndef): Call it.
187 (c_parser_compound_statement_nostart): Likewise.
188 (c_parser_statement_after_labels): Likewise.
189 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
191 2017-12-07 Joseph Myers <joseph@codesourcery.com>
193 * c-decl.c (build_compound_literal): Add parameter alignas_align
194 and set alignment of decl if nonzero.
195 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
196 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
198 (c_parser_struct_declaration): Update syntax comment.
199 (c_parser_type_name): Add alignas_ok argument and pass it to
201 (c_parser_cast_expression): Pass true to c_parser_type_name and
202 give error if a cast used an _Alignas specifier.
203 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
204 give error if sizeof (type-name) used an _Alignas specifier.
205 (c_parser_alignof_expression): Pass true to c_parser_type_name and
206 give error if _Alignof (type-name) used an _Alignas specifier.
207 (c_parser_postfix_expression_after_paren_type): Check specified
208 alignment for a compound literal and pass it to
209 build_compound_literal.
210 * c-parser.h (c_parser_type_name): Update prototype.
211 * c-tree.h (build_compound_literal): Update prototype.
213 2017-12-07 Martin Sebor <msebor@redhat.com>
216 * c-decl.c (c_decl_attributes): Look up existing declaration and
217 pass it to decl_attributes.
219 2017-12-06 David Malcolm <dmalcolm@redhat.com>
222 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
223 reserved for use by the implementation.
225 2017-12-06 David Malcolm <dmalcolm@redhat.com>
227 * c-decl.c: Include "c-family/c-spellcheck.h".
229 2017-12-05 Martin Liska <mliska@suse.cz>
230 Jakub Jelinek <jakub@redhat.com>
232 * c-typeck.c (pointer_diff): Add new argument and instrument
234 (build_binary_op): Similar for pointer comparison.
236 2017-12-01 Jakub Jelinek <jakub@redhat.com>
239 * c-parser.c: Include tree-iterator.h.
240 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
241 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
245 * c-tree.h (decl_constant_value_1): Declare.
246 * c-typeck.c (decl_constant_value_1): New function.
247 (decl_constant_value): Use it.
248 * c-fold.c (c_fully_fold_internal): If in_init, use
249 decl_constant_value_1 instead of decl_constant_value.
251 2017-11-30 Jakub Jelinek <jakub@redhat.com>
253 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
255 2017-11-28 Jakub Jelinek <jakub@redhat.com>
258 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
259 c_switch_covers_all_cases_p returns true.
261 2017-11-28 Julia Koval <julia.koval@intel.com>
262 Sebastian Peryt <sebastian.peryt@intel.com>
264 * Make-lang.in (c/c-array-notation.o): Remove.
265 * c-array-notation.c: Delete.
266 * c-decl.c: Remove cilkplus condition.
267 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
268 c_parser_cilk_verify_simd, c_parser_array_notation,
269 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
270 c_parser_cilk_simd_fn_vector_attrs,
271 c_finish_cilk_simd_fn_tokens): Delete.
272 (c_parser_declaration_or_fndef): Remove cilkplus condition.
273 (c_parser_direct_declarator_inner): Ditto.
274 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
275 (c_parser_attributes, c_parser_compound_statement,
276 c_parser_statement_after_labels, c_parser_if_statement,
277 c_parser_switch_statement, c_parser_while_statement,
278 c_parser_do_statement, c_parser_for_statement,
279 c_parser_unary_expression, c_parser_postfix_expression,
280 c_parser_postfix_expression_after_primary,
281 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
282 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
284 * c-typeck.c (build_array_ref, build_function_call_vec,
286 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
287 c_finish_loop, build_binary_op): Remove cilkplus support.
289 2017-11-28 Jakub Jelinek <jakub@redhat.com>
291 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
294 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
296 * Make-lang.in (c.install-plugin): Install backend import library.
298 2017-11-23 Jakub Jelinek <jakub@redhat.com>
300 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
303 2017-11-23 Mike Stump <mikestump@comcast.net>
304 Eric Botcazou <ebotcazou@adacore.com>
306 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
308 (c_parser_do_statement): Likewise.
309 (c_parser_for_statement): Likewise.
311 2017-11-22 David Malcolm <dmalcolm@redhat.com>
314 * c-objc-common.c (c_tree_printer): Convert penultimate param from
315 bool to bool *. Within '%T' handling, if showing an "aka", use
316 "quoted" param to add appropriate quoting.
318 2017-11-22 Marek Polacek <polacek@redhat.com>
323 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
325 2017-11-21 David Malcolm <dmalcolm@redhat.com>
328 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
329 earlier failed lookups.
331 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
333 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
334 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
336 2017-11-20 David Malcolm <dmalcolm@redhat.com>
339 * c-decl.c: Include "c-family/known-headers.h".
340 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
342 (class suggest_missing_header): Move to known-header.h.
343 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
344 than get_c_name_hint.
346 2017-11-20 David Malcolm <dmalcolm@redhat.com>
348 * c-decl.c (get_c_name_hint): New function.
349 (class suggest_missing_header): New class.
350 (lookup_name_fuzzy): Call get_c_name_hint and use it to
351 suggest missing headers to the user.
353 2017-11-20 David Malcolm <dmalcolm@redhat.com>
355 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
356 Include "c-family/name-hint.h"
357 (implicit_decl_warning): Convert "hint" from
358 const char * to name_hint. Pass location to
359 lookup_name_fuzzy. Suppress any deferred diagnostic if the
360 warning was not printed.
361 (undeclared_variable): Likewise for "guessed_id".
362 (lookup_name_fuzzy): Convert return type from const char *
363 to name_hint. Add location_t param.
364 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
365 Include "c-family/name-hint.h"
366 (c_parser_declaration_or_fndef): Convert "hint" from
367 const char * to name_hint. Pass location to lookup_name_fuzzy.
368 (c_parser_parameter_declaration): Likewise.
370 2017-11-19 Jakub Jelinek <jakub@redhat.com>
374 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
376 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
377 handle_omp_array_sections): Likewise.
378 (digest_init): Don't call decl_constant_value_for_optimization.
379 * c-tree.h (decl_constant_value_for_optimization): Removed.
380 * c-fold.c (c_fold_array_ref): New function.
381 (c_fully_fold_internal): Add LVAL argument, propagate it through
382 recursive calls. For VAR_P call decl_constant_value and
383 unshare if not LVAL and either optimizing or IN_INIT. Remove
384 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
385 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
386 (c_fully_fold): Add LVAL argument, pass it through to
387 c_fully_fold_internal.
388 (decl_constant_value_for_optimization): Removed.
390 2017-11-15 Joseph Myers <joseph@codesourcery.com>
393 * c-parser.c (check_tgmath_function): New function.
394 (enum tgmath_parm_kind): New enum.
395 (c_parser_postfix_expression): Handle __builtin_tgmath.
397 2017-10-31 David Malcolm <dmalcolm@redhat.com>
399 * c-decl.c (implicit_decl_warning): Update for renaming of
400 pedwarn_at_rich_loc and warning_at_rich_loc.
401 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
402 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
403 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
404 (c_parser_struct_or_union_specifier): Likewise for renaming of
406 (c_parser_parameter_declaration): Likewise for renaming of
408 * c-typeck.c (build_component_ref): Likewise.
409 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
410 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
411 (set_init_label): Likewise for renaming of error_at_rich_loc.
413 2017-10-30 Richard Biener <rguenther@suse.de>
415 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
418 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
420 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
421 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
423 2017-10-25 David Malcolm <dmalcolm@redhat.com>
426 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
429 2017-10-25 Jakub Jelinek <jakub@redhat.com>
432 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
433 newdecl to corresponding __builtin_ if any.
435 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
438 * c-decl.c (diagnose_mismatched_decls): Use
439 OPT_Wbuiltin_declaration_mismatch.
441 2017-10-12 David Malcolm <dmalcolm@redhat.com>
443 * c-parser.c (c_parser_require): Add "type_is_unique" param and
444 use it to guard calls to maybe_suggest_missing_token_insertion.
445 (c_parser_parms_list_declarator): Override default value of new
446 "type_is_unique" param to c_parser_require.
447 (c_parser_asm_statement): Likewise.
448 * c-parser.h (c_parser_require): Add "type_is_unique" param,
451 2017-10-11 Nathan Sidwell <nathan@acm.org>
453 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
455 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
457 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
458 operating on trees as wide_ints.
459 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
460 (c_tree_equal): Likewise.
462 2017-10-04 David Malcolm <dmalcolm@redhat.com>
464 * c-decl.c (push_parm_decl): Store c_parm's location into the
466 (build_c_parm): Add "loc" param and store it within the c_parm.
467 * c-parser.c (struct c_parser): Add "last_token_location" field.
468 (c_parser_consume_token): Store location of the token into the
470 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
471 when handling a FUNCTION_DECL, if it doesn't already have them.
472 (c_parser_parameter_declaration): Generate a location for the
473 parameter, and pass it to the call to build_c_parm.
474 * c-tree.h (struct c_parm): Add field "loc".
475 (build_c_parm): Add location_t param.
476 * c-typeck.c (get_fndecl_argument_location): New function.
477 (inform_for_arg): New function.
478 (convert_for_assignment): Use inform_for_arg when dealing with
481 2017-09-29 Jakub Jelinek <jakub@redhat.com>
483 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
485 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
486 don't SET_DECL_C_BIT_FIELD here.
489 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
490 instead of trying to set just TREE_READONLY manually.
492 2017-09-16 Tom de Vries <tom@codesourcery.com>
495 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
498 2017-09-15 Joseph Myers <joseph@codesourcery.com>
501 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
503 (build_conditional_expr): For C11, generate result with excess
504 precision when one argument is an integer and the other is of a
505 type using excess precision.
507 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
509 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
511 2017-09-13 Marek Polacek <polacek@redhat.com>
514 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
515 than expr.original_type.
517 2017-09-12 Nathan Sidwell <nathan@acm.org>
519 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
520 resort_sorted_fields): Moved from c-family/c-common.c.
521 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
523 2017-09-01 Joseph Myers <joseph@codesourcery.com>
526 * c-typeck.c (build_atomic_assign): Handle argument with excess
527 precision. Ensure any EXCESS_PRECISION_EXPR is present in
528 argument passed to build_binary_op and convert_for_assignment but
529 not for call to c_fully_fold.
530 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
531 Ensure build_binary_op is called with argument with original
532 semantic type. Avoid calling c_fully_fold with an
533 EXCESS_PRECISION_EXPR from build_binary_op.
535 2017-09-01 Jakub Jelinek <jakub@redhat.com>
538 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
540 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
541 Alan Hayward <alan.hayward@arm.com>
542 David Sherwood <david.sherwood@arm.com>
544 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
545 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
546 m1 and m2 to the signed equivalent of a fixed-point
549 2017-08-24 David Malcolm <dmalcolm@redhat.com>
551 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
552 than CAN_HAVE_LOCATION_P when determining whether to use the
553 location_t value within "value".
555 2017-08-21 David Malcolm <dmalcolm@redhat.com>
557 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
558 rather than peeking the location of the first token.
559 * c-tree.h (c_expr::get_location): New method.
561 2017-08-21 David Malcolm <dmalcolm@redhat.com>
563 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
564 to check_function_arguments.
566 2017-08-18 Marek Polacek <polacek@redhat.com>
568 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
571 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
574 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
575 (check_bitfield_type_and_width): Don't allow bit-field with
576 warn_if_not_aligned type.
578 2017-08-14 Martin Sebor <msebor@redhat.com>
581 * c-objc-common.c (c_objc_common_init): Handle 'G'.
583 2017-08-11 Marek Polacek <polacek@redhat.com>
586 * c-decl.c (pushtag): Only print inform if the warning was printed.
587 (grokdeclarator): Likewise.
589 2017-08-10 David Malcolm <dmalcolm@redhat.com>
591 * c-parser.c (c_parser_error): Rename to...
592 (c_parser_error_richloc): ...this, making static, and adding
593 "richloc" parameter, passing it to the c_parse_error call,
594 rather than calling c_parser_set_source_position_from_token.
595 (c_parser_error): Reintroduce, reimplementing in terms of the
596 above, converting return type from void to bool.
597 (class token_pair): New class.
598 (struct matching_paren_traits): New struct.
599 (matching_parens): New typedef.
600 (struct matching_brace_traits): New struct.
601 (matching_braces): New typedef.
602 (get_matching_symbol): New function.
603 (c_parser_require): Add param MATCHING_LOCATION, using it to
604 highlight matching "opening" tokens for missing "closing" tokens.
605 (c_parser_skip_until_found): Likewise.
606 (c_parser_static_assert_declaration_no_semi): Convert explicit
607 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
608 class matching_parens, so that the pertinent open parenthesis is
609 highlighted when there are problems locating the close
611 (c_parser_struct_or_union_specifier): Likewise.
612 (c_parser_typeof_specifier): Likewise.
613 (c_parser_alignas_specifier): Likewise.
614 (c_parser_simple_asm_expr): Likewise.
615 (c_parser_braced_init): Likewise, for matching_braces.
616 (c_parser_paren_condition): Likewise, for matching_parens.
617 (c_parser_switch_statement): Likewise.
618 (c_parser_for_statement): Likewise.
619 (c_parser_asm_statement): Likewise.
620 (c_parser_asm_operands): Likewise.
621 (c_parser_cast_expression): Likewise.
622 (c_parser_sizeof_expression): Likewise.
623 (c_parser_alignof_expression): Likewise.
624 (c_parser_generic_selection): Likewise.
625 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
626 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
627 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
628 In case CPP_OPEN_PAREN, pass loc_open_paren to the
629 c_parser_skip_until_found call.
630 (c_parser_objc_class_definition): Use class matching_parens as
632 (c_parser_objc_method_decl): Likewise.
633 (c_parser_objc_try_catch_finally_statement): Likewise.
634 (c_parser_objc_synchronized_statement): Likewise.
635 (c_parser_objc_at_property_declaration): Likewise.
636 (c_parser_oacc_wait_list): Likewise.
637 (c_parser_omp_var_list_parens): Likewise.
638 (c_parser_omp_clause_collapse): Likewise.
639 (c_parser_omp_clause_default): Likewise.
640 (c_parser_omp_clause_if): Likewise.
641 (c_parser_omp_clause_num_threads): Likewise.
642 (c_parser_omp_clause_num_tasks): Likewise.
643 (c_parser_omp_clause_grainsize): Likewise.
644 (c_parser_omp_clause_priority): Likewise.
645 (c_parser_omp_clause_hint): Likewise.
646 (c_parser_omp_clause_defaultmap): Likewise.
647 (c_parser_oacc_single_int_clause): Likewise.
648 (c_parser_omp_clause_ordered): Likewise.
649 (c_parser_omp_clause_reduction): Likewise.
650 (c_parser_omp_clause_schedule): Likewise.
651 (c_parser_omp_clause_num_teams): Likewise.
652 (c_parser_omp_clause_thread_limit): Likewise.
653 (c_parser_omp_clause_aligned): Likewise.
654 (c_parser_omp_clause_linear): Likewise.
655 (c_parser_omp_clause_safelen): Likewise.
656 (c_parser_omp_clause_simdlen): Likewise.
657 (c_parser_omp_clause_depend): Likewise.
658 (c_parser_omp_clause_map): Likewise.
659 (c_parser_omp_clause_device): Likewise.
660 (c_parser_omp_clause_dist_schedule): Likewise.
661 (c_parser_omp_clause_proc_bind): Likewise.
662 (c_parser_omp_clause_uniform): Likewise.
663 (c_parser_omp_for_loop): Likewise.
664 (c_parser_cilk_clause_vectorlength): Likewise.
665 (c_parser_cilk_clause_linear): Likewise.
666 (c_parser_transaction_expression): Likewise.
667 * c-parser.h (c_parser_require): Add param matching_location with
668 default UNKNOWN_LOCATION.
669 (c_parser_error): Convert return type from void to bool.
670 (c_parser_skip_until_found): Add param matching_location with
671 default UNKNOWN_LOCATION.
673 2017-08-09 Marek Polacek <polacek@redhat.com>
675 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
676 * c-tree.h (build_external_ref): Update declaration.
677 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
678 (build_external_ref): Change the type of a parameter to bool.
679 (parser_build_binary_op): Use true/false instead of 1/0.
680 (pointer_diff): Likewise.
681 (build_modify_expr): Likewise.
682 (set_designator): Change the type of a parameter to bool.
683 (set_init_index): Use true/false instead of 1/0.
684 (set_init_label): Likewise.
685 (output_init_element): Change the type of a parameter to bool.
686 (output_pending_init_elements): Use true/false instead of 1/0.
687 (process_init_element): Likewise.
688 (build_binary_op): Change the type of a parameter to bool.
690 2017-08-09 Marek Polacek <polacek@redhat.com>
693 * c-typeck.c (pedwarn_init): Make the function take a variable list.
694 Call emit_diagnostic_valist instead of pedwarn.
695 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
696 Print the relevant types in diagnostics.
698 2017-08-09 Marek Polacek <polacek@redhat.com>
701 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
702 build_conditional_expr.
703 * c-parser.c (c_parser_conditional_expression): Create locations for
704 EXP1 and EXP2 from their source ranges. Pass the locations down to
705 build_conditional_expr.
706 * c-tree.h (build_conditional_expr): Update declaration.
707 * c-typeck.c (build_conditional_expr): Add location_t parameters.
708 For -Wsign-compare, also print the types.
710 2017-08-08 Martin Liska <mliska@suse.cz>
712 * c-convert.c: Include header files.
713 * c-typeck.c: Likewise.
715 2017-08-07 Martin Liska <mliska@suse.cz>
717 * c-parser.c (c_parser_attributes): Canonicalize name of an
720 2017-08-02 Marek Polacek <polacek@redhat.com>
723 * c-parser.c (c_parser_unary_expression): Use set_error.
727 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
728 warnings. Avoid walking MACRO_MAP_LOCATIONS.
730 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
731 Martin Liska <mliska@suse.cz>
733 * c-typeck.c (c_finish_goto_label): Build gimple predict
736 2017-07-31 Martin Liska <mliska@suse.cz>
739 * c-convert.c (convert): Guard condition with flag_sanitize_p
740 also with current_function_decl non-null equality.
741 * c-decl.c (grokdeclarator): Likewise.
742 * c-typeck.c (build_binary_op): Likewise.
744 2017-07-25 Marek Polacek <polacek@redhat.com>
746 * c-decl.c (grokfield): Remove local variable.
748 2017-07-25 Marek Polacek <polacek@redhat.com>
751 * c-parser.c (c_parser_else_body): Don't warn about multistatement
752 macro expansion if the body is in { }.
753 (c_parser_while_statement): Likewise.
754 (c_parser_for_statement): Likewise.
756 2017-07-18 Nathan Sidwell <nathan@acm.org>
758 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
760 2017-07-14 David Malcolm <dmalcolm@redhat.com>
762 * c-decl.c (implicitly_declare): When suggesting a missing
763 #include, provide a fix-it hint.
765 2017-07-06 David Malcolm <dmalcolm@redhat.com>
767 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
768 and call that instead.
769 * c-tree.h (selftest::run_c_tests): New decl.
771 2017-06-26 Marek Polacek <polacek@redhat.com>
774 * c-parser.c (c_parser_if_body): Set the location of the
775 body of the conditional after parsing all the labels. Call
776 warn_for_multistatement_macros.
777 (c_parser_else_body): Likewise.
778 (c_parser_switch_statement): Likewise.
779 (c_parser_while_statement): Likewise.
780 (c_parser_for_statement): Likewise.
781 (c_parser_statement): Add a default argument. Save the location
782 after labels have been parsed.
783 (c_parser_c99_block_statement): Likewise.
785 2017-06-19 Richard Biener <rguenther@suse.de>
787 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
788 negated _Literals to parse _Literal (int) -1.
790 2017-06-13 Martin Liska <mliska@suse.cz>
793 * c-convert.c (convert): Use sanitize_flags_p.
794 * c-decl.c (grokdeclarator): Likewise.
795 * c-typeck.c (convert_for_assignment): Likewise.
796 (c_finish_return): Likewise.
797 (build_binary_op): Likewise.
799 2017-06-08 Jakub Jelinek <jakub@redhat.com>
802 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
803 to sizetype before size_binop.
805 2017-06-07 Jakub Jelinek <jakub@redhat.com>
807 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
810 2017-06-06 Marek Polacek <polacek@redhat.com>
813 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
815 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
817 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
819 * c-parser.c (c_parser_binary_expression): Implement the
820 -Wsizeof_pointer_div warning.
821 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
822 from a parenthesized expression.
823 (c_parser_expr_list): Use c_last_sizeof_loc.
824 * c-tree.h (c_last_sizeof_loc): New external.
825 * c-typeck.c (c_last_sizeof_loc): New variable.
826 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
828 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
831 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
833 2017-05-30 David Malcolm <dmalcolm@redhat.com>
835 * c-objc-common.c (c_tree_printer): Gain bool and const char **
838 2017-05-24 Martin Sebor <msebor@redhat.com>
841 * c-fold.c (c_fully_fold_internal): Adjust.
842 * c-typeck.c (parser_build_unary_op): Adjust.
844 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
846 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
847 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
850 2017-05-23 Marek Polacek <polacek@redhat.com>
852 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
855 2017-05-22 Jakub Jelinek <jakub@redhat.com>
857 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
858 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
859 it returned invariant. Call tree_invariant_p unconditionally
860 afterwards to decide whether to return expr or op0.
862 2017-05-22 Nathan Sidwell <nathan@acm.org>
864 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
866 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
868 * c-parser.c (c_parser_omp_clause_default): Handle
869 "OMP_CLAUSE_DEFAULT_PRESENT".
871 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
873 * config-lang.in (gtfiles): Add c-family/c-format.c.
875 2017-05-18 Nathan Sidwell <nathan@acm.org>
877 * c-decl.c (pushdecl_top_level): Delete unused function.
879 2017-05-18 Marek Polacek <polacek@redhat.com>
881 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
882 (check_earlier_gotos): Likewise.
883 (define_label): Likewise.
884 (pending_xref_error): Likewise.
885 (smallest_type_quals_location): Likewise.
886 (grokdeclarator): Likewise.
887 (grokparms): Likewise.
888 (identifier_global_value): Likewise.
889 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
890 (find_init_member): Likewise.
892 2017-05-18 Marek Polacek <polacek@redhat.com>
894 * c-decl.c (start_decl): Use false/true instead of 0/1.
895 (grokdeclarator): Likewise.
896 (finish_struct): Likewise.
897 (start_function): Change the return type to bool. Use false/true
899 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
900 * c-tree.h (start_function): Update.
901 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
902 (set_designator): Change the return type to bool. Use false/true
905 2017-05-17 Marek Polacek <polacek@redhat.com>
907 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
908 * c-typeck.c: Likewise.
910 2017-05-17 Marek Polacek <polacek@redhat.com>
913 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
914 DECL_IGNORED_P even for non-static compound literals.
916 2017-05-17 Martin Liska <mliska@suse.cz>
918 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
919 use it instead of int type.
921 2017-05-17 Marek Polacek <polacek@redhat.com>
923 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
925 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
926 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
927 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
928 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
930 (c_parser_conditional_expression): Likewise.
931 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
932 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
933 (process_init_element): Likewise.
934 (build_binary_op): Likewise.
935 (handle_omp_array_sections_1): Likewise.
937 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
939 * c-parser.c (c_parser_omp_clause_num_gangs)
940 (c_parser_omp_clause_num_workers)
941 (c_parser_omp_clause_vector_length): Merge functions into...
942 (c_parser_oacc_single_int_clause): ... this new function. Adjust
945 2017-05-11 Nathan Sidwell <nathan@acm.org>
947 * gimple-parser.c: Don't #include tree-dump.h.
949 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
952 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
954 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
957 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
958 incorrect __MEM syntax.
960 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
963 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
966 2017-05-09 Nathan Sidwell <nathan@acm.org>
968 * c-tree.h (pushdecl): Declare.
970 2017-05-05 David Malcolm <dmalcolm@redhat.com>
972 * c-decl.c (warn_defaults_to): Replace report_diagnostic
973 with diagnostic_report_diagnostic.
974 * c-errors.c (pedwarn_c99): Likewise.
975 (pedwarn_c90): Likewise.
977 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
980 * c-gimplify.c (c_gimplify_expr): Remove calls to
981 cilk_gimplifY_call_params_in_spawned_fn.
983 2017-04-25 David Malcolm <dmalcolm@redhat.com>
985 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
986 hint for removing extra semicolon.
988 2017-04-21 Jakub Jelinek <jakub@redhat.com>
991 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
992 enabled, set specs->type to integer_type_node.
994 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
996 * c-array-notation.c: Fix typo in comment.
998 2017-03-29 Marek Polacek <polacek@redhat.com>
1001 * c-decl.c (finish_decl): Check VAR_P.
1003 2017-03-27 Jakub Jelinek <jakub@redhat.com>
1006 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
1007 * c-typeck.c (c_mark_addressable): Likewise. Look through
1008 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
1010 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
1012 2017-03-23 Marek Polacek <polacek@redhat.com>
1014 * c-tree.h: Remove a C_RID_YYCODE reference.
1016 2017-03-21 Jakub Jelinek <jakub@redhat.com>
1019 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
1020 optional COMPOUND_EXPR with ubsan instrumentation.
1022 2017-03-17 Marek Polacek <polacek@redhat.com>
1024 * c-parser.c: Add C11 references.
1026 2017-03-15 Marek Polacek <polacek@redhat.com>
1028 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
1030 2017-03-11 Marek Polacek <polacek@redhat.com>
1032 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
1034 2017-03-10 David Malcolm <dmalcolm@redhat.com>
1036 PR translation/79848
1037 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1039 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1041 2017-03-09 Marek Polacek <polacek@redhat.com>
1044 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1045 parameter declarations with initializers.
1047 2017-03-09 Jakub Jelinek <jakub@redhat.com>
1050 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1053 2017-03-07 Jakub Jelinek <jakub@redhat.com>
1056 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1057 for "may only be used in compound statements" diagnostics, change it
1058 such that the same translatable string is used for all pragmas. For
1059 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1061 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1062 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1063 "may only be used in compound statements" diagnostics, such that the
1064 same translatable string is used for all pragmas.
1066 2017-03-04 Marek Polacek <polacek@redhat.com>
1069 * c-decl.c (implicit_decl_warning): Add missing space.
1071 2017-03-03 Marek Polacek <polacek@redhat.com>
1074 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1075 current_function_prototype_arg_types is error_mark_node. Fix
1076 formatting. Use TREE_VALUE instead of TREE_TYPE.
1078 2017-03-03 Jakub Jelinek <jakub@redhat.com>
1081 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1082 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1083 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1087 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1088 instead of %<_Generic>.
1089 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1090 (c_parser_omp_target_exit_data): Use %<release%> instead of
1093 2017-02-28 Jakub Jelinek <jakub@redhat.com>
1095 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1096 instead of just cond ? "..." : "...".
1097 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1098 for "enter"/"exit" keyword.
1099 (c_finish_oacc_routine): Don't use %s to supply portions of the
1102 2017-02-24 Jakub Jelinek <jakub@redhat.com>
1105 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1106 handle -Wrestrict here.
1107 * c-typeck.c (build_function_call_vec): Adjust
1108 check_function_arguments caller.
1110 2017-02-23 Richard Biener <rguenther@suse.de>
1113 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1114 to initialize c_exprs to return.
1115 (c_parser_gimple_binary_expression): Likewise.
1116 (c_parser_gimple_unary_expression): Likewise.
1117 (c_parser_gimple_postfix_expression): Likewise.
1119 2017-02-22 Marek Polacek <polacek@redhat.com>
1122 * c-typeck.c (convert_arguments): Handle error_mark_node.
1124 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1126 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1127 value of c_parser_parse_ssa_name against error_mark_node and emit
1128 error if ssa name is anonymous and written as default definition.
1130 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1132 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1135 2017-02-16 Jakub Jelinek <jakub@redhat.com>
1138 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1139 ignore #pragma omp target even when not followed by identifier.
1141 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1143 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1144 (c_parser_gimple_unary_expression): Likewise.
1146 2017-02-13 Jakub Jelinek <jakub@redhat.com>
1148 * c-parser.c (c_parser_oacc_declare): Add missing space in
1151 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1154 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1155 set_c_expr_source_range when parsing ssa-name.
1157 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1158 Richard Biener <rguenther@suse.de>
1160 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1161 building IL when arguments are error_mark_node.
1162 (c_parser_gimple_unary_expression): Likewise.
1163 (c_parser_gimple_if_stmt): Likewise.
1164 (c_parser_gimple_switch_stmt): Likewise.
1165 (c_parser_gimple_return_stmt): Likewise.
1166 (c_parser_parse_ssa_name): When name lookup fails do not build
1167 an SSA name. Use undeclared rather than not declared in error
1170 2017-02-09 Marek Polacek <polacek@redhat.com>
1173 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1174 instead of c_parser_skip_until_found.
1176 2017-02-09 Jakub Jelinek <jakub@redhat.com>
1179 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1180 symtab_node::get on automatic variables.
1182 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1183 Chung-Lin Tang <cltang@codesourcery.com>
1185 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1186 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1188 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1190 2017-02-07 Richard Biener <rguenther@suse.de>
1192 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1193 (c_parser_gimple_postfix_expression_after_primary):
1194 Do not use c_build_function_call_vec to avoid folding and promotion.
1197 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1200 * c-decl.c (pop_scope): Pass main_input_filename to
1201 build_translation_unit_decl.
1203 2017-01-24 David Malcolm <dmalcolm@redhat.com>
1205 * c-parser.c: Include "read-rtl-function.h" and
1207 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1208 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1209 production. Update for renaming of field "gimple_pass" to
1210 "gimple_or_rtl_pass". If __RTL was seen, call
1211 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1212 to an auto_timevar, to cope with early exit.
1213 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1214 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1215 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1217 (c_parser_parse_rtl_body): New function.
1218 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1219 (struct c_declspecs): Rename field "gimple_pass" to
1220 "gimple_or_rtl_pass". Add field "rtl_p".
1221 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1222 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1223 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1224 (c_parser_gimple_or_rtl_pass_list): ...this.
1226 2017-01-20 Marek Polacek <polacek@redhat.com>
1229 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1231 2017-01-13 Richard Biener <rguenther@suse.de>
1233 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1236 2017-01-13 Richard Biener <rguenther@suse.de>
1238 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1239 _Literal ( type-name ) number.
1241 2017-01-12 Richard Biener <rguenther@suse.de>
1243 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1246 2017-01-11 Jakub Jelinek <jakub@redhat.com>
1249 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1252 2017-01-11 Richard Biener <rguenther@suse.de>
1255 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1256 returns on parse errors.
1258 2017-01-04 Marek Polacek <polacek@redhat.com>
1261 * c-parser.c (c_parser_postfix_expression): Mark zero character
1262 constants by setting original_type in c_expr.
1263 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1264 with a zero character constant.
1265 (char_type_p): New function.
1267 2017-01-04 David Malcolm <dmalcolm@redhat.com>
1269 * c-parser.c (c_parser_declaration_or_fndef): Create a
1270 rich_location at init_loc and parse it to start_init.
1271 (last_init_list_comma): New global.
1272 (c_parser_braced_init): Update last_init_list_comma when parsing
1273 commas. Pass it to pop_init_level. Pass location of closing
1274 brace to pop_init_level.
1275 (c_parser_postfix_expression_after_paren_type): Create a
1276 rich_location at type_loc and parse it to start_init.
1277 (c_parser_omp_declare_reduction): Likewise for loc.
1278 * c-tree.h (start_init): Add rich_location * param.
1279 (pop_init_level): Add location_t param.
1280 * c-typeck.c (struct initializer_stack): Add field
1281 "missing_brace_richloc".
1282 (start_init): Add richloc param, use it to initialize
1283 the stack node's missing_brace_richloc.
1284 (last_init_list_comma): New decl.
1285 (finish_implicit_inits): Pass last_init_list_comma to
1287 (push_init_level): When finding missing open braces, add fix-it
1288 hints to the richloc.
1289 (pop_init_level): Add "insert_before" param and pass it
1290 when calling pop_init_level. Add fixits about missing
1291 close braces to any richloc. Use the richloc for the
1292 -Wmissing-braces warning.
1293 (set_designator): Pass last_init_list_comma to pop_init_level.
1294 (process_init_element): Likewise.
1296 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1298 Update copyright years.
1300 2016-12-21 Jakub Jelinek <jakub@redhat.com>
1303 * c-typeck.c (build_function_call_vec): If check_function_arguments
1304 returns true, set TREE_NO_WARNING on CALL_EXPR.
1307 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1308 to *expr instead of overwriting it.
1310 2016-12-20 Richard Biener <rguenther@suse.de>
1312 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1314 (c_parser_gimple_statement): Only build assigns for non-error
1316 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1318 2016-12-14 Martin Jambor <mjambor@suse.cz>
1320 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1322 (c_finish_oacc_routine): Adjusted call to
1323 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1324 to use their new names.
1325 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1327 (c_parser_oacc_update): Likewise.
1328 (c_parser_omp_simd): Likewise.
1329 (c_parser_omp_target_update): Likewise.
1330 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1331 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1333 (c_finish_omp_cancellation_point): Likewise.
1334 * gimple-parser.c: Do not include omp-low.h
1336 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1337 James Norris <jnorris@codesourcery.com>
1339 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1340 EXIT_DATA,WAIT} are not used in compound statements.
1341 (c_parser_oacc_enter_exit_data): Update diagnostics.
1343 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1346 * c-decl.c (diagnose_mismatched_decls): Use
1347 OPT_Wbuiltin_declaration_mismatch here too.
1349 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
1350 Alan Hayward <alan.hayward@arm.com>
1351 David Sherwood <david.sherwood@arm.com>
1353 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1354 (make_label, finish_struct): Likewise.
1356 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
1357 Richard Biener <rguenther@suse.de>
1359 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1360 * config-lang.in (gtfiles): Add c/c-parser.h.
1361 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1362 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1363 * c-parser.c (enum c_id_kind, struct c_token,
1364 c_parser_next_token_is, c_parser_next_token_is_not,
1365 c_parser_next_token_is_keyword,
1366 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1368 * c-parser.h: ... new header.
1369 * c-parser.c: Include c-parser.h and gimple-parser.h.
1370 (c_parser_peek_token, c_parser_peek_2nd_token,
1371 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1372 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1373 c_parser_error, c_parser_require, c_parser_skip_until_found,
1374 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1375 c_parser_type_name): Export.
1376 (c_parser_tokens_buf): New function.
1377 (c_parser_error): Likewise.
1378 (c_parser_set_error): Likewise.
1379 (c_parser_declspecs): Handle RID_GIMPLE.
1380 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1381 via c_parser_parse_gimple_body.
1382 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1383 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1384 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1385 c_parser_error, c_parser_require, c_parser_skip_until_found,
1386 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1387 c_parser_type_name): Declare.
1388 (struct c_parser): Declare forward.
1389 (c_parser_tokens_buf): Declare.
1390 (c_parser_error): Likewise.
1391 (c_parser_set_error): Likewise.
1392 * gimple-parser.c: New file.
1393 * gimple-parser.h: Likewise.
1395 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1398 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1401 2016-09-11 Le-Chun Wu <lcwu@google.com>
1402 Mark Wielaard <mjw@redhat.com>
1404 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1405 to the given -Wshadow= variant.
1407 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1409 * c-typeck.c: Include memmodel.h.
1411 2016-10-13 Jakub Jelinek <jakub@redhat.com>
1414 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1415 instead of lhd_return_null_tree_v.
1417 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1420 * c-decl.c (smallest_type_quals_location): New static function.
1421 (grokdeclarator): Try to find the correct location for an ignored
1424 2016-09-26 Marek Polacek <polacek@redhat.com>
1427 * c-decl.c (pop_scope): Add gcc_fallthrough.
1429 2016-09-26 Marek Polacek <polacek@redhat.com>
1432 * c-parser.c (struct c_token): Add flags field.
1433 (c_lex_one_token): Pass it to c_lex_with_flags.
1434 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1435 into IFN_FALLTHROUGH.
1436 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1437 attribute fallthrough after a case label or default label.
1438 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1440 2016-09-24 Marek Polacek <polacek@redhat.com>
1443 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1444 have boolean value. Warn about ++/-- on booleans.
1446 2016-09-23 Jakub Jelinek <jakub@redhat.com>
1448 * c-parser.c (incomplete_record_decls): Remove unnecessary
1449 = vNULL initialization of file scope vec.
1451 2016-09-16 Marek Polacek <polacek@redhat.com>
1453 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1455 2016-09-14 Marek Polacek <polacek@redhat.com>
1457 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1458 (fix_array_notation_expr): Likewise.
1459 * c-decl.c (finish_decl): Likewise.
1460 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1461 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1462 (function_to_pointer_conversion): Use false instead of 0.
1463 (convert_lvalue_to_rvalue): Likewise.
1464 (parser_build_unary_op): Likewise.
1465 (build_atomic_assign): Likewise.
1466 (build_unary_op): Change nonconvert parameter type to bool, use
1467 true/false instead of 1/0.
1468 (build_binary_op): Use true instead of 1.
1470 2016-09-13 David Malcolm <dmalcolm@redhat.com>
1472 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1473 of add_fixit_insert to add_fixit_insert_before.
1475 2016-09-13 Marek Polacek <polacek@redhat.com>
1477 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1480 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1483 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1484 COMPOUND_EXPR to warn_for_omitted_condop.
1486 2016-09-07 David Malcolm <dmalcolm@redhat.com>
1488 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1489 c_get_substring_location for this new langhook.
1491 2016-09-02 Jakub Jelinek <jakub@redhat.com>
1494 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1496 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1497 instead of mark_exp_read on low_bound/length expression.
1498 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1499 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1500 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1501 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1502 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1503 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1504 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1505 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1506 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1507 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1508 instead of mark_expr_read.
1509 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1510 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1511 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1512 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1513 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1514 array section bases outside of depend clause, for depend clause
1515 use convert_lvalue_to_rvalue on the base.
1516 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1517 linear, aligned, map, to and from clauses.
1518 (c_omp_clause_copy_ctor): New function.
1520 2016-09-01 Marek Polacek <polacek@redhat.com>
1523 * c-typeck.c (composite_type): Add FALLTHRU comment.
1525 2016-08-31 David Malcolm <dmalcolm@redhat.com>
1527 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1528 to the insertion fixits for "struct", "union", and "enum".
1530 2016-08-30 David Malcolm <dmalcolm@redhat.com>
1532 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1533 rather than add_fixit_misspelled_id.
1534 (undeclared_variable): Likewise.
1535 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1536 now-redundant "here" params from add_fixit_insert method calls.
1537 (c_parser_parameter_declaration): Likewise.
1538 * c-typeck.c (build_component_ref): Remove now-redundant range
1539 param from add_fixit_replace method calls.
1541 2016-08-25 Marek Polacek <polacek@redhat.com>
1543 * c-typeck.c (parser_build_binary_op): Pass LHS to
1544 warn_logical_not_parentheses.
1546 2016-08-25 Marek Polacek <polacek@redhat.com>
1549 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1550 or _FloatN or _FloatNx is not supported.
1551 (finish_declspecs): Set type to integer_type_node when _FloatN or
1552 _FloatNx is not supported.
1554 2016-08-19 Joseph Myers <joseph@codesourcery.com>
1557 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1558 (struct c_declspecs): Add field floatn_nx_idx.
1559 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1560 and _FloatNx type specifiers.
1561 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1562 (c_parser_declspecs, c_parser_attribute_any_word)
1563 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1564 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1565 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1566 narrower than double.
1568 2016-08-12 Jakub Jelinek <jakub@redhat.com>
1569 Martin Liska <mliska@suse.cz>
1572 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1573 % to determine val element to change. Assert that
1574 wchar_bytes * charwidth fits into val array.
1576 2016-08-12 Marek Polacek <polacek@redhat.com>
1579 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1580 (c_parser_postfix_expression): Likewise.
1581 * c-typeck.c (build_unary_op): Adjust fall through comment.
1582 (c_mark_addressable): Likewise.
1584 2016-08-11 Jakub Jelinek <jakub@redhat.com>
1587 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1588 array member through typedef, for orig_qual_indirect == 0 clear
1591 2016-08-08 David Malcolm <dmalcolm@redhat.com>
1594 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1595 this up to selftest::run_c_tests.
1596 (selftest::run_c_tests): New function.
1598 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1600 * c-parser.c (struct oacc_routine_data): Add error_seen and
1601 fndecl_seen members.
1602 (c_finish_oacc_routine): Use these.
1603 (c_parser_declaration_or_fndef): Adjust.
1604 (c_parser_oacc_routine): Likewise. Support more C language
1605 constructs, and improve diagnostics. Move pragma context
1607 (c_parser_pragma): ... here.
1609 * c-parser.c (struct oacc_routine_data): New.
1610 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1612 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1613 declare target" attribute.
1615 2016-08-01 Jan Beulich <jbeulich@suse.com>
1617 * c-fold.c (c_fully_fold_internal): Also emit shift count
1618 warnings for vector types.
1619 * c-typeck.c (build_binary_op): Likewise.
1621 2016-07-29 Marek Polacek <polacek@redhat.com>
1624 * c-decl.c (finish_struct): Rephrase an error message.
1627 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1628 to error node for invalid code.
1631 * c-decl.c (implicitly_declare): Return decl early not only for
1632 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1634 2016-07-29 Jakub Jelinek <jakub@redhat.com>
1637 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1638 on GNU extern inline functions.
1640 2016-07-29 Marek Polacek <polacek@redhat.com>
1643 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1646 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
1648 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1650 2016-07-20 David Malcolm <dmalcolm@redhat.com>
1652 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1654 (best_macro_match): Likewise, converting from a typedef to a
1656 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1657 (lookup_name_fuzzy): Update for change of best_macro_match to a
1658 subclass with a ctor that calls cpp_forall_identifiers.
1660 2016-07-20 David Malcolm <dmalcolm@redhat.com>
1662 * c-decl.c (implicit_decl_warning): Update for conversion of
1663 return type of lookup_name_fuzzy to const char *.
1664 (undeclared_variable): Likewise.
1665 (lookup_name_fuzzy): Convert return type from tree to
1667 * c-parser.c (c_parser_declaration_or_fndef): Update for
1668 conversion of return type of lookup_name_fuzzy to const char *.
1669 (c_parser_parameter_declaration): Likewise.
1671 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1673 * c-parser.c (c_parser_oacc_declare): Don't scan for
1675 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1676 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1677 zero-length subarrays.
1679 2016-07-15 Jakub Jelinek <jakub@redhat.com>
1682 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1683 instead of FUZZY_LOOKUP_NAME.
1684 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1685 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1687 2016-07-14 Jakub Jelinek <jakub@redhat.com>
1690 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1692 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1694 * c-parser.c (c_parser_generic_selection): Make type of variable
1696 (c_parser_omp_declare_simd): Likewise.
1698 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1700 * c-decl.c (struct c_struct_parse_info): Change member types
1701 from vec to auto_vec.
1702 (start_struct): Adjust.
1703 (finish_struct): Likewise.
1705 2016-07-02 Jakub Jelinek <jakub@redhat.com>
1708 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1710 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1712 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1713 Move pragma context checking into...
1714 (c_parser_omp_cancellation_point): ... here, and improve
1715 diagnostic messages.
1716 * c-typeck.c (c_finish_omp_cancel)
1717 (c_finish_omp_cancellation_point): Improve diagnostic messages.
1719 2016-06-29 Jakub Jelinek <jakub@redhat.com>
1722 * c-typeck.c (c_build_qualified_type): Don't clear
1723 C_TYPE_INCOMPLETE_VARS for the main variant.
1725 2016-06-28 Martin Sebor <msebor@redhat.com>
1728 * c-typeck.c (output_init_element): Diagnose incompatible types
1729 before non-constant initializers.
1731 2016-06-28 Jakub Jelinek <jakub@redhat.com>
1733 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1735 2016-06-23 Andi Kleen <ak@linux.intel.com>
1737 * Make-lang.in: Add support for autofdo.
1739 2016-06-22 David Malcolm <dmalcolm@redhat.com>
1742 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1743 (implicit_decl_warning): When issuing warnings for implicit
1744 declarations, attempt to provide a suggestion via
1746 (undeclared_variable): Likewise when issuing errors.
1747 (lookup_name_in_scope): Likewise.
1748 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1749 (best_macro_match): New typedef.
1750 (find_closest_macro_cpp_cb): New function.
1751 (lookup_name_fuzzy): New function.
1752 * c-parser.c: Include gcc-rich-location.h.
1753 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1754 (c_keyword_starts_typename): ...this new function.
1755 (c_parser_declaration_or_fndef): When issuing errors about
1756 missing "struct" etc, add a fixit. For other kinds of errors,
1757 attempt to provide a suggestion via lookup_name_fuzzy.
1758 (c_parser_parms_declarator): When looking ahead to detect typos in
1759 type names, also reject CPP_KEYWORD.
1760 (c_parser_parameter_declaration): When issuing errors about
1761 unknown type names, attempt to provide a suggestion via
1763 * c-tree.h (c_keyword_starts_typename): New prototype.
1765 2016-06-20 Joseph Myers <joseph@codesourcery.com>
1768 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1769 c_common_type returns error_mark_node.
1771 2016-06-19 Martin Sebor <msebor@redhat.com>
1774 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1775 __alignof__ (expression).
1777 2016-06-14 David Malcolm <dmalcolm@redhat.com>
1779 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1781 2016-06-14 David Malcolm <dmalcolm@redhat.com>
1783 * c-typeck.c (build_component_ref): Simplify fixit code by
1784 using gcc_rich_location::add_fixit_misspelled_id.
1785 (set_init_label): Likewise.
1787 2016-06-13 David Malcolm <dmalcolm@redhat.com>
1789 * c-parser.c (c_parser_initelt): Provide location of name for new
1790 location_t param of set_init_label.
1791 * c-tree.h (set_init_label): Add location_t param.
1792 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1793 param and use it when issuing error messages about unrecognized
1794 field names. Attempt to provide a fixit hint if appropriate,
1795 otherwise update the error message to provide the type name.
1797 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1800 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1803 2016-06-08 Martin Sebor <msebor@redhat.com>
1804 Jakub Jelinek <jakub@redhat.com>
1808 * c-typeck.c (convert_arguments): Don't promote last argument
1809 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1811 2016-06-08 Marek Polacek <polacek@redhat.com>
1814 * c-decl.c (grokdeclarator): Check TYPE_P.
1817 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1820 2016-06-07 David Malcolm <dmalcolm@redhat.com>
1822 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1823 and structure element reference, capture the location of the
1824 element name token and pass it to build_component_ref.
1825 (c_parser_postfix_expression_after_primary): Likewise for
1826 structure element dereference.
1827 (c_parser_omp_variable_list): Likewise for
1828 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1829 * c-tree.h (build_component_ref): Add location_t param.
1830 * c-typeck.c (build_component_ref): Add location_t param
1831 COMPONENT_LOC. Use it, if available, when issuing hints about
1832 mispelled member names to provide a fixit replacement hint.
1834 2016-06-06 Marek Polacek <polacek@redhat.com>
1837 * c-parser.c (c_parser_direct_declarator): Set location.
1839 2016-06-06 Marek Polacek <polacek@redhat.com>
1841 * c-typeck.c (comptypes_internal): Handle comparisons of
1842 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1843 TYPE_REF_CAN_ALIAS_ALL.
1845 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1847 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1848 arguments as addressable when async clause exists.
1850 2016-05-30 Jakub Jelinek <jakub@redhat.com>
1853 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1854 when combined with target construct.
1856 2016-05-26 Jakub Jelinek <jakub@redhat.com>
1858 * c-parser.c (c_parser_omp_clause_schedule): Warn if
1859 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1861 2016-05-25 Marek Polacek <polacek@redhat.com>
1864 * c-decl.c (c_make_fname_decl): Don't check seen_error.
1867 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1869 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
1871 * c-parser.c (c_parser_oacc_declare): Add support for
1872 GOMP_MAP_FIRSTPRIVATE_POINTER.
1873 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1874 argument with enum c_omp_region_type ort.
1875 (handle_omp_array_sections): Likewise. Update call to
1876 handle_omp_array_sections_1.
1877 (c_finish_omp_clauses): Add specific errors and warning messages for
1878 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
1879 call to handle_omp_array_sections.
1881 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
1883 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1885 2016-05-24 Richard Biener <rguenther@suse.de>
1889 * c-typeck.c (build_array_ref): Do not complain about indexing
1890 non-lvalue vectors. Adjust for function name change.
1892 2016-05-20 Martin Sebor <msebor@redhat.com>
1895 * c-typeck.c (error_init): Use
1896 expansion_point_location_if_in_system_header.
1897 (warning_init): Same.
1899 2016-05-19 David Malcolm <dmalcolm@redhat.com>
1902 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
1904 (c_parser_postfix_expression): Likewise.
1905 * c-tree.h (c_expr::set_error): New method.
1906 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
1907 that result's range is initialized.
1909 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
1911 * c-typeck.c (parser_build_unary_op): Fix formatting.
1913 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
1915 * c-decl.c (grokdeclarator): Remove errmsg and use of
1916 targetm.invalid_return_type.
1917 (grokparms): Remove errmsg and use of
1918 targetm.invalid_parameter_type.
1920 2016-05-13 Joseph Myers <joseph@codesourcery.com>
1922 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
1923 function return type.
1925 2016-05-12 Marek Polacek <polacek@redhat.com>
1928 * c-decl.c (build_compound_literal): Pass LOC down to
1929 c_incomplete_type_error.
1930 * c-tree.h (require_complete_type): Adjust declaration.
1931 (c_incomplete_type_error): Likewise.
1932 * c-typeck.c (require_complete_type): Add location parameter, pass it
1933 down to c_incomplete_type_error.
1934 (c_incomplete_type_error): Add location parameter, pass it down to
1936 (build_component_ref): Pass location down to c_incomplete_type_error.
1937 (default_conversion): Pass location down to require_complete_type.
1938 (build_array_ref): Likewise.
1939 (build_function_call_vec): Likewise.
1940 (convert_arguments): Likewise.
1941 (build_unary_op): Likewise.
1942 (build_c_cast): Likewise.
1943 (build_modify_expr): Likewise.
1944 (convert_for_assignment): Likewise.
1945 (c_finish_omp_clauses): Likewise.
1947 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1950 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
1952 * c-errors.c (pedwarn_c90): Return true if warned.
1953 * c-tree.h (pedwarn_c90): Change return type to bool.
1954 (enum c_declspec_word): Add new enumerator cdw_atomic.
1956 2016-05-11 Marek Polacek <polacek@redhat.com>
1959 * c-decl.c (diagnose_mismatched_decls): Factor out code to
1960 diagnose_mismatched_attributes and call it.
1962 2016-05-10 Marek Polacek <polacek@redhat.com>
1965 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
1966 on a declaration following the definition.
1968 2016-05-05 Jakub Jelinek <jakub@redhat.com>
1970 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
1971 parse it through to c_parser_c99_block_statement.
1972 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
1975 2016-05-04 Marek Polacek <polacek@redhat.com>
1977 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1980 2016-05-04 Marek Polacek <polacek@redhat.com>
1983 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1984 for macro expansions.
1986 2016-05-03 Marek Polacek <polacek@redhat.com>
1989 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1990 check_builtin_function_arguments.
1992 2016-05-03 Richard Biener <rguenther@suse.de>
1994 * Make-lang.in (cc1-checksum.c): For stage-final re-use
1995 the checksum from the previous stage.
1997 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
1999 * c-parser.c (c_parser_oacc_all_clauses): Update call to
2000 c_finish_omp_clauses.
2001 (c_parser_omp_all_clauses): Likewise.
2002 (c_parser_oacc_cache): Likewise.
2003 (c_parser_oacc_loop): Likewise.
2004 (omp_split_clauses): Likewise.
2005 (c_parser_omp_declare_target): Likewise.
2006 (c_parser_cilk_all_clauses): Likewise.
2007 (c_parser_cilk_for): Likewise.
2008 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
2009 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
2011 2016-05-02 Marek Polacek <polacek@redhat.com>
2014 * c-decl.c (grokdeclarator): Diagnose when array's size has an
2017 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2020 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
2021 OACC_LOOP_CLAUSE_MASK.
2022 (c_parser_oacc_kernels_parallel): Update call to
2023 c_oacc_split_loop_clauses.
2025 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
2027 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
2028 argument to build_modify_expr in two cases.
2030 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2032 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2033 warn_for_memset instead of warning directly here.
2035 2016-04-26 Marek Polacek <polacek@redhat.com>
2038 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2040 (c_parser_for_statement): ... here.
2041 (c_parser_if_statement): Use it.
2042 (c_parser_switch_statement): Use it.
2043 (c_parser_while_statement): Use it.
2046 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2048 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2051 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2052 instead of c_finish_cilk_clauses.
2053 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2054 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2055 floating-point variables in the linear clause for Cilk Plus.
2057 2016-04-18 Michael Matz <matz@suse.de>
2059 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2060 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2062 2016-04-15 Marek Polacek <polacek@redhat.com>
2065 * c-typeck.c (build_unary_op): Pass location down to error and
2068 2016-04-15 Jakub Jelinek <jakub@redhat.com>
2071 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2073 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2074 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2075 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2076 Adjust c_parser_pragma callers.
2077 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2079 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2081 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2082 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2083 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2084 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2085 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2086 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2087 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2088 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2090 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2091 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2094 2016-04-13 Marek Polacek <polacek@redhat.com>
2097 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2099 (c_parser_statement): Likewise.
2100 (c_parser_c99_block_statement): Likewise.
2101 (c_parser_while_statement): Likewise.
2102 (c_parser_for_statement): Likewise.
2103 (c_parser_if_body): Don't set IF_P here.
2104 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2105 about dangling else here.
2106 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2107 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2108 warn about dangling else here.
2110 2016-04-04 Marek Polacek <polacek@redhat.com>
2113 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2115 2016-03-31 Marek Polacek <polacek@redhat.com>
2118 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2120 2016-03-18 David Malcolm <dmalcolm@redhat.com>
2123 * c-parser.c (c_parser_postfix_expression): Set the source range
2124 for uses of "__builtin_types_compatible_p".
2126 2016-03-17 Jakub Jelinek <jakub@redhat.com>
2129 * c-typeck.c (composite_type): Don't count void_list_node
2130 into len, if the list is terminated by void_list_node, start
2131 with void_list_node instead of NULL for newargs. Stop
2134 2016-03-16 Marek Polacek <polacek@redhat.com>
2137 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2138 nested functions returning VM types.
2140 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2142 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2143 when calling c_finish_omp_clauses.
2145 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2148 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2151 2016-03-04 Marek Polacek <polacek@redhat.com>
2154 * c-parser.c (c_parser_postfix_expression): Call
2155 c_parser_cast_expression rather than c_parser_postfix_expression.
2157 2016-03-01 Jakub Jelinek <jakub@redhat.com>
2161 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2162 of incomplete decls to error_mark_node.
2164 2016-02-24 Marek Polacek <polacek@redhat.com>
2167 * c-decl.c (finish_decl): Don't update the copy of the type of a
2168 different decl type.
2170 2016-02-23 Jakub Jelinek <jakub@redhat.com>
2173 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2174 in id_kind reclassification.
2176 2016-02-16 Jakub Jelinek <jakub@redhat.com>
2179 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2181 2016-02-16 James Norris <jnorris@codesourcery.com>
2184 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2186 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2188 * c-decl.c (build_null_declspecs): Zero the entire struct.
2191 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2192 callers changed. If nested_p is true, use it to call
2193 finish_implicit_inits.
2194 * c-tree.h (finish_implicit_inits): Declare.
2195 * c-typeck.c (finish_implicit_inits): New function. Move code
2197 (push_init_level): ... here.
2198 (set_designator, process_init_element): Call finish_implicit_inits.
2200 2016-02-11 Jakub Jelinek <jakub@redhat.com>
2203 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2204 arguments for -Waddress warning.
2206 2016-02-04 Jakub Jelinek <jakub@redhat.com>
2209 * c-decl.c (finish_enum): When honoring mode attribute,
2210 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2212 2016-01-29 Jakub Jelinek <jakub@redhat.com>
2215 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2216 all type variants, not just TYPE_MAIN_VARIANT.
2218 2016-01-27 Jakub Jelinek <jakub@redhat.com>
2221 * c-decl.c (c_write_global_declarations_1): Warn with
2222 warn_unused_function if static prototype without definition
2225 2016-01-27 Marek Polacek <polacek@redhat.com>
2228 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2229 to unsigned, if needed. Add -Wsign-compare warning.
2231 2016-01-26 Jakub Jelinek <jakub@redhat.com>
2233 PR tree-optimization/69483
2234 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2236 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2239 * c-tree.h (incomplete_record_decls): Declare.
2240 * c-parser.c (incomplete_record_decls): Define.
2241 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2242 report error if any decl has zero size.
2243 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2244 or enum type to incomplete_record_decls.
2246 2016-01-14 Tom de Vries <tom@codesourcery.com>
2248 PR tree-optimization/68773
2249 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2252 2016-01-14 Marek Polacek <polacek@redhat.com>
2255 * c-decl.c (grokdeclarator): Provide more information for invalid
2258 2016-01-06 David Malcolm <dmalcolm@redhat.com>
2260 * c-parser.c (c_parser_unary_expression): For dereferences, build
2261 a combined location before calling build_indirect_ref, so that
2262 error reports cover the full range, manually updating the c_expr
2265 2016-01-06 Marek Polacek <polacek@redhat.com>
2268 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2269 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2272 2016-01-04 Jakub Jelinek <jakub@redhat.com>
2274 Update copyright years.
2276 2016-01-04 Marek Polacek <polacek@redhat.com>
2279 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2280 optimization to use __atomic_fetch_* built-in if possible.
2282 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2284 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2286 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2289 2015-12-22 Marek Polacek <polacek@redhat.com>
2292 * c-typeck.c (build_component_ref): Warn when acessing elements of
2293 atomic structures or unions.
2295 2015-12-21 David Malcolm <dmalcolm@redhat.com>
2297 * c-typeck.c: Include "gcc-rich-location.h".
2298 (build_binary_op): In the two places that call binary_op_error,
2299 create a gcc_rich_location and populate it with the location of
2300 the binary op and its two operands.
2302 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2304 * c-parser.c (c_parser_statement_after_labels): When calling
2305 c_finish_return, Use the return expression's location if it has
2306 one, falling back to the location of the first token within it.
2307 * c-typeck.c (c_finish_return): When issuing warnings about
2308 the incorrect presence/absence of a return value, issue a note
2309 showing the declaration of the function.
2311 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2313 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2315 (c_parser_peek_nth_token): New function.
2316 (c_parser_peek_conflict_marker): New function.
2317 (c_parser_error): Detect conflict markers and report them as such.
2319 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2321 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2322 to preserve range information for the primary expression
2323 in the call to c_parser_postfix_expression_after_primary.
2325 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2327 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2328 expression location, falling back on the first token location,
2329 rather than always using the latter.
2331 2015-12-16 Marek Polacek <polacek@redhat.com>
2334 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2337 2015-12-15 Marek Polacek <polacek@redhat.com>
2340 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2343 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2345 * c-parser.c (c_parser_alignof_expression): Capture location of
2346 closing parenthesis (if any), or of end of unary expression, and
2347 use it to build a src_range for the expression.
2349 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2352 * c-parser.c (c_parser_get_builtin_args): Add
2353 "out_close_paren_loc" param, and write back to it.
2354 (c_parser_postfix_expression): Capture the closing
2355 parenthesis location for RID_CHOOSE_EXPR,
2356 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2357 RID_BUILTIN_SHUFFLE and use it to set the source range
2358 for such expressions; within RID_BUILTIN_COMPLEX set
2359 the underlying location.
2361 2015-12-07 Marek Polacek <polacek@redhat.com>
2364 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2365 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2367 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2369 * c-tree.h (c_build_va_arg): Adjust prototype.
2370 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2371 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2372 parameter, adjust throughout and issue an error if EXPR is a component
2373 with reverse storage order.
2375 2015-12-02 Jason Merrill <jason@redhat.com>
2377 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2378 (c_fully_fold_internal, decl_constant_value_for_optimization):
2379 Move from c-common.c.
2380 * c-tree.h: Declare decl_constant_value_for_optimization.
2381 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2383 2015-12-02 Joseph Myers <joseph@codesourcery.com>
2386 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2387 following link from declarator to next declarator. Track original
2388 qualified type and pass it to c_build_qualified_type.
2389 * c-typeck.c (c_build_qualified_type): Add arguments
2390 orig_qual_type and orig_qual_indirect.
2392 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2394 * c-parser.c (c_parser_omp_clause_name)
2395 (c_parser_oacc_all_clauses): Alphabetical sorting.
2397 2015-12-02 Jakub Jelinek <jakub@redhat.com>
2400 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2403 2015-12-01 Julian Brown <julian@codesourcery.com>
2404 Cesar Philippidis <cesar@codesourcery.com>
2405 James Norris <James_Norris@mentor.com>
2407 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2408 (c_parser_oacc_clause_use_device): New function.
2409 (c_parser_oacc_all_clauses): Add use_device support.
2410 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2411 (c_parser_oacc_host_data): New function.
2412 (c_parser_omp_construct): Add host_data support.
2413 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2414 * c-typeck.c (c_finish_oacc_host_data): New function.
2415 (c_finish_omp_clauses): Add use_device support.
2417 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
2420 * c-decl.c: Set TYPE_PACKED in variants.
2422 2015-11-27 Martin Liska <mliska@suse.cz>
2425 * c-array-notation.c (fix_builtin_array_notation_fn):
2426 Use release_vec_vec instead of vec::release.
2427 (build_array_notation_expr): Likewise.
2428 (fix_conditional_array_notations_1): Likewise.
2429 (fix_array_notation_expr): Likewise.
2430 (fix_array_notation_call_expr): Likewise.
2432 2015-11-27 Jakub Jelinek <jakub@redhat.com>
2435 * c-parser.c (c_parser_compound_statement_nostart): If
2436 last_label is true, use pragma_stmt instead of pragma_compound
2437 as second c_parser_pragma argument.
2438 (c_parser_omp_ordered, c_parser_omp_target_update,
2439 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2440 false as second argument to c_parser_skip_to_pragma_eol after
2441 diagnosing standalone directives used in pragma_stmt context.
2443 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2445 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2446 with "if (ENABLE_OFFLOADING)".
2448 2015-11-23 David Malcolm <dmalcolm@redhat.com>
2451 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2452 for various Objective-C constructs: Class.name syntax,
2453 @selector(), @protocol(), @encode(), and [] message syntax.
2455 2015-11-20 David Malcolm <dmalcolm@redhat.com>
2458 * c-typeck.c (should_suggest_deref_p): New function.
2459 (build_component_ref): Special-case POINTER_TYPE when
2460 generating a "not a structure of union" error message, and
2461 suggest a "->" rather than a ".", providing a fix-it hint.
2463 2015-11-19 David Malcolm <dmalcolm@redhat.com>
2465 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2466 candidate into a new function, find_closest_identifier.
2468 2015-11-19 Marek Polacek <polacek@redhat.com>
2471 * c-typeck.c (parser_build_binary_op): Properly handle
2472 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2474 2015-11-17 David Malcolm <dmalcolm@redhat.com>
2476 * c-parser.c (set_c_expr_source_range): Bulletproof both
2477 overloaded implementations against NULL expr->value.
2478 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2480 (c_parser_unary_expression): Likewise when handling addresses of
2482 (c_parser_postfix_expression): Likewise for statement expressions,
2483 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2484 __builtin_va_arg, and for __builtin_offset_of.
2485 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2486 src_range using the range of the braced initializer.
2487 (c_parser_transaction_expression): Set src_range for "ret" to a
2488 sane pair of values.
2490 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2492 * c-parser.c (c_finish_omp_declare_simd): Look for
2493 "simd" attribute as well. Update error message.
2495 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2497 * c-parser.c (c_parser_omp_declare_target): Adjust.
2499 2015-11-14 Jakub Jelinek <jakub@redhat.com>
2501 * c-typeck.c (c_finish_omp_clauses): Don't mark
2502 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2504 2015-11-14 Marek Polacek <polacek@redhat.com>
2506 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2507 * c-typeck.c: Likewise.
2509 2015-11-13 David Malcolm <dmalcolm@redhat.com>
2511 * c-decl.c (warn_defaults_to): Pass line_table to
2513 * c-errors.c (pedwarn_c99): Likewise.
2514 (pedwarn_c90): Likewise.
2515 * c-parser.c (set_c_expr_source_range): New functions.
2516 (c_token::get_range): New method.
2517 (c_token::get_finish): New method.
2518 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2519 based on the range from the start of the LHS to the end of the
2521 (c_parser_conditional_expression): Likewise, based on the range
2522 from the start of the cond.value to the end of exp2.value.
2523 (c_parser_binary_expression): Call set_c_expr_source_range on
2524 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2525 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2526 based on the cast_loc through to the end of the expr.
2527 (c_parser_unary_expression): Likewise, based on the
2528 op_loc through to the end of op.
2529 (c_parser_sizeof_expression) Likewise, based on the start of the
2530 sizeof token through to either the closing paren or the end of
2532 (c_parser_postfix_expression): Likewise, using the token range,
2533 or from the open paren through to the close paren for
2534 parenthesized expressions.
2535 (c_parser_postfix_expression_after_primary): Likewise, for
2536 various kinds of expression.
2537 * c-tree.h (struct c_expr): Add field "src_range".
2538 (c_expr::get_start): New method.
2539 (c_expr::get_finish): New method.
2540 (set_c_expr_source_range): New decls.
2541 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2542 on ret for prefix unary ops.
2543 (parser_build_binary_op): Likewise, running from the start of
2544 arg1.value through to the end of arg2.value.
2546 2015-11-13 Marek Polacek <polacek@redhat.com>
2549 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2551 2015-11-13 David Malcolm <dmalcolm@redhat.com>
2553 * c-typeck.c: Include spellcheck.h.
2554 (lookup_field_fuzzy_find_candidates): New function.
2555 (lookup_field_fuzzy): New function.
2556 (build_component_ref): If the field was not found, try using
2557 lookup_field_fuzzy and potentially offer a suggestion.
2559 2015-11-12 James Norris <jnorris@codesourcery.com>
2560 Joseph Myers <joseph@codesourcery.com>
2562 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2563 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2564 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2565 and PRAGMA_OMP_CLAUSE_LINK.
2566 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2567 and PRAGMA_OACC_CLAUSE_LINK.
2568 (OACC_DECLARE_CLAUSE_MASK): New definition.
2569 (c_parser_oacc_declare): New function.
2571 2015-11-12 Marek Polacek <polacek@redhat.com>
2574 * c-parser.c (c_parser_for_statement): Reclassify the token in
2577 2015-11-11 Marek Polacek <polacek@redhat.com>
2581 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2582 checking the size of an array.
2584 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
2586 * c-array-notation.c: Remove unused header files.
2587 * c-aux-info.c: Likewise.
2588 * c-convert.c: Likewise.
2589 * c-decl.c: Likewise.
2590 * c-errors.c: Likewise.
2591 * c-lang.c: Likewise.
2592 * c-objc-common.c: Likewise.
2593 * c-parser.c: Likewise.
2594 * c-typeck.c: Likewise.
2595 * gccspec.c: Likewise.
2597 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2598 Cesar Philippidis <cesar@codesourcery.com>
2599 James Norris <jnorris@codesourcery.com>
2600 Julian Brown <julian@codesourcery.com>
2601 Nathan Sidwell <nathan@codesourcery.com>
2604 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2606 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2607 (c_parser_pragma): Parse 'acc routine'.
2608 (OACC_ROUTINE_CLAUSE_MARK): Define.
2609 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2611 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2614 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2615 location of the backward-goto to the start of the loop body.
2617 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2620 * c-parser.c (c_parser_while_statement): Finish the loop before
2621 parsing ahead for misleading indentation.
2622 (c_parser_for_statement): Likewise.
2624 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2626 * c-decl.c (finish_struct): If the structure has reverse storage
2627 order, rewrite the type of array fields with scalar component. Call
2628 maybe_apply_pragma_scalar_storage_order on entry.
2629 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2630 errors on bit-fields and reverse SSO here and not...
2631 (c_mark_addressable): ...here.
2632 (output_init_element): Adjust call to initializer_constant_valid_p.
2633 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2635 2015-11-06 David Malcolm <dmalcolm@redhat.com>
2637 * c-decl.c (warn_defaults_to): Update for change in signature
2638 of diagnostic_set_info.
2639 * c-errors.c (pedwarn_c99): Likewise.
2640 (pedwarn_c90): Likewise.
2641 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2642 for textinfo::set_location.
2644 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2645 Thomas Schwinge <thomas@codesourcery.com>
2646 James Norris <jnorris@codesourcery.com>
2648 * c-parser.c (c_parser_omp_clause_name): Add support for
2649 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2650 (c_parser_omp_clause_default): Add is_oacc argument. Handle
2651 default(none) in OpenACC.
2652 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2654 (c_parser_oacc_clause_tile): New function.
2655 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2656 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2657 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2659 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2660 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2662 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2663 (c_parser_oacc_update): Update the error message for missing clauses.
2664 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2665 and OMP_CLAUSE_INDEPENDENT.
2667 2015-11-05 Marek Polacek <polacek@redhat.com>
2670 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2671 deal with pre-evaluation on invalid types.
2673 2015-11-05 Jakub Jelinek <jakub@redhat.com>
2674 Ilya Verbin <ilya.verbin@intel.com>
2676 * c-parser.c: Include context.h and gimple-expr.h.
2677 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2678 monotonic together with nonmonotonic.
2679 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
2680 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2681 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2682 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2683 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
2684 expressions on combined target teams before the target.
2685 (c_parser_omp_declare_target): If decl has "omp declare target" or
2686 "omp declare target link" attribute, and cgraph or varpool node already
2687 exists, then set corresponding flags. Call c_finish_omp_clauses
2688 in the parenthesized extended-list syntax case.
2689 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2691 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2692 on OMP_CLAUSE_REDUCTION array sections.
2693 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2694 into the constant offset, or for variable low-bound using
2695 POINTER_PLUS_EXPR. For structure element based array sections use
2696 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2697 (c_finish_omp_clauses): Drop generic_field_head, structure
2698 elements are now always mapped even as array section bases,
2699 diagnose same var in data sharing and mapping clauses. Diagnose if
2700 linear step on declare simd is neither a constant nor a uniform
2701 parameter. Look through POINTER_PLUS_EXPR for array section
2702 reductions. Diagnose the same var or function appearing multiple
2703 times on the same directive. Fix up wording for the to clause if t
2704 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
2705 modifier on kinds other than dynamic or guided or nonmonotonic
2706 modifier together with ordered clause.
2708 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2709 Chung-Lin Tang <cltang@codesourcery.com>
2711 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2713 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
2715 * c-array-notation.c: Reorder #include's and remove duplicates.
2716 * c-aux-info.c: Likewise.
2717 * c-convert.c: Likewise.
2718 * c-decl.c: Likewise.
2719 * c-errors.c: Likewise.
2720 * c-lang.c: Likewise.
2721 * c-objc-common.c: Likewise.
2722 * c-parser.c: Likewise.
2723 * c-typeck.c: Likewise.
2725 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
2728 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2729 after calling build_qualified_type.
2731 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2732 Thomas Schwinge <thomas@codesourcery.com>
2733 James Norris <jnorris@codesourcery.com>
2734 Joseph Myers <joseph@codesourcery.com>
2735 Julian Brown <julian@codesourcery.com>
2736 Bernd Schmidt <bschmidt@redhat.com>
2738 * c-parser.c (c_parser_oacc_shape_clause): New.
2739 (c_parser_oacc_simple_clause): New.
2740 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2741 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2743 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2744 James Norris <jnorris@codesourcery.com>
2745 Cesar Philippidis <cesar@codesourcery.com>
2749 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2750 parameters, and handle these. Adjust all users.
2751 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2753 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2755 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2757 (c_finish_omp_construct): Declare function.
2758 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2759 Merge functions into...
2760 (c_finish_omp_construct): ... this new function.
2762 2015-10-22 Richard Biener <rguenther@suse.de>
2764 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2765 before folding a MINUS_EXPR.
2767 2015-10-21 Marek Polacek <polacek@redhat.com>
2770 * c-decl.c (start_function): Warn about vararg functions without
2773 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2775 * c-typeck.c (build_conditional_expr): Use boolean vector
2776 type for vector comparison.
2777 (build_vec_cmp): New.
2778 (build_binary_op): Use build_vec_cmp for comparison.
2780 2015-10-20 Marek Polacek <polacek@redhat.com>
2782 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2784 2015-10-20 Marek Polacek <polacek@redhat.com>
2787 * c-parser.c (c_parser_attributes): Break out of the loop if the
2788 token after an attribute isn't a comma.
2790 2015-10-13 Jakub Jelinek <jakub@redhat.com>
2791 Aldy Hernandez <aldyh@redhat.com>
2793 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2794 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2795 (c_parser_omp_variable_list): Handle structure elements for
2796 map, to and from clauses. Handle array sections in reduction
2797 clause. Formatting fixes.
2798 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2799 if clause modifiers.
2800 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2801 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2802 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2803 c_parser_omp_clause_is_device_ptr): New functions.
2804 (c_parser_omp_clause_ordered): Parse optional parameter.
2805 (c_parser_omp_clause_reduction): Handle array reductions.
2806 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2807 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2809 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2810 (c_parser_omp_clause_depend_sink): New function.
2811 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2812 (c_parser_omp_clause_map): Parse release/delete map kinds and
2813 optional always modifier.
2814 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2815 and c_finish_omp_clauses callers.
2816 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
2817 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2818 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2819 (OMP_CRITICAL_CLAUSE_MASK): Define.
2820 (c_parser_omp_critical): Parse critical clauses.
2821 (c_parser_omp_for_loop): Handle doacross loops, adjust
2822 c_finish_omp_for and c_finish_omp_clauses callers.
2823 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2824 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2825 (OMP_FOR_CLAUSE_MASK): Add linear clause.
2826 (c_parser_omp_for): Disallow ordered clause when combined with
2827 distribute. Disallow linear clause when combined with distribute
2828 and not combined with simd.
2829 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2830 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2831 parse clauses and if depend clause is found, don't parse a body.
2832 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2833 Allow target parallel without for after it.
2834 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2835 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2836 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2838 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2839 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2840 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2841 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2843 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2844 defaultmap and is_device_ptr clauses.
2845 (c_parser_omp_target): Parse target parallel and target simd. Set
2846 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
2847 and target exit data. Diagnose invalid map kinds.
2848 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2849 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2851 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2853 (OMP_TASKLOOP_CLAUSE_MASK): Define.
2854 (c_parser_omp_taskloop): New function.
2855 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2856 handle PRAGMA_OMP_TASKLOOP.
2857 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2858 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2859 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2860 Add IS_OMP argument, handle structure element bases, diagnose
2861 bitfields, pass IS_OMP recursively, diagnose known zero length
2862 array sections in depend clauses, handle array sections in reduction
2863 clause, diagnose negative length even for pointers.
2864 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2865 types, pass IS_OMP down to handle_omp_array_sections_1, handle
2866 array sections in reduction clause, set
2867 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2868 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2869 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2870 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2872 2015-10-06 Marek Polacek <polacek@redhat.com>
2874 * c-parser.c (c_parser_statement_after_labels): Use
2875 protected_set_expr_location.
2876 (c_parser_omp_clause_num_gangs): Likewise.
2877 (c_parser_omp_clause_num_threads): Likewise.
2878 (c_parser_omp_clause_num_workers): Likewise.
2879 (c_parser_omp_clause_vector_length): Likewise.
2880 (c_parser_omp_clause_num_teams): Likewise.
2881 (c_parser_omp_clause_thread_limit): Likewise.
2882 * c-typeck.c (build_c_cast): Likewise.
2883 (c_cast_expr): Likewise.
2885 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2887 * c-typeck.c (c_tree_equal): Use real_equal instead of
2890 2015-10-04 Jason Merrill <jason@redhat.com>
2892 * c-parser.c (c_lex_one_token): Handle @synchronized.
2893 * c-decl.c (match_builtin_function_types): A declaration of a built-in
2894 can change whether the function is transaction_safe.
2896 2015-10-02 Marek Polacek <polacek@redhat.com>
2899 * c-typeck.c (convert_for_assignment): Use the expansion point
2900 location throughout.
2902 2015-10-02 Marek Polacek <polacek@redhat.com>
2905 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
2906 and pass it down to c_parser_if_statement.
2907 (c_parser_else_body): Add CHAIN parameter and pass it down to
2908 c_parser_statement_after_labels.
2909 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
2910 duplicated if-else-if conditions.
2912 2015-10-01 Marek Polacek <polacek@redhat.com>
2914 * c-typeck.c (convert_for_assignment): Improve commentary.
2916 2015-09-30 Marek Polacek <polacek@redhat.com>
2919 * c-typeck.c (c_finish_return): Use the expansion point location for
2920 certain "return with value" warnings.
2922 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2924 * c-parser.c (pragma_lex): Add loc argument.
2926 2015-09-15 Marek Polacek <polacek@redhat.com>
2929 * c-decl.c (tag_exists_p): New function.
2930 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
2931 struct/union/enum keywords are missing.
2932 * c-tree.h (tag_exists_p): Declare.
2934 2015-09-15 Marek Polacek <polacek@redhat.com>
2936 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
2937 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
2938 Return NULL_TREE instead of 0.
2939 (lookup_name): Return NULL_TREE instead of 0.
2940 (lookup_name_in_scope): Likewise.
2941 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
2942 (parser_xref_tag): Use false instead of 0.
2943 (start_struct): Use true instead of 1.
2944 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2946 2015-09-14 Marek Polacek <polacek@redhat.com>
2948 * c-typeck.c (set_nonincremental_init_from_string): Use
2949 HOST_WIDE_INT_M1U when shifting a negative value.
2951 2015-09-09 Mark Wielaard <mjw@redhat.com>
2953 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
2956 2015-09-10 Jakub Jelinek <jakub@redhat.com>
2959 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
2960 into OMP_FOR_PRE_BODY rather than before the loop.
2962 2015-09-09 Jakub Jelinek <jakub@redhat.com>
2965 * c-parser.c (c_parser_oacc_all_clauses,
2966 c_parser_omp_all_clauses): Remove invalid clause from
2967 list of clauses even if parser->error is set.
2970 * c-parser.c (c_parser_omp_clause_aligned,
2971 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
2973 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
2977 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2978 instead of c_parser_unary_expression. If the result is !lvalue_p,
2979 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2981 2015-09-04 Marek Polacek <polacek@redhat.com>
2984 * c-typeck.c (build_binary_op): Don't instrument static initializers.
2986 2015-09-03 Martin Sebor <msebor@redhat.com>
2989 * c-typeck.c (convert_arguments, parser_build_unary_op,
2990 build_conditional_expr, c_cast_expr, convert_for_assignment,
2991 build_binary_op, _objc_common_truthvalue_conversion): Call
2993 (c_decl_implicit): Define.
2995 2015-09-02 Marek Polacek <polacek@redhat.com>
2998 * c-parser.c (c_parser_enum_specifier): Give a better error for
3001 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3003 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
3005 2015-08-12 Marek Polacek <polacek@redhat.com>
3007 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
3010 2015-08-03 Marek Polacek <polacek@redhat.com>
3013 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
3015 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
3017 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3019 * c-parser.c (c_parser_if_body): Take token_indent_info
3020 argument. Call warn_for_misleading_indentation even when the
3021 body is a semicolon. Extract token_indent_infos corresponding
3022 to the guard, body and next tokens. Adjust call to
3023 warn_for_misleading_indentation accordingly.
3024 (c_parser_else_body): Likewise.
3025 (c_parser_if_statement): Likewise.
3026 (c_parser_while_statement): Likewise.
3027 (c_parser_for_statement): Likewise.
3029 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
3030 Manuel López-Ibáñez <manu@gcc.gnu.org>
3032 * c-decl.c (get_parm_info): Remove static var. Update warning
3035 2015-07-27 Marek Polacek <polacek@redhat.com>
3039 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3041 2015-07-20 Marek Polacek <polacek@redhat.com>
3044 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3045 (build_binary_op): Warn about left shift overflows.
3047 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
3049 * c-array-notation.c: Adjust includes for flags.h changes.
3050 * c-objc-common.c: Likewise.
3052 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
3054 * c-array-notation.c: Adjust includes.
3055 * c-aux-info.c: Likewise.
3056 * c-convert.c: Likewise.
3057 * c-decl.c: Likewise.
3058 * c-errors.c: Likewise.
3059 * c-lang.c: Likewise.
3060 * c-objc-common.c: Likewise.
3061 * c-parser.c: Likewise.
3062 * c-typeck.c: Likewise.
3064 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3067 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3069 2015-06-29 Marek Polacek <polacek@redhat.com>
3072 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3073 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3074 about -Wswitch-bool here.
3075 (do_case): Update c_add_case_label call.
3076 (c_finish_case): Update c_do_switch_warnings call.
3078 2015-06-27 Marek Polacek <polacek@redhat.com>
3080 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3082 2015-06-26 Marek Polacek <polacek@redhat.com>
3084 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3086 * c-typeck.c (array_to_pointer_conversion): Likewise.
3087 (build_unary_op): Likewise.
3088 (c_finish_return): Likewise.
3090 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
3092 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3093 * c-parser.c: Likewise.
3095 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3097 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3098 instead of pointer_hash.
3099 (detect_field_duplicates): Likewise.
3101 2015-06-25 Marek Polacek <polacek@redhat.com>
3103 * c-array-notation.c: Use VAR_P throughout.
3104 * c-decl.c: Likewise.
3105 * c-objc-common.c: Likewise.
3106 * c-parser.c: Likewise.
3107 * c-typeck.c: Likewise.
3109 2015-06-25 Marek Polacek <polacek@redhat.com>
3111 * c-decl.c: Use is_global_var throughout.
3112 * c-parser.c: Likewise.
3113 * c-typeck.c: Likewise.
3115 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
3117 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3118 * c-aux-info.c: Likewise.
3119 * c-convert.c: Likewise.
3120 * c-decl.c: Likewise.
3121 * c-errors.c: Likewise.
3122 * c-lang.c: Likewise.
3123 * c-objc-common.c: Likewise.
3124 * c-parser.c: Likewise.
3125 * c-typeck.c: Likewise.
3127 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
3130 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3133 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3135 * c-decl.c (pop_scope): Register the main translation unit
3136 through the new debug hook.
3138 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
3140 * c-array-notation.c : Adjust include files.
3141 * c-aux-info.c : Likewise.
3142 * c-convert.c : Likewise.
3143 * c-decl.c : Likewise.
3144 * c-errors.c : Likewise.
3145 * c-lang.c : Likewise.
3146 * c-lang.h : Likewise.
3147 * c-objc-common.c : Likewise.
3148 * c-parser.c : Likewise.
3149 * c-typeck.c : Likewise.
3151 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
3153 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3154 immediately clobber it.
3155 (c_write_global_declarations_1): Remove call to
3156 check_global_declaration_1.
3157 (c_write_global_declarations_2): Remove.
3158 (c_write_final_cleanups): Rename from c_write_global_declarations.
3159 Remove call to finalize_compilation_unit.
3160 Remove calls to debugging hooks.
3161 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3162 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3163 * c-tree.h: Remove c_write_global_declarations.
3165 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
3167 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3168 * c-aux-info.c: Likewise.
3169 * c-convert.c: Likewise.
3170 * c-decl.c: Likewise.
3171 * c-errors.c: Likewise.
3172 * c-lang.c: Likewise.
3173 * c-objc-common.c: Likewise.
3174 * c-parser.c: Likewise.
3175 * c-typeck.c: Likewise.
3177 2015-06-04 Marek Polacek <polacek@redhat.com>
3180 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3183 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3185 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3186 Warn for empty struct.
3187 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3189 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3191 * c-decl.c (start_function): Call plugin before parsing.
3192 (finish_function): Call plugin after parsing.
3194 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3197 * c-decl.c (merge_decls): Merge DECL_COMMON.
3199 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
3201 * Make-lang.in (check_gcc_pallelize): Define.
3203 2015-05-22 Marek Polacek <polacek@redhat.com>
3206 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3209 2015-05-21 Marek Polacek <polacek@redhat.com>
3211 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3214 2015-05-20 Marek Polacek <polacek@redhat.com>
3216 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3217 * c-typeck.c: Likewise.
3219 2015-05-19 Marek Polacek <polacek@redhat.com>
3221 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3223 2015-05-19 Jakub Jelinek <jakub@redhat.com>
3226 * c-parser.c (c_parser_omp_for_loop): Don't add
3227 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3228 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3229 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3232 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3234 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
3237 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3240 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3243 2015-05-14 Marek Polacek <polacek@redhat.com>
3247 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3250 2015-05-12 David Malcolm <dmalcolm@redhat.com>
3252 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3253 to add a call to warn_for_misleading_indentation.
3254 (c_parser_else_body): Likewise, adding param "else_loc".
3255 (c_parser_if_statement): Check for misleading indentation.
3256 (c_parser_while_statement): Likewise.
3257 (c_parser_for_statement): Likewise.
3259 2015-05-08 Marek Polacek <polacek@redhat.com>
3262 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3263 (output_init_element): Likewise.
3265 2015-05-07 Marek Polacek <polacek@redhat.com>
3268 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3271 2015-04-30 Marek Polacek <polacek@redhat.com>
3273 * c-typeck.c (set_init_label): Call error_at instead of error and
3276 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3279 * c-typeck.c (c_build_va_arg): Clarify the error message.
3281 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3283 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3284 OMP_STANDALONE_CLAUSES.
3286 2015-04-28 Marek Polacek <polacek@redhat.com>
3288 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3290 2015-04-28 Marek Polacek <polacek@redhat.com>
3293 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3295 2015-04-25 Marek Polacek <polacek@redhat.com>
3298 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3301 2015-04-23 Marek Polacek <polacek@redhat.com>
3304 * c-decl.c (set_labels_context_r): New function.
3305 (store_parm_decls): Call it via walk_tree_without_duplicates.
3306 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3307 instead of create_tmp_var. Build TARGET_EXPR instead of
3309 (build_atomic_assign): Use create_tmp_var_raw instead of
3310 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3312 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3314 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3315 (c_parser_omp_target_update): Add missed %> to error_at ().
3317 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3320 * c-decl.c (c_default_pointer_mode): Remove definition.
3321 * c-tree.h (c_default_pointer_mode): Remove declaration.
3323 2015-03-27 Tobias Burnus <burnus@net-b.de>
3326 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3328 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3329 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3330 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3332 2015-03-19 Jakub Jelinek <jakub@redhat.com>
3334 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3335 attribute for DECL_EXTERNAL VAR_DECLs.
3337 2015-03-11 Jakub Jelinek <jakub@redhat.com>
3339 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3342 2015-03-10 Jakub Jelinek <jakub@redhat.com>
3345 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3346 before preparing arguments to warn_logical_not_parentheses.
3348 2015-03-09 Jakub Jelinek <jakub@redhat.com>
3351 * c-typeck.c (parser_build_binary_op): Don't warn for
3352 !!x == y or !b == y where b is _Bool.
3354 2015-03-09 Marek Polacek <polacek@redhat.com>
3356 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3357 * c-decl.c (grokdeclarator): Likewise.
3358 * c-typeck.c (build_binary_op): Likewise.
3360 2015-02-27 Marek Polacek <polacek@redhat.com>
3363 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3365 2015-02-14 Marek Polacek <polacek@redhat.com>
3368 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3369 declared through a typedef name.
3371 2015-02-13 Marek Polacek <polacek@redhat.com>
3374 * c-decl.c (grokdeclarator): Print also the type when giving
3375 the error message about array's incomplete element type.
3377 2015-02-11 Jakub Jelinek <jakub@redhat.com>
3380 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3381 check in the POP macro.
3383 2015-02-09 Marek Polacek <polacek@redhat.com>
3386 * c-typeck.c (process_init_element): Don't always wrap
3387 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3388 initializing a range of elements.
3390 2015-02-04 Jakub Jelinek <jakub@redhat.com>
3394 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3396 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
3398 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3399 processing enum declaration.
3401 2015-01-29 Marek Polacek <polacek@redhat.com>
3404 * c-typeck.c (pop_init_level): If constructor_elements has
3405 exactly one element with integer_zerop value, set constructor_zeroinit
3406 to 1. Remove braces around warning_init call.
3408 2015-01-27 Jakub Jelinek <jakub@redhat.com>
3411 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3412 of FUNCTION_DECLs with error_mark_node.
3414 2015-01-26 Jakub Jelinek <jakub@redhat.com>
3417 * c-typeck.c (convert_arguments): Return -1 if there are
3418 error_args, even if we've diagnosed too many arguments.
3420 2015-01-21 Richard Biener <rguenther@suse.de>
3423 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3424 for builtins the user declared correctly.
3426 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3427 Bernd Schmidt <bernds@codesourcery.com>
3428 Cesar Philippidis <cesar@codesourcery.com>
3429 James Norris <jnorris@codesourcery.com>
3430 Jakub Jelinek <jakub@redhat.com>
3431 Ilmir Usmanov <i.usmanov@samsung.com>
3433 * c-parser.c: Include "gomp-constants.h".
3434 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3435 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3436 Use OMP_CLAUSE_SET_MAP_KIND.
3437 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3438 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3439 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3440 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3441 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3442 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3443 "copyout", "create", "delete", "deviceptr", "gang", "host",
3444 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3445 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3446 "present_or_create", "pcreate", "seq", "self", "vector",
3447 "vector_length", "wait", "worker".
3448 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3449 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3450 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3451 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3452 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3453 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3454 (c_parser_oacc_data_clause_deviceptr)
3455 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3456 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3457 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3458 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3459 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3460 (c_parser_oacc_parallel, c_parser_oacc_update)
3461 (c_parser_oacc_wait): New functions.
3462 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3463 (c_finish_oacc_data): New prototypes.
3464 * c-typeck.c: Include "gomp-constants.h".
3465 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3466 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3467 OMP_CLAUSE_SET_MAP_KIND.
3468 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3469 (c_finish_oacc_data): New functions.
3470 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3471 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3472 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3473 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3474 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3475 GOMP_MAP_FORCE_DEVICEPTR.
3477 2015-01-09 Michael Collison <michael.collison@linaro.org>
3479 * c-array-notation.c: Include hash-set.h, machmode.h,
3480 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3481 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3482 * c-aux-info.c: Ditto.
3483 * c-convert.c: Ditto.
3485 * c-errors.c: Ditto.
3486 * c-lang.c: Dittoxs.
3487 * c-objc-common.c: Ditto.
3488 * c-parser.c: Ditto.
3489 * c-typeck.c: Include hash-set.h, machmode.h,
3490 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3491 fold-const.h, wide-int.h, inchash.h, real.h and
3492 fixed-value.h due to flattening of tree.h.
3494 2015-01-07 Marek Polacek <polacek@redhat.com>
3497 * c-typeck.c (process_init_element): Disallow initialization of
3498 a flexible array member with a string constant if the structure
3501 2015-01-05 Jakub Jelinek <jakub@redhat.com>
3504 * c-typeck.c (convert_for_assignment, c_finish_return): For
3505 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3506 types also set in_late_binary_op around convert call.
3507 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3508 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3509 result on expr as last argument to ubsan_instrument_float_cast,
3510 if in_late_binary_op, don't use c_save_expr but save_expr.
3512 Update copyright years.
3514 2015-01-05 Marek Polacek <polacek@redhat.com>
3517 * c-typeck.c (build_array_ref): Pass loc down to
3518 warn_array_subscript_with_type_char.
3520 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
3522 * c-typeck.c: New behavious for pointers to arrays with qualifiers
3523 (common-pointer-type): For pointers to arrays take qualifiers from
3525 (build_conditional_expr): Add warnings for lost qualifiers.
3526 (comp-target-types): Allow pointers to arrays with different qualifiers.
3527 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
3528 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
3529 to PEDWARN_FOR_QUALIFIERS.
3531 2014-12-17 Jakub Jelinek <jakub@redhat.com>
3534 * c-convert.c: Include ubsan.h.
3535 (convert): For real -> integral casts and
3536 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3537 instead instrument the float cast directly.
3539 2014-11-29 Jakub Jelinek <jakub@redhat.com>
3541 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3542 c_finish_stmt_expr): Remove NULL last argument from
3543 create_tmp_var_raw and create_tmp_var calls.
3544 * c-array-notation.c (fix_builtin_array_notation_fn,
3545 build_array_notation_expr, fix_conditional_array_notations_1,
3546 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3548 2014-11-28 Marek Polacek <polacek@redhat.com>
3551 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3552 convert the right operand to integer type.
3554 2014-11-25 Marek Polacek <polacek@redhat.com>
3557 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3558 for inline functions.
3560 2014-11-21 Jakub Jelinek <jakub@redhat.com>
3563 * c-typeck.c (build_array_ref): Adjust
3564 convert_vector_to_pointer_for_subscript caller. If it returns true,
3565 call non_lvalue_loc on the result.
3567 2014-11-11 Richard Biener <rguenther@suse.de>
3569 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3572 2014-11-10 Andi Kleen <ak@linux.intel.com>
3575 * c-parser.c (c_parser_statement_after_labels): Call
3577 (c_parser_if_statement): Dito.
3578 (c_parser_switch_statement): Dito.
3579 (c_parser_while_statement): Dito.
3580 (c_parser_do_statement): Dito.
3581 (c_parser_for_statement): Dito.
3582 * c-typeck.c (c_finish_loop): Dito.
3584 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3586 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3587 OPT_Wshift_count_overflow in the warnings.
3589 2014-10-30 Marek Polacek <polacek@redhat.com>
3591 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3592 print the stripped version as well, if they're not the same.
3594 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3596 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3599 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
3601 * c-decl.c: Adjust include files.
3602 * c-parser.c: Ditto.
3604 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3605 Tom Tromey <tromey@redhat.com>
3607 * c-tree.h (enum c_oracle_request): New.
3608 (c_binding_oracle_function): New typedef.
3609 (c_binding_oracle, c_pushtag, c_bind): Declare.
3610 * c-decl.c (c_binding_oracle): New global.
3611 (I_SYMBOL_CHECKED): New macro.
3612 (i_symbol_binding): New function.
3613 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3614 (I_TAG_CHECKED): New macro.
3615 (i_tag_binding): New function.
3616 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3617 (I_LABEL_CHECKED): New macro.
3618 (i_label_binding): New function.
3619 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3620 (c_print_identifier): Save and restore c_binding_oracle.
3621 (c_pushtag, c_bind): New functions.
3623 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
3625 * c-typeck.c: Adjust include files.
3627 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3630 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3631 initialization here...
3632 (c_initialize_diagnostics): ... but here. Set defaults after
3633 building pretty-printer.
3635 2014-10-23 Marek Polacek <polacek@redhat.com>
3638 * c-decl.c (pop_scope): Don't print warning in external_scope.
3640 2014-10-19 Marek Polacek <polacek@redhat.com>
3643 * c-typeck.c (output_init_element): Allow initializing objects with
3644 static storage duration with compound literals even in C99 and add
3647 2014-10-17 Marek Polacek <polacek@redhat.com>
3650 * c-typeck.c (digest_init): Allow initializing objects with static
3651 storage duration with compound literals even in C99 and add pedwarn
3654 2014-10-17 Marek Polacek <polacek@redhat.com>
3657 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3658 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3659 error multiple times. Print the type.
3661 2014-10-17 Marek Polacek <polacek@redhat.com>
3664 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3667 2014-10-17 Marek Polacek <polacek@redhat.com>
3669 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3670 (start_function): Use OPT_Wimplicit_int instead of 0.
3671 (store_parm_decls_oldstyle): Likewise.
3673 2014-10-17 Alan Modra <amodra@gmail.com>
3676 * c-decl.c (merge_decls): Don't merge section name or tls model
3677 to newdecl symtab node, instead merge to olddecl. Override
3678 existing olddecl section name. Set tls_model for all thread-local
3679 vars, not just OMP thread-private ones. Remove incorrect comment.
3681 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
3683 * c-decl.c: Adjust include files.
3685 2014-10-14 DJ Delorie <dj@redhat.com>
3687 * c-parser.c (c_parse_init): Add RID entries for each __intN.
3688 (c_token_starts_typename): Check all __intN, not just __int128.
3689 (c_token_starts_declspecs): Likewise.
3690 (c_parser_declspecs): Likewise.
3691 (c_parser_attribute_any_word): Likewise.
3692 (c_parser_objc_selector): Likewise.
3693 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3694 (struct c_declspecs): Add int_n_idx field to record *which* __intN
3696 * c-decl.c (declspecs_add_type): Check for all __intN, not just
3698 (finish_declspecs): Likewise.
3700 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
3702 * c-parser.c (c_parser_all_labels): New function to replace
3704 (c_parser_statement): Call the new function.
3706 2014-10-09 Marek Polacek <polacek@redhat.com>
3709 * c-typeck.c (pop_init_level): Don't warn about initializing
3712 2014-10-07 Marek Polacek <polacek@redhat.com>
3715 * c-decl.c (header_for_builtin_fn): New function.
3716 (implicitly_declare): Suggest which header to include.
3718 2014-10-07 Marek Polacek <polacek@redhat.com>
3720 * c-convert.c (convert): Use error_operand_p.
3721 * c-typeck.c (require_complete_type): Likewise.
3722 (really_atomic_lvalue): Likewise.
3723 (digest_init): Likewise.
3724 (handle_omp_array_sections_1): Likewise.
3726 2014-10-03 Marek Polacek <polacek@redhat.com>
3729 * c-decl.c (pop_scope): Don't warn about "inline function declared
3730 but never defined" for functions marked with gnu_inline attribute.
3732 2014-09-25 Jakub Jelinek <jakub@redhat.com>
3735 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3736 on low_bound and length.
3738 2014-09-24 Marek Polacek <polacek@redhat.com>
3742 * c-parser.c: Don't define CPP_KEYWORD.
3743 (c_parser_switch_statement): Pass original type to c_finish_case.
3744 * c-tree.h (c_finish_case): Update declaration.
3745 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3746 conditionally to c_do_switch_warnings.
3748 2014-09-03 Marek Polacek <polacek@redhat.com>
3751 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3754 2014-09-02 Jakub Jelinek <jakub@redhat.com>
3755 Balaji V. Iyer <balaji.v.iyer@intel.com>
3756 Igor Zamyatin <igor.zamyatin@intel.com>
3758 * c-parser.c (c_parser_cilk_for): New function.
3759 (c_parser_cilk_grainsize): Likewise.
3760 (c_get_temp_regvar): Likewise.
3761 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3762 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3763 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3764 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3767 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3769 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3770 with using HOST_WIDE_INT without truncation to 'int'
3772 2014-08-22 Marek Polacek <polacek@redhat.com>
3775 * c-typeck.c (parser_build_binary_op): Adjust call to
3776 warn_logical_not_parentheses.
3778 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3781 * c-parser.c (c_parser_array_notation): Check for correct
3782 type of an array added.
3784 2014-08-19 Marek Polacek <polacek@redhat.com>
3787 * c-typeck.c (build_binary_op): If either operand of a comparison
3788 is a boolean expression, call maybe_warn_bool_compare.
3790 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3793 * c-typeck.c (build_c_cast): Do a conversion even when the
3794 TYPE_MAIN_VARIANTs are the same.
3796 2014-08-19 Marek Polacek <polacek@redhat.com>
3798 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3799 pedwarn_c99 instead of pedwarn.
3800 (grokfield): Likewise.
3801 (warn_defaults_to): New function.
3802 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3803 Unconditionally call pedwarn_c99 instead of pedwarn.
3804 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3805 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3806 check flag_isoc11 before.
3807 * c-errors.c (pedwarn_c99): Change the return type to bool.
3808 Handle -Wc99-c11-compat.
3809 * c-parser.c (disable_extension_diagnostics): Handle
3810 warn_c99_c11_compat.
3811 (restore_extension_diagnostics): Likewise.
3812 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3813 instead of pedwarn, don't check flag_isoc11 before.
3814 (c_parser_declspecs): Likewise.
3815 (c_parser_alignas_specifier): Likewise.
3816 (c_parser_alignof_expression): Likewise.
3817 (c_parser_generic_selection): Likewise.
3818 * c-tree.h (pedwarn_c99): Update declaration.
3819 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3822 2014-08-19 Marek Polacek <polacek@redhat.com>
3824 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3826 * c-errors.c: Include "opts.h".
3827 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3828 * c-parser.c (disable_extension_diagnostics): Handle negative value
3829 of warn_c90_c99_compat, too.
3830 (restore_extension_diagnostics): Likewise.
3831 (c_parser_compound_statement_nostart): Pass
3832 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3834 2014-08-12 Marek Polacek <polacek@redhat.com>
3836 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3838 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3840 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3842 2014-08-10 Marek Polacek <polacek@redhat.com>
3845 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3846 Call pedwarn_c90 instead of pedwarn.
3847 (check_bitfield_type_and_width): Likewise.
3848 (declspecs_add_qual): Likewise.
3849 (declspecs_add_type): Likewise.
3850 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3851 Adjust to only call pedwarn_c90.
3852 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
3853 pedwarn_c90 instead of pedwarn.
3854 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3855 * c-parser.c (disable_extension_diagnostics): Handle
3856 warn_c90_c99_compat.
3857 (restore_extension_diagnostics): Likewise.
3858 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
3859 pedwarn_c90 instead of pedwarn.
3860 (c_parser_initelt): Likewise.
3861 (c_parser_postfix_expression): Likewise.
3862 (c_parser_postfix_expression_after_paren_type): Likewise.
3863 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3864 * c-tree.h: Fix formatting.
3865 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
3866 pedwarn_c90 instead of pedwarn.
3868 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
3870 * c-typeck.c: Remove include of pointer-set.h.
3872 2014-08-07 Marek Polacek <polacek@redhat.com>
3874 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3876 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3878 * c-typeck.c: Use hash_map instead of pointer_map.
3880 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3882 * c-decl.c: Use hash_set instead of pointer_set.
3884 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
3887 * c-array-notation.c (expand_array_notations): Handling
3890 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
3893 * c-typeck.c (c_finish_return): Return 0 instead of the address of
3896 2014-07-30 Tom Tromey <tromey@redhat.com>
3898 * c-typeck.c (struct constructor_stack) <designator_depth>: New
3900 (really_start_incremental_init, push_init_level): Initialize
3902 (pop_init_level): Set global designator_depth.
3903 (process_init_element): Check for designated_init attribute.
3905 2014-07-20 Marek Polacek <polacek@redhat.com>
3908 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
3909 (implicitly_declare): Pass location to implicit_decl_warning.
3911 2014-07-14 Jakub Jelinek <jakub@redhat.com>
3914 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
3915 If non-NULL, call c_parser_check_literal_zero.
3916 (c_parser_check_literal_zero): New function.
3917 (c_parser_postfix_expression_after_primary): Adjust
3918 c_parser_expr_list caller, handle -Wmemset-transposed-args.
3920 2014-07-06 Marek Polacek <polacek@redhat.com>
3923 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
3924 * c-tree.h (C_ARRAY_PARAMETER): Define.
3925 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
3928 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
3929 Chen Gang <gang.chen.5i5j@gmail.com>
3931 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
3934 2014-07-01 Marek Polacek <polacek@redhat.com>
3936 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
3937 instead of 0 to WARN_FOR_ASSIGNMENT.
3939 2014-07-01 Marek Polacek <polacek@redhat.com>
3942 * c-typeck.c (convert_for_assignment): Pass
3943 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
3945 2014-06-30 Marek Polacek <polacek@redhat.com>
3947 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
3948 has no_sanitize_undefined attribute.
3950 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
3953 * c-array-notation.c (fix_builtin_array_notation_fn):
3954 Check for 0 arguments in builtin call. Check that bultin argument is
3956 * c-parser.c (c_parser_array_notation): Check for incorrect initial
3959 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
3961 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3962 qualifiers in __auto_type for atomic types.
3963 (c_parser_typeof_specifier): Discard all type qualifiers in
3964 __typeof__ for atomic types.
3966 2014-06-25 Marek Polacek <polacek@redhat.com>
3969 * c-parser.c (c_parser_statement_after_labels): Pass the location of
3970 the return expression to c_finish_return.
3972 2014-06-25 Jakub Jelinek <jakub@redhat.com>
3974 * c-typeck.c (c_finish_omp_clauses): Make sure
3975 OMP_CLAUSE_LINEAR_STEP has correct type.
3977 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
3981 2014-06-24 Jakub Jelinek <jakub@redhat.com>
3983 * c-parser.c (c_parser_omp_for_loop): For
3984 #pragma omp parallel for simd move lastprivate clause from parallel
3985 to for rather than simd.
3987 2014-06-23 Marek Polacek <polacek@redhat.com>
3989 * c-typeck.c (parser_build_binary_op): Don't call
3990 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3992 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
3994 * c-parser.c (c_parser_omp_threadprivate): Likewise.
3995 * c-decl.c (merge_decls): Likewise.
3997 2014-06-09 Marek Polacek <polacek@redhat.com>
4000 * c-typeck.c (error_init): Call inform instead of error_at.
4001 (pedwarn_init): Call inform instead of pedwarn.
4002 (warning_init): Call inform instead of warning_at.
4004 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
4006 * c-decl.c (merge_decls): Use set_decl_section_name.
4007 (duplicate_decls): Remove node if it exists.
4009 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
4012 * c-typeck.c (push_init_level, process_init_element,
4013 pop_init_level): Correct check for zero initialization, move
4014 missing brace warning to respect zero initialization.
4016 2014-06-05 Marek Polacek <polacek@redhat.com>
4019 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
4021 2014-06-05 Marek Polacek <polacek@redhat.com>
4024 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
4025 on the left hand side operand of a comparison.
4027 2014-06-05 Marek Polacek <polacek@redhat.com>
4030 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
4031 Print note only if the warning was printed.
4033 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
4036 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4039 2014-06-03 Marek Polacek <polacek@redhat.com>
4042 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4044 * c-tree.h (c_start_case): Update.
4045 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4046 switch condition has boolean value.
4048 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
4050 * c-decl.c: Include builtins.h.
4051 * c-parser.c: Likewise.
4053 2014-05-27 Marek Polacek <polacek@redhat.com>
4056 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4057 error and warning calls to error_at and warning_at. Pass location of
4058 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4059 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4060 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4062 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4065 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4066 function parameters.
4068 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
4070 * c-decl.c (merge_decls): Preserve symtab node pointers.
4071 (duplicate_decls): Free new decl.
4073 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4075 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4078 * c-parser.c (c_parser_omp_target): Return bool values.
4080 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4082 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4083 num_teams_loc variable to num_thread_limit_loc.
4085 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4087 * c-array-notation.c (expand_array_notations): Use void_node
4088 instead of void_zero_node.
4090 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4092 * c-decl.c (finish_struct): Adjust.
4093 (finish_enum): Likewise.
4095 (record_inline_static): Likewise.
4096 (push_scope): Likewise.
4097 (make_label): Likewise.
4098 (lookup_label_for_goto): Likewise.
4099 (finish_struct): Likewise.
4100 (finish_enum): Likewise.
4101 (store_parm_decls): Likewise.
4102 (c_push_function_context): Likewise.
4103 * c-lang.h: Remove usage of variable_size gty attribute.
4104 * c-parser.c (c_parse_init): Adjust.
4105 (c_parse_file): Likewise.
4107 2014-05-13 Marek Polacek <polacek@redhat.com>
4110 * c-typeck.c (convert_for_assignment): Pass location to
4111 WARN_FOR_ASSIGNMENT instead of input_location.
4113 2014-05-10 Marek Polacek <polacek@redhat.com>
4115 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4116 maybe_warn_string_init.
4117 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4118 maybe_warn_string_init.
4119 * c-tree.h (maybe_warn_string_init): Update declaration.
4120 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4121 Call pedwarn_init with loc instead of with input_location.
4122 (digest_init): Pass init_loc to maybe_warn_string_init.
4123 (pop_init_level): Call pedwarn_init with loc instead of with
4125 (set_init_index): Likewise.
4126 (process_init_element): Likewise.
4128 2014-05-09 Marek Polacek <polacek@redhat.com>
4131 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4132 (c_parser_initelt): Pass location to set_init_label. Pass array index
4133 location to set_init_index.
4134 * c-tree.h (push_init_level): Update declaration.
4135 (pop_init_level): Likewise.
4136 (set_init_index): Likewise.
4137 (set_init_label): Likewise.
4138 * c-typeck.c (error_init): Add location parameter. Call error_at
4140 (digest_init): Pass init_loc to error_init.
4141 (really_start_incremental_init):
4142 (push_init_level): Add location parameter. Pass loc to pop_init_level
4144 (pop_init_level): Likewise.
4145 (set_designator): Add location parameter. Pass loc to pop_init_level,
4146 push_init_level, and error_init.
4147 (set_init_index): Add location parameter. Pass loc to error_init and
4149 (set_init_label): Likewise.
4150 (output_init_element): Pass loc to error_init.
4151 (process_init_element): Pass loc to error_init, pop_init_level,
4152 pedwarn_init, and push_init_level.
4154 2014-05-09 Marek Polacek <polacek@redhat.com>
4157 * c-parser.c (c_parser_attributes): Parse the arguments as an
4158 expression-list if the attribute takes identifier.
4160 2014-05-08 Marek Polacek <polacek@redhat.com>
4163 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4166 2014-05-08 Marek Polacek <polacek@redhat.com>
4169 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4172 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4173 Mike Stump <mikestump@comcast.net>
4174 Richard Sandiford <rdsandiford@googlemail.com>
4176 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4177 (finish_enum): Use wide-int interfaces.
4178 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4179 * c-typeck.c (build_c_cast): Likewise.
4180 (set_nonincremental_init_from_string): Likewise.
4181 (c_tree_equal): Likewise.
4183 2014-05-02 Marek Polacek <polacek@redhat.com>
4186 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4187 Return size_one_node when the type is not complete.
4188 (pointer_diff): Remove comment.
4189 (build_unary_op): Improve error messages.
4191 2014-05-02 Marek Polacek <polacek@redhat.com>
4193 * c-typeck.c (c_finish_return): Separate warning_at calls.
4195 2014-05-02 Marek Polacek <polacek@redhat.com>
4197 * c-tree.h (error_init): Remove declaration.
4198 (pedwarn_init): Likewise.
4199 * c-typeck.c (error_init): Make static and move above.
4200 (pedwarn_init): Likewise.
4201 (warning_init): Move above.
4202 (maybe_warn_string_init): Likewise.
4204 2014-05-01 Jeff Law <law@redhat.com>
4208 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4209 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4212 2014-05-02 Marek Polacek <polacek@redhat.com>
4215 * c-typeck.c (push_init_level): Set constructor_designated to
4216 p->designated for structures.
4218 2014-05-01 Marek Polacek <polacek@redhat.com>
4221 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4222 function-definition has an attribute after the declarator.
4224 2014-05-01 Marek Polacek <polacek@redhat.com>
4227 * c-typeck.c (warning_init): Add location_t parameter. Call
4228 warning_at instead of warning.
4229 (push_init_level): Pass input_location to warning_init.
4230 (add_pending_init): Add location_t parameter. Pass loc to
4232 (set_nonincremental_init): Pass input_location to add_pending_init.
4233 (set_nonincremental_init_from_string): Likewise.
4234 (output_init_element): Pass loc to warning_init and to
4237 2014-05-01 Marek Polacek <polacek@redhat.com>
4240 * c-typeck.c (c_finish_return): Distinguish between label and variable
4241 when warning about returning local address.
4243 2014-05-01 Marek Polacek <polacek@redhat.com>
4246 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4249 2014-05-01 Marek Polacek <polacek@redhat.com>
4252 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4253 instead of 0 to WARN_FOR_QUALIFIERS.
4255 2014-05-01 Marek Polacek <polacek@redhat.com>
4258 * c-typeck.c (default_conversion): Use better location for
4261 2014-04-30 Marek Polacek <polacek@redhat.com>
4263 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4264 also when SANITIZE_FLOAT_DIVIDE is on.
4266 2014-04-30 Marek Polacek <polacek@redhat.com>
4269 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4270 and pedwarn_init. Use loc insted of input_location.
4272 2014-04-30 Marek Polacek <polacek@redhat.com>
4275 * c-typeck.c (build_binary_op): Use location when warning about
4278 2014-04-25 Marek Polacek <polacek@redhat.com>
4281 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4282 always_inline/noinline and hot/cold attributes.
4284 2014-04-25 Marek Polacek <polacek@redhat.com>
4287 * c-parser.c (c_parser_initelt): Pass input_location to
4288 process_init_element.
4289 (c_parser_initval): Pass loc to process_init_element.
4290 * c-tree.h (process_init_element): Adjust declaration.
4291 * c-typeck.c (push_init_level): Pass input_location to
4292 process_init_element.
4293 (pop_init_level): Likewise.
4294 (set_designator): Likewise.
4295 (output_init_element): Add location_t parameter. Pass loc to
4297 (output_pending_init_elements): Pass input_location to
4298 output_init_element.
4299 (process_init_element): Add location_t parameter. Pass loc to
4300 output_init_element.
4302 2014-04-24 Jakub Jelinek <jakub@redhat.com>
4304 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4305 atomic-clause, allow comma in between atomic-clause and
4308 2014-04-22 Jakub Jelinek <jakub@redhat.com>
4311 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4312 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4314 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4317 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4318 create_tmp_var instead build_decl for creating temps.
4319 (build_array_notation_expr): Likewise.
4320 (fix_conditional_array_notations_1): Likewise.
4321 (fix_array_notation_expr): Likewise.
4322 (fix_array_notation_call_expr): Likewise.
4324 2014-03-28 Jakub Jelinek <jakub@redhat.com>
4327 * c-tree.h (c_build_function_call_vec): New prototype.
4328 * c-typeck.c (build_function_call_vec): Don't call
4329 resolve_overloaded_builtin here.
4330 (c_build_function_call_vec): New wrapper function around
4331 build_function_call_vec. Call resolve_overloaded_builtin here.
4332 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4333 Call c_build_function_call_vec instead of build_function_call_vec.
4334 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4335 * c-decl.c (finish_decl): Likewise.
4337 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4340 * c-typeck.c: Use correct format string in cast-qual warning
4342 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4344 * c-decl.c (c_decl_attributes): Use
4345 lang_hooks.types.omp_mappable_type.
4346 * c-typeck.c (c_finish_omp_clauses): Likewise.
4348 2014-03-06 Marek Polacek <polacek@redhat.com>
4351 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4352 of checking tree code.
4354 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4356 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4357 (c_parser_parameter_declaration): Likewise.
4359 2014-02-19 Marek Polacek <polacek@redhat.com>
4362 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4363 Call mark_exp_read on exp.value.
4364 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4365 TREE_ADDRESSABLE on old instead of val.
4366 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4368 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4370 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4371 C_EXPR_APPEND by vec_safe_push.
4372 * c-tree.h (C_EXPR_APPEND): Remove.
4374 2014-01-31 Marek Polacek <polacek@redhat.com>
4377 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4378 build_function_call_vec.
4379 (build_function_call): Likewise.
4380 (build_atomic_assign): Likewise.
4381 (build_function_call_vec): Add arg_loc parameter. Use it.
4382 (convert_arguments): Likewise.
4383 (convert_for_assignment): Rename rhs_loc to expr_loc.
4384 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4385 (c_parser_objc_keywordexpr): Likewise.
4386 (c_parser_postfix_expression_after_primary): Call
4387 build_function_call_vec with expr_loc rather than op_loc.
4388 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4389 build_function_call_vec.
4390 (c_parser_expr_list): Add locations parameter. Fill it with locations
4391 of function arguments.
4392 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4394 2014-01-30 Marek Polacek <polacek@redhat.com>
4397 * c-typeck.c (build_function_call_vec): Use loc parameter.
4398 (convert_arguments): Add location parameter. Use it.
4399 (ep_convert_and_check): Likewise.
4400 (build_atomic_assign): Adjust convert_for_assignment call.
4401 (build_modify_expr): Likewise.
4402 (digest_init): Likewise.
4403 (c_finish_return): Likewise.
4404 (build_conditional_expr): Adjust ep_convert_and_check calls.
4405 (convert_for_assignment): Add rhs_loc parameter. Use it.
4406 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4409 2014-01-30 Richard Biener <rguenther@suse.de>
4412 * c-typeck.c (build_function_call_vec): Do not replace calls
4413 to a function via an incompatible type with a runtime abort.
4415 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4417 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4418 flag_enable_cilkplus with flag_cilkplus.
4419 (c_parser_direct_declarator_inner): Likewise.
4420 (c_parser_attribute_any_word): Likewise.
4421 (c_parser_attributes): Likewise.
4422 (c_parser_compound_statement): Likewise.
4423 (c_parser_statement_after_labels): Likewise.
4424 (c_parser_if_statement): Likewise.
4425 (c_parser_switch_statement): Likewise.
4426 (c_parser_do_statement): Likewise.
4427 (c_parser_for_statement): Likewise.
4428 (c_parser_unary_expression): Likewise.
4429 (c_parser_postfix_expression): Likewise.
4430 (c_parser_postfix_expression_after_primary): Likewise.
4431 (c_parser_postfix_expression_after_primary): Likewise.
4432 (c_parser_omp_clause_name): Likewise.
4433 (c_finish_omp_declare_simd): Likewise.
4434 (c_parser_cilk_verify_simd): Likewise.
4435 * c-typeck.c (build_array_ref): Likewise.
4436 (build_function_call_vec): Likewise.
4437 (convert_arguments): Likewise.
4438 (build_compound_expr): Likewise.
4439 (c_finish_return): Likewise.
4440 (c_finish_if_stmt): Likewise.
4441 (c_finish_loop): Likewise.
4442 (build_binary_op): Likewise.
4444 2014-01-23 Marek Polacek <polacek@redhat.com>
4447 * c-typeck.c (parser_build_binary_op): Use location instead of
4449 (build_binary_op): Pass location to shorten_compare.
4451 2014-01-23 Marek Polacek <polacek@redhat.com>
4454 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4457 2014-01-23 Marek Polacek <polacek@redhat.com>
4460 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4461 of a comma expression.
4462 (emit_side_effect_warnings): Likewise.
4464 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4467 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4468 function to use walk_tree and moved a lot of its functionality to
4469 expand_array_notations.
4470 (expand_array_notations): New function.
4472 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4474 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4475 attribute an attribute without value.
4477 2014-01-23 Jakub Jelinek <jakub@redhat.com>
4480 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4481 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4483 2014-01-22 Marek Polacek <polacek@redhat.com>
4486 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4487 of remove_c_maybe_const_expr on op1 and op2.
4489 2014-01-15 Jakub Jelinek <jakub@redhat.com>
4492 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4493 effects, preevaluate rhs using SAVE_EXPR first.
4495 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4498 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4499 statements with if-elseif statements.
4501 2014-01-06 Marek Polacek <polacek@redhat.com>
4504 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4505 defined bit-field types only in ISO C.
4507 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4509 Update copyright years
4511 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4513 * c-array-notation.c: Use the standard form for the copyright notice.
4515 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4517 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4518 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4519 field in parser is not empty. If not-empty, call the function
4520 c_parser_finish_omp_declare_simd.
4521 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4522 between SIMD-enabled functions and #pragma simd. Added new parameter.
4523 (c_parser_cilk_all_clauses): Modified the usage of the function
4524 c_parser_cilk_clause_vectorlength as mentioned above.
4525 (c_parser_cilk_simd_fn_vector_attrs): New function.
4526 (c_finish_cilk_simd_fn_tokens): Likewise.
4527 (is_cilkplus_vector_p): Likewise.
4528 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4529 "nomask," and "mask" strings in clause name.
4530 (c_parser_omp_all_clauses): Added 3 new case statements:
4531 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4532 PRAGMA_CILK_CLAUSE_NOMASK.
4533 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4534 check for vector attribute and if so call the function
4535 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4536 called the function c_finish_cilk_simd_fn_tokens.
4537 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4538 parser field is non-empty. If so, parse them as you would parse
4539 the omp declare simd pragma.
4540 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4541 Added a check when step is a parameter and flag it as error.
4542 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4543 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4546 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4548 * c-parser.c (c_parser_omp_parallel): Fix description.
4550 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4552 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4553 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4554 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4555 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4557 2013-12-04 Joseph Myers <joseph@codesourcery.com>
4560 * c-parser.c (c_parser_alignas_specifier): Use
4561 c_sizeof_or_alignof_type instead of c_alignof.
4562 (c_parser_alignof_expression): Likewise, with min_alignof
4563 parameter depending on alignof spelling used.
4565 2013-12-04 Marek Polacek <polacek@redhat.com>
4568 * c-decl.c (start_function): Don't warn for missing prototype for
4571 2013-12-03 Marek Polacek <polacek@redhat.com>
4574 * c-decl.c (build_compound_literal): Allow compound literals with
4575 empty initial value.
4577 2013-12-02 Joseph Myers <joseph@codesourcery.com>
4580 * c-typeck.c (build_modify_expr): Diagnose assignment to
4581 expression with array type.
4583 2013-11-29 Joseph Myers <joseph@codesourcery.com>
4586 * c-typeck.c (process_init_element): Do not treat a string as
4587 initializing a whole array when used with a designator for an
4590 2013-11-29 Joseph Myers <joseph@codesourcery.com>
4593 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4594 an inline function following a static declaration.
4596 2013-11-28 Jakub Jelinek <jakub@redhat.com>
4599 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4600 to p_name before calling c_parser_omp_teams instead of after.
4601 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4602 argument. Remove unused p_name variable.
4604 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
4605 Jakub Jelinek <jakub@redhat.com>
4607 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4608 external_scope is NULL.
4610 2013-11-27 Tom de Vries <tom@codesourcery.com>
4611 Marc Glisse <marc.glisse@inria.fr>
4614 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4616 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
4618 * c-typeck.c: Add required include files from gimple.h.
4620 2013-11-22 David Malcolm <dmalcolm@redhat.com>
4622 * c-decl.c (define_label, shadow_tag_warned)
4623 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4624 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4625 (declspecs_add_type): Remove use of in_system_header macro.
4626 * c-parser.c (c_parser_unary_expression): Likewise.
4627 * c-typeck.c (store_init_value, process_init_element)
4628 (c_start_case): Likewise.
4630 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4633 * c-parser.c (c_parser_set_source_position_from_token): Remove
4634 reference to in_system_header from comment.
4636 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4638 * c-decl.c (grokdeclarator): Update comment to refer to
4639 tree_to_[su]hwi rather than tree_low_cst.
4641 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4643 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4644 tree_to_uhwi throughout.
4646 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4648 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4651 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4653 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4656 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
4658 * c-parser.c (c_parser_cilk_simd): New.
4659 (c_parser_cilk_verify_simd): New.
4660 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4661 (c_parser_omp_for_loop): Add case for NE_EXPR.
4662 Set c_break_label for CILK_SIMD.
4663 (c_parser_cilk_clause_vectorlength): New.
4664 (c_parser_cilk_clause_linear): New.
4665 (c_parser_cilk_clause_name): New.
4666 (c_parser_cilk_all_clauses): New.
4667 * c-typeck.c (build_unary_op): Pass location argument to
4669 (build_modify_expr): Same.
4670 (build_asm_expr): Same.
4671 (c_finish_bc_stmt): Error on break/continue in loops.
4673 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
4675 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4677 2013-11-14 Diego Novillo <dnovillo@google.com>
4679 * c-decl.c: Include print-tree.h.
4680 Include stor-layout.h.
4683 Include stringpool.h.
4684 * c-lang.c: Include fold-const.h.
4685 * c-parser.c: Include stringpool.h.
4687 Include stor-layout.h.
4689 Include trans-mem.h.
4690 * c-typeck.c: Include stor-layout.h.
4691 Include trans-mem.h.
4695 2013-11-13 Joseph Myers <joseph@codesourcery.com>
4697 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4698 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4700 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4701 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4703 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4704 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4705 (c_parser_declarator, c_parser_direct_declarator_inner)
4706 (c_parser_parameter_declaration, c_parser_type_name): All callers
4708 (c_parser_declaration_or_fndef): Handle declarations with type
4709 determined from the initializer.
4711 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
4713 * c-typeck.c: Include gimplify.h.
4715 2013-11-12 Joseph Myers <joseph@codesourcery.com>
4717 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4718 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4720 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4721 or _Thread_local as appropriate in diagnostics.
4722 (build_null_declspecs): Initialize ret->thread_gnu_p.
4723 (declspecs_add_scspec): Handle either __thread or _Thread_local
4724 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
4725 pedantic. Do not disallow _Thread_local extern and _Thread_local
4728 2013-11-07 Joseph Myers <joseph@codesourcery.com>
4729 Andrew MacLeod <amacleod@redhat.com>
4731 * c-aux-info.c (gen_type): Handle atomic qualifier.
4732 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4733 qualifiers when compating types.
4734 (shadow_tag_warned): Handle atomic_p in declspecs.
4735 (quals_from_declspecs): Likewise.
4736 (start_decl): Use c_type_promotes_to when promoting argument
4738 (grokdeclarator): Handle _Atomic.
4739 (get_parm_info): Diagnose any qualifier on "void" as only
4741 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4742 comparing types. Use c_type_promotes_to when promoting argument
4744 (finish_function): Use c_type_promotes_to when promoting argument
4746 (build_null_declspecs): Handle atomic_p in declspecs.
4747 (declspecs_add_qual): Handle RID_ATOMIC.
4748 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4749 (c_token_starts_declspecs): Handle RID_ATOMIC.
4750 (c_parser_declspecs): Handle atomic type specifiers and
4752 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4753 from types of expressions with atomic type.
4754 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4755 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4756 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4757 (c_parser_statement_after_labels, c_parser_switch_statement)
4758 (c_parser_for_statement, c_parser_expr_no_commas)
4759 (c_parser_conditional_expression, c_parser_binary_expression)
4760 (c_parser_cast_expression, c_parser_unary_expression)
4761 (c_parser_postfix_expression)
4762 (c_parser_postfix_expression_after_primary, c_parser_expression):
4763 Use convert_lvalue_to_rvalue.
4764 (c_parser_expression_conv, c_parser_expr_list): Document
4765 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4766 (c_parser_objc_synchronized_statement): Use
4767 convert_lvalue_to_rvalue.
4768 (c_parser_objc_selector): Handle RID_ATOMIC.
4769 (c_parser_objc_receiver, c_parser_array_notation): Use
4770 convert_lvalue_to_rvalue.
4771 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4772 _Atomic (type-name).
4773 (struct c_declspecs): Add atomic_p field.
4774 (convert_lvalue_to_rvalue): Declare.
4775 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4776 corresponding atomic types.
4777 (qualify_type): Don't add _Atomic qualifiers from second argument.
4778 (comp_target_types): Do not allow _Atomic mismatches.
4779 (type_lists_compatible_p): Do not remove atomic qualifiers when
4781 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4782 (build_atomic_assign): New functions.
4783 (build_unary_op): Use build_atomic_assign for atomic increment and
4785 (build_conditional_expr): Do not treat _Atomic void as a qualified
4787 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4788 (find_anonymous_field_with_type, convert_to_anonymous_field)
4789 (convert_for_assignment): Do not remove atomic qualifiers when
4791 (digest_init): Do not accept initialization of arrays of atomic
4792 elements by string constants.
4793 (build_asm_expr): Use convert_lvalue_to_rvalue.
4794 (build_binary_op): Do not treat _Atomic void as a qualified
4797 2013-11-06 DJ Delorie <dj@redhat.com>
4799 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4800 both explicit and builtin, print the location of the explicit one.
4802 2013-11-05 Tobias Burnus <burnus@net-b.de>
4804 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4805 c_parser_omp_distribute, c_parser_omp_teams,
4806 c_parser_omp_target, c_parser_omp_declare): Handle
4809 2013-11-03 Marek Polacek <polacek@redhat.com>
4811 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4813 2013-11-01 Jakub Jelinek <jakub@redhat.com>
4815 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4816 check_dup_generic at the end, unless remove is true.
4817 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4819 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4821 2013-10-31 Jakub Jelinek <jakub@redhat.com>
4823 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4824 with decl that is not pointer nor array.
4826 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4828 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4829 a spawning function is found.
4830 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4831 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4832 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4833 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4835 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4836 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4838 (c_finish_return): Added a check to reject _Cilk_spawn in return
4840 (build_cilk_spawn): New function.
4841 (build_cilk_sync): Likewise.
4842 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4844 2013-10-27 Tobias Burnus <burnus@net-b.de>
4847 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4848 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4849 (c_parser_statement_after_labels): Update calls.
4851 2013-10-24 Tobias Burnus <burnus@net-b.de>
4854 * c-parser.c (c_parser_pragma, c_parser_for_statement):
4855 Handle PRAGMA_IVDEP.
4856 (c_parser_statement_after_labels): Update call.
4858 2013-10-24 Marek Polacek <polacek@redhat.com>
4860 * c-parser.c (c_parser_struct_declaration): Add a comment.
4861 (c_parser_declarator): Don't allow _Alignas here.
4863 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
4865 * c-parser.c: Include omp-low.h.
4866 * c-typeck.c: Likewise.
4868 2013-10-17 Marek Polacek <polacek@redhat.com>
4871 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4872 Document syntax of the array-declarator.
4873 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4875 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4876 (c_parser_struct_declaration): Likewise.
4877 (c_parser_declarator): Likewise.
4878 (c_parser_direct_declarator_inner): Likewise.
4879 (c_parser_parameter_declaration): Likewise.
4880 (c_parser_type_name): Likewise.
4882 2013-10-11 Jakub Jelinek <jakub@redhat.com>
4884 * c-lang.h (current_omp_declare_target_attribute): New extern
4886 * c-parser.c: Include c-lang.h.
4887 (struct c_parser): Change tokens to c_token *.
4888 Add tokens_buf field. Change tokens_avail type to unsigned int.
4889 (c_parser_consume_token): If parser->tokens isn't
4890 &parser->tokens_buf[0], increment parser->tokens.
4891 (c_parser_consume_pragma): Likewise.
4892 (enum pragma_context): Add pragma_struct and pragma_param.
4893 (c_parser_external_declaration): Adjust
4894 c_parser_declaration_or_fndef caller.
4895 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4896 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4897 Adjust recursive call.
4898 (c_parser_struct_or_union_specifier): Use pragma_struct instead
4900 (c_parser_parameter_declaration): Use pragma_param instead of
4902 (c_parser_compound_statement_nostart, c_parser_label,
4903 c_parser_for_statement): Adjust
4904 c_parser_declaration_or_fndef callers.
4905 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
4906 it through to c_parser_conditional_expression.
4907 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
4908 pass it through to c_parser_binary_expression. Adjust recursive
4910 (c_parser_binary_expression): Remove prec argument, add
4911 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
4912 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
4913 binop matches it, use build2 instead of parser_build_binary_op.
4914 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
4915 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
4916 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
4917 Handle pragma_struct and pragma_param the same as pragma_external.
4918 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
4919 (c_parser_omp_variable_list): Parse array sections for
4920 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
4921 (c_parser_omp_clause_collapse): Fully fold collapse expression.
4922 (c_parser_omp_clause_reduction): Handle user defined reductions.
4923 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
4924 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
4925 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
4926 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
4927 c_parser_omp_clause_depend, c_parser_omp_clause_map,
4928 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
4929 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
4930 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
4931 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
4932 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
4933 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
4934 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
4935 (c_parser_omp_for_loop): Add CODE argument, pass it through
4936 to c_finish_omp_for. Change last argument to cclauses,
4937 and adjust uses to grab parallel clauses from the array of all
4938 the split clauses. Adjust c_parser_binary_expression,
4939 c_parser_declaration_or_fndef and c_finish_omp_for callers.
4940 (omp_split_clauses): New function.
4941 (c_parser_omp_simd): New function.
4942 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
4943 Allow the function to be called also when parsing combined constructs,
4944 and call c_parser_omp_simd when parsing for simd.
4945 (c_parser_omp_sections_scope): If section-sequence doesn't start with
4946 #pragma omp section, require exactly one structured-block instead of
4947 sequence of statements.
4948 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
4949 Allow the function to be called also when parsing combined constructs.
4950 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
4951 Allow the function to be called also when parsing combined
4953 (c_parser_omp_taskgroup, c_parser_omp_cancel,
4954 c_parser_omp_cancellation_point, c_parser_omp_distribute,
4955 c_parser_omp_teams, c_parser_omp_target_data,
4956 c_parser_omp_target_update, c_parser_omp_target,
4957 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
4958 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
4959 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
4960 (c_parser_omp_construct): Add p_name and mask vars. Handle
4961 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4962 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
4963 and c_parser_omp_sections callers.
4964 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4965 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4966 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
4967 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
4968 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
4970 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
4971 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
4972 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
4973 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
4974 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
4975 * c-typeck.c: Include tree-inline.h.
4976 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4977 handle_omp_array_sections_1, handle_omp_array_sections,
4978 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4979 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4980 user defined reductions.
4981 (c_tree_equal): New function.
4982 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4983 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4984 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4985 c_check_omp_declare_reduction_r): New prototypes.
4986 * c-decl.c (current_omp_declare_target_attribute): New variable.
4987 (c_decl_attributes): New function.
4988 (start_decl, start_function): Use it instead of decl_attributes.
4989 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4990 c_omp_reduction_decl, c_omp_reduction_lookup,
4991 c_check_omp_declare_reduction_r): New functions.
4993 2013-09-25 Tom Tromey <tromey@redhat.com>
4995 * Make-lang.in (c/gccspec.o): Remove.
4996 (CFLAGS-c/gccspec.o): New variable.
4997 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4998 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4999 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
5001 2013-09-25 Tom Tromey <tromey@redhat.com>
5003 * Make-lang.in (c/gccspec.o): Don't use subshell.
5005 2013-09-18 Marek Polacek <polacek@redhat.com>
5008 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
5009 Remove unnecessary check.
5011 2013-09-18 Marek Polacek <polacek@redhat.com>
5014 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
5015 no_sanitize_undefined attribute.
5017 2013-09-13 Kai Tietz <ktietz@redhat.com>
5020 * c-decl.c (c_builtin_function_ext_scope): Remove
5021 wrong assumption that it is never called on prexisting
5024 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5026 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
5028 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5030 * c-objc-common.c (c_tree_printer): Tidy.
5032 2013-08-30 Marek Polacek <polacek@redhat.com>
5034 * c-typeck.c (build_binary_op): Add division by zero and shift
5037 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
5038 Joseph Myers <joseph@codesourcery.com>
5041 * c-typeck.c (c_common_type): Prefer double_type_node over
5042 other REAL_TYPE types with the same precision.
5043 (convert_arguments): Likewise.
5045 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5047 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5048 (c_initialize_diagnostics): Call a destructor for the early printer.
5050 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5052 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5053 printer initialization.
5055 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
5058 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5059 check for truth values.
5060 (expand_array_notation_exprs): Added truth values case. Removed an
5061 unwanted else. Added for-loop to walk through subtrees in default
5064 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5066 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5068 2013-07-23 Joseph Myers <joseph@codesourcery.com>
5070 * c-parser.c (struct c_generic_association): Fix typo.
5072 2013-07-23 Tom Tromey <tromey@redhat.com>
5073 Joseph Myers <joseph@codesourcery.com>
5075 * c-parser.c (struct c_generic_association): New.
5076 (c_generic_association_d): New typedef.
5077 (c_parser_generic_selection): New function.
5078 (c_parser_postfix_expression): Handle RID_GENERIC.
5080 2013-07-13 Jason Merrill <jason@redhat.com>
5083 * c-decl.c (finish_struct): Check for too-large class.
5085 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
5088 * c-typeck.c (set_init_index): When folding, check for index overflow.
5090 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5092 * c-parser.c (c_parser_array_notation): Removed rejection of array
5093 notations in an array of function pointers.
5095 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5097 * c-array-notation.c (make_triplet_val_inv): New function.
5098 (create_cmp_incr): Likewise.
5099 (create_array_refs): Likewise.
5100 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5101 Also modularized common parts between functions and called the function.
5102 (build_array_notation_expr): Likewise.
5103 (fix_conditional_array_notations_1): Likewise.
5104 (fix_array_notation_expr): Likewise.
5105 (fix_array_notation_call_expr): Likewise.
5107 2013-06-18 Marek Polacek <polacek@redhat.com>
5110 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5112 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5114 * c-array-notation.c (build_array_notation_expr): Reject array notation
5115 mismatch between LHS and RHS even inside a call_expr. Also, removed
5116 a couple while statements that were dead code.
5118 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5120 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5121 excessive precision expressions in function parameters. Also removed
5122 couple unwanted while statements.
5124 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5126 * c-array-notation.c (expand_array_notation_exprs): Added
5127 ARRAY_NOTATION_REF case.
5129 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5131 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5132 function to c-family/array-notation-common.c.
5133 (is_cilkplus_reduce_builtin): Likewise.
5134 (find_rank): Likewise.
5135 (extract_array_notation_exprs): Likewise.
5136 (replace_array_notations): Likewise.
5137 (find_inv_trees): Likewise.
5138 (replace_inv_trees): Likewise.
5139 (contains_array_notation_expr): Likewise.
5140 (find_correct_array_notation_type): Likewise.
5141 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5142 (struct inv_list): Moved this to c-family/array-notation-common.c.
5143 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5145 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5147 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5148 reduction functions outside the for-loop. Added a check if the fundecl
5149 is non-NULL. Finally, removed an unwanted if-statement, and made the
5152 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5154 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5155 condition of the if-statement matches the rank of else-block and then-
5156 block when array notations are used.
5157 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5158 expression after the entire function body is parsed.
5159 (c_parser_expr_no_commas): Delayed creating array notation expressions
5160 to the end of function parsing.
5161 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5162 whole if-statement instead of just the condition.
5163 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5165 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5168 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5169 array to NULL_TREE if they are unused. Also added a check for the
5170 field to be NULL before its fields are used in future.
5172 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5175 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5176 (build_array_notation_expr): Likewise.
5178 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5180 * c-typeck.c (build_array_ref): Added a check to see if array's
5181 index is greater than one. If true, then emit an error.
5182 (build_function_call_vec): Exclude error reporting and checking
5183 for builtin array-notation functions.
5184 (convert_arguments): Likewise.
5185 (c_finish_return): Added a check for array notations as a return
5186 expression. If true, then emit an error.
5187 (c_finish_loop): Added a check for array notations in a loop
5188 condition. If true then emit an error.
5189 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5190 (build_binary_op): Added a check for array notation expr inside
5191 op1 and op0. If present, we call another function to find correct
5193 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5194 * c-parser.c (c_parser_compound_statement): Check if array
5195 notation code is used in tree, if so, then transform them into
5197 (c_parser_expr_no_commas): Check if array notation is used in LHS
5198 or RHS, if so, then build array notation expression instead of
5200 (c_parser_postfix_expression_after_primary): Added a check for
5201 colon(s) after square braces, if so then handle it like an array
5202 notation. Also, break up array notations in unary op if found.
5203 (c_parser_direct_declarator_inner): Added a check for array
5205 (c_parser_compound_statement): Added a check for array notation in
5206 a stmt. If one is present, then expand array notation expr.
5207 (c_parser_if_statement): Likewise.
5208 (c_parser_switch_statement): Added a check for array notations in
5209 a switch statement's condition. If true, then output an error.
5210 (c_parser_while_statement): Similarly, but for a while.
5211 (c_parser_do_statement): Similarly, but for a do-while.
5212 (c_parser_for_statement): Similarly, but for a for-loop.
5213 (c_parser_unary_expression): Check if array notation is used in a
5214 pre-increment or pre-decrement expression. If true, then expand
5216 (c_parser_array_notation): New function.
5217 * c-array-notation.c: New file.
5218 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5220 2013-05-23 Mike Stump <mikestump@comcast.net>
5222 * c-typeck.c (convert_for_assignment): Handle references to memory
5225 2013-05-16 Jason Merrill <jason@redhat.com>
5227 * Make-lang.in (cc1$(exeext)): Use link mutex.
5229 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5231 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5232 to simply use OPT_Wpointer_arith.
5233 (build_unary_op): Likewise.
5235 2013-04-03 Jakub Jelinek <jakub@redhat.com>
5238 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5239 argument. If set, or it temporarily for parsing of the first
5240 argument into force_folding_builtin_constant_p.
5241 (c_parser_postfix_expression): Adjust callers.
5243 2013-03-21 Richard Biener <rguenther@suse.de>
5245 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5246 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5248 2013-02-12 Marek Polacek <polacek@redhat.com>
5251 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5254 2013-01-24 Jakub Jelinek <jakub@redhat.com>
5257 * c-typeck.c (set_nonincremental_init_from_string): If
5258 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5260 (process_init_element): Likewise.
5262 2012-12-20 Jakub Jelinek <jakub@redhat.com>
5265 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5266 argument, don't call default_function_array_conversion
5267 nor c_fully_fold here.
5268 (c_parser_asm_statement): Adjust callers.
5269 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5270 and outputs here, and call default_function_array_conversion
5271 on inputs that don't need to be addressable.
5273 2012-12-18 Jakub Jelinek <jakub@redhat.com>
5276 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5277 warning require that both c_common_unsigned_type as well as
5278 c_common_signed_type is the same for both mvl and mvr types.
5280 2012-11-16 Diego Novillo <dnovillo@google.com>
5282 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5284 * c-common.c: Use new vec API in vec.h.
5285 * c-common.h: Likewise.
5286 * c-gimplify.c: Likewise.
5287 * c-pragma.c: Likewise.
5288 * c-pretty-print.c: Likewise.
5289 * c-pretty-print.h: Likewise.
5290 * c-semantics.c: Likewise.
5291 * c-decl.c: Likewise.
5292 * c-parser.c: Likewise.
5293 * c-tree.h: Likewise.
5294 * c-typeck.c: Likewise.
5296 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5299 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5301 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5304 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5305 shadows a function, unless the variable is a function or a
5306 pointer-to-function.
5308 2012-10-12 Jakub Jelinek <jakub@redhat.com>
5311 * c-parser.c (struct c_tree_loc_pair): Removed.
5312 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5313 add location_t * and tree * arguments, fill in array of 3
5314 sizeof_arg trees and corresponding locs.
5315 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5316 c_parser_expr_list callers.
5317 (c_parser_postfix_expression_after_primary): Likewise. Pass
5318 array of 3 sizeof_arg trees and locs (corresponding to first
5319 3 arguments) to sizeof_pointer_memaccess_warning.
5321 2012-10-09 Lawrence Crowl <crowl@google.com>
5323 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5324 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5327 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5330 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5333 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
5336 * c-typeck.c: Include c-common.h.
5337 (enum stv_conv): Moved to c-common.h.
5338 (scalar_to_vector): Moved to c-common.c.
5339 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5340 * Make-lang.in: c-typeck.c depends on c-common.h.
5342 2012-10-04 Arnaud Charlet <charlet@adacore.com>
5344 * c-decl.c (c_write_global_declarations): Fix handling of
5347 2012-09-30 Sharad Singhai <singhai@google.com>
5349 * c-decl.c (c_write_global_declarations): Use a different method
5350 to determine if the dump has ben initialized.
5352 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5355 * c-typeck.c (c_cast_expr): When casting to a type requiring
5356 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5359 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5362 * c-typeck.c (build_unary_op): Pass original argument of
5363 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5364 any C_MAYBE_CONST_EXPR, if it has integer operands.
5365 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5366 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5367 to c_objc_common_truthvalue_conversion, then remove any
5368 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5369 c_objc_common_truthvalue_conversion not
5370 c_common_truthvalue_conversion.
5371 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5372 call note_integer_operands for arguments with integer operands
5373 that are not integer constants.
5375 2012-09-13 Jakub Jelinek <jakub@redhat.com>
5378 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5379 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5381 2012-08-31 Jakub Jelinek <jakub@redhat.com>
5384 * c-convert.c (convert): Don't call fold_convert_loc if
5385 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5386 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5387 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5389 2012-08-24 Jakub Jelinek <jakub@redhat.com>
5392 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5393 for nested and empty_ok arguments in the call to
5394 c_parser_declaration_or_fndef.
5396 2012-08-17 Jakub Jelinek <jakub@redhat.com>
5398 * c-tree.h (c_last_sizeof_arg): Declare.
5399 * c-parser.c (struct c_tree_loc_pair): New type.
5400 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5402 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5403 (c_parser_postfix_expression_after_primary): Likewise. Call
5404 sizeof_pointer_memaccess_warning if needed.
5405 (sizeof_ptr_memacc_comptypes): New function.
5406 * c-typeck.c (c_last_sizeof_arg): New global variable.
5407 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5409 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
5411 * c-lang.h (lang_decl): Add variable_size GTY option.
5413 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5415 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5416 * Make-lang.in: Fix dependencies.
5418 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5420 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5421 and add language Makefile hooks.
5422 * config-lang.in: New file.
5423 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5424 add the required "normal" config-lang.in rules.
5425 * c-lang.h: Moved from gcc/ to here.
5426 * c-tree.h: Likewise.
5427 * c-objc-common.c: Likewise.
5428 * c-objc-common.h: Likewise.
5429 * c-typeck.c: Likewise.
5430 * c-convert.c: Likewise.
5431 * c-lang.c: Likewise.
5432 * c-aux-info.c: Likewise.
5433 * c-errors.c: Likewise.
5434 * gccspec.c: Likewise.
5435 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5436 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5438 Copyright (C) 2012-2018 Free Software Foundation, Inc.
5440 Copying and distribution of this file, with or without modification,
5441 are permitted in any medium without royalty provided the copyright
5442 notice and this notice are preserved.