1 2023-10-17 Martin Uecker <uecker@tugraz.at>
4 * c-decl.cc (grokdeclarator): Add error.
6 2023-10-03 David Malcolm <dmalcolm@redhat.com>
8 * c-objc-common.cc (c_tree_printer): Update for "m_" prefixes to
11 2023-09-30 Eugene Rozenfeld <erozen@microsoft.com>
13 * Make-lang.in: Make create_fdas_for_cc1 target not .PHONY
15 2023-09-20 Jakub Jelinek <jakub@redhat.com>
17 * c-parser.cc (c_parser_postfix_expression_after_primary): Parse
18 __builtin_classify_type call with typename as argument.
20 2023-09-19 Richard Biener <rguenther@suse.de>
23 * gimple-parser.cc (c_parser_gimple_binary_expression): Handle __LTGT.
25 2023-09-19 Richard Biener <rguenther@suse.de>
28 * gimple-parser.cc (c_parser_gimple_binary_expression): Add
30 (c_parser_gimple_statement): Adjust.
31 (c_parser_gimple_paren_condition): Likewise.
32 (c_parser_gimple_binary_expression): Use passed in return type,
33 add support for - as POINTER_DIFF_EXPR, __UN{LT,LE,GT,GE,EQ},
34 __UNORDERED and __ORDERED.
36 2023-09-12 Tobias Burnus <tobias@codesourcery.com>
38 * c-parser.cc (struct c_omp_loc_tree): New.
39 (c_check_omp_allocate_allocator_r): New; checking moved from ...
40 (c_parser_omp_allocate): ... here. Call it via walk_tree. Avoid
41 ICE with tree_to_shwi for invalid too-large value.
43 2023-09-12 Tobias Burnus <tobias@codesourcery.com>
45 * c-parser.cc (c_parser_omp_construct): Move call to
46 c_parser_omp_allocate to ...
47 (c_parser_pragma): ... here.
48 (c_parser_omp_allocate): Avoid ICE is allocator could not be
49 parsed; set 'omp allocate' attribute for stack/automatic variables
50 and only reject static variables; add several additional
52 * c-tree.h (c_mark_decl_jump_unsafe_in_current_scope): New prototype.
53 * c-decl.cc (decl_jump_unsafe): Return true for omp-allocated decls.
54 (c_mark_decl_jump_unsafe_in_current_scope): New.
55 (warn_about_goto, c_check_switch_jump_warnings): Add error for
58 2023-09-12 Martin Uecker <uecker@tugraz.at>
60 * c-typeck.cc (struct comptypes_data): Add structure.
61 (tagged_types_tu_compatible_p,
62 function_types_compatible_p, type_lists_compatible_p,
63 comptypes_internal): Add structure to interface, change
64 return type to bool, and adapt calls.
65 (comptarget_types): Change return type too bool.
66 (comptypes, comptypes_check_enum_int,
67 comptypes_check_different_types): Adapt calls.
69 2023-09-06 Jakub Jelinek <jakub@redhat.com>
72 * c-decl.cc (finish_declspecs): Emit pedwarn_c11 on _BitInt.
73 * c-typeck.cc (c_common_type): Emit sorry for common type between
74 _Complex integer and larger _BitInt and return the _Complex integer.
76 2023-09-06 Jakub Jelinek <jakub@redhat.com>
79 * c-convert.cc (c_convert): Handle BITINT_TYPE like INTEGER_TYPE.
80 * c-decl.cc (check_bitfield_type_and_width): Allow BITINT_TYPE
82 (finish_struct): Prefer to use BITINT_TYPE for BITINT_TYPE bit-fields
84 (declspecs_add_type): Formatting fixes. Handle cts_bitint. Adjust
85 for added union in *specs. Handle RID_BITINT.
86 (finish_declspecs): Handle cts_bitint. Adjust for added union
88 * c-parser.cc (c_keyword_starts_typename, c_token_starts_declspecs,
89 c_parser_declspecs, c_parser_gnu_attribute_any_word): Handle
91 (c_parser_omp_clause_schedule): Handle BITINT_TYPE like INTEGER_TYPE.
92 * c-tree.h (enum c_typespec_keyword): Mention _BitInt in comment.
93 Add cts_bitint enumerator.
94 (struct c_declspecs): Move int_n_idx and floatn_nx_idx into a union
95 and add bitint_prec there as well.
96 * c-typeck.cc (c_common_type, comptypes_internal):
98 (perform_integral_promotions): Promote BITINT_TYPE bit-fields to
100 (build_array_ref, build_unary_op, build_conditional_expr,
101 build_c_cast, convert_for_assignment, digest_init, build_binary_op):
103 * c-fold.cc (c_fully_fold_internal): Handle BITINT_TYPE like
105 * c-aux-info.cc (gen_type): Handle BITINT_TYPE.
107 2023-09-06 Jakub Jelinek <jakub@redhat.com>
109 * c-decl.cc (declspecs_add_type): Use pedwarn_c11 rather than pedwarn
110 for _FloatN{,x} diagnostics and append " before C2X" to the diagnostic
113 2023-09-05 Tobias Burnus <tobias@codesourcery.com>
115 * c-parser.cc (c_parser_omp_clause_allocate): Handle
118 2023-08-25 Sandra Loosemore <sandra@codesourcery.com>
120 * c-parser.cc (struct c_parser): Add omp_for_parse_state field.
121 (struct omp_for_parse_data): New.
122 (check_omp_intervening_code): New.
123 (add_structured_block_stmt): New.
124 (c_parser_compound_statement_nostart): Recognize intervening code,
125 nested loops, and other things that need special handling in
126 OpenMP loop constructs.
127 (c_parser_while_statement): Error on loop in intervening code.
128 (c_parser_do_statement): Likewise.
129 (c_parser_for_statement): Likewise.
130 (c_parser_postfix_expression_after_primary): Error on calls to
131 the OpenMP runtime in intervening code.
132 (c_parser_pragma): Error on OpenMP pragmas in intervening code.
133 (c_parser_omp_loop_nest): New.
134 (c_parser_omp_for_loop): Rewrite to use recursive descent, calling
135 c_parser_omp_loop_nest to do the heavy lifting.
137 2023-08-24 Richard Sandiford <richard.sandiford@arm.com>
139 * c-parser.cc (c_parser_std_attribute): Conditionally allow
140 two colons to be used in place of ::.
141 (c_parser_std_attribute_list): New function, split out from...
142 (c_parser_std_attribute_specifier): ...here. Allow the attribute-list
143 to start with __extension__. When it does, also allow two colons
144 to be used in place of ::.
146 2023-08-22 Tobias Burnus <tobias@codesourcery.com>
148 * c-parser.cc (c_parser_omp_clause_defaultmap): Parse
151 2023-08-17 Jose E. Marchesi <jose.marchesi@oracle.com>
154 * c-typeck.cc (build_binary_op): Warning on comparing distinct
155 pointer types only when -Wcompare-distinct-pointer-types.
157 2023-08-15 Chung-Lin Tang <cltang@codesourcery.com>
158 Thomas Schwinge <thomas@codesourcery.com>
160 * c-parser.cc (OACC_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
162 2023-08-11 Jakub Jelinek <jakub@redhat.com>
164 * c-parser.cc (c_parser_typeof_specifier): Handle
165 __typeof_unqual and __typeof_unqual__ as !is_std.
167 2023-08-11 Martin Uecker <uecker@tugraz.at>
170 * c-typeck.cc (build_c_cast): Add warning.
172 2023-08-05 Martin Uecker <uecker@tugraz.at>
174 * c-parser.cc (c_parser_generic_selection): Inhibit evaluation
175 warnings branches that are known not be taken during parsing.
177 2023-08-04 Tamar Christina <tamar.christina@arm.com>
179 * c-parser.cc (c_parser_while_statement, c_parser_do_statement,
180 c_parser_for_statement, c_parser_statement_after_labels,
181 c_parse_pragma_novector, c_parser_pragma): Wire through novector and
184 2023-08-02 Eric Feng <ef2648@columbia.edu>
187 * c-parser.cc: New functions on stashing values for the
190 2023-08-01 Lewis Hyatt <lhyatt@gmail.com>
192 * c-parser.cc (pragma_lex_discard_to_eol): New function.
193 (c_init_preprocess): New function.
195 2023-07-31 Hamza Mahfooz <someguy@effective-light.com>
198 * c-decl.cc (start_decl): Handle
199 -Wmissing-variable-declarations.
201 2023-07-31 Chung-Lin Tang <cltang@codesourcery.com>
203 * c-parser.cc (c_parser_oacc_host_data): Add checking requiring OpenACC
204 host_data construct to have an use_device clause.
206 2023-06-29 Qing Zhao <qing.zhao@oracle.com>
209 * c-decl.cc (finish_struct): Issue warnings for new option.
211 2023-06-29 Qing Zhao <qing.zhao@oracle.com>
213 * c-decl.cc (finish_struct): Set TYPE_INCLUDES_FLEXARRAY for
216 2023-06-29 Richard Biener <rguenther@suse.de>
219 * c-typeck.cc (convert_argument): Sink formal_prec compute
220 to where TYPE_PRECISION is valid to use.
222 2023-06-29 Eugene Rozenfeld <erozen@microsoft.com>
224 * Make-lang.in: Pass correct stage cc1 when processing
225 profile data collected while building target libraries
227 2023-06-16 David Malcolm <dmalcolm@redhat.com>
230 * c-parser.cc (c_parser_declspecs): Add hints to "unknown type
233 2023-06-12 Tobias Burnus <tobias@codesourcery.com>
235 * c-parser.cc (c_parser_omp_clause_map): Reword error message for
236 clearness especially with 'omp target (enter/exit) data.'
238 2023-06-06 Kwok Cheung Yeung <kcy@codesourcery.com>
239 Tobias Burnus <tobias@codesourcery.com>
241 * c-parser.cc (c_parser_omp_clause_defaultmap,
242 c_parser_omp_clause_map): Parse 'present'.
243 (c_parser_omp_clause_to, c_parser_omp_clause_from): Remove.
244 (c_parser_omp_clause_from_to): New; parse to/from clauses with
245 optional present modifer.
246 (c_parser_omp_all_clauses): Update call.
247 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
248 c_parser_omp_target_exit_data): Handle new map enum values
249 for 'present' mapping.
251 2023-05-30 Tobias Burnus <tobias@codesourcery.com>
254 * c-parser.cc (c_parser_oacc_all_clauses,
255 c_parser_omp_all_clauses): Improve error wording.
257 2023-05-23 Martin Uecker <uecker@tugraz.at>
260 * c-decl.cc (add_decl_expr): New function.
261 (grokdeclarator): Add decl expr for size expression in
262 types pointed to by parameters declared as arrays.
264 2023-05-23 Martin Uecker <uecker@tugraz.at>
270 * c-decl.cc (start_decl): Make sure size expression are
271 evaluated only in correct context.
272 (grokdeclarator): Size expression in fields may need a bind
273 expression, make sure DECL_EXPR is always created.
274 (grokfield, declspecs_add_type): Pass along size expressions.
275 (finish_struct): Remove unneeded DECL_EXPR.
276 (start_function): Evaluate size expressions for nested functions.
277 * c-parser.cc (c_parser_struct_declarations,
278 c_parser_struct_or_union_specifier): Pass along size expressions.
279 (c_parser_declaration_or_fndef): Evaluate size expression.
280 (c_parser_objc_at_property_declaration,
281 c_parser_objc_class_instance_variables): Adapt.
282 * c-tree.h (grokfield): Adapt declaration.
284 2023-05-19 Martin Uecker <uecker@tugraz.at>
286 * c-decl.cc (set_type_context): Remove.
287 (pop_scope, diagnose_mismatched_decls, pushdecl):
289 * c-typeck.cc (comptypes_internal): Remove dead code.
290 (same_translation_unit_p): Remove.
291 (tagged_types_tu_compatible_p): Some fixes.
293 2023-05-19 Joseph Myers <joseph@codesourcery.com>
295 * c-decl.cc (diagnose_mismatched_decls): Do not handle
296 thread-local declarations as tentative definitions for C2x.
297 (finish_decl): Do not allow thread-local definition with
298 incomplete type for C2x.
300 2023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
302 * c-convert.cc (c_convert): Ditto.
303 * c-decl.cc (merge_decls): Ditto.
304 * c-parser.cc (c_parser_omp_clause_reduction): Ditto.
305 (c_parser_omp_declare_reduction): Ditto.
306 * c-typeck.cc (build_component_ref): Ditto.
307 (convert_argument): Ditto.
308 (pointer_diff): Ditto.
309 (build_unary_op): Ditto.
310 (build_c_cast): Ditto.
311 (build_modify_expr): Ditto.
312 (store_init_value): Ditto.
313 (constexpr_init_fits_real_type): Ditto.
314 (check_constexpr_init): Ditto.
315 (c_finish_return): Ditto.
316 (handle_omp_array_sections_1): Ditto.
317 (c_finish_omp_clauses): Ditto.
318 * gimple-parser.cc (c_finish_gimple_return): Ditto.
320 2023-05-16 Joseph Myers <joseph@codesourcery.com>
322 * c-decl.cc (check_for_loop_decls): Use pedwarn_c11 for
325 2023-05-15 Joseph Myers <joseph@codesourcery.com>
327 * c-decl.cc (grokdeclarator): Ignore _Atomic on function return
330 2023-04-30 Andrew Pinski <apinski@marvell.com>
332 * c-typeck.cc (process_init_element): Print out array type
333 for excessive elements.
335 2023-04-30 Andrew Pinski <apinski@marvell.com>
338 * c-typeck.cc (process_init_element): Move the check
339 for string cst until after the error message.
341 2023-04-28 Eugene Rozenfeld <erozen@microsoft.com>
343 * Make-lang.in: Merge perf data collected when compiling cc1 and runtime libraries
345 2023-04-27 Jakub Jelinek <jakub@redhat.com>
348 * c-parser.cc (c_parser_initializer): Move diagnostics about
349 initialization of variable sized object with non-empty initializer
350 after c_parser_expr_no_commas call and ret.set_error (); after it.
352 2023-04-27 Jakub Jelinek <jakub@redhat.com>
356 * c-typeck.cc (pop_init_level): If constructor_type is FUNCTION_TYPE,
357 reject empty initializer as invalid.
359 2023-04-26 Richard Biener <rguenther@suse.de>
361 * gimple-parser.cc (c_parser_parse_gimple_body): Avoid
364 2023-04-25 Tobias Burnus <tobias@codesourcery.com>
366 * c-parser.cc (c_parser_omp_scan_loop_body): Handle
367 zero exec statements before/after 'omp scan'.
369 2023-04-20 Jakub Jelinek <jakub@redhat.com>
372 * c-decl.cc (diagnose_mismatched_decls): Avoid -Wenum-int-mismatch
373 warning on acc_on_device declaration.
375 2023-03-28 David Malcolm <dmalcolm@redhat.com>
378 * c-typeck.cc (parser_build_binary_op): Update for new param of
379 check_for_xor_used_as_pow.
381 2023-03-10 Jakub Jelinek <jakub@redhat.com>
384 * c-decl.cc (pop_scope): Suppress OPT_Wunused_variable warning
387 2023-02-28 Jakub Jelinek <jakub@redhat.com>
390 * c-decl.cc (strict_flex_array_level_of): Move to c-common.cc
391 and rename to c_strict_flex_array_level_of.
392 (is_flexible_array_member_p): Adjust caller.
394 2023-02-18 Martin Uecker <uecker@tugraz.at>
397 * c-decl.cc (decl_jump_unsafe): Use c_type_variably_modified_p.
398 (diagnose_mismatched_decl): Dito.
399 (warn_about_goto): Dito:
400 (c_check_switch_jump_warnings): Dito.
402 (finish_struct): Dito.
403 (grokdeclarator): Set C_TYPE_VARIABLY_MODIFIED.
404 (finish_struct): Set C_TYPE_VARIABLY_MODIFIED.
405 * c-objc-common.cc (c_var_mod_p): New function.
406 (c_var_unspec_p): Remove.
407 * c-objc-common.h: Set lang hook.
408 * c-parser.cc (c_parser_declararion_or_fndef): Use c_type_variably_modified_p.
409 (c_parser_typeof_specifier): Dito.
410 (c_parser_has_attribute_expression): Dito.
411 (c_parser_generic_selection): Dito.
412 * c-tree.h: Define C_TYPE_VARIABLY_MODIFIED and define c_var_mode_p.
413 * c-typeck.cc: Remove c_vla_mod_p and use C_TYPE_VARIABLY_MODIFIED.
415 2023-02-16 Patrick Palka <ppalka@redhat.com>
417 * c-parser.h: Mechanically drop static from static inline
418 functions via s/^static inline/inline/g.
420 2023-02-10 Joseph Myers <joseph@codesourcery.com>
422 * c-convert.cc (c_convert): Allow conversion of a null pointer
423 constant to nullptr_t.
424 * c-typeck.cc (null_pointer_constant_p): Remove static.
425 (convert_for_assignment): Allow conversion of a null pointer
426 constant to nullptr_t.
427 (digest_init): Handle NULLPTR_TYPE among scalar conversions.
428 * c-tree.h (null_pointer_constant_p): Declare.
430 2023-02-09 Tobias Burnus <tobias@codesourcery.com>
432 * c-parser.cc (c_parser_omp_allocate): Parse align
433 clause and check for restrictions.
435 2023-02-08 Joseph Myers <joseph@codesourcery.com>
437 * c-typeck.cc (check_constexpr_init): Remove argument
438 null_pointer_constant. Only check pointer initializers for being
440 (digest_init): Update calls to check_constexpr_init.
442 2023-02-02 Joseph Myers <joseph@codesourcery.com>
444 * c-typeck.cc (build_binary_op): Allow comparisons between
445 pointers and nullptr_t values that are not null pointer constants.
447 2023-02-02 Joseph Myers <joseph@codesourcery.com>
449 * c-typeck.cc: Include "realmpfr.h".
450 (constexpr_init_fits_real_type): Do not allow signaling NaN
451 conversions to different types with the same mode. Handle
452 conversions from binary to decimal types.
453 (check_constexpr_init): Do not disallow real initializers for
454 complex types. Do not disallow binary initializers for decimal
457 2023-01-31 Marek Polacek <polacek@redhat.com>
461 * c-objc-common.cc (instantiation_dependent_expression_p): New.
463 2023-01-27 Joseph Myers <joseph@codesourcery.com>
465 * c-parser.cc (c_parser_declaration_or_fndef): Do not allow braces
466 around auto initializer.
468 2023-01-16 Jakub Jelinek <jakub@redhat.com>
471 * c-parser.cc (c_parser_initializer): Check warning_enabled_at
472 at the DECL_SOURCE_LOCATION (decl) for OPT_Winit_self instead
475 2023-01-14 Jakub Jelinek <jakub@redhat.com>
478 * c-typeck.cc (build_binary_op): Use may_shorten_divmod for integral
481 2023-01-13 Qing Zhao <qing.zhao@oracle.com>
483 * c-decl.cc (strict_flex_array_level_of): ... here.
485 2023-01-11 Jakub Jelinek <jakub@redhat.com>
488 * c-parser.cc (c_parser_declaration_or_fndef): Disable debug non-bind
489 markers for K&R function parameter declarations of nested functions.
491 2023-01-09 Joseph Myers <joseph@codesourcery.com>
493 * c-decl.cc (build_compound_literal): Call record_inline_static.
495 2023-01-06 Joseph Myers <joseph@codesourcery.com>
497 * c-parser.cc (c_parser_postfix_expression): Handle integer
498 generic arguments to functions passed to __builtin_tgmath as
499 _Float32x if any argument has _FloatNx or _Complex _FloatNx type.
500 Do not handle integer arguments to some narrowing functions as
503 2022-12-19 Jakub Jelinek <jakub@redhat.com>
506 * c-parser.cc (c_parser_postfix_expression_after_paren_type): Diagnose
507 compound literals with function type.
509 2022-12-07 Joseph Myers <joseph@codesourcery.com>
511 * c-decl.cc (declspecs_add_type, declspecs_add_scspec): Check for
512 auto, constexpr and a type used together.
514 2022-12-06 Qing Zhao <qing.zhao@oracle.com>
516 * c-decl.cc (is_flexible_array_member_p): Call new function
517 strict_flex_array_level_of.
519 2022-11-24 Florian Weimer <fweimer@redhat.com>
522 * c-decl.cc (declspecs_add_type): Propagate error_mark_bode
525 2022-11-17 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
527 * c-decl.cc (start_function): Set the result decl source
528 location to the location of the typespec.
530 2022-11-17 David Malcolm <dmalcolm@redhat.com>
533 * c-parser.cc (ana::c_translation_unit::consider_macro): Pass NULL
534 to cpp_create_reader, rather than ident_hash, so that the new
535 reader gets its own hash table.
537 2022-11-15 David Malcolm <dmalcolm@redhat.com>
540 * c-parser.cc: Include "analyzer/analyzer-language.h" and "toplev.h".
541 (class ana::c_translation_unit): New.
542 (c_parser_translation_unit): Call ana::on_finish_translation_unit.
544 2022-11-12 Joseph Myers <joseph@codesourcery.com>
546 * c-decl.cc (start_underspecified_init)
547 (finish_underspecified_init): Handle name == NULL_TREE for
549 (merge_decls): Merge C_DECL_DECLARED_CONSTEXPR.
550 (shadow_tag_warned): Check for constexpr.
551 (start_decl): Add parameter do_push.
552 (build_compound_literal): Set C_DECL_DECLARED_CONSTEXPR.
553 (grokdeclarator): Handle constexpr.
554 (finish_struct): Set C_TYPE_FIELDS_NON_CONSTEXPR.
555 (declspecs_add_scspec): Handle constexpr.
556 * c-parser.cc (c_token_starts_compound_literal)
557 (c_token_starts_declspecs, c_parser_declaration_or_fndef)
558 (c_parser_declspecs, c_parser_gnu_attribute_any_word)
559 (c_parser_compound_literal_scspecs)
560 (c_parser_postfix_expression_after_paren_type): Handle constexpr.
561 Update calls to start_init.
562 (c_parser_declaration_or_fndef, c_parser_initializer)
563 (c_parser_initval): Pass true for new argument of
564 convert_lvalue_to_rvalue. Call convert_lvalue_to_rvalue for
565 constexpr compound literals.
566 (c_parser_static_assert_declaration_no_semi)
567 (c_parser_enum_specifier, c_parser_struct_declaration)
568 (c_parser_alignas_specifier, c_parser_initelt, c_parser_label):
569 Call convert_lvalue_to_rvalue on expressions required to be
570 integer constant expressions.
571 (c_parser_omp_declare_reduction): Update call to start_init.
572 * c-tree.h (C_TYPE_FIELDS_NON_CONSTEXPR)
573 (C_DECL_DECLARED_CONSTEXPR): New macros.
574 (struct c_declspecs): Add constexpr_p.
575 (start_decl, convert_lvalue_to_rvalue, start_init): Update
577 * c-typeck.cc (require_constant_value, require_constant_elements):
579 (require_constexpr_value, maybe_get_constexpr_init)
580 (constexpr_init_fits_real_type, check_constexpr_init): New.
581 (convert_lvalue_to_rvalue): Add new parameter for_init. Call
582 maybe_get_constexpr_init.
583 (store_init_value): Update call to digest_init.
584 (digest_init): Add parameters int_const_expr, arith_const_expr and
585 require_constexpr. Check constexpr initializers.
586 (constructor_top_level): Remove.
587 (struct initializer_stack): Remove top_level. Add
588 require_constexpr_value.
589 (start_init): Remove parameter top_level. Add parameters
590 init_require_constant and init_require_constexpr. Save
591 require_constexpr_value on stack.
592 (pop_init_level): Use a null pointer constant for zero initializer
593 of pointer initialized with {}.
594 (output_init_element): Update call to digest_init. Avoid passing
595 null pointer constants of pointer type through digest_init a
596 second time when initializing a constexpr object.
598 2022-11-03 Joseph Myers <joseph@codesourcery.com>
600 * c-decl.cc (in_underspecified_init, start_underspecified_init)
601 (finish_underspecified_init): New.
602 (shadow_tag_warned, parser_xref_tag, start_struct, start_enum):
603 Give errors inside initializers of underspecified declarations.
604 (grokdeclarator): Handle (erroneous) case of C2X auto on a
606 (declspecs_add_type): Handle c2x_auto_p case.
607 (declspecs_add_scspec): Handle auto possibly setting c2x_auto_p in
609 (finish_declspecs): Handle c2x_auto_p.
610 * c-parser.cc (c_parser_declaration_or_fndef): Handle C2X auto.
611 * c-tree.h (C_DECL_UNDERSPECIFIED): New macro.
612 (struct c_declspecs): Add c2x_auto_p.
613 (start_underspecified_init, finish_underspecified_init): New
615 * c-typeck.cc (build_external_ref): Give error for underspecified
616 declaration referenced in its initializer.
618 2022-10-28 Joseph Myers <joseph@codesourcery.com>
620 * c-decl.cc (grokdeclarator): Pass
621 arg_info->no_named_args_stdarg_p to build_function_type.
622 (grokparms): Check arg_info->no_named_args_stdarg_p before
623 converting () to (void).
624 (build_arg_info): Initialize no_named_args_stdarg_p.
625 (get_parm_info): Set no_named_args_stdarg_p.
626 (start_function): Pass TYPE_NO_NAMED_ARGS_STDARG_P to
628 (store_parm_decls): Count (...) functions as prototyped.
629 * c-parser.cc (c_parser_direct_declarator): Allow '...' after open
630 parenthesis to start parameter list.
631 (c_parser_parms_list_declarator): Always allow '...' with no
632 arguments, call pedwarn_c11 and set no_named_args_stdarg_p.
633 * c-tree.h (struct c_arg_info): Add field no_named_args_stdarg_p.
634 * c-typeck.cc (composite_type): Handle
635 TYPE_NO_NAMED_ARGS_STDARG_P.
636 (function_types_compatible_p): Compare
637 TYPE_NO_NAMED_ARGS_STDARG_P.
639 2022-10-28 Jakub Jelinek <jakub@redhat.com>
641 * c-parser.cc (c_parser_omp_all_clauses): Allow optional
642 comma before the first clause.
643 (c_parser_omp_allocate, c_parser_omp_atomic, c_parser_omp_depobj,
644 c_parser_omp_flush, c_parser_omp_scan_loop_body,
645 c_parser_omp_ordered, c_finish_omp_declare_variant,
646 c_parser_omp_declare_target, c_parser_omp_declare_reduction,
647 c_parser_omp_requires, c_parser_omp_error,
648 c_parser_omp_assumption_clauses): Likewise.
650 2022-10-28 Joseph Myers <joseph@codesourcery.com>
653 * c-convert.cc (c_convert): Handle enums with underlying boolean
655 * c-decl.cc (shadow_tag_warned): Allow shadowing declarations for
656 enums with enum type specifier, but give errors for storage class
657 specifiers, qualifiers or alignment specifiers in non-definition
658 declarations of such enums.
659 (grokdeclarator): Give error for non-definition use of type
660 specifier with an enum type specifier.
661 (parser_xref_tag): Add argument has_enum_type_specifier. Pass it
662 to lookup_tag and use it to set ENUM_FIXED_UNDERLYING_TYPE_P.
663 (xref_tag): Update call to parser_xref_tag.
664 (start_enum): Add argument fixed_underlying_type. Complete enum
665 type with a fixed underlying type given in the definition. Give
666 error for defining without a fixed underlying type in the
667 definition if one was given in a prior declaration. Do not mark
668 enums with fixed underlying type as packed for -fshort-enums.
669 Store the enum type in the_enum.
670 (finish_enum): Do not adjust types of values or check their range
671 for an enum with a fixed underlying type. Set underlying type of
673 (build_enumerator): Check enumeration constants for enum with
674 fixed underlying type against that type and convert to that type.
675 Increment in the underlying integer type, with handling for bool.
676 (c_simulate_enum_decl): Update call to start_enum.
677 (declspecs_add_type): Set specs->enum_type_specifier_ref_p.
678 * c-objc-common.cc (c_get_alias_set): Use ENUM_UNDERLYING_TYPE
679 rather than recomputing an underlying type based on size.
680 * c-parser.cc (c_parser_declspecs)
681 (c_parser_struct_or_union_specifier, c_parser_typeof_specifier):
682 Set has_enum_type_specifier for type specifiers.
683 (c_parser_enum_specifier): Handle enum type specifiers.
684 (c_parser_struct_or_union_specifier): Update call to
686 (c_parser_omp_atomic): Check for boolean increment or decrement
687 using C_BOOLEAN_TYPE_P.
688 * c-tree.h (C_BOOLEAN_TYPE_P): New.
689 (struct c_typespec): Add has_enum_type_specifier.
690 (struct c_declspecs): Add enum_type_specifier_ref_p.
691 (struct c_enum_contents): Add enum_type.
692 (start_enum, parser_xref_tag): Update prototypes.
693 * c-typeck.cc (composite_type): Allow for enumerated types
694 compatible with bool.
695 (common_type, comptypes_internal, perform_integral_promotions):
696 Use ENUM_UNDERLYING_TYPE.
697 (parser_build_binary_op, build_unary_op, convert_for_assignment)
698 (c_finish_return, c_start_switch, build_binary_op): Check for
699 boolean types using C_BOOLEAN_TYPE_P.
701 2022-10-24 Jakub Jelinek <jakub@redhat.com>
704 * c-typeck.cc (build_binary_op): Pass operands before excess precision
705 promotions to scalar_to_vector call.
707 2022-10-24 Arsen Arsenović <arsen@aarsen.me>
709 * c-decl.cc (finish_function): Ignore hosted when deciding
710 whether to implicitly return zero, but check noreturn.
711 * c-objc-common.cc (c_missing_noreturn_ok_p): Loosen the
712 requirements to just MAIN_NAME_P when hosted, or `int main'
715 2022-10-20 Richard Biener <rguenther@suse.de>
719 * gimple-parser.cc (c_parser_parse_gimple_body): Verify
720 the parsed IL and zap the body on error.
722 2022-10-18 Joseph Myers <joseph@codesourcery.com>
725 * c-decl.cc (shadow_tag_warned): If pedantic, diagnose "enum tag;"
726 with previous declaration visible.
728 2022-10-18 Joseph Myers <joseph@codesourcery.com>
731 * c-decl.cc (finish_enum): If any enumerators do not fit in int,
732 convert all to the type of the enumeration. pedwarn if no integer
733 type fits all enumerators and default to
734 widest_integer_literal_type_node in that case. Otherwise pedwarn
735 for type wider than intmax_t.
736 (build_enumerator): pedwarn for enumerators outside the range of
737 uintmax_t or intmax_t, and otherwise use pedwarn_c11 for
738 enumerators outside the range of int. On overflow, attempt to
739 find a wider type that can hold the value of the next enumerator.
740 Do not convert value to type determined with
741 c_common_type_for_size.
743 2022-10-14 Jakub Jelinek <jakub@redhat.com>
745 * c-typeck.cc (convert_arguments): Don't promote __bf16 to
748 2022-10-14 Joseph Myers <joseph@codesourcery.com>
750 * c-decl.cc (build_compound_literal): Add parameter scspecs.
751 Handle storage class specifiers.
752 * c-parser.cc (c_token_starts_compound_literal)
753 (c_parser_compound_literal_scspecs): New.
754 (c_parser_postfix_expression_after_paren_type): Add parameter
755 scspecs. Call pedwarn_c11 for use of storage class specifiers.
756 Update call to build_compound_literal.
757 (c_parser_cast_expression, c_parser_sizeof_expression)
758 (c_parser_alignof_expression): Handle storage class specifiers for
759 compound literals. Update calls to
760 c_parser_postfix_expression_after_paren_type.
761 (c_parser_postfix_expression): Update syntax comment.
762 * c-tree.h (build_compound_literal): Update prototype.
763 * c-typeck.cc (c_mark_addressable): Diagnose taking address of
764 register compound literal.
766 2022-10-07 Qing Zhao <qing.zhao@oracle.com>
768 * c-decl.cc (flexible_array_member_type_p): New function.
769 (one_element_array_type_p): Likewise.
770 (zero_length_array_type_p): Likewise.
771 (add_flexible_array_elts_to_size): Call new utility
772 routine flexible_array_member_type_p.
773 (is_flexible_array_member_p): New function.
774 (finish_struct): Set the new DECL_NOT_FLEXARRAY flag.
776 2022-10-06 Joseph Myers <joseph@codesourcery.com>
778 * c-parser.cc (c_parse_init): Add D_EXT11 to mask if flag_no_asm
780 (c_keyword_starts_typename, c_token_starts_declspecs)
781 (c_parser_declspecs, c_parser_objc_selector): Handle
783 (c_parser_typeof_specifier): Handle RID_TYPEOF_UNQUAL.
784 Distinguish typeof for C2x from __typeof__ for all standard
785 versions and typeof before C2x.
786 * c-typeck.cc (build_function_call_vec): Use unqualified version
787 of non-void return type.
788 (build_unary_op): Use unqualified type for increment and
791 2022-10-06 Jakub Jelinek <jakub@redhat.com>
793 * c-parser.cc (c_parser_omp_assumption_clauses): Emit IFN_ASSUME
794 call for holds clause on assume construct.
796 2022-10-06 Jakub Jelinek <jakub@redhat.com>
799 * c-parser.cc (handle_assume_attribute): New function.
800 (c_parser_declaration_or_fndef): Handle assume attribute.
801 (c_parser_attribute_arguments): Add assume_attr argument,
802 if true, parse first argument as conditional expression.
803 (c_parser_gnu_attribute, c_parser_std_attribute): Adjust
804 c_parser_attribute_arguments callers.
805 (c_parser_statement_after_labels) <case RID_ATTRIBUTE>: Handle
808 2022-10-04 Jakub Jelinek <jakub@redhat.com>
810 * c-lang.h (struct c_omp_declare_target_attr): New type.
811 (current_omp_declare_target_attribute): Change type from
812 int to vec<c_omp_declare_target_attr, va_gc> *.
813 * c-parser.cc (c_parser_translation_unit): Adjust for that change.
814 If last pushed directive was begin declare target, use different
815 wording and simplify format strings for easier translations.
816 (c_parser_omp_clause_device_type): Uncomment
817 check_no_duplicate_clause call.
818 (c_parser_omp_declare_target): Adjust for the
819 current_omp_declare_target_attribute type change, push { -1 }.
820 Use error_at rather than warning_at for declare target with
821 only device_type clauses.
822 (OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Define.
823 (c_parser_omp_begin): Add begin declare target support.
824 (c_parser_omp_end): Adjust for the
825 current_omp_declare_target_attribute type change, adjust
826 diagnostics wording and simplify format strings for easier
828 * c-decl.cc (current_omp_declare_target_attribute): Change type from
829 int to vec<c_omp_declare_target_attr, va_gc> *.
830 (c_decl_attributes): Adjust for the
831 current_omp_declare_target_attribute type change. If device_type
832 was present on begin declare target, add "omp declare target host"
833 and/or "omp declare target nohost" attributes.
835 2022-09-29 Joseph Myers <joseph@codesourcery.com>
837 * c-decl.cc (handle_std_noreturn_attribute): New function.
838 (std_attribute_table): Add _Noreturn and noreturn.
840 2022-09-27 Jakub Jelinek <jakub@redhat.com>
842 * c-lang.h (current_omp_begin_assumes): Declare.
843 * c-parser.cc: Include bitmap.h.
844 (c_parser_omp_end_declare_target): Rename to ...
845 (c_parser_omp_end): ... this. Handle also end assumes.
846 (c_parser_omp_begin, c_parser_omp_assumption_clauses,
847 c_parser_omp_assumes, c_parser_omp_assume): New functions.
848 (c_parser_translation_unit): Also diagnose #pragma omp begin assumes
849 without corresponding #pragma omp end assumes.
850 (c_parser_pragma): Use %s in may only be used at file scope
851 diagnostics to decrease number of translatable messages. Handle
852 PRAGMA_OMP_BEGIN and PRAGMA_OMP_ASSUMES. Handle PRAGMA_OMP_END
853 rather than PRAGMA_OMP_END_DECLARE_TARGET and call c_parser_omp_end
854 for it rather than c_parser_omp_end_declare_target.
855 (c_parser_omp_construct): Handle PRAGMA_OMP_ASSUME.
856 * c-decl.cc (current_omp_begin_assumes): Define.
858 2022-09-24 Jakub Jelinek <jakub@redhat.com>
861 * c-typeck.cc (c_tree_equal): Only strip NON_LVALUE_EXPRs at the
862 start. For CONSTANT_CLASS_P or CASE_CONVERT: return false if t1 and
863 t2 have different types.
865 2022-09-22 David Malcolm <dmalcolm@redhat.com>
868 * c-parser.cc (c_parser_initelt): Initialize m_decimal.
869 (c_parser_cast_expression): Likewise.
870 (c_parser_alignof_expression): Likewise.
871 (c_parser_postfix_expression_after_paren_type): Likewise.
872 (c_parser_postfix_expression_after_primary): Likewise.
873 (c_parser_expression): Likewise.
874 (c_parser_omp_variable_list): Likewise.
875 (c_parser_transaction_expression): Likewise.
876 * c-tree.h (c_expr::set_error): Likewise.
877 * c-typeck.cc (c_expr_sizeof_expr): Likewise.
878 (parser_build_unary_op): Likewise.
879 (parser_build_binary_op): Likewise.
880 (digest_init): Likewise.
881 (pop_init_level): Likewise.
882 * gimple-parser.cc (c_parser_gimple_call_internal): Likewise.
884 2022-09-19 Marek Polacek <polacek@redhat.com>
887 * c-typeck.cc (maybe_warn_for_null_address): Don't emit stray
890 2022-09-15 Richard Biener <rguenther@suse.de>
892 * c-decl.cc (build_void_list_node): Remove.
894 2022-09-14 Julian Brown <julian@codesourcery.com>
896 * c-typeck.cc (c_finish_omp_clauses): Remove whole mapping node group
899 2022-09-07 Joseph Myers <joseph@codesourcery.com>
901 * c-parser.cc (c_parser_static_assert_declaration_no_semi)
902 (c_parser_alignas_specifier, c_parser_alignof_expression): Allow
903 for C2x spellings of keywords.
904 (c_parser_postfix_expression): Handle RID_TRUE and RID_FALSE.
906 2022-09-06 Jakub Jelinek <jakub@redhat.com>
908 * c-parser.cc (c_parser_omp_clause_doacross_sink): Don't verify val
909 in omp_cur_iteration - 1 has integer_type_node type.
911 2022-09-03 Jakub Jelinek <jakub@redhat.com>
913 * c-parser.cc (c_parser_omp_clause_name): Handle doacross.
914 (c_parser_omp_clause_depend_sink): Renamed to ...
915 (c_parser_omp_clause_doacross_sink): ... this. Add depend_p argument.
916 Handle parsing of doacross(sink:omp_cur_iteration-1). Use
917 OMP_CLAUSE_DOACROSS_SINK_NEGATIVE instead of
918 OMP_CLAUSE_DEPEND_SINK_NEGATIVE, build OMP_CLAUSE_DOACROSS instead
919 of OMP_CLAUSE_DEPEND and set OMP_CLAUSE_DOACROSS_DEPEND flag on it.
920 (c_parser_omp_clause_depend): Use OMP_CLAUSE_DOACROSS_SINK and
921 OMP_CLAUSE_DOACROSS_SOURCE instead of OMP_CLAUSE_DEPEND_SINK and
922 OMP_CLAUSE_DEPEND_SOURCE, build OMP_CLAUSE_DOACROSS for depend(source)
923 and set OMP_CLAUSE_DOACROSS_DEPEND on it.
924 (c_parser_omp_clause_doacross): New function.
925 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DOACROSS.
926 (c_parser_omp_depobj): Use OMP_CLAUSE_DEPEND_INVALID instead of
927 OMP_CLAUSE_DEPEND_SOURCE.
928 (c_parser_omp_for_loop): Don't diagnose here linear clause together
929 with ordered with argument.
930 (c_parser_omp_simd): Don't diagnose ordered clause with argument on
932 (OMP_ORDERED_DEPEND_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DOACROSS.
933 (c_parser_omp_ordered): Handle also doacross and adjust for it
935 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_DOACROSS.
936 Don't handle OMP_CLAUSE_DEPEND_SOURCE and OMP_CLAUSE_DEPEND_SINK.
938 2022-09-02 David Malcolm <dmalcolm@redhat.com>
941 * c-parser.cc (c_parser_string_literal): Clear ret.m_decimal.
942 (c_parser_expr_no_commas): Likewise.
943 (c_parser_conditional_expression): Likewise.
944 (c_parser_binary_expression): Clear m_decimal when popping the
946 (c_parser_unary_expression): Clear ret.m_decimal.
947 (c_parser_has_attribute_expression): Likewise for result.
948 (c_parser_predefined_identifier): Likewise for expr.
949 (c_parser_postfix_expression): Likewise for expr.
950 Set expr.m_decimal when handling a CPP_NUMBER that was a decimal
952 * c-tree.h (c_expr::m_decimal): New bitfield.
953 * c-typeck.cc (parser_build_binary_op): Clear result.m_decimal.
954 (parser_build_binary_op): Call check_for_xor_used_as_pow.
956 2022-09-01 Joseph Myers <joseph@codesourcery.com>
958 * c-decl.cc (grokparms): Handle () in a function declaration the
959 same as (void) for C2X.
961 2022-08-31 Joseph Myers <joseph@codesourcery.com>
963 * c-parser.cc (c_parser_label): Pass attributes to do_case.
964 * c-typeck.cc (do_case): Add argument ATTRS. Pass it to
967 2022-08-26 Jakub Jelinek <jakub@redhat.com>
969 * c-typeck.cc (convert_arguments): Handle BUILT_IN_ISSIGNALING.
971 2022-08-25 Marek Polacek <polacek@redhat.com>
973 * c-convert.cc (c_convert) <case POINTER_TYPE>: Handle NULLPTR_TYPE.
974 Give a better diagnostic when converting to nullptr_t.
975 * c-decl.cc (c_init_decl_processing): Perform C-specific nullptr
977 * c-parser.cc (c_parse_init): Maybe OR D_C2X into mask.
978 (c_parser_postfix_expression): Handle RID_NULLPTR.
979 * c-typeck.cc (null_pointer_constant_p): Return true when expr is
981 (build_unary_op) <case TRUTH_NOT_EXPR>: Handle NULLPTR_TYPE.
982 (build_conditional_expr): Handle the case when the second/third operand
983 is NULLPTR_TYPE and third/second operand is POINTER_TYPE.
984 (convert_for_assignment): Handle converting an expression of type
985 nullptr_t to pointer/bool.
986 (build_binary_op) <case TRUTH_XOR_EXPR>: Handle NULLPTR_TYPE.
987 <case EQ_EXPR>: Handle comparing operands of type nullptr_t.
989 2022-08-25 Joseph Myers <joseph@codesourcery.com>
991 * c-decl.cc (start_decl): Do not diagnose initialization of
992 variable-sized objects here.
993 * c-parser.cc (c_parser_braced_init): Add argument DECL. All
995 (c_parser_initializer): Diagnose initialization of variable-sized
996 objects other than with braced initializer.
997 (c_parser_braced_init): Use pedwarn_c11 for empty initializer
998 braces and update diagnostic text. Diagnose initialization of
999 variable-sized objects with nonempty braces.
1000 * c-typeck.cc (digest_init): Update diagnostic for initialization
1001 of variable-sized objects.
1002 (really_start_incremental_init, set_designator)
1003 (process_init_element): Update comments.
1004 (pop_init_level): Allow scalar empty initializers.
1006 2022-08-17 Tobias Burnus <tobias@codesourcery.com>
1007 Chung-Lin Tang <cltang@codesourcery.com>
1010 * c-decl.cc (c_decl_attributes, finish_decl): Call omp_mappable_type
1011 instead of removed langhook.
1012 * c-typeck.cc (c_finish_omp_clauses): Likewise.
1014 2022-08-11 Marek Polacek <polacek@redhat.com>
1016 PR middle-end/102633
1017 * c-parser.cc (c_parser_initializer): Add new tree parameter. Use it.
1018 Call suppress_warning.
1019 (c_parser_declaration_or_fndef): Pass d down to c_parser_initializer.
1020 (c_parser_omp_declare_reduction): Pass omp_priv down to
1021 c_parser_initializer.
1023 2022-08-08 Tom Honermann <tom@honermann.net>
1025 * c-parser.cc (c_parser_string_literal): Use char8_t as the type
1026 of CPP_UTF8STRING when char8_t support is enabled.
1027 * c-typeck.cc (digest_init): Allow initialization of an array
1028 of character type by a string literal with type array of
1031 2022-08-01 David Malcolm <dmalcolm@redhat.com>
1033 * c-typeck.cc (build_c_cast): Quote names of address spaces in
1035 (convert_for_assignment): Add a note to address space mismatch
1036 diagnostics, specifying the expected and actual types.
1038 2022-07-10 Lewis Hyatt <lhyatt@gmail.com>
1040 PR preprocessor/97498
1041 * c-parser.cc (c_parser_pragma): Set input_location to the
1042 location of the pragma, rather than the start of the line.
1044 2022-07-04 Tobias Burnus <tobias@codesourcery.com>
1045 Chung-Lin Tang <cltang@codesourcery.com>
1046 Thomas Schwinge <thomas@codesourcery.com>
1048 * c-parser.cc (c_parser_omp_target_data, c_parser_omp_target_update,
1049 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Set
1050 OMP_REQUIRES_TARGET_USED.
1051 (c_parser_omp_requires): Remove sorry.
1053 2022-07-01 Tobias Burnus <tobias@codesourcery.com>
1055 * c-parser.cc (c_parser_omp_target_enter_data,
1056 c_parser_omp_target_exit_data): Accept tofrom
1057 map-type modifier but use 'to' / 'from' internally.
1059 2022-06-16 David Malcolm <dmalcolm@redhat.com>
1061 * c-decl.cc (implicitly_declare): Add auto_diagnostic_group to
1062 group the warning with any note.
1063 (warn_about_goto): Likewise to group error or warning with note.
1064 Bail out if the warning wasn't emitted, to avoid emitting orphan
1066 (lookup_label_for_goto): Add auto_diagnostic_group to
1067 group the error with the note.
1068 (check_earlier_gotos): Likewise.
1069 (c_check_switch_jump_warnings): Likewise for any error/warning.
1070 Conditionalize emission of the notes.
1071 (diagnose_uninitialized_cst_member): Likewise for warning,
1072 conditionalizing emission of the note.
1073 (grokdeclarator): Add auto_diagnostic_group to group the "array
1074 type has incomplete element type" error with any note.
1075 (parser_xref_tag): Add auto_diagnostic_group to group warnings
1076 with their notes. Conditionalize emission of notes.
1077 (start_struct): Add auto_diagnostic_group to group the
1078 "redefinition of" errors with any note.
1079 (start_enum): Likewise for "redeclaration of %<enum %E%>" error.
1080 (check_for_loop_decls): Likewise for pre-C99 error.
1082 2022-06-07 Jakub Jelinek <jakub@redhat.com>
1084 * c-parser.cc (c_parser_omp_clause_linear): Parse OpenMP 5.2
1085 style linear clause modifiers. Set
1086 OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER flag on the clauses when
1087 old style modifiers are used.
1088 * c-typeck.cc (c_finish_omp_clauses): Only reject linear clause
1089 with val modifier on simd or for if the old style modifiers are
1092 2022-06-02 David Malcolm <dmalcolm@redhat.com>
1094 * c-lang.cc (LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE): Redefine.
1095 (c_get_sarif_source_language): New.
1096 * c-tree.h (c_get_sarif_source_language): New decl.
1098 2022-05-31 Jason Merrill <jason@redhat.com>
1100 * Make-lang.in (c.tags): Look at *.cc.
1102 2022-05-31 Jakub Jelinek <jakub@redhat.com>
1104 * c-parser.cc (OMP_SCOPE_CLAUSE_MASK): Add firstprivate and allocate
1107 2022-05-28 Jakub Jelinek <jakub@redhat.com>
1109 * c-parser.cc (c_parser_omp_declare_target): If OMP_CLAUSE_LINK was
1110 seen first, use "%<to%>" or "%<enter%>" depending on
1111 OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
1112 "%<to%> or %<enter%>" wording.
1114 2022-05-27 Jakub Jelinek <jakub@redhat.com>
1116 * c-parser.cc (c_parser_omp_clause_name): Parse enter clause.
1117 (c_parser_omp_all_clauses): For to clause on declare target, use
1118 OMP_CLAUSE_ENTER clause with OMP_CLAUSE_ENTER_TO instead of
1119 OMP_CLAUSE_TO_DECLARE clause. Handle PRAGMA_OMP_CLAUSE_ENTER.
1120 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add enter clause.
1121 (c_parser_omp_declare_target): Use OMP_CLAUSE_ENTER instead of
1122 OMP_CLAUSE_TO_DECLARE.
1123 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_ENTER instead
1124 of OMP_CLAUSE_TO_DECLARE, to OMP_CLAUSE_ENTER_TO use "to" as clause
1125 name in diagnostics instead of
1126 omp_clause_code_name[OMP_CLAUSE_CODE (c)].
1128 2022-05-25 Jakub Jelinek <jakub@redhat.com>
1131 * c-tree.h (build_component_ref): Add ARROW_LOC location_t argument.
1132 * c-typeck.cc (build_component_ref): Likewise. If DATUM is
1133 INDIRECT_REF and ARROW_LOC isn't UNKNOWN_LOCATION, print a different
1134 diagnostic and fixit hint if DATUM has pointer type.
1135 * c-parser.cc (c_parser_postfix_expression,
1136 c_parser_omp_variable_list): Adjust build_component_ref callers.
1137 * gimple-parser.cc (c_parser_gimple_postfix_expression_after_primary):
1140 2022-05-24 Jakub Jelinek <jakub@redhat.com>
1143 * c-parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
1145 2022-05-18 Marek Polacek <polacek@redhat.com>
1148 * c-decl.cc (diagnose_mismatched_decls): Warn about enum/integer type
1150 * c-tree.h (comptypes_check_enum_int): Declare.
1151 * c-typeck.cc (comptypes): No longer static.
1153 2022-05-17 Marek Polacek <polacek@redhat.com>
1155 * c-decl.cc (finish_enum): Store the CONST_DECL into TREE_VALUE, not
1158 2022-05-17 Jakub Jelinek <jakub@redhat.com>
1160 * c-parser.cc (c_parser_omp_clause_depend): Parse
1161 inoutset depend-kind.
1162 (c_parser_omp_depobj): Likewise.
1164 2022-05-16 Martin Liska <mliska@suse.cz>
1166 * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
1168 2022-05-12 Jakub Jelinek <jakub@redhat.com>
1170 * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
1172 (c_parser_postfix_expression): Diagnose uses of omp_all_memory
1173 in postfix expressions.
1174 (c_parser_omp_variable_list): Handle omp_all_memory in depend
1176 * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
1177 keyword in depend clause as null_pointer_node, diagnose invalid
1180 2022-05-09 Martin Liska <mliska@suse.cz>
1182 * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
1184 (c_parser_binary_expression): Likewise.
1186 2022-05-07 Marek Polacek <polacek@redhat.com>
1190 * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
1192 2022-04-08 Jakub Jelinek <jakub@redhat.com>
1195 * c-typeck.cc (c_build_va_arg): Reject function types.
1197 2022-03-22 Marek Polacek <polacek@redhat.com>
1201 * c-typeck.cc (struct initializer_stack): Add 'designated' member.
1202 (start_init): Set it.
1203 (finish_init): Restore constructor_designated.
1204 (push_init_level): Set constructor_designated to the value of
1205 constructor_designated in the upper constructor_stack.
1207 2022-03-12 Thomas Schwinge <thomas@codesourcery.com>
1210 * c-typeck.cc (handle_omp_array_sections_1)
1211 (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
1212 instead of 'c_omp_map_clause_name'.
1214 2022-03-09 Joseph Myers <joseph@codesourcery.com>
1216 * c-typeck.cc (function_types_compatible_p): Do not handle C2X
1217 differently from earlier standards for unprototyped function type
1220 2022-03-09 Jakub Jelinek <jakub@redhat.com>
1223 * c-fold.cc (c_fully_fold_internal): Don't emit
1224 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
1225 * c-typeck.cc (build_binary_op): Likewise.
1227 2022-03-07 Jakub Jelinek <jakub@redhat.com>
1229 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
1232 2022-02-23 Richard Biener <rguenther@suse.de>
1234 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
1235 SSA names without definition.
1236 (c_parser_gimple_declaration): Handle pointer typed SSA names.
1238 2022-02-17 Jakub Jelinek <jakub@redhat.com>
1241 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
1242 convert_lvalue_to_rvalue and build_indirect_ref instead of
1243 build_simple_mem_ref.
1245 2022-02-11 Richard Biener <rguenther@suse.de>
1247 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
1250 2022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
1252 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
1254 (c_parser_omp_variable_list): Handle array sections.
1255 (c_parser_omp_clause_has_device_addr): Added.
1256 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
1258 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
1260 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
1261 (c_finish_omp_clauses): Handle array sections.
1263 2022-02-09 Jakub Jelinek <jakub@redhat.com>
1266 * c-parser.cc (c_parser_postfix_expression)
1267 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
1268 instead of build1_loc to build PAREN_EXPR.
1269 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
1270 * c-fold.cc (c_fully_fold_internal): Likewise.
1272 2022-01-17 Martin Liska <mliska@suse.cz>
1274 * Make-lang.in: Rename .c names to .cc.
1275 * c-convert.cc: Likewise.
1276 * c-decl.cc (struct lang_identifier): Likewise.
1277 (pop_scope): Likewise.
1278 (finish_decl): Likewise.
1279 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
1280 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
1281 * c-parser.h (GCC_C_PARSER_H): Likewise.
1282 * c-tree.h (c_keyword_starts_typename): Likewise.
1283 (finish_declspecs): Likewise.
1284 (c_get_alias_set): Likewise.
1285 (enum c_oracle_request): Likewise.
1286 (tag_exists_p): Likewise.
1287 (set_c_expr_source_range): Likewise.
1288 * c-typeck.cc (c_common_type): Likewise.
1289 (c_finish_omp_clauses): Likewise.
1290 * config-lang.in: Likewise.
1292 2022-01-17 Martin Liska <mliska@suse.cz>
1294 * c-aux-info.c: Moved to...
1295 * c-aux-info.cc: ...here.
1296 * c-convert.c: Moved to...
1297 * c-convert.cc: ...here.
1298 * c-decl.c: Moved to...
1299 * c-decl.cc: ...here.
1300 * c-errors.c: Moved to...
1301 * c-errors.cc: ...here.
1302 * c-fold.c: Moved to...
1303 * c-fold.cc: ...here.
1304 * c-lang.c: Moved to...
1305 * c-lang.cc: ...here.
1306 * c-objc-common.c: Moved to...
1307 * c-objc-common.cc: ...here.
1308 * c-parser.c: Moved to...
1309 * c-parser.cc: ...here.
1310 * c-typeck.c: Moved to...
1311 * c-typeck.cc: ...here.
1312 * gccspec.c: Moved to...
1313 * gccspec.cc: ...here.
1314 * gimple-parser.c: Moved to...
1315 * gimple-parser.cc: ...here.
1317 2022-01-17 Andrew Stubbs <ams@codesourcery.com>
1319 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
1321 2022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
1324 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
1325 outer node for ARRAY_REFs.
1327 2022-01-01 Jakub Jelinek <jakub@redhat.com>
1330 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
1331 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
1333 2021-12-17 Marek Polacek <polacek@redhat.com>
1336 * c-decl.c (c_warn_unused_attributes): Don't warn for
1337 attribute_ignored_p.
1338 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
1339 arguments when the attribute is ignored.
1341 2021-12-14 Jakub Jelinek <jakub@redhat.com>
1344 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
1345 consume the pragma and silently skip to the pragma eol.
1347 2021-12-12 Jonathan Wakely <jwakely@redhat.com>
1349 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
1350 * c-parser.c: Likewise.
1352 2021-12-09 Jakub Jelinek <jakub@redhat.com>
1355 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
1356 to resort_data.new_value.
1358 2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
1360 * c-parser.c (struct omp_dim): New struct type for use inside
1361 c_parser_omp_variable_list.
1362 (c_parser_omp_variable_list): Allow multiple levels of array and
1363 component accesses in array section base-pointer expression.
1364 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
1365 c_parser_omp_var_list_parens.
1366 (c_parser_omp_clause_from): Likewise.
1367 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
1368 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
1370 (c_finish_omp_clauses): Extend allowed ranged of expressions
1371 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
1373 2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
1376 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
1377 call to c_parser_omp_variable_list to 'true'.
1378 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
1379 array base handling.
1380 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
1382 2021-11-30 Thomas Schwinge <thomas@codesourcery.com>
1384 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
1385 orphan loop" checking.
1387 2021-11-30 Cesar Philippidis <cesar@codesourcery.com>
1388 Thomas Schwinge <thomas@codesourcery.com>
1390 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
1391 OpenACC gang reductions.
1393 2021-11-30 Richard Biener <rguenther@suse.de>
1395 * gimple-parser.c (c_parser_gimple_postfix_expression):
1396 avoid unreachable code after break.
1398 2021-11-29 Eric Gallager <egallager@gcc.gnu.org>
1401 * Make-lang.in: Use ETAGS variable in TAGS target.
1403 2021-11-29 Richard Biener <rguenther@suse.de>
1405 * c-typeck.c (c_tree_equal): Remove unreachable return.
1406 * c-parser.c (get_matching_symbol): Likewise.
1408 2021-11-23 Jakub Jelinek <jakub@redhat.com>
1410 * c-typeck.c (c_clone_omp_udr): Don't initialize
1411 id.transform_lang_insert_block.
1413 2021-11-19 Martin Sebor <msebor@redhat.com>
1417 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
1418 code resulting from macro expansion.
1420 2021-11-19 Martin Liska <mliska@suse.cz>
1423 2021-11-19 Martin Liska <mliska@suse.cz>
1425 * c-parser.c (add_debug_begin_stmt): Use option directly.
1427 2021-11-18 Matthias Kretz <m.kretz@gsi.de>
1429 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
1430 * c-parser.c (c_parser_postfix_expression): Likewise.
1432 2021-11-18 Martin Liska <mliska@suse.cz>
1434 * c-parser.c (add_debug_begin_stmt): Use option directly.
1436 2021-11-17 Martin Sebor <msebor@redhat.com>
1439 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
1440 bounds before deciding if they're constant.
1442 2021-11-15 Jakub Jelinek <jakub@redhat.com>
1444 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
1445 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
1447 2021-11-11 Jakub Jelinek <jakub@redhat.com>
1449 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
1450 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
1451 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
1452 OMP_CLAUSE_NUM_TEAMS_EXPR.
1453 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
1454 combined target teams even lower-bound expression.
1456 2021-11-11 Richard Biener <rguenther@suse.de>
1458 * gimple-parser.c: Shuffle bitmap.h include.
1460 2021-11-03 Joseph Myers <joseph@codesourcery.com>
1463 * c-convert.c (c_convert): New function, based on convert.
1464 (convert): Make into wrapper of c_convert.
1465 (convert_init): New function.
1466 * c-typeck.c (enum impl_conv): Add ic_init_const.
1467 (convert_for_assignment): Handle ic_init_const like ic_init. Add
1468 new argument to convert_and_check call.
1469 (digest_init): Pass ic_init_const to convert_for_assignment for
1470 initializers required to be constant.
1472 2021-11-02 Richard Sandiford <richard.sandiford@arm.com>
1474 * c-tree.h (c_simulate_record_decl): Declare.
1475 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
1476 * c-decl.c (c_simulate_record_decl): New function.
1478 2021-10-22 Eric Gallager <egallager@gcc.gnu.org>
1481 * Make-lang.in: Add dummy c.install-dvi target.
1483 2021-10-15 Richard Biener <rguenther@suse.de>
1487 (c_parser_gimple_postfix_expression_after_primary): Check
1488 for a pointer do be dereferenced by ->.
1490 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
1492 * c-parser.c (c_finish_omp_declare_variant): Change call from
1493 c_omp_check_context_selector to omp_check_context_selector. Change
1494 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
1496 2021-10-09 Jakub Jelinek <jakub@redhat.com>
1498 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
1499 (c_parser_omp_scan_loop_body): Use it.
1500 (c_parser_omp_sections_scope): Likewise.
1502 2021-10-07 Richard Biener <rguenther@suse.de>
1504 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
1506 2021-10-05 Richard Biener <rguenther@suse.de>
1509 * gimple-parser.c (c_parser_gimple_postfix_expression):
1510 Accept more address _Literals.
1512 2021-10-04 Marek Polacek <polacek@redhat.com>
1515 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
1517 2021-10-01 Martin Sebor <msebor@redhat.com>
1520 * c-typeck.c (maybe_warn_for_null_address): New function.
1521 (build_binary_op): Call it.
1523 2021-10-01 Jakub Jelinek <jakub@redhat.com>
1524 Richard Biener <rguenther@suse.de>
1527 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1528 for division even for SANITIZE_SI_OVERFLOW.
1530 2021-10-01 Jakub Jelinek <jakub@redhat.com>
1532 * c-parser.c (c_parser_omp_clause_order): Set
1533 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
1535 2021-09-28 Andrew Pinski <apinski@marvell.com>
1538 * c-parser.c (c_parser_statement_after_labels): Pass
1539 the c_expr instead of the tree to c_finish_goto_ptr.
1540 * c-typeck.c (c_finish_goto_ptr): Change the second
1541 argument type to c_expr.
1542 * c-tree.h (c_finish_goto_ptr): Likewise.
1543 Error out if the expression was not of a pointer type.
1545 2021-09-22 Jakub Jelinek <jakub@redhat.com>
1547 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
1550 2021-09-18 Jakub Jelinek <jakub@redhat.com>
1552 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
1553 and reproducible modifiers.
1554 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
1556 2021-09-18 Jakub Jelinek <jakub@redhat.com>
1558 * c-parser.c (c_parser_omp_clause_default): Handle private and
1559 firstprivate arguments, adjust diagnostics on unknown argument.
1561 2021-09-17 Jakub Jelinek <jakub@redhat.com>
1563 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
1566 2021-09-10 Jakub Jelinek <jakub@redhat.com>
1568 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
1569 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
1570 don't call build_conditional_expr, instead build a COND_EXPR directly.
1571 (c_parser_binary_expression): Avoid calling parser_build_binary_op
1572 if omp_atomic_lhs even in more cases for >, < or ==.
1573 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
1574 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
1575 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
1576 * c-typeck.c (build_binary_op): For flag_openmp only handle
1579 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1581 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
1584 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1586 * c-decl.c (enum deprecated_states): Add unavailable state.
1587 (merge_decls): Copy unavailability.
1588 (quals_from_declspecs): Handle unavailable case.
1589 (start_decl): Amend the logic handling suppression of nested
1590 deprecation states to include unavailability.
1591 (smallest_type_quals_location): Amend comment.
1592 (grokdeclarator): Handle the unavailable deprecation state.
1593 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
1594 * c-tree.h (struct c_declspecs): Add unavailable_p.
1595 * c-typeck.c (build_component_ref): Handle unavailability.
1596 (build_external_ref): Likewise.
1598 2021-09-01 Roger Sayle <roger@nextmovesoftware.com>
1599 Joseph Myers <joseph@codesourcery.com>
1602 * c-decl.c (duplicate_decls): On significant mismatches, mark the
1603 types of both (non-function) decls as error_mark_node, so that the
1604 middle-end can see the code is malformed.
1605 (free_attr_access_data): Don't process if the type has been set to
1608 2021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
1610 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
1611 and 'ancestor' in 'target device' clauses.
1613 2021-08-23 Jakub Jelinek <jakub@redhat.com>
1615 * c-parser.c (c_parser_omp_clause_num_tasks,
1616 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
1618 2021-08-22 Martin Uecker <muecker@gwdg.de>
1621 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
1622 for pointers to arrays with qualifiers.
1623 (build_conditional_expr): For C23 don't lose qualifiers for pointers
1624 to arrays when the other pointer is a void pointer. Update warnings.
1625 (convert_for_assignment): Update warnings for C2X when converting from
1626 void* with qualifiers to a pointer to array with the same qualifiers.
1628 2021-08-20 Jakub Jelinek <jakub@redhat.com>
1630 * c-parser.c (c_parser_omp_error): New function.
1631 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
1633 2021-08-20 Jakub Jelinek <jakub@redhat.com>
1635 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
1636 comma at the end of list.
1637 (c_parser_omp_requires): Likewise.
1639 2021-08-19 Jakub Jelinek <jakub@redhat.com>
1641 * c-parser.c (c_parser_omp_requires): Don't call
1642 c_parser_peek_2nd_token and optionally consume token if current
1643 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
1645 2021-08-18 Jakub Jelinek <jakub@redhat.com>
1647 * c-parser.c (c_parser_omp_nothing): New function.
1648 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
1650 2021-08-18 Jakub Jelinek <jakub@redhat.com>
1652 * c-parser.c (c_parser_statement_after_labels): Add restart label
1653 near the start of the function. If c_parser_pragma returns false,
1655 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
1656 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
1657 return what c_parser_omp_declare returned. Return true instead of
1658 false after emitting errors that the directive is not allowed in
1659 pragma_stmt context.
1660 (c_parser_omp_ordered): Return true instead of
1661 false after emitting errors that the directive is not allowed in
1662 pragma_stmt context.
1663 (c_parser_omp_target_update): Likewise.
1664 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
1665 Change return type from tree to bool, return false if the
1666 directive should be ignored in pragma_stmt contexts.
1667 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
1668 return their result directly.
1669 (c_parser_omp_cancellation_point): Change return type from void to
1670 bool, return false if the directive should be ignored in pragma_stmt
1672 (c_parser_omp_declare): Likewise.
1674 2021-08-17 Jakub Jelinek <jakub@redhat.com>
1676 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
1677 (c_parser_omp_scope): New function.
1678 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
1680 2021-08-12 Jakub Jelinek <jakub@redhat.com>
1682 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
1683 (c_parser_omp_clause_filter): New function.
1684 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
1685 (OMP_MASKED_CLAUSE_MASK): Define.
1686 (c_parser_omp_masked): New function.
1687 (c_parser_omp_parallel): Handle parallel masked.
1688 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
1689 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
1691 2021-08-12 Martin Uecker <muecker@gwdg.de>
1695 * c-typeck.c (c_expr_sizeof_type): Evaluate
1696 size expressions for structs of variable size.
1698 2021-08-12 Tobias Burnus <tobias@codesourcery.com>
1700 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
1701 'primary' as alias for 'master'.
1703 2021-08-10 Martin Uecker <muecker@gwdg.de>
1706 * c-typeck.c (c_expr_sizeof_expr): Evaluate
1707 size expressions for structs of variable size.
1709 2021-08-06 Tamar Christina <tamar.christina@arm.com>
1711 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
1712 * c-tree.h (c_simulate_enum_decl): Likewise.
1714 2021-08-06 Martin Sebor <msebor@redhat.com>
1716 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
1717 vec arguments to by-reference.
1718 (c_finish_omp_declare_simd): Same.
1719 (c_parser_compound_statement_nostart): Same.
1720 (c_parser_for_statement): Same.
1721 (c_parser_objc_methodprotolist): Same.
1722 (c_parser_oacc_routine): Same.
1723 (c_parser_omp_for_loop): Same.
1724 (c_parser_omp_declare_simd): Same.
1726 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1727 Joseph Myers <joseph@codesourcery.com>
1728 Cesar Philippidis <cesar@codesourcery.com>
1730 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
1731 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
1732 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1733 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
1735 2021-07-20 Martin Sebor <msebor@redhat.com>
1737 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
1739 * c-typeck.c (c_build_function_call_vec): Same.
1741 2021-07-15 Martin Sebor <msebor@redhat.com>
1745 * c-decl.c (get_parm_array_spec): Strip nops.
1747 2021-07-06 Martin Sebor <msebor@redhat.com>
1749 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
1751 2021-07-02 Jakub Jelinek <jakub@redhat.com>
1754 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
1755 appears before a CPP_NAME.
1757 2021-06-25 Martin Sebor <msebor@redhat.com>
1759 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
1760 warning_suppressed_p, suppress_warning, and copy_no_warning.
1761 (diagnose_mismatched_decls): Same.
1762 (duplicate_decls): Same.
1763 (grokdeclarator): Same.
1764 (finish_function): Same.
1765 (c_write_global_declarations_1): Same.
1766 * c-fold.c (c_fully_fold_internal): Same.
1767 * c-parser.c (c_parser_expr_no_commas): Same.
1768 (c_parser_postfix_expression): Same.
1769 * c-typeck.c (array_to_pointer_conversion): Same.
1770 (function_to_pointer_conversion): Same.
1771 (default_function_array_conversion): Same.
1772 (convert_lvalue_to_rvalue): Same.
1773 (default_conversion): Same.
1774 (build_indirect_ref): Same.
1775 (build_function_call_vec): Same.
1776 (build_atomic_assign): Same.
1777 (build_unary_op): Same.
1778 (c_finish_return): Same.
1779 (emit_side_effect_warnings): Same.
1780 (c_finish_stmt_expr): Same.
1781 (c_omp_clause_copy_ctor): Same.
1783 2021-06-24 Jakub Jelinek <jakub@redhat.com>
1786 * c-parser.c (c_parser_has_attribute_expression): Set source range for
1789 2021-06-24 Jakub Jelinek <jakub@redhat.com>
1792 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
1795 2021-06-24 Jakub Jelinek <jakub@redhat.com>
1797 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
1798 C_ORT_OMP for clauses on target construct.
1799 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
1800 (c_parser_omp_target): For non-combined target add
1801 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
1802 C_ORT_OMP_TARGET to c_finish_omp_clauses.
1803 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
1804 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
1805 never present on C_ORT_*DECLARE_SIMD.
1806 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
1807 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
1808 corresponding map clauses.
1810 2021-06-21 Jakub Jelinek <jakub@redhat.com>
1812 PR inline-asm/100785
1813 * c-typeck.c (c_mark_addressable): Diagnose trying to make
1814 bit-fields addressable.
1816 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1818 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
1821 2021-06-14 Tobias Burnus <tobias@codesourcery.com>
1824 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
1825 var in the error case.
1827 2021-06-07 Eric Botcazou <ebotcazou@adacore.com>
1830 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
1831 spot built-in functions.
1833 2021-06-06 Jakub Jelinek <jakub@redhat.com>
1836 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
1837 even when target is combined with other constructs.
1839 2021-06-06 Eric Botcazou <ebotcazou@adacore.com>
1842 * c-decl.c (finish_struct): Fix thinko in previous change.
1843 * c-typeck.c (convert_for_assignment): Do not warn on pointer
1844 assignment and initialization for storage order purposes if the
1845 RHS is a call to a DECL_IS_MALLOC function.
1847 2021-06-04 Martin Sebor <msebor@redhat.com>
1850 * c-objc-common.c (print_type): Handle erroneous types.
1852 2021-06-03 Jakub Jelinek <jakub@redhat.com>
1855 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
1856 after depend only cases.
1858 2021-05-31 Richard Biener <rguenther@suse.de>
1861 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
1862 * c-parser.c (c_parser_postfix_expression): Likewise.
1864 2021-05-28 Richard Biener <rguenther@suse.de>
1867 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
1868 invalid if conditions.
1870 2021-05-28 Jakub Jelinek <jakub@redhat.com>
1873 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
1874 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1875 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
1876 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
1877 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
1878 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
1879 if present in map_head, map_field_head or map_firstprivate_head
1882 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
1884 * c-parser.c (c_parser_omp_clause_affinity): New.
1885 (c_parser_omp_clause_name, c_parser_omp_variable_list,
1886 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
1887 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
1888 c_finish_omp_clauses): Likewise.
1890 2021-05-26 Eric Botcazou <ebotcazou@adacore.com>
1893 * c-decl.c (finish_struct): Warn for a union containing an aggregate
1894 field with a differing scalar storage order.
1896 2021-05-21 Jakub Jelinek <jakub@redhat.com>
1899 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
1900 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
1901 if a decl is mentioned both in map clause and in such firstprivate
1902 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
1904 2021-05-19 Jakub Jelinek <jakub@redhat.com>
1907 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
1908 master when combined with taskloop.
1909 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
1910 parallel master when not combined with taskloop.
1912 2021-05-18 Richard Biener <rguenther@suse.de>
1915 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
1916 Diagnose calls to non-functions.
1917 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
1919 2021-05-17 Richard Biener <rguenther@suse.de>
1922 * gimple-parser.c (c_parser_gimple_label): Avoid building
1923 a GIMPLE label with NULL label decl.
1925 2021-05-13 Martin Sebor <msebor@redhat.com>
1928 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
1930 2021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
1932 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
1935 2021-05-10 Martin Liska <mliska@suse.cz>
1937 * c-aux-info.c (affix_data_type): Use startswith
1938 function instead of strncmp.
1939 * c-typeck.c (build_function_call_vec): Likewise.
1940 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
1942 2021-05-07 Eric Botcazou <ebotcazou@adacore.com>
1944 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
1945 on the address of a pointer field in a record with reverse SSO.
1947 2021-05-04 Tobias Burnus <tobias@codesourcery.com>
1949 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
1950 for || and && reductions.
1952 2021-04-29 Joseph Myers <joseph@codesourcery.com>
1954 * c-typeck.c (function_types_compatible_p): For C2X, treat
1955 unprototyped function as compatible with non-variadic prototyped
1956 function even if some argument types are changed by the default
1957 argument promotions.
1959 2021-04-15 Martin Sebor <msebor@redhat.com>
1963 * c-decl.c (pushdecl): Always propagate type attribute.
1965 2021-04-15 Richard Sandiford <richard.sandiford@arm.com>
1968 * c-typeck.c (c_common_type): Do not drop attributes that
1969 affect type identity.
1971 2021-04-10 Jakub Jelinek <jakub@redhat.com>
1974 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
1977 2021-03-25 Jakub Jelinek <jakub@redhat.com>
1980 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
1983 2021-03-19 Jakub Jelinek <jakub@redhat.com>
1986 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
1987 with modifycode NOP_EXPR produces and mark the _Atomic var as read
1989 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
1990 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
1991 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
1993 2021-03-15 Tobias Burnus <tobias@codesourcery.com>
1996 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
1997 ensure that the varpool node is marked as offloadable.
1999 2021-03-05 Tobias Burnus <tobias@codesourcery.com>
2002 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
2004 2021-02-24 Martin Sebor <msebor@redhat.com>
2007 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
2009 2021-02-18 Jakub Jelinek <jakub@redhat.com>
2012 * c-typeck.c (c_finish_return): Don't wrap retval into
2013 EXCESS_PRECISION_EXPR in functions that return void.
2015 2021-02-11 Marek Polacek <polacek@redhat.com>
2017 * c-parser.c (c_parser_if_statement): Use vec_free.
2019 2021-02-04 Martin Sebor <msebor@redhat.com>
2022 * c-decl.c (locate_old_decl): Add type to diagnostic output.
2023 (diagnose_mismatched_decls): Same.
2024 (start_function): Introduce temporaries for better readability.
2025 * c-typeck.c (comptypes_internal): Only consider complete enum
2026 types in comparisons with integers.
2028 2021-02-01 Martin Sebor <msebor@redhat.com>
2031 * c-decl.c (free_attr_access_data): New function.
2032 (c_parse_final_cleanups): Call free_attr_access_data.
2034 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
2036 * c-parser.c (c_parser_omp_clause_detach): New.
2037 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
2038 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
2039 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
2040 clause. Prevent use of detach with mergeable and overriding the
2041 data sharing mode of the event handle.
2043 2021-01-15 Jakub Jelinek <jakub@redhat.com>
2045 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
2046 unqualified element type and then call c_build_qualified_type on the
2049 2021-01-07 Richard Biener <rguenther@suse.de>
2051 * gimple-parser.c (c_parser_gimple_compound_statement): Only
2052 reallocate loop array if it is too small.
2054 2020-12-16 Martin Uecker <muecker@gwdg.de>
2057 * c-typeck.c (build_modify_expr): Drop qualifiers.
2059 2020-12-16 Martin Uecker <muecker@gwdg.de>
2062 * c-parser.c (c_parser_expression): Look into
2063 nop expression when marking expressions as read.
2065 2020-12-14 Martin Liska <mliska@suse.cz>
2068 * c-typeck.c (pointer_diff): Do not emit a top-level
2070 (build_binary_op): Likewise.
2072 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
2074 * c-parser.c (c_parser_omp_allocate): New.
2075 (c_parser_omp_construct): Call it.
2077 2020-12-09 Richard Biener <rguenther@suse.de>
2080 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
2083 2020-12-07 Martin Uecker <muecker@gwdg.de>
2086 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
2087 that drops qualifiers to the end of the function.
2089 2020-11-26 Martin Uecker <muecker@gwdg.de>
2093 * c-parser.c (c_parser_declaration_or_fndef): Remove
2094 redundant code to drop qualifiers of _Atomic types for __auto_type.
2095 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
2096 types for __typeof__.
2098 2020-11-24 Jakub Jelinek <jakub@redhat.com>
2101 * c-parser.c (c_parser_binary_expression): For omp atomic binary
2102 expressions, use make_node instead of build2 to avoid checking build2
2105 2020-11-23 Joseph Myers <joseph@codesourcery.com>
2108 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
2109 for comparisons of complete and incomplete pointers.
2111 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
2113 * c-aux-info.c (gen_type): Support opaque types.
2115 2020-11-20 Martin Sebor <msebor@redhat.com>
2118 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
2120 2020-11-20 Jakub Jelinek <jakub@redhat.com>
2123 * Make-lang.in (c.serial): Change from goal to a variable.
2124 (.PHONY): Drop c.serial.
2126 2020-11-20 Martin Uecker <muecker@gwdg.de>
2128 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
2130 2020-11-19 Jakub Jelinek <jakub@redhat.com>
2133 * c-decl.c (get_parm_array_spec): Bail out of nelts is
2136 2020-11-18 Jakub Jelinek <jakub@redhat.com>
2138 * Make-lang.in (c.serial): New goal.
2139 (.PHONY): Add c.serial c.prev.
2140 (cc1$(exeext)): Call LINK_PROGRESS.
2142 2020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
2144 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
2146 * c-typeck.c (build_asm_expr): Remove an assert checking output
2147 absence for asm goto.
2149 2020-11-13 Jakub Jelinek <jakub@redhat.com>
2151 * c-typeck.c (c_finish_omp_clauses): Don't clear
2152 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
2154 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2157 * c-parser.c (c_parser_objc_class_definition): Pass the
2158 location of the class name to the interface declaration.
2160 2020-11-10 Strager Neds <strager.nds@gmail.com>
2162 * c-decl.c (merge_decls): Use new overload of
2163 set_decl_section_name.
2165 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
2167 * c-parser.c (c_parser_omp_target_data): Add use of
2168 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
2169 handled map clause kind.
2170 (c_parser_omp_target_enter_data): Likewise.
2171 (c_parser_omp_target_exit_data): Likewise.
2172 (c_parser_omp_target): Likewise.
2173 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
2174 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
2175 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
2176 same struct field access to co-exist on OpenMP construct.
2178 2020-11-07 Martin Uecker <muecker@gwdg.de>
2180 * c-parser.c (c_parser_label): Implement mixing of labels and code.
2181 (c_parser_all_labels): Likewise.
2183 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
2185 * c-parser.c (c_parser_objc_at_property_declaration):
2186 Improve parsing fidelity. Associate better location info
2187 with @property attributes. Clean up the interface to
2188 objc_add_property_declaration ().
2190 2020-11-06 Nathan Sidwell <nathan@acm.org>
2192 * c-decl.c (diagnose_mismatched_decls): Rename
2193 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2194 (warn_if_shadowing, implicitly_declare, names_builtin_p)
2195 (collect_source_refs): Likewise.
2196 * c-typeck.c (inform_declaration, inform_for_arg)
2197 (convert_for_assignment): Likewise.
2199 2020-11-06 Tobias Burnus <tobias@codesourcery.com>
2201 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
2203 (c_parser_omp_construct): Update call.
2205 2020-11-04 Jakub Jelinek <jakub@redhat.com>
2208 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
2209 find underlying decl to clear in the aligned_head bitmap.
2211 2020-11-04 Joseph Myers <joseph@codesourcery.com>
2213 * c-decl.c (handle_nodiscard_attribute): New.
2214 (std_attribute_table): Add nodiscard.
2215 * c-parser.c (c_parser_std_attribute): Expect argument to
2216 nodiscard attribute to be a string. Do not special-case ignoring
2218 * c-typeck.c (maybe_warn_nodiscard): New.
2219 (build_compound_expr, emit_side_effect_warnings): Call
2220 maybe_warn_nodiscard.
2221 (c_process_expr_stmt, c_finish_stmt_expr): Also call
2222 emit_side_effect_warnings if warn_unused_result.
2224 2020-10-29 Asher Gordon <AsDaGo@posteo.net>
2226 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
2228 (finish_init): Likewise.
2229 (pop_init_level): Likewise.
2231 2020-10-28 Joseph Myers <joseph@codesourcery.com>
2233 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
2234 error_at for omitted parameter name.
2236 2020-10-28 Jakub Jelinek <jakub@redhat.com>
2238 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
2239 (c_parser_omp_clause_allocate): New function.
2240 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
2241 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
2242 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
2243 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
2244 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
2245 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
2246 PRAGMA_OMP_CLAUSE_ALLOCATE.
2247 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
2249 2020-10-27 Joseph Myers <joseph@codesourcery.com>
2251 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
2252 standard attributes.
2254 2020-10-23 Marek Polacek <polacek@redhat.com>
2257 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
2258 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
2259 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
2260 * c-tree.h (char_type_p): Declare.
2261 * c-typeck.c (char_type_p): No longer static.
2263 2020-10-23 Martin Sebor <msebor@redhat.com>
2266 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
2268 2020-09-19 Martin Sebor <msebor@redhat.com>
2271 * c-decl.c (lookup_last_decl): Define new function.
2272 (c_decl_attributes): Call it.
2273 (start_decl): Add argument and use it.
2274 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
2275 (get_parm_array_spec): Define new function.
2276 (push_parm_decl): Call get_parm_array_spec.
2277 (start_function): Call warn_parm_array_mismatch. Build attribute
2278 access and add it to current function.
2279 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
2280 in forms of array parameters.
2281 * c-tree.h (start_decl): Add argument.
2283 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2285 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
2287 (in_statement): New.
2288 (start_function): Adjust for above change.
2289 (c_push_function_context, c_pop_function_context): Likewise.
2290 * c-lang.h (struct language_function): Likewise.
2291 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
2292 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
2294 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
2295 (c_parser_switch_statement): Adjust break/switch context handling
2296 and calls to renamed functions.
2297 (c_parser_while_statement): Adjust break/switch context handling and
2299 (c_parser_do_statement): Ditto, with DO_STMT respectively.
2300 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
2301 (c_parser_omp_for_loop): Adjust break/switch context handling.
2302 * c-tree.h (c_break_label, c_cont_label): Delete.
2303 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
2304 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
2305 (in_statement, switch_statement_break_seen_p): Declare.
2306 (c_start_case, c_finish_case): Renamed to...
2307 (c_start_switch, c_finish_switch).
2308 (c_finish_bc_stmt): Adjust arguments.
2309 * c-typeck.c (build_function_call_vec): Don't try to print
2310 statements with %qE format.
2311 (struct c_switch): Rename switch_expr field to switch_stmt.
2312 Add break_stmt_seen_p field.
2313 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
2314 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
2315 (do_case): Update for changes to struct c_switch.
2316 (c_finish_case): Rename to c_finish_switch. Update for changes to
2317 struct c_switch and change of representation from SWITCH_EXPR to
2319 (c_finish_loop): Delete.
2320 (c_finish_bc_stmt): Update to reflect changes to break/continue
2321 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
2322 of a GOTO_EXPR except for objc foreach loops.
2324 2020-09-01 Jakub Jelinek <jakub@redhat.com>
2327 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
2330 2020-08-28 Martin Sebor <msebor@redhat.com>
2333 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
2336 2020-08-27 Martin Liska <mliska@suse.cz>
2338 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
2339 growth function to true.
2341 2020-08-25 Tobias Burnus <tobias@codesourcery.com>
2344 * c-typeck.c (handle_omp_array_sections_1): Talk about
2345 array function parameter in the error message.
2347 2020-08-18 Jakub Jelinek <jakub@redhat.com>
2350 * c-parser.c (c_parser_generic_selection): Change match_found from bool
2351 to int, holding index of the match. Call mark_exp_read on the selector
2352 expression and on expressions other than the selected one.
2354 2020-08-01 Richard Sandiford <richard.sandiford@arm.com>
2357 * c-typeck.c (process_init_element): Split test for whether to
2358 recurse into a record, union or array into...
2359 (initialize_elementwise_p): ...this new function. Don't recurse
2360 into a vector type if the initialization value is also a vector.
2362 2020-07-31 Richard Biener <rguenther@suse.de>
2365 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
2366 Define to c_common_finalize_early_debug.
2368 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
2370 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
2371 (c_parser_omp_critical): Permit hint(0) clause without named critical.
2372 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
2374 2020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
2377 * c-decl.c (finish_decl): Call target hook
2378 lower_local_decl_alignment to lower local decl alignment.
2380 2020-07-09 Julian Brown <julian@codesourcery.com>
2381 Thomas Schwinge <thomas@codesourcery.com>
2384 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
2385 for standalone attach/detach clauses.
2387 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
2389 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
2390 set, warn for conversion between pointers that point to incompatible
2391 scalar storage orders.
2393 2020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
2395 * c-parser.c (c_parser_statement_after_labels): Pass correct
2396 parameters to c_parser_do_statement.
2398 2020-06-16 Jakub Jelinek <jakub@redhat.com>
2400 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
2402 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
2403 premature c_fully_fold. Defer explicit c_fully_fold calls to after
2405 * c-tree.h (c_in_omp_for): Declare.
2406 * c-typeck.c (c_in_omp_for): Define.
2407 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
2408 (digest_init): Likewise.
2409 (build_binary_op): Likewise.
2411 2020-06-16 Jakub Jelinek <jakub@redhat.com>
2413 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
2414 from kind by comma rather than colon.
2416 2020-06-05 Mark Wielaard <mark@klomp.org>
2418 * c-decl.c (implicit_decl_warning): When warned and olddecl is
2419 an undeclared builtin, then add a fixit header hint, if found.
2420 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
2421 warning_at about implicit builtin declaration type mismatch.
2423 2020-06-03 Mark Wielaard <mark@klomp.org>
2425 * c-parser.c (struct c_parser): Add seen_string_literal
2427 (c_parser_consume_token): Reset seen_string_literal.
2428 (c_parser_error_richloc): Add name_hint if seen_string_literal
2429 and next token is a CPP_NAME and we have a missing header
2430 suggestion for the name.
2431 (c_parser_string_literal): Set seen_string_literal.
2433 2020-06-03 Mark Wielaard <mark@klomp.org>
2435 * c-parser.c (c_parser_postfix_expression_after_primary): Add
2436 scope with matching_parens after CPP_OPEN_PAREN.
2438 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
2440 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
2442 2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
2444 * Make-lang.in: Remove extra slash.
2446 2020-05-19 Martin Liska <mliska@suse.cz>
2448 * c-parser.c: Fix typo.
2450 2020-05-14 Jakub Jelinek <jakub@redhat.com>
2452 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
2454 2020-05-07 Richard Biener <rguenther@suse.de>
2457 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
2460 2020-04-30 Jakub Jelinek <jakub@redhat.com>
2463 * c-decl.c (set_labels_context_r): In addition to context-less
2464 LABEL_DECLs adjust also LABEL_DECLs with context equal to
2465 parent function if any.
2466 (store_parm_decls): Adjust comment.
2468 2020-04-19 Jakub Jelinek <jakub@redhat.com>
2471 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
2472 two CPP_COLON tokens.
2474 2020-04-17 Jakub Jelinek <jakub@redhat.com>
2477 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
2480 2020-04-15 Jakub Jelinek <jakub@redhat.com>
2483 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
2484 requires directive when not at file scope.
2486 2020-04-08 Tobias Burnus <tobias@codesourcery.com>
2489 * c-decl.c (c_check_in_current_scope): New function.
2490 * c-tree.h (c_check_in_current_scope): Declare it.
2491 * c-parser.c (c_parser_oacc_declare): Add check that variables
2492 are declared in the same scope as the directive. Fix handling
2495 2020-04-07 Jakub Jelinek <jakub@redhat.com>
2498 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
2499 if c_parser_omp_master succeeded.
2501 2020-03-23 Jakub Jelinek <jakub@redhat.com>
2503 PR gcov-profile/94029
2505 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
2506 the function_start_locus location. Don't do that afterwards for the
2507 __GIMPLE body parsing.
2509 2020-03-19 Jakub Jelinek <jakub@redhat.com>
2511 PR gcov-profile/94029
2512 * c-tree.h (finish_function): Add location_t argument defaulted to
2514 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
2515 set it to the locus of closing } if non-NULL.
2516 (c_parser_compound_statement_nostart): Return locus of closing }.
2517 (c_parser_parse_rtl_body): Likewise.
2518 (c_parser_declaration_or_fndef): Propagate locus of closing } to
2520 * c-decl.c (finish_function): Add end_loc argument, use it instead of
2521 input_location to set function_end_locus.
2523 2020-03-17 Jakub Jelinek <jakub@redhat.com>
2526 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
2527 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
2528 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
2529 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
2531 (finish_incomplete_vars): New function, moved from finish_struct. Use
2532 relayout_decl instead of layout_decl.
2533 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
2534 being TYPE_VFIELD. Use finish_incomplete_vars.
2535 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
2536 finish_incomplete_vars.
2537 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2538 also on ENUMERAL_TYPEs.
2540 2020-03-16 Jakub Jelinek <jakub@redhat.com>
2543 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
2545 2020-03-13 Martin Sebor <msebor@redhat.com>
2548 * c-decl.c (builtin_structptr_type_count): New constant.
2549 (match_builtin_function_types): Reject decls that are incompatible
2550 in types pointed to by pointers.
2551 (diagnose_mismatched_decls): Adjust comments.
2553 2020-03-05 Joseph Myers <joseph@codesourcery.com>
2556 * c-typeck.c (pop_init_level): Do not diagnose initializers as
2557 empty when initialized type is error_mark_node.
2558 (set_designator, process_init_element): Ignore initializers for
2559 elements of a variable-size type or of error_mark_node.
2561 2020-03-01 Martin Sebor <msebor@redhat.com>
2564 * c-decl.c (types_close_enough_to_match): New function.
2565 (match_builtin_function_types):
2566 (diagnose_mismatched_decls): Add missing inform call to a warning.
2568 2020-03-01 Martin Sebor <msebor@redhat.com>
2571 * c-typeck.c (build_functype_attribute_variant): New function.
2572 (composite_type): Call it.
2574 2020-02-25 Jakub Jelinek <jakub@redhat.com>
2577 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
2578 Rename last argument from probablity to probability.
2580 2020-02-13 Jakub Jelinek <jakub@redhat.com>
2583 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
2584 *expr if it has side effects.
2586 2020-01-30 Jeff Law <law@redhat.com>
2589 * c-parser.c (c_parser_switch_statement): Make sure to request
2590 marking the switch expr as used.
2592 2020-01-22 Joseph Myers <joseph@codesourcery.com>
2595 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
2596 argument with integer operands.
2598 2020-01-16 Kerem Kat <keremkat@gmail.com>
2601 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
2602 to support 4 available tokens.
2604 2020-01-15 Joseph Myers <joseph@codesourcery.com>
2607 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
2608 determine whether to set DECL_CONTEXT.
2610 2020-01-13 Joseph Myers <joseph@codesourcery.com>
2613 * c-typeck.c (build_c_cast): Check for expressions with integer
2614 operands that can occur in an unevaluated part of an integer
2615 constant expression and call note_integer_operands as needed.
2617 2019-01-08 Richard Biener <rguenther@suse.de>
2620 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
2623 2020-01-01 Jakub Jelinek <jakub@redhat.com>
2625 Update copyright years.
2627 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
2629 * c-decl.c (collect_source_ref_cb): Delete.
2630 (for_each_global_decl): Rename into...
2631 (collect_source_refs): ...this. Call collect_source_ref directly.
2632 (c_parse_final_cleanups): Always call collect_source_ref on the main
2635 2019-12-19 Julian Brown <julian@codesourcery.com>
2636 Cesar Philippidis <cesar@codesourcery.com>
2638 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
2640 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
2641 Allow deref (->) in variable lists if true.
2642 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
2643 Pass to c_parser_omp_variable_list.
2644 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
2645 call to c_parser_omp_variable_list.
2646 (c_parser_oacc_all_clauses): Support attach and detach clauses.
2647 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
2648 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
2649 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
2650 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
2651 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
2652 and detach. Support deref.
2653 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
2654 GOMP_MAP_ALWAYS_POINTER for OpenACC.
2655 (c_oacc_check_attachments): New function.
2656 (c_finish_omp_clauses): Check attach/detach arguments for being
2657 pointers using above. Support deref.
2659 2019-12-19 Julian Brown <julian@codesourcery.com>
2660 Maciej W. Rozycki <macro@codesourcery.com>
2661 Tobias Burnus <tobias@codesourcery.com>
2662 Thomas Schwinge <thomas@codesourcery.com>
2664 * c-parser.c (c_parser_omp_clause_name): Support no_create.
2665 (c_parser_oacc_data_clause): Likewise.
2666 (c_parser_oacc_all_clauses): Likewise.
2667 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2668 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
2669 PRAGMA_OACC_CLAUSE_NO_CREATE.
2670 * c-typeck.c (handle_omp_array_sections): Support
2673 2019-12-09 David Malcolm <dmalcolm@redhat.com>
2675 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2676 Replace label_text ctor calls.
2678 2019-12-04 Joseph Myers <joseph@codesourcery.com>
2682 * c-typeck.c (convert_lvalue_to_rvalue): Call
2683 require_complete_type for arguments not of void types.
2684 (build_indirect_ref): Do not diagnose dereferencing pointers to
2686 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
2688 2019-12-03 Joseph Myers <joseph@codesourcery.com>
2691 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
2692 old-style parameter definitions.
2694 2019-12-01 Sandra Loosemore <sandra@codesourcery.com>
2698 * c-decl.c (flexible_array_type_p): Move to common code.
2700 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
2702 * c-decl.c (start_decl): Allow initialization of variables whose
2703 size is a POLY_INT_CST.
2704 (finish_decl): Use verify_type_context to check whether the target
2705 allows variables with a particular type to have static or thread-local
2706 storage duration. Don't raise a second error if such variables do
2707 not have a constant size.
2708 (grokdeclarator): Use verify_type_context to check whether the
2709 target allows fields or array elements to have a particular type.
2710 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
2711 the target allows pointer difference for the types involved.
2712 (build_unary_op): Likewise for pointer increment and decrement.
2714 2019-11-29 Joseph Myers <joseph@codesourcery.com>
2716 * c-parser.c (struct c_parser): Add members raw_tokens and
2718 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
2719 using previously-lexed raw tokens.
2720 (c_parser_peek_nth_token_raw)
2721 (c_parser_check_balanced_raw_token_sequence): New functions.
2722 (c_parser_nth_token_starts_std_attributes): Use
2723 c_parser_check_balanced_raw_token_sequence for Objective-C.
2725 2019-11-25 Joseph Myers <joseph@codesourcery.com>
2728 * c-decl.c (finish_declspecs): Use int instead of decimal
2729 floating-point types if decimal floating-point not supported.
2731 2019-11-25 Joseph Myers <joseph@codesourcery.com>
2733 * c-tree.h (struct c_declarator): Use a structure for id member.
2734 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
2735 declarators at the start, not when handling individual declarators
2736 later. Use u.id.id instead of u.id.
2737 (grokfield): Use u.id.id instead of u.id.
2738 (build_id_declarator): Set u.id.id and u.id.attrs.
2739 (finish_declspecs): Handle postfix attributes in case of typedef
2740 name or typeof used.
2741 * c-parser.c (c_parser_direct_declarator)
2742 (c_parser_direct_declarator_inner): Place declarator for
2743 attributes inside that for function or array, not outside. Set
2744 u.id.attrs for identifiers.
2745 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
2746 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
2749 2019-11-22 Jakub Jelinek <jakub@redhat.com>
2752 * c-decl.c (identifier_global_tag): Define.
2754 2019-11-20 Richard Biener <rguenther@suse.de>
2757 * c-decl.c (grokdeclarator): Prevent inlining of nested
2758 function with VLA arguments.
2760 2019-11-20 Joseph Myers <joseph@codesourcery.com>
2762 * c-decl.c (c_warn_type_attributes): New function.
2763 (groktypename, grokdeclarator, finish_declspecs): Call
2764 c_warn_type_attributes before applying attributes to types.
2765 * c-tree.h (c_warn_type_attributes): Declare.
2767 2019-11-19 Joseph Myers <joseph@codesourcery.com>
2769 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
2770 standard attributes.
2771 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
2772 pedwarn for unknown standard attributes and return error_mark_node
2775 2019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
2777 * c-parser.c (c_parser_parse_rtl_body): Always call
2778 run_rtl_passes, even if startwith pass is not provided.
2780 2019-11-15 Joseph Myers <joseph@codesourcery.com>
2782 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
2783 duplicate standard attributes.
2785 2019-11-15 Joseph Myers <joseph@codesourcery.com>
2787 * c-decl.c (std_attribute_table): Add maybe_unused.
2789 2019-11-15 Joseph Myers <joseph@codesourcery.com>
2791 * c-decl.c (std_attribute_table): Add fallthrough.
2792 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
2793 attribute at top level.
2795 2019-11-15 Joseph Myers <joseph@codesourcery.com>
2797 * c-decl.c (std_attribute_table): New.
2798 (c_init_decl_processing): Register attributes from
2799 std_attribute_table.
2800 * c-parser.c (c_parser_attribute_arguments): Add arguments
2801 require_string and allow_empty_args. All callers changed.
2802 (c_parser_std_attribute): Set require_string argument for
2803 "deprecated" attribute.
2805 2019-11-14 Joseph Myers <joseph@codesourcery.com>
2807 * c-parser.c (c_parser_postfix_expression)
2808 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
2809 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
2811 2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
2813 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
2814 of build_same_sized_truth_vector_type.
2815 (build_vec_cmp): Likewise.
2817 2019-11-14 Jakub Jelinek <jakub@redhat.com>
2819 * c-parser.c (c_parser_omp_context_selector): Don't require score
2820 argument to fit into shwi, just to be INTEGER_CST. Diagnose
2823 * c-parser.c (c_parser_omp_context_selector): Rename
2824 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
2825 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
2826 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
2827 and string literals.
2829 2019-11-14 Joseph Myers <joseph@codesourcery.com>
2831 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
2832 ctsk_tagfirstref_attrs.
2833 (struct c_declspecs): Update description of attrs. Add
2834 postfix_attrs and non_std_attrs_seen_p. Increase size of
2835 typespec_kind bit-field.
2836 (c_warn_unused_attributes): New declaration.
2837 (parser_xref_tag): Update prototype.
2838 * c-decl.c (c_warn_unused_attributes): New function.
2839 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
2840 ctsk_tagref_attrs. Handle attribute declarations.
2841 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
2842 (grokdeclarator): Handle standard attributes.
2843 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
2844 attributes to incomplete type reference.
2845 (xref_tag): Update call to parser_xref_tag.
2846 (declspecs_add_addrspace, declspecs_add_type)
2847 (declspecs_add_scspec, declspecs_add_attrs): Set
2848 non_std_attrs_seen_p.
2849 (finish_declspecs): Apply postfix standard attributes to type.
2850 * c-parser.c (c_token_starts_declspecs)
2851 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
2852 (c_parser_next_tokens_start_declaration): Update comments.
2853 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
2854 parser->tokens[2] to parser->tokens[1].
2855 (c_parser_nth_token_starts_std_attributes)
2856 (c_parser_std_attribute_specifier_sequence): New functions.
2857 (c_parser_declaration_or_fndef): Add arguments have_attrs and
2858 attrs. All callers changed. Handle standard attributes.
2859 (c_parser_parms_declarator, c_parser_parms_list_declarator)
2860 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
2861 All callers changed.
2862 (c_parser_declspecs): Add arguments start_std_attr_ok and
2863 end_std_attr_ok. All callers changed. Handle standard
2865 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
2866 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
2867 (c_parser_compound_statement_nostart, c_parser_all_labels)
2868 (c_parser_label, c_parser_statement, c_parser_for_statement):
2869 Handle standard attributes.
2870 * c-parser.h (c_parser_declspecs): Update prototype.
2871 * gimple-parser.c (c_parser_gimple_declaration): Update call to
2874 2019-11-12 Martin Liska <mliska@suse.cz>
2876 * gimple-parser.c: Do not include params.h.
2878 2019-11-12 Martin Liska <mliska@suse.cz>
2880 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
2881 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
2884 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
2885 Frederik Harwath <frederik@codesourcery.com>
2888 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
2889 (c_parser_oacc_kernels_parallel): Rename function to...
2890 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
2891 (c_parser_omp_construct): Update accordingly.
2894 2019-11-11 Jakub Jelinek <jakub@redhat.com>
2896 * c-parser.c (c_parser_translation_unit): Diagnose declare target
2897 without corresponding end declare target.
2899 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
2901 * c-convert.c (convert): Only handle vector conversions if one of
2902 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
2904 * c-typeck.c (build_array_ref): Only allow vector indexing if the
2905 vectors satisfy gnu_vector_type_p.
2906 (build_unary_op): Only allow unary operators to be applied to
2907 vectors if they satisfy gnu_vector_type_p.
2908 (digest_init): Only allow by-element initialization of vectors
2909 if they satisfy gnu_vector_type_p.
2910 (really_start_incremental_init): Likewise.
2911 (push_init_level): Likewise.
2912 (pop_init_level): Likewise.
2913 (process_init_element): Likewise.
2914 (build_binary_op): Only allow binary operators to be applied to
2915 vectors if they satisfy gnu_vector_type_p.
2917 2019-11-08 Joseph Myers <joseph@codesourcery.com>
2919 * c-decl.c (grokparms): Convert () in a function definition to
2921 (store_parm_decls_oldstyle): Pedwarn for C2x.
2922 (store_parm_decls): Update comment about () not generating a
2925 2019-11-07 Joseph Myers <joseph@codesourcery.com>
2927 * c-parser.c (c_parser_attribute_arguments): New function.
2928 Factored out of c_parser_gnu_attribute.
2929 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
2930 (c_parser_balanced_token_sequence, c_parser_std_attribute)
2931 (c_parser_std_attribute_specifier): New functions.
2932 (c_parser_transaction_attributes): Use
2933 c_parser_std_attribute_specifier.
2935 2019-11-07 Joseph Myers <joseph@codesourcery.com>
2937 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
2938 lex_joined_string and translate_strings_p.
2939 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
2941 (c_parser_string_literal): New function.
2942 (c_parser_static_assert_declaration_no_semi): Use
2943 c_parser_string_literal. Do not set lex_untranslated_string.
2944 (c_parser_asm_string_literal): Use c_parser_string_literal.
2945 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
2946 (c_parser_gnu_attributes): Set and restore translate_strings_p
2947 instead of lex_untranslated_string.
2948 (c_parser_asm_statement): Do not set lex_untranslated_string.
2949 (c_parser_asm_operands): Likewise.
2950 (c_parser_has_attribute_expression): Set and restore
2951 translate_strings_p instead of lex_untranslated_string.
2952 (c_parser_postfix_expression): Use c_parser_string_literal.
2953 (pragma_lex): Likewise.
2954 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
2955 (c_parse_file): Set translate_strings_p.
2956 * gimple-parser.c (c_parser_gimple_postfix_expression)
2957 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
2958 * c-parser.c (c_parser_string_literal): Declare function.
2960 2019-11-02 Jakub Jelinek <jakub@redhat.com>
2962 * c-parser.c (c_finish_omp_declare_variant): Use
2963 omp_get_context_selector instead of c_omp_get_context_selector.
2965 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
2967 * c-tree.h (c_simulate_enum_decl): Declare.
2968 * c-decl.c (c_simulate_enum_decl): New function.
2969 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
2971 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
2973 * c-tree.h (c_simulate_builtin_function_decl): Declare.
2974 * c-decl.c (c_simulate_builtin_function_decl): New function.
2975 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
2978 2019-10-28 Martin Sebor <msebor@redhat.com>
2981 * c-decl.c (names_builtin_p): Define a new function.
2983 2019-10-28 Richard Biener <rguenther@suse.de>
2986 * gimple-parser.c (c_parser_parse_gimple_body): Make
2987 current_bb the entry block initially to easier recover
2989 (c_parser_gimple_compound_statement): Adjust.
2991 2019-10-24 Jakub Jelinek <jakub@redhat.com>
2993 * c-parser.c (c_finish_omp_declare_variant): Use
2994 omp_context_selector_matches instead of
2995 c_omp_context_selector_matches.
2996 * c-decl.c (c_decl_attributes): Add "omp declare target block"
2997 attribute in between declare target and end declare target
3000 2019-10-15 Joseph Myers <joseph@codesourcery.com>
3002 * c-parser.c (c_parser_attribute_any_word): Rename to
3003 c_parser_gnu_attribute_any_word. All callers changed.
3004 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
3006 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
3008 (c_parser_declaration_or_fndef, c_parser_declspecs)
3009 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
3010 (c_parser_struct_declaration, c_parser_declarator)
3011 (c_parser_gnu_attribute, c_parser_compound_statement)
3012 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
3013 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
3014 attribute-related syntax productions.
3016 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
3018 * c-objc-common.c (useful_aka_type_p): Replace with...
3019 (get_aka_type): ...this new function. Given the original type,
3020 decide which aka type to print (if any). Only look through typedefs
3021 if user_facing_original_type_p.
3022 (print_type): Update accordingly.
3024 2019-10-14 Jakub Jelinek <jakub@redhat.com>
3026 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
3027 into int NESTED, if it is 2, diagnose missing commas in between
3029 (c_parser_omp_context_selector): Pass 2 as last argument to
3030 c_parser_omp_all_clauses.
3032 2019-10-12 Jakub Jelinek <jakub@redhat.com>
3034 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
3035 For simd properties, put them directly into TREE_VALUE.
3036 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
3037 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
3038 add "omp declare variant base" attribute rather than
3039 "omp declare variant".
3041 2019-10-11 Joseph Myers <joseph@codesourcery.com>
3043 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
3045 2019-10-10 Jakub Jelinek <jakub@redhat.com>
3047 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
3048 true, terminate processing on closing paren and don't skip to end of
3050 (c_parser_omp_declare_simd): Handle also declare variant.
3051 (omp_construct_selectors, omp_device_selectors,
3052 omp_implementation_selectors, omp_user_selectors): New variables.
3053 (c_parser_omp_context_selector,
3054 c_parser_omp_context_selector_specification,
3055 c_finish_omp_declare_variant): New functions.
3056 (c_finish_omp_declare_simd): Handle both declare simd and
3058 (c_parser_omp_declare): Handle declare variant.
3060 2019-10-02 Joseph Myers <joseph@codesourcery.com>
3062 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
3065 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
3067 * c-objc-common.c (useful_aka_type_p): New function.
3068 (print_type): Use it to decide whether an aka type is worth printing.
3070 2019-09-27 Jakub Jelinek <jakub@redhat.com>
3073 * c-parser.c (c_parser_predefined_identifier): New function.
3074 (c_parser_postfix_expression): Use it.
3075 (c_parser_omp_variable_list): Parse predefined identifiers.
3076 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
3077 in shared and firstprivate clauses, even when they are predetermined
3080 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
3082 * c-typeck.c (build_function_call_vec): Take the original function
3083 decl as an optional final parameter. Pass all built-in calls to
3084 check_builtin_function_arguments.
3086 2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
3089 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
3090 of identifiers in the external scope only for variables and functions.
3092 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3095 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
3097 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
3100 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
3101 after determining that the first token is not
3102 PRAGMA_GCC_PCH_PREPROCESS.
3104 2019-08-22 Eric Botcazou <ebotcazou@adacore.com>
3106 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
3107 FUNCTION_DECL to the right value in the presence of nested declarators.
3109 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3112 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
3114 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3117 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
3118 of a built_in_function.
3119 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
3121 2019-08-10 Jakub Jelinek <jakub@redhat.com>
3123 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
3124 (c_parser_omp_clause_device_type): New function.
3125 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3126 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3127 (c_parser_omp_declare_target): Handle device_type clauses. Remove
3128 diagnostics for declare target with clauses nested in clause-less
3129 declare target declaration-definition-seq.
3130 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
3132 2019-08-09 Jakub Jelinek <jakub@redhat.com>
3134 * c-parser.c (check_no_duplicate_clause): Simplify using
3136 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
3137 directive name modifiers.
3138 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
3141 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
3142 check_no_duplicate_clause call. Comment it out, instead emit a
3143 warning for duplicate dist_schedule clauses.
3145 2019-08-08 Richard Sandiford <richard.sandiford@arm.com>
3147 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
3149 2019-08-08 Jakub Jelinek <jakub@redhat.com>
3151 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
3152 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
3153 instead of generic_head to track duplicates.
3155 2019-08-07 Jakub Jelinek <jakub@redhat.com>
3157 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
3158 (c_parser_omp_clause_use_device_addr): New function.
3159 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
3160 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
3161 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
3162 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
3163 map or use_device_* clauses.
3164 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
3165 in OpenMP, require pointer type rather than pointer or array type.
3166 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
3168 2019-07-31 Jakub Jelinek <jakub@redhat.com>
3171 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
3172 even if finish is UNKNOWN_LOCATION, just use start as finish in that
3175 2019-07-25 Martin Liska <mliska@suse.cz>
3176 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
3179 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
3181 2019-07-25 Martin Liska <mliska@suse.cz>
3183 * c-decl.c (merge_decls): Use new macros
3184 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
3186 2019-07-23 Richard Biener <rguenther@suse.de>
3188 PR tree-optimization/83518
3189 * gimple-parser.c (c_parser_parse_gimple_body): When we have
3190 a CFG also rebuild cgraph edges.
3192 2019-07-20 Jakub Jelinek <jakub@redhat.com>
3194 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
3195 (c_parser_omp_clause_bind): New function.
3196 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
3197 (OMP_LOOP_CLAUSE_MASK): Define.
3198 (c_parser_omp_loop): New function.
3199 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
3200 loop combined with parallel or teams.
3201 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
3202 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
3204 2019-07-18 Richard Sandiford <richard.sandiford@arm.com>
3207 * c-decl.c (finish_function): Check targetm.warn_func_return
3208 before issuing a -Wreturn-type warning.
3210 2019-07-12 Alexandre Oliva <oliva@adacore.com>
3212 * gimple-parser.c (c_parser_gimple_try_stmt): New.
3213 (c_parser_compound_statement): Call it.
3215 2019-07-12 Jakub Jelinek <jakub@redhat.com>
3217 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
3218 (c_parser_omp_clause_order): New function.
3219 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
3220 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
3221 PRAGMA_OMP_CLAUSE_ORDER.
3222 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
3224 2019-07-10 Richard Biener <rguenther@suse.de>
3226 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
3227 _Literal (int *) &x for address literals.
3229 2019-07-09 Martin Sebor <msebor@redhat.com>
3232 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
3234 (field_decl_cmp): Same.
3235 * c-parser.c (c_parser_struct_or_union_specifier): Same.
3237 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
3239 2019-07-09 Martin Sebor <msebor@redhat.com>
3242 * c-decl.c: Change class-key from class to struct and vice versa
3243 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
3244 * gimple-parser.c: Same.
3246 2019-07-01 Richard Biener <rguenther@suse.de>
3248 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3249 _Literal (char *) &"foo" for address literals pointing to
3252 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3254 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
3255 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
3256 C incompatibility if alternate "__intN__" form is used.
3258 2019-06-24 Martin Sebor <msebor@redhat.com>
3260 * c-typeck.c (build_binary_op): Hyphenate floating-point.
3262 2019-06-10 Jakub Jelinek <jakub@redhat.com>
3264 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
3265 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
3266 (c_parser_omp_scan_loop_body): New function.
3267 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
3268 inscan reduction clauses.
3269 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
3270 non-inscan reductions on the same construct, or inscan reductions with
3271 ordered or schedule clauses, or inscan array reductions.
3273 2019-06-05 Martin Sebor <msebor@redhat.com>
3276 * c-typeck.c (c_finish_return): Only consider functions returning
3277 pointers as candidates for -Wreturn-local-addr.
3279 2019-06-05 Martin Sebor <msebor@redhat.com>
3281 * c-decl.c (start_decl): Adjust quoting and hyphenation
3283 (finish_decl): Same.
3284 (finish_enum): Same.
3285 (start_function): Same.
3286 (declspecs_add_type): Same.
3287 * c-parser.c (warn_for_abs): Same.
3288 * c-typeck.c (build_binary_op): Same.
3290 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
3293 * c-parser.c (c_finish_oacc_routine): Rework checking if already
3294 marked with an OpenACC 'routine' directive.
3297 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
3298 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
3301 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
3302 clauses from "omp declare target" attribute.
3304 2019-05-16 Martin Sebor <msebor@redhat.com>
3306 * c-decl.c (start_decl): Quote keywords, operators, and
3307 types in diagnostics.
3308 (finish_decl): Same.
3309 * c-parser.c (c_parser_asm_statement): Same.
3310 (c_parser_conditional_expression): Same.
3311 (c_parser_transaction_cancel): Same.
3312 * c-typeck.c (c_common_type): Same.
3313 (build_conditional_expr): Same.
3314 (digest_init): Same.
3315 (process_init_element): Same.
3316 (build_binary_op): Same.
3318 2019-05-17 Richard Biener <rguenther@suse.de>
3320 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
3321 (c_parser_gimple_unary_expression): Likewise.
3322 (c_parser_gimple_parentized_ternary_expression): New function.
3324 2019-05-16 Richard Biener <rguenther@suse.de>
3326 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
3327 (c_parser_gimple_unary_expression): Likewise.
3329 2019-05-15 Richard Biener <rguenther@suse.de>
3331 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3334 2019-05-14 Richard Biener <rguenther@suse.de>
3336 * gimple-parser.c (c_parser_gimple_statement): Remove
3337 questionable auto-promotion to VIEW_CONVERT_EXPR.
3338 (c_parser_gimple_typespec): Split out from __MEM parsing.
3339 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
3340 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
3341 as __VIEW_CONVERT with -gimple.
3343 2019-05-09 Martin Liska <mliska@suse.cz>
3345 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
3347 (c_parser_gimple_unary_expression): Parse also binary expression
3349 (c_parser_gimple_parentized_binary_expression): New function.
3351 2019-05-09 Martin Liska <mliska@suse.cz>
3353 * gimple-parser.c (struct gimple_parser): Add probability.
3354 for gimple_parser_edge.
3355 (gimple_parser::push_edge): Add new argument probability.
3356 (c_parser_gimple_parse_bb_spec): Parse also probability
3358 (c_parser_parse_gimple_body): Set edge probability.
3359 (c_parser_gimple_compound_statement): Consume token
3360 before calling c_parser_gimple_goto_stmt.
3362 (c_parser_gimple_statement): Pass new argument.
3363 (c_parser_gimple_goto_stmt): Likewise.
3364 (c_parser_gimple_if_stmt): Likewise.
3365 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
3366 * c-parser.c (c_parser_declaration_or_fndef): Pass
3367 hot_bb_threshold argument.
3368 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
3370 (c_parser_gimple_parse_bb_spec_edge_probability): New.
3372 2019-04-26 Jakub Jelinek <jakub@redhat.com>
3375 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
3376 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
3377 (c_parser_do_statement): Likewise.
3378 (c_parser_for_statement): Likewise. Formatting fixes.
3379 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
3380 emit DEBUG_BEGIN_STMTs if needed.
3382 2019-04-19 Jakub Jelinek <jakub@redhat.com>
3385 * c-typeck.c (struct c_switch): Remove outside_range_p member.
3386 (c_start_case): Don't clear it.
3387 (do_case): Adjust c_add_case_label caller.
3388 (c_finish_case): Adjust c_do_switch_warnings caller.
3391 * c-decl.c (merge_decls): If remove is main variant and
3392 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
3393 variant that has newdecl as TYPE_NAME if any.
3395 2019-04-12 Jakub Jelinek <jakub@redhat.com>
3398 * c-decl.c (merge_decls): When newdecl's type is its main variant,
3399 don't try to remove it from the variant list, but instead assert
3402 2019-04-01 Richard Biener <rguenther@suse.de>
3405 * c-tree.h (c_get_alias_set): Declare.
3406 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
3407 * c-objc-common.c (c_get_alias_set): Treat enumeral types
3408 as the underlying integer type.
3410 2019-03-19 Martin Sebor <msebor@redhat.com>
3412 PR tree-optimization/89688
3413 * c-decl.c (finish_decl): Call braced_lists_to_string for more
3414 kinds of initializers.
3416 2019-03-19 Jakub Jelinek <jakub@redhat.com>
3419 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
3420 return type even if quals_used is 0. Formatting fixes.
3422 2019-03-14 Richard Biener <rguenther@suse.de>
3424 * c-tree.h (enum c_declspec_il): New.
3425 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
3427 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
3428 Pass start pass and declspec_il to c_parser_parse_gimple_body.
3429 (c_parser_declspecs): Adjust.
3430 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
3431 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
3433 (struct gimple_parser): New.
3434 (gimple_parser::push_edge): New method.
3435 (c_parser_gimple_parse_bb_spec): New helper.
3436 (c_parser_parse_gimple_body): Get start pass and IL specification.
3437 Initialize SSA and CFG.
3438 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
3439 Build a gimple_parser parsing state and pass it along.
3440 (c_parser_gimple_statement): Change intermittend __PHI internal
3441 function argument for the edge.
3442 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
3443 (c_parser_gimple_goto_stmt): Record edges to build.
3444 (c_parser_gimple_if_stmt): Likewise.
3445 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
3446 (c_parser_gimple_or_rtl_pass_list): Likewise.
3448 2019-03-11 Martin Liska <mliska@suse.cz>
3450 * c-decl.c (check_for_loop_decls): Wrap an option name
3451 in a string format message and fix GNU coding style.
3452 * c-parser.c (c_parser_declspecs): Likewise.
3454 2019-03-08 Jakub Jelinek <jakub@redhat.com>
3456 PR tree-optimization/89550
3457 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
3459 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
3460 or warning returned true.
3462 2019-02-28 Jakub Jelinek <jakub@redhat.com>
3465 * c-typeck.c (convert_arguments): Call inform_declaration only if
3466 the previous warning_at call returned true.
3468 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
3470 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
3471 parameter. Adjust all users.
3472 (c_parser_oacc_simple_clause): Replace parser with loc formal
3473 parameter. Adjust all users.
3475 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
3478 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
3479 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
3481 2019-02-15 Jakub Jelinek <jakub@redhat.com>
3484 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
3485 before c_decl_attributes rather than after it.
3487 2019-02-06 Jakub Jelinek <jakub@redhat.com>
3490 * c-parser.c (c_parser_declaration_or_fndef): Don't update
3491 DECL_ARGUMENTS of d if it has been defined already. Use a single if
3492 instead of 3 nested ifs.
3494 2019-02-06 Joseph Myers <joseph@codesourcery.com>
3497 * c-decl.c (finish_decl): Do not complete array types for arrays
3498 with external linkage not at file scope.
3500 2019-02-05 Richard Biener <rguenther@suse.de>
3503 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
3504 all type variants when not supported.
3506 2019-01-30 Jakub Jelinek <jakub@redhat.com>
3509 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
3510 * c-decl.c (decl_jump_unsafe): Return false for
3511 C_DECL_COMPOUND_LITERAL_P decls.
3512 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
3514 2019-01-29 Jakub Jelinek <jakub@redhat.com>
3517 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
3521 * c-decl.c (last_fileptr_type): Remove.
3522 (last_structptr_types): New variable.
3523 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
3524 {old,new}rettype instead of the types themselves. Assert
3525 last_structptr_types array has the same number of elements
3526 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
3527 argument oldtype and newtype. Instead of handling
3528 just fileptr_type_node specially, handle all builtin_structptr_types
3529 pointer nodes. Formatting fix.
3531 2019-01-24 Martin Sebor <msebor@redhat.com>
3536 * c-decl.c (match_builtin_function_types): Add arguments.
3537 (diagnose_mismatched_decls): Diagnose mismatched declarations
3538 of built-ins more strictly.
3540 2019-01-24 Jakub Jelinek <jakub@redhat.com>
3543 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
3544 on #pragma omp cancel with different modifiers.
3546 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
3550 * c-typeck.c (convert_for_assignment): Upate the
3551 warn_for_address_or_pointer_of_packed_member call.
3553 2019-01-16 Tom Honermann <tom@honermann.net>
3554 Jason Merrill <jason@redhat.com>
3556 * c-typeck.c (digest_init): Revised the error message produced for
3557 ill-formed cases of array initialization with a string literal.
3558 (error_init): Make variadic.
3560 2019-01-12 Jakub Jelinek <jakub@redhat.com>
3562 * c-typeck.c (convert_for_assignment): Fix a comment typo.
3564 2019-01-07 Jakub Jelinek <jakub@redhat.com>
3567 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
3568 if current_function_decl is non-NULL.
3570 2019-01-07 Joseph Myers <joseph@codesourcery.com>
3574 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
3575 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
3576 functions declared but never defined only for external scope, not
3579 2019-01-07 Jakub Jelinek <jakub@redhat.com>
3582 * c-parser.c (c_parser_postfix_expression): Parse
3583 __builtin_convertvector.
3585 2019-01-01 Jakub Jelinek <jakub@redhat.com>
3587 Update copyright years.
3589 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
3592 * c-typeck.c (convert_for_assignment): Call
3593 warn_for_address_or_pointer_of_packed_member.
3595 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3597 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
3598 a more specific error message (instead of just falling through).
3600 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3602 * c-parser.c (c_parser_asm_statement): Keep track of the location each
3603 asm qualifier is first seen; use that to give nicer "duplicate asm
3604 qualifier" messages. Delete 'quals" variable, instead pass the
3605 "is_volatile_ flag to build_asm_stmt directly.
3606 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
3607 * c-typeck.c (build_asm_stmt): Ditto; adjust.
3609 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3611 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
3612 "done" boolean variable.
3614 2018-12-19 David Malcolm <dmalcolm@redhat.com>
3617 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
3618 Move from here to gcc-rich-location.h and gcc-rich-location.c.
3619 (build_binary_op): Use struct op_location_t and
3620 class binary_op_rich_location.
3622 2018-12-11 Jakub Jelinek <jakub@redhat.com>
3625 * c-convert.c (convert): Call c_fully_fold before calling
3626 ubsan_instrument_float_cast.
3628 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
3630 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
3633 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
3635 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
3636 after asm. Pass a flag for it to build_asm_expr.
3637 * c-tree.h (build_asm_expr): Update declaration.
3638 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
3641 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
3644 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
3645 combination of volatile and goto, in any order, without repetitions.
3647 2018-12-04 James Norris <jnorris@codesourcery.com>
3648 Cesar Philippidis <cesar@codesourcery.com>
3649 Julian Brown <julian@codesourcery.com>
3651 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
3654 2018-11-30 Richard Biener <rguenther@suse.de>
3656 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3657 _Literal (type) { ... } as empty aggregate or vector constructor.
3659 2018-11-29 Martin Sebor <msebor@redhat.com>
3662 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
3663 (convert_arguments): Add comments. Pass additional argument to
3666 2018-11-29 Martin Sebor <msebor@redhat.com>
3670 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
3672 2018-11-23 Martin Sebor <msebor@redhat.com>
3675 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
3676 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
3678 2018-11-20 Martin Sebor <msebor@redhat.com>
3680 * c-parser.c (c_parser_has_attribute_expression): New function.
3681 (c_parser_attribute): New function.
3682 (c_parser_attributes): Move code into c_parser_attribute.
3683 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
3685 2018-11-15 Martin Sebor <msebor@redhat.com>
3688 * c-decl.c (header_for_builtin_fn): Declare.
3689 (diagnose_mismatched_decls): Diagnose declarations of built-in
3690 functions without a prototype.
3691 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
3692 (convert_argument): Same.
3693 (convert_arguments): Factor code out into convert_argument.
3694 Detect mismatches between built-in formal arguments in calls
3695 to built-in without prototype.
3696 (build_conditional_expr): Same.
3697 (type_or_builtin_type): New function.
3698 (convert_for_assignment): Add argument. Conditionally issue
3699 warnings instead of errors for mismatches.
3701 2018-11-13 David Malcolm <dmalcolm@redhat.com>
3703 * c-decl.c: Replace "source_location" with "location_t".
3704 * c-tree.h: Likewise.
3705 * c-typeck.c: Likewise.
3706 * gimple-parser.c: Likewise.
3708 2018-11-09 Jakub Jelinek <jakub@redhat.com>
3710 * c-parser.c (c_parser_omp_clause_final): Use
3711 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
3712 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
3713 parsing instead of c_parser_paren_condition.
3714 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
3715 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
3716 c_fully_fold instead of c_parser_condition.
3717 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
3718 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
3719 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
3720 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
3721 c_parser_expr_no_commas instead of c_parser_expression.
3723 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
3724 reduction clause with inscan modifier.
3726 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
3727 clauses other than atomic_default_mem_order.
3729 2018-11-08 Jakub Jelinek <jakub@redhat.com>
3731 * c-parser.c: Include memmode.h.
3732 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
3733 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
3734 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
3735 task_reduction clauses.
3736 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
3737 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
3738 section, or lvalue assignment expression.
3739 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
3740 (c_parser_omp_clause_lastprivate): Parse optional
3741 conditional: modifier.
3742 (c_parser_omp_clause_hint): Require constant integer expression rather
3743 than just integer expression.
3744 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
3746 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
3747 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
3748 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
3750 (c_parser_omp_clause_depend): Parse iterator modifier and handle
3751 iterators. Parse mutexinoutset and depobj kinds.
3752 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
3754 (c_parser_omp_all_clauses): Likewise. Handle
3755 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
3756 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
3757 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
3758 default memory order from requires directive if any. Adjust
3759 c_finish_omp_atomic caller.
3760 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
3761 (c_parser_omp_flush): Parse flush with memory-order-clause.
3762 (c_parser_omp_for_loop): Allow NE_EXPR even in
3763 OpenMP loops, adjust c_finish_omp_for caller.
3764 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
3765 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
3766 Allow to be called while parsing combined parallel master.
3767 Parse combined master taskloop{, simd}.
3768 (c_parser_omp_parallel): Parse combined
3769 parallel master{, taskloop{, simd}} constructs.
3770 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
3771 (OMP_TASKGROUP_CLAUSE_MASK): Define.
3772 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
3773 (OMP_TASKWAIT_CLAUSE_MASK): Define.
3774 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
3775 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
3776 around teams body. Use SET_EXPR_LOCATION.
3777 (c_parser_omp_target_data): Allow target data
3778 with only use_device_ptr clauses.
3779 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
3780 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
3781 (c_parser_omp_requires): New function.
3782 (c_finish_taskloop_clauses): New function.
3783 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
3784 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
3785 declaration. Disallow in_reduction clause when combined with parallel
3787 (c_parser_omp_construct): Adjust c_parser_omp_master and
3788 c_parser_omp_taskgroup callers.
3789 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
3791 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
3792 like OMP_CLAUSE_REDUCTION.
3793 (handle_omp_array_sections): Likewise. Call save_expr on array
3794 reductions before calling build_index_type. Handle depend clauses
3796 (struct c_find_omp_var_s): New type.
3797 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
3798 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
3799 with static, runtime or auto schedule kinds. Call save_expr for whole
3800 array reduction sizes. Diagnose reductions with zero sized elements
3801 or variable length structures. Diagnose nogroup clause used with
3802 reduction clause(s). Handle depend clause with
3803 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
3804 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
3805 some different type for other kinds. Use build_unary_op with
3806 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
3807 Handle depend clauses with iterators. Remove no longer needed special
3808 case that predetermined const qualified vars may be specified in
3809 firstprivate clause. Complain if const qualified vars are mentioned
3810 in data-sharing clauses other than firstprivate or shared. Use
3811 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
3812 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
3813 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
3814 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
3816 2018-10-29 David Malcolm <dmalcolm@redhat.com>
3818 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
3819 logic for change to name_hint::operator bool.
3820 (undeclared_variable): Likewise.
3821 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3822 (c_parser_parameter_declaration): Likewise.
3824 2018-10-17 Joseph Myers <joseph@codesourcery.com>
3826 * c-errors.c (pedwarn_c11): New function.
3827 * c-parser.c (disable_extension_diagnostics): Save
3828 warn_c11_c2x_compat and set it to 0.
3829 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
3830 (c_parser_static_assert_declaration_no_semi): Handle
3831 _Static_assert without string constant.
3832 * c-tree.h (pedwarn_c11): New prototype.
3834 2018-10-17 David Malcolm <dmalcolm@redhat.com>
3836 * Make-lang.in (selftest-c): New.
3837 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
3838 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
3839 from gcc/Makefile.in.
3841 2018-10-02 Richard Biener <rguenther@suse.de>
3843 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
3845 2018-09-26 Joseph Myers <joseph@codesourcery.com>
3848 * c-typeck.c (build_binary_op): Use excess precision for
3849 comparisons of integers and floating-point for C11 and later.
3851 2018-09-26 Martin Jambor <mjambor@suse.cz>
3854 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
3857 2018-09-17 David Malcolm <dmalcolm@redhat.com>
3859 * c-objc-common.c (range_label_for_type_mismatch::get_text):
3860 Update for new param.
3861 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
3864 2018-09-17 Martin Jambor <mjambor@suse.cz>
3867 * c-parser.c: (warn_for_abs): New function.
3868 (c_parser_postfix_expression_after_primary): Call it.
3870 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
3872 * c-typeck.c (digest_init): Shorten overlength strings.
3874 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
3876 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
3878 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3880 * c-decl.c (finish_decl): Call braced_list_to_string here ...
3881 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
3883 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
3885 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
3886 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
3888 2018-08-27 David Malcolm <dmalcolm@redhat.com>
3891 * c-decl.c (implicitly_declare): Update call to
3892 maybe_add_include_fixit to suggest overriding the location, as it
3894 * c-objc-common.c (c_tree_printer): Update for conversion of
3895 show_caret_p to a tri-state.
3897 2018-08-27 Martin Liska <mliska@suse.cz>
3899 * c-decl.c (locate_old_decl): Use new function
3900 fndecl_built_in_p and remove check for FUNCTION_DECL if
3902 (diagnose_mismatched_decls): Likewise.
3903 (merge_decls): Likewise.
3904 (warn_if_shadowing): Likewise.
3905 (pushdecl): Likewise.
3906 (implicitly_declare): Likewise.
3907 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3908 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
3909 * c-typeck.c (build_function_call_vec): Likewise.
3910 (convert_arguments): Likewise.
3912 2018-08-20 David Malcolm <dmalcolm@redhat.com>
3915 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
3916 (diagnose_mismatched_decls): Likewise, in various places.
3917 (warn_if_shadowing): Likewise.
3918 (implicit_decl_warning): Likewise.
3919 (implicitly_declare): Likewise.
3920 (undeclared_variable): Likewise.
3921 (declare_label): Likewise.
3922 (grokdeclarator): Likewise.
3923 (start_function): Likewise.
3924 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3925 (c_parser_parameter_declaration): Likewise.
3926 (c_parser_binary_expression): Likewise.
3927 * c-typeck.c (c_expr_sizeof_expr): Likewise.
3928 (parser_build_binary_op): Likewise.
3929 (build_unary_op): Likewise.
3930 (error_init): Likewise.
3931 (pedwarn_init): Likewise.
3932 (warning_init): Likewise.
3933 (convert_for_assignment): Likewise.
3935 2018-08-15 David Malcolm <dmalcolm@redhat.com>
3937 * c-objc-common.c: Include "gcc-rich-location.h".
3938 (c_tree_printer): Move implemenation of '%T' to...
3939 (print_type): ...this new function.
3940 (range_label_for_type_mismatch::get_text): New function.
3941 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
3942 range for the various ic_argpass cases.
3943 (class maybe_range_label_for_tree_type_mismatch): New class.
3944 (build_binary_op): Use it when calling binary_op_error.
3946 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3948 * c-decl.c (start_decl): Do not warn if variables is named as main
3949 and is a local variable.
3951 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
3954 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
3955 objects of unknown size.
3957 2018-08-13 Martin Sebor <msebor@redhat.com>
3959 PR tree-optimization/71625
3960 * c-parser.c (c_parser_declaration_or_fndef): Call
3961 braced_list_to_string.
3963 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
3966 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
3969 2018-08-01 Martin Sebor <msebor@redhat.com>
3971 PR tree-optimization/86650
3972 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
3973 and TREE_BLOCK (t) from within percent_K_format to this callsite.
3975 2018-08-01 Jakub Jelinek <jakub@redhat.com>
3978 * c-typeck.c (init_field_decl_cmp): New function.
3979 (output_pending_init_elements): Use it for field comparisons
3980 instead of pure bit_position comparisons.
3982 2018-07-12 Jakub Jelinek <jakub@redhat.com>
3984 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
3985 type here, instead add "omp declare target implicit" attribute.
3986 (finish_decl): Diagnose vars without mappable type here.
3988 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3989 Thomas Schwinge <thomas@codesourcery.com>
3990 Cesar Philippidis <cesar@codesourcery.com>
3992 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
3993 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
3994 to their non-present_or_* counterparts. Make 'self' an alias to
3995 PRAGMA_OACC_CLAUSE_HOST.
3996 (c_parser_oacc_data_clause): Update GOMP mappings for
3997 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
3998 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
3999 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
4000 Remove support for present_or_* clauses.
4001 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
4002 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
4003 (OACC_DECLARE_CLAUSE_MASK): Likewise.
4004 (OACC_DATA_CLAUSE_MASK): Likewise.
4005 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
4006 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
4007 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
4008 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
4009 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
4011 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4013 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
4014 * gimple-parser.c (c_parser_gimple_statement): Likewise.
4015 (c_parser_gimple_unary_expression): Likewise.
4017 2018-06-15 Jakub Jelinek <jakub@redhat.com>
4020 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
4021 before doing POINTER_DIFF_EXPR.
4023 2018-06-07 Marek Polacek <polacek@redhat.com>
4026 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
4027 for loop initial declarations.
4029 2018-05-30 David Pagan <dave.pagan@oracle.com>
4032 * c-decl.c (grokdeclarator): Update check for return type warnings.
4033 (start_function): Likewise.
4034 (finish_function): Likewise.
4035 * c-typeck.c (c_finish_return): Update check for return type warnings.
4036 Pass OPT_Wreturn_type to pedwarn when appropriate.
4038 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
4040 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
4043 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
4045 * gimple-parser.c: Include internal-fn.h.
4046 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
4047 (c_parser_gimple_call_internal): New function.
4048 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
4049 Fix typos in comment.
4051 2018-05-10 Jakub Jelinek <jakub@redhat.com>
4054 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
4055 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
4057 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
4058 fold_offsetof_1, pass argtype as TYPE to it and drop the
4061 2018-05-02 David Pagan <dave.pagan@oracle.com>
4064 * c-decl.c (old_style_parameter_scope): New function.
4065 * c-parser.c (c_parser_postfix_expression): Check for statement
4066 expressions in old-style function parameter list declarations.
4067 * c-parser.h (old_style_parameter_scope): New extern declaration.
4069 2018-04-25 Jakub Jelinek <jakub@redhat.com>
4072 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
4073 it is not TREE_STATIC.
4074 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
4075 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
4076 its COMPOUND_LITERAL_EXPR_DECL.
4078 2018-03-21 Joseph Myers <joseph@codesourcery.com>
4080 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
4081 where all functions return the same _FloatN or _FloatNx type,
4082 treat integer types as _Float64 instead of double.
4084 2018-03-21 Jakub Jelinek <jakub@redhat.com>
4087 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
4088 building vector comparison, diagnose it and return error_mark_node.
4090 2018-03-15 Jakub Jelinek <jakub@redhat.com>
4093 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
4094 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
4095 INTEGER_TYPE element type.
4097 2018-03-13 David Pagan <dave.pagan@oracle.com>
4100 * c-typeck.c (output_init_element): Ensure field initializer
4101 expression is always evaluated if there are side effects.
4103 2018-03-06 Jakub Jelinek <jakub@redhat.com>
4106 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
4107 !building_stmt_list_p ().
4109 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
4112 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
4113 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
4114 and include the BIND_EXPR in the list of things that need to be
4117 2018-02-09 Nathan Sidwell <nathan@acm.org>
4120 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
4121 to strict_aliasing_warning.
4123 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
4125 * c-typeck.c (really_start_incremental_init, push_init_level,
4126 set_nonincremental_init, output_init_element, process_init_element):
4127 Use DECL_UNNAMED_BIT_FIELD.
4129 2018-01-31 Marek Polacek <polacek@redhat.com>
4132 * c-parser.c (c_parser_compound_statement_nostart): Call
4133 expansion_point_location_if_in_system_header.
4135 2018-01-17 David Malcolm <dmalcolm@redhat.com>
4138 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
4141 2018-01-13 Jakub Jelinek <jakub@redhat.com>
4144 * c-tree.h (decl_constant_value_1): Add a bool argument.
4145 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
4146 returning a CONSTRUCTOR if it is true. Use error_operand_p.
4147 (decl_constant_value): Adjust caller.
4148 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
4149 decl_constant_value_1 as IN_INIT. Otherwise, punt if
4150 decl_constant_value returns initializer that has BLKmode or
4152 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
4154 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4155 Alan Hayward <alan.hayward@arm.com>
4156 David Sherwood <david.sherwood@arm.com>
4158 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
4159 TYPE_VECTOR_SUBPARTS.
4161 2018-01-03 Jakub Jelinek <jakub@redhat.com>
4163 Update copyright years.
4165 2018-01-01 Jakub Jelinek <jakub@redhat.com>
4168 * c-parser.c (c_parser_braced_init, c_parser_initelt,
4169 c_parser_conditional_expression, c_parser_cast_expression,
4170 c_parser_sizeof_expression, c_parser_alignof_expression,
4171 c_parser_postfix_expression, c_parser_omp_declare_reduction,
4172 c_parser_transaction_expression): Use set_error () method instead
4173 of setting value member to error_mark_node.
4175 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
4177 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
4178 and _Float<N>X built-in functions.
4180 2017-12-22 Jakub Jelinek <jakub@redhat.com>
4183 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
4184 TYPE_STUB_DECL and call rest_of_type_compilation before processing
4185 incomplete vars rather than after it.
4188 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
4189 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
4190 and consider empty ones if there are no other stmts. For
4191 -Wunused-value walk all statements before the one only followed by
4194 2017-12-22 Mike Stump <mikestump@comcast.net>
4195 Eric Botcazou <ebotcazou@adacore.com>
4197 * c-parser.c (c_parser_while_statement): Add unroll parameter and
4198 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
4199 (c_parser_do_statement): Likewise.
4200 (c_parser_for_statement): Likewise.
4201 (c_parser_statement_after_labels): Adjust calls to above.
4202 (c_parse_pragma_ivdep): New static function.
4203 (c_parser_pragma_unroll): Likewise.
4204 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
4205 <PRAGMA_UNROLL>: New case.
4207 2017-12-19 Jakub Jelinek <jakub@redhat.com>
4209 * c-typeck.c (comptypes_internal, function_types_compatible_p,
4210 perform_integral_promotions, digest_init): Replace Yoda conditions
4211 with typical order conditions.
4212 * c-decl.c (check_bitfield_type_and_width): Likewise.
4214 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4216 * c-typeck.c (c_safe_arg_type_equiv_p,
4217 c_safe_function_type_cast_p): New function.
4218 (build_c_cast): Implement -Wcast-function-type.
4220 2017-12-14 Richard Biener <rguenther@suse.de>
4223 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
4224 like REALPART_EXPR for the behavior of whether its operand
4227 2017-12-12 Marek Polacek <polacek@redhat.com>
4230 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
4232 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
4234 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
4235 * c-parser.c (add_debug_begin_stmt): New.
4236 (c_parser_declaration_or_fndef): Call it.
4237 (c_parser_compound_statement_nostart): Likewise.
4238 (c_parser_statement_after_labels): Likewise.
4239 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
4241 2017-12-07 Joseph Myers <joseph@codesourcery.com>
4243 * c-decl.c (build_compound_literal): Add parameter alignas_align
4244 and set alignment of decl if nonzero.
4245 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
4246 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
4248 (c_parser_struct_declaration): Update syntax comment.
4249 (c_parser_type_name): Add alignas_ok argument and pass it to
4251 (c_parser_cast_expression): Pass true to c_parser_type_name and
4252 give error if a cast used an _Alignas specifier.
4253 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
4254 give error if sizeof (type-name) used an _Alignas specifier.
4255 (c_parser_alignof_expression): Pass true to c_parser_type_name and
4256 give error if _Alignof (type-name) used an _Alignas specifier.
4257 (c_parser_postfix_expression_after_paren_type): Check specified
4258 alignment for a compound literal and pass it to
4259 build_compound_literal.
4260 * c-parser.h (c_parser_type_name): Update prototype.
4261 * c-tree.h (build_compound_literal): Update prototype.
4263 2017-12-07 Martin Sebor <msebor@redhat.com>
4266 * c-decl.c (c_decl_attributes): Look up existing declaration and
4267 pass it to decl_attributes.
4269 2017-12-06 David Malcolm <dmalcolm@redhat.com>
4272 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
4273 reserved for use by the implementation.
4275 2017-12-06 David Malcolm <dmalcolm@redhat.com>
4277 * c-decl.c: Include "c-family/c-spellcheck.h".
4279 2017-12-05 Martin Liska <mliska@suse.cz>
4280 Jakub Jelinek <jakub@redhat.com>
4282 * c-typeck.c (pointer_diff): Add new argument and instrument
4283 pointer subtraction.
4284 (build_binary_op): Similar for pointer comparison.
4286 2017-12-01 Jakub Jelinek <jakub@redhat.com>
4289 * c-parser.c: Include tree-iterator.h.
4290 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
4291 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
4295 * c-tree.h (decl_constant_value_1): Declare.
4296 * c-typeck.c (decl_constant_value_1): New function.
4297 (decl_constant_value): Use it.
4298 * c-fold.c (c_fully_fold_internal): If in_init, use
4299 decl_constant_value_1 instead of decl_constant_value.
4301 2017-11-30 Jakub Jelinek <jakub@redhat.com>
4303 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
4305 2017-11-28 Jakub Jelinek <jakub@redhat.com>
4308 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
4309 c_switch_covers_all_cases_p returns true.
4311 2017-11-28 Julia Koval <julia.koval@intel.com>
4312 Sebastian Peryt <sebastian.peryt@intel.com>
4314 * Make-lang.in (c/c-array-notation.o): Remove.
4315 * c-array-notation.c: Delete.
4316 * c-decl.c: Remove cilkplus condition.
4317 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
4318 c_parser_cilk_verify_simd, c_parser_array_notation,
4319 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
4320 c_parser_cilk_simd_fn_vector_attrs,
4321 c_finish_cilk_simd_fn_tokens): Delete.
4322 (c_parser_declaration_or_fndef): Remove cilkplus condition.
4323 (c_parser_direct_declarator_inner): Ditto.
4324 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
4325 (c_parser_attributes, c_parser_compound_statement,
4326 c_parser_statement_after_labels, c_parser_if_statement,
4327 c_parser_switch_statement, c_parser_while_statement,
4328 c_parser_do_statement, c_parser_for_statement,
4329 c_parser_unary_expression, c_parser_postfix_expression,
4330 c_parser_postfix_expression_after_primary,
4331 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
4332 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
4334 * c-typeck.c (build_array_ref, build_function_call_vec,
4336 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
4337 c_finish_loop, build_binary_op): Remove cilkplus support.
4339 2017-11-28 Jakub Jelinek <jakub@redhat.com>
4341 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
4344 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
4346 * Make-lang.in (c.install-plugin): Install backend import library.
4348 2017-11-23 Jakub Jelinek <jakub@redhat.com>
4350 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
4351 pragma_stmt context.
4353 2017-11-23 Mike Stump <mikestump@comcast.net>
4354 Eric Botcazou <ebotcazou@adacore.com>
4356 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
4358 (c_parser_do_statement): Likewise.
4359 (c_parser_for_statement): Likewise.
4361 2017-11-22 David Malcolm <dmalcolm@redhat.com>
4364 * c-objc-common.c (c_tree_printer): Convert penultimate param from
4365 bool to bool *. Within '%T' handling, if showing an "aka", use
4366 "quoted" param to add appropriate quoting.
4368 2017-11-22 Marek Polacek <polacek@redhat.com>
4373 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
4375 2017-11-21 David Malcolm <dmalcolm@redhat.com>
4378 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
4379 earlier failed lookups.
4381 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
4383 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
4384 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
4386 2017-11-20 David Malcolm <dmalcolm@redhat.com>
4389 * c-decl.c: Include "c-family/known-headers.h".
4390 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
4391 to known-headers.cc.
4392 (class suggest_missing_header): Move to known-header.h.
4393 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
4394 than get_c_name_hint.
4396 2017-11-20 David Malcolm <dmalcolm@redhat.com>
4398 * c-decl.c (get_c_name_hint): New function.
4399 (class suggest_missing_header): New class.
4400 (lookup_name_fuzzy): Call get_c_name_hint and use it to
4401 suggest missing headers to the user.
4403 2017-11-20 David Malcolm <dmalcolm@redhat.com>
4405 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
4406 Include "c-family/name-hint.h"
4407 (implicit_decl_warning): Convert "hint" from
4408 const char * to name_hint. Pass location to
4409 lookup_name_fuzzy. Suppress any deferred diagnostic if the
4410 warning was not printed.
4411 (undeclared_variable): Likewise for "guessed_id".
4412 (lookup_name_fuzzy): Convert return type from const char *
4413 to name_hint. Add location_t param.
4414 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
4415 Include "c-family/name-hint.h"
4416 (c_parser_declaration_or_fndef): Convert "hint" from
4417 const char * to name_hint. Pass location to lookup_name_fuzzy.
4418 (c_parser_parameter_declaration): Likewise.
4420 2017-11-19 Jakub Jelinek <jakub@redhat.com>
4424 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
4426 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
4427 handle_omp_array_sections): Likewise.
4428 (digest_init): Don't call decl_constant_value_for_optimization.
4429 * c-tree.h (decl_constant_value_for_optimization): Removed.
4430 * c-fold.c (c_fold_array_ref): New function.
4431 (c_fully_fold_internal): Add LVAL argument, propagate it through
4432 recursive calls. For VAR_P call decl_constant_value and
4433 unshare if not LVAL and either optimizing or IN_INIT. Remove
4434 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
4435 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
4436 (c_fully_fold): Add LVAL argument, pass it through to
4437 c_fully_fold_internal.
4438 (decl_constant_value_for_optimization): Removed.
4440 2017-11-15 Joseph Myers <joseph@codesourcery.com>
4443 * c-parser.c (check_tgmath_function): New function.
4444 (enum tgmath_parm_kind): New enum.
4445 (c_parser_postfix_expression): Handle __builtin_tgmath.
4447 2017-10-31 David Malcolm <dmalcolm@redhat.com>
4449 * c-decl.c (implicit_decl_warning): Update for renaming of
4450 pedwarn_at_rich_loc and warning_at_rich_loc.
4451 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
4452 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
4453 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
4454 (c_parser_struct_or_union_specifier): Likewise for renaming of
4455 pedwarn_at_rich_loc.
4456 (c_parser_parameter_declaration): Likewise for renaming of
4458 * c-typeck.c (build_component_ref): Likewise.
4459 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
4460 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
4461 (set_init_label): Likewise for renaming of error_at_rich_loc.
4463 2017-10-30 Richard Biener <rguenther@suse.de>
4465 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
4468 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
4470 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
4471 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
4473 2017-10-25 David Malcolm <dmalcolm@redhat.com>
4476 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
4479 2017-10-25 Jakub Jelinek <jakub@redhat.com>
4482 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
4483 newdecl to corresponding __builtin_ if any.
4485 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
4488 * c-decl.c (diagnose_mismatched_decls): Use
4489 OPT_Wbuiltin_declaration_mismatch.
4491 2017-10-12 David Malcolm <dmalcolm@redhat.com>
4493 * c-parser.c (c_parser_require): Add "type_is_unique" param and
4494 use it to guard calls to maybe_suggest_missing_token_insertion.
4495 (c_parser_parms_list_declarator): Override default value of new
4496 "type_is_unique" param to c_parser_require.
4497 (c_parser_asm_statement): Likewise.
4498 * c-parser.h (c_parser_require): Add "type_is_unique" param,
4501 2017-10-11 Nathan Sidwell <nathan@acm.org>
4503 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
4505 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
4507 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
4508 operating on trees as wide_ints.
4509 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
4510 (c_tree_equal): Likewise.
4512 2017-10-04 David Malcolm <dmalcolm@redhat.com>
4514 * c-decl.c (push_parm_decl): Store c_parm's location into the
4516 (build_c_parm): Add "loc" param and store it within the c_parm.
4517 * c-parser.c (struct c_parser): Add "last_token_location" field.
4518 (c_parser_consume_token): Store location of the token into the
4520 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
4521 when handling a FUNCTION_DECL, if it doesn't already have them.
4522 (c_parser_parameter_declaration): Generate a location for the
4523 parameter, and pass it to the call to build_c_parm.
4524 * c-tree.h (struct c_parm): Add field "loc".
4525 (build_c_parm): Add location_t param.
4526 * c-typeck.c (get_fndecl_argument_location): New function.
4527 (inform_for_arg): New function.
4528 (convert_for_assignment): Use inform_for_arg when dealing with
4531 2017-09-29 Jakub Jelinek <jakub@redhat.com>
4533 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
4535 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
4536 don't SET_DECL_C_BIT_FIELD here.
4539 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
4540 instead of trying to set just TREE_READONLY manually.
4542 2017-09-16 Tom de Vries <tom@codesourcery.com>
4545 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
4548 2017-09-15 Joseph Myers <joseph@codesourcery.com>
4551 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
4553 (build_conditional_expr): For C11, generate result with excess
4554 precision when one argument is an integer and the other is of a
4555 type using excess precision.
4557 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
4559 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
4561 2017-09-13 Marek Polacek <polacek@redhat.com>
4564 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
4565 than expr.original_type.
4567 2017-09-12 Nathan Sidwell <nathan@acm.org>
4569 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
4570 resort_sorted_fields): Moved from c-family/c-common.c.
4571 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
4573 2017-09-01 Joseph Myers <joseph@codesourcery.com>
4576 * c-typeck.c (build_atomic_assign): Handle argument with excess
4577 precision. Ensure any EXCESS_PRECISION_EXPR is present in
4578 argument passed to build_binary_op and convert_for_assignment but
4579 not for call to c_fully_fold.
4580 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
4581 Ensure build_binary_op is called with argument with original
4582 semantic type. Avoid calling c_fully_fold with an
4583 EXCESS_PRECISION_EXPR from build_binary_op.
4585 2017-09-01 Jakub Jelinek <jakub@redhat.com>
4588 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
4590 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4591 Alan Hayward <alan.hayward@arm.com>
4592 David Sherwood <david.sherwood@arm.com>
4594 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
4595 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
4596 m1 and m2 to the signed equivalent of a fixed-point
4599 2017-08-24 David Malcolm <dmalcolm@redhat.com>
4601 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
4602 than CAN_HAVE_LOCATION_P when determining whether to use the
4603 location_t value within "value".
4605 2017-08-21 David Malcolm <dmalcolm@redhat.com>
4607 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
4608 rather than peeking the location of the first token.
4609 * c-tree.h (c_expr::get_location): New method.
4611 2017-08-21 David Malcolm <dmalcolm@redhat.com>
4613 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
4614 to check_function_arguments.
4616 2017-08-18 Marek Polacek <polacek@redhat.com>
4618 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
4621 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
4624 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
4625 (check_bitfield_type_and_width): Don't allow bit-field with
4626 warn_if_not_aligned type.
4628 2017-08-14 Martin Sebor <msebor@redhat.com>
4631 * c-objc-common.c (c_objc_common_init): Handle 'G'.
4633 2017-08-11 Marek Polacek <polacek@redhat.com>
4636 * c-decl.c (pushtag): Only print inform if the warning was printed.
4637 (grokdeclarator): Likewise.
4639 2017-08-10 David Malcolm <dmalcolm@redhat.com>
4641 * c-parser.c (c_parser_error): Rename to...
4642 (c_parser_error_richloc): ...this, making static, and adding
4643 "richloc" parameter, passing it to the c_parse_error call,
4644 rather than calling c_parser_set_source_position_from_token.
4645 (c_parser_error): Reintroduce, reimplementing in terms of the
4646 above, converting return type from void to bool.
4647 (class token_pair): New class.
4648 (struct matching_paren_traits): New struct.
4649 (matching_parens): New typedef.
4650 (struct matching_brace_traits): New struct.
4651 (matching_braces): New typedef.
4652 (get_matching_symbol): New function.
4653 (c_parser_require): Add param MATCHING_LOCATION, using it to
4654 highlight matching "opening" tokens for missing "closing" tokens.
4655 (c_parser_skip_until_found): Likewise.
4656 (c_parser_static_assert_declaration_no_semi): Convert explicit
4657 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
4658 class matching_parens, so that the pertinent open parenthesis is
4659 highlighted when there are problems locating the close
4661 (c_parser_struct_or_union_specifier): Likewise.
4662 (c_parser_typeof_specifier): Likewise.
4663 (c_parser_alignas_specifier): Likewise.
4664 (c_parser_simple_asm_expr): Likewise.
4665 (c_parser_braced_init): Likewise, for matching_braces.
4666 (c_parser_paren_condition): Likewise, for matching_parens.
4667 (c_parser_switch_statement): Likewise.
4668 (c_parser_for_statement): Likewise.
4669 (c_parser_asm_statement): Likewise.
4670 (c_parser_asm_operands): Likewise.
4671 (c_parser_cast_expression): Likewise.
4672 (c_parser_sizeof_expression): Likewise.
4673 (c_parser_alignof_expression): Likewise.
4674 (c_parser_generic_selection): Likewise.
4675 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
4676 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
4677 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
4678 In case CPP_OPEN_PAREN, pass loc_open_paren to the
4679 c_parser_skip_until_found call.
4680 (c_parser_objc_class_definition): Use class matching_parens as
4682 (c_parser_objc_method_decl): Likewise.
4683 (c_parser_objc_try_catch_finally_statement): Likewise.
4684 (c_parser_objc_synchronized_statement): Likewise.
4685 (c_parser_objc_at_property_declaration): Likewise.
4686 (c_parser_oacc_wait_list): Likewise.
4687 (c_parser_omp_var_list_parens): Likewise.
4688 (c_parser_omp_clause_collapse): Likewise.
4689 (c_parser_omp_clause_default): Likewise.
4690 (c_parser_omp_clause_if): Likewise.
4691 (c_parser_omp_clause_num_threads): Likewise.
4692 (c_parser_omp_clause_num_tasks): Likewise.
4693 (c_parser_omp_clause_grainsize): Likewise.
4694 (c_parser_omp_clause_priority): Likewise.
4695 (c_parser_omp_clause_hint): Likewise.
4696 (c_parser_omp_clause_defaultmap): Likewise.
4697 (c_parser_oacc_single_int_clause): Likewise.
4698 (c_parser_omp_clause_ordered): Likewise.
4699 (c_parser_omp_clause_reduction): Likewise.
4700 (c_parser_omp_clause_schedule): Likewise.
4701 (c_parser_omp_clause_num_teams): Likewise.
4702 (c_parser_omp_clause_thread_limit): Likewise.
4703 (c_parser_omp_clause_aligned): Likewise.
4704 (c_parser_omp_clause_linear): Likewise.
4705 (c_parser_omp_clause_safelen): Likewise.
4706 (c_parser_omp_clause_simdlen): Likewise.
4707 (c_parser_omp_clause_depend): Likewise.
4708 (c_parser_omp_clause_map): Likewise.
4709 (c_parser_omp_clause_device): Likewise.
4710 (c_parser_omp_clause_dist_schedule): Likewise.
4711 (c_parser_omp_clause_proc_bind): Likewise.
4712 (c_parser_omp_clause_uniform): Likewise.
4713 (c_parser_omp_for_loop): Likewise.
4714 (c_parser_cilk_clause_vectorlength): Likewise.
4715 (c_parser_cilk_clause_linear): Likewise.
4716 (c_parser_transaction_expression): Likewise.
4717 * c-parser.h (c_parser_require): Add param matching_location with
4718 default UNKNOWN_LOCATION.
4719 (c_parser_error): Convert return type from void to bool.
4720 (c_parser_skip_until_found): Add param matching_location with
4721 default UNKNOWN_LOCATION.
4723 2017-08-09 Marek Polacek <polacek@redhat.com>
4725 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
4726 * c-tree.h (build_external_ref): Update declaration.
4727 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
4728 (build_external_ref): Change the type of a parameter to bool.
4729 (parser_build_binary_op): Use true/false instead of 1/0.
4730 (pointer_diff): Likewise.
4731 (build_modify_expr): Likewise.
4732 (set_designator): Change the type of a parameter to bool.
4733 (set_init_index): Use true/false instead of 1/0.
4734 (set_init_label): Likewise.
4735 (output_init_element): Change the type of a parameter to bool.
4736 (output_pending_init_elements): Use true/false instead of 1/0.
4737 (process_init_element): Likewise.
4738 (build_binary_op): Change the type of a parameter to bool.
4740 2017-08-09 Marek Polacek <polacek@redhat.com>
4743 * c-typeck.c (pedwarn_init): Make the function take a variable list.
4744 Call emit_diagnostic_valist instead of pedwarn.
4745 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
4746 Print the relevant types in diagnostics.
4748 2017-08-09 Marek Polacek <polacek@redhat.com>
4751 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
4752 build_conditional_expr.
4753 * c-parser.c (c_parser_conditional_expression): Create locations for
4754 EXP1 and EXP2 from their source ranges. Pass the locations down to
4755 build_conditional_expr.
4756 * c-tree.h (build_conditional_expr): Update declaration.
4757 * c-typeck.c (build_conditional_expr): Add location_t parameters.
4758 For -Wsign-compare, also print the types.
4760 2017-08-08 Martin Liska <mliska@suse.cz>
4762 * c-convert.c: Include header files.
4763 * c-typeck.c: Likewise.
4765 2017-08-07 Martin Liska <mliska@suse.cz>
4767 * c-parser.c (c_parser_attributes): Canonicalize name of an
4770 2017-08-02 Marek Polacek <polacek@redhat.com>
4773 * c-parser.c (c_parser_unary_expression): Use set_error.
4777 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
4778 warnings. Avoid walking MACRO_MAP_LOCATIONS.
4780 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
4781 Martin Liska <mliska@suse.cz>
4783 * c-typeck.c (c_finish_goto_label): Build gimple predict
4786 2017-07-31 Martin Liska <mliska@suse.cz>
4789 * c-convert.c (convert): Guard condition with flag_sanitize_p
4790 also with current_function_decl non-null equality.
4791 * c-decl.c (grokdeclarator): Likewise.
4792 * c-typeck.c (build_binary_op): Likewise.
4794 2017-07-25 Marek Polacek <polacek@redhat.com>
4796 * c-decl.c (grokfield): Remove local variable.
4798 2017-07-25 Marek Polacek <polacek@redhat.com>
4801 * c-parser.c (c_parser_else_body): Don't warn about multistatement
4802 macro expansion if the body is in { }.
4803 (c_parser_while_statement): Likewise.
4804 (c_parser_for_statement): Likewise.
4806 2017-07-18 Nathan Sidwell <nathan@acm.org>
4808 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
4810 2017-07-14 David Malcolm <dmalcolm@redhat.com>
4812 * c-decl.c (implicitly_declare): When suggesting a missing
4813 #include, provide a fix-it hint.
4815 2017-07-06 David Malcolm <dmalcolm@redhat.com>
4817 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
4818 and call that instead.
4819 * c-tree.h (selftest::run_c_tests): New decl.
4821 2017-06-26 Marek Polacek <polacek@redhat.com>
4824 * c-parser.c (c_parser_if_body): Set the location of the
4825 body of the conditional after parsing all the labels. Call
4826 warn_for_multistatement_macros.
4827 (c_parser_else_body): Likewise.
4828 (c_parser_switch_statement): Likewise.
4829 (c_parser_while_statement): Likewise.
4830 (c_parser_for_statement): Likewise.
4831 (c_parser_statement): Add a default argument. Save the location
4832 after labels have been parsed.
4833 (c_parser_c99_block_statement): Likewise.
4835 2017-06-19 Richard Biener <rguenther@suse.de>
4837 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4838 negated _Literals to parse _Literal (int) -1.
4840 2017-06-13 Martin Liska <mliska@suse.cz>
4843 * c-convert.c (convert): Use sanitize_flags_p.
4844 * c-decl.c (grokdeclarator): Likewise.
4845 * c-typeck.c (convert_for_assignment): Likewise.
4846 (c_finish_return): Likewise.
4847 (build_binary_op): Likewise.
4849 2017-06-08 Jakub Jelinek <jakub@redhat.com>
4852 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
4853 to sizetype before size_binop.
4855 2017-06-07 Jakub Jelinek <jakub@redhat.com>
4857 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
4860 2017-06-06 Marek Polacek <polacek@redhat.com>
4863 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
4865 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
4867 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4869 * c-parser.c (c_parser_binary_expression): Implement the
4870 -Wsizeof_pointer_div warning.
4871 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
4872 from a parenthesized expression.
4873 (c_parser_expr_list): Use c_last_sizeof_loc.
4874 * c-tree.h (c_last_sizeof_loc): New external.
4875 * c-typeck.c (c_last_sizeof_loc): New variable.
4876 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
4878 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
4881 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
4883 2017-05-30 David Malcolm <dmalcolm@redhat.com>
4885 * c-objc-common.c (c_tree_printer): Gain bool and const char **
4888 2017-05-24 Martin Sebor <msebor@redhat.com>
4891 * c-fold.c (c_fully_fold_internal): Adjust.
4892 * c-typeck.c (parser_build_unary_op): Adjust.
4894 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
4896 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
4897 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
4900 2017-05-23 Marek Polacek <polacek@redhat.com>
4902 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
4905 2017-05-22 Jakub Jelinek <jakub@redhat.com>
4907 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
4908 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
4909 it returned invariant. Call tree_invariant_p unconditionally
4910 afterwards to decide whether to return expr or op0.
4912 2017-05-22 Nathan Sidwell <nathan@acm.org>
4914 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
4916 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
4918 * c-parser.c (c_parser_omp_clause_default): Handle
4919 "OMP_CLAUSE_DEFAULT_PRESENT".
4921 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
4923 * config-lang.in (gtfiles): Add c-family/c-format.c.
4925 2017-05-18 Nathan Sidwell <nathan@acm.org>
4927 * c-decl.c (pushdecl_top_level): Delete unused function.
4929 2017-05-18 Marek Polacek <polacek@redhat.com>
4931 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
4932 (check_earlier_gotos): Likewise.
4933 (define_label): Likewise.
4934 (pending_xref_error): Likewise.
4935 (smallest_type_quals_location): Likewise.
4936 (grokdeclarator): Likewise.
4937 (grokparms): Likewise.
4938 (identifier_global_value): Likewise.
4939 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
4940 (find_init_member): Likewise.
4942 2017-05-18 Marek Polacek <polacek@redhat.com>
4944 * c-decl.c (start_decl): Use false/true instead of 0/1.
4945 (grokdeclarator): Likewise.
4946 (finish_struct): Likewise.
4947 (start_function): Change the return type to bool. Use false/true
4949 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
4950 * c-tree.h (start_function): Update.
4951 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
4952 (set_designator): Change the return type to bool. Use false/true
4955 2017-05-17 Marek Polacek <polacek@redhat.com>
4957 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
4958 * c-typeck.c: Likewise.
4960 2017-05-17 Marek Polacek <polacek@redhat.com>
4963 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
4964 DECL_IGNORED_P even for non-static compound literals.
4966 2017-05-17 Martin Liska <mliska@suse.cz>
4968 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
4969 use it instead of int type.
4971 2017-05-17 Marek Polacek <polacek@redhat.com>
4973 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
4975 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
4976 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
4977 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
4978 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
4980 (c_parser_conditional_expression): Likewise.
4981 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
4982 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
4983 (process_init_element): Likewise.
4984 (build_binary_op): Likewise.
4985 (handle_omp_array_sections_1): Likewise.
4987 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
4989 * c-parser.c (c_parser_omp_clause_num_gangs)
4990 (c_parser_omp_clause_num_workers)
4991 (c_parser_omp_clause_vector_length): Merge functions into...
4992 (c_parser_oacc_single_int_clause): ... this new function. Adjust
4995 2017-05-11 Nathan Sidwell <nathan@acm.org>
4997 * gimple-parser.c: Don't #include tree-dump.h.
4999 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5002 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
5004 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5007 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
5008 incorrect __MEM syntax.
5010 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5013 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
5016 2017-05-09 Nathan Sidwell <nathan@acm.org>
5018 * c-tree.h (pushdecl): Declare.
5020 2017-05-05 David Malcolm <dmalcolm@redhat.com>
5022 * c-decl.c (warn_defaults_to): Replace report_diagnostic
5023 with diagnostic_report_diagnostic.
5024 * c-errors.c (pedwarn_c99): Likewise.
5025 (pedwarn_c90): Likewise.
5027 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
5030 * c-gimplify.c (c_gimplify_expr): Remove calls to
5031 cilk_gimplifY_call_params_in_spawned_fn.
5033 2017-04-25 David Malcolm <dmalcolm@redhat.com>
5035 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
5036 hint for removing extra semicolon.
5038 2017-04-21 Jakub Jelinek <jakub@redhat.com>
5041 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
5042 enabled, set specs->type to integer_type_node.
5044 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
5046 * c-array-notation.c: Fix typo in comment.
5048 2017-03-29 Marek Polacek <polacek@redhat.com>
5051 * c-decl.c (finish_decl): Check VAR_P.
5053 2017-03-27 Jakub Jelinek <jakub@redhat.com>
5056 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
5057 * c-typeck.c (c_mark_addressable): Likewise. Look through
5058 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
5060 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
5062 2017-03-23 Marek Polacek <polacek@redhat.com>
5064 * c-tree.h: Remove a C_RID_YYCODE reference.
5066 2017-03-21 Jakub Jelinek <jakub@redhat.com>
5069 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
5070 optional COMPOUND_EXPR with ubsan instrumentation.
5072 2017-03-17 Marek Polacek <polacek@redhat.com>
5074 * c-parser.c: Add C11 references.
5076 2017-03-15 Marek Polacek <polacek@redhat.com>
5078 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
5080 2017-03-11 Marek Polacek <polacek@redhat.com>
5082 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
5084 2017-03-10 David Malcolm <dmalcolm@redhat.com>
5086 PR translation/79848
5087 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
5089 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
5091 2017-03-09 Marek Polacek <polacek@redhat.com>
5094 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
5095 parameter declarations with initializers.
5097 2017-03-09 Jakub Jelinek <jakub@redhat.com>
5100 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
5103 2017-03-07 Jakub Jelinek <jakub@redhat.com>
5106 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
5107 for "may only be used in compound statements" diagnostics, change it
5108 such that the same translatable string is used for all pragmas. For
5109 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
5111 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
5112 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
5113 "may only be used in compound statements" diagnostics, such that the
5114 same translatable string is used for all pragmas.
5116 2017-03-04 Marek Polacek <polacek@redhat.com>
5119 * c-decl.c (implicit_decl_warning): Add missing space.
5121 2017-03-03 Marek Polacek <polacek@redhat.com>
5124 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
5125 current_function_prototype_arg_types is error_mark_node. Fix
5126 formatting. Use TREE_VALUE instead of TREE_TYPE.
5128 2017-03-03 Jakub Jelinek <jakub@redhat.com>
5131 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
5132 %<min%> or %<max%> in the diagnostics, instead mention identifier.
5133 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
5137 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
5138 instead of %<_Generic>.
5139 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
5140 (c_parser_omp_target_exit_data): Use %<release%> instead of
5143 2017-02-28 Jakub Jelinek <jakub@redhat.com>
5145 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
5146 instead of just cond ? "..." : "...".
5147 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
5148 for "enter"/"exit" keyword.
5149 (c_finish_oacc_routine): Don't use %s to supply portions of the
5152 2017-02-24 Jakub Jelinek <jakub@redhat.com>
5155 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
5156 handle -Wrestrict here.
5157 * c-typeck.c (build_function_call_vec): Adjust
5158 check_function_arguments caller.
5160 2017-02-23 Richard Biener <rguenther@suse.de>
5163 * gimple-parser.c (c_parser_gimple_statement): Use set_error
5164 to initialize c_exprs to return.
5165 (c_parser_gimple_binary_expression): Likewise.
5166 (c_parser_gimple_unary_expression): Likewise.
5167 (c_parser_gimple_postfix_expression): Likewise.
5169 2017-02-22 Marek Polacek <polacek@redhat.com>
5172 * c-typeck.c (convert_arguments): Handle error_mark_node.
5174 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5176 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
5177 value of c_parser_parse_ssa_name against error_mark_node and emit
5178 error if ssa name is anonymous and written as default definition.
5180 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5182 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
5185 2017-02-16 Jakub Jelinek <jakub@redhat.com>
5188 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
5189 ignore #pragma omp target even when not followed by identifier.
5191 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5193 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
5194 (c_parser_gimple_unary_expression): Likewise.
5196 2017-02-13 Jakub Jelinek <jakub@redhat.com>
5198 * c-parser.c (c_parser_oacc_declare): Add missing space in
5201 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5204 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
5205 set_c_expr_source_range when parsing ssa-name.
5207 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
5208 Richard Biener <rguenther@suse.de>
5210 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
5211 building IL when arguments are error_mark_node.
5212 (c_parser_gimple_unary_expression): Likewise.
5213 (c_parser_gimple_if_stmt): Likewise.
5214 (c_parser_gimple_switch_stmt): Likewise.
5215 (c_parser_gimple_return_stmt): Likewise.
5216 (c_parser_parse_ssa_name): When name lookup fails do not build
5217 an SSA name. Use undeclared rather than not declared in error
5220 2017-02-09 Marek Polacek <polacek@redhat.com>
5223 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
5224 instead of c_parser_skip_until_found.
5226 2017-02-09 Jakub Jelinek <jakub@redhat.com>
5229 * c-parser.c (c_parser_omp_declare_target): Don't invoke
5230 symtab_node::get on automatic variables.
5232 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
5233 Chung-Lin Tang <cltang@codesourcery.com>
5235 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
5236 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
5238 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
5240 2017-02-07 Richard Biener <rguenther@suse.de>
5242 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
5243 (c_parser_gimple_postfix_expression_after_primary):
5244 Do not use c_build_function_call_vec to avoid folding and promotion.
5247 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
5250 * c-decl.c (pop_scope): Pass main_input_filename to
5251 build_translation_unit_decl.
5253 2017-01-24 David Malcolm <dmalcolm@redhat.com>
5255 * c-parser.c: Include "read-rtl-function.h" and
5257 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
5258 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
5259 production. Update for renaming of field "gimple_pass" to
5260 "gimple_or_rtl_pass". If __RTL was seen, call
5261 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
5262 to an auto_timevar, to cope with early exit.
5263 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
5264 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
5265 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
5267 (c_parser_parse_rtl_body): New function.
5268 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
5269 (struct c_declspecs): Rename field "gimple_pass" to
5270 "gimple_or_rtl_pass". Add field "rtl_p".
5271 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
5272 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
5273 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
5274 (c_parser_gimple_or_rtl_pass_list): ...this.
5276 2017-01-20 Marek Polacek <polacek@redhat.com>
5279 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
5281 2017-01-13 Richard Biener <rguenther@suse.de>
5283 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
5286 2017-01-13 Richard Biener <rguenther@suse.de>
5288 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
5289 _Literal ( type-name ) number.
5291 2017-01-12 Richard Biener <rguenther@suse.de>
5293 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
5296 2017-01-11 Jakub Jelinek <jakub@redhat.com>
5299 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
5302 2017-01-11 Richard Biener <rguenther@suse.de>
5305 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
5306 returns on parse errors.
5308 2017-01-04 Marek Polacek <polacek@redhat.com>
5311 * c-parser.c (c_parser_postfix_expression): Mark zero character
5312 constants by setting original_type in c_expr.
5313 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
5314 with a zero character constant.
5315 (char_type_p): New function.
5317 2017-01-04 David Malcolm <dmalcolm@redhat.com>
5319 * c-parser.c (c_parser_declaration_or_fndef): Create a
5320 rich_location at init_loc and parse it to start_init.
5321 (last_init_list_comma): New global.
5322 (c_parser_braced_init): Update last_init_list_comma when parsing
5323 commas. Pass it to pop_init_level. Pass location of closing
5324 brace to pop_init_level.
5325 (c_parser_postfix_expression_after_paren_type): Create a
5326 rich_location at type_loc and parse it to start_init.
5327 (c_parser_omp_declare_reduction): Likewise for loc.
5328 * c-tree.h (start_init): Add rich_location * param.
5329 (pop_init_level): Add location_t param.
5330 * c-typeck.c (struct initializer_stack): Add field
5331 "missing_brace_richloc".
5332 (start_init): Add richloc param, use it to initialize
5333 the stack node's missing_brace_richloc.
5334 (last_init_list_comma): New decl.
5335 (finish_implicit_inits): Pass last_init_list_comma to
5337 (push_init_level): When finding missing open braces, add fix-it
5338 hints to the richloc.
5339 (pop_init_level): Add "insert_before" param and pass it
5340 when calling pop_init_level. Add fixits about missing
5341 close braces to any richloc. Use the richloc for the
5342 -Wmissing-braces warning.
5343 (set_designator): Pass last_init_list_comma to pop_init_level.
5344 (process_init_element): Likewise.
5346 2017-01-01 Jakub Jelinek <jakub@redhat.com>
5348 Update copyright years.
5350 2016-12-21 Jakub Jelinek <jakub@redhat.com>
5353 * c-typeck.c (build_function_call_vec): If check_function_arguments
5354 returns true, set TREE_NO_WARNING on CALL_EXPR.
5357 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
5358 to *expr instead of overwriting it.
5360 2016-12-20 Richard Biener <rguenther@suse.de>
5362 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
5364 (c_parser_gimple_statement): Only build assigns for non-error
5366 (c_parser_gimple_postfix_expression_after): Improve error recovery.
5368 2016-12-14 Martin Jambor <mjambor@suse.cz>
5370 * c-parser.c: Include omp-general.h and omp-offload.h instead of
5372 (c_finish_oacc_routine): Adjusted call to
5373 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
5374 to use their new names.
5375 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
5377 (c_parser_oacc_update): Likewise.
5378 (c_parser_omp_simd): Likewise.
5379 (c_parser_omp_target_update): Likewise.
5380 * c-typeck.c: Include omp-general.h instead of omp-low.h.
5381 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
5383 (c_finish_omp_cancellation_point): Likewise.
5384 * gimple-parser.c: Do not include omp-low.h
5386 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
5387 James Norris <jnorris@codesourcery.com>
5389 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
5390 EXIT_DATA,WAIT} are not used in compound statements.
5391 (c_parser_oacc_enter_exit_data): Update diagnostics.
5393 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5396 * c-decl.c (diagnose_mismatched_decls): Use
5397 OPT_Wbuiltin_declaration_mismatch here too.
5399 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
5400 Alan Hayward <alan.hayward@arm.com>
5401 David Sherwood <david.sherwood@arm.com>
5403 * c-decl.c (merge_decls): Use SET_DECL_MODE.
5404 (make_label, finish_struct): Likewise.
5406 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
5407 Richard Biener <rguenther@suse.de>
5409 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
5410 * config-lang.in (gtfiles): Add c/c-parser.h.
5411 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
5412 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
5413 * c-parser.c (enum c_id_kind, struct c_token,
5414 c_parser_next_token_is, c_parser_next_token_is_not,
5415 c_parser_next_token_is_keyword,
5416 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
5418 * c-parser.h: ... new header.
5419 * c-parser.c: Include c-parser.h and gimple-parser.h.
5420 (c_parser_peek_token, c_parser_peek_2nd_token,
5421 c_token_starts_typename, c_parser_next_token_starts_declspecs,
5422 c_parser_next_tokens_start_declaration, c_parser_consume_token,
5423 c_parser_error, c_parser_require, c_parser_skip_until_found,
5424 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
5425 c_parser_type_name): Export.
5426 (c_parser_tokens_buf): New function.
5427 (c_parser_error): Likewise.
5428 (c_parser_set_error): Likewise.
5429 (c_parser_declspecs): Handle RID_GIMPLE.
5430 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
5431 via c_parser_parse_gimple_body.
5432 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
5433 c_token_starts_typename, c_parser_next_token_starts_declspecs,
5434 c_parser_next_tokens_start_declaration, c_parser_consume_token,
5435 c_parser_error, c_parser_require, c_parser_skip_until_found,
5436 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
5437 c_parser_type_name): Declare.
5438 (struct c_parser): Declare forward.
5439 (c_parser_tokens_buf): Declare.
5440 (c_parser_error): Likewise.
5441 (c_parser_set_error): Likewise.
5442 * gimple-parser.c: New file.
5443 * gimple-parser.h: Likewise.
5445 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5448 * c-parser.c (c_parser_postfix_expression_after_primary): Call
5451 2016-09-11 Le-Chun Wu <lcwu@google.com>
5452 Mark Wielaard <mjw@redhat.com>
5454 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
5455 to the given -Wshadow= variant.
5457 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
5459 * c-typeck.c: Include memmodel.h.
5461 2016-10-13 Jakub Jelinek <jakub@redhat.com>
5464 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
5465 instead of lhd_return_null_tree_v.
5467 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
5470 * c-decl.c (smallest_type_quals_location): New static function.
5471 (grokdeclarator): Try to find the correct location for an ignored
5474 2016-09-26 Marek Polacek <polacek@redhat.com>
5477 * c-decl.c (pop_scope): Add gcc_fallthrough.
5479 2016-09-26 Marek Polacek <polacek@redhat.com>
5482 * c-parser.c (struct c_token): Add flags field.
5483 (c_lex_one_token): Pass it to c_lex_with_flags.
5484 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
5485 into IFN_FALLTHROUGH.
5486 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
5487 attribute fallthrough after a case label or default label.
5488 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
5490 2016-09-24 Marek Polacek <polacek@redhat.com>
5493 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
5494 have boolean value. Warn about ++/-- on booleans.
5496 2016-09-23 Jakub Jelinek <jakub@redhat.com>
5498 * c-parser.c (incomplete_record_decls): Remove unnecessary
5499 = vNULL initialization of file scope vec.
5501 2016-09-16 Marek Polacek <polacek@redhat.com>
5503 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
5505 2016-09-14 Marek Polacek <polacek@redhat.com>
5507 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
5508 (fix_array_notation_expr): Likewise.
5509 * c-decl.c (finish_decl): Likewise.
5510 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5511 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
5512 (function_to_pointer_conversion): Use false instead of 0.
5513 (convert_lvalue_to_rvalue): Likewise.
5514 (parser_build_unary_op): Likewise.
5515 (build_atomic_assign): Likewise.
5516 (build_unary_op): Change nonconvert parameter type to bool, use
5517 true/false instead of 1/0.
5518 (build_binary_op): Use true instead of 1.
5520 2016-09-13 David Malcolm <dmalcolm@redhat.com>
5522 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
5523 of add_fixit_insert to add_fixit_insert_before.
5525 2016-09-13 Marek Polacek <polacek@redhat.com>
5527 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
5530 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
5533 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
5534 COMPOUND_EXPR to warn_for_omitted_condop.
5536 2016-09-07 David Malcolm <dmalcolm@redhat.com>
5538 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
5539 c_get_substring_location for this new langhook.
5541 2016-09-02 Jakub Jelinek <jakub@redhat.com>
5544 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
5546 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
5547 instead of mark_exp_read on low_bound/length expression.
5548 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
5549 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5550 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5551 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
5552 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
5553 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
5554 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
5555 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
5556 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
5557 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
5558 instead of mark_expr_read.
5559 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
5560 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
5561 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
5562 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
5563 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
5564 array section bases outside of depend clause, for depend clause
5565 use convert_lvalue_to_rvalue on the base.
5566 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
5567 linear, aligned, map, to and from clauses.
5568 (c_omp_clause_copy_ctor): New function.
5570 2016-09-01 Marek Polacek <polacek@redhat.com>
5573 * c-typeck.c (composite_type): Add FALLTHRU comment.
5575 2016-08-31 David Malcolm <dmalcolm@redhat.com>
5577 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
5578 to the insertion fixits for "struct", "union", and "enum".
5580 2016-08-30 David Malcolm <dmalcolm@redhat.com>
5582 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
5583 rather than add_fixit_misspelled_id.
5584 (undeclared_variable): Likewise.
5585 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
5586 now-redundant "here" params from add_fixit_insert method calls.
5587 (c_parser_parameter_declaration): Likewise.
5588 * c-typeck.c (build_component_ref): Remove now-redundant range
5589 param from add_fixit_replace method calls.
5591 2016-08-25 Marek Polacek <polacek@redhat.com>
5593 * c-typeck.c (parser_build_binary_op): Pass LHS to
5594 warn_logical_not_parentheses.
5596 2016-08-25 Marek Polacek <polacek@redhat.com>
5599 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
5600 or _FloatN or _FloatNx is not supported.
5601 (finish_declspecs): Set type to integer_type_node when _FloatN or
5602 _FloatNx is not supported.
5604 2016-08-19 Joseph Myers <joseph@codesourcery.com>
5607 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
5608 (struct c_declspecs): Add field floatn_nx_idx.
5609 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
5610 and _FloatNx type specifiers.
5611 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
5612 (c_parser_declspecs, c_parser_attribute_any_word)
5613 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
5614 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
5615 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
5616 narrower than double.
5618 2016-08-12 Jakub Jelinek <jakub@redhat.com>
5619 Martin Liska <mliska@suse.cz>
5622 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
5623 % to determine val element to change. Assert that
5624 wchar_bytes * charwidth fits into val array.
5626 2016-08-12 Marek Polacek <polacek@redhat.com>
5629 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
5630 (c_parser_postfix_expression): Likewise.
5631 * c-typeck.c (build_unary_op): Adjust fall through comment.
5632 (c_mark_addressable): Likewise.
5634 2016-08-11 Jakub Jelinek <jakub@redhat.com>
5637 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
5638 array member through typedef, for orig_qual_indirect == 0 clear
5641 2016-08-08 David Malcolm <dmalcolm@redhat.com>
5644 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
5645 this up to selftest::run_c_tests.
5646 (selftest::run_c_tests): New function.
5648 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
5650 * c-parser.c (struct oacc_routine_data): Add error_seen and
5651 fndecl_seen members.
5652 (c_finish_oacc_routine): Use these.
5653 (c_parser_declaration_or_fndef): Adjust.
5654 (c_parser_oacc_routine): Likewise. Support more C language
5655 constructs, and improve diagnostics. Move pragma context
5657 (c_parser_pragma): ... here.
5659 * c-parser.c (struct oacc_routine_data): New.
5660 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
5662 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
5663 declare target" attribute.
5665 2016-08-01 Jan Beulich <jbeulich@suse.com>
5667 * c-fold.c (c_fully_fold_internal): Also emit shift count
5668 warnings for vector types.
5669 * c-typeck.c (build_binary_op): Likewise.
5671 2016-07-29 Marek Polacek <polacek@redhat.com>
5674 * c-decl.c (finish_struct): Rephrase an error message.
5677 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
5678 to error node for invalid code.
5681 * c-decl.c (implicitly_declare): Return decl early not only for
5682 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
5684 2016-07-29 Jakub Jelinek <jakub@redhat.com>
5687 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
5688 on GNU extern inline functions.
5690 2016-07-29 Marek Polacek <polacek@redhat.com>
5693 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
5696 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
5698 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
5700 2016-07-20 David Malcolm <dmalcolm@redhat.com>
5702 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
5704 (best_macro_match): Likewise, converting from a typedef to a
5706 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
5707 (lookup_name_fuzzy): Update for change of best_macro_match to a
5708 subclass with a ctor that calls cpp_forall_identifiers.
5710 2016-07-20 David Malcolm <dmalcolm@redhat.com>
5712 * c-decl.c (implicit_decl_warning): Update for conversion of
5713 return type of lookup_name_fuzzy to const char *.
5714 (undeclared_variable): Likewise.
5715 (lookup_name_fuzzy): Convert return type from tree to
5717 * c-parser.c (c_parser_declaration_or_fndef): Update for
5718 conversion of return type of lookup_name_fuzzy to const char *.
5719 (c_parser_parameter_declaration): Likewise.
5721 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
5723 * c-parser.c (c_parser_oacc_declare): Don't scan for
5725 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
5726 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
5727 zero-length subarrays.
5729 2016-07-15 Jakub Jelinek <jakub@redhat.com>
5732 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
5733 instead of FUZZY_LOOKUP_NAME.
5734 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
5735 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
5737 2016-07-14 Jakub Jelinek <jakub@redhat.com>
5740 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
5742 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5744 * c-parser.c (c_parser_generic_selection): Make type of variable
5746 (c_parser_omp_declare_simd): Likewise.
5748 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5750 * c-decl.c (struct c_struct_parse_info): Change member types
5751 from vec to auto_vec.
5752 (start_struct): Adjust.
5753 (finish_struct): Likewise.
5755 2016-07-02 Jakub Jelinek <jakub@redhat.com>
5758 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
5760 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
5762 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
5763 Move pragma context checking into...
5764 (c_parser_omp_cancellation_point): ... here, and improve
5765 diagnostic messages.
5766 * c-typeck.c (c_finish_omp_cancel)
5767 (c_finish_omp_cancellation_point): Improve diagnostic messages.
5769 2016-06-29 Jakub Jelinek <jakub@redhat.com>
5772 * c-typeck.c (c_build_qualified_type): Don't clear
5773 C_TYPE_INCOMPLETE_VARS for the main variant.
5775 2016-06-28 Martin Sebor <msebor@redhat.com>
5778 * c-typeck.c (output_init_element): Diagnose incompatible types
5779 before non-constant initializers.
5781 2016-06-28 Jakub Jelinek <jakub@redhat.com>
5783 * Make-lang.in: Don't cat ../stage_current if it does not exist.
5785 2016-06-23 Andi Kleen <ak@linux.intel.com>
5787 * Make-lang.in: Add support for autofdo.
5789 2016-06-22 David Malcolm <dmalcolm@redhat.com>
5792 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
5793 (implicit_decl_warning): When issuing warnings for implicit
5794 declarations, attempt to provide a suggestion via
5796 (undeclared_variable): Likewise when issuing errors.
5797 (lookup_name_in_scope): Likewise.
5798 (struct edit_distance_traits<cpp_hashnode *>): New struct.
5799 (best_macro_match): New typedef.
5800 (find_closest_macro_cpp_cb): New function.
5801 (lookup_name_fuzzy): New function.
5802 * c-parser.c: Include gcc-rich-location.h.
5803 (c_token_starts_typename): Split out case CPP_KEYWORD into...
5804 (c_keyword_starts_typename): ...this new function.
5805 (c_parser_declaration_or_fndef): When issuing errors about
5806 missing "struct" etc, add a fixit. For other kinds of errors,
5807 attempt to provide a suggestion via lookup_name_fuzzy.
5808 (c_parser_parms_declarator): When looking ahead to detect typos in
5809 type names, also reject CPP_KEYWORD.
5810 (c_parser_parameter_declaration): When issuing errors about
5811 unknown type names, attempt to provide a suggestion via
5813 * c-tree.h (c_keyword_starts_typename): New prototype.
5815 2016-06-20 Joseph Myers <joseph@codesourcery.com>
5818 * c-typeck.c (build_conditional_expr): Return error_mark_node if
5819 c_common_type returns error_mark_node.
5821 2016-06-19 Martin Sebor <msebor@redhat.com>
5824 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
5825 __alignof__ (expression).
5827 2016-06-14 David Malcolm <dmalcolm@redhat.com>
5829 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
5831 2016-06-14 David Malcolm <dmalcolm@redhat.com>
5833 * c-typeck.c (build_component_ref): Simplify fixit code by
5834 using gcc_rich_location::add_fixit_misspelled_id.
5835 (set_init_label): Likewise.
5837 2016-06-13 David Malcolm <dmalcolm@redhat.com>
5839 * c-parser.c (c_parser_initelt): Provide location of name for new
5840 location_t param of set_init_label.
5841 * c-tree.h (set_init_label): Add location_t param.
5842 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
5843 param and use it when issuing error messages about unrecognized
5844 field names. Attempt to provide a fixit hint if appropriate,
5845 otherwise update the error message to provide the type name.
5847 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
5850 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
5853 2016-06-08 Martin Sebor <msebor@redhat.com>
5854 Jakub Jelinek <jakub@redhat.com>
5858 * c-typeck.c (convert_arguments): Don't promote last argument
5859 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
5861 2016-06-08 Marek Polacek <polacek@redhat.com>
5864 * c-decl.c (grokdeclarator): Check TYPE_P.
5867 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
5870 2016-06-07 David Malcolm <dmalcolm@redhat.com>
5872 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
5873 and structure element reference, capture the location of the
5874 element name token and pass it to build_component_ref.
5875 (c_parser_postfix_expression_after_primary): Likewise for
5876 structure element dereference.
5877 (c_parser_omp_variable_list): Likewise for
5878 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
5879 * c-tree.h (build_component_ref): Add location_t param.
5880 * c-typeck.c (build_component_ref): Add location_t param
5881 COMPONENT_LOC. Use it, if available, when issuing hints about
5882 mispelled member names to provide a fixit replacement hint.
5884 2016-06-06 Marek Polacek <polacek@redhat.com>
5887 * c-parser.c (c_parser_direct_declarator): Set location.
5889 2016-06-06 Marek Polacek <polacek@redhat.com>
5891 * c-typeck.c (comptypes_internal): Handle comparisons of
5892 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
5893 TYPE_REF_CAN_ALIAS_ALL.
5895 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
5897 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
5898 arguments as addressable when async clause exists.
5900 2016-05-30 Jakub Jelinek <jakub@redhat.com>
5903 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
5904 when combined with target construct.
5906 2016-05-26 Jakub Jelinek <jakub@redhat.com>
5908 * c-parser.c (c_parser_omp_clause_schedule): Warn if
5909 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
5911 2016-05-25 Marek Polacek <polacek@redhat.com>
5914 * c-decl.c (c_make_fname_decl): Don't check seen_error.
5917 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
5919 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
5921 * c-parser.c (c_parser_oacc_declare): Add support for
5922 GOMP_MAP_FIRSTPRIVATE_POINTER.
5923 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
5924 argument with enum c_omp_region_type ort.
5925 (handle_omp_array_sections): Likewise. Update call to
5926 handle_omp_array_sections_1.
5927 (c_finish_omp_clauses): Add specific errors and warning messages for
5928 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
5929 call to handle_omp_array_sections.
5931 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
5933 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
5935 2016-05-24 Richard Biener <rguenther@suse.de>
5939 * c-typeck.c (build_array_ref): Do not complain about indexing
5940 non-lvalue vectors. Adjust for function name change.
5942 2016-05-20 Martin Sebor <msebor@redhat.com>
5945 * c-typeck.c (error_init): Use
5946 expansion_point_location_if_in_system_header.
5947 (warning_init): Same.
5949 2016-05-19 David Malcolm <dmalcolm@redhat.com>
5952 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
5954 (c_parser_postfix_expression): Likewise.
5955 * c-tree.h (c_expr::set_error): New method.
5956 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
5957 that result's range is initialized.
5959 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
5961 * c-typeck.c (parser_build_unary_op): Fix formatting.
5963 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
5965 * c-decl.c (grokdeclarator): Remove errmsg and use of
5966 targetm.invalid_return_type.
5967 (grokparms): Remove errmsg and use of
5968 targetm.invalid_parameter_type.
5970 2016-05-13 Joseph Myers <joseph@codesourcery.com>
5972 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
5973 function return type.
5975 2016-05-12 Marek Polacek <polacek@redhat.com>
5978 * c-decl.c (build_compound_literal): Pass LOC down to
5979 c_incomplete_type_error.
5980 * c-tree.h (require_complete_type): Adjust declaration.
5981 (c_incomplete_type_error): Likewise.
5982 * c-typeck.c (require_complete_type): Add location parameter, pass it
5983 down to c_incomplete_type_error.
5984 (c_incomplete_type_error): Add location parameter, pass it down to
5986 (build_component_ref): Pass location down to c_incomplete_type_error.
5987 (default_conversion): Pass location down to require_complete_type.
5988 (build_array_ref): Likewise.
5989 (build_function_call_vec): Likewise.
5990 (convert_arguments): Likewise.
5991 (build_unary_op): Likewise.
5992 (build_c_cast): Likewise.
5993 (build_modify_expr): Likewise.
5994 (convert_for_assignment): Likewise.
5995 (c_finish_omp_clauses): Likewise.
5997 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
6000 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
6002 * c-errors.c (pedwarn_c90): Return true if warned.
6003 * c-tree.h (pedwarn_c90): Change return type to bool.
6004 (enum c_declspec_word): Add new enumerator cdw_atomic.
6006 2016-05-11 Marek Polacek <polacek@redhat.com>
6009 * c-decl.c (diagnose_mismatched_decls): Factor out code to
6010 diagnose_mismatched_attributes and call it.
6012 2016-05-10 Marek Polacek <polacek@redhat.com>
6015 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
6016 on a declaration following the definition.
6018 2016-05-05 Jakub Jelinek <jakub@redhat.com>
6020 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
6021 parse it through to c_parser_c99_block_statement.
6022 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
6025 2016-05-04 Marek Polacek <polacek@redhat.com>
6027 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
6030 2016-05-04 Marek Polacek <polacek@redhat.com>
6033 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
6034 for macro expansions.
6036 2016-05-03 Marek Polacek <polacek@redhat.com>
6039 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
6040 check_builtin_function_arguments.
6042 2016-05-03 Richard Biener <rguenther@suse.de>
6044 * Make-lang.in (cc1-checksum.c): For stage-final re-use
6045 the checksum from the previous stage.
6047 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
6049 * c-parser.c (c_parser_oacc_all_clauses): Update call to
6050 c_finish_omp_clauses.
6051 (c_parser_omp_all_clauses): Likewise.
6052 (c_parser_oacc_cache): Likewise.
6053 (c_parser_oacc_loop): Likewise.
6054 (omp_split_clauses): Likewise.
6055 (c_parser_omp_declare_target): Likewise.
6056 (c_parser_cilk_all_clauses): Likewise.
6057 (c_parser_cilk_for): Likewise.
6058 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
6059 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
6061 2016-05-02 Marek Polacek <polacek@redhat.com>
6064 * c-decl.c (grokdeclarator): Diagnose when array's size has an
6067 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
6070 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
6071 OACC_LOOP_CLAUSE_MASK.
6072 (c_parser_oacc_kernels_parallel): Update call to
6073 c_oacc_split_loop_clauses.
6075 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
6077 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
6078 argument to build_modify_expr in two cases.
6080 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
6082 * c-parser.c (c_parser_postfix_expression_after_primary): Call
6083 warn_for_memset instead of warning directly here.
6085 2016-04-26 Marek Polacek <polacek@redhat.com>
6088 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
6090 (c_parser_for_statement): ... here.
6091 (c_parser_if_statement): Use it.
6092 (c_parser_switch_statement): Use it.
6093 (c_parser_while_statement): Use it.
6096 * c-decl.c (pushdecl): Pass LOCUS down to warning.
6098 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
6101 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
6102 instead of c_finish_cilk_clauses.
6103 * c-tree.h (c_finish_omp_clauses): Add new default argument.
6104 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
6105 floating-point variables in the linear clause for Cilk Plus.
6107 2016-04-18 Michael Matz <matz@suse.de>
6109 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
6110 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
6112 2016-04-15 Marek Polacek <polacek@redhat.com>
6115 * c-typeck.c (build_unary_op): Pass location down to error and
6118 2016-04-15 Jakub Jelinek <jakub@redhat.com>
6121 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
6123 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
6124 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
6125 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
6126 Adjust c_parser_pragma callers.
6127 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
6129 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
6131 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
6132 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
6133 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
6134 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
6135 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
6136 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
6137 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
6138 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
6140 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
6141 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
6144 2016-04-13 Marek Polacek <polacek@redhat.com>
6147 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
6149 (c_parser_statement): Likewise.
6150 (c_parser_c99_block_statement): Likewise.
6151 (c_parser_while_statement): Likewise.
6152 (c_parser_for_statement): Likewise.
6153 (c_parser_if_body): Don't set IF_P here.
6154 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
6155 about dangling else here.
6156 * c-tree.h (c_finish_if_stmt): Adjust declaration.
6157 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
6158 warn about dangling else here.
6160 2016-04-04 Marek Polacek <polacek@redhat.com>
6163 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
6165 2016-03-31 Marek Polacek <polacek@redhat.com>
6168 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
6170 2016-03-18 David Malcolm <dmalcolm@redhat.com>
6173 * c-parser.c (c_parser_postfix_expression): Set the source range
6174 for uses of "__builtin_types_compatible_p".
6176 2016-03-17 Jakub Jelinek <jakub@redhat.com>
6179 * c-typeck.c (composite_type): Don't count void_list_node
6180 into len, if the list is terminated by void_list_node, start
6181 with void_list_node instead of NULL for newargs. Stop
6184 2016-03-16 Marek Polacek <polacek@redhat.com>
6187 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
6188 nested functions returning VM types.
6190 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
6192 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
6193 when calling c_finish_omp_clauses.
6195 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
6198 * c-decl.c (get_parm_info): Don't queue implicit function declarations
6201 2016-03-04 Marek Polacek <polacek@redhat.com>
6204 * c-parser.c (c_parser_postfix_expression): Call
6205 c_parser_cast_expression rather than c_parser_postfix_expression.
6207 2016-03-01 Jakub Jelinek <jakub@redhat.com>
6211 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
6212 of incomplete decls to error_mark_node.
6214 2016-02-24 Marek Polacek <polacek@redhat.com>
6217 * c-decl.c (finish_decl): Don't update the copy of the type of a
6218 different decl type.
6220 2016-02-23 Jakub Jelinek <jakub@redhat.com>
6223 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
6224 in id_kind reclassification.
6226 2016-02-16 Jakub Jelinek <jakub@redhat.com>
6229 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
6231 2016-02-16 James Norris <jnorris@codesourcery.com>
6234 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
6236 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
6238 * c-decl.c (build_null_declspecs): Zero the entire struct.
6241 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
6242 callers changed. If nested_p is true, use it to call
6243 finish_implicit_inits.
6244 * c-tree.h (finish_implicit_inits): Declare.
6245 * c-typeck.c (finish_implicit_inits): New function. Move code
6247 (push_init_level): ... here.
6248 (set_designator, process_init_element): Call finish_implicit_inits.
6250 2016-02-11 Jakub Jelinek <jakub@redhat.com>
6253 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
6254 arguments for -Waddress warning.
6256 2016-02-04 Jakub Jelinek <jakub@redhat.com>
6259 * c-decl.c (finish_enum): When honoring mode attribute,
6260 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
6262 2016-01-29 Jakub Jelinek <jakub@redhat.com>
6265 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
6266 all type variants, not just TYPE_MAIN_VARIANT.
6268 2016-01-27 Jakub Jelinek <jakub@redhat.com>
6271 * c-decl.c (c_write_global_declarations_1): Warn with
6272 warn_unused_function if static prototype without definition
6275 2016-01-27 Marek Polacek <polacek@redhat.com>
6278 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
6279 to unsigned, if needed. Add -Wsign-compare warning.
6281 2016-01-26 Jakub Jelinek <jakub@redhat.com>
6283 PR tree-optimization/69483
6284 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
6286 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6289 * c-tree.h (incomplete_record_decls): Declare.
6290 * c-parser.c (incomplete_record_decls): Define.
6291 (c_parser_translation_unit): Iterate through incomplete_record_decls and
6292 report error if any decl has zero size.
6293 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
6294 or enum type to incomplete_record_decls.
6296 2016-01-14 Tom de Vries <tom@codesourcery.com>
6298 PR tree-optimization/68773
6299 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
6302 2016-01-14 Marek Polacek <polacek@redhat.com>
6305 * c-decl.c (grokdeclarator): Provide more information for invalid
6308 2016-01-06 David Malcolm <dmalcolm@redhat.com>
6310 * c-parser.c (c_parser_unary_expression): For dereferences, build
6311 a combined location before calling build_indirect_ref, so that
6312 error reports cover the full range, manually updating the c_expr
6315 2016-01-06 Marek Polacek <polacek@redhat.com>
6318 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
6319 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
6322 2016-01-04 Jakub Jelinek <jakub@redhat.com>
6324 Update copyright years.
6326 2016-01-04 Marek Polacek <polacek@redhat.com>
6329 * c-typeck.c (build_atomic_assign): Improve commentary. Add
6330 optimization to use __atomic_fetch_* built-in if possible.
6332 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
6334 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
6336 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
6339 2015-12-22 Marek Polacek <polacek@redhat.com>
6342 * c-typeck.c (build_component_ref): Warn when acessing elements of
6343 atomic structures or unions.
6345 2015-12-21 David Malcolm <dmalcolm@redhat.com>
6347 * c-typeck.c: Include "gcc-rich-location.h".
6348 (build_binary_op): In the two places that call binary_op_error,
6349 create a gcc_rich_location and populate it with the location of
6350 the binary op and its two operands.
6352 2015-12-16 David Malcolm <dmalcolm@redhat.com>
6354 * c-parser.c (c_parser_statement_after_labels): When calling
6355 c_finish_return, Use the return expression's location if it has
6356 one, falling back to the location of the first token within it.
6357 * c-typeck.c (c_finish_return): When issuing warnings about
6358 the incorrect presence/absence of a return value, issue a note
6359 showing the declaration of the function.
6361 2015-12-16 David Malcolm <dmalcolm@redhat.com>
6363 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
6365 (c_parser_peek_nth_token): New function.
6366 (c_parser_peek_conflict_marker): New function.
6367 (c_parser_error): Detect conflict markers and report them as such.
6369 2015-12-16 David Malcolm <dmalcolm@redhat.com>
6371 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
6372 to preserve range information for the primary expression
6373 in the call to c_parser_postfix_expression_after_primary.
6375 2015-12-16 David Malcolm <dmalcolm@redhat.com>
6377 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
6378 expression location, falling back on the first token location,
6379 rather than always using the latter.
6381 2015-12-16 Marek Polacek <polacek@redhat.com>
6384 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
6387 2015-12-15 Marek Polacek <polacek@redhat.com>
6390 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
6393 2015-12-08 David Malcolm <dmalcolm@redhat.com>
6395 * c-parser.c (c_parser_alignof_expression): Capture location of
6396 closing parenthesis (if any), or of end of unary expression, and
6397 use it to build a src_range for the expression.
6399 2015-12-08 David Malcolm <dmalcolm@redhat.com>
6402 * c-parser.c (c_parser_get_builtin_args): Add
6403 "out_close_paren_loc" param, and write back to it.
6404 (c_parser_postfix_expression): Capture the closing
6405 parenthesis location for RID_CHOOSE_EXPR,
6406 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
6407 RID_BUILTIN_SHUFFLE and use it to set the source range
6408 for such expressions; within RID_BUILTIN_COMPLEX set
6409 the underlying location.
6411 2015-12-07 Marek Polacek <polacek@redhat.com>
6414 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
6415 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
6417 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
6419 * c-tree.h (c_build_va_arg): Adjust prototype.
6420 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
6421 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
6422 parameter, adjust throughout and issue an error if EXPR is a component
6423 with reverse storage order.
6425 2015-12-02 Jason Merrill <jason@redhat.com>
6427 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
6428 (c_fully_fold_internal, decl_constant_value_for_optimization):
6429 Move from c-common.c.
6430 * c-tree.h: Declare decl_constant_value_for_optimization.
6431 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
6433 2015-12-02 Joseph Myers <joseph@codesourcery.com>
6436 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
6437 following link from declarator to next declarator. Track original
6438 qualified type and pass it to c_build_qualified_type.
6439 * c-typeck.c (c_build_qualified_type): Add arguments
6440 orig_qual_type and orig_qual_indirect.
6442 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
6444 * c-parser.c (c_parser_omp_clause_name)
6445 (c_parser_oacc_all_clauses): Alphabetical sorting.
6447 2015-12-02 Jakub Jelinek <jakub@redhat.com>
6450 * c-decl.c (get_parm_info): Use b->locus instead of input_location
6453 2015-12-01 Julian Brown <julian@codesourcery.com>
6454 Cesar Philippidis <cesar@codesourcery.com>
6455 James Norris <James_Norris@mentor.com>
6457 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
6458 (c_parser_oacc_clause_use_device): New function.
6459 (c_parser_oacc_all_clauses): Add use_device support.
6460 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
6461 (c_parser_oacc_host_data): New function.
6462 (c_parser_omp_construct): Add host_data support.
6463 * c-tree.h (c_finish_oacc_host_data): Add prototype.
6464 * c-typeck.c (c_finish_oacc_host_data): New function.
6465 (c_finish_omp_clauses): Add use_device support.
6467 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
6470 * c-decl.c: Set TYPE_PACKED in variants.
6472 2015-11-27 Martin Liska <mliska@suse.cz>
6475 * c-array-notation.c (fix_builtin_array_notation_fn):
6476 Use release_vec_vec instead of vec::release.
6477 (build_array_notation_expr): Likewise.
6478 (fix_conditional_array_notations_1): Likewise.
6479 (fix_array_notation_expr): Likewise.
6480 (fix_array_notation_call_expr): Likewise.
6482 2015-11-27 Jakub Jelinek <jakub@redhat.com>
6485 * c-parser.c (c_parser_compound_statement_nostart): If
6486 last_label is true, use pragma_stmt instead of pragma_compound
6487 as second c_parser_pragma argument.
6488 (c_parser_omp_ordered, c_parser_omp_target_update,
6489 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
6490 false as second argument to c_parser_skip_to_pragma_eol after
6491 diagnosing standalone directives used in pragma_stmt context.
6493 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
6495 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
6496 with "if (ENABLE_OFFLOADING)".
6498 2015-11-23 David Malcolm <dmalcolm@redhat.com>
6501 * c-parser.c (c_parser_postfix_expression): Set up source ranges
6502 for various Objective-C constructs: Class.name syntax,
6503 @selector(), @protocol(), @encode(), and [] message syntax.
6505 2015-11-20 David Malcolm <dmalcolm@redhat.com>
6508 * c-typeck.c (should_suggest_deref_p): New function.
6509 (build_component_ref): Special-case POINTER_TYPE when
6510 generating a "not a structure of union" error message, and
6511 suggest a "->" rather than a ".", providing a fix-it hint.
6513 2015-11-19 David Malcolm <dmalcolm@redhat.com>
6515 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
6516 candidate into a new function, find_closest_identifier.
6518 2015-11-19 Marek Polacek <polacek@redhat.com>
6521 * c-typeck.c (parser_build_binary_op): Properly handle
6522 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
6524 2015-11-17 David Malcolm <dmalcolm@redhat.com>
6526 * c-parser.c (set_c_expr_source_range): Bulletproof both
6527 overloaded implementations against NULL expr->value.
6528 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
6530 (c_parser_unary_expression): Likewise when handling addresses of
6532 (c_parser_postfix_expression): Likewise for statement expressions,
6533 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
6534 __builtin_va_arg, and for __builtin_offset_of.
6535 (c_parser_postfix_expression_after_paren_type): Initialize expr's
6536 src_range using the range of the braced initializer.
6537 (c_parser_transaction_expression): Set src_range for "ret" to a
6538 sane pair of values.
6540 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
6542 * c-parser.c (c_finish_omp_declare_simd): Look for
6543 "simd" attribute as well. Update error message.
6545 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
6547 * c-parser.c (c_parser_omp_declare_target): Adjust.
6549 2015-11-14 Jakub Jelinek <jakub@redhat.com>
6551 * c-typeck.c (c_finish_omp_clauses): Don't mark
6552 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
6554 2015-11-14 Marek Polacek <polacek@redhat.com>
6556 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
6557 * c-typeck.c: Likewise.
6559 2015-11-13 David Malcolm <dmalcolm@redhat.com>
6561 * c-decl.c (warn_defaults_to): Pass line_table to
6563 * c-errors.c (pedwarn_c99): Likewise.
6564 (pedwarn_c90): Likewise.
6565 * c-parser.c (set_c_expr_source_range): New functions.
6566 (c_token::get_range): New method.
6567 (c_token::get_finish): New method.
6568 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
6569 based on the range from the start of the LHS to the end of the
6571 (c_parser_conditional_expression): Likewise, based on the range
6572 from the start of the cond.value to the end of exp2.value.
6573 (c_parser_binary_expression): Call set_c_expr_source_range on
6574 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
6575 (c_parser_cast_expression): Call set_c_expr_source_range on ret
6576 based on the cast_loc through to the end of the expr.
6577 (c_parser_unary_expression): Likewise, based on the
6578 op_loc through to the end of op.
6579 (c_parser_sizeof_expression) Likewise, based on the start of the
6580 sizeof token through to either the closing paren or the end of
6582 (c_parser_postfix_expression): Likewise, using the token range,
6583 or from the open paren through to the close paren for
6584 parenthesized expressions.
6585 (c_parser_postfix_expression_after_primary): Likewise, for
6586 various kinds of expression.
6587 * c-tree.h (struct c_expr): Add field "src_range".
6588 (c_expr::get_start): New method.
6589 (c_expr::get_finish): New method.
6590 (set_c_expr_source_range): New decls.
6591 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
6592 on ret for prefix unary ops.
6593 (parser_build_binary_op): Likewise, running from the start of
6594 arg1.value through to the end of arg2.value.
6596 2015-11-13 Marek Polacek <polacek@redhat.com>
6599 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
6601 2015-11-13 David Malcolm <dmalcolm@redhat.com>
6603 * c-typeck.c: Include spellcheck.h.
6604 (lookup_field_fuzzy_find_candidates): New function.
6605 (lookup_field_fuzzy): New function.
6606 (build_component_ref): If the field was not found, try using
6607 lookup_field_fuzzy and potentially offer a suggestion.
6609 2015-11-12 James Norris <jnorris@codesourcery.com>
6610 Joseph Myers <joseph@codesourcery.com>
6612 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
6613 (c_parser_omp_clause_name): Handle 'device_resident' clause.
6614 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
6615 and PRAGMA_OMP_CLAUSE_LINK.
6616 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
6617 and PRAGMA_OACC_CLAUSE_LINK.
6618 (OACC_DECLARE_CLAUSE_MASK): New definition.
6619 (c_parser_oacc_declare): New function.
6621 2015-11-12 Marek Polacek <polacek@redhat.com>
6624 * c-parser.c (c_parser_for_statement): Reclassify the token in
6627 2015-11-11 Marek Polacek <polacek@redhat.com>
6631 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
6632 checking the size of an array.
6634 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
6636 * c-array-notation.c: Remove unused header files.
6637 * c-aux-info.c: Likewise.
6638 * c-convert.c: Likewise.
6639 * c-decl.c: Likewise.
6640 * c-errors.c: Likewise.
6641 * c-lang.c: Likewise.
6642 * c-objc-common.c: Likewise.
6643 * c-parser.c: Likewise.
6644 * c-typeck.c: Likewise.
6645 * gccspec.c: Likewise.
6647 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
6648 Cesar Philippidis <cesar@codesourcery.com>
6649 James Norris <jnorris@codesourcery.com>
6650 Julian Brown <julian@codesourcery.com>
6651 Nathan Sidwell <nathan@codesourcery.com>
6653 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
6655 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
6656 (c_parser_pragma): Parse 'acc routine'.
6657 (OACC_ROUTINE_CLAUSE_MARK): Define.
6658 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
6660 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
6663 * c-typeck.c (c_finish_loop): For unconditional loops, set the
6664 location of the backward-goto to the start of the loop body.
6666 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
6669 * c-parser.c (c_parser_while_statement): Finish the loop before
6670 parsing ahead for misleading indentation.
6671 (c_parser_for_statement): Likewise.
6673 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
6675 * c-decl.c (finish_struct): If the structure has reverse storage
6676 order, rewrite the type of array fields with scalar component. Call
6677 maybe_apply_pragma_scalar_storage_order on entry.
6678 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
6679 errors on bit-fields and reverse SSO here and not...
6680 (c_mark_addressable): ...here.
6681 (output_init_element): Adjust call to initializer_constant_valid_p.
6682 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
6684 2015-11-06 David Malcolm <dmalcolm@redhat.com>
6686 * c-decl.c (warn_defaults_to): Update for change in signature
6687 of diagnostic_set_info.
6688 * c-errors.c (pedwarn_c99): Likewise.
6689 (pedwarn_c90): Likewise.
6690 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
6691 for textinfo::set_location.
6693 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
6694 Thomas Schwinge <thomas@codesourcery.com>
6695 James Norris <jnorris@codesourcery.com>
6697 * c-parser.c (c_parser_omp_clause_name): Add support for
6698 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
6699 (c_parser_omp_clause_default): Add is_oacc argument. Handle
6700 default(none) in OpenACC.
6701 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
6703 (c_parser_oacc_clause_tile): New function.
6704 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
6705 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
6706 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
6708 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
6709 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
6711 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
6712 (c_parser_oacc_update): Update the error message for missing clauses.
6713 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
6714 and OMP_CLAUSE_INDEPENDENT.
6716 2015-11-05 Marek Polacek <polacek@redhat.com>
6719 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
6720 deal with pre-evaluation on invalid types.
6722 2015-11-05 Jakub Jelinek <jakub@redhat.com>
6723 Ilya Verbin <ilya.verbin@intel.com>
6725 * c-parser.c: Include context.h and gimple-expr.h.
6726 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
6727 monotonic together with nonmonotonic.
6728 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
6729 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
6730 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
6731 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
6732 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
6733 expressions on combined target teams before the target.
6734 (c_parser_omp_declare_target): If decl has "omp declare target" or
6735 "omp declare target link" attribute, and cgraph or varpool node already
6736 exists, then set corresponding flags. Call c_finish_omp_clauses
6737 in the parenthesized extended-list syntax case.
6738 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
6740 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
6741 on OMP_CLAUSE_REDUCTION array sections.
6742 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
6743 into the constant offset, or for variable low-bound using
6744 POINTER_PLUS_EXPR. For structure element based array sections use
6745 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
6746 (c_finish_omp_clauses): Drop generic_field_head, structure
6747 elements are now always mapped even as array section bases,
6748 diagnose same var in data sharing and mapping clauses. Diagnose if
6749 linear step on declare simd is neither a constant nor a uniform
6750 parameter. Look through POINTER_PLUS_EXPR for array section
6751 reductions. Diagnose the same var or function appearing multiple
6752 times on the same directive. Fix up wording for the to clause if t
6753 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
6754 modifier on kinds other than dynamic or guided or nonmonotonic
6755 modifier together with ordered clause.
6757 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
6758 Chung-Lin Tang <cltang@codesourcery.com>
6760 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
6762 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
6764 * c-array-notation.c: Reorder #include's and remove duplicates.
6765 * c-aux-info.c: Likewise.
6766 * c-convert.c: Likewise.
6767 * c-decl.c: Likewise.
6768 * c-errors.c: Likewise.
6769 * c-lang.c: Likewise.
6770 * c-objc-common.c: Likewise.
6771 * c-parser.c: Likewise.
6772 * c-typeck.c: Likewise.
6774 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
6777 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
6778 after calling build_qualified_type.
6780 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
6781 Thomas Schwinge <thomas@codesourcery.com>
6782 James Norris <jnorris@codesourcery.com>
6783 Joseph Myers <joseph@codesourcery.com>
6784 Julian Brown <julian@codesourcery.com>
6785 Bernd Schmidt <bschmidt@redhat.com>
6787 * c-parser.c (c_parser_oacc_shape_clause): New.
6788 (c_parser_oacc_simple_clause): New.
6789 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
6790 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
6792 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
6793 James Norris <jnorris@codesourcery.com>
6794 Cesar Philippidis <cesar@codesourcery.com>
6798 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
6799 parameters, and handle these. Adjust all users.
6800 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
6802 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
6804 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
6806 (c_finish_omp_construct): Declare function.
6807 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
6808 Merge functions into...
6809 (c_finish_omp_construct): ... this new function.
6811 2015-10-22 Richard Biener <rguenther@suse.de>
6813 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
6814 before folding a MINUS_EXPR.
6816 2015-10-21 Marek Polacek <polacek@redhat.com>
6819 * c-decl.c (start_function): Warn about vararg functions without
6822 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
6824 * c-typeck.c (build_conditional_expr): Use boolean vector
6825 type for vector comparison.
6826 (build_vec_cmp): New.
6827 (build_binary_op): Use build_vec_cmp for comparison.
6829 2015-10-20 Marek Polacek <polacek@redhat.com>
6831 * c-parser.c (is_cilkplus_vector_p): Don't define here.
6833 2015-10-20 Marek Polacek <polacek@redhat.com>
6836 * c-parser.c (c_parser_attributes): Break out of the loop if the
6837 token after an attribute isn't a comma.
6839 2015-10-13 Jakub Jelinek <jakub@redhat.com>
6840 Aldy Hernandez <aldyh@redhat.com>
6842 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
6843 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
6844 (c_parser_omp_variable_list): Handle structure elements for
6845 map, to and from clauses. Handle array sections in reduction
6846 clause. Formatting fixes.
6847 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
6848 if clause modifiers.
6849 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
6850 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
6851 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
6852 c_parser_omp_clause_is_device_ptr): New functions.
6853 (c_parser_omp_clause_ordered): Parse optional parameter.
6854 (c_parser_omp_clause_reduction): Handle array reductions.
6855 (c_parser_omp_clause_schedule): Parse optional simd modifier.
6856 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
6858 (c_parser_omp_clause_linear): Parse linear clause modifiers.
6859 (c_parser_omp_clause_depend_sink): New function.
6860 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
6861 (c_parser_omp_clause_map): Parse release/delete map kinds and
6862 optional always modifier.
6863 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
6864 and c_finish_omp_clauses callers.
6865 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
6866 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
6867 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
6868 (OMP_CRITICAL_CLAUSE_MASK): Define.
6869 (c_parser_omp_critical): Parse critical clauses.
6870 (c_parser_omp_for_loop): Handle doacross loops, adjust
6871 c_finish_omp_for and c_finish_omp_clauses callers.
6872 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
6873 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
6874 (OMP_FOR_CLAUSE_MASK): Add linear clause.
6875 (c_parser_omp_for): Disallow ordered clause when combined with
6876 distribute. Disallow linear clause when combined with distribute
6877 and not combined with simd.
6878 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
6879 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
6880 parse clauses and if depend clause is found, don't parse a body.
6881 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
6882 Allow target parallel without for after it.
6883 (OMP_TASK_CLAUSE_MASK): Add priority clause.
6884 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
6885 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
6887 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
6888 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
6889 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
6890 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
6892 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
6893 defaultmap and is_device_ptr clauses.
6894 (c_parser_omp_target): Parse target parallel and target simd. Set
6895 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
6896 and target exit data. Diagnose invalid map kinds.
6897 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
6898 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
6900 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
6902 (OMP_TASKLOOP_CLAUSE_MASK): Define.
6903 (c_parser_omp_taskloop): New function.
6904 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
6905 handle PRAGMA_OMP_TASKLOOP.
6906 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
6907 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
6908 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
6909 Add IS_OMP argument, handle structure element bases, diagnose
6910 bitfields, pass IS_OMP recursively, diagnose known zero length
6911 array sections in depend clauses, handle array sections in reduction
6912 clause, diagnose negative length even for pointers.
6913 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
6914 types, pass IS_OMP down to handle_omp_array_sections_1, handle
6915 array sections in reduction clause, set
6916 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
6917 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
6918 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
6919 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
6921 2015-10-06 Marek Polacek <polacek@redhat.com>
6923 * c-parser.c (c_parser_statement_after_labels): Use
6924 protected_set_expr_location.
6925 (c_parser_omp_clause_num_gangs): Likewise.
6926 (c_parser_omp_clause_num_threads): Likewise.
6927 (c_parser_omp_clause_num_workers): Likewise.
6928 (c_parser_omp_clause_vector_length): Likewise.
6929 (c_parser_omp_clause_num_teams): Likewise.
6930 (c_parser_omp_clause_thread_limit): Likewise.
6931 * c-typeck.c (build_c_cast): Likewise.
6932 (c_cast_expr): Likewise.
6934 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
6936 * c-typeck.c (c_tree_equal): Use real_equal instead of
6939 2015-10-04 Jason Merrill <jason@redhat.com>
6941 * c-parser.c (c_lex_one_token): Handle @synchronized.
6942 * c-decl.c (match_builtin_function_types): A declaration of a built-in
6943 can change whether the function is transaction_safe.
6945 2015-10-02 Marek Polacek <polacek@redhat.com>
6948 * c-typeck.c (convert_for_assignment): Use the expansion point
6949 location throughout.
6951 2015-10-02 Marek Polacek <polacek@redhat.com>
6954 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
6955 and pass it down to c_parser_if_statement.
6956 (c_parser_else_body): Add CHAIN parameter and pass it down to
6957 c_parser_statement_after_labels.
6958 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
6959 duplicated if-else-if conditions.
6961 2015-10-01 Marek Polacek <polacek@redhat.com>
6963 * c-typeck.c (convert_for_assignment): Improve commentary.
6965 2015-09-30 Marek Polacek <polacek@redhat.com>
6968 * c-typeck.c (c_finish_return): Use the expansion point location for
6969 certain "return with value" warnings.
6971 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6973 * c-parser.c (pragma_lex): Add loc argument.
6975 2015-09-15 Marek Polacek <polacek@redhat.com>
6978 * c-decl.c (tag_exists_p): New function.
6979 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
6980 struct/union/enum keywords are missing.
6981 * c-tree.h (tag_exists_p): Declare.
6983 2015-09-15 Marek Polacek <polacek@redhat.com>
6985 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
6986 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
6987 Return NULL_TREE instead of 0.
6988 (lookup_name): Return NULL_TREE instead of 0.
6989 (lookup_name_in_scope): Likewise.
6990 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
6991 (parser_xref_tag): Use false instead of 0.
6992 (start_struct): Use true instead of 1.
6993 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
6995 2015-09-14 Marek Polacek <polacek@redhat.com>
6997 * c-typeck.c (set_nonincremental_init_from_string): Use
6998 HOST_WIDE_INT_M1U when shifting a negative value.
7000 2015-09-09 Mark Wielaard <mjw@redhat.com>
7002 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
7005 2015-09-10 Jakub Jelinek <jakub@redhat.com>
7008 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
7009 into OMP_FOR_PRE_BODY rather than before the loop.
7011 2015-09-09 Jakub Jelinek <jakub@redhat.com>
7014 * c-parser.c (c_parser_oacc_all_clauses,
7015 c_parser_omp_all_clauses): Remove invalid clause from
7016 list of clauses even if parser->error is set.
7019 * c-parser.c (c_parser_omp_clause_aligned,
7020 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
7022 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
7026 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
7027 instead of c_parser_unary_expression. If the result is !lvalue_p,
7028 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
7030 2015-09-04 Marek Polacek <polacek@redhat.com>
7033 * c-typeck.c (build_binary_op): Don't instrument static initializers.
7035 2015-09-03 Martin Sebor <msebor@redhat.com>
7038 * c-typeck.c (convert_arguments, parser_build_unary_op,
7039 build_conditional_expr, c_cast_expr, convert_for_assignment,
7040 build_binary_op, _objc_common_truthvalue_conversion): Call
7042 (c_decl_implicit): Define.
7044 2015-09-02 Marek Polacek <polacek@redhat.com>
7047 * c-parser.c (c_parser_enum_specifier): Give a better error for
7050 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
7052 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
7054 2015-08-12 Marek Polacek <polacek@redhat.com>
7056 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
7059 2015-08-03 Marek Polacek <polacek@redhat.com>
7062 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
7064 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
7066 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7068 * c-parser.c (c_parser_if_body): Take token_indent_info
7069 argument. Call warn_for_misleading_indentation even when the
7070 body is a semicolon. Extract token_indent_infos corresponding
7071 to the guard, body and next tokens. Adjust call to
7072 warn_for_misleading_indentation accordingly.
7073 (c_parser_else_body): Likewise.
7074 (c_parser_if_statement): Likewise.
7075 (c_parser_while_statement): Likewise.
7076 (c_parser_for_statement): Likewise.
7078 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
7079 Manuel López-Ibáñez <manu@gcc.gnu.org>
7081 * c-decl.c (get_parm_info): Remove static var. Update warning
7084 2015-07-27 Marek Polacek <polacek@redhat.com>
7088 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
7090 2015-07-20 Marek Polacek <polacek@redhat.com>
7093 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
7094 (build_binary_op): Warn about left shift overflows.
7096 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
7098 * c-array-notation.c: Adjust includes for flags.h changes.
7099 * c-objc-common.c: Likewise.
7101 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
7103 * c-array-notation.c: Adjust includes.
7104 * c-aux-info.c: Likewise.
7105 * c-convert.c: Likewise.
7106 * c-decl.c: Likewise.
7107 * c-errors.c: Likewise.
7108 * c-lang.c: Likewise.
7109 * c-objc-common.c: Likewise.
7110 * c-parser.c: Likewise.
7111 * c-typeck.c: Likewise.
7113 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7116 * c-decl.c (finish_function): Call do_warn_unused_parameter.
7118 2015-06-29 Marek Polacek <polacek@redhat.com>
7121 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
7122 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
7123 about -Wswitch-bool here.
7124 (do_case): Update c_add_case_label call.
7125 (c_finish_case): Update c_do_switch_warnings call.
7127 2015-06-27 Marek Polacek <polacek@redhat.com>
7129 * c-typeck.c: Use VECTOR_TYPE_P throughout.
7131 2015-06-26 Marek Polacek <polacek@redhat.com>
7133 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7135 * c-typeck.c (array_to_pointer_conversion): Likewise.
7136 (build_unary_op): Likewise.
7137 (c_finish_return): Likewise.
7139 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
7141 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
7142 * c-parser.c: Likewise.
7144 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
7146 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
7147 instead of pointer_hash.
7148 (detect_field_duplicates): Likewise.
7150 2015-06-25 Marek Polacek <polacek@redhat.com>
7152 * c-array-notation.c: Use VAR_P throughout.
7153 * c-decl.c: Likewise.
7154 * c-objc-common.c: Likewise.
7155 * c-parser.c: Likewise.
7156 * c-typeck.c: Likewise.
7158 2015-06-25 Marek Polacek <polacek@redhat.com>
7160 * c-decl.c: Use is_global_var throughout.
7161 * c-parser.c: Likewise.
7162 * c-typeck.c: Likewise.
7164 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
7166 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
7167 * c-aux-info.c: Likewise.
7168 * c-convert.c: Likewise.
7169 * c-decl.c: Likewise.
7170 * c-errors.c: Likewise.
7171 * c-lang.c: Likewise.
7172 * c-objc-common.c: Likewise.
7173 * c-parser.c: Likewise.
7174 * c-typeck.c: Likewise.
7176 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
7179 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
7182 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
7184 * c-decl.c (pop_scope): Register the main translation unit
7185 through the new debug hook.
7187 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
7189 * c-array-notation.c : Adjust include files.
7190 * c-aux-info.c : Likewise.
7191 * c-convert.c : Likewise.
7192 * c-decl.c : Likewise.
7193 * c-errors.c : Likewise.
7194 * c-lang.c : Likewise.
7195 * c-lang.h : Likewise.
7196 * c-objc-common.c : Likewise.
7197 * c-parser.c : Likewise.
7198 * c-typeck.c : Likewise.
7200 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
7202 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
7203 immediately clobber it.
7204 (c_write_global_declarations_1): Remove call to
7205 check_global_declaration_1.
7206 (c_write_global_declarations_2): Remove.
7207 (c_write_final_cleanups): Rename from c_write_global_declarations.
7208 Remove call to finalize_compilation_unit.
7209 Remove calls to debugging hooks.
7210 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
7211 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
7212 * c-tree.h: Remove c_write_global_declarations.
7214 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
7216 * c-array-notation.c: Adjust includes for restructured coretypes.h.
7217 * c-aux-info.c: Likewise.
7218 * c-convert.c: Likewise.
7219 * c-decl.c: Likewise.
7220 * c-errors.c: Likewise.
7221 * c-lang.c: Likewise.
7222 * c-objc-common.c: Likewise.
7223 * c-parser.c: Likewise.
7224 * c-typeck.c: Likewise.
7226 2015-06-04 Marek Polacek <polacek@redhat.com>
7229 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
7232 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7234 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
7235 Warn for empty struct.
7236 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
7238 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
7240 * c-decl.c (start_function): Call plugin before parsing.
7241 (finish_function): Call plugin after parsing.
7243 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7246 * c-decl.c (merge_decls): Merge DECL_COMMON.
7248 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
7250 * Make-lang.in (check_gcc_pallelize): Define.
7252 2015-05-22 Marek Polacek <polacek@redhat.com>
7255 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
7258 2015-05-21 Marek Polacek <polacek@redhat.com>
7260 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
7263 2015-05-20 Marek Polacek <polacek@redhat.com>
7265 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
7266 * c-typeck.c: Likewise.
7268 2015-05-19 Marek Polacek <polacek@redhat.com>
7270 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
7272 2015-05-19 Jakub Jelinek <jakub@redhat.com>
7275 * c-parser.c (c_parser_omp_for_loop): Don't add
7276 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
7277 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
7278 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
7281 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
7283 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
7286 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
7289 * c-objc-common.c (c_tree_printer): Replace locus pointer with
7292 2015-05-14 Marek Polacek <polacek@redhat.com>
7296 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
7299 2015-05-12 David Malcolm <dmalcolm@redhat.com>
7301 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
7302 to add a call to warn_for_misleading_indentation.
7303 (c_parser_else_body): Likewise, adding param "else_loc".
7304 (c_parser_if_statement): Check for misleading indentation.
7305 (c_parser_while_statement): Likewise.
7306 (c_parser_for_statement): Likewise.
7308 2015-05-08 Marek Polacek <polacek@redhat.com>
7311 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
7312 (output_init_element): Likewise.
7314 2015-05-07 Marek Polacek <polacek@redhat.com>
7317 * c-typeck.c (build_binary_op): Warn when left shifting a negative
7320 2015-04-30 Marek Polacek <polacek@redhat.com>
7322 * c-typeck.c (set_init_label): Call error_at instead of error and
7325 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
7328 * c-typeck.c (c_build_va_arg): Clarify the error message.
7330 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
7332 * c-parser.c (c_parser_oacc_enter_exit_data): Use
7333 OMP_STANDALONE_CLAUSES.
7335 2015-04-28 Marek Polacek <polacek@redhat.com>
7337 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
7339 2015-04-28 Marek Polacek <polacek@redhat.com>
7342 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
7344 2015-04-25 Marek Polacek <polacek@redhat.com>
7347 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
7350 2015-04-23 Marek Polacek <polacek@redhat.com>
7353 * c-decl.c (set_labels_context_r): New function.
7354 (store_parm_decls): Call it via walk_tree_without_duplicates.
7355 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
7356 instead of create_tmp_var. Build TARGET_EXPR instead of
7358 (build_atomic_assign): Use create_tmp_var_raw instead of
7359 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
7361 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
7363 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
7364 (c_parser_omp_target_update): Add missed %> to error_at ().
7366 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
7369 * c-decl.c (c_default_pointer_mode): Remove definition.
7370 * c-tree.h (c_default_pointer_mode): Remove declaration.
7372 2015-03-27 Tobias Burnus <burnus@net-b.de>
7375 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
7377 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
7378 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
7379 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
7381 2015-03-19 Jakub Jelinek <jakub@redhat.com>
7383 * c-decl.c (c_decl_attributes): Also add "omp declare target"
7384 attribute for DECL_EXTERNAL VAR_DECLs.
7386 2015-03-11 Jakub Jelinek <jakub@redhat.com>
7388 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
7391 2015-03-10 Jakub Jelinek <jakub@redhat.com>
7394 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
7395 before preparing arguments to warn_logical_not_parentheses.
7397 2015-03-09 Jakub Jelinek <jakub@redhat.com>
7400 * c-typeck.c (parser_build_binary_op): Don't warn for
7401 !!x == y or !b == y where b is _Bool.
7403 2015-03-09 Marek Polacek <polacek@redhat.com>
7405 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
7406 * c-decl.c (grokdeclarator): Likewise.
7407 * c-typeck.c (build_binary_op): Likewise.
7409 2015-02-27 Marek Polacek <polacek@redhat.com>
7412 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
7414 2015-02-14 Marek Polacek <polacek@redhat.com>
7417 * c-decl.c (grokdeclarator): Set the range of a flexible array member
7418 declared through a typedef name.
7420 2015-02-13 Marek Polacek <polacek@redhat.com>
7423 * c-decl.c (grokdeclarator): Print also the type when giving
7424 the error message about array's incomplete element type.
7426 2015-02-11 Jakub Jelinek <jakub@redhat.com>
7429 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
7430 check in the POP macro.
7432 2015-02-09 Marek Polacek <polacek@redhat.com>
7435 * c-typeck.c (process_init_element): Don't always wrap
7436 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
7437 initializing a range of elements.
7439 2015-02-04 Jakub Jelinek <jakub@redhat.com>
7443 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
7445 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
7447 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
7448 processing enum declaration.
7450 2015-01-29 Marek Polacek <polacek@redhat.com>
7453 * c-typeck.c (pop_init_level): If constructor_elements has
7454 exactly one element with integer_zerop value, set constructor_zeroinit
7455 to 1. Remove braces around warning_init call.
7457 2015-01-27 Jakub Jelinek <jakub@redhat.com>
7460 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
7461 of FUNCTION_DECLs with error_mark_node.
7463 2015-01-26 Jakub Jelinek <jakub@redhat.com>
7466 * c-typeck.c (convert_arguments): Return -1 if there are
7467 error_args, even if we've diagnosed too many arguments.
7469 2015-01-21 Richard Biener <rguenther@suse.de>
7472 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
7473 for builtins the user declared correctly.
7475 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
7476 Bernd Schmidt <bernds@codesourcery.com>
7477 Cesar Philippidis <cesar@codesourcery.com>
7478 James Norris <jnorris@codesourcery.com>
7479 Jakub Jelinek <jakub@redhat.com>
7480 Ilmir Usmanov <i.usmanov@samsung.com>
7482 * c-parser.c: Include "gomp-constants.h".
7483 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
7484 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
7485 Use OMP_CLAUSE_SET_MAP_KIND.
7486 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
7487 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
7488 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
7489 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
7490 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
7491 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
7492 "copyout", "create", "delete", "deviceptr", "gang", "host",
7493 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
7494 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
7495 "present_or_create", "pcreate", "seq", "self", "vector",
7496 "vector_length", "wait", "worker".
7497 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
7498 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
7499 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
7500 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
7501 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
7502 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
7503 (c_parser_oacc_data_clause_deviceptr)
7504 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
7505 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
7506 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
7507 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
7508 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
7509 (c_parser_oacc_parallel, c_parser_oacc_update)
7510 (c_parser_oacc_wait): New functions.
7511 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
7512 (c_finish_oacc_data): New prototypes.
7513 * c-typeck.c: Include "gomp-constants.h".
7514 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
7515 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
7516 OMP_CLAUSE_SET_MAP_KIND.
7517 (c_finish_oacc_parallel, c_finish_oacc_kernels)
7518 (c_finish_oacc_data): New functions.
7519 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
7520 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
7521 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
7522 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
7523 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
7524 GOMP_MAP_FORCE_DEVICEPTR.
7526 2015-01-09 Michael Collison <michael.collison@linaro.org>
7528 * c-array-notation.c: Include hash-set.h, machmode.h,
7529 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7530 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
7531 * c-aux-info.c: Ditto.
7532 * c-convert.c: Ditto.
7534 * c-errors.c: Ditto.
7535 * c-lang.c: Dittoxs.
7536 * c-objc-common.c: Ditto.
7537 * c-parser.c: Ditto.
7538 * c-typeck.c: Include hash-set.h, machmode.h,
7539 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7540 fold-const.h, wide-int.h, inchash.h, real.h and
7541 fixed-value.h due to flattening of tree.h.
7543 2015-01-07 Marek Polacek <polacek@redhat.com>
7546 * c-typeck.c (process_init_element): Disallow initialization of
7547 a flexible array member with a string constant if the structure
7550 2015-01-05 Jakub Jelinek <jakub@redhat.com>
7553 * c-typeck.c (convert_for_assignment, c_finish_return): For
7554 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
7555 types also set in_late_binary_op around convert call.
7556 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
7557 to integral type casts, if not in_late_binary_op, pass c_fully_fold
7558 result on expr as last argument to ubsan_instrument_float_cast,
7559 if in_late_binary_op, don't use c_save_expr but save_expr.
7561 Update copyright years.
7563 2015-01-05 Marek Polacek <polacek@redhat.com>
7566 * c-typeck.c (build_array_ref): Pass loc down to
7567 warn_array_subscript_with_type_char.
7569 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
7571 * c-typeck.c: New behavious for pointers to arrays with qualifiers
7572 (common-pointer-type): For pointers to arrays take qualifiers from
7574 (build_conditional_expr): Add warnings for lost qualifiers.
7575 (comp-target-types): Allow pointers to arrays with different qualifiers.
7576 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
7577 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
7578 to PEDWARN_FOR_QUALIFIERS.
7580 2014-12-17 Jakub Jelinek <jakub@redhat.com>
7583 * c-convert.c: Include ubsan.h.
7584 (convert): For real -> integral casts and
7585 -fsanitize=float-cast-overflow don't call convert_to_integer, but
7586 instead instrument the float cast directly.
7588 2014-11-29 Jakub Jelinek <jakub@redhat.com>
7590 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
7591 c_finish_stmt_expr): Remove NULL last argument from
7592 create_tmp_var_raw and create_tmp_var calls.
7593 * c-array-notation.c (fix_builtin_array_notation_fn,
7594 build_array_notation_expr, fix_conditional_array_notations_1,
7595 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
7597 2014-11-28 Marek Polacek <polacek@redhat.com>
7600 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
7601 convert the right operand to integer type.
7603 2014-11-25 Marek Polacek <polacek@redhat.com>
7606 * c-decl.c (start_function): Disable -Wmissing-declarations warning
7607 for inline functions.
7609 2014-11-21 Jakub Jelinek <jakub@redhat.com>
7612 * c-typeck.c (build_array_ref): Adjust
7613 convert_vector_to_pointer_for_subscript caller. If it returns true,
7614 call non_lvalue_loc on the result.
7616 2014-11-11 Richard Biener <rguenther@suse.de>
7618 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
7621 2014-11-10 Andi Kleen <ak@linux.intel.com>
7624 * c-parser.c (c_parser_statement_after_labels): Call
7626 (c_parser_if_statement): Dito.
7627 (c_parser_switch_statement): Dito.
7628 (c_parser_while_statement): Dito.
7629 (c_parser_do_statement): Dito.
7630 (c_parser_for_statement): Dito.
7631 * c-typeck.c (c_finish_loop): Dito.
7633 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
7635 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
7636 OPT_Wshift_count_overflow in the warnings.
7638 2014-10-30 Marek Polacek <polacek@redhat.com>
7640 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
7641 print the stripped version as well, if they're not the same.
7643 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
7645 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
7648 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
7650 * c-decl.c: Adjust include files.
7651 * c-parser.c: Ditto.
7653 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
7654 Tom Tromey <tromey@redhat.com>
7656 * c-tree.h (enum c_oracle_request): New.
7657 (c_binding_oracle_function): New typedef.
7658 (c_binding_oracle, c_pushtag, c_bind): Declare.
7659 * c-decl.c (c_binding_oracle): New global.
7660 (I_SYMBOL_CHECKED): New macro.
7661 (i_symbol_binding): New function.
7662 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
7663 (I_TAG_CHECKED): New macro.
7664 (i_tag_binding): New function.
7665 (I_TAG_BINDING, I_TAG_DECL): Redefine.
7666 (I_LABEL_CHECKED): New macro.
7667 (i_label_binding): New function.
7668 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
7669 (c_print_identifier): Save and restore c_binding_oracle.
7670 (c_pushtag, c_bind): New functions.
7672 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
7674 * c-typeck.c: Adjust include files.
7676 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
7679 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
7680 initialization here...
7681 (c_initialize_diagnostics): ... but here. Set defaults after
7682 building pretty-printer.
7684 2014-10-23 Marek Polacek <polacek@redhat.com>
7687 * c-decl.c (pop_scope): Don't print warning in external_scope.
7689 2014-10-19 Marek Polacek <polacek@redhat.com>
7692 * c-typeck.c (output_init_element): Allow initializing objects with
7693 static storage duration with compound literals even in C99 and add
7696 2014-10-17 Marek Polacek <polacek@redhat.com>
7699 * c-typeck.c (digest_init): Allow initializing objects with static
7700 storage duration with compound literals even in C99 and add pedwarn
7703 2014-10-17 Marek Polacek <polacek@redhat.com>
7706 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
7707 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
7708 error multiple times. Print the type.
7710 2014-10-17 Marek Polacek <polacek@redhat.com>
7713 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
7716 2014-10-17 Marek Polacek <polacek@redhat.com>
7718 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
7719 (start_function): Use OPT_Wimplicit_int instead of 0.
7720 (store_parm_decls_oldstyle): Likewise.
7722 2014-10-17 Alan Modra <amodra@gmail.com>
7725 * c-decl.c (merge_decls): Don't merge section name or tls model
7726 to newdecl symtab node, instead merge to olddecl. Override
7727 existing olddecl section name. Set tls_model for all thread-local
7728 vars, not just OMP thread-private ones. Remove incorrect comment.
7730 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
7732 * c-decl.c: Adjust include files.
7734 2014-10-14 DJ Delorie <dj@redhat.com>
7736 * c-parser.c (c_parse_init): Add RID entries for each __intN.
7737 (c_token_starts_typename): Check all __intN, not just __int128.
7738 (c_token_starts_declspecs): Likewise.
7739 (c_parser_declspecs): Likewise.
7740 (c_parser_attribute_any_word): Likewise.
7741 (c_parser_objc_selector): Likewise.
7742 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
7743 (struct c_declspecs): Add int_n_idx field to record *which* __intN
7745 * c-decl.c (declspecs_add_type): Check for all __intN, not just
7747 (finish_declspecs): Likewise.
7749 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
7751 * c-parser.c (c_parser_all_labels): New function to replace
7753 (c_parser_statement): Call the new function.
7755 2014-10-09 Marek Polacek <polacek@redhat.com>
7758 * c-typeck.c (pop_init_level): Don't warn about initializing
7761 2014-10-07 Marek Polacek <polacek@redhat.com>
7764 * c-decl.c (header_for_builtin_fn): New function.
7765 (implicitly_declare): Suggest which header to include.
7767 2014-10-07 Marek Polacek <polacek@redhat.com>
7769 * c-convert.c (convert): Use error_operand_p.
7770 * c-typeck.c (require_complete_type): Likewise.
7771 (really_atomic_lvalue): Likewise.
7772 (digest_init): Likewise.
7773 (handle_omp_array_sections_1): Likewise.
7775 2014-10-03 Marek Polacek <polacek@redhat.com>
7778 * c-decl.c (pop_scope): Don't warn about "inline function declared
7779 but never defined" for functions marked with gnu_inline attribute.
7781 2014-09-25 Jakub Jelinek <jakub@redhat.com>
7784 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
7785 on low_bound and length.
7787 2014-09-24 Marek Polacek <polacek@redhat.com>
7791 * c-parser.c: Don't define CPP_KEYWORD.
7792 (c_parser_switch_statement): Pass original type to c_finish_case.
7793 * c-tree.h (c_finish_case): Update declaration.
7794 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
7795 conditionally to c_do_switch_warnings.
7797 2014-09-03 Marek Polacek <polacek@redhat.com>
7800 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
7803 2014-09-02 Jakub Jelinek <jakub@redhat.com>
7804 Balaji V. Iyer <balaji.v.iyer@intel.com>
7805 Igor Zamyatin <igor.zamyatin@intel.com>
7807 * c-parser.c (c_parser_cilk_for): New function.
7808 (c_parser_cilk_grainsize): Likewise.
7809 (c_get_temp_regvar): Likewise.
7810 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
7811 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
7812 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
7813 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
7816 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
7818 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
7819 with using HOST_WIDE_INT without truncation to 'int'
7821 2014-08-22 Marek Polacek <polacek@redhat.com>
7824 * c-typeck.c (parser_build_binary_op): Adjust call to
7825 warn_logical_not_parentheses.
7827 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
7830 * c-parser.c (c_parser_array_notation): Check for correct
7831 type of an array added.
7833 2014-08-19 Marek Polacek <polacek@redhat.com>
7836 * c-typeck.c (build_binary_op): If either operand of a comparison
7837 is a boolean expression, call maybe_warn_bool_compare.
7839 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
7842 * c-typeck.c (build_c_cast): Do a conversion even when the
7843 TYPE_MAIN_VARIANTs are the same.
7845 2014-08-19 Marek Polacek <polacek@redhat.com>
7847 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
7848 pedwarn_c99 instead of pedwarn.
7849 (grokfield): Likewise.
7850 (warn_defaults_to): New function.
7851 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
7852 Unconditionally call pedwarn_c99 instead of pedwarn.
7853 (start_function): Call warn_defaults_to instead of pedwarn_c99.
7854 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
7855 check flag_isoc11 before.
7856 * c-errors.c (pedwarn_c99): Change the return type to bool.
7857 Handle -Wc99-c11-compat.
7858 * c-parser.c (disable_extension_diagnostics): Handle
7859 warn_c99_c11_compat.
7860 (restore_extension_diagnostics): Likewise.
7861 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
7862 instead of pedwarn, don't check flag_isoc11 before.
7863 (c_parser_declspecs): Likewise.
7864 (c_parser_alignas_specifier): Likewise.
7865 (c_parser_alignof_expression): Likewise.
7866 (c_parser_generic_selection): Likewise.
7867 * c-tree.h (pedwarn_c99): Update declaration.
7868 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
7871 2014-08-19 Marek Polacek <polacek@redhat.com>
7873 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
7875 * c-errors.c: Include "opts.h".
7876 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
7877 * c-parser.c (disable_extension_diagnostics): Handle negative value
7878 of warn_c90_c99_compat, too.
7879 (restore_extension_diagnostics): Likewise.
7880 (c_parser_compound_statement_nostart): Pass
7881 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
7883 2014-08-12 Marek Polacek <polacek@redhat.com>
7885 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
7887 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
7889 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
7891 2014-08-10 Marek Polacek <polacek@redhat.com>
7894 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
7895 Call pedwarn_c90 instead of pedwarn.
7896 (check_bitfield_type_and_width): Likewise.
7897 (declspecs_add_qual): Likewise.
7898 (declspecs_add_type): Likewise.
7899 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
7900 Adjust to only call pedwarn_c90.
7901 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
7902 pedwarn_c90 instead of pedwarn.
7903 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
7904 * c-parser.c (disable_extension_diagnostics): Handle
7905 warn_c90_c99_compat.
7906 (restore_extension_diagnostics): Likewise.
7907 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
7908 pedwarn_c90 instead of pedwarn.
7909 (c_parser_initelt): Likewise.
7910 (c_parser_postfix_expression): Likewise.
7911 (c_parser_postfix_expression_after_paren_type): Likewise.
7912 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
7913 * c-tree.h: Fix formatting.
7914 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
7915 pedwarn_c90 instead of pedwarn.
7917 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
7919 * c-typeck.c: Remove include of pointer-set.h.
7921 2014-08-07 Marek Polacek <polacek@redhat.com>
7923 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
7925 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7927 * c-typeck.c: Use hash_map instead of pointer_map.
7929 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7931 * c-decl.c: Use hash_set instead of pointer_set.
7933 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
7936 * c-array-notation.c (expand_array_notations): Handling
7939 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
7942 * c-typeck.c (c_finish_return): Return 0 instead of the address of
7945 2014-07-30 Tom Tromey <tromey@redhat.com>
7947 * c-typeck.c (struct constructor_stack) <designator_depth>: New
7949 (really_start_incremental_init, push_init_level): Initialize
7951 (pop_init_level): Set global designator_depth.
7952 (process_init_element): Check for designated_init attribute.
7954 2014-07-20 Marek Polacek <polacek@redhat.com>
7957 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
7958 (implicitly_declare): Pass location to implicit_decl_warning.
7960 2014-07-14 Jakub Jelinek <jakub@redhat.com>
7963 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
7964 If non-NULL, call c_parser_check_literal_zero.
7965 (c_parser_check_literal_zero): New function.
7966 (c_parser_postfix_expression_after_primary): Adjust
7967 c_parser_expr_list caller, handle -Wmemset-transposed-args.
7969 2014-07-06 Marek Polacek <polacek@redhat.com>
7972 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
7973 * c-tree.h (C_ARRAY_PARAMETER): Define.
7974 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
7977 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
7978 Chen Gang <gang.chen.5i5j@gmail.com>
7980 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
7983 2014-07-01 Marek Polacek <polacek@redhat.com>
7985 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
7986 instead of 0 to WARN_FOR_ASSIGNMENT.
7988 2014-07-01 Marek Polacek <polacek@redhat.com>
7991 * c-typeck.c (convert_for_assignment): Pass
7992 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
7994 2014-06-30 Marek Polacek <polacek@redhat.com>
7996 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
7997 has no_sanitize_undefined attribute.
7999 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
8002 * c-array-notation.c (fix_builtin_array_notation_fn):
8003 Check for 0 arguments in builtin call. Check that bultin argument is
8005 * c-parser.c (c_parser_array_notation): Check for incorrect initial
8008 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
8010 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
8011 qualifiers in __auto_type for atomic types.
8012 (c_parser_typeof_specifier): Discard all type qualifiers in
8013 __typeof__ for atomic types.
8015 2014-06-25 Marek Polacek <polacek@redhat.com>
8018 * c-parser.c (c_parser_statement_after_labels): Pass the location of
8019 the return expression to c_finish_return.
8021 2014-06-25 Jakub Jelinek <jakub@redhat.com>
8023 * c-typeck.c (c_finish_omp_clauses): Make sure
8024 OMP_CLAUSE_LINEAR_STEP has correct type.
8026 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
8030 2014-06-24 Jakub Jelinek <jakub@redhat.com>
8032 * c-parser.c (c_parser_omp_for_loop): For
8033 #pragma omp parallel for simd move lastprivate clause from parallel
8034 to for rather than simd.
8036 2014-06-23 Marek Polacek <polacek@redhat.com>
8038 * c-typeck.c (parser_build_binary_op): Don't call
8039 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
8041 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
8043 * c-parser.c (c_parser_omp_threadprivate): Likewise.
8044 * c-decl.c (merge_decls): Likewise.
8046 2014-06-09 Marek Polacek <polacek@redhat.com>
8049 * c-typeck.c (error_init): Call inform instead of error_at.
8050 (pedwarn_init): Call inform instead of pedwarn.
8051 (warning_init): Call inform instead of warning_at.
8053 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
8055 * c-decl.c (merge_decls): Use set_decl_section_name.
8056 (duplicate_decls): Remove node if it exists.
8058 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
8061 * c-typeck.c (push_init_level, process_init_element,
8062 pop_init_level): Correct check for zero initialization, move
8063 missing brace warning to respect zero initialization.
8065 2014-06-05 Marek Polacek <polacek@redhat.com>
8068 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
8070 2014-06-05 Marek Polacek <polacek@redhat.com>
8073 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
8074 on the left hand side operand of a comparison.
8076 2014-06-05 Marek Polacek <polacek@redhat.com>
8079 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
8080 Print note only if the warning was printed.
8082 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
8085 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
8088 2014-06-03 Marek Polacek <polacek@redhat.com>
8091 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
8093 * c-tree.h (c_start_case): Update.
8094 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
8095 switch condition has boolean value.
8097 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
8099 * c-decl.c: Include builtins.h.
8100 * c-parser.c: Likewise.
8102 2014-05-27 Marek Polacek <polacek@redhat.com>
8105 * c-typeck.c (convert_arguments): Get location of a parameter. Change
8106 error and warning calls to error_at and warning_at. Pass location of
8107 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
8108 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
8109 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
8111 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
8114 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
8115 function parameters.
8117 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
8119 * c-decl.c (merge_decls): Preserve symtab node pointers.
8120 (duplicate_decls): Free new decl.
8122 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
8124 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
8127 * c-parser.c (c_parser_omp_target): Return bool values.
8129 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
8131 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
8132 num_teams_loc variable to num_thread_limit_loc.
8134 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
8136 * c-array-notation.c (expand_array_notations): Use void_node
8137 instead of void_zero_node.
8139 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
8141 * c-decl.c (finish_struct): Adjust.
8142 (finish_enum): Likewise.
8144 (record_inline_static): Likewise.
8145 (push_scope): Likewise.
8146 (make_label): Likewise.
8147 (lookup_label_for_goto): Likewise.
8148 (finish_struct): Likewise.
8149 (finish_enum): Likewise.
8150 (store_parm_decls): Likewise.
8151 (c_push_function_context): Likewise.
8152 * c-lang.h: Remove usage of variable_size gty attribute.
8153 * c-parser.c (c_parse_init): Adjust.
8154 (c_parse_file): Likewise.
8156 2014-05-13 Marek Polacek <polacek@redhat.com>
8159 * c-typeck.c (convert_for_assignment): Pass location to
8160 WARN_FOR_ASSIGNMENT instead of input_location.
8162 2014-05-10 Marek Polacek <polacek@redhat.com>
8164 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
8165 maybe_warn_string_init.
8166 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
8167 maybe_warn_string_init.
8168 * c-tree.h (maybe_warn_string_init): Update declaration.
8169 * c-typeck.c (maybe_warn_string_init): Add location parameter.
8170 Call pedwarn_init with loc instead of with input_location.
8171 (digest_init): Pass init_loc to maybe_warn_string_init.
8172 (pop_init_level): Call pedwarn_init with loc instead of with
8174 (set_init_index): Likewise.
8175 (process_init_element): Likewise.
8177 2014-05-09 Marek Polacek <polacek@redhat.com>
8180 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
8181 (c_parser_initelt): Pass location to set_init_label. Pass array index
8182 location to set_init_index.
8183 * c-tree.h (push_init_level): Update declaration.
8184 (pop_init_level): Likewise.
8185 (set_init_index): Likewise.
8186 (set_init_label): Likewise.
8187 * c-typeck.c (error_init): Add location parameter. Call error_at
8189 (digest_init): Pass init_loc to error_init.
8190 (really_start_incremental_init):
8191 (push_init_level): Add location parameter. Pass loc to pop_init_level
8193 (pop_init_level): Likewise.
8194 (set_designator): Add location parameter. Pass loc to pop_init_level,
8195 push_init_level, and error_init.
8196 (set_init_index): Add location parameter. Pass loc to error_init and
8198 (set_init_label): Likewise.
8199 (output_init_element): Pass loc to error_init.
8200 (process_init_element): Pass loc to error_init, pop_init_level,
8201 pedwarn_init, and push_init_level.
8203 2014-05-09 Marek Polacek <polacek@redhat.com>
8206 * c-parser.c (c_parser_attributes): Parse the arguments as an
8207 expression-list if the attribute takes identifier.
8209 2014-05-08 Marek Polacek <polacek@redhat.com>
8212 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
8215 2014-05-08 Marek Polacek <polacek@redhat.com>
8218 * c-decl.c (start_function): Warn for _Atomic-qualified return type
8221 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
8222 Mike Stump <mikestump@comcast.net>
8223 Richard Sandiford <rdsandiford@googlemail.com>
8225 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
8226 (finish_enum): Use wide-int interfaces.
8227 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
8228 * c-typeck.c (build_c_cast): Likewise.
8229 (set_nonincremental_init_from_string): Likewise.
8230 (c_tree_equal): Likewise.
8232 2014-05-02 Marek Polacek <polacek@redhat.com>
8235 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
8236 Return size_one_node when the type is not complete.
8237 (pointer_diff): Remove comment.
8238 (build_unary_op): Improve error messages.
8240 2014-05-02 Marek Polacek <polacek@redhat.com>
8242 * c-typeck.c (c_finish_return): Separate warning_at calls.
8244 2014-05-02 Marek Polacek <polacek@redhat.com>
8246 * c-tree.h (error_init): Remove declaration.
8247 (pedwarn_init): Likewise.
8248 * c-typeck.c (error_init): Make static and move above.
8249 (pedwarn_init): Likewise.
8250 (warning_init): Move above.
8251 (maybe_warn_string_init): Likewise.
8253 2014-05-01 Jeff Law <law@redhat.com>
8257 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
8258 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
8261 2014-05-02 Marek Polacek <polacek@redhat.com>
8264 * c-typeck.c (push_init_level): Set constructor_designated to
8265 p->designated for structures.
8267 2014-05-01 Marek Polacek <polacek@redhat.com>
8270 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
8271 function-definition has an attribute after the declarator.
8273 2014-05-01 Marek Polacek <polacek@redhat.com>
8276 * c-typeck.c (warning_init): Add location_t parameter. Call
8277 warning_at instead of warning.
8278 (push_init_level): Pass input_location to warning_init.
8279 (add_pending_init): Add location_t parameter. Pass loc to
8281 (set_nonincremental_init): Pass input_location to add_pending_init.
8282 (set_nonincremental_init_from_string): Likewise.
8283 (output_init_element): Pass loc to warning_init and to
8286 2014-05-01 Marek Polacek <polacek@redhat.com>
8289 * c-typeck.c (c_finish_return): Distinguish between label and variable
8290 when warning about returning local address.
8292 2014-05-01 Marek Polacek <polacek@redhat.com>
8295 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
8298 2014-05-01 Marek Polacek <polacek@redhat.com>
8301 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
8302 instead of 0 to WARN_FOR_QUALIFIERS.
8304 2014-05-01 Marek Polacek <polacek@redhat.com>
8307 * c-typeck.c (default_conversion): Use better location for
8310 2014-04-30 Marek Polacek <polacek@redhat.com>
8312 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
8313 also when SANITIZE_FLOAT_DIVIDE is on.
8315 2014-04-30 Marek Polacek <polacek@redhat.com>
8318 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
8319 and pedwarn_init. Use loc insted of input_location.
8321 2014-04-30 Marek Polacek <polacek@redhat.com>
8324 * c-typeck.c (build_binary_op): Use location when warning about
8327 2014-04-25 Marek Polacek <polacek@redhat.com>
8330 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
8331 always_inline/noinline and hot/cold attributes.
8333 2014-04-25 Marek Polacek <polacek@redhat.com>
8336 * c-parser.c (c_parser_initelt): Pass input_location to
8337 process_init_element.
8338 (c_parser_initval): Pass loc to process_init_element.
8339 * c-tree.h (process_init_element): Adjust declaration.
8340 * c-typeck.c (push_init_level): Pass input_location to
8341 process_init_element.
8342 (pop_init_level): Likewise.
8343 (set_designator): Likewise.
8344 (output_init_element): Add location_t parameter. Pass loc to
8346 (output_pending_init_elements): Pass input_location to
8347 output_init_element.
8348 (process_init_element): Add location_t parameter. Pass loc to
8349 output_init_element.
8351 2014-04-24 Jakub Jelinek <jakub@redhat.com>
8353 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
8354 atomic-clause, allow comma in between atomic-clause and
8357 2014-04-22 Jakub Jelinek <jakub@redhat.com>
8360 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
8361 fails, don't set OM_PARALLEL_COMBINED and return NULL.
8363 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
8366 * c-array-notation.c (fix_builtin_array_notation_fn): Use
8367 create_tmp_var instead build_decl for creating temps.
8368 (build_array_notation_expr): Likewise.
8369 (fix_conditional_array_notations_1): Likewise.
8370 (fix_array_notation_expr): Likewise.
8371 (fix_array_notation_call_expr): Likewise.
8373 2014-03-28 Jakub Jelinek <jakub@redhat.com>
8376 * c-tree.h (c_build_function_call_vec): New prototype.
8377 * c-typeck.c (build_function_call_vec): Don't call
8378 resolve_overloaded_builtin here.
8379 (c_build_function_call_vec): New wrapper function around
8380 build_function_call_vec. Call resolve_overloaded_builtin here.
8381 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
8382 Call c_build_function_call_vec instead of build_function_call_vec.
8383 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
8384 * c-decl.c (finish_decl): Likewise.
8386 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8389 * c-typeck.c: Use correct format string in cast-qual warning
8391 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
8393 * c-decl.c (c_decl_attributes): Use
8394 lang_hooks.types.omp_mappable_type.
8395 * c-typeck.c (c_finish_omp_clauses): Likewise.
8397 2014-03-06 Marek Polacek <polacek@redhat.com>
8400 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
8401 of checking tree code.
8403 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
8405 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
8406 (c_parser_parameter_declaration): Likewise.
8408 2014-02-19 Marek Polacek <polacek@redhat.com>
8411 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
8412 Call mark_exp_read on exp.value.
8413 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
8414 TREE_ADDRESSABLE on old instead of val.
8415 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
8417 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
8419 * c-parser.c (c_parser_get_builtin_args): Replace calls to
8420 C_EXPR_APPEND by vec_safe_push.
8421 * c-tree.h (C_EXPR_APPEND): Remove.
8423 2014-01-31 Marek Polacek <polacek@redhat.com>
8426 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
8427 build_function_call_vec.
8428 (build_function_call): Likewise.
8429 (build_atomic_assign): Likewise.
8430 (build_function_call_vec): Add arg_loc parameter. Use it.
8431 (convert_arguments): Likewise.
8432 (convert_for_assignment): Rename rhs_loc to expr_loc.
8433 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
8434 (c_parser_objc_keywordexpr): Likewise.
8435 (c_parser_postfix_expression_after_primary): Call
8436 build_function_call_vec with expr_loc rather than op_loc.
8437 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
8438 build_function_call_vec.
8439 (c_parser_expr_list): Add locations parameter. Fill it with locations
8440 of function arguments.
8441 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
8443 2014-01-30 Marek Polacek <polacek@redhat.com>
8446 * c-typeck.c (build_function_call_vec): Use loc parameter.
8447 (convert_arguments): Add location parameter. Use it.
8448 (ep_convert_and_check): Likewise.
8449 (build_atomic_assign): Adjust convert_for_assignment call.
8450 (build_modify_expr): Likewise.
8451 (digest_init): Likewise.
8452 (c_finish_return): Likewise.
8453 (build_conditional_expr): Adjust ep_convert_and_check calls.
8454 (convert_for_assignment): Add rhs_loc parameter. Use it.
8455 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
8458 2014-01-30 Richard Biener <rguenther@suse.de>
8461 * c-typeck.c (build_function_call_vec): Do not replace calls
8462 to a function via an incompatible type with a runtime abort.
8464 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
8466 * c-parser.c (c_parser_declaration_or_fndef): Replaced
8467 flag_enable_cilkplus with flag_cilkplus.
8468 (c_parser_direct_declarator_inner): Likewise.
8469 (c_parser_attribute_any_word): Likewise.
8470 (c_parser_attributes): Likewise.
8471 (c_parser_compound_statement): Likewise.
8472 (c_parser_statement_after_labels): Likewise.
8473 (c_parser_if_statement): Likewise.
8474 (c_parser_switch_statement): Likewise.
8475 (c_parser_do_statement): Likewise.
8476 (c_parser_for_statement): Likewise.
8477 (c_parser_unary_expression): Likewise.
8478 (c_parser_postfix_expression): Likewise.
8479 (c_parser_postfix_expression_after_primary): Likewise.
8480 (c_parser_postfix_expression_after_primary): Likewise.
8481 (c_parser_omp_clause_name): Likewise.
8482 (c_finish_omp_declare_simd): Likewise.
8483 (c_parser_cilk_verify_simd): Likewise.
8484 * c-typeck.c (build_array_ref): Likewise.
8485 (build_function_call_vec): Likewise.
8486 (convert_arguments): Likewise.
8487 (build_compound_expr): Likewise.
8488 (c_finish_return): Likewise.
8489 (c_finish_if_stmt): Likewise.
8490 (c_finish_loop): Likewise.
8491 (build_binary_op): Likewise.
8493 2014-01-23 Marek Polacek <polacek@redhat.com>
8496 * c-typeck.c (parser_build_binary_op): Use location instead of
8498 (build_binary_op): Pass location to shorten_compare.
8500 2014-01-23 Marek Polacek <polacek@redhat.com>
8503 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
8506 2014-01-23 Marek Polacek <polacek@redhat.com>
8509 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
8510 of a comma expression.
8511 (emit_side_effect_warnings): Likewise.
8513 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
8516 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
8517 function to use walk_tree and moved a lot of its functionality to
8518 expand_array_notations.
8519 (expand_array_notations): New function.
8521 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
8523 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
8524 attribute an attribute without value.
8526 2014-01-23 Jakub Jelinek <jakub@redhat.com>
8529 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
8530 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
8532 2014-01-22 Marek Polacek <polacek@redhat.com>
8535 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
8536 of remove_c_maybe_const_expr on op1 and op2.
8538 2014-01-15 Jakub Jelinek <jakub@redhat.com>
8541 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
8542 effects, preevaluate rhs using SAVE_EXPR first.
8544 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
8547 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
8548 statements with if-elseif statements.
8550 2014-01-06 Marek Polacek <polacek@redhat.com>
8553 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
8554 defined bit-field types only in ISO C.
8556 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8558 Update copyright years
8560 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8562 * c-array-notation.c: Use the standard form for the copyright notice.
8564 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
8566 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
8567 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
8568 field in parser is not empty. If not-empty, call the function
8569 c_parser_finish_omp_declare_simd.
8570 (c_parser_cilk_clause_vectorlength): Modified function to be shared
8571 between SIMD-enabled functions and #pragma simd. Added new parameter.
8572 (c_parser_cilk_all_clauses): Modified the usage of the function
8573 c_parser_cilk_clause_vectorlength as mentioned above.
8574 (c_parser_cilk_simd_fn_vector_attrs): New function.
8575 (c_finish_cilk_simd_fn_tokens): Likewise.
8576 (is_cilkplus_vector_p): Likewise.
8577 (c_parser_omp_clause_name): Added checking for "vectorlength,"
8578 "nomask," and "mask" strings in clause name.
8579 (c_parser_omp_all_clauses): Added 3 new case statements:
8580 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
8581 PRAGMA_CILK_CLAUSE_NOMASK.
8582 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
8583 check for vector attribute and if so call the function
8584 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
8585 called the function c_finish_cilk_simd_fn_tokens.
8586 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
8587 parser field is non-empty. If so, parse them as you would parse
8588 the omp declare simd pragma.
8589 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
8590 Added a check when step is a parameter and flag it as error.
8591 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
8592 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
8595 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
8597 * c-parser.c (c_parser_omp_parallel): Fix description.
8599 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
8601 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
8602 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
8603 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
8604 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
8606 2013-12-04 Joseph Myers <joseph@codesourcery.com>
8609 * c-parser.c (c_parser_alignas_specifier): Use
8610 c_sizeof_or_alignof_type instead of c_alignof.
8611 (c_parser_alignof_expression): Likewise, with min_alignof
8612 parameter depending on alignof spelling used.
8614 2013-12-04 Marek Polacek <polacek@redhat.com>
8617 * c-decl.c (start_function): Don't warn for missing prototype for
8620 2013-12-03 Marek Polacek <polacek@redhat.com>
8623 * c-decl.c (build_compound_literal): Allow compound literals with
8624 empty initial value.
8626 2013-12-02 Joseph Myers <joseph@codesourcery.com>
8629 * c-typeck.c (build_modify_expr): Diagnose assignment to
8630 expression with array type.
8632 2013-11-29 Joseph Myers <joseph@codesourcery.com>
8635 * c-typeck.c (process_init_element): Do not treat a string as
8636 initializing a whole array when used with a designator for an
8639 2013-11-29 Joseph Myers <joseph@codesourcery.com>
8642 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
8643 an inline function following a static declaration.
8645 2013-11-28 Jakub Jelinek <jakub@redhat.com>
8648 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
8649 to p_name before calling c_parser_omp_teams instead of after.
8650 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
8651 argument. Remove unused p_name variable.
8653 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
8654 Jakub Jelinek <jakub@redhat.com>
8656 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
8657 external_scope is NULL.
8659 2013-11-27 Tom de Vries <tom@codesourcery.com>
8660 Marc Glisse <marc.glisse@inria.fr>
8663 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
8665 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
8667 * c-typeck.c: Add required include files from gimple.h.
8669 2013-11-22 David Malcolm <dmalcolm@redhat.com>
8671 * c-decl.c (define_label, shadow_tag_warned)
8672 (check_bitfield_type_and_width, grokdeclarator, grokparms,
8673 store_parm_decls_newstyle, store_parm_decls_oldstyle)
8674 (declspecs_add_type): Remove use of in_system_header macro.
8675 * c-parser.c (c_parser_unary_expression): Likewise.
8676 * c-typeck.c (store_init_value, process_init_element)
8677 (c_start_case): Likewise.
8679 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
8682 * c-parser.c (c_parser_set_source_position_from_token): Remove
8683 reference to in_system_header from comment.
8685 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8687 * c-decl.c (grokdeclarator): Update comment to refer to
8688 tree_to_[su]hwi rather than tree_low_cst.
8690 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8692 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
8693 tree_to_uhwi throughout.
8695 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8697 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
8700 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8702 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
8705 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
8707 * c-parser.c (c_parser_cilk_simd): New.
8708 (c_parser_cilk_verify_simd): New.
8709 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
8710 (c_parser_omp_for_loop): Add case for NE_EXPR.
8711 Set c_break_label for CILK_SIMD.
8712 (c_parser_cilk_clause_vectorlength): New.
8713 (c_parser_cilk_clause_linear): New.
8714 (c_parser_cilk_clause_name): New.
8715 (c_parser_cilk_all_clauses): New.
8716 * c-typeck.c (build_unary_op): Pass location argument to
8718 (build_modify_expr): Same.
8719 (build_asm_expr): Same.
8720 (c_finish_bc_stmt): Error on break/continue in loops.
8722 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
8724 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
8726 2013-11-14 Diego Novillo <dnovillo@google.com>
8728 * c-decl.c: Include print-tree.h.
8729 Include stor-layout.h.
8732 Include stringpool.h.
8733 * c-lang.c: Include fold-const.h.
8734 * c-parser.c: Include stringpool.h.
8736 Include stor-layout.h.
8738 Include trans-mem.h.
8739 * c-typeck.c: Include stor-layout.h.
8740 Include trans-mem.h.
8744 2013-11-13 Joseph Myers <joseph@codesourcery.com>
8746 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
8747 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
8749 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
8750 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
8752 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
8753 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
8754 (c_parser_declarator, c_parser_direct_declarator_inner)
8755 (c_parser_parameter_declaration, c_parser_type_name): All callers
8757 (c_parser_declaration_or_fndef): Handle declarations with type
8758 determined from the initializer.
8760 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
8762 * c-typeck.c: Include gimplify.h.
8764 2013-11-12 Joseph Myers <joseph@codesourcery.com>
8766 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
8767 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
8769 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
8770 or _Thread_local as appropriate in diagnostics.
8771 (build_null_declspecs): Initialize ret->thread_gnu_p.
8772 (declspecs_add_scspec): Handle either __thread or _Thread_local
8773 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
8774 pedantic. Do not disallow _Thread_local extern and _Thread_local
8777 2013-11-07 Joseph Myers <joseph@codesourcery.com>
8778 Andrew MacLeod <amacleod@redhat.com>
8780 * c-aux-info.c (gen_type): Handle atomic qualifier.
8781 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
8782 qualifiers when compating types.
8783 (shadow_tag_warned): Handle atomic_p in declspecs.
8784 (quals_from_declspecs): Likewise.
8785 (start_decl): Use c_type_promotes_to when promoting argument
8787 (grokdeclarator): Handle _Atomic.
8788 (get_parm_info): Diagnose any qualifier on "void" as only
8790 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
8791 comparing types. Use c_type_promotes_to when promoting argument
8793 (finish_function): Use c_type_promotes_to when promoting argument
8795 (build_null_declspecs): Handle atomic_p in declspecs.
8796 (declspecs_add_qual): Handle RID_ATOMIC.
8797 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
8798 (c_token_starts_declspecs): Handle RID_ATOMIC.
8799 (c_parser_declspecs): Handle atomic type specifiers and
8801 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
8802 from types of expressions with atomic type.
8803 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
8804 (c_parser_attribute_any_word): Handle RID_ATOMIC.
8805 (c_parser_initializer, c_parser_initelt, c_parser_initval)
8806 (c_parser_statement_after_labels, c_parser_switch_statement)
8807 (c_parser_for_statement, c_parser_expr_no_commas)
8808 (c_parser_conditional_expression, c_parser_binary_expression)
8809 (c_parser_cast_expression, c_parser_unary_expression)
8810 (c_parser_postfix_expression)
8811 (c_parser_postfix_expression_after_primary, c_parser_expression):
8812 Use convert_lvalue_to_rvalue.
8813 (c_parser_expression_conv, c_parser_expr_list): Document
8814 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
8815 (c_parser_objc_synchronized_statement): Use
8816 convert_lvalue_to_rvalue.
8817 (c_parser_objc_selector): Handle RID_ATOMIC.
8818 (c_parser_objc_receiver, c_parser_array_notation): Use
8819 convert_lvalue_to_rvalue.
8820 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
8821 _Atomic (type-name).
8822 (struct c_declspecs): Add atomic_p field.
8823 (convert_lvalue_to_rvalue): Declare.
8824 * c-typeck.c (c_type_promotes_to): Promote atomic types to
8825 corresponding atomic types.
8826 (qualify_type): Don't add _Atomic qualifiers from second argument.
8827 (comp_target_types): Do not allow _Atomic mismatches.
8828 (type_lists_compatible_p): Do not remove atomic qualifiers when
8830 (really_atomic_lvalue, convert_lvalue_to_rvalue)
8831 (build_atomic_assign): New functions.
8832 (build_unary_op): Use build_atomic_assign for atomic increment and
8834 (build_conditional_expr): Do not treat _Atomic void as a qualified
8836 (build_modify_expr): Use build_atomic_assign for atomic LHS.
8837 (find_anonymous_field_with_type, convert_to_anonymous_field)
8838 (convert_for_assignment): Do not remove atomic qualifiers when
8840 (digest_init): Do not accept initialization of arrays of atomic
8841 elements by string constants.
8842 (build_asm_expr): Use convert_lvalue_to_rvalue.
8843 (build_binary_op): Do not treat _Atomic void as a qualified
8846 2013-11-06 DJ Delorie <dj@redhat.com>
8848 * c-decl.c (locate_old_decl): If a previous conflicting decl is
8849 both explicit and builtin, print the location of the explicit one.
8851 2013-11-05 Tobias Burnus <burnus@net-b.de>
8853 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
8854 c_parser_omp_distribute, c_parser_omp_teams,
8855 c_parser_omp_target, c_parser_omp_declare): Handle
8858 2013-11-03 Marek Polacek <polacek@redhat.com>
8860 * c-decl.c (grokdeclarator): Add VLA instrumentation.
8862 2013-11-01 Jakub Jelinek <jakub@redhat.com>
8864 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
8865 check_dup_generic at the end, unless remove is true.
8866 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
8868 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
8870 2013-10-31 Jakub Jelinek <jakub@redhat.com>
8872 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
8873 with decl that is not pointer nor array.
8875 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
8877 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
8878 a spawning function is found.
8879 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
8880 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
8881 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
8882 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
8884 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
8885 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
8887 (c_finish_return): Added a check to reject _Cilk_spawn in return
8889 (build_cilk_spawn): New function.
8890 (build_cilk_sync): Likewise.
8891 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
8893 2013-10-27 Tobias Burnus <burnus@net-b.de>
8896 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
8897 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
8898 (c_parser_statement_after_labels): Update calls.
8900 2013-10-24 Tobias Burnus <burnus@net-b.de>
8903 * c-parser.c (c_parser_pragma, c_parser_for_statement):
8904 Handle PRAGMA_IVDEP.
8905 (c_parser_statement_after_labels): Update call.
8907 2013-10-24 Marek Polacek <polacek@redhat.com>
8909 * c-parser.c (c_parser_struct_declaration): Add a comment.
8910 (c_parser_declarator): Don't allow _Alignas here.
8912 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
8914 * c-parser.c: Include omp-low.h.
8915 * c-typeck.c: Likewise.
8917 2013-10-17 Marek Polacek <polacek@redhat.com>
8920 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
8921 Document syntax of the array-declarator.
8922 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
8924 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
8925 (c_parser_struct_declaration): Likewise.
8926 (c_parser_declarator): Likewise.
8927 (c_parser_direct_declarator_inner): Likewise.
8928 (c_parser_parameter_declaration): Likewise.
8929 (c_parser_type_name): Likewise.
8931 2013-10-11 Jakub Jelinek <jakub@redhat.com>
8933 * c-lang.h (current_omp_declare_target_attribute): New extern
8935 * c-parser.c: Include c-lang.h.
8936 (struct c_parser): Change tokens to c_token *.
8937 Add tokens_buf field. Change tokens_avail type to unsigned int.
8938 (c_parser_consume_token): If parser->tokens isn't
8939 &parser->tokens_buf[0], increment parser->tokens.
8940 (c_parser_consume_pragma): Likewise.
8941 (enum pragma_context): Add pragma_struct and pragma_param.
8942 (c_parser_external_declaration): Adjust
8943 c_parser_declaration_or_fndef caller.
8944 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
8945 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
8946 Adjust recursive call.
8947 (c_parser_struct_or_union_specifier): Use pragma_struct instead
8949 (c_parser_parameter_declaration): Use pragma_param instead of
8951 (c_parser_compound_statement_nostart, c_parser_label,
8952 c_parser_for_statement): Adjust
8953 c_parser_declaration_or_fndef callers.
8954 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
8955 it through to c_parser_conditional_expression.
8956 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
8957 pass it through to c_parser_binary_expression. Adjust recursive
8959 (c_parser_binary_expression): Remove prec argument, add
8960 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
8961 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
8962 binop matches it, use build2 instead of parser_build_binary_op.
8963 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
8964 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
8965 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
8966 Handle pragma_struct and pragma_param the same as pragma_external.
8967 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
8968 (c_parser_omp_variable_list): Parse array sections for
8969 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
8970 (c_parser_omp_clause_collapse): Fully fold collapse expression.
8971 (c_parser_omp_clause_reduction): Handle user defined reductions.
8972 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
8973 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
8974 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
8975 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
8976 c_parser_omp_clause_depend, c_parser_omp_clause_map,
8977 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
8978 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
8979 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
8980 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
8981 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
8982 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
8983 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
8984 (c_parser_omp_for_loop): Add CODE argument, pass it through
8985 to c_finish_omp_for. Change last argument to cclauses,
8986 and adjust uses to grab parallel clauses from the array of all
8987 the split clauses. Adjust c_parser_binary_expression,
8988 c_parser_declaration_or_fndef and c_finish_omp_for callers.
8989 (omp_split_clauses): New function.
8990 (c_parser_omp_simd): New function.
8991 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
8992 Allow the function to be called also when parsing combined constructs,
8993 and call c_parser_omp_simd when parsing for simd.
8994 (c_parser_omp_sections_scope): If section-sequence doesn't start with
8995 #pragma omp section, require exactly one structured-block instead of
8996 sequence of statements.
8997 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
8998 Allow the function to be called also when parsing combined constructs.
8999 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
9000 Allow the function to be called also when parsing combined
9002 (c_parser_omp_taskgroup, c_parser_omp_cancel,
9003 c_parser_omp_cancellation_point, c_parser_omp_distribute,
9004 c_parser_omp_teams, c_parser_omp_target_data,
9005 c_parser_omp_target_update, c_parser_omp_target,
9006 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
9007 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
9008 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
9009 (c_parser_omp_construct): Add p_name and mask vars. Handle
9010 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
9011 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
9012 and c_parser_omp_sections callers.
9013 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
9014 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
9015 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
9016 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
9017 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
9019 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
9020 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
9021 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
9022 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
9023 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
9024 * c-typeck.c: Include tree-inline.h.
9025 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
9026 handle_omp_array_sections_1, handle_omp_array_sections,
9027 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
9028 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
9029 user defined reductions.
9030 (c_tree_equal): New function.
9031 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
9032 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
9033 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
9034 c_check_omp_declare_reduction_r): New prototypes.
9035 * c-decl.c (current_omp_declare_target_attribute): New variable.
9036 (c_decl_attributes): New function.
9037 (start_decl, start_function): Use it instead of decl_attributes.
9038 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
9039 c_omp_reduction_decl, c_omp_reduction_lookup,
9040 c_check_omp_declare_reduction_r): New functions.
9042 2013-09-25 Tom Tromey <tromey@redhat.com>
9044 * Make-lang.in (c/gccspec.o): Remove.
9045 (CFLAGS-c/gccspec.o): New variable.
9046 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
9047 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
9048 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
9050 2013-09-25 Tom Tromey <tromey@redhat.com>
9052 * Make-lang.in (c/gccspec.o): Don't use subshell.
9054 2013-09-18 Marek Polacek <polacek@redhat.com>
9057 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
9058 Remove unnecessary check.
9060 2013-09-18 Marek Polacek <polacek@redhat.com>
9063 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
9064 no_sanitize_undefined attribute.
9066 2013-09-13 Kai Tietz <ktietz@redhat.com>
9069 * c-decl.c (c_builtin_function_ext_scope): Remove
9070 wrong assumption that it is never called on prexisting
9073 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
9075 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
9077 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9079 * c-objc-common.c (c_tree_printer): Tidy.
9081 2013-08-30 Marek Polacek <polacek@redhat.com>
9083 * c-typeck.c (build_binary_op): Add division by zero and shift
9086 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
9087 Joseph Myers <joseph@codesourcery.com>
9090 * c-typeck.c (c_common_type): Prefer double_type_node over
9091 other REAL_TYPE types with the same precision.
9092 (convert_arguments): Likewise.
9094 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
9096 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
9097 (c_initialize_diagnostics): Call a destructor for the early printer.
9099 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9101 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
9102 printer initialization.
9104 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
9107 * c-array-notation.c (fix_conditional_array_notations_1): Added a
9108 check for truth values.
9109 (expand_array_notation_exprs): Added truth values case. Removed an
9110 unwanted else. Added for-loop to walk through subtrees in default
9113 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9115 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
9117 2013-07-23 Joseph Myers <joseph@codesourcery.com>
9119 * c-parser.c (struct c_generic_association): Fix typo.
9121 2013-07-23 Tom Tromey <tromey@redhat.com>
9122 Joseph Myers <joseph@codesourcery.com>
9124 * c-parser.c (struct c_generic_association): New.
9125 (c_generic_association_d): New typedef.
9126 (c_parser_generic_selection): New function.
9127 (c_parser_postfix_expression): Handle RID_GENERIC.
9129 2013-07-13 Jason Merrill <jason@redhat.com>
9132 * c-decl.c (finish_struct): Check for too-large class.
9134 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
9137 * c-typeck.c (set_init_index): When folding, check for index overflow.
9139 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
9141 * c-parser.c (c_parser_array_notation): Removed rejection of array
9142 notations in an array of function pointers.
9144 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
9146 * c-array-notation.c (make_triplet_val_inv): New function.
9147 (create_cmp_incr): Likewise.
9148 (create_array_refs): Likewise.
9149 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
9150 Also modularized common parts between functions and called the function.
9151 (build_array_notation_expr): Likewise.
9152 (fix_conditional_array_notations_1): Likewise.
9153 (fix_array_notation_expr): Likewise.
9154 (fix_array_notation_call_expr): Likewise.
9156 2013-06-18 Marek Polacek <polacek@redhat.com>
9159 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
9161 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
9163 * c-array-notation.c (build_array_notation_expr): Reject array notation
9164 mismatch between LHS and RHS even inside a call_expr. Also, removed
9165 a couple while statements that were dead code.
9167 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
9169 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
9170 excessive precision expressions in function parameters. Also removed
9171 couple unwanted while statements.
9173 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
9175 * c-array-notation.c (expand_array_notation_exprs): Added
9176 ARRAY_NOTATION_REF case.
9178 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
9180 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
9181 function to c-family/array-notation-common.c.
9182 (is_cilkplus_reduce_builtin): Likewise.
9183 (find_rank): Likewise.
9184 (extract_array_notation_exprs): Likewise.
9185 (replace_array_notations): Likewise.
9186 (find_inv_trees): Likewise.
9187 (replace_inv_trees): Likewise.
9188 (contains_array_notation_expr): Likewise.
9189 (find_correct_array_notation_type): Likewise.
9190 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
9191 (struct inv_list): Moved this to c-family/array-notation-common.c.
9192 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
9194 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
9196 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
9197 reduction functions outside the for-loop. Added a check if the fundecl
9198 is non-NULL. Finally, removed an unwanted if-statement, and made the
9201 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
9203 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
9204 condition of the if-statement matches the rank of else-block and then-
9205 block when array notations are used.
9206 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
9207 expression after the entire function body is parsed.
9208 (c_parser_expr_no_commas): Delayed creating array notation expressions
9209 to the end of function parsing.
9210 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
9211 whole if-statement instead of just the condition.
9212 (expand_array_notation_exprs): Added MODIFY_EXPR case.
9214 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
9217 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
9218 array to NULL_TREE if they are unused. Also added a check for the
9219 field to be NULL before its fields are used in future.
9221 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9224 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
9225 (build_array_notation_expr): Likewise.
9227 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
9229 * c-typeck.c (build_array_ref): Added a check to see if array's
9230 index is greater than one. If true, then emit an error.
9231 (build_function_call_vec): Exclude error reporting and checking
9232 for builtin array-notation functions.
9233 (convert_arguments): Likewise.
9234 (c_finish_return): Added a check for array notations as a return
9235 expression. If true, then emit an error.
9236 (c_finish_loop): Added a check for array notations in a loop
9237 condition. If true then emit an error.
9238 (lvalue_p): Added a ARRAY_NOTATION_REF case.
9239 (build_binary_op): Added a check for array notation expr inside
9240 op1 and op0. If present, we call another function to find correct
9242 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
9243 * c-parser.c (c_parser_compound_statement): Check if array
9244 notation code is used in tree, if so, then transform them into
9246 (c_parser_expr_no_commas): Check if array notation is used in LHS
9247 or RHS, if so, then build array notation expression instead of
9249 (c_parser_postfix_expression_after_primary): Added a check for
9250 colon(s) after square braces, if so then handle it like an array
9251 notation. Also, break up array notations in unary op if found.
9252 (c_parser_direct_declarator_inner): Added a check for array
9254 (c_parser_compound_statement): Added a check for array notation in
9255 a stmt. If one is present, then expand array notation expr.
9256 (c_parser_if_statement): Likewise.
9257 (c_parser_switch_statement): Added a check for array notations in
9258 a switch statement's condition. If true, then output an error.
9259 (c_parser_while_statement): Similarly, but for a while.
9260 (c_parser_do_statement): Similarly, but for a do-while.
9261 (c_parser_for_statement): Similarly, but for a for-loop.
9262 (c_parser_unary_expression): Check if array notation is used in a
9263 pre-increment or pre-decrement expression. If true, then expand
9265 (c_parser_array_notation): New function.
9266 * c-array-notation.c: New file.
9267 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
9269 2013-05-23 Mike Stump <mikestump@comcast.net>
9271 * c-typeck.c (convert_for_assignment): Handle references to memory
9274 2013-05-16 Jason Merrill <jason@redhat.com>
9276 * Make-lang.in (cc1$(exeext)): Use link mutex.
9278 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9280 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
9281 to simply use OPT_Wpointer_arith.
9282 (build_unary_op): Likewise.
9284 2013-04-03 Jakub Jelinek <jakub@redhat.com>
9287 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
9288 argument. If set, or it temporarily for parsing of the first
9289 argument into force_folding_builtin_constant_p.
9290 (c_parser_postfix_expression): Adjust callers.
9292 2013-03-21 Richard Biener <rguenther@suse.de>
9294 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
9295 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
9297 2013-02-12 Marek Polacek <polacek@redhat.com>
9300 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
9303 2013-01-24 Jakub Jelinek <jakub@redhat.com>
9306 * c-typeck.c (set_nonincremental_init_from_string): If
9307 constructor_max_index is NULL, treat it as if tree_int_cst_lt
9309 (process_init_element): Likewise.
9311 2012-12-20 Jakub Jelinek <jakub@redhat.com>
9314 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
9315 argument, don't call default_function_array_conversion
9316 nor c_fully_fold here.
9317 (c_parser_asm_statement): Adjust callers.
9318 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
9319 and outputs here, and call default_function_array_conversion
9320 on inputs that don't need to be addressable.
9322 2012-12-18 Jakub Jelinek <jakub@redhat.com>
9325 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
9326 warning require that both c_common_unsigned_type as well as
9327 c_common_signed_type is the same for both mvl and mvr types.
9329 2012-11-16 Diego Novillo <dnovillo@google.com>
9331 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
9333 * c-common.c: Use new vec API in vec.h.
9334 * c-common.h: Likewise.
9335 * c-gimplify.c: Likewise.
9336 * c-pragma.c: Likewise.
9337 * c-pretty-print.c: Likewise.
9338 * c-pretty-print.h: Likewise.
9339 * c-semantics.c: Likewise.
9340 * c-decl.c: Likewise.
9341 * c-parser.c: Likewise.
9342 * c-tree.h: Likewise.
9343 * c-typeck.c: Likewise.
9345 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
9348 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
9350 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9353 * c-decl.c (warn_if_shadowing): Do not warn if a variable
9354 shadows a function, unless the variable is a function or a
9355 pointer-to-function.
9357 2012-10-12 Jakub Jelinek <jakub@redhat.com>
9360 * c-parser.c (struct c_tree_loc_pair): Removed.
9361 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
9362 add location_t * and tree * arguments, fill in array of 3
9363 sizeof_arg trees and corresponding locs.
9364 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
9365 c_parser_expr_list callers.
9366 (c_parser_postfix_expression_after_primary): Likewise. Pass
9367 array of 3 sizeof_arg trees and locs (corresponding to first
9368 3 arguments) to sizeof_pointer_memaccess_warning.
9370 2012-10-09 Lawrence Crowl <crowl@google.com>
9372 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
9373 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
9376 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
9379 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
9382 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
9385 * c-typeck.c: Include c-common.h.
9386 (enum stv_conv): Moved to c-common.h.
9387 (scalar_to_vector): Moved to c-common.c.
9388 (build_binary_op): Adapt to scalar_to_vector's new prototype.
9389 * Make-lang.in: c-typeck.c depends on c-common.h.
9391 2012-10-04 Arnaud Charlet <charlet@adacore.com>
9393 * c-decl.c (c_write_global_declarations): Fix handling of
9396 2012-09-30 Sharad Singhai <singhai@google.com>
9398 * c-decl.c (c_write_global_declarations): Use a different method
9399 to determine if the dump has ben initialized.
9401 2012-09-14 Joseph Myers <joseph@codesourcery.com>
9404 * c-typeck.c (c_cast_expr): When casting to a type requiring
9405 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
9408 2012-09-14 Joseph Myers <joseph@codesourcery.com>
9411 * c-typeck.c (build_unary_op): Pass original argument of
9412 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
9413 any C_MAYBE_CONST_EXPR, if it has integer operands.
9414 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
9415 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
9416 to c_objc_common_truthvalue_conversion, then remove any
9417 C_MAYBE_CONST_EXPR, if they have integer operands. Use
9418 c_objc_common_truthvalue_conversion not
9419 c_common_truthvalue_conversion.
9420 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
9421 call note_integer_operands for arguments with integer operands
9422 that are not integer constants.
9424 2012-09-13 Jakub Jelinek <jakub@redhat.com>
9427 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
9428 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
9430 2012-08-31 Jakub Jelinek <jakub@redhat.com>
9433 * c-convert.c (convert): Don't call fold_convert_loc if
9434 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
9435 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
9436 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
9438 2012-08-24 Jakub Jelinek <jakub@redhat.com>
9441 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
9442 for nested and empty_ok arguments in the call to
9443 c_parser_declaration_or_fndef.
9445 2012-08-17 Jakub Jelinek <jakub@redhat.com>
9447 * c-tree.h (c_last_sizeof_arg): Declare.
9448 * c-parser.c (struct c_tree_loc_pair): New type.
9449 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
9451 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
9452 (c_parser_postfix_expression_after_primary): Likewise. Call
9453 sizeof_pointer_memaccess_warning if needed.
9454 (sizeof_ptr_memacc_comptypes): New function.
9455 * c-typeck.c (c_last_sizeof_arg): New global variable.
9456 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
9458 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
9460 * c-lang.h (lang_decl): Add variable_size GTY option.
9462 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
9464 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
9465 * Make-lang.in: Fix dependencies.
9467 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
9469 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
9470 and add language Makefile hooks.
9471 * config-lang.in: New file.
9472 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
9473 add the required "normal" config-lang.in rules.
9474 * c-lang.h: Moved from gcc/ to here.
9475 * c-tree.h: Likewise.
9476 * c-objc-common.c: Likewise.
9477 * c-objc-common.h: Likewise.
9478 * c-typeck.c: Likewise.
9479 * c-convert.c: Likewise.
9480 * c-lang.c: Likewise.
9481 * c-aux-info.c: Likewise.
9482 * c-errors.c: Likewise.
9483 * gccspec.c: Likewise.
9484 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
9485 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
9487 Copyright (C) 2012-2023 Free Software Foundation, Inc.
9489 Copying and distribution of this file, with or without modification,
9490 are permitted in any medium without royalty provided the copyright
9491 notice and this notice are preserved.