1 2018-03-15 Jakub Jelinek <jakub@redhat.com>
4 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
5 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
6 INTEGER_TYPE element type.
8 2018-03-13 David Pagan <dave.pagan@oracle.com>
11 * c-typeck.c (output_init_element): Ensure field initializer
12 expression is always evaluated if there are side effects.
14 2018-03-06 Jakub Jelinek <jakub@redhat.com>
17 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
18 !building_stmt_list_p ().
20 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
23 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
24 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
25 and include the BIND_EXPR in the list of things that need to be
28 2018-02-09 Nathan Sidwell <nathan@acm.org>
31 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
32 to strict_aliasing_warning.
34 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
36 * c-typeck.c (really_start_incremental_init, push_init_level,
37 set_nonincremental_init, output_init_element, process_init_element):
38 Use DECL_UNNAMED_BIT_FIELD.
40 2018-01-31 Marek Polacek <polacek@redhat.com>
43 * c-parser.c (c_parser_compound_statement_nostart): Call
44 expansion_point_location_if_in_system_header.
46 2018-01-17 David Malcolm <dmalcolm@redhat.com>
49 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
52 2018-01-13 Jakub Jelinek <jakub@redhat.com>
55 * c-tree.h (decl_constant_value_1): Add a bool argument.
56 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
57 returning a CONSTRUCTOR if it is true. Use error_operand_p.
58 (decl_constant_value): Adjust caller.
59 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
60 decl_constant_value_1 as IN_INIT. Otherwise, punt if
61 decl_constant_value returns initializer that has BLKmode or
63 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
65 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
66 Alan Hayward <alan.hayward@arm.com>
67 David Sherwood <david.sherwood@arm.com>
69 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
72 2018-01-03 Jakub Jelinek <jakub@redhat.com>
74 Update copyright years.
76 2018-01-01 Jakub Jelinek <jakub@redhat.com>
79 * c-parser.c (c_parser_braced_init, c_parser_initelt,
80 c_parser_conditional_expression, c_parser_cast_expression,
81 c_parser_sizeof_expression, c_parser_alignof_expression,
82 c_parser_postfix_expression, c_parser_omp_declare_reduction,
83 c_parser_transaction_expression): Use set_error () method instead
84 of setting value member to error_mark_node.
86 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
88 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
89 and _Float<N>X built-in functions.
91 2017-12-22 Jakub Jelinek <jakub@redhat.com>
94 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
95 TYPE_STUB_DECL and call rest_of_type_compilation before processing
96 incomplete vars rather than after it.
99 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
100 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
101 and consider empty ones if there are no other stmts. For
102 -Wunused-value walk all statements before the one only followed by
105 2017-12-22 Mike Stump <mikestump@comcast.net>
106 Eric Botcazou <ebotcazou@adacore.com>
108 * c-parser.c (c_parser_while_statement): Add unroll parameter and
109 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
110 (c_parser_do_statement): Likewise.
111 (c_parser_for_statement): Likewise.
112 (c_parser_statement_after_labels): Adjust calls to above.
113 (c_parse_pragma_ivdep): New static function.
114 (c_parser_pragma_unroll): Likewise.
115 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
116 <PRAGMA_UNROLL>: New case.
118 2017-12-19 Jakub Jelinek <jakub@redhat.com>
120 * c-typeck.c (comptypes_internal, function_types_compatible_p,
121 perform_integral_promotions, digest_init): Replace Yoda conditions
122 with typical order conditions.
123 * c-decl.c (check_bitfield_type_and_width): Likewise.
125 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
127 * c-typeck.c (c_safe_arg_type_equiv_p,
128 c_safe_function_type_cast_p): New function.
129 (build_c_cast): Implement -Wcast-function-type.
131 2017-12-14 Richard Biener <rguenther@suse.de>
134 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
135 like REALPART_EXPR for the behavior of whether its operand
138 2017-12-12 Marek Polacek <polacek@redhat.com>
141 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
143 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
145 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
146 * c-parser.c (add_debug_begin_stmt): New.
147 (c_parser_declaration_or_fndef): Call it.
148 (c_parser_compound_statement_nostart): Likewise.
149 (c_parser_statement_after_labels): Likewise.
150 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
152 2017-12-07 Joseph Myers <joseph@codesourcery.com>
154 * c-decl.c (build_compound_literal): Add parameter alignas_align
155 and set alignment of decl if nonzero.
156 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
157 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
159 (c_parser_struct_declaration): Update syntax comment.
160 (c_parser_type_name): Add alignas_ok argument and pass it to
162 (c_parser_cast_expression): Pass true to c_parser_type_name and
163 give error if a cast used an _Alignas specifier.
164 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
165 give error if sizeof (type-name) used an _Alignas specifier.
166 (c_parser_alignof_expression): Pass true to c_parser_type_name and
167 give error if _Alignof (type-name) used an _Alignas specifier.
168 (c_parser_postfix_expression_after_paren_type): Check specified
169 alignment for a compound literal and pass it to
170 build_compound_literal.
171 * c-parser.h (c_parser_type_name): Update prototype.
172 * c-tree.h (build_compound_literal): Update prototype.
174 2017-12-07 Martin Sebor <msebor@redhat.com>
177 * c-decl.c (c_decl_attributes): Look up existing declaration and
178 pass it to decl_attributes.
180 2017-12-06 David Malcolm <dmalcolm@redhat.com>
183 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
184 reserved for use by the implementation.
186 2017-12-06 David Malcolm <dmalcolm@redhat.com>
188 * c-decl.c: Include "c-family/c-spellcheck.h".
190 2017-12-05 Martin Liska <mliska@suse.cz>
191 Jakub Jelinek <jakub@redhat.com>
193 * c-typeck.c (pointer_diff): Add new argument and instrument
195 (build_binary_op): Similar for pointer comparison.
197 2017-12-01 Jakub Jelinek <jakub@redhat.com>
200 * c-parser.c: Include tree-iterator.h.
201 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
202 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
206 * c-tree.h (decl_constant_value_1): Declare.
207 * c-typeck.c (decl_constant_value_1): New function.
208 (decl_constant_value): Use it.
209 * c-fold.c (c_fully_fold_internal): If in_init, use
210 decl_constant_value_1 instead of decl_constant_value.
212 2017-11-30 Jakub Jelinek <jakub@redhat.com>
214 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
216 2017-11-28 Jakub Jelinek <jakub@redhat.com>
219 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
220 c_switch_covers_all_cases_p returns true.
222 2017-11-28 Julia Koval <julia.koval@intel.com>
223 Sebastian Peryt <sebastian.peryt@intel.com>
225 * Make-lang.in (c/c-array-notation.o): Remove.
226 * c-array-notation.c: Delete.
227 * c-decl.c: Remove cilkplus condition.
228 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
229 c_parser_cilk_verify_simd, c_parser_array_notation,
230 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
231 c_parser_cilk_simd_fn_vector_attrs,
232 c_finish_cilk_simd_fn_tokens): Delete.
233 (c_parser_declaration_or_fndef): Remove cilkplus condition.
234 (c_parser_direct_declarator_inner): Ditto.
235 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
236 (c_parser_attributes, c_parser_compound_statement,
237 c_parser_statement_after_labels, c_parser_if_statement,
238 c_parser_switch_statement, c_parser_while_statement,
239 c_parser_do_statement, c_parser_for_statement,
240 c_parser_unary_expression, c_parser_postfix_expression,
241 c_parser_postfix_expression_after_primary,
242 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
243 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
245 * c-typeck.c (build_array_ref, build_function_call_vec,
247 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
248 c_finish_loop, build_binary_op): Remove cilkplus support.
250 2017-11-28 Jakub Jelinek <jakub@redhat.com>
252 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
255 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
257 * Make-lang.in (c.install-plugin): Install backend import library.
259 2017-11-23 Jakub Jelinek <jakub@redhat.com>
261 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
264 2017-11-23 Mike Stump <mikestump@comcast.net>
265 Eric Botcazou <ebotcazou@adacore.com>
267 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
269 (c_parser_do_statement): Likewise.
270 (c_parser_for_statement): Likewise.
272 2017-11-22 David Malcolm <dmalcolm@redhat.com>
275 * c-objc-common.c (c_tree_printer): Convert penultimate param from
276 bool to bool *. Within '%T' handling, if showing an "aka", use
277 "quoted" param to add appropriate quoting.
279 2017-11-22 Marek Polacek <polacek@redhat.com>
284 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
286 2017-11-21 David Malcolm <dmalcolm@redhat.com>
289 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
290 earlier failed lookups.
292 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
294 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
295 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
297 2017-11-20 David Malcolm <dmalcolm@redhat.com>
300 * c-decl.c: Include "c-family/known-headers.h".
301 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
303 (class suggest_missing_header): Move to known-header.h.
304 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
305 than get_c_name_hint.
307 2017-11-20 David Malcolm <dmalcolm@redhat.com>
309 * c-decl.c (get_c_name_hint): New function.
310 (class suggest_missing_header): New class.
311 (lookup_name_fuzzy): Call get_c_name_hint and use it to
312 suggest missing headers to the user.
314 2017-11-20 David Malcolm <dmalcolm@redhat.com>
316 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
317 Include "c-family/name-hint.h"
318 (implicit_decl_warning): Convert "hint" from
319 const char * to name_hint. Pass location to
320 lookup_name_fuzzy. Suppress any deferred diagnostic if the
321 warning was not printed.
322 (undeclared_variable): Likewise for "guessed_id".
323 (lookup_name_fuzzy): Convert return type from const char *
324 to name_hint. Add location_t param.
325 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
326 Include "c-family/name-hint.h"
327 (c_parser_declaration_or_fndef): Convert "hint" from
328 const char * to name_hint. Pass location to lookup_name_fuzzy.
329 (c_parser_parameter_declaration): Likewise.
331 2017-11-19 Jakub Jelinek <jakub@redhat.com>
335 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
337 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
338 handle_omp_array_sections): Likewise.
339 (digest_init): Don't call decl_constant_value_for_optimization.
340 * c-tree.h (decl_constant_value_for_optimization): Removed.
341 * c-fold.c (c_fold_array_ref): New function.
342 (c_fully_fold_internal): Add LVAL argument, propagate it through
343 recursive calls. For VAR_P call decl_constant_value and
344 unshare if not LVAL and either optimizing or IN_INIT. Remove
345 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
346 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
347 (c_fully_fold): Add LVAL argument, pass it through to
348 c_fully_fold_internal.
349 (decl_constant_value_for_optimization): Removed.
351 2017-11-15 Joseph Myers <joseph@codesourcery.com>
354 * c-parser.c (check_tgmath_function): New function.
355 (enum tgmath_parm_kind): New enum.
356 (c_parser_postfix_expression): Handle __builtin_tgmath.
358 2017-10-31 David Malcolm <dmalcolm@redhat.com>
360 * c-decl.c (implicit_decl_warning): Update for renaming of
361 pedwarn_at_rich_loc and warning_at_rich_loc.
362 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
363 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
364 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
365 (c_parser_struct_or_union_specifier): Likewise for renaming of
367 (c_parser_parameter_declaration): Likewise for renaming of
369 * c-typeck.c (build_component_ref): Likewise.
370 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
371 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
372 (set_init_label): Likewise for renaming of error_at_rich_loc.
374 2017-10-30 Richard Biener <rguenther@suse.de>
376 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
379 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
381 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
382 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
384 2017-10-25 David Malcolm <dmalcolm@redhat.com>
387 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
390 2017-10-25 Jakub Jelinek <jakub@redhat.com>
393 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
394 newdecl to corresponding __builtin_ if any.
396 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
399 * c-decl.c (diagnose_mismatched_decls): Use
400 OPT_Wbuiltin_declaration_mismatch.
402 2017-10-12 David Malcolm <dmalcolm@redhat.com>
404 * c-parser.c (c_parser_require): Add "type_is_unique" param and
405 use it to guard calls to maybe_suggest_missing_token_insertion.
406 (c_parser_parms_list_declarator): Override default value of new
407 "type_is_unique" param to c_parser_require.
408 (c_parser_asm_statement): Likewise.
409 * c-parser.h (c_parser_require): Add "type_is_unique" param,
412 2017-10-11 Nathan Sidwell <nathan@acm.org>
414 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
416 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
418 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
419 operating on trees as wide_ints.
420 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
421 (c_tree_equal): Likewise.
423 2017-10-04 David Malcolm <dmalcolm@redhat.com>
425 * c-decl.c (push_parm_decl): Store c_parm's location into the
427 (build_c_parm): Add "loc" param and store it within the c_parm.
428 * c-parser.c (struct c_parser): Add "last_token_location" field.
429 (c_parser_consume_token): Store location of the token into the
431 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
432 when handling a FUNCTION_DECL, if it doesn't already have them.
433 (c_parser_parameter_declaration): Generate a location for the
434 parameter, and pass it to the call to build_c_parm.
435 * c-tree.h (struct c_parm): Add field "loc".
436 (build_c_parm): Add location_t param.
437 * c-typeck.c (get_fndecl_argument_location): New function.
438 (inform_for_arg): New function.
439 (convert_for_assignment): Use inform_for_arg when dealing with
442 2017-09-29 Jakub Jelinek <jakub@redhat.com>
444 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
446 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
447 don't SET_DECL_C_BIT_FIELD here.
450 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
451 instead of trying to set just TREE_READONLY manually.
453 2017-09-16 Tom de Vries <tom@codesourcery.com>
456 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
459 2017-09-15 Joseph Myers <joseph@codesourcery.com>
462 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
464 (build_conditional_expr): For C11, generate result with excess
465 precision when one argument is an integer and the other is of a
466 type using excess precision.
468 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
470 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
472 2017-09-13 Marek Polacek <polacek@redhat.com>
475 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
476 than expr.original_type.
478 2017-09-12 Nathan Sidwell <nathan@acm.org>
480 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
481 resort_sorted_fields): Moved from c-family/c-common.c.
482 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
484 2017-09-01 Joseph Myers <joseph@codesourcery.com>
487 * c-typeck.c (build_atomic_assign): Handle argument with excess
488 precision. Ensure any EXCESS_PRECISION_EXPR is present in
489 argument passed to build_binary_op and convert_for_assignment but
490 not for call to c_fully_fold.
491 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
492 Ensure build_binary_op is called with argument with original
493 semantic type. Avoid calling c_fully_fold with an
494 EXCESS_PRECISION_EXPR from build_binary_op.
496 2017-09-01 Jakub Jelinek <jakub@redhat.com>
499 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
501 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
502 Alan Hayward <alan.hayward@arm.com>
503 David Sherwood <david.sherwood@arm.com>
505 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
506 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
507 m1 and m2 to the signed equivalent of a fixed-point
510 2017-08-24 David Malcolm <dmalcolm@redhat.com>
512 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
513 than CAN_HAVE_LOCATION_P when determining whether to use the
514 location_t value within "value".
516 2017-08-21 David Malcolm <dmalcolm@redhat.com>
518 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
519 rather than peeking the location of the first token.
520 * c-tree.h (c_expr::get_location): New method.
522 2017-08-21 David Malcolm <dmalcolm@redhat.com>
524 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
525 to check_function_arguments.
527 2017-08-18 Marek Polacek <polacek@redhat.com>
529 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
532 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
535 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
536 (check_bitfield_type_and_width): Don't allow bit-field with
537 warn_if_not_aligned type.
539 2017-08-14 Martin Sebor <msebor@redhat.com>
542 * c-objc-common.c (c_objc_common_init): Handle 'G'.
544 2017-08-11 Marek Polacek <polacek@redhat.com>
547 * c-decl.c (pushtag): Only print inform if the warning was printed.
548 (grokdeclarator): Likewise.
550 2017-08-10 David Malcolm <dmalcolm@redhat.com>
552 * c-parser.c (c_parser_error): Rename to...
553 (c_parser_error_richloc): ...this, making static, and adding
554 "richloc" parameter, passing it to the c_parse_error call,
555 rather than calling c_parser_set_source_position_from_token.
556 (c_parser_error): Reintroduce, reimplementing in terms of the
557 above, converting return type from void to bool.
558 (class token_pair): New class.
559 (struct matching_paren_traits): New struct.
560 (matching_parens): New typedef.
561 (struct matching_brace_traits): New struct.
562 (matching_braces): New typedef.
563 (get_matching_symbol): New function.
564 (c_parser_require): Add param MATCHING_LOCATION, using it to
565 highlight matching "opening" tokens for missing "closing" tokens.
566 (c_parser_skip_until_found): Likewise.
567 (c_parser_static_assert_declaration_no_semi): Convert explicit
568 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
569 class matching_parens, so that the pertinent open parenthesis is
570 highlighted when there are problems locating the close
572 (c_parser_struct_or_union_specifier): Likewise.
573 (c_parser_typeof_specifier): Likewise.
574 (c_parser_alignas_specifier): Likewise.
575 (c_parser_simple_asm_expr): Likewise.
576 (c_parser_braced_init): Likewise, for matching_braces.
577 (c_parser_paren_condition): Likewise, for matching_parens.
578 (c_parser_switch_statement): Likewise.
579 (c_parser_for_statement): Likewise.
580 (c_parser_asm_statement): Likewise.
581 (c_parser_asm_operands): Likewise.
582 (c_parser_cast_expression): Likewise.
583 (c_parser_sizeof_expression): Likewise.
584 (c_parser_alignof_expression): Likewise.
585 (c_parser_generic_selection): Likewise.
586 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
587 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
588 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
589 In case CPP_OPEN_PAREN, pass loc_open_paren to the
590 c_parser_skip_until_found call.
591 (c_parser_objc_class_definition): Use class matching_parens as
593 (c_parser_objc_method_decl): Likewise.
594 (c_parser_objc_try_catch_finally_statement): Likewise.
595 (c_parser_objc_synchronized_statement): Likewise.
596 (c_parser_objc_at_property_declaration): Likewise.
597 (c_parser_oacc_wait_list): Likewise.
598 (c_parser_omp_var_list_parens): Likewise.
599 (c_parser_omp_clause_collapse): Likewise.
600 (c_parser_omp_clause_default): Likewise.
601 (c_parser_omp_clause_if): Likewise.
602 (c_parser_omp_clause_num_threads): Likewise.
603 (c_parser_omp_clause_num_tasks): Likewise.
604 (c_parser_omp_clause_grainsize): Likewise.
605 (c_parser_omp_clause_priority): Likewise.
606 (c_parser_omp_clause_hint): Likewise.
607 (c_parser_omp_clause_defaultmap): Likewise.
608 (c_parser_oacc_single_int_clause): Likewise.
609 (c_parser_omp_clause_ordered): Likewise.
610 (c_parser_omp_clause_reduction): Likewise.
611 (c_parser_omp_clause_schedule): Likewise.
612 (c_parser_omp_clause_num_teams): Likewise.
613 (c_parser_omp_clause_thread_limit): Likewise.
614 (c_parser_omp_clause_aligned): Likewise.
615 (c_parser_omp_clause_linear): Likewise.
616 (c_parser_omp_clause_safelen): Likewise.
617 (c_parser_omp_clause_simdlen): Likewise.
618 (c_parser_omp_clause_depend): Likewise.
619 (c_parser_omp_clause_map): Likewise.
620 (c_parser_omp_clause_device): Likewise.
621 (c_parser_omp_clause_dist_schedule): Likewise.
622 (c_parser_omp_clause_proc_bind): Likewise.
623 (c_parser_omp_clause_uniform): Likewise.
624 (c_parser_omp_for_loop): Likewise.
625 (c_parser_cilk_clause_vectorlength): Likewise.
626 (c_parser_cilk_clause_linear): Likewise.
627 (c_parser_transaction_expression): Likewise.
628 * c-parser.h (c_parser_require): Add param matching_location with
629 default UNKNOWN_LOCATION.
630 (c_parser_error): Convert return type from void to bool.
631 (c_parser_skip_until_found): Add param matching_location with
632 default UNKNOWN_LOCATION.
634 2017-08-09 Marek Polacek <polacek@redhat.com>
636 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
637 * c-tree.h (build_external_ref): Update declaration.
638 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
639 (build_external_ref): Change the type of a parameter to bool.
640 (parser_build_binary_op): Use true/false instead of 1/0.
641 (pointer_diff): Likewise.
642 (build_modify_expr): Likewise.
643 (set_designator): Change the type of a parameter to bool.
644 (set_init_index): Use true/false instead of 1/0.
645 (set_init_label): Likewise.
646 (output_init_element): Change the type of a parameter to bool.
647 (output_pending_init_elements): Use true/false instead of 1/0.
648 (process_init_element): Likewise.
649 (build_binary_op): Change the type of a parameter to bool.
651 2017-08-09 Marek Polacek <polacek@redhat.com>
654 * c-typeck.c (pedwarn_init): Make the function take a variable list.
655 Call emit_diagnostic_valist instead of pedwarn.
656 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
657 Print the relevant types in diagnostics.
659 2017-08-09 Marek Polacek <polacek@redhat.com>
662 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
663 build_conditional_expr.
664 * c-parser.c (c_parser_conditional_expression): Create locations for
665 EXP1 and EXP2 from their source ranges. Pass the locations down to
666 build_conditional_expr.
667 * c-tree.h (build_conditional_expr): Update declaration.
668 * c-typeck.c (build_conditional_expr): Add location_t parameters.
669 For -Wsign-compare, also print the types.
671 2017-08-08 Martin Liska <mliska@suse.cz>
673 * c-convert.c: Include header files.
674 * c-typeck.c: Likewise.
676 2017-08-07 Martin Liska <mliska@suse.cz>
678 * c-parser.c (c_parser_attributes): Canonicalize name of an
681 2017-08-02 Marek Polacek <polacek@redhat.com>
684 * c-parser.c (c_parser_unary_expression): Use set_error.
688 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
689 warnings. Avoid walking MACRO_MAP_LOCATIONS.
691 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
692 Martin Liska <mliska@suse.cz>
694 * c-typeck.c (c_finish_goto_label): Build gimple predict
697 2017-07-31 Martin Liska <mliska@suse.cz>
700 * c-convert.c (convert): Guard condition with flag_sanitize_p
701 also with current_function_decl non-null equality.
702 * c-decl.c (grokdeclarator): Likewise.
703 * c-typeck.c (build_binary_op): Likewise.
705 2017-07-25 Marek Polacek <polacek@redhat.com>
707 * c-decl.c (grokfield): Remove local variable.
709 2017-07-25 Marek Polacek <polacek@redhat.com>
712 * c-parser.c (c_parser_else_body): Don't warn about multistatement
713 macro expansion if the body is in { }.
714 (c_parser_while_statement): Likewise.
715 (c_parser_for_statement): Likewise.
717 2017-07-18 Nathan Sidwell <nathan@acm.org>
719 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
721 2017-07-14 David Malcolm <dmalcolm@redhat.com>
723 * c-decl.c (implicitly_declare): When suggesting a missing
724 #include, provide a fix-it hint.
726 2017-07-06 David Malcolm <dmalcolm@redhat.com>
728 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
729 and call that instead.
730 * c-tree.h (selftest::run_c_tests): New decl.
732 2017-06-26 Marek Polacek <polacek@redhat.com>
735 * c-parser.c (c_parser_if_body): Set the location of the
736 body of the conditional after parsing all the labels. Call
737 warn_for_multistatement_macros.
738 (c_parser_else_body): Likewise.
739 (c_parser_switch_statement): Likewise.
740 (c_parser_while_statement): Likewise.
741 (c_parser_for_statement): Likewise.
742 (c_parser_statement): Add a default argument. Save the location
743 after labels have been parsed.
744 (c_parser_c99_block_statement): Likewise.
746 2017-06-19 Richard Biener <rguenther@suse.de>
748 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
749 negated _Literals to parse _Literal (int) -1.
751 2017-06-13 Martin Liska <mliska@suse.cz>
754 * c-convert.c (convert): Use sanitize_flags_p.
755 * c-decl.c (grokdeclarator): Likewise.
756 * c-typeck.c (convert_for_assignment): Likewise.
757 (c_finish_return): Likewise.
758 (build_binary_op): Likewise.
760 2017-06-08 Jakub Jelinek <jakub@redhat.com>
763 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
764 to sizetype before size_binop.
766 2017-06-07 Jakub Jelinek <jakub@redhat.com>
768 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
771 2017-06-06 Marek Polacek <polacek@redhat.com>
774 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
776 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
778 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
780 * c-parser.c (c_parser_binary_expression): Implement the
781 -Wsizeof_pointer_div warning.
782 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
783 from a parenthesized expression.
784 (c_parser_expr_list): Use c_last_sizeof_loc.
785 * c-tree.h (c_last_sizeof_loc): New external.
786 * c-typeck.c (c_last_sizeof_loc): New variable.
787 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
789 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
792 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
794 2017-05-30 David Malcolm <dmalcolm@redhat.com>
796 * c-objc-common.c (c_tree_printer): Gain bool and const char **
799 2017-05-24 Martin Sebor <msebor@redhat.com>
802 * c-fold.c (c_fully_fold_internal): Adjust.
803 * c-typeck.c (parser_build_unary_op): Adjust.
805 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
807 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
808 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
811 2017-05-23 Marek Polacek <polacek@redhat.com>
813 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
816 2017-05-22 Jakub Jelinek <jakub@redhat.com>
818 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
819 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
820 it returned invariant. Call tree_invariant_p unconditionally
821 afterwards to decide whether to return expr or op0.
823 2017-05-22 Nathan Sidwell <nathan@acm.org>
825 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
827 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
829 * c-parser.c (c_parser_omp_clause_default): Handle
830 "OMP_CLAUSE_DEFAULT_PRESENT".
832 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
834 * config-lang.in (gtfiles): Add c-family/c-format.c.
836 2017-05-18 Nathan Sidwell <nathan@acm.org>
838 * c-decl.c (pushdecl_top_level): Delete unused function.
840 2017-05-18 Marek Polacek <polacek@redhat.com>
842 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
843 (check_earlier_gotos): Likewise.
844 (define_label): Likewise.
845 (pending_xref_error): Likewise.
846 (smallest_type_quals_location): Likewise.
847 (grokdeclarator): Likewise.
848 (grokparms): Likewise.
849 (identifier_global_value): Likewise.
850 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
851 (find_init_member): Likewise.
853 2017-05-18 Marek Polacek <polacek@redhat.com>
855 * c-decl.c (start_decl): Use false/true instead of 0/1.
856 (grokdeclarator): Likewise.
857 (finish_struct): Likewise.
858 (start_function): Change the return type to bool. Use false/true
860 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
861 * c-tree.h (start_function): Update.
862 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
863 (set_designator): Change the return type to bool. Use false/true
866 2017-05-17 Marek Polacek <polacek@redhat.com>
868 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
869 * c-typeck.c: Likewise.
871 2017-05-17 Marek Polacek <polacek@redhat.com>
874 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
875 DECL_IGNORED_P even for non-static compound literals.
877 2017-05-17 Martin Liska <mliska@suse.cz>
879 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
880 use it instead of int type.
882 2017-05-17 Marek Polacek <polacek@redhat.com>
884 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
886 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
887 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
888 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
889 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
891 (c_parser_conditional_expression): Likewise.
892 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
893 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
894 (process_init_element): Likewise.
895 (build_binary_op): Likewise.
896 (handle_omp_array_sections_1): Likewise.
898 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
900 * c-parser.c (c_parser_omp_clause_num_gangs)
901 (c_parser_omp_clause_num_workers)
902 (c_parser_omp_clause_vector_length): Merge functions into...
903 (c_parser_oacc_single_int_clause): ... this new function. Adjust
906 2017-05-11 Nathan Sidwell <nathan@acm.org>
908 * gimple-parser.c: Don't #include tree-dump.h.
910 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
913 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
915 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
918 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
919 incorrect __MEM syntax.
921 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
924 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
927 2017-05-09 Nathan Sidwell <nathan@acm.org>
929 * c-tree.h (pushdecl): Declare.
931 2017-05-05 David Malcolm <dmalcolm@redhat.com>
933 * c-decl.c (warn_defaults_to): Replace report_diagnostic
934 with diagnostic_report_diagnostic.
935 * c-errors.c (pedwarn_c99): Likewise.
936 (pedwarn_c90): Likewise.
938 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
941 * c-gimplify.c (c_gimplify_expr): Remove calls to
942 cilk_gimplifY_call_params_in_spawned_fn.
944 2017-04-25 David Malcolm <dmalcolm@redhat.com>
946 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
947 hint for removing extra semicolon.
949 2017-04-21 Jakub Jelinek <jakub@redhat.com>
952 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
953 enabled, set specs->type to integer_type_node.
955 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
957 * c-array-notation.c: Fix typo in comment.
959 2017-03-29 Marek Polacek <polacek@redhat.com>
962 * c-decl.c (finish_decl): Check VAR_P.
964 2017-03-27 Jakub Jelinek <jakub@redhat.com>
967 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
968 * c-typeck.c (c_mark_addressable): Likewise. Look through
969 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
971 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
973 2017-03-23 Marek Polacek <polacek@redhat.com>
975 * c-tree.h: Remove a C_RID_YYCODE reference.
977 2017-03-21 Jakub Jelinek <jakub@redhat.com>
980 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
981 optional COMPOUND_EXPR with ubsan instrumentation.
983 2017-03-17 Marek Polacek <polacek@redhat.com>
985 * c-parser.c: Add C11 references.
987 2017-03-15 Marek Polacek <polacek@redhat.com>
989 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
991 2017-03-11 Marek Polacek <polacek@redhat.com>
993 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
995 2017-03-10 David Malcolm <dmalcolm@redhat.com>
998 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
1000 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
1002 2017-03-09 Marek Polacek <polacek@redhat.com>
1005 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
1006 parameter declarations with initializers.
1008 2017-03-09 Jakub Jelinek <jakub@redhat.com>
1011 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
1014 2017-03-07 Jakub Jelinek <jakub@redhat.com>
1017 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
1018 for "may only be used in compound statements" diagnostics, change it
1019 such that the same translatable string is used for all pragmas. For
1020 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
1022 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
1023 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
1024 "may only be used in compound statements" diagnostics, such that the
1025 same translatable string is used for all pragmas.
1027 2017-03-04 Marek Polacek <polacek@redhat.com>
1030 * c-decl.c (implicit_decl_warning): Add missing space.
1032 2017-03-03 Marek Polacek <polacek@redhat.com>
1035 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
1036 current_function_prototype_arg_types is error_mark_node. Fix
1037 formatting. Use TREE_VALUE instead of TREE_TYPE.
1039 2017-03-03 Jakub Jelinek <jakub@redhat.com>
1042 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
1043 %<min%> or %<max%> in the diagnostics, instead mention identifier.
1044 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
1048 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
1049 instead of %<_Generic>.
1050 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
1051 (c_parser_omp_target_exit_data): Use %<release%> instead of
1054 2017-02-28 Jakub Jelinek <jakub@redhat.com>
1056 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
1057 instead of just cond ? "..." : "...".
1058 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
1059 for "enter"/"exit" keyword.
1060 (c_finish_oacc_routine): Don't use %s to supply portions of the
1063 2017-02-24 Jakub Jelinek <jakub@redhat.com>
1066 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
1067 handle -Wrestrict here.
1068 * c-typeck.c (build_function_call_vec): Adjust
1069 check_function_arguments caller.
1071 2017-02-23 Richard Biener <rguenther@suse.de>
1074 * gimple-parser.c (c_parser_gimple_statement): Use set_error
1075 to initialize c_exprs to return.
1076 (c_parser_gimple_binary_expression): Likewise.
1077 (c_parser_gimple_unary_expression): Likewise.
1078 (c_parser_gimple_postfix_expression): Likewise.
1080 2017-02-22 Marek Polacek <polacek@redhat.com>
1083 * c-typeck.c (convert_arguments): Handle error_mark_node.
1085 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1087 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
1088 value of c_parser_parse_ssa_name against error_mark_node and emit
1089 error if ssa name is anonymous and written as default definition.
1091 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1093 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1096 2017-02-16 Jakub Jelinek <jakub@redhat.com>
1099 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
1100 ignore #pragma omp target even when not followed by identifier.
1102 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1104 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
1105 (c_parser_gimple_unary_expression): Likewise.
1107 2017-02-13 Jakub Jelinek <jakub@redhat.com>
1109 * c-parser.c (c_parser_oacc_declare): Add missing space in
1112 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1115 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
1116 set_c_expr_source_range when parsing ssa-name.
1118 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
1119 Richard Biener <rguenther@suse.de>
1121 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
1122 building IL when arguments are error_mark_node.
1123 (c_parser_gimple_unary_expression): Likewise.
1124 (c_parser_gimple_if_stmt): Likewise.
1125 (c_parser_gimple_switch_stmt): Likewise.
1126 (c_parser_gimple_return_stmt): Likewise.
1127 (c_parser_parse_ssa_name): When name lookup fails do not build
1128 an SSA name. Use undeclared rather than not declared in error
1131 2017-02-09 Marek Polacek <polacek@redhat.com>
1134 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
1135 instead of c_parser_skip_until_found.
1137 2017-02-09 Jakub Jelinek <jakub@redhat.com>
1140 * c-parser.c (c_parser_omp_declare_target): Don't invoke
1141 symtab_node::get on automatic variables.
1143 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1144 Chung-Lin Tang <cltang@codesourcery.com>
1146 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1147 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1149 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1151 2017-02-07 Richard Biener <rguenther@suse.de>
1153 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1154 (c_parser_gimple_postfix_expression_after_primary):
1155 Do not use c_build_function_call_vec to avoid folding and promotion.
1158 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1161 * c-decl.c (pop_scope): Pass main_input_filename to
1162 build_translation_unit_decl.
1164 2017-01-24 David Malcolm <dmalcolm@redhat.com>
1166 * c-parser.c: Include "read-rtl-function.h" and
1168 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1169 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1170 production. Update for renaming of field "gimple_pass" to
1171 "gimple_or_rtl_pass". If __RTL was seen, call
1172 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1173 to an auto_timevar, to cope with early exit.
1174 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1175 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1176 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1178 (c_parser_parse_rtl_body): New function.
1179 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1180 (struct c_declspecs): Rename field "gimple_pass" to
1181 "gimple_or_rtl_pass". Add field "rtl_p".
1182 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1183 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1184 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1185 (c_parser_gimple_or_rtl_pass_list): ...this.
1187 2017-01-20 Marek Polacek <polacek@redhat.com>
1190 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1192 2017-01-13 Richard Biener <rguenther@suse.de>
1194 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1197 2017-01-13 Richard Biener <rguenther@suse.de>
1199 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1200 _Literal ( type-name ) number.
1202 2017-01-12 Richard Biener <rguenther@suse.de>
1204 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1207 2017-01-11 Jakub Jelinek <jakub@redhat.com>
1210 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1213 2017-01-11 Richard Biener <rguenther@suse.de>
1216 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1217 returns on parse errors.
1219 2017-01-04 Marek Polacek <polacek@redhat.com>
1222 * c-parser.c (c_parser_postfix_expression): Mark zero character
1223 constants by setting original_type in c_expr.
1224 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1225 with a zero character constant.
1226 (char_type_p): New function.
1228 2017-01-04 David Malcolm <dmalcolm@redhat.com>
1230 * c-parser.c (c_parser_declaration_or_fndef): Create a
1231 rich_location at init_loc and parse it to start_init.
1232 (last_init_list_comma): New global.
1233 (c_parser_braced_init): Update last_init_list_comma when parsing
1234 commas. Pass it to pop_init_level. Pass location of closing
1235 brace to pop_init_level.
1236 (c_parser_postfix_expression_after_paren_type): Create a
1237 rich_location at type_loc and parse it to start_init.
1238 (c_parser_omp_declare_reduction): Likewise for loc.
1239 * c-tree.h (start_init): Add rich_location * param.
1240 (pop_init_level): Add location_t param.
1241 * c-typeck.c (struct initializer_stack): Add field
1242 "missing_brace_richloc".
1243 (start_init): Add richloc param, use it to initialize
1244 the stack node's missing_brace_richloc.
1245 (last_init_list_comma): New decl.
1246 (finish_implicit_inits): Pass last_init_list_comma to
1248 (push_init_level): When finding missing open braces, add fix-it
1249 hints to the richloc.
1250 (pop_init_level): Add "insert_before" param and pass it
1251 when calling pop_init_level. Add fixits about missing
1252 close braces to any richloc. Use the richloc for the
1253 -Wmissing-braces warning.
1254 (set_designator): Pass last_init_list_comma to pop_init_level.
1255 (process_init_element): Likewise.
1257 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1259 Update copyright years.
1261 2016-12-21 Jakub Jelinek <jakub@redhat.com>
1264 * c-typeck.c (build_function_call_vec): If check_function_arguments
1265 returns true, set TREE_NO_WARNING on CALL_EXPR.
1268 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1269 to *expr instead of overwriting it.
1271 2016-12-20 Richard Biener <rguenther@suse.de>
1273 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1275 (c_parser_gimple_statement): Only build assigns for non-error
1277 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1279 2016-12-14 Martin Jambor <mjambor@suse.cz>
1281 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1283 (c_finish_oacc_routine): Adjusted call to
1284 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1285 to use their new names.
1286 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1288 (c_parser_oacc_update): Likewise.
1289 (c_parser_omp_simd): Likewise.
1290 (c_parser_omp_target_update): Likewise.
1291 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1292 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1294 (c_finish_omp_cancellation_point): Likewise.
1295 * gimple-parser.c: Do not include omp-low.h
1297 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1298 James Norris <jnorris@codesourcery.com>
1300 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1301 EXIT_DATA,WAIT} are not used in compound statements.
1302 (c_parser_oacc_enter_exit_data): Update diagnostics.
1304 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1307 * c-decl.c (diagnose_mismatched_decls): Use
1308 OPT_Wbuiltin_declaration_mismatch here too.
1310 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
1311 Alan Hayward <alan.hayward@arm.com>
1312 David Sherwood <david.sherwood@arm.com>
1314 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1315 (make_label, finish_struct): Likewise.
1317 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
1318 Richard Biener <rguenther@suse.de>
1320 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1321 * config-lang.in (gtfiles): Add c/c-parser.h.
1322 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1323 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1324 * c-parser.c (enum c_id_kind, struct c_token,
1325 c_parser_next_token_is, c_parser_next_token_is_not,
1326 c_parser_next_token_is_keyword,
1327 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1329 * c-parser.h: ... new header.
1330 * c-parser.c: Include c-parser.h and gimple-parser.h.
1331 (c_parser_peek_token, c_parser_peek_2nd_token,
1332 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1333 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1334 c_parser_error, c_parser_require, c_parser_skip_until_found,
1335 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1336 c_parser_type_name): Export.
1337 (c_parser_tokens_buf): New function.
1338 (c_parser_error): Likewise.
1339 (c_parser_set_error): Likewise.
1340 (c_parser_declspecs): Handle RID_GIMPLE.
1341 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1342 via c_parser_parse_gimple_body.
1343 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1344 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1345 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1346 c_parser_error, c_parser_require, c_parser_skip_until_found,
1347 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1348 c_parser_type_name): Declare.
1349 (struct c_parser): Declare forward.
1350 (c_parser_tokens_buf): Declare.
1351 (c_parser_error): Likewise.
1352 (c_parser_set_error): Likewise.
1353 * gimple-parser.c: New file.
1354 * gimple-parser.h: Likewise.
1356 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1359 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1362 2016-09-11 Le-Chun Wu <lcwu@google.com>
1363 Mark Wielaard <mjw@redhat.com>
1365 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1366 to the given -Wshadow= variant.
1368 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1370 * c-typeck.c: Include memmodel.h.
1372 2016-10-13 Jakub Jelinek <jakub@redhat.com>
1375 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1376 instead of lhd_return_null_tree_v.
1378 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1381 * c-decl.c (smallest_type_quals_location): New static function.
1382 (grokdeclarator): Try to find the correct location for an ignored
1385 2016-09-26 Marek Polacek <polacek@redhat.com>
1388 * c-decl.c (pop_scope): Add gcc_fallthrough.
1390 2016-09-26 Marek Polacek <polacek@redhat.com>
1393 * c-parser.c (struct c_token): Add flags field.
1394 (c_lex_one_token): Pass it to c_lex_with_flags.
1395 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1396 into IFN_FALLTHROUGH.
1397 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1398 attribute fallthrough after a case label or default label.
1399 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1401 2016-09-24 Marek Polacek <polacek@redhat.com>
1404 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1405 have boolean value. Warn about ++/-- on booleans.
1407 2016-09-23 Jakub Jelinek <jakub@redhat.com>
1409 * c-parser.c (incomplete_record_decls): Remove unnecessary
1410 = vNULL initialization of file scope vec.
1412 2016-09-16 Marek Polacek <polacek@redhat.com>
1414 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1416 2016-09-14 Marek Polacek <polacek@redhat.com>
1418 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1419 (fix_array_notation_expr): Likewise.
1420 * c-decl.c (finish_decl): Likewise.
1421 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1422 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1423 (function_to_pointer_conversion): Use false instead of 0.
1424 (convert_lvalue_to_rvalue): Likewise.
1425 (parser_build_unary_op): Likewise.
1426 (build_atomic_assign): Likewise.
1427 (build_unary_op): Change nonconvert parameter type to bool, use
1428 true/false instead of 1/0.
1429 (build_binary_op): Use true instead of 1.
1431 2016-09-13 David Malcolm <dmalcolm@redhat.com>
1433 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1434 of add_fixit_insert to add_fixit_insert_before.
1436 2016-09-13 Marek Polacek <polacek@redhat.com>
1438 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1441 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1444 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1445 COMPOUND_EXPR to warn_for_omitted_condop.
1447 2016-09-07 David Malcolm <dmalcolm@redhat.com>
1449 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1450 c_get_substring_location for this new langhook.
1452 2016-09-02 Jakub Jelinek <jakub@redhat.com>
1455 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1457 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1458 instead of mark_exp_read on low_bound/length expression.
1459 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1460 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1461 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1462 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1463 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1464 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1465 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1466 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1467 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1468 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1469 instead of mark_expr_read.
1470 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1471 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1472 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1473 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1474 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1475 array section bases outside of depend clause, for depend clause
1476 use convert_lvalue_to_rvalue on the base.
1477 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1478 linear, aligned, map, to and from clauses.
1479 (c_omp_clause_copy_ctor): New function.
1481 2016-09-01 Marek Polacek <polacek@redhat.com>
1484 * c-typeck.c (composite_type): Add FALLTHRU comment.
1486 2016-08-31 David Malcolm <dmalcolm@redhat.com>
1488 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1489 to the insertion fixits for "struct", "union", and "enum".
1491 2016-08-30 David Malcolm <dmalcolm@redhat.com>
1493 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1494 rather than add_fixit_misspelled_id.
1495 (undeclared_variable): Likewise.
1496 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1497 now-redundant "here" params from add_fixit_insert method calls.
1498 (c_parser_parameter_declaration): Likewise.
1499 * c-typeck.c (build_component_ref): Remove now-redundant range
1500 param from add_fixit_replace method calls.
1502 2016-08-25 Marek Polacek <polacek@redhat.com>
1504 * c-typeck.c (parser_build_binary_op): Pass LHS to
1505 warn_logical_not_parentheses.
1507 2016-08-25 Marek Polacek <polacek@redhat.com>
1510 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1511 or _FloatN or _FloatNx is not supported.
1512 (finish_declspecs): Set type to integer_type_node when _FloatN or
1513 _FloatNx is not supported.
1515 2016-08-19 Joseph Myers <joseph@codesourcery.com>
1518 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1519 (struct c_declspecs): Add field floatn_nx_idx.
1520 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1521 and _FloatNx type specifiers.
1522 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1523 (c_parser_declspecs, c_parser_attribute_any_word)
1524 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1525 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1526 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1527 narrower than double.
1529 2016-08-12 Jakub Jelinek <jakub@redhat.com>
1530 Martin Liska <mliska@suse.cz>
1533 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1534 % to determine val element to change. Assert that
1535 wchar_bytes * charwidth fits into val array.
1537 2016-08-12 Marek Polacek <polacek@redhat.com>
1540 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1541 (c_parser_postfix_expression): Likewise.
1542 * c-typeck.c (build_unary_op): Adjust fall through comment.
1543 (c_mark_addressable): Likewise.
1545 2016-08-11 Jakub Jelinek <jakub@redhat.com>
1548 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1549 array member through typedef, for orig_qual_indirect == 0 clear
1552 2016-08-08 David Malcolm <dmalcolm@redhat.com>
1555 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1556 this up to selftest::run_c_tests.
1557 (selftest::run_c_tests): New function.
1559 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1561 * c-parser.c (struct oacc_routine_data): Add error_seen and
1562 fndecl_seen members.
1563 (c_finish_oacc_routine): Use these.
1564 (c_parser_declaration_or_fndef): Adjust.
1565 (c_parser_oacc_routine): Likewise. Support more C language
1566 constructs, and improve diagnostics. Move pragma context
1568 (c_parser_pragma): ... here.
1570 * c-parser.c (struct oacc_routine_data): New.
1571 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1573 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1574 declare target" attribute.
1576 2016-08-01 Jan Beulich <jbeulich@suse.com>
1578 * c-fold.c (c_fully_fold_internal): Also emit shift count
1579 warnings for vector types.
1580 * c-typeck.c (build_binary_op): Likewise.
1582 2016-07-29 Marek Polacek <polacek@redhat.com>
1585 * c-decl.c (finish_struct): Rephrase an error message.
1588 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1589 to error node for invalid code.
1592 * c-decl.c (implicitly_declare): Return decl early not only for
1593 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1595 2016-07-29 Jakub Jelinek <jakub@redhat.com>
1598 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1599 on GNU extern inline functions.
1601 2016-07-29 Marek Polacek <polacek@redhat.com>
1604 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1607 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
1609 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1611 2016-07-20 David Malcolm <dmalcolm@redhat.com>
1613 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1615 (best_macro_match): Likewise, converting from a typedef to a
1617 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1618 (lookup_name_fuzzy): Update for change of best_macro_match to a
1619 subclass with a ctor that calls cpp_forall_identifiers.
1621 2016-07-20 David Malcolm <dmalcolm@redhat.com>
1623 * c-decl.c (implicit_decl_warning): Update for conversion of
1624 return type of lookup_name_fuzzy to const char *.
1625 (undeclared_variable): Likewise.
1626 (lookup_name_fuzzy): Convert return type from tree to
1628 * c-parser.c (c_parser_declaration_or_fndef): Update for
1629 conversion of return type of lookup_name_fuzzy to const char *.
1630 (c_parser_parameter_declaration): Likewise.
1632 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1634 * c-parser.c (c_parser_oacc_declare): Don't scan for
1636 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1637 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1638 zero-length subarrays.
1640 2016-07-15 Jakub Jelinek <jakub@redhat.com>
1643 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1644 instead of FUZZY_LOOKUP_NAME.
1645 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1646 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1648 2016-07-14 Jakub Jelinek <jakub@redhat.com>
1651 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1653 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1655 * c-parser.c (c_parser_generic_selection): Make type of variable
1657 (c_parser_omp_declare_simd): Likewise.
1659 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1661 * c-decl.c (struct c_struct_parse_info): Change member types
1662 from vec to auto_vec.
1663 (start_struct): Adjust.
1664 (finish_struct): Likewise.
1666 2016-07-02 Jakub Jelinek <jakub@redhat.com>
1669 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1671 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1673 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1674 Move pragma context checking into...
1675 (c_parser_omp_cancellation_point): ... here, and improve
1676 diagnostic messages.
1677 * c-typeck.c (c_finish_omp_cancel)
1678 (c_finish_omp_cancellation_point): Improve diagnostic messages.
1680 2016-06-29 Jakub Jelinek <jakub@redhat.com>
1683 * c-typeck.c (c_build_qualified_type): Don't clear
1684 C_TYPE_INCOMPLETE_VARS for the main variant.
1686 2016-06-28 Martin Sebor <msebor@redhat.com>
1689 * c-typeck.c (output_init_element): Diagnose incompatible types
1690 before non-constant initializers.
1692 2016-06-28 Jakub Jelinek <jakub@redhat.com>
1694 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1696 2016-06-23 Andi Kleen <ak@linux.intel.com>
1698 * Make-lang.in: Add support for autofdo.
1700 2016-06-22 David Malcolm <dmalcolm@redhat.com>
1703 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1704 (implicit_decl_warning): When issuing warnings for implicit
1705 declarations, attempt to provide a suggestion via
1707 (undeclared_variable): Likewise when issuing errors.
1708 (lookup_name_in_scope): Likewise.
1709 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1710 (best_macro_match): New typedef.
1711 (find_closest_macro_cpp_cb): New function.
1712 (lookup_name_fuzzy): New function.
1713 * c-parser.c: Include gcc-rich-location.h.
1714 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1715 (c_keyword_starts_typename): ...this new function.
1716 (c_parser_declaration_or_fndef): When issuing errors about
1717 missing "struct" etc, add a fixit. For other kinds of errors,
1718 attempt to provide a suggestion via lookup_name_fuzzy.
1719 (c_parser_parms_declarator): When looking ahead to detect typos in
1720 type names, also reject CPP_KEYWORD.
1721 (c_parser_parameter_declaration): When issuing errors about
1722 unknown type names, attempt to provide a suggestion via
1724 * c-tree.h (c_keyword_starts_typename): New prototype.
1726 2016-06-20 Joseph Myers <joseph@codesourcery.com>
1729 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1730 c_common_type returns error_mark_node.
1732 2016-06-19 Martin Sebor <msebor@redhat.com>
1735 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1736 __alignof__ (expression).
1738 2016-06-14 David Malcolm <dmalcolm@redhat.com>
1740 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1742 2016-06-14 David Malcolm <dmalcolm@redhat.com>
1744 * c-typeck.c (build_component_ref): Simplify fixit code by
1745 using gcc_rich_location::add_fixit_misspelled_id.
1746 (set_init_label): Likewise.
1748 2016-06-13 David Malcolm <dmalcolm@redhat.com>
1750 * c-parser.c (c_parser_initelt): Provide location of name for new
1751 location_t param of set_init_label.
1752 * c-tree.h (set_init_label): Add location_t param.
1753 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1754 param and use it when issuing error messages about unrecognized
1755 field names. Attempt to provide a fixit hint if appropriate,
1756 otherwise update the error message to provide the type name.
1758 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1761 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1764 2016-06-08 Martin Sebor <msebor@redhat.com>
1765 Jakub Jelinek <jakub@redhat.com>
1769 * c-typeck.c (convert_arguments): Don't promote last argument
1770 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1772 2016-06-08 Marek Polacek <polacek@redhat.com>
1775 * c-decl.c (grokdeclarator): Check TYPE_P.
1778 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1781 2016-06-07 David Malcolm <dmalcolm@redhat.com>
1783 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1784 and structure element reference, capture the location of the
1785 element name token and pass it to build_component_ref.
1786 (c_parser_postfix_expression_after_primary): Likewise for
1787 structure element dereference.
1788 (c_parser_omp_variable_list): Likewise for
1789 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1790 * c-tree.h (build_component_ref): Add location_t param.
1791 * c-typeck.c (build_component_ref): Add location_t param
1792 COMPONENT_LOC. Use it, if available, when issuing hints about
1793 mispelled member names to provide a fixit replacement hint.
1795 2016-06-06 Marek Polacek <polacek@redhat.com>
1798 * c-parser.c (c_parser_direct_declarator): Set location.
1800 2016-06-06 Marek Polacek <polacek@redhat.com>
1802 * c-typeck.c (comptypes_internal): Handle comparisons of
1803 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1804 TYPE_REF_CAN_ALIAS_ALL.
1806 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1808 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1809 arguments as addressable when async clause exists.
1811 2016-05-30 Jakub Jelinek <jakub@redhat.com>
1814 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1815 when combined with target construct.
1817 2016-05-26 Jakub Jelinek <jakub@redhat.com>
1819 * c-parser.c (c_parser_omp_clause_schedule): Warn if
1820 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1822 2016-05-25 Marek Polacek <polacek@redhat.com>
1825 * c-decl.c (c_make_fname_decl): Don't check seen_error.
1828 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1830 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
1832 * c-parser.c (c_parser_oacc_declare): Add support for
1833 GOMP_MAP_FIRSTPRIVATE_POINTER.
1834 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1835 argument with enum c_omp_region_type ort.
1836 (handle_omp_array_sections): Likewise. Update call to
1837 handle_omp_array_sections_1.
1838 (c_finish_omp_clauses): Add specific errors and warning messages for
1839 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
1840 call to handle_omp_array_sections.
1842 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
1844 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1846 2016-05-24 Richard Biener <rguenther@suse.de>
1850 * c-typeck.c (build_array_ref): Do not complain about indexing
1851 non-lvalue vectors. Adjust for function name change.
1853 2016-05-20 Martin Sebor <msebor@redhat.com>
1856 * c-typeck.c (error_init): Use
1857 expansion_point_location_if_in_system_header.
1858 (warning_init): Same.
1860 2016-05-19 David Malcolm <dmalcolm@redhat.com>
1863 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
1865 (c_parser_postfix_expression): Likewise.
1866 * c-tree.h (c_expr::set_error): New method.
1867 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
1868 that result's range is initialized.
1870 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
1872 * c-typeck.c (parser_build_unary_op): Fix formatting.
1874 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
1876 * c-decl.c (grokdeclarator): Remove errmsg and use of
1877 targetm.invalid_return_type.
1878 (grokparms): Remove errmsg and use of
1879 targetm.invalid_parameter_type.
1881 2016-05-13 Joseph Myers <joseph@codesourcery.com>
1883 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
1884 function return type.
1886 2016-05-12 Marek Polacek <polacek@redhat.com>
1889 * c-decl.c (build_compound_literal): Pass LOC down to
1890 c_incomplete_type_error.
1891 * c-tree.h (require_complete_type): Adjust declaration.
1892 (c_incomplete_type_error): Likewise.
1893 * c-typeck.c (require_complete_type): Add location parameter, pass it
1894 down to c_incomplete_type_error.
1895 (c_incomplete_type_error): Add location parameter, pass it down to
1897 (build_component_ref): Pass location down to c_incomplete_type_error.
1898 (default_conversion): Pass location down to require_complete_type.
1899 (build_array_ref): Likewise.
1900 (build_function_call_vec): Likewise.
1901 (convert_arguments): Likewise.
1902 (build_unary_op): Likewise.
1903 (build_c_cast): Likewise.
1904 (build_modify_expr): Likewise.
1905 (convert_for_assignment): Likewise.
1906 (c_finish_omp_clauses): Likewise.
1908 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1911 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
1913 * c-errors.c (pedwarn_c90): Return true if warned.
1914 * c-tree.h (pedwarn_c90): Change return type to bool.
1915 (enum c_declspec_word): Add new enumerator cdw_atomic.
1917 2016-05-11 Marek Polacek <polacek@redhat.com>
1920 * c-decl.c (diagnose_mismatched_decls): Factor out code to
1921 diagnose_mismatched_attributes and call it.
1923 2016-05-10 Marek Polacek <polacek@redhat.com>
1926 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
1927 on a declaration following the definition.
1929 2016-05-05 Jakub Jelinek <jakub@redhat.com>
1931 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
1932 parse it through to c_parser_c99_block_statement.
1933 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
1936 2016-05-04 Marek Polacek <polacek@redhat.com>
1938 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1941 2016-05-04 Marek Polacek <polacek@redhat.com>
1944 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1945 for macro expansions.
1947 2016-05-03 Marek Polacek <polacek@redhat.com>
1950 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1951 check_builtin_function_arguments.
1953 2016-05-03 Richard Biener <rguenther@suse.de>
1955 * Make-lang.in (cc1-checksum.c): For stage-final re-use
1956 the checksum from the previous stage.
1958 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
1960 * c-parser.c (c_parser_oacc_all_clauses): Update call to
1961 c_finish_omp_clauses.
1962 (c_parser_omp_all_clauses): Likewise.
1963 (c_parser_oacc_cache): Likewise.
1964 (c_parser_oacc_loop): Likewise.
1965 (omp_split_clauses): Likewise.
1966 (c_parser_omp_declare_target): Likewise.
1967 (c_parser_cilk_all_clauses): Likewise.
1968 (c_parser_cilk_for): Likewise.
1969 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1970 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1972 2016-05-02 Marek Polacek <polacek@redhat.com>
1975 * c-decl.c (grokdeclarator): Diagnose when array's size has an
1978 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
1981 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1982 OACC_LOOP_CLAUSE_MASK.
1983 (c_parser_oacc_kernels_parallel): Update call to
1984 c_oacc_split_loop_clauses.
1986 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
1988 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1989 argument to build_modify_expr in two cases.
1991 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
1993 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1994 warn_for_memset instead of warning directly here.
1996 2016-04-26 Marek Polacek <polacek@redhat.com>
1999 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
2001 (c_parser_for_statement): ... here.
2002 (c_parser_if_statement): Use it.
2003 (c_parser_switch_statement): Use it.
2004 (c_parser_while_statement): Use it.
2007 * c-decl.c (pushdecl): Pass LOCUS down to warning.
2009 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2012 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
2013 instead of c_finish_cilk_clauses.
2014 * c-tree.h (c_finish_omp_clauses): Add new default argument.
2015 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
2016 floating-point variables in the linear clause for Cilk Plus.
2018 2016-04-18 Michael Matz <matz@suse.de>
2020 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
2021 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
2023 2016-04-15 Marek Polacek <polacek@redhat.com>
2026 * c-typeck.c (build_unary_op): Pass location down to error and
2029 2016-04-15 Jakub Jelinek <jakub@redhat.com>
2032 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
2034 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
2035 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
2036 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
2037 Adjust c_parser_pragma callers.
2038 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
2040 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
2042 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
2043 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
2044 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
2045 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
2046 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
2047 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
2048 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
2049 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
2051 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
2052 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
2055 2016-04-13 Marek Polacek <polacek@redhat.com>
2058 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
2060 (c_parser_statement): Likewise.
2061 (c_parser_c99_block_statement): Likewise.
2062 (c_parser_while_statement): Likewise.
2063 (c_parser_for_statement): Likewise.
2064 (c_parser_if_body): Don't set IF_P here.
2065 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
2066 about dangling else here.
2067 * c-tree.h (c_finish_if_stmt): Adjust declaration.
2068 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
2069 warn about dangling else here.
2071 2016-04-04 Marek Polacek <polacek@redhat.com>
2074 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
2076 2016-03-31 Marek Polacek <polacek@redhat.com>
2079 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
2081 2016-03-18 David Malcolm <dmalcolm@redhat.com>
2084 * c-parser.c (c_parser_postfix_expression): Set the source range
2085 for uses of "__builtin_types_compatible_p".
2087 2016-03-17 Jakub Jelinek <jakub@redhat.com>
2090 * c-typeck.c (composite_type): Don't count void_list_node
2091 into len, if the list is terminated by void_list_node, start
2092 with void_list_node instead of NULL for newargs. Stop
2095 2016-03-16 Marek Polacek <polacek@redhat.com>
2098 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
2099 nested functions returning VM types.
2101 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
2103 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
2104 when calling c_finish_omp_clauses.
2106 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
2109 * c-decl.c (get_parm_info): Don't queue implicit function declarations
2112 2016-03-04 Marek Polacek <polacek@redhat.com>
2115 * c-parser.c (c_parser_postfix_expression): Call
2116 c_parser_cast_expression rather than c_parser_postfix_expression.
2118 2016-03-01 Jakub Jelinek <jakub@redhat.com>
2122 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
2123 of incomplete decls to error_mark_node.
2125 2016-02-24 Marek Polacek <polacek@redhat.com>
2128 * c-decl.c (finish_decl): Don't update the copy of the type of a
2129 different decl type.
2131 2016-02-23 Jakub Jelinek <jakub@redhat.com>
2134 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
2135 in id_kind reclassification.
2137 2016-02-16 Jakub Jelinek <jakub@redhat.com>
2140 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
2142 2016-02-16 James Norris <jnorris@codesourcery.com>
2145 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2147 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2149 * c-decl.c (build_null_declspecs): Zero the entire struct.
2152 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2153 callers changed. If nested_p is true, use it to call
2154 finish_implicit_inits.
2155 * c-tree.h (finish_implicit_inits): Declare.
2156 * c-typeck.c (finish_implicit_inits): New function. Move code
2158 (push_init_level): ... here.
2159 (set_designator, process_init_element): Call finish_implicit_inits.
2161 2016-02-11 Jakub Jelinek <jakub@redhat.com>
2164 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2165 arguments for -Waddress warning.
2167 2016-02-04 Jakub Jelinek <jakub@redhat.com>
2170 * c-decl.c (finish_enum): When honoring mode attribute,
2171 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2173 2016-01-29 Jakub Jelinek <jakub@redhat.com>
2176 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2177 all type variants, not just TYPE_MAIN_VARIANT.
2179 2016-01-27 Jakub Jelinek <jakub@redhat.com>
2182 * c-decl.c (c_write_global_declarations_1): Warn with
2183 warn_unused_function if static prototype without definition
2186 2016-01-27 Marek Polacek <polacek@redhat.com>
2189 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2190 to unsigned, if needed. Add -Wsign-compare warning.
2192 2016-01-26 Jakub Jelinek <jakub@redhat.com>
2194 PR tree-optimization/69483
2195 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2197 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2200 * c-tree.h (incomplete_record_decls): Declare.
2201 * c-parser.c (incomplete_record_decls): Define.
2202 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2203 report error if any decl has zero size.
2204 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2205 or enum type to incomplete_record_decls.
2207 2016-01-14 Tom de Vries <tom@codesourcery.com>
2209 PR tree-optimization/68773
2210 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2213 2016-01-14 Marek Polacek <polacek@redhat.com>
2216 * c-decl.c (grokdeclarator): Provide more information for invalid
2219 2016-01-06 David Malcolm <dmalcolm@redhat.com>
2221 * c-parser.c (c_parser_unary_expression): For dereferences, build
2222 a combined location before calling build_indirect_ref, so that
2223 error reports cover the full range, manually updating the c_expr
2226 2016-01-06 Marek Polacek <polacek@redhat.com>
2229 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2230 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2233 2016-01-04 Jakub Jelinek <jakub@redhat.com>
2235 Update copyright years.
2237 2016-01-04 Marek Polacek <polacek@redhat.com>
2240 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2241 optimization to use __atomic_fetch_* built-in if possible.
2243 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2245 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2247 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2250 2015-12-22 Marek Polacek <polacek@redhat.com>
2253 * c-typeck.c (build_component_ref): Warn when acessing elements of
2254 atomic structures or unions.
2256 2015-12-21 David Malcolm <dmalcolm@redhat.com>
2258 * c-typeck.c: Include "gcc-rich-location.h".
2259 (build_binary_op): In the two places that call binary_op_error,
2260 create a gcc_rich_location and populate it with the location of
2261 the binary op and its two operands.
2263 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2265 * c-parser.c (c_parser_statement_after_labels): When calling
2266 c_finish_return, Use the return expression's location if it has
2267 one, falling back to the location of the first token within it.
2268 * c-typeck.c (c_finish_return): When issuing warnings about
2269 the incorrect presence/absence of a return value, issue a note
2270 showing the declaration of the function.
2272 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2274 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2276 (c_parser_peek_nth_token): New function.
2277 (c_parser_peek_conflict_marker): New function.
2278 (c_parser_error): Detect conflict markers and report them as such.
2280 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2282 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2283 to preserve range information for the primary expression
2284 in the call to c_parser_postfix_expression_after_primary.
2286 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2288 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2289 expression location, falling back on the first token location,
2290 rather than always using the latter.
2292 2015-12-16 Marek Polacek <polacek@redhat.com>
2295 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2298 2015-12-15 Marek Polacek <polacek@redhat.com>
2301 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2304 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2306 * c-parser.c (c_parser_alignof_expression): Capture location of
2307 closing parenthesis (if any), or of end of unary expression, and
2308 use it to build a src_range for the expression.
2310 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2313 * c-parser.c (c_parser_get_builtin_args): Add
2314 "out_close_paren_loc" param, and write back to it.
2315 (c_parser_postfix_expression): Capture the closing
2316 parenthesis location for RID_CHOOSE_EXPR,
2317 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2318 RID_BUILTIN_SHUFFLE and use it to set the source range
2319 for such expressions; within RID_BUILTIN_COMPLEX set
2320 the underlying location.
2322 2015-12-07 Marek Polacek <polacek@redhat.com>
2325 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2326 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2328 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2330 * c-tree.h (c_build_va_arg): Adjust prototype.
2331 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2332 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2333 parameter, adjust throughout and issue an error if EXPR is a component
2334 with reverse storage order.
2336 2015-12-02 Jason Merrill <jason@redhat.com>
2338 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2339 (c_fully_fold_internal, decl_constant_value_for_optimization):
2340 Move from c-common.c.
2341 * c-tree.h: Declare decl_constant_value_for_optimization.
2342 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2344 2015-12-02 Joseph Myers <joseph@codesourcery.com>
2347 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2348 following link from declarator to next declarator. Track original
2349 qualified type and pass it to c_build_qualified_type.
2350 * c-typeck.c (c_build_qualified_type): Add arguments
2351 orig_qual_type and orig_qual_indirect.
2353 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2355 * c-parser.c (c_parser_omp_clause_name)
2356 (c_parser_oacc_all_clauses): Alphabetical sorting.
2358 2015-12-02 Jakub Jelinek <jakub@redhat.com>
2361 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2364 2015-12-01 Julian Brown <julian@codesourcery.com>
2365 Cesar Philippidis <cesar@codesourcery.com>
2366 James Norris <James_Norris@mentor.com>
2368 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2369 (c_parser_oacc_clause_use_device): New function.
2370 (c_parser_oacc_all_clauses): Add use_device support.
2371 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2372 (c_parser_oacc_host_data): New function.
2373 (c_parser_omp_construct): Add host_data support.
2374 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2375 * c-typeck.c (c_finish_oacc_host_data): New function.
2376 (c_finish_omp_clauses): Add use_device support.
2378 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
2381 * c-decl.c: Set TYPE_PACKED in variants.
2383 2015-11-27 Martin Liska <mliska@suse.cz>
2386 * c-array-notation.c (fix_builtin_array_notation_fn):
2387 Use release_vec_vec instead of vec::release.
2388 (build_array_notation_expr): Likewise.
2389 (fix_conditional_array_notations_1): Likewise.
2390 (fix_array_notation_expr): Likewise.
2391 (fix_array_notation_call_expr): Likewise.
2393 2015-11-27 Jakub Jelinek <jakub@redhat.com>
2396 * c-parser.c (c_parser_compound_statement_nostart): If
2397 last_label is true, use pragma_stmt instead of pragma_compound
2398 as second c_parser_pragma argument.
2399 (c_parser_omp_ordered, c_parser_omp_target_update,
2400 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2401 false as second argument to c_parser_skip_to_pragma_eol after
2402 diagnosing standalone directives used in pragma_stmt context.
2404 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2406 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2407 with "if (ENABLE_OFFLOADING)".
2409 2015-11-23 David Malcolm <dmalcolm@redhat.com>
2412 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2413 for various Objective-C constructs: Class.name syntax,
2414 @selector(), @protocol(), @encode(), and [] message syntax.
2416 2015-11-20 David Malcolm <dmalcolm@redhat.com>
2419 * c-typeck.c (should_suggest_deref_p): New function.
2420 (build_component_ref): Special-case POINTER_TYPE when
2421 generating a "not a structure of union" error message, and
2422 suggest a "->" rather than a ".", providing a fix-it hint.
2424 2015-11-19 David Malcolm <dmalcolm@redhat.com>
2426 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2427 candidate into a new function, find_closest_identifier.
2429 2015-11-19 Marek Polacek <polacek@redhat.com>
2432 * c-typeck.c (parser_build_binary_op): Properly handle
2433 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2435 2015-11-17 David Malcolm <dmalcolm@redhat.com>
2437 * c-parser.c (set_c_expr_source_range): Bulletproof both
2438 overloaded implementations against NULL expr->value.
2439 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2441 (c_parser_unary_expression): Likewise when handling addresses of
2443 (c_parser_postfix_expression): Likewise for statement expressions,
2444 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2445 __builtin_va_arg, and for __builtin_offset_of.
2446 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2447 src_range using the range of the braced initializer.
2448 (c_parser_transaction_expression): Set src_range for "ret" to a
2449 sane pair of values.
2451 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2453 * c-parser.c (c_finish_omp_declare_simd): Look for
2454 "simd" attribute as well. Update error message.
2456 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2458 * c-parser.c (c_parser_omp_declare_target): Adjust.
2460 2015-11-14 Jakub Jelinek <jakub@redhat.com>
2462 * c-typeck.c (c_finish_omp_clauses): Don't mark
2463 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2465 2015-11-14 Marek Polacek <polacek@redhat.com>
2467 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2468 * c-typeck.c: Likewise.
2470 2015-11-13 David Malcolm <dmalcolm@redhat.com>
2472 * c-decl.c (warn_defaults_to): Pass line_table to
2474 * c-errors.c (pedwarn_c99): Likewise.
2475 (pedwarn_c90): Likewise.
2476 * c-parser.c (set_c_expr_source_range): New functions.
2477 (c_token::get_range): New method.
2478 (c_token::get_finish): New method.
2479 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2480 based on the range from the start of the LHS to the end of the
2482 (c_parser_conditional_expression): Likewise, based on the range
2483 from the start of the cond.value to the end of exp2.value.
2484 (c_parser_binary_expression): Call set_c_expr_source_range on
2485 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2486 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2487 based on the cast_loc through to the end of the expr.
2488 (c_parser_unary_expression): Likewise, based on the
2489 op_loc through to the end of op.
2490 (c_parser_sizeof_expression) Likewise, based on the start of the
2491 sizeof token through to either the closing paren or the end of
2493 (c_parser_postfix_expression): Likewise, using the token range,
2494 or from the open paren through to the close paren for
2495 parenthesized expressions.
2496 (c_parser_postfix_expression_after_primary): Likewise, for
2497 various kinds of expression.
2498 * c-tree.h (struct c_expr): Add field "src_range".
2499 (c_expr::get_start): New method.
2500 (c_expr::get_finish): New method.
2501 (set_c_expr_source_range): New decls.
2502 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2503 on ret for prefix unary ops.
2504 (parser_build_binary_op): Likewise, running from the start of
2505 arg1.value through to the end of arg2.value.
2507 2015-11-13 Marek Polacek <polacek@redhat.com>
2510 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2512 2015-11-13 David Malcolm <dmalcolm@redhat.com>
2514 * c-typeck.c: Include spellcheck.h.
2515 (lookup_field_fuzzy_find_candidates): New function.
2516 (lookup_field_fuzzy): New function.
2517 (build_component_ref): If the field was not found, try using
2518 lookup_field_fuzzy and potentially offer a suggestion.
2520 2015-11-12 James Norris <jnorris@codesourcery.com>
2521 Joseph Myers <joseph@codesourcery.com>
2523 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2524 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2525 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2526 and PRAGMA_OMP_CLAUSE_LINK.
2527 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2528 and PRAGMA_OACC_CLAUSE_LINK.
2529 (OACC_DECLARE_CLAUSE_MASK): New definition.
2530 (c_parser_oacc_declare): New function.
2532 2015-11-12 Marek Polacek <polacek@redhat.com>
2535 * c-parser.c (c_parser_for_statement): Reclassify the token in
2538 2015-11-11 Marek Polacek <polacek@redhat.com>
2542 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2543 checking the size of an array.
2545 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
2547 * c-array-notation.c: Remove unused header files.
2548 * c-aux-info.c: Likewise.
2549 * c-convert.c: Likewise.
2550 * c-decl.c: Likewise.
2551 * c-errors.c: Likewise.
2552 * c-lang.c: Likewise.
2553 * c-objc-common.c: Likewise.
2554 * c-parser.c: Likewise.
2555 * c-typeck.c: Likewise.
2556 * gccspec.c: Likewise.
2558 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2559 Cesar Philippidis <cesar@codesourcery.com>
2560 James Norris <jnorris@codesourcery.com>
2561 Julian Brown <julian@codesourcery.com>
2562 Nathan Sidwell <nathan@codesourcery.com>
2565 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2567 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2568 (c_parser_pragma): Parse 'acc routine'.
2569 (OACC_ROUTINE_CLAUSE_MARK): Define.
2570 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2572 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2575 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2576 location of the backward-goto to the start of the loop body.
2578 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2581 * c-parser.c (c_parser_while_statement): Finish the loop before
2582 parsing ahead for misleading indentation.
2583 (c_parser_for_statement): Likewise.
2585 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2587 * c-decl.c (finish_struct): If the structure has reverse storage
2588 order, rewrite the type of array fields with scalar component. Call
2589 maybe_apply_pragma_scalar_storage_order on entry.
2590 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2591 errors on bit-fields and reverse SSO here and not...
2592 (c_mark_addressable): ...here.
2593 (output_init_element): Adjust call to initializer_constant_valid_p.
2594 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2596 2015-11-06 David Malcolm <dmalcolm@redhat.com>
2598 * c-decl.c (warn_defaults_to): Update for change in signature
2599 of diagnostic_set_info.
2600 * c-errors.c (pedwarn_c99): Likewise.
2601 (pedwarn_c90): Likewise.
2602 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2603 for textinfo::set_location.
2605 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2606 Thomas Schwinge <thomas@codesourcery.com>
2607 James Norris <jnorris@codesourcery.com>
2609 * c-parser.c (c_parser_omp_clause_name): Add support for
2610 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2611 (c_parser_omp_clause_default): Add is_oacc argument. Handle
2612 default(none) in OpenACC.
2613 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2615 (c_parser_oacc_clause_tile): New function.
2616 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2617 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2618 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2620 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2621 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2623 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2624 (c_parser_oacc_update): Update the error message for missing clauses.
2625 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2626 and OMP_CLAUSE_INDEPENDENT.
2628 2015-11-05 Marek Polacek <polacek@redhat.com>
2631 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2632 deal with pre-evaluation on invalid types.
2634 2015-11-05 Jakub Jelinek <jakub@redhat.com>
2635 Ilya Verbin <ilya.verbin@intel.com>
2637 * c-parser.c: Include context.h and gimple-expr.h.
2638 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2639 monotonic together with nonmonotonic.
2640 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
2641 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2642 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2643 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2644 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
2645 expressions on combined target teams before the target.
2646 (c_parser_omp_declare_target): If decl has "omp declare target" or
2647 "omp declare target link" attribute, and cgraph or varpool node already
2648 exists, then set corresponding flags. Call c_finish_omp_clauses
2649 in the parenthesized extended-list syntax case.
2650 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2652 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2653 on OMP_CLAUSE_REDUCTION array sections.
2654 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2655 into the constant offset, or for variable low-bound using
2656 POINTER_PLUS_EXPR. For structure element based array sections use
2657 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2658 (c_finish_omp_clauses): Drop generic_field_head, structure
2659 elements are now always mapped even as array section bases,
2660 diagnose same var in data sharing and mapping clauses. Diagnose if
2661 linear step on declare simd is neither a constant nor a uniform
2662 parameter. Look through POINTER_PLUS_EXPR for array section
2663 reductions. Diagnose the same var or function appearing multiple
2664 times on the same directive. Fix up wording for the to clause if t
2665 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
2666 modifier on kinds other than dynamic or guided or nonmonotonic
2667 modifier together with ordered clause.
2669 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2670 Chung-Lin Tang <cltang@codesourcery.com>
2672 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2674 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
2676 * c-array-notation.c: Reorder #include's and remove duplicates.
2677 * c-aux-info.c: Likewise.
2678 * c-convert.c: Likewise.
2679 * c-decl.c: Likewise.
2680 * c-errors.c: Likewise.
2681 * c-lang.c: Likewise.
2682 * c-objc-common.c: Likewise.
2683 * c-parser.c: Likewise.
2684 * c-typeck.c: Likewise.
2686 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
2689 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2690 after calling build_qualified_type.
2692 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2693 Thomas Schwinge <thomas@codesourcery.com>
2694 James Norris <jnorris@codesourcery.com>
2695 Joseph Myers <joseph@codesourcery.com>
2696 Julian Brown <julian@codesourcery.com>
2697 Bernd Schmidt <bschmidt@redhat.com>
2699 * c-parser.c (c_parser_oacc_shape_clause): New.
2700 (c_parser_oacc_simple_clause): New.
2701 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2702 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2704 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2705 James Norris <jnorris@codesourcery.com>
2706 Cesar Philippidis <cesar@codesourcery.com>
2710 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2711 parameters, and handle these. Adjust all users.
2712 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2714 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2716 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2718 (c_finish_omp_construct): Declare function.
2719 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2720 Merge functions into...
2721 (c_finish_omp_construct): ... this new function.
2723 2015-10-22 Richard Biener <rguenther@suse.de>
2725 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2726 before folding a MINUS_EXPR.
2728 2015-10-21 Marek Polacek <polacek@redhat.com>
2731 * c-decl.c (start_function): Warn about vararg functions without
2734 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2736 * c-typeck.c (build_conditional_expr): Use boolean vector
2737 type for vector comparison.
2738 (build_vec_cmp): New.
2739 (build_binary_op): Use build_vec_cmp for comparison.
2741 2015-10-20 Marek Polacek <polacek@redhat.com>
2743 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2745 2015-10-20 Marek Polacek <polacek@redhat.com>
2748 * c-parser.c (c_parser_attributes): Break out of the loop if the
2749 token after an attribute isn't a comma.
2751 2015-10-13 Jakub Jelinek <jakub@redhat.com>
2752 Aldy Hernandez <aldyh@redhat.com>
2754 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2755 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2756 (c_parser_omp_variable_list): Handle structure elements for
2757 map, to and from clauses. Handle array sections in reduction
2758 clause. Formatting fixes.
2759 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2760 if clause modifiers.
2761 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2762 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2763 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2764 c_parser_omp_clause_is_device_ptr): New functions.
2765 (c_parser_omp_clause_ordered): Parse optional parameter.
2766 (c_parser_omp_clause_reduction): Handle array reductions.
2767 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2768 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2770 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2771 (c_parser_omp_clause_depend_sink): New function.
2772 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2773 (c_parser_omp_clause_map): Parse release/delete map kinds and
2774 optional always modifier.
2775 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2776 and c_finish_omp_clauses callers.
2777 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
2778 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2779 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2780 (OMP_CRITICAL_CLAUSE_MASK): Define.
2781 (c_parser_omp_critical): Parse critical clauses.
2782 (c_parser_omp_for_loop): Handle doacross loops, adjust
2783 c_finish_omp_for and c_finish_omp_clauses callers.
2784 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2785 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2786 (OMP_FOR_CLAUSE_MASK): Add linear clause.
2787 (c_parser_omp_for): Disallow ordered clause when combined with
2788 distribute. Disallow linear clause when combined with distribute
2789 and not combined with simd.
2790 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2791 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2792 parse clauses and if depend clause is found, don't parse a body.
2793 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2794 Allow target parallel without for after it.
2795 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2796 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2797 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2799 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2800 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2801 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2802 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2804 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2805 defaultmap and is_device_ptr clauses.
2806 (c_parser_omp_target): Parse target parallel and target simd. Set
2807 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
2808 and target exit data. Diagnose invalid map kinds.
2809 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2810 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2812 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2814 (OMP_TASKLOOP_CLAUSE_MASK): Define.
2815 (c_parser_omp_taskloop): New function.
2816 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2817 handle PRAGMA_OMP_TASKLOOP.
2818 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2819 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2820 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2821 Add IS_OMP argument, handle structure element bases, diagnose
2822 bitfields, pass IS_OMP recursively, diagnose known zero length
2823 array sections in depend clauses, handle array sections in reduction
2824 clause, diagnose negative length even for pointers.
2825 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2826 types, pass IS_OMP down to handle_omp_array_sections_1, handle
2827 array sections in reduction clause, set
2828 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2829 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2830 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2831 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2833 2015-10-06 Marek Polacek <polacek@redhat.com>
2835 * c-parser.c (c_parser_statement_after_labels): Use
2836 protected_set_expr_location.
2837 (c_parser_omp_clause_num_gangs): Likewise.
2838 (c_parser_omp_clause_num_threads): Likewise.
2839 (c_parser_omp_clause_num_workers): Likewise.
2840 (c_parser_omp_clause_vector_length): Likewise.
2841 (c_parser_omp_clause_num_teams): Likewise.
2842 (c_parser_omp_clause_thread_limit): Likewise.
2843 * c-typeck.c (build_c_cast): Likewise.
2844 (c_cast_expr): Likewise.
2846 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2848 * c-typeck.c (c_tree_equal): Use real_equal instead of
2851 2015-10-04 Jason Merrill <jason@redhat.com>
2853 * c-parser.c (c_lex_one_token): Handle @synchronized.
2854 * c-decl.c (match_builtin_function_types): A declaration of a built-in
2855 can change whether the function is transaction_safe.
2857 2015-10-02 Marek Polacek <polacek@redhat.com>
2860 * c-typeck.c (convert_for_assignment): Use the expansion point
2861 location throughout.
2863 2015-10-02 Marek Polacek <polacek@redhat.com>
2866 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
2867 and pass it down to c_parser_if_statement.
2868 (c_parser_else_body): Add CHAIN parameter and pass it down to
2869 c_parser_statement_after_labels.
2870 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
2871 duplicated if-else-if conditions.
2873 2015-10-01 Marek Polacek <polacek@redhat.com>
2875 * c-typeck.c (convert_for_assignment): Improve commentary.
2877 2015-09-30 Marek Polacek <polacek@redhat.com>
2880 * c-typeck.c (c_finish_return): Use the expansion point location for
2881 certain "return with value" warnings.
2883 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2885 * c-parser.c (pragma_lex): Add loc argument.
2887 2015-09-15 Marek Polacek <polacek@redhat.com>
2890 * c-decl.c (tag_exists_p): New function.
2891 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
2892 struct/union/enum keywords are missing.
2893 * c-tree.h (tag_exists_p): Declare.
2895 2015-09-15 Marek Polacek <polacek@redhat.com>
2897 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
2898 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
2899 Return NULL_TREE instead of 0.
2900 (lookup_name): Return NULL_TREE instead of 0.
2901 (lookup_name_in_scope): Likewise.
2902 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
2903 (parser_xref_tag): Use false instead of 0.
2904 (start_struct): Use true instead of 1.
2905 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2907 2015-09-14 Marek Polacek <polacek@redhat.com>
2909 * c-typeck.c (set_nonincremental_init_from_string): Use
2910 HOST_WIDE_INT_M1U when shifting a negative value.
2912 2015-09-09 Mark Wielaard <mjw@redhat.com>
2914 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
2917 2015-09-10 Jakub Jelinek <jakub@redhat.com>
2920 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
2921 into OMP_FOR_PRE_BODY rather than before the loop.
2923 2015-09-09 Jakub Jelinek <jakub@redhat.com>
2926 * c-parser.c (c_parser_oacc_all_clauses,
2927 c_parser_omp_all_clauses): Remove invalid clause from
2928 list of clauses even if parser->error is set.
2931 * c-parser.c (c_parser_omp_clause_aligned,
2932 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
2934 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
2938 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2939 instead of c_parser_unary_expression. If the result is !lvalue_p,
2940 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2942 2015-09-04 Marek Polacek <polacek@redhat.com>
2945 * c-typeck.c (build_binary_op): Don't instrument static initializers.
2947 2015-09-03 Martin Sebor <msebor@redhat.com>
2950 * c-typeck.c (convert_arguments, parser_build_unary_op,
2951 build_conditional_expr, c_cast_expr, convert_for_assignment,
2952 build_binary_op, _objc_common_truthvalue_conversion): Call
2954 (c_decl_implicit): Define.
2956 2015-09-02 Marek Polacek <polacek@redhat.com>
2959 * c-parser.c (c_parser_enum_specifier): Give a better error for
2962 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2964 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2966 2015-08-12 Marek Polacek <polacek@redhat.com>
2968 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2971 2015-08-03 Marek Polacek <polacek@redhat.com>
2974 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2976 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2978 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2980 * c-parser.c (c_parser_if_body): Take token_indent_info
2981 argument. Call warn_for_misleading_indentation even when the
2982 body is a semicolon. Extract token_indent_infos corresponding
2983 to the guard, body and next tokens. Adjust call to
2984 warn_for_misleading_indentation accordingly.
2985 (c_parser_else_body): Likewise.
2986 (c_parser_if_statement): Likewise.
2987 (c_parser_while_statement): Likewise.
2988 (c_parser_for_statement): Likewise.
2990 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
2991 Manuel López-Ibáñez <manu@gcc.gnu.org>
2993 * c-decl.c (get_parm_info): Remove static var. Update warning
2996 2015-07-27 Marek Polacek <polacek@redhat.com>
3000 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
3002 2015-07-20 Marek Polacek <polacek@redhat.com>
3005 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
3006 (build_binary_op): Warn about left shift overflows.
3008 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
3010 * c-array-notation.c: Adjust includes for flags.h changes.
3011 * c-objc-common.c: Likewise.
3013 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
3015 * c-array-notation.c: Adjust includes.
3016 * c-aux-info.c: Likewise.
3017 * c-convert.c: Likewise.
3018 * c-decl.c: Likewise.
3019 * c-errors.c: Likewise.
3020 * c-lang.c: Likewise.
3021 * c-objc-common.c: Likewise.
3022 * c-parser.c: Likewise.
3023 * c-typeck.c: Likewise.
3025 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3028 * c-decl.c (finish_function): Call do_warn_unused_parameter.
3030 2015-06-29 Marek Polacek <polacek@redhat.com>
3033 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
3034 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
3035 about -Wswitch-bool here.
3036 (do_case): Update c_add_case_label call.
3037 (c_finish_case): Update c_do_switch_warnings call.
3039 2015-06-27 Marek Polacek <polacek@redhat.com>
3041 * c-typeck.c: Use VECTOR_TYPE_P throughout.
3043 2015-06-26 Marek Polacek <polacek@redhat.com>
3045 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3047 * c-typeck.c (array_to_pointer_conversion): Likewise.
3048 (build_unary_op): Likewise.
3049 (c_finish_return): Likewise.
3051 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
3053 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
3054 * c-parser.c: Likewise.
3056 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3058 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
3059 instead of pointer_hash.
3060 (detect_field_duplicates): Likewise.
3062 2015-06-25 Marek Polacek <polacek@redhat.com>
3064 * c-array-notation.c: Use VAR_P throughout.
3065 * c-decl.c: Likewise.
3066 * c-objc-common.c: Likewise.
3067 * c-parser.c: Likewise.
3068 * c-typeck.c: Likewise.
3070 2015-06-25 Marek Polacek <polacek@redhat.com>
3072 * c-decl.c: Use is_global_var throughout.
3073 * c-parser.c: Likewise.
3074 * c-typeck.c: Likewise.
3076 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
3078 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
3079 * c-aux-info.c: Likewise.
3080 * c-convert.c: Likewise.
3081 * c-decl.c: Likewise.
3082 * c-errors.c: Likewise.
3083 * c-lang.c: Likewise.
3084 * c-objc-common.c: Likewise.
3085 * c-parser.c: Likewise.
3086 * c-typeck.c: Likewise.
3088 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
3091 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
3094 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
3096 * c-decl.c (pop_scope): Register the main translation unit
3097 through the new debug hook.
3099 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
3101 * c-array-notation.c : Adjust include files.
3102 * c-aux-info.c : Likewise.
3103 * c-convert.c : Likewise.
3104 * c-decl.c : Likewise.
3105 * c-errors.c : Likewise.
3106 * c-lang.c : Likewise.
3107 * c-lang.h : Likewise.
3108 * c-objc-common.c : Likewise.
3109 * c-parser.c : Likewise.
3110 * c-typeck.c : Likewise.
3112 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
3114 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
3115 immediately clobber it.
3116 (c_write_global_declarations_1): Remove call to
3117 check_global_declaration_1.
3118 (c_write_global_declarations_2): Remove.
3119 (c_write_final_cleanups): Rename from c_write_global_declarations.
3120 Remove call to finalize_compilation_unit.
3121 Remove calls to debugging hooks.
3122 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
3123 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
3124 * c-tree.h: Remove c_write_global_declarations.
3126 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
3128 * c-array-notation.c: Adjust includes for restructured coretypes.h.
3129 * c-aux-info.c: Likewise.
3130 * c-convert.c: Likewise.
3131 * c-decl.c: Likewise.
3132 * c-errors.c: Likewise.
3133 * c-lang.c: Likewise.
3134 * c-objc-common.c: Likewise.
3135 * c-parser.c: Likewise.
3136 * c-typeck.c: Likewise.
3138 2015-06-04 Marek Polacek <polacek@redhat.com>
3141 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3144 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3146 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3147 Warn for empty struct.
3148 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3150 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3152 * c-decl.c (start_function): Call plugin before parsing.
3153 (finish_function): Call plugin after parsing.
3155 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3158 * c-decl.c (merge_decls): Merge DECL_COMMON.
3160 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
3162 * Make-lang.in (check_gcc_pallelize): Define.
3164 2015-05-22 Marek Polacek <polacek@redhat.com>
3167 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3170 2015-05-21 Marek Polacek <polacek@redhat.com>
3172 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3175 2015-05-20 Marek Polacek <polacek@redhat.com>
3177 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3178 * c-typeck.c: Likewise.
3180 2015-05-19 Marek Polacek <polacek@redhat.com>
3182 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3184 2015-05-19 Jakub Jelinek <jakub@redhat.com>
3187 * c-parser.c (c_parser_omp_for_loop): Don't add
3188 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3189 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3190 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3193 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3195 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
3198 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3201 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3204 2015-05-14 Marek Polacek <polacek@redhat.com>
3208 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3211 2015-05-12 David Malcolm <dmalcolm@redhat.com>
3213 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3214 to add a call to warn_for_misleading_indentation.
3215 (c_parser_else_body): Likewise, adding param "else_loc".
3216 (c_parser_if_statement): Check for misleading indentation.
3217 (c_parser_while_statement): Likewise.
3218 (c_parser_for_statement): Likewise.
3220 2015-05-08 Marek Polacek <polacek@redhat.com>
3223 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3224 (output_init_element): Likewise.
3226 2015-05-07 Marek Polacek <polacek@redhat.com>
3229 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3232 2015-04-30 Marek Polacek <polacek@redhat.com>
3234 * c-typeck.c (set_init_label): Call error_at instead of error and
3237 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3240 * c-typeck.c (c_build_va_arg): Clarify the error message.
3242 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3244 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3245 OMP_STANDALONE_CLAUSES.
3247 2015-04-28 Marek Polacek <polacek@redhat.com>
3249 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3251 2015-04-28 Marek Polacek <polacek@redhat.com>
3254 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3256 2015-04-25 Marek Polacek <polacek@redhat.com>
3259 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3262 2015-04-23 Marek Polacek <polacek@redhat.com>
3265 * c-decl.c (set_labels_context_r): New function.
3266 (store_parm_decls): Call it via walk_tree_without_duplicates.
3267 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3268 instead of create_tmp_var. Build TARGET_EXPR instead of
3270 (build_atomic_assign): Use create_tmp_var_raw instead of
3271 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3273 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3275 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3276 (c_parser_omp_target_update): Add missed %> to error_at ().
3278 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3281 * c-decl.c (c_default_pointer_mode): Remove definition.
3282 * c-tree.h (c_default_pointer_mode): Remove declaration.
3284 2015-03-27 Tobias Burnus <burnus@net-b.de>
3287 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3289 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3290 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3291 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3293 2015-03-19 Jakub Jelinek <jakub@redhat.com>
3295 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3296 attribute for DECL_EXTERNAL VAR_DECLs.
3298 2015-03-11 Jakub Jelinek <jakub@redhat.com>
3300 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3303 2015-03-10 Jakub Jelinek <jakub@redhat.com>
3306 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3307 before preparing arguments to warn_logical_not_parentheses.
3309 2015-03-09 Jakub Jelinek <jakub@redhat.com>
3312 * c-typeck.c (parser_build_binary_op): Don't warn for
3313 !!x == y or !b == y where b is _Bool.
3315 2015-03-09 Marek Polacek <polacek@redhat.com>
3317 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3318 * c-decl.c (grokdeclarator): Likewise.
3319 * c-typeck.c (build_binary_op): Likewise.
3321 2015-02-27 Marek Polacek <polacek@redhat.com>
3324 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3326 2015-02-14 Marek Polacek <polacek@redhat.com>
3329 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3330 declared through a typedef name.
3332 2015-02-13 Marek Polacek <polacek@redhat.com>
3335 * c-decl.c (grokdeclarator): Print also the type when giving
3336 the error message about array's incomplete element type.
3338 2015-02-11 Jakub Jelinek <jakub@redhat.com>
3341 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3342 check in the POP macro.
3344 2015-02-09 Marek Polacek <polacek@redhat.com>
3347 * c-typeck.c (process_init_element): Don't always wrap
3348 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3349 initializing a range of elements.
3351 2015-02-04 Jakub Jelinek <jakub@redhat.com>
3355 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3357 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
3359 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3360 processing enum declaration.
3362 2015-01-29 Marek Polacek <polacek@redhat.com>
3365 * c-typeck.c (pop_init_level): If constructor_elements has
3366 exactly one element with integer_zerop value, set constructor_zeroinit
3367 to 1. Remove braces around warning_init call.
3369 2015-01-27 Jakub Jelinek <jakub@redhat.com>
3372 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3373 of FUNCTION_DECLs with error_mark_node.
3375 2015-01-26 Jakub Jelinek <jakub@redhat.com>
3378 * c-typeck.c (convert_arguments): Return -1 if there are
3379 error_args, even if we've diagnosed too many arguments.
3381 2015-01-21 Richard Biener <rguenther@suse.de>
3384 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3385 for builtins the user declared correctly.
3387 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3388 Bernd Schmidt <bernds@codesourcery.com>
3389 Cesar Philippidis <cesar@codesourcery.com>
3390 James Norris <jnorris@codesourcery.com>
3391 Jakub Jelinek <jakub@redhat.com>
3392 Ilmir Usmanov <i.usmanov@samsung.com>
3394 * c-parser.c: Include "gomp-constants.h".
3395 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3396 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3397 Use OMP_CLAUSE_SET_MAP_KIND.
3398 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3399 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3400 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3401 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3402 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3403 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3404 "copyout", "create", "delete", "deviceptr", "gang", "host",
3405 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3406 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3407 "present_or_create", "pcreate", "seq", "self", "vector",
3408 "vector_length", "wait", "worker".
3409 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3410 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3411 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3412 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3413 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3414 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3415 (c_parser_oacc_data_clause_deviceptr)
3416 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3417 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3418 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3419 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3420 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3421 (c_parser_oacc_parallel, c_parser_oacc_update)
3422 (c_parser_oacc_wait): New functions.
3423 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3424 (c_finish_oacc_data): New prototypes.
3425 * c-typeck.c: Include "gomp-constants.h".
3426 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3427 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3428 OMP_CLAUSE_SET_MAP_KIND.
3429 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3430 (c_finish_oacc_data): New functions.
3431 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3432 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3433 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3434 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3435 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3436 GOMP_MAP_FORCE_DEVICEPTR.
3438 2015-01-09 Michael Collison <michael.collison@linaro.org>
3440 * c-array-notation.c: Include hash-set.h, machmode.h,
3441 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3442 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3443 * c-aux-info.c: Ditto.
3444 * c-convert.c: Ditto.
3446 * c-errors.c: Ditto.
3447 * c-lang.c: Dittoxs.
3448 * c-objc-common.c: Ditto.
3449 * c-parser.c: Ditto.
3450 * c-typeck.c: Include hash-set.h, machmode.h,
3451 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3452 fold-const.h, wide-int.h, inchash.h, real.h and
3453 fixed-value.h due to flattening of tree.h.
3455 2015-01-07 Marek Polacek <polacek@redhat.com>
3458 * c-typeck.c (process_init_element): Disallow initialization of
3459 a flexible array member with a string constant if the structure
3462 2015-01-05 Jakub Jelinek <jakub@redhat.com>
3465 * c-typeck.c (convert_for_assignment, c_finish_return): For
3466 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3467 types also set in_late_binary_op around convert call.
3468 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3469 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3470 result on expr as last argument to ubsan_instrument_float_cast,
3471 if in_late_binary_op, don't use c_save_expr but save_expr.
3473 Update copyright years.
3475 2015-01-05 Marek Polacek <polacek@redhat.com>
3478 * c-typeck.c (build_array_ref): Pass loc down to
3479 warn_array_subscript_with_type_char.
3481 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
3483 * c-typeck.c: New behavious for pointers to arrays with qualifiers
3484 (common-pointer-type): For pointers to arrays take qualifiers from
3486 (build_conditional_expr): Add warnings for lost qualifiers.
3487 (comp-target-types): Allow pointers to arrays with different qualifiers.
3488 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
3489 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
3490 to PEDWARN_FOR_QUALIFIERS.
3492 2014-12-17 Jakub Jelinek <jakub@redhat.com>
3495 * c-convert.c: Include ubsan.h.
3496 (convert): For real -> integral casts and
3497 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3498 instead instrument the float cast directly.
3500 2014-11-29 Jakub Jelinek <jakub@redhat.com>
3502 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3503 c_finish_stmt_expr): Remove NULL last argument from
3504 create_tmp_var_raw and create_tmp_var calls.
3505 * c-array-notation.c (fix_builtin_array_notation_fn,
3506 build_array_notation_expr, fix_conditional_array_notations_1,
3507 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3509 2014-11-28 Marek Polacek <polacek@redhat.com>
3512 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3513 convert the right operand to integer type.
3515 2014-11-25 Marek Polacek <polacek@redhat.com>
3518 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3519 for inline functions.
3521 2014-11-21 Jakub Jelinek <jakub@redhat.com>
3524 * c-typeck.c (build_array_ref): Adjust
3525 convert_vector_to_pointer_for_subscript caller. If it returns true,
3526 call non_lvalue_loc on the result.
3528 2014-11-11 Richard Biener <rguenther@suse.de>
3530 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3533 2014-11-10 Andi Kleen <ak@linux.intel.com>
3536 * c-parser.c (c_parser_statement_after_labels): Call
3538 (c_parser_if_statement): Dito.
3539 (c_parser_switch_statement): Dito.
3540 (c_parser_while_statement): Dito.
3541 (c_parser_do_statement): Dito.
3542 (c_parser_for_statement): Dito.
3543 * c-typeck.c (c_finish_loop): Dito.
3545 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3547 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3548 OPT_Wshift_count_overflow in the warnings.
3550 2014-10-30 Marek Polacek <polacek@redhat.com>
3552 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3553 print the stripped version as well, if they're not the same.
3555 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3557 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3560 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
3562 * c-decl.c: Adjust include files.
3563 * c-parser.c: Ditto.
3565 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3566 Tom Tromey <tromey@redhat.com>
3568 * c-tree.h (enum c_oracle_request): New.
3569 (c_binding_oracle_function): New typedef.
3570 (c_binding_oracle, c_pushtag, c_bind): Declare.
3571 * c-decl.c (c_binding_oracle): New global.
3572 (I_SYMBOL_CHECKED): New macro.
3573 (i_symbol_binding): New function.
3574 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3575 (I_TAG_CHECKED): New macro.
3576 (i_tag_binding): New function.
3577 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3578 (I_LABEL_CHECKED): New macro.
3579 (i_label_binding): New function.
3580 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3581 (c_print_identifier): Save and restore c_binding_oracle.
3582 (c_pushtag, c_bind): New functions.
3584 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
3586 * c-typeck.c: Adjust include files.
3588 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3591 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3592 initialization here...
3593 (c_initialize_diagnostics): ... but here. Set defaults after
3594 building pretty-printer.
3596 2014-10-23 Marek Polacek <polacek@redhat.com>
3599 * c-decl.c (pop_scope): Don't print warning in external_scope.
3601 2014-10-19 Marek Polacek <polacek@redhat.com>
3604 * c-typeck.c (output_init_element): Allow initializing objects with
3605 static storage duration with compound literals even in C99 and add
3608 2014-10-17 Marek Polacek <polacek@redhat.com>
3611 * c-typeck.c (digest_init): Allow initializing objects with static
3612 storage duration with compound literals even in C99 and add pedwarn
3615 2014-10-17 Marek Polacek <polacek@redhat.com>
3618 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3619 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3620 error multiple times. Print the type.
3622 2014-10-17 Marek Polacek <polacek@redhat.com>
3625 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3628 2014-10-17 Marek Polacek <polacek@redhat.com>
3630 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3631 (start_function): Use OPT_Wimplicit_int instead of 0.
3632 (store_parm_decls_oldstyle): Likewise.
3634 2014-10-17 Alan Modra <amodra@gmail.com>
3637 * c-decl.c (merge_decls): Don't merge section name or tls model
3638 to newdecl symtab node, instead merge to olddecl. Override
3639 existing olddecl section name. Set tls_model for all thread-local
3640 vars, not just OMP thread-private ones. Remove incorrect comment.
3642 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
3644 * c-decl.c: Adjust include files.
3646 2014-10-14 DJ Delorie <dj@redhat.com>
3648 * c-parser.c (c_parse_init): Add RID entries for each __intN.
3649 (c_token_starts_typename): Check all __intN, not just __int128.
3650 (c_token_starts_declspecs): Likewise.
3651 (c_parser_declspecs): Likewise.
3652 (c_parser_attribute_any_word): Likewise.
3653 (c_parser_objc_selector): Likewise.
3654 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3655 (struct c_declspecs): Add int_n_idx field to record *which* __intN
3657 * c-decl.c (declspecs_add_type): Check for all __intN, not just
3659 (finish_declspecs): Likewise.
3661 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
3663 * c-parser.c (c_parser_all_labels): New function to replace
3665 (c_parser_statement): Call the new function.
3667 2014-10-09 Marek Polacek <polacek@redhat.com>
3670 * c-typeck.c (pop_init_level): Don't warn about initializing
3673 2014-10-07 Marek Polacek <polacek@redhat.com>
3676 * c-decl.c (header_for_builtin_fn): New function.
3677 (implicitly_declare): Suggest which header to include.
3679 2014-10-07 Marek Polacek <polacek@redhat.com>
3681 * c-convert.c (convert): Use error_operand_p.
3682 * c-typeck.c (require_complete_type): Likewise.
3683 (really_atomic_lvalue): Likewise.
3684 (digest_init): Likewise.
3685 (handle_omp_array_sections_1): Likewise.
3687 2014-10-03 Marek Polacek <polacek@redhat.com>
3690 * c-decl.c (pop_scope): Don't warn about "inline function declared
3691 but never defined" for functions marked with gnu_inline attribute.
3693 2014-09-25 Jakub Jelinek <jakub@redhat.com>
3696 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3697 on low_bound and length.
3699 2014-09-24 Marek Polacek <polacek@redhat.com>
3703 * c-parser.c: Don't define CPP_KEYWORD.
3704 (c_parser_switch_statement): Pass original type to c_finish_case.
3705 * c-tree.h (c_finish_case): Update declaration.
3706 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3707 conditionally to c_do_switch_warnings.
3709 2014-09-03 Marek Polacek <polacek@redhat.com>
3712 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3715 2014-09-02 Jakub Jelinek <jakub@redhat.com>
3716 Balaji V. Iyer <balaji.v.iyer@intel.com>
3717 Igor Zamyatin <igor.zamyatin@intel.com>
3719 * c-parser.c (c_parser_cilk_for): New function.
3720 (c_parser_cilk_grainsize): Likewise.
3721 (c_get_temp_regvar): Likewise.
3722 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3723 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3724 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3725 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3728 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3730 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3731 with using HOST_WIDE_INT without truncation to 'int'
3733 2014-08-22 Marek Polacek <polacek@redhat.com>
3736 * c-typeck.c (parser_build_binary_op): Adjust call to
3737 warn_logical_not_parentheses.
3739 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3742 * c-parser.c (c_parser_array_notation): Check for correct
3743 type of an array added.
3745 2014-08-19 Marek Polacek <polacek@redhat.com>
3748 * c-typeck.c (build_binary_op): If either operand of a comparison
3749 is a boolean expression, call maybe_warn_bool_compare.
3751 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3754 * c-typeck.c (build_c_cast): Do a conversion even when the
3755 TYPE_MAIN_VARIANTs are the same.
3757 2014-08-19 Marek Polacek <polacek@redhat.com>
3759 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3760 pedwarn_c99 instead of pedwarn.
3761 (grokfield): Likewise.
3762 (warn_defaults_to): New function.
3763 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3764 Unconditionally call pedwarn_c99 instead of pedwarn.
3765 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3766 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3767 check flag_isoc11 before.
3768 * c-errors.c (pedwarn_c99): Change the return type to bool.
3769 Handle -Wc99-c11-compat.
3770 * c-parser.c (disable_extension_diagnostics): Handle
3771 warn_c99_c11_compat.
3772 (restore_extension_diagnostics): Likewise.
3773 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3774 instead of pedwarn, don't check flag_isoc11 before.
3775 (c_parser_declspecs): Likewise.
3776 (c_parser_alignas_specifier): Likewise.
3777 (c_parser_alignof_expression): Likewise.
3778 (c_parser_generic_selection): Likewise.
3779 * c-tree.h (pedwarn_c99): Update declaration.
3780 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3783 2014-08-19 Marek Polacek <polacek@redhat.com>
3785 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3787 * c-errors.c: Include "opts.h".
3788 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3789 * c-parser.c (disable_extension_diagnostics): Handle negative value
3790 of warn_c90_c99_compat, too.
3791 (restore_extension_diagnostics): Likewise.
3792 (c_parser_compound_statement_nostart): Pass
3793 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3795 2014-08-12 Marek Polacek <polacek@redhat.com>
3797 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3799 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3801 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3803 2014-08-10 Marek Polacek <polacek@redhat.com>
3806 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3807 Call pedwarn_c90 instead of pedwarn.
3808 (check_bitfield_type_and_width): Likewise.
3809 (declspecs_add_qual): Likewise.
3810 (declspecs_add_type): Likewise.
3811 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3812 Adjust to only call pedwarn_c90.
3813 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
3814 pedwarn_c90 instead of pedwarn.
3815 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3816 * c-parser.c (disable_extension_diagnostics): Handle
3817 warn_c90_c99_compat.
3818 (restore_extension_diagnostics): Likewise.
3819 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
3820 pedwarn_c90 instead of pedwarn.
3821 (c_parser_initelt): Likewise.
3822 (c_parser_postfix_expression): Likewise.
3823 (c_parser_postfix_expression_after_paren_type): Likewise.
3824 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3825 * c-tree.h: Fix formatting.
3826 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
3827 pedwarn_c90 instead of pedwarn.
3829 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
3831 * c-typeck.c: Remove include of pointer-set.h.
3833 2014-08-07 Marek Polacek <polacek@redhat.com>
3835 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3837 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3839 * c-typeck.c: Use hash_map instead of pointer_map.
3841 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3843 * c-decl.c: Use hash_set instead of pointer_set.
3845 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
3848 * c-array-notation.c (expand_array_notations): Handling
3851 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
3854 * c-typeck.c (c_finish_return): Return 0 instead of the address of
3857 2014-07-30 Tom Tromey <tromey@redhat.com>
3859 * c-typeck.c (struct constructor_stack) <designator_depth>: New
3861 (really_start_incremental_init, push_init_level): Initialize
3863 (pop_init_level): Set global designator_depth.
3864 (process_init_element): Check for designated_init attribute.
3866 2014-07-20 Marek Polacek <polacek@redhat.com>
3869 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
3870 (implicitly_declare): Pass location to implicit_decl_warning.
3872 2014-07-14 Jakub Jelinek <jakub@redhat.com>
3875 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
3876 If non-NULL, call c_parser_check_literal_zero.
3877 (c_parser_check_literal_zero): New function.
3878 (c_parser_postfix_expression_after_primary): Adjust
3879 c_parser_expr_list caller, handle -Wmemset-transposed-args.
3881 2014-07-06 Marek Polacek <polacek@redhat.com>
3884 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
3885 * c-tree.h (C_ARRAY_PARAMETER): Define.
3886 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
3889 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
3890 Chen Gang <gang.chen.5i5j@gmail.com>
3892 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
3895 2014-07-01 Marek Polacek <polacek@redhat.com>
3897 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
3898 instead of 0 to WARN_FOR_ASSIGNMENT.
3900 2014-07-01 Marek Polacek <polacek@redhat.com>
3903 * c-typeck.c (convert_for_assignment): Pass
3904 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
3906 2014-06-30 Marek Polacek <polacek@redhat.com>
3908 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
3909 has no_sanitize_undefined attribute.
3911 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
3914 * c-array-notation.c (fix_builtin_array_notation_fn):
3915 Check for 0 arguments in builtin call. Check that bultin argument is
3917 * c-parser.c (c_parser_array_notation): Check for incorrect initial
3920 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
3922 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3923 qualifiers in __auto_type for atomic types.
3924 (c_parser_typeof_specifier): Discard all type qualifiers in
3925 __typeof__ for atomic types.
3927 2014-06-25 Marek Polacek <polacek@redhat.com>
3930 * c-parser.c (c_parser_statement_after_labels): Pass the location of
3931 the return expression to c_finish_return.
3933 2014-06-25 Jakub Jelinek <jakub@redhat.com>
3935 * c-typeck.c (c_finish_omp_clauses): Make sure
3936 OMP_CLAUSE_LINEAR_STEP has correct type.
3938 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
3942 2014-06-24 Jakub Jelinek <jakub@redhat.com>
3944 * c-parser.c (c_parser_omp_for_loop): For
3945 #pragma omp parallel for simd move lastprivate clause from parallel
3946 to for rather than simd.
3948 2014-06-23 Marek Polacek <polacek@redhat.com>
3950 * c-typeck.c (parser_build_binary_op): Don't call
3951 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3953 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
3955 * c-parser.c (c_parser_omp_threadprivate): Likewise.
3956 * c-decl.c (merge_decls): Likewise.
3958 2014-06-09 Marek Polacek <polacek@redhat.com>
3961 * c-typeck.c (error_init): Call inform instead of error_at.
3962 (pedwarn_init): Call inform instead of pedwarn.
3963 (warning_init): Call inform instead of warning_at.
3965 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
3967 * c-decl.c (merge_decls): Use set_decl_section_name.
3968 (duplicate_decls): Remove node if it exists.
3970 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
3973 * c-typeck.c (push_init_level, process_init_element,
3974 pop_init_level): Correct check for zero initialization, move
3975 missing brace warning to respect zero initialization.
3977 2014-06-05 Marek Polacek <polacek@redhat.com>
3980 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3982 2014-06-05 Marek Polacek <polacek@redhat.com>
3985 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3986 on the left hand side operand of a comparison.
3988 2014-06-05 Marek Polacek <polacek@redhat.com>
3991 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3992 Print note only if the warning was printed.
3994 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
3997 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
4000 2014-06-03 Marek Polacek <polacek@redhat.com>
4003 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
4005 * c-tree.h (c_start_case): Update.
4006 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
4007 switch condition has boolean value.
4009 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
4011 * c-decl.c: Include builtins.h.
4012 * c-parser.c: Likewise.
4014 2014-05-27 Marek Polacek <polacek@redhat.com>
4017 * c-typeck.c (convert_arguments): Get location of a parameter. Change
4018 error and warning calls to error_at and warning_at. Pass location of
4019 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
4020 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
4021 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
4023 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
4026 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
4027 function parameters.
4029 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
4031 * c-decl.c (merge_decls): Preserve symtab node pointers.
4032 (duplicate_decls): Free new decl.
4034 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
4036 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
4039 * c-parser.c (c_parser_omp_target): Return bool values.
4041 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4043 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
4044 num_teams_loc variable to num_thread_limit_loc.
4046 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4048 * c-array-notation.c (expand_array_notations): Use void_node
4049 instead of void_zero_node.
4051 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4053 * c-decl.c (finish_struct): Adjust.
4054 (finish_enum): Likewise.
4056 (record_inline_static): Likewise.
4057 (push_scope): Likewise.
4058 (make_label): Likewise.
4059 (lookup_label_for_goto): Likewise.
4060 (finish_struct): Likewise.
4061 (finish_enum): Likewise.
4062 (store_parm_decls): Likewise.
4063 (c_push_function_context): Likewise.
4064 * c-lang.h: Remove usage of variable_size gty attribute.
4065 * c-parser.c (c_parse_init): Adjust.
4066 (c_parse_file): Likewise.
4068 2014-05-13 Marek Polacek <polacek@redhat.com>
4071 * c-typeck.c (convert_for_assignment): Pass location to
4072 WARN_FOR_ASSIGNMENT instead of input_location.
4074 2014-05-10 Marek Polacek <polacek@redhat.com>
4076 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
4077 maybe_warn_string_init.
4078 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
4079 maybe_warn_string_init.
4080 * c-tree.h (maybe_warn_string_init): Update declaration.
4081 * c-typeck.c (maybe_warn_string_init): Add location parameter.
4082 Call pedwarn_init with loc instead of with input_location.
4083 (digest_init): Pass init_loc to maybe_warn_string_init.
4084 (pop_init_level): Call pedwarn_init with loc instead of with
4086 (set_init_index): Likewise.
4087 (process_init_element): Likewise.
4089 2014-05-09 Marek Polacek <polacek@redhat.com>
4092 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
4093 (c_parser_initelt): Pass location to set_init_label. Pass array index
4094 location to set_init_index.
4095 * c-tree.h (push_init_level): Update declaration.
4096 (pop_init_level): Likewise.
4097 (set_init_index): Likewise.
4098 (set_init_label): Likewise.
4099 * c-typeck.c (error_init): Add location parameter. Call error_at
4101 (digest_init): Pass init_loc to error_init.
4102 (really_start_incremental_init):
4103 (push_init_level): Add location parameter. Pass loc to pop_init_level
4105 (pop_init_level): Likewise.
4106 (set_designator): Add location parameter. Pass loc to pop_init_level,
4107 push_init_level, and error_init.
4108 (set_init_index): Add location parameter. Pass loc to error_init and
4110 (set_init_label): Likewise.
4111 (output_init_element): Pass loc to error_init.
4112 (process_init_element): Pass loc to error_init, pop_init_level,
4113 pedwarn_init, and push_init_level.
4115 2014-05-09 Marek Polacek <polacek@redhat.com>
4118 * c-parser.c (c_parser_attributes): Parse the arguments as an
4119 expression-list if the attribute takes identifier.
4121 2014-05-08 Marek Polacek <polacek@redhat.com>
4124 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
4127 2014-05-08 Marek Polacek <polacek@redhat.com>
4130 * c-decl.c (start_function): Warn for _Atomic-qualified return type
4133 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4134 Mike Stump <mikestump@comcast.net>
4135 Richard Sandiford <rdsandiford@googlemail.com>
4137 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
4138 (finish_enum): Use wide-int interfaces.
4139 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
4140 * c-typeck.c (build_c_cast): Likewise.
4141 (set_nonincremental_init_from_string): Likewise.
4142 (c_tree_equal): Likewise.
4144 2014-05-02 Marek Polacek <polacek@redhat.com>
4147 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4148 Return size_one_node when the type is not complete.
4149 (pointer_diff): Remove comment.
4150 (build_unary_op): Improve error messages.
4152 2014-05-02 Marek Polacek <polacek@redhat.com>
4154 * c-typeck.c (c_finish_return): Separate warning_at calls.
4156 2014-05-02 Marek Polacek <polacek@redhat.com>
4158 * c-tree.h (error_init): Remove declaration.
4159 (pedwarn_init): Likewise.
4160 * c-typeck.c (error_init): Make static and move above.
4161 (pedwarn_init): Likewise.
4162 (warning_init): Move above.
4163 (maybe_warn_string_init): Likewise.
4165 2014-05-01 Jeff Law <law@redhat.com>
4169 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4170 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4173 2014-05-02 Marek Polacek <polacek@redhat.com>
4176 * c-typeck.c (push_init_level): Set constructor_designated to
4177 p->designated for structures.
4179 2014-05-01 Marek Polacek <polacek@redhat.com>
4182 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4183 function-definition has an attribute after the declarator.
4185 2014-05-01 Marek Polacek <polacek@redhat.com>
4188 * c-typeck.c (warning_init): Add location_t parameter. Call
4189 warning_at instead of warning.
4190 (push_init_level): Pass input_location to warning_init.
4191 (add_pending_init): Add location_t parameter. Pass loc to
4193 (set_nonincremental_init): Pass input_location to add_pending_init.
4194 (set_nonincremental_init_from_string): Likewise.
4195 (output_init_element): Pass loc to warning_init and to
4198 2014-05-01 Marek Polacek <polacek@redhat.com>
4201 * c-typeck.c (c_finish_return): Distinguish between label and variable
4202 when warning about returning local address.
4204 2014-05-01 Marek Polacek <polacek@redhat.com>
4207 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4210 2014-05-01 Marek Polacek <polacek@redhat.com>
4213 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4214 instead of 0 to WARN_FOR_QUALIFIERS.
4216 2014-05-01 Marek Polacek <polacek@redhat.com>
4219 * c-typeck.c (default_conversion): Use better location for
4222 2014-04-30 Marek Polacek <polacek@redhat.com>
4224 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4225 also when SANITIZE_FLOAT_DIVIDE is on.
4227 2014-04-30 Marek Polacek <polacek@redhat.com>
4230 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4231 and pedwarn_init. Use loc insted of input_location.
4233 2014-04-30 Marek Polacek <polacek@redhat.com>
4236 * c-typeck.c (build_binary_op): Use location when warning about
4239 2014-04-25 Marek Polacek <polacek@redhat.com>
4242 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4243 always_inline/noinline and hot/cold attributes.
4245 2014-04-25 Marek Polacek <polacek@redhat.com>
4248 * c-parser.c (c_parser_initelt): Pass input_location to
4249 process_init_element.
4250 (c_parser_initval): Pass loc to process_init_element.
4251 * c-tree.h (process_init_element): Adjust declaration.
4252 * c-typeck.c (push_init_level): Pass input_location to
4253 process_init_element.
4254 (pop_init_level): Likewise.
4255 (set_designator): Likewise.
4256 (output_init_element): Add location_t parameter. Pass loc to
4258 (output_pending_init_elements): Pass input_location to
4259 output_init_element.
4260 (process_init_element): Add location_t parameter. Pass loc to
4261 output_init_element.
4263 2014-04-24 Jakub Jelinek <jakub@redhat.com>
4265 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4266 atomic-clause, allow comma in between atomic-clause and
4269 2014-04-22 Jakub Jelinek <jakub@redhat.com>
4272 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4273 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4275 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4278 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4279 create_tmp_var instead build_decl for creating temps.
4280 (build_array_notation_expr): Likewise.
4281 (fix_conditional_array_notations_1): Likewise.
4282 (fix_array_notation_expr): Likewise.
4283 (fix_array_notation_call_expr): Likewise.
4285 2014-03-28 Jakub Jelinek <jakub@redhat.com>
4288 * c-tree.h (c_build_function_call_vec): New prototype.
4289 * c-typeck.c (build_function_call_vec): Don't call
4290 resolve_overloaded_builtin here.
4291 (c_build_function_call_vec): New wrapper function around
4292 build_function_call_vec. Call resolve_overloaded_builtin here.
4293 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4294 Call c_build_function_call_vec instead of build_function_call_vec.
4295 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4296 * c-decl.c (finish_decl): Likewise.
4298 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4301 * c-typeck.c: Use correct format string in cast-qual warning
4303 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4305 * c-decl.c (c_decl_attributes): Use
4306 lang_hooks.types.omp_mappable_type.
4307 * c-typeck.c (c_finish_omp_clauses): Likewise.
4309 2014-03-06 Marek Polacek <polacek@redhat.com>
4312 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4313 of checking tree code.
4315 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4317 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4318 (c_parser_parameter_declaration): Likewise.
4320 2014-02-19 Marek Polacek <polacek@redhat.com>
4323 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4324 Call mark_exp_read on exp.value.
4325 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4326 TREE_ADDRESSABLE on old instead of val.
4327 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4329 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4331 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4332 C_EXPR_APPEND by vec_safe_push.
4333 * c-tree.h (C_EXPR_APPEND): Remove.
4335 2014-01-31 Marek Polacek <polacek@redhat.com>
4338 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4339 build_function_call_vec.
4340 (build_function_call): Likewise.
4341 (build_atomic_assign): Likewise.
4342 (build_function_call_vec): Add arg_loc parameter. Use it.
4343 (convert_arguments): Likewise.
4344 (convert_for_assignment): Rename rhs_loc to expr_loc.
4345 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4346 (c_parser_objc_keywordexpr): Likewise.
4347 (c_parser_postfix_expression_after_primary): Call
4348 build_function_call_vec with expr_loc rather than op_loc.
4349 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4350 build_function_call_vec.
4351 (c_parser_expr_list): Add locations parameter. Fill it with locations
4352 of function arguments.
4353 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4355 2014-01-30 Marek Polacek <polacek@redhat.com>
4358 * c-typeck.c (build_function_call_vec): Use loc parameter.
4359 (convert_arguments): Add location parameter. Use it.
4360 (ep_convert_and_check): Likewise.
4361 (build_atomic_assign): Adjust convert_for_assignment call.
4362 (build_modify_expr): Likewise.
4363 (digest_init): Likewise.
4364 (c_finish_return): Likewise.
4365 (build_conditional_expr): Adjust ep_convert_and_check calls.
4366 (convert_for_assignment): Add rhs_loc parameter. Use it.
4367 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4370 2014-01-30 Richard Biener <rguenther@suse.de>
4373 * c-typeck.c (build_function_call_vec): Do not replace calls
4374 to a function via an incompatible type with a runtime abort.
4376 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4378 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4379 flag_enable_cilkplus with flag_cilkplus.
4380 (c_parser_direct_declarator_inner): Likewise.
4381 (c_parser_attribute_any_word): Likewise.
4382 (c_parser_attributes): Likewise.
4383 (c_parser_compound_statement): Likewise.
4384 (c_parser_statement_after_labels): Likewise.
4385 (c_parser_if_statement): Likewise.
4386 (c_parser_switch_statement): Likewise.
4387 (c_parser_do_statement): Likewise.
4388 (c_parser_for_statement): Likewise.
4389 (c_parser_unary_expression): Likewise.
4390 (c_parser_postfix_expression): Likewise.
4391 (c_parser_postfix_expression_after_primary): Likewise.
4392 (c_parser_postfix_expression_after_primary): Likewise.
4393 (c_parser_omp_clause_name): Likewise.
4394 (c_finish_omp_declare_simd): Likewise.
4395 (c_parser_cilk_verify_simd): Likewise.
4396 * c-typeck.c (build_array_ref): Likewise.
4397 (build_function_call_vec): Likewise.
4398 (convert_arguments): Likewise.
4399 (build_compound_expr): Likewise.
4400 (c_finish_return): Likewise.
4401 (c_finish_if_stmt): Likewise.
4402 (c_finish_loop): Likewise.
4403 (build_binary_op): Likewise.
4405 2014-01-23 Marek Polacek <polacek@redhat.com>
4408 * c-typeck.c (parser_build_binary_op): Use location instead of
4410 (build_binary_op): Pass location to shorten_compare.
4412 2014-01-23 Marek Polacek <polacek@redhat.com>
4415 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4418 2014-01-23 Marek Polacek <polacek@redhat.com>
4421 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4422 of a comma expression.
4423 (emit_side_effect_warnings): Likewise.
4425 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4428 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4429 function to use walk_tree and moved a lot of its functionality to
4430 expand_array_notations.
4431 (expand_array_notations): New function.
4433 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4435 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4436 attribute an attribute without value.
4438 2014-01-23 Jakub Jelinek <jakub@redhat.com>
4441 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4442 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4444 2014-01-22 Marek Polacek <polacek@redhat.com>
4447 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4448 of remove_c_maybe_const_expr on op1 and op2.
4450 2014-01-15 Jakub Jelinek <jakub@redhat.com>
4453 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4454 effects, preevaluate rhs using SAVE_EXPR first.
4456 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4459 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4460 statements with if-elseif statements.
4462 2014-01-06 Marek Polacek <polacek@redhat.com>
4465 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4466 defined bit-field types only in ISO C.
4468 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4470 Update copyright years
4472 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4474 * c-array-notation.c: Use the standard form for the copyright notice.
4476 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4478 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4479 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4480 field in parser is not empty. If not-empty, call the function
4481 c_parser_finish_omp_declare_simd.
4482 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4483 between SIMD-enabled functions and #pragma simd. Added new parameter.
4484 (c_parser_cilk_all_clauses): Modified the usage of the function
4485 c_parser_cilk_clause_vectorlength as mentioned above.
4486 (c_parser_cilk_simd_fn_vector_attrs): New function.
4487 (c_finish_cilk_simd_fn_tokens): Likewise.
4488 (is_cilkplus_vector_p): Likewise.
4489 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4490 "nomask," and "mask" strings in clause name.
4491 (c_parser_omp_all_clauses): Added 3 new case statements:
4492 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4493 PRAGMA_CILK_CLAUSE_NOMASK.
4494 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4495 check for vector attribute and if so call the function
4496 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4497 called the function c_finish_cilk_simd_fn_tokens.
4498 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4499 parser field is non-empty. If so, parse them as you would parse
4500 the omp declare simd pragma.
4501 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4502 Added a check when step is a parameter and flag it as error.
4503 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4504 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4507 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4509 * c-parser.c (c_parser_omp_parallel): Fix description.
4511 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4513 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4514 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4515 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4516 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4518 2013-12-04 Joseph Myers <joseph@codesourcery.com>
4521 * c-parser.c (c_parser_alignas_specifier): Use
4522 c_sizeof_or_alignof_type instead of c_alignof.
4523 (c_parser_alignof_expression): Likewise, with min_alignof
4524 parameter depending on alignof spelling used.
4526 2013-12-04 Marek Polacek <polacek@redhat.com>
4529 * c-decl.c (start_function): Don't warn for missing prototype for
4532 2013-12-03 Marek Polacek <polacek@redhat.com>
4535 * c-decl.c (build_compound_literal): Allow compound literals with
4536 empty initial value.
4538 2013-12-02 Joseph Myers <joseph@codesourcery.com>
4541 * c-typeck.c (build_modify_expr): Diagnose assignment to
4542 expression with array type.
4544 2013-11-29 Joseph Myers <joseph@codesourcery.com>
4547 * c-typeck.c (process_init_element): Do not treat a string as
4548 initializing a whole array when used with a designator for an
4551 2013-11-29 Joseph Myers <joseph@codesourcery.com>
4554 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4555 an inline function following a static declaration.
4557 2013-11-28 Jakub Jelinek <jakub@redhat.com>
4560 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4561 to p_name before calling c_parser_omp_teams instead of after.
4562 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4563 argument. Remove unused p_name variable.
4565 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
4566 Jakub Jelinek <jakub@redhat.com>
4568 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4569 external_scope is NULL.
4571 2013-11-27 Tom de Vries <tom@codesourcery.com>
4572 Marc Glisse <marc.glisse@inria.fr>
4575 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4577 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
4579 * c-typeck.c: Add required include files from gimple.h.
4581 2013-11-22 David Malcolm <dmalcolm@redhat.com>
4583 * c-decl.c (define_label, shadow_tag_warned)
4584 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4585 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4586 (declspecs_add_type): Remove use of in_system_header macro.
4587 * c-parser.c (c_parser_unary_expression): Likewise.
4588 * c-typeck.c (store_init_value, process_init_element)
4589 (c_start_case): Likewise.
4591 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4594 * c-parser.c (c_parser_set_source_position_from_token): Remove
4595 reference to in_system_header from comment.
4597 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4599 * c-decl.c (grokdeclarator): Update comment to refer to
4600 tree_to_[su]hwi rather than tree_low_cst.
4602 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4604 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4605 tree_to_uhwi throughout.
4607 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4609 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4612 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4614 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4617 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
4619 * c-parser.c (c_parser_cilk_simd): New.
4620 (c_parser_cilk_verify_simd): New.
4621 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4622 (c_parser_omp_for_loop): Add case for NE_EXPR.
4623 Set c_break_label for CILK_SIMD.
4624 (c_parser_cilk_clause_vectorlength): New.
4625 (c_parser_cilk_clause_linear): New.
4626 (c_parser_cilk_clause_name): New.
4627 (c_parser_cilk_all_clauses): New.
4628 * c-typeck.c (build_unary_op): Pass location argument to
4630 (build_modify_expr): Same.
4631 (build_asm_expr): Same.
4632 (c_finish_bc_stmt): Error on break/continue in loops.
4634 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
4636 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4638 2013-11-14 Diego Novillo <dnovillo@google.com>
4640 * c-decl.c: Include print-tree.h.
4641 Include stor-layout.h.
4644 Include stringpool.h.
4645 * c-lang.c: Include fold-const.h.
4646 * c-parser.c: Include stringpool.h.
4648 Include stor-layout.h.
4650 Include trans-mem.h.
4651 * c-typeck.c: Include stor-layout.h.
4652 Include trans-mem.h.
4656 2013-11-13 Joseph Myers <joseph@codesourcery.com>
4658 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4659 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4661 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4662 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4664 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4665 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4666 (c_parser_declarator, c_parser_direct_declarator_inner)
4667 (c_parser_parameter_declaration, c_parser_type_name): All callers
4669 (c_parser_declaration_or_fndef): Handle declarations with type
4670 determined from the initializer.
4672 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
4674 * c-typeck.c: Include gimplify.h.
4676 2013-11-12 Joseph Myers <joseph@codesourcery.com>
4678 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4679 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4681 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4682 or _Thread_local as appropriate in diagnostics.
4683 (build_null_declspecs): Initialize ret->thread_gnu_p.
4684 (declspecs_add_scspec): Handle either __thread or _Thread_local
4685 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
4686 pedantic. Do not disallow _Thread_local extern and _Thread_local
4689 2013-11-07 Joseph Myers <joseph@codesourcery.com>
4690 Andrew MacLeod <amacleod@redhat.com>
4692 * c-aux-info.c (gen_type): Handle atomic qualifier.
4693 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4694 qualifiers when compating types.
4695 (shadow_tag_warned): Handle atomic_p in declspecs.
4696 (quals_from_declspecs): Likewise.
4697 (start_decl): Use c_type_promotes_to when promoting argument
4699 (grokdeclarator): Handle _Atomic.
4700 (get_parm_info): Diagnose any qualifier on "void" as only
4702 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4703 comparing types. Use c_type_promotes_to when promoting argument
4705 (finish_function): Use c_type_promotes_to when promoting argument
4707 (build_null_declspecs): Handle atomic_p in declspecs.
4708 (declspecs_add_qual): Handle RID_ATOMIC.
4709 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4710 (c_token_starts_declspecs): Handle RID_ATOMIC.
4711 (c_parser_declspecs): Handle atomic type specifiers and
4713 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4714 from types of expressions with atomic type.
4715 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4716 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4717 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4718 (c_parser_statement_after_labels, c_parser_switch_statement)
4719 (c_parser_for_statement, c_parser_expr_no_commas)
4720 (c_parser_conditional_expression, c_parser_binary_expression)
4721 (c_parser_cast_expression, c_parser_unary_expression)
4722 (c_parser_postfix_expression)
4723 (c_parser_postfix_expression_after_primary, c_parser_expression):
4724 Use convert_lvalue_to_rvalue.
4725 (c_parser_expression_conv, c_parser_expr_list): Document
4726 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4727 (c_parser_objc_synchronized_statement): Use
4728 convert_lvalue_to_rvalue.
4729 (c_parser_objc_selector): Handle RID_ATOMIC.
4730 (c_parser_objc_receiver, c_parser_array_notation): Use
4731 convert_lvalue_to_rvalue.
4732 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4733 _Atomic (type-name).
4734 (struct c_declspecs): Add atomic_p field.
4735 (convert_lvalue_to_rvalue): Declare.
4736 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4737 corresponding atomic types.
4738 (qualify_type): Don't add _Atomic qualifiers from second argument.
4739 (comp_target_types): Do not allow _Atomic mismatches.
4740 (type_lists_compatible_p): Do not remove atomic qualifiers when
4742 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4743 (build_atomic_assign): New functions.
4744 (build_unary_op): Use build_atomic_assign for atomic increment and
4746 (build_conditional_expr): Do not treat _Atomic void as a qualified
4748 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4749 (find_anonymous_field_with_type, convert_to_anonymous_field)
4750 (convert_for_assignment): Do not remove atomic qualifiers when
4752 (digest_init): Do not accept initialization of arrays of atomic
4753 elements by string constants.
4754 (build_asm_expr): Use convert_lvalue_to_rvalue.
4755 (build_binary_op): Do not treat _Atomic void as a qualified
4758 2013-11-06 DJ Delorie <dj@redhat.com>
4760 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4761 both explicit and builtin, print the location of the explicit one.
4763 2013-11-05 Tobias Burnus <burnus@net-b.de>
4765 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4766 c_parser_omp_distribute, c_parser_omp_teams,
4767 c_parser_omp_target, c_parser_omp_declare): Handle
4770 2013-11-03 Marek Polacek <polacek@redhat.com>
4772 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4774 2013-11-01 Jakub Jelinek <jakub@redhat.com>
4776 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4777 check_dup_generic at the end, unless remove is true.
4778 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4780 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4782 2013-10-31 Jakub Jelinek <jakub@redhat.com>
4784 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4785 with decl that is not pointer nor array.
4787 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4789 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4790 a spawning function is found.
4791 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4792 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4793 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4794 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4796 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4797 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4799 (c_finish_return): Added a check to reject _Cilk_spawn in return
4801 (build_cilk_spawn): New function.
4802 (build_cilk_sync): Likewise.
4803 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4805 2013-10-27 Tobias Burnus <burnus@net-b.de>
4808 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4809 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4810 (c_parser_statement_after_labels): Update calls.
4812 2013-10-24 Tobias Burnus <burnus@net-b.de>
4815 * c-parser.c (c_parser_pragma, c_parser_for_statement):
4816 Handle PRAGMA_IVDEP.
4817 (c_parser_statement_after_labels): Update call.
4819 2013-10-24 Marek Polacek <polacek@redhat.com>
4821 * c-parser.c (c_parser_struct_declaration): Add a comment.
4822 (c_parser_declarator): Don't allow _Alignas here.
4824 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
4826 * c-parser.c: Include omp-low.h.
4827 * c-typeck.c: Likewise.
4829 2013-10-17 Marek Polacek <polacek@redhat.com>
4832 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4833 Document syntax of the array-declarator.
4834 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4836 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4837 (c_parser_struct_declaration): Likewise.
4838 (c_parser_declarator): Likewise.
4839 (c_parser_direct_declarator_inner): Likewise.
4840 (c_parser_parameter_declaration): Likewise.
4841 (c_parser_type_name): Likewise.
4843 2013-10-11 Jakub Jelinek <jakub@redhat.com>
4845 * c-lang.h (current_omp_declare_target_attribute): New extern
4847 * c-parser.c: Include c-lang.h.
4848 (struct c_parser): Change tokens to c_token *.
4849 Add tokens_buf field. Change tokens_avail type to unsigned int.
4850 (c_parser_consume_token): If parser->tokens isn't
4851 &parser->tokens_buf[0], increment parser->tokens.
4852 (c_parser_consume_pragma): Likewise.
4853 (enum pragma_context): Add pragma_struct and pragma_param.
4854 (c_parser_external_declaration): Adjust
4855 c_parser_declaration_or_fndef caller.
4856 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4857 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4858 Adjust recursive call.
4859 (c_parser_struct_or_union_specifier): Use pragma_struct instead
4861 (c_parser_parameter_declaration): Use pragma_param instead of
4863 (c_parser_compound_statement_nostart, c_parser_label,
4864 c_parser_for_statement): Adjust
4865 c_parser_declaration_or_fndef callers.
4866 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
4867 it through to c_parser_conditional_expression.
4868 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
4869 pass it through to c_parser_binary_expression. Adjust recursive
4871 (c_parser_binary_expression): Remove prec argument, add
4872 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
4873 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
4874 binop matches it, use build2 instead of parser_build_binary_op.
4875 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
4876 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
4877 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
4878 Handle pragma_struct and pragma_param the same as pragma_external.
4879 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
4880 (c_parser_omp_variable_list): Parse array sections for
4881 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
4882 (c_parser_omp_clause_collapse): Fully fold collapse expression.
4883 (c_parser_omp_clause_reduction): Handle user defined reductions.
4884 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
4885 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
4886 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
4887 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
4888 c_parser_omp_clause_depend, c_parser_omp_clause_map,
4889 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
4890 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
4891 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
4892 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
4893 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
4894 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
4895 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
4896 (c_parser_omp_for_loop): Add CODE argument, pass it through
4897 to c_finish_omp_for. Change last argument to cclauses,
4898 and adjust uses to grab parallel clauses from the array of all
4899 the split clauses. Adjust c_parser_binary_expression,
4900 c_parser_declaration_or_fndef and c_finish_omp_for callers.
4901 (omp_split_clauses): New function.
4902 (c_parser_omp_simd): New function.
4903 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
4904 Allow the function to be called also when parsing combined constructs,
4905 and call c_parser_omp_simd when parsing for simd.
4906 (c_parser_omp_sections_scope): If section-sequence doesn't start with
4907 #pragma omp section, require exactly one structured-block instead of
4908 sequence of statements.
4909 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
4910 Allow the function to be called also when parsing combined constructs.
4911 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
4912 Allow the function to be called also when parsing combined
4914 (c_parser_omp_taskgroup, c_parser_omp_cancel,
4915 c_parser_omp_cancellation_point, c_parser_omp_distribute,
4916 c_parser_omp_teams, c_parser_omp_target_data,
4917 c_parser_omp_target_update, c_parser_omp_target,
4918 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
4919 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
4920 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
4921 (c_parser_omp_construct): Add p_name and mask vars. Handle
4922 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4923 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
4924 and c_parser_omp_sections callers.
4925 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4926 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4927 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
4928 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
4929 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
4931 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
4932 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
4933 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
4934 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
4935 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
4936 * c-typeck.c: Include tree-inline.h.
4937 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4938 handle_omp_array_sections_1, handle_omp_array_sections,
4939 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4940 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4941 user defined reductions.
4942 (c_tree_equal): New function.
4943 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4944 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4945 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4946 c_check_omp_declare_reduction_r): New prototypes.
4947 * c-decl.c (current_omp_declare_target_attribute): New variable.
4948 (c_decl_attributes): New function.
4949 (start_decl, start_function): Use it instead of decl_attributes.
4950 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4951 c_omp_reduction_decl, c_omp_reduction_lookup,
4952 c_check_omp_declare_reduction_r): New functions.
4954 2013-09-25 Tom Tromey <tromey@redhat.com>
4956 * Make-lang.in (c/gccspec.o): Remove.
4957 (CFLAGS-c/gccspec.o): New variable.
4958 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4959 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4960 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4962 2013-09-25 Tom Tromey <tromey@redhat.com>
4964 * Make-lang.in (c/gccspec.o): Don't use subshell.
4966 2013-09-18 Marek Polacek <polacek@redhat.com>
4969 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4970 Remove unnecessary check.
4972 2013-09-18 Marek Polacek <polacek@redhat.com>
4975 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4976 no_sanitize_undefined attribute.
4978 2013-09-13 Kai Tietz <ktietz@redhat.com>
4981 * c-decl.c (c_builtin_function_ext_scope): Remove
4982 wrong assumption that it is never called on prexisting
4985 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
4987 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4989 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4991 * c-objc-common.c (c_tree_printer): Tidy.
4993 2013-08-30 Marek Polacek <polacek@redhat.com>
4995 * c-typeck.c (build_binary_op): Add division by zero and shift
4998 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
4999 Joseph Myers <joseph@codesourcery.com>
5002 * c-typeck.c (c_common_type): Prefer double_type_node over
5003 other REAL_TYPE types with the same precision.
5004 (convert_arguments): Likewise.
5006 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
5008 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
5009 (c_initialize_diagnostics): Call a destructor for the early printer.
5011 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5013 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
5014 printer initialization.
5016 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
5019 * c-array-notation.c (fix_conditional_array_notations_1): Added a
5020 check for truth values.
5021 (expand_array_notation_exprs): Added truth values case. Removed an
5022 unwanted else. Added for-loop to walk through subtrees in default
5025 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5027 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
5029 2013-07-23 Joseph Myers <joseph@codesourcery.com>
5031 * c-parser.c (struct c_generic_association): Fix typo.
5033 2013-07-23 Tom Tromey <tromey@redhat.com>
5034 Joseph Myers <joseph@codesourcery.com>
5036 * c-parser.c (struct c_generic_association): New.
5037 (c_generic_association_d): New typedef.
5038 (c_parser_generic_selection): New function.
5039 (c_parser_postfix_expression): Handle RID_GENERIC.
5041 2013-07-13 Jason Merrill <jason@redhat.com>
5044 * c-decl.c (finish_struct): Check for too-large class.
5046 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
5049 * c-typeck.c (set_init_index): When folding, check for index overflow.
5051 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5053 * c-parser.c (c_parser_array_notation): Removed rejection of array
5054 notations in an array of function pointers.
5056 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5058 * c-array-notation.c (make_triplet_val_inv): New function.
5059 (create_cmp_incr): Likewise.
5060 (create_array_refs): Likewise.
5061 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
5062 Also modularized common parts between functions and called the function.
5063 (build_array_notation_expr): Likewise.
5064 (fix_conditional_array_notations_1): Likewise.
5065 (fix_array_notation_expr): Likewise.
5066 (fix_array_notation_call_expr): Likewise.
5068 2013-06-18 Marek Polacek <polacek@redhat.com>
5071 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
5073 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
5075 * c-array-notation.c (build_array_notation_expr): Reject array notation
5076 mismatch between LHS and RHS even inside a call_expr. Also, removed
5077 a couple while statements that were dead code.
5079 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
5081 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
5082 excessive precision expressions in function parameters. Also removed
5083 couple unwanted while statements.
5085 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5087 * c-array-notation.c (expand_array_notation_exprs): Added
5088 ARRAY_NOTATION_REF case.
5090 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5092 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
5093 function to c-family/array-notation-common.c.
5094 (is_cilkplus_reduce_builtin): Likewise.
5095 (find_rank): Likewise.
5096 (extract_array_notation_exprs): Likewise.
5097 (replace_array_notations): Likewise.
5098 (find_inv_trees): Likewise.
5099 (replace_inv_trees): Likewise.
5100 (contains_array_notation_expr): Likewise.
5101 (find_correct_array_notation_type): Likewise.
5102 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
5103 (struct inv_list): Moved this to c-family/array-notation-common.c.
5104 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
5106 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
5108 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
5109 reduction functions outside the for-loop. Added a check if the fundecl
5110 is non-NULL. Finally, removed an unwanted if-statement, and made the
5113 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5115 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
5116 condition of the if-statement matches the rank of else-block and then-
5117 block when array notations are used.
5118 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
5119 expression after the entire function body is parsed.
5120 (c_parser_expr_no_commas): Delayed creating array notation expressions
5121 to the end of function parsing.
5122 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
5123 whole if-statement instead of just the condition.
5124 (expand_array_notation_exprs): Added MODIFY_EXPR case.
5126 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
5129 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
5130 array to NULL_TREE if they are unused. Also added a check for the
5131 field to be NULL before its fields are used in future.
5133 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5136 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
5137 (build_array_notation_expr): Likewise.
5139 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5141 * c-typeck.c (build_array_ref): Added a check to see if array's
5142 index is greater than one. If true, then emit an error.
5143 (build_function_call_vec): Exclude error reporting and checking
5144 for builtin array-notation functions.
5145 (convert_arguments): Likewise.
5146 (c_finish_return): Added a check for array notations as a return
5147 expression. If true, then emit an error.
5148 (c_finish_loop): Added a check for array notations in a loop
5149 condition. If true then emit an error.
5150 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5151 (build_binary_op): Added a check for array notation expr inside
5152 op1 and op0. If present, we call another function to find correct
5154 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5155 * c-parser.c (c_parser_compound_statement): Check if array
5156 notation code is used in tree, if so, then transform them into
5158 (c_parser_expr_no_commas): Check if array notation is used in LHS
5159 or RHS, if so, then build array notation expression instead of
5161 (c_parser_postfix_expression_after_primary): Added a check for
5162 colon(s) after square braces, if so then handle it like an array
5163 notation. Also, break up array notations in unary op if found.
5164 (c_parser_direct_declarator_inner): Added a check for array
5166 (c_parser_compound_statement): Added a check for array notation in
5167 a stmt. If one is present, then expand array notation expr.
5168 (c_parser_if_statement): Likewise.
5169 (c_parser_switch_statement): Added a check for array notations in
5170 a switch statement's condition. If true, then output an error.
5171 (c_parser_while_statement): Similarly, but for a while.
5172 (c_parser_do_statement): Similarly, but for a do-while.
5173 (c_parser_for_statement): Similarly, but for a for-loop.
5174 (c_parser_unary_expression): Check if array notation is used in a
5175 pre-increment or pre-decrement expression. If true, then expand
5177 (c_parser_array_notation): New function.
5178 * c-array-notation.c: New file.
5179 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5181 2013-05-23 Mike Stump <mikestump@comcast.net>
5183 * c-typeck.c (convert_for_assignment): Handle references to memory
5186 2013-05-16 Jason Merrill <jason@redhat.com>
5188 * Make-lang.in (cc1$(exeext)): Use link mutex.
5190 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5192 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5193 to simply use OPT_Wpointer_arith.
5194 (build_unary_op): Likewise.
5196 2013-04-03 Jakub Jelinek <jakub@redhat.com>
5199 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5200 argument. If set, or it temporarily for parsing of the first
5201 argument into force_folding_builtin_constant_p.
5202 (c_parser_postfix_expression): Adjust callers.
5204 2013-03-21 Richard Biener <rguenther@suse.de>
5206 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5207 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5209 2013-02-12 Marek Polacek <polacek@redhat.com>
5212 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5215 2013-01-24 Jakub Jelinek <jakub@redhat.com>
5218 * c-typeck.c (set_nonincremental_init_from_string): If
5219 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5221 (process_init_element): Likewise.
5223 2012-12-20 Jakub Jelinek <jakub@redhat.com>
5226 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5227 argument, don't call default_function_array_conversion
5228 nor c_fully_fold here.
5229 (c_parser_asm_statement): Adjust callers.
5230 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5231 and outputs here, and call default_function_array_conversion
5232 on inputs that don't need to be addressable.
5234 2012-12-18 Jakub Jelinek <jakub@redhat.com>
5237 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5238 warning require that both c_common_unsigned_type as well as
5239 c_common_signed_type is the same for both mvl and mvr types.
5241 2012-11-16 Diego Novillo <dnovillo@google.com>
5243 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5245 * c-common.c: Use new vec API in vec.h.
5246 * c-common.h: Likewise.
5247 * c-gimplify.c: Likewise.
5248 * c-pragma.c: Likewise.
5249 * c-pretty-print.c: Likewise.
5250 * c-pretty-print.h: Likewise.
5251 * c-semantics.c: Likewise.
5252 * c-decl.c: Likewise.
5253 * c-parser.c: Likewise.
5254 * c-tree.h: Likewise.
5255 * c-typeck.c: Likewise.
5257 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5260 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5262 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5265 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5266 shadows a function, unless the variable is a function or a
5267 pointer-to-function.
5269 2012-10-12 Jakub Jelinek <jakub@redhat.com>
5272 * c-parser.c (struct c_tree_loc_pair): Removed.
5273 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5274 add location_t * and tree * arguments, fill in array of 3
5275 sizeof_arg trees and corresponding locs.
5276 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5277 c_parser_expr_list callers.
5278 (c_parser_postfix_expression_after_primary): Likewise. Pass
5279 array of 3 sizeof_arg trees and locs (corresponding to first
5280 3 arguments) to sizeof_pointer_memaccess_warning.
5282 2012-10-09 Lawrence Crowl <crowl@google.com>
5284 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5285 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5288 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5291 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5294 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
5297 * c-typeck.c: Include c-common.h.
5298 (enum stv_conv): Moved to c-common.h.
5299 (scalar_to_vector): Moved to c-common.c.
5300 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5301 * Make-lang.in: c-typeck.c depends on c-common.h.
5303 2012-10-04 Arnaud Charlet <charlet@adacore.com>
5305 * c-decl.c (c_write_global_declarations): Fix handling of
5308 2012-09-30 Sharad Singhai <singhai@google.com>
5310 * c-decl.c (c_write_global_declarations): Use a different method
5311 to determine if the dump has ben initialized.
5313 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5316 * c-typeck.c (c_cast_expr): When casting to a type requiring
5317 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5320 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5323 * c-typeck.c (build_unary_op): Pass original argument of
5324 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5325 any C_MAYBE_CONST_EXPR, if it has integer operands.
5326 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5327 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5328 to c_objc_common_truthvalue_conversion, then remove any
5329 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5330 c_objc_common_truthvalue_conversion not
5331 c_common_truthvalue_conversion.
5332 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5333 call note_integer_operands for arguments with integer operands
5334 that are not integer constants.
5336 2012-09-13 Jakub Jelinek <jakub@redhat.com>
5339 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5340 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5342 2012-08-31 Jakub Jelinek <jakub@redhat.com>
5345 * c-convert.c (convert): Don't call fold_convert_loc if
5346 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5347 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5348 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5350 2012-08-24 Jakub Jelinek <jakub@redhat.com>
5353 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5354 for nested and empty_ok arguments in the call to
5355 c_parser_declaration_or_fndef.
5357 2012-08-17 Jakub Jelinek <jakub@redhat.com>
5359 * c-tree.h (c_last_sizeof_arg): Declare.
5360 * c-parser.c (struct c_tree_loc_pair): New type.
5361 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5363 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5364 (c_parser_postfix_expression_after_primary): Likewise. Call
5365 sizeof_pointer_memaccess_warning if needed.
5366 (sizeof_ptr_memacc_comptypes): New function.
5367 * c-typeck.c (c_last_sizeof_arg): New global variable.
5368 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5370 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
5372 * c-lang.h (lang_decl): Add variable_size GTY option.
5374 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5376 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5377 * Make-lang.in: Fix dependencies.
5379 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5381 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5382 and add language Makefile hooks.
5383 * config-lang.in: New file.
5384 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5385 add the required "normal" config-lang.in rules.
5386 * c-lang.h: Moved from gcc/ to here.
5387 * c-tree.h: Likewise.
5388 * c-objc-common.c: Likewise.
5389 * c-objc-common.h: Likewise.
5390 * c-typeck.c: Likewise.
5391 * c-convert.c: Likewise.
5392 * c-lang.c: Likewise.
5393 * c-aux-info.c: Likewise.
5394 * c-errors.c: Likewise.
5395 * gccspec.c: Likewise.
5396 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5397 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5399 Copyright (C) 2012-2018 Free Software Foundation, Inc.
5401 Copying and distribution of this file, with or without modification,
5402 are permitted in any medium without royalty provided the copyright
5403 notice and this notice are preserved.