blob: 1bf256daa350b0e367541d7fdc6ea1dd5617a846 [file] [log] [blame]
2024-04-19 Martin Uecker <uecker@tugraz.at>
Jakub Jelinek <jakub@redhat.com>
PR lto/114574
PR c/114361
* c-decl.cc (shadow_tag_warned): For flag_isoc23 and code not
ENUMERAL_TYPE use SET_TYPE_STRUCTURAL_EQUALITY.
(parser_xref_tag): Likewise.
(start_struct): For flag_isoc23 use SET_TYPE_STRUCTURAL_EQUALITY.
(c_update_type_canonical): New function.
(finish_struct): Put NULL as second == operand rather than first.
Assert TYPE_STRUCTURAL_EQUALITY_P. Call c_update_type_canonical.
* c-typeck.cc (composite_type_internal): Use
SET_TYPE_STRUCTURAL_EQUALITY. Formatting fix.
2024-04-09 Jakub Jelinek <jakub@redhat.com>
* c-decl.cc (previous_tag): Fix duplicated words in comment; the the
-> the.
(diagnose_mismatched_decls): Fix duplicated words in comment;
about about -> about.
2024-04-05 Martin Uecker <uecker@tugraz.at>
Revert:
2024-04-02 Martin Uecker <uecker@tugraz.at>
PR c/114361
* c-decl.cc (finish_struct): Set TYPE_CANONICAL when completing
strucute types.
2024-04-02 Martin Uecker <uecker@tugraz.at>
PR c/114361
* c-decl.cc (finish_struct): Set TYPE_CANONICAL when completing
strucute types.
2024-03-14 Chung-Lin Tang <cltang@baylibre.com>
* c-parser.cc (c_parser_oacc_data_clause): Add parsing support for
'readonly' modifier, set OMP_CLAUSE_MAP_READONLY if readonly modifier
found, update comments.
(c_parser_oacc_cache): Add parsing support for 'readonly' modifier,
set OMP_CLAUSE__CACHE__READONLY if readonly modifier found, update
comments.
2024-03-08 Jakub Jelinek <jakub@redhat.com>
PR debug/113918
* c-tree.h (c_type_dwarf_attribute): Declare.
* c-objc-common.h (LANG_HOOKS_TYPE_DWARF_ATTRIBUTE): Redefine.
* c-objc-common.cc: Include dwarf2.h.
(c_type_dwarf_attribute): New function.
2024-02-26 Jakub Jelinek <jakub@redhat.com>
PR c/114042
* c-parser.cc (c_parser_postfix_expression): Diagnose
__builtin_stdc_bit_* argument with ENUMERAL_TYPE or BOOLEAN_TYPE
type or if signed here rather than on the replacement builtins
in check_builtin_function_arguments.
2024-02-22 Jakub Jelinek <jakub@redhat.com>
PR c/114007
* c-parser.cc (c_parser_std_attribute): Remove loose_scope_p argument.
Instead of checking it, parse 2 CPP_COLONs with the first one with
COLON_SCOPE flag the same as CPP_SCOPE.
(c_parser_std_attribute_list): Remove loose_scope_p argument, don't
pass it to c_parser_std_attribute.
(c_parser_std_attribute_specifier): Adjust c_parser_std_attribute_list
caller.
2024-02-13 Tobias Burnus <tburnus@baylibre.com>
PR middle-end/113904
* c-parser.cc (c_parser_omp_context_selector): Handle splitting of
OMP_TRAIT_PROPERTY_EXPR into OMP_TRAIT_PROPERTY_{DEV_NUM,BOOL}_EXPR.
2024-02-10 Jakub Jelinek <jakub@redhat.com>
* c-decl.cc (get_parm_array_spec): Use HOST_WIDE_INT_PRINT_UNSIGNED
instead of "%lu" and casts to unsigned long or unsigned long long.
2024-02-08 Joseph Myers <josmyers@redhat.com>
PR c/113776
* c-typeck.cc (c_objc_common_truthvalue_conversion): Return an
integer constant expression for boolean conversion of floating
constant.
2024-02-05 Jakub Jelinek <jakub@redhat.com>
PR c/113740
* c-decl.cc (finish_struct): Only use build_bitint_type if
bit-field has width larger or equal to minimum _BitInt
precision.
2024-01-31 Joseph Myers <josmyers@redhat.com>
PR c/112571
* c-decl.cc (start_enum): Clear ENUM_FIXED_UNDERLYING_TYPE_P when
defining without a fixed underlying type an enumeration previously
declared with a fixed underlying type.
2024-01-31 Martin Uecker <uecker@tugraz.at>
PR c/113438
* c-typeck.cc (composite_type_internal): Set TYPE_STUB_DECL.
2024-01-31 Joseph Myers <josmyers@redhat.com>
PR c/111059
PR c/111911
* c-tree.h (c_objc_common_truthvalue_conversion): Add third
argument.
* c-convert.cc (c_convert): For conversions to boolean, pass third
argument to c_objc_common_truthvalue_conversion rather than
converting here.
* c-typeck.cc (build_c_cast): Ensure arguments with integer
operands are marked as such for conversion to boolean.
(c_objc_common_truthvalue_conversion): Add third argument TYPE.
2024-01-21 Martin Uecker <uecker@tugraz.at>
PR c/113492
* c-decl.cc (grokdeclarator): Use c_common_unsigned_type instead of
unsigned_type_for to create the unsigned type for bitfields declared
with int when using -funsigned-bitfields.
2024-01-12 Jakub Jelinek <jakub@redhat.com>
PR c/113315
* c-typeck.cc (build_array_ref): If index has BITINT_TYPE type with
precision larger than sizetype precision, convert it to sizetype.
2024-01-11 Julian Brown <julian@codesourcery.com>
* c-parser.cc (c_parser_braced_init, c_parser_conditional_expression):
Don't allow OpenMP array section.
(c_parser_postfix_expression): Don't allow array section in statement
expression.
(c_parser_postfix_expression_after_primary): Add support for OpenMP
array section parsing.
(c_parser_expr_list): Don't allow OpenMP array section here.
(c_parser_omp_variable_list): Change ALLOW_DEREF parameter to
MAP_LVALUE. Support parsing of general lvalues in "map", "to" and
"from" clauses.
(c_parser_omp_var_list_parens): Change ALLOW_DEREF parameter to
MAP_LVALUE. Update call to c_parser_omp_variable_list.
(c_parser_oacc_data_clause): Update calls to
c_parser_omp_var_list_parens.
(c_parser_omp_clause_reduction): Use OMP_ARRAY_SECTION tree node
instead of TREE_LIST for array sections.
(c_parser_omp_target): Allow GOMP_MAP_ATTACH.
* c-tree.h (c_omp_array_section_p): Add extern declaration.
(build_omp_array_section): Add prototype.
* c-typeck.cc (c_omp_array_section_p): Add flag.
(mark_exp_read): Support OMP_ARRAY_SECTION.
(build_omp_array_section): Add function.
(build_external_ref): Tweak error path for OpenMP array sections.
(handle_omp_array_sections_1): Use OMP_ARRAY_SECTION tree code instead
of TREE_LIST. Handle more kinds of expressions.
(c_oacc_check_attachments): Use OMP_ARRAY_SECTION instead of TREE_LIST
for array sections.
(c_finish_omp_clauses): Use OMP_ARRAY_SECTION instead of TREE_LIST.
Check for supported expression types.
2024-01-09 Tamar Christina <tamar.christina@arm.com>
PR c/113267
* c-parser.cc (c_parser_for_statement): Skip the pragma is no cond.
2024-01-03 Kwok Cheung Yeung <kcy@codesourcery.com>
* c-parser.cc (c_parser_omp_clause_name): Move handling of indirect
clause to correspond to alphabetical order.
2023-12-30 Martin Uecker <uecker@tugraz.at>
* c-typeck.cc (tagged_types_tu_compatible_p): Revise.
2023-12-22 Martin Uecker <uecker@tugraz.at>
* c-typeck.cc (composite_type_internal): Adapted from
composite_type to support structs and unions.
(composite_type): New wrapper function.
(build_conditional_operator): Return composite type.
* c-decl.cc (finish_struct): Allow NULL for
enclosing_struct_parse_info.
2023-12-21 Martin Uecker <uecker@tugraz.at>
* c-decl.cc (c_struct_hasher): Hash stable for struct
types.
(c_struct_hasher::hash, c_struct_hasher::equal): New
functions.
(finish_struct): Set TYPE_CANONICAL to first struct in
equivalence class.
* c-objc-common.cc (c_get_alias_set): Let structs or
unions with variable size alias anything.
* c-tree.h (comptypes_equiv): New prototype.
* c-typeck.cc (comptypes_equiv): New function.
(comptypes_internal): Implement equivalence mode.
(tagged_types_tu_compatible): Implement equivalence mode.
2023-12-21 Martin Uecker <uecker@tugraz.at>
* c-tree.h (c_parser_enum_specifier): Add parameter.
* c-decl.cc (start_enum): Allow redefinition.
(finish_enum): Diagnose conflicts.
(build_enumerator): Set context.
(diagnose_mismatched_decls): Diagnose conflicting enumerators.
(push_decl): Preserve context for enumerators.
* c-typeck.cc (tagged_types_tu_compatible_p): Adapt.
* c-parser.cc (c_parser_enum_specifier): Remember when
seen is from an enum type which is not yet defined.
2023-12-21 Martin Uecker <uecker@tugraz.at>
* c-decl.cc (previous_tag): New function.
(parser_xref_tag): Find earlier definition.
(get_parm_info): Turn off warning for C23.
(start_struct): Allow redefinitons.
(finish_struct): Diagnose conflicts.
* c-tree.h (comptypes_same_p): Add prototype.
* c-typeck.cc (comptypes_same_p): New function.
(comptypes_internal): Activate comparison of tagged types.
(convert_for_assignment): Ignore qualifiers.
(digest_init): Add error.
(initialized_elementwise_p): Allow compatible types.
2023-12-20 Jakub Jelinek <jakub@redhat.com>
* c-parser.cc (c_parser_postfix_expression_after_primary): Grow
sizeof_arg and sizeof_arg_loc arrays to 6 elements. Call
warn_for_calloc if warn_calloc_transposed_args for functions with
alloc_size type attribute with 2 arguments.
(c_parser_expr_list): Use 6 instead of 3.
* c-typeck.cc (build_c_cast): Call warn_for_alloc_size for casts
of calls to functions with alloc_size type attribute.
(convert_for_assignment): Likewise.
2023-12-19 Sandra Loosemore <sandra@codesourcery.com>
* c-parser.cc (omp_construct_selectors): Delete.
(omp_device_selectors): Delete.
(omp_implementation_selectors): Delete.
(omp_user_selectors): Delete.
(c_parser_omp_context_selector): Adjust for new representations
and simplify dispatch logic. Uniformly warn instead of sometimes
error when an unknown selector is found. Adjust error messages
for extraneous/incorrect score.
(c_parser_omp_context_selector_specification): Likewise.
(c_finish_omp_declare_variant): Adjust for new representations.
2023-12-19 Sandra Loosemore <sandra@codesourcery.com>
* c-parser.cc (c_parser_omp_context_selector): Adjust for new
namelist property representation.
2023-12-19 Sandra Loosemore <sandra@codesourcery.com>
* c-parser.cc (c_parser_omp_context_selector): Use new constructors.
2023-12-18 Richard Biener <rguenther@suse.de>
PR c/111975
* gimple-parser.cc (c_parser_gimple_postfix_expression):
Parse TARGET_MEM_REF extended operands for __MEM.
2023-12-13 Jason Merrill <jason@redhat.com>
* c-typeck.cc (convert_for_assignment): Adjust call to
warn_for_address_of_packed_member.
2023-12-13 Julian Brown <julian@codesourcery.com>
* c-parser.cc (c_parser_oacc_all_clauses): Add TARGET_P parameter. Use
to select region type for c_finish_omp_clauses call.
(c_parser_oacc_loop): Update calls to c_parser_oacc_all_clauses.
(c_parser_oacc_compute): Likewise.
(c_parser_omp_target_data, c_parser_omp_target_enter_data): Support
ATTACH kind.
(c_parser_omp_target_exit_data): Support DETACH kind.
(check_clauses): Handle GOMP_MAP_POINTER and GOMP_MAP_ATTACH here.
* c-typeck.cc (handle_omp_array_sections_1,
handle_omp_array_sections, c_finish_omp_clauses): Use
c_omp_address_inspector class and OMP address tokenizer to analyze and
expand map clause expressions. Fix some diagnostics. Fix "is OpenACC"
condition for C_ORT_ACC_TARGET addition.
2023-12-13 Julian Brown <julian@codesourcery.com>
* c-typeck.cc (c_finish_omp_clauses): Add braces and reindent
OMP_CLAUSE_TO/OMP_CLAUSE_FROM/OMP_CLAUSE__CACHE_ stanza.
2023-12-11 Martin Uecker <uecker@tugraz.at>
PR c/112488
* c-decl.cc (add_decl_expr): Revise.
(finish_struct): Create DECL_EXPR.
* c-parser.cc (c_parser_struct_or_union_specifier): Call
finish_struct with expression for VLA sizes.
* c-tree.h (finish_struct): Add argument.
2023-12-11 Tobias Burnus <tobias@codesourcery.com>
* c-parser.cc (c_parser_omp_requires): Handle acquires/release
in atomic_default_mem_order clause.
(c_parser_omp_atomic): Update.
2023-12-05 Richard Sandiford <richard.sandiford@arm.com>
* c-decl.cc (std_attribute_table): Add extra braces to work
around PR 16333 in older compilers.
2023-12-05 Richard Biener <rguenther@suse.de>
PR c/86869
* c-typeck.cc (c_build_qualified_type): Preserve address-space
info for ARRAY_TYPE.
2023-12-02 Richard Sandiford <richard.sandiford@arm.com>
* c-tree.h (std_attribute_table): Declare.
* c-decl.cc (std_attribute_table): Change type to
scoped_attribute_specs, using...
(std_attributes): ...this as the underlying array.
(c_init_decl_processing): Remove call to register_scoped_attributes.
* c-objc-common.h (c_objc_attribute_table): New global.
(LANG_HOOKS_ATTRIBUTE_TABLE): Use it.
(LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Delete.
(LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Delete.
2023-12-01 Florian Weimer <fweimer@redhat.com>
PR other/44209
* c-decl.cc (grokparms): Issue permerror for
OPT_Wdeclaration_missing_parameter_type instead of a pedwarn.
2023-12-01 Florian Weimer <fweimer@redhat.com>
PR c/96284
* c-typeck.cc (build_conditional_expr): Upgrade most pointer
type mismatches to a permerror.
(convert_for_assignment): Use permerror_opt and
permerror_init for OPT_Wincompatible_pointer_types warnings.
2023-12-01 Florian Weimer <fweimer@redhat.com>
PR c/96284
* c-typeck.cc (c_finish_return): Use permerrors
for OPT_Wreturn_mismatch diagnostics.
2023-12-01 Florian Weimer <fweimer@redhat.com>
* c-decl.cc (grokdeclarator): Do not skip -Wimplicit-int
warnings or errors in system headers.
2023-12-01 Florian Weimer <fweimer@redhat.com>
* c-decl.cc (warn_defaults_to): Remove.
(grok_declarator, start_function): Call permerror_opt
instead of warn_defaults_to.
(store_parm_decls_oldstyle): Call permerror_opt for
OPT_Wimplicit_int.
2023-12-01 Florian Weimer <fweimer@redhat.com>
PR c/91092
PR c/96284
* c-decl.cc (implicit_decl_permerror): Rename from
implicit_decl_warning. Call permerror_opt instead of
pedwarn and warning_at.
(implicitly_declare): Adjust callers.
2023-12-01 Florian Weimer <fweimer@redhat.com>
PR c/96284
PR c/106416
* c-typeck.cc (build_conditional_expr): Use permerror_opt for
pointer/integer type mismatches, based on -Wint-conversion.
(pedwarn_permerror_init, permerror_init): New function.
(pedwarn_init): Call pedwarn_permerror_init.
(convert_for_assignment): Use permerror_opt and
permerror_init for -Wint-conversion warnings.
2023-11-29 Alexandre Oliva <oliva@adacore.com>
* c-typeck.cc (convert_lvalue_to_rvalue): Decay hardbools.
* c-convert.cc (convert): Convert to hardbool through
truthvalue.
* c-decl.cc (check_bitfield_type_and_width): Skip enumeral
truncation warnings for hardbool.
(finish_struct): Propagate hardbool attribute to bitfield
types.
(digest_init): Convert to hardbool.
2023-11-28 Jason Merrill <jason@redhat.com>
PR c++/94264
PR c++/53220
* c-typeck.cc (array_to_pointer_conversion): Adjust -Wc++-compat
diagnostic.
2023-11-28 Richard Biener <rguenther@suse.de>
PR middle-end/112741
* gimple-parser.cc (c_parser_parse_gimple_body): Also
set DECL_SEEN_IN_BIND_EXPR_Pfor locals.
2023-11-27 Alex Coplan <alex.coplan@arm.com>
Iain Sandoe <iain@sandoe.co.uk>
PR c++/60512
* c-lang.cc (c_family_register_lang_features): New.
* c-objc-common.cc (struct c_feature_info): New.
(c_register_features): New.
* c-objc-common.h (c_register_features): New.
2023-11-24 Tobias Burnus <tobias@codesourcery.com>
* c-parser.cc (c_parser_omp_clause_num_threads,
c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
c_parser_omp_clause_priority, c_parser_omp_clause_schedule,
c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
c_parser_omp_clause_dist_schedule, c_parser_omp_depobj,
c_parser_omp_scan_loop_body, c_parser_omp_assumption_clauses):
Add OPT_Wopenmp to warning_at.
2023-11-24 Tobias Burnus <tobias@codesourcery.com>
* c-parser.cc (c_parser_omp_depobj): Accept optionally an argument
to the destroy clause.
2023-11-23 Jakub Jelinek <jakub@redhat.com>
* c-parser.cc (c_parser_postfix_expression): Handle RID_BUILTIN_STDC.
* c-decl.cc (names_builtin_p): Likewise.
2023-11-14 Jakub Jelinek <jakub@redhat.com>
PR c/111309
* c-typeck.cc (convert_arguments): Don't promote first argument
of BUILT_IN_{CLZ,CTZ,CLRSB,FFS,PARITY,POPCOUNT}G.
2023-11-10 Martin Uecker <uecker@tugraz.at>
* c-typeck.cc (struct comptypes_data): Add anon_field flag.
(comptypes, comptypes_check_unum_int,
comptypes_check_different_types): Remove old cache.
(tagged_tu_types_compatible_p): Rewrite.
2023-11-09 Florian Weimer <fweimer@redhat.com>
* c-typeck.cc (c_finish_return): Use pedwarn with
OPT_Wreturn_mismatch for missing/extra return expressions.
2023-11-07 Kwok Cheung Yeung <kcy@codesourcery.com>
* c-decl.cc (c_decl_attributes): Add attribute for indirect
functions.
* c-lang.h (c_omp_declare_target_attr): Add indirect field.
* c-parser.cc (c_parser_omp_clause_name): Handle indirect clause.
(c_parser_omp_clause_indirect): New.
(c_parser_omp_all_clauses): Handle indirect clause.
(OMP_DECLARE_TARGET_CLAUSE_MASK): Add indirect clause to mask.
(c_parser_omp_declare_target): Handle indirect clause. Emit error
message if device_type or indirect clauses used alone. Emit error
if indirect clause used with device_type that is not 'any'.
(OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Add indirect clause to mask.
(c_parser_omp_begin): Handle indirect clause.
* c-typeck.cc (c_finish_omp_clauses): Handle indirect clause.
2023-11-07 Joseph Myers <joseph@codesourcery.com>
* c-decl.cc: Use flag_isoc23 instead of flag_isoc2x and c23_auto_p
instead of c2x_auto_p. Refer to C23 instead of C2X in diagnostics
and comments.
* c-errors.cc: Use flag_isoc23 instead of flag_isoc2x and
warn_c11_c23_compat instead of warn_c11_c2x_compat. Refer to C23
instead of C2X in comments.
* c-parser.cc: Use flag_isoc23 instead of flag_isoc2x,
warn_c11_c23_compat instead of warn_c11_c2x_compat, c23_auto_p
instead of c2x_auto_p and D_C23 instead of D_C2X. Refer to C23
instead of C2X in diagnostics and comments.
* c-tree.h: Refer to C23 instead of C2X in comments.
(struct c_declspecs): Rename c2x_auto_p to c23_auto_p.
* c-typeck.cc: Use flag_isoc23 instead of flag_isoc2x and
warn_c11_c23_compat instead of warn_c11_c2x_compat. Refer to C23
instead of C2X in diagnostics and comments.
2023-11-06 Joseph Myers <joseph@codesourcery.com>
PR c/107954
* c-errors.cc (pedwarn_c11): Use OPT_Wc11_c23_compat instead of
OPT_Wc11_c2x_compat.
* c-typeck.cc (build_conditional_expr, convert_for_assignment):
Use OPT_Wc11_c23_compat instead of OPT_Wc11_c2x_compat.
2023-11-04 Jakub Jelinek <jakub@redhat.com>
* c-parser.h (c_maybe_parse_omp_decl): Declare.
* c-parser.cc (struct c_parser): Add in_omp_decl_attribute member.
(c_parser_std_attribute): Uncoment omp::decl handling.
(c_parser_omp_var_list_parens): If parser->in_omp_decl_attribute
don't expect any arguments, instead create clause or TREE_LIST for
that decl.
(c_maybe_parse_omp_decl): New function.
(c_parser_omp_declare_target): If parser->in_omp_decl_attribute and
first token isn't name or comma invoke c_parser_omp_var_list_parens.
* c-decl.cc (c_decl_attributes): Uncomment omp::decl handling and
use *node rather than non-existing *decl.
2023-11-04 Jakub Jelinek <jakub@redhat.com>
* c-tree.def: New file.
* c-tree.h (struct c_tree_token_vec): Forward declare.
(c_tree_size): Declare.
* c-lang.h (struct c_omp_declare_target_attr): Add attr_syntax member.
(struct c_omp_begin_assumes_data): New type.
(current_omp_begin_assumes): Change type from int to
vec<c_omp_begin_assumes_data, va_gc> *.
* c-lang.cc: Include c-family/c-pragma.h and c-parser.h.
* c-parser.h (struct c_tree_token_vec_struct): New type.
(C_TOKEN_VEC_TOKENS): New macro.
* c-parser.cc (struct c_parser): Add omp_attrs_forbidden_p and
in_omp_attribute_pragma members.
(c_parser_skip_until_found): Handle CPP_PRAGMA_EOL when
parser->in_omp_attribute_pragma.
(c_parser_skip_to_pragma_eol): Likewise.
(c_parser_translation_unit): Adjust for current_omp_begin_assumes
being a vector rather than counter.
(c_parser_declaration_or_fndef): Handle omp::directive and
omp::sequence attributes on attribute declaration and declare simd
or declare variant directives in those on function declarations.
(c_parser_check_balanced_raw_token_sequence): Forward declare.
(c_parser_omp_directive_args, c_parser_omp_sequence_args): New
functions.
(c_parser_std_attribute): Handle omp::directive and omp::sequence
attributes.
(struct c_omp_attribute_data): New type.
(c_parser_handle_statement_omp_attributes,
c_parser_handle_directive_omp_attributes): New functions.
(c_parser_compound_statement_nostart): Handle omp::directive and
omp::sequence attributes on statements. Formatting fix.
(c_parser_all_labels): Handle omp::directive and omp::sequence
attributes on statements.
(c_parser_statement): Clear parser->omp_attrs_forbidden_p.
(c_parser_omp_variable_list): Handle parser->tokens
!= &parser->tokens_buf[0] by saving/restoring it.
(c_parser_omp_structured_block): Set parser->omp_attrs_forbidden_p.
(c_parser_omp_section_scan): New function.
(c_parser_omp_structured_block_sequence, c_parser_omp_sections_scope):
Use it.
(c_parser_omp_parallel): Set parser->omp_attrs_forbidden_p.
(c_parser_omp_task): Likewise.
(c_parser_omp_declare_simd): Handle function declaration after
std attributes.
(c_finish_omp_declare_simd): Don't assert all kinds are the same.
(c_parser_omp_declare_target): Also push attr_syntax flag.
(c_parser_omp_begin): Likewise. Adjust for current_omp_begin_assumes
type change.
(c_parser_omp_end): Adjust for current_omp_begin_assumes type
change. Diagnose mixing of attribute vs. pragma syntax on end assumes
or end declare target.
(c_parser_omp_declare_reduction): Handle parser->tokens
!= &parser->tokens_buf[0] by saving/restoring it.
* c-decl.cc: Include c-parser.h.
(current_omp_begin_assumes): Change type from int to
vec<c_omp_begin_assumes_data, va_gc> *.
(struct c_tree_token_vec): New type. Add static assertions
for sizeof and offsetof.
(union lang_tree_node): Add c_token_vec member and adjust GTY
desc for it.
(c_tree_size): New function.
(c_decl_attributes): Diagnose invalid omp::directive attribute
uses.
* c-objc-common.h (LANG_HOOKS_TREE_SIZE): Redefine.
2023-11-02 Martin Uecker <uecker@tugraz.at>
PR c/112347
* c-typeck.cc (convert_for_assignment): Add missing check.
2023-11-01 Martin Uecker <uecker@tugraz.at>
PR c/71219
* c-typeck.cc (convert_for_assignment): Add warning.
2023-10-26 liuhongt <hongtao.liu@intel.com>
* c-typeck.cc (build_vec_cmp): Pass type of arg0 to
truth_type_for.
2023-10-25 Thomas Schwinge <thomas@codesourcery.com>
* c-parser.cc (c_parser_omp_clause_name): Return
'PRAGMA_OACC_CLAUSE_SELF' for "self".
(c_parser_oacc_data_clause, OACC_UPDATE_CLAUSE_MASK): Adjust.
(c_parser_oacc_all_clauses): Remove 'bool compute_p' formal
parameter, and instead locally determine whether we're called for
an OpenACC compute construct or OpenACC 'update' directive.
(c_parser_oacc_compute): Adjust.
2023-10-25 Chung-Lin Tang <cltang@codesourcery.com>
* c-parser.cc (c_parser_oacc_compute_clause_self): New function.
(c_parser_oacc_all_clauses): Add new 'bool compute_p = false'
parameter, add parsing of self clause when compute_p is true.
(OACC_KERNELS_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_SELF.
(OACC_PARALLEL_CLAUSE_MASK): Likewise,
(OACC_SERIAL_CLAUSE_MASK): Likewise.
(c_parser_oacc_compute): Adjust call to c_parser_oacc_all_clauses to
set compute_p argument to true.
* c-typeck.cc (c_finish_omp_clauses): Add OMP_CLAUSE_SELF case.
2023-10-20 Florian Weimer <fweimer@redhat.com>
PR c/109827
PR other/44209
* c-typeck.cc (build_conditional_expr): Use OPT_Wint_conversion
for pointer/integer mismatch warnings.
2023-10-20 Florian Weimer <fweimer@redhat.com>
PR c/109826
PR other/44209
* c-typeck.cc (build_conditional_expr): Use
OPT_Wincompatible_pointer_types for pointer mismatches.
Emit location information for the operand.
2023-10-19 Andrew Pinski <pinskia@gmail.com>
PR c/100532
* c-typeck.cc (convert_argument): After erroring out
about an incomplete type return error_mark_node.
2023-10-19 Andrew Pinski <pinskia@gmail.com>
PR c/104822
* c-typeck.cc (convert_for_assignment): Check for null pointer
before warning about an incompatible scalar storage order.
2023-10-18 Andrew Pinski <pinskia@gmail.com>
PR c/101364
* c-decl.cc (diagnose_arglist_conflict): Test for
error mark before calling of c_type_promotes_to.
2023-10-18 Andrew Pinski <pinskia@gmail.com>
PR c/101285
* c-typeck.cc (c_safe_arg_type_equiv_p): Return true for error
operands early.
2023-10-17 Martin Uecker <uecker@tugraz.at>
PR c/111708
* c-decl.cc (grokdeclarator): Add error.
2023-10-03 David Malcolm <dmalcolm@redhat.com>
* c-objc-common.cc (c_tree_printer): Update for "m_" prefixes to
text_info fields.
2023-09-30 Eugene Rozenfeld <erozen@microsoft.com>
* Make-lang.in: Make create_fdas_for_cc1 target not .PHONY
2023-09-20 Jakub Jelinek <jakub@redhat.com>
* c-parser.cc (c_parser_postfix_expression_after_primary): Parse
__builtin_classify_type call with typename as argument.
2023-09-19 Richard Biener <rguenther@suse.de>
PR c/111468
* gimple-parser.cc (c_parser_gimple_binary_expression): Handle __LTGT.
2023-09-19 Richard Biener <rguenther@suse.de>
PR c/111468
* gimple-parser.cc (c_parser_gimple_binary_expression): Add
return type argument.
(c_parser_gimple_statement): Adjust.
(c_parser_gimple_paren_condition): Likewise.
(c_parser_gimple_binary_expression): Use passed in return type,
add support for - as POINTER_DIFF_EXPR, __UN{LT,LE,GT,GE,EQ},
__UNORDERED and __ORDERED.
2023-09-12 Tobias Burnus <tobias@codesourcery.com>
* c-parser.cc (struct c_omp_loc_tree): New.
(c_check_omp_allocate_allocator_r): New; checking moved from ...
(c_parser_omp_allocate): ... here. Call it via walk_tree. Avoid
ICE with tree_to_shwi for invalid too-large value.
2023-09-12 Tobias Burnus <tobias@codesourcery.com>
* c-parser.cc (c_parser_omp_construct): Move call to
c_parser_omp_allocate to ...
(c_parser_pragma): ... here.
(c_parser_omp_allocate): Avoid ICE is allocator could not be
parsed; set 'omp allocate' attribute for stack/automatic variables
and only reject static variables; add several additional
restriction checks.
* c-tree.h (c_mark_decl_jump_unsafe_in_current_scope): New prototype.
* c-decl.cc (decl_jump_unsafe): Return true for omp-allocated decls.
(c_mark_decl_jump_unsafe_in_current_scope): New.
(warn_about_goto, c_check_switch_jump_warnings): Add error for
omp-allocated decls.
2023-09-12 Martin Uecker <uecker@tugraz.at>
* c-typeck.cc (struct comptypes_data): Add structure.
(tagged_types_tu_compatible_p,
function_types_compatible_p, type_lists_compatible_p,
comptypes_internal): Add structure to interface, change
return type to bool, and adapt calls.
(comptarget_types): Change return type too bool.
(comptypes, comptypes_check_enum_int,
comptypes_check_different_types): Adapt calls.
2023-09-06 Jakub Jelinek <jakub@redhat.com>
PR c/102989
* c-decl.cc (finish_declspecs): Emit pedwarn_c11 on _BitInt.
* c-typeck.cc (c_common_type): Emit sorry for common type between
_Complex integer and larger _BitInt and return the _Complex integer.
2023-09-06 Jakub Jelinek <jakub@redhat.com>
PR c/102989
* c-convert.cc (c_convert): Handle BITINT_TYPE like INTEGER_TYPE.
* c-decl.cc (check_bitfield_type_and_width): Allow BITINT_TYPE
bit-fields.
(finish_struct): Prefer to use BITINT_TYPE for BITINT_TYPE bit-fields
if possible.
(declspecs_add_type): Formatting fixes. Handle cts_bitint. Adjust
for added union in *specs. Handle RID_BITINT.
(finish_declspecs): Handle cts_bitint. Adjust for added union
in *specs.
* c-parser.cc (c_keyword_starts_typename, c_token_starts_declspecs,
c_parser_declspecs, c_parser_gnu_attribute_any_word): Handle
RID_BITINT.
(c_parser_omp_clause_schedule): Handle BITINT_TYPE like INTEGER_TYPE.
* c-tree.h (enum c_typespec_keyword): Mention _BitInt in comment.
Add cts_bitint enumerator.
(struct c_declspecs): Move int_n_idx and floatn_nx_idx into a union
and add bitint_prec there as well.
* c-typeck.cc (c_common_type, comptypes_internal):
Handle BITINT_TYPE.
(perform_integral_promotions): Promote BITINT_TYPE bit-fields to
their declared type.
(build_array_ref, build_unary_op, build_conditional_expr,
build_c_cast, convert_for_assignment, digest_init, build_binary_op):
Handle BITINT_TYPE.
* c-fold.cc (c_fully_fold_internal): Handle BITINT_TYPE like
INTEGER_TYPE.
* c-aux-info.cc (gen_type): Handle BITINT_TYPE.
2023-09-06 Jakub Jelinek <jakub@redhat.com>
* c-decl.cc (declspecs_add_type): Use pedwarn_c11 rather than pedwarn
for _FloatN{,x} diagnostics and append " before C2X" to the diagnostic
text.
2023-09-05 Tobias Burnus <tobias@codesourcery.com>
* c-parser.cc (c_parser_omp_clause_allocate): Handle
error_mark_node.
2023-08-25 Sandra Loosemore <sandra@codesourcery.com>
* c-parser.cc (struct c_parser): Add omp_for_parse_state field.
(struct omp_for_parse_data): New.
(check_omp_intervening_code): New.
(add_structured_block_stmt): New.
(c_parser_compound_statement_nostart): Recognize intervening code,
nested loops, and other things that need special handling in
OpenMP loop constructs.
(c_parser_while_statement): Error on loop in intervening code.
(c_parser_do_statement): Likewise.
(c_parser_for_statement): Likewise.
(c_parser_postfix_expression_after_primary): Error on calls to
the OpenMP runtime in intervening code.
(c_parser_pragma): Error on OpenMP pragmas in intervening code.
(c_parser_omp_loop_nest): New.
(c_parser_omp_for_loop): Rewrite to use recursive descent, calling
c_parser_omp_loop_nest to do the heavy lifting.
2023-08-24 Richard Sandiford <richard.sandiford@arm.com>
* c-parser.cc (c_parser_std_attribute): Conditionally allow
two colons to be used in place of ::.
(c_parser_std_attribute_list): New function, split out from...
(c_parser_std_attribute_specifier): ...here. Allow the attribute-list
to start with __extension__. When it does, also allow two colons
to be used in place of ::.
2023-08-22 Tobias Burnus <tobias@codesourcery.com>
* c-parser.cc (c_parser_omp_clause_defaultmap): Parse
'all' as category.
2023-08-17 Jose E. Marchesi <jose.marchesi@oracle.com>
PR c/106537
* c-typeck.cc (build_binary_op): Warning on comparing distinct
pointer types only when -Wcompare-distinct-pointer-types.
2023-08-15 Chung-Lin Tang <cltang@codesourcery.com>
Thomas Schwinge <thomas@codesourcery.com>
* c-parser.cc (OACC_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2023-08-11 Jakub Jelinek <jakub@redhat.com>
* c-parser.cc (c_parser_typeof_specifier): Handle
__typeof_unqual and __typeof_unqual__ as !is_std.
2023-08-11 Martin Uecker <uecker@tugraz.at>
PR c/84510
* c-typeck.cc (build_c_cast): Add warning.
2023-08-05 Martin Uecker <uecker@tugraz.at>
* c-parser.cc (c_parser_generic_selection): Inhibit evaluation
warnings branches that are known not be taken during parsing.
2023-08-04 Tamar Christina <tamar.christina@arm.com>
* c-parser.cc (c_parser_while_statement, c_parser_do_statement,
c_parser_for_statement, c_parser_statement_after_labels,
c_parse_pragma_novector, c_parser_pragma): Wire through novector and
default to false.
2023-08-02 Eric Feng <ef2648@columbia.edu>
PR analyzer/107646
* c-parser.cc: New functions on stashing values for the
analyzer.
2023-08-01 Lewis Hyatt <lhyatt@gmail.com>
* c-parser.cc (pragma_lex_discard_to_eol): New function.
(c_init_preprocess): New function.
2023-07-31 Hamza Mahfooz <someguy@effective-light.com>
PR c/65213
* c-decl.cc (start_decl): Handle
-Wmissing-variable-declarations.
2023-07-31 Chung-Lin Tang <cltang@codesourcery.com>
* c-parser.cc (c_parser_oacc_host_data): Add checking requiring OpenACC
host_data construct to have an use_device clause.
2023-06-29 Qing Zhao <qing.zhao@oracle.com>
PR c/77650
* c-decl.cc (finish_struct): Issue warnings for new option.
2023-06-29 Qing Zhao <qing.zhao@oracle.com>
* c-decl.cc (finish_struct): Set TYPE_INCLUDES_FLEXARRAY for
struct/union type.
2023-06-29 Richard Biener <rguenther@suse.de>
PR c/110454
* c-typeck.cc (convert_argument): Sink formal_prec compute
to where TYPE_PRECISION is valid to use.
2023-06-29 Eugene Rozenfeld <erozen@microsoft.com>
* Make-lang.in: Pass correct stage cc1 when processing
profile data collected while building target libraries
2023-06-16 David Malcolm <dmalcolm@redhat.com>
PR c/107583
* c-parser.cc (c_parser_declspecs): Add hints to "unknown type
name" error.
2023-06-12 Tobias Burnus <tobias@codesourcery.com>
* c-parser.cc (c_parser_omp_clause_map): Reword error message for
clearness especially with 'omp target (enter/exit) data.'
2023-06-06 Kwok Cheung Yeung <kcy@codesourcery.com>
Tobias Burnus <tobias@codesourcery.com>
* c-parser.cc (c_parser_omp_clause_defaultmap,
c_parser_omp_clause_map): Parse 'present'.
(c_parser_omp_clause_to, c_parser_omp_clause_from): Remove.
(c_parser_omp_clause_from_to): New; parse to/from clauses with
optional present modifer.
(c_parser_omp_all_clauses): Update call.
(c_parser_omp_target_data, c_parser_omp_target_enter_data,
c_parser_omp_target_exit_data): Handle new map enum values
for 'present' mapping.
2023-05-30 Tobias Burnus <tobias@codesourcery.com>
PR c/109999
* c-parser.cc (c_parser_oacc_all_clauses,
c_parser_omp_all_clauses): Improve error wording.
2023-05-23 Martin Uecker <uecker@tugraz.at>
PR c/109450
* c-decl.cc (add_decl_expr): New function.
(grokdeclarator): Add decl expr for size expression in
types pointed to by parameters declared as arrays.
2023-05-23 Martin Uecker <uecker@tugraz.at>
PR c/70418
PR c/106465
PR c/107557
PR c/108423
* c-decl.cc (start_decl): Make sure size expression are
evaluated only in correct context.
(grokdeclarator): Size expression in fields may need a bind
expression, make sure DECL_EXPR is always created.
(grokfield, declspecs_add_type): Pass along size expressions.
(finish_struct): Remove unneeded DECL_EXPR.
(start_function): Evaluate size expressions for nested functions.
* c-parser.cc (c_parser_struct_declarations,
c_parser_struct_or_union_specifier): Pass along size expressions.
(c_parser_declaration_or_fndef): Evaluate size expression.
(c_parser_objc_at_property_declaration,
c_parser_objc_class_instance_variables): Adapt.
* c-tree.h (grokfield): Adapt declaration.
2023-05-19 Martin Uecker <uecker@tugraz.at>
* c-decl.cc (set_type_context): Remove.
(pop_scope, diagnose_mismatched_decls, pushdecl):
Remove dead code.
* c-typeck.cc (comptypes_internal): Remove dead code.
(same_translation_unit_p): Remove.
(tagged_types_tu_compatible_p): Some fixes.
2023-05-19 Joseph Myers <joseph@codesourcery.com>
* c-decl.cc (diagnose_mismatched_decls): Do not handle
thread-local declarations as tentative definitions for C2x.
(finish_decl): Do not allow thread-local definition with
incomplete type for C2x.
2023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
* c-convert.cc (c_convert): Ditto.
* c-decl.cc (merge_decls): Ditto.
* c-parser.cc (c_parser_omp_clause_reduction): Ditto.
(c_parser_omp_declare_reduction): Ditto.
* c-typeck.cc (build_component_ref): Ditto.
(convert_argument): Ditto.
(pointer_diff): Ditto.
(build_unary_op): Ditto.
(build_c_cast): Ditto.
(build_modify_expr): Ditto.
(store_init_value): Ditto.
(constexpr_init_fits_real_type): Ditto.
(check_constexpr_init): Ditto.
(c_finish_return): Ditto.
(handle_omp_array_sections_1): Ditto.
(c_finish_omp_clauses): Ditto.
* gimple-parser.cc (c_finish_gimple_return): Ditto.
2023-05-16 Joseph Myers <joseph@codesourcery.com>
* c-decl.cc (check_for_loop_decls): Use pedwarn_c11 for
diagnostics.
2023-05-15 Joseph Myers <joseph@codesourcery.com>
* c-decl.cc (grokdeclarator): Ignore _Atomic on function return
type for C2x.
2023-04-30 Andrew Pinski <apinski@marvell.com>
* c-typeck.cc (process_init_element): Print out array type
for excessive elements.
2023-04-30 Andrew Pinski <apinski@marvell.com>
PR c/107926
* c-typeck.cc (process_init_element): Move the check
for string cst until after the error message.
2023-04-28 Eugene Rozenfeld <erozen@microsoft.com>
* Make-lang.in: Merge perf data collected when compiling cc1 and runtime libraries
2023-04-27 Jakub Jelinek <jakub@redhat.com>
PR c/109409
* c-parser.cc (c_parser_initializer): Move diagnostics about
initialization of variable sized object with non-empty initializer
after c_parser_expr_no_commas call and ret.set_error (); after it.
2023-04-27 Jakub Jelinek <jakub@redhat.com>
PR c/107682
PR c/109412
* c-typeck.cc (pop_init_level): If constructor_type is FUNCTION_TYPE,
reject empty initializer as invalid.
2023-04-26 Richard Biener <rguenther@suse.de>
* gimple-parser.cc (c_parser_parse_gimple_body): Avoid
last_stmt.
2023-04-25 Tobias Burnus <tobias@codesourcery.com>
* c-parser.cc (c_parser_omp_scan_loop_body): Handle
zero exec statements before/after 'omp scan'.
2023-04-20 Jakub Jelinek <jakub@redhat.com>
PR c/107041
* c-decl.cc (diagnose_mismatched_decls): Avoid -Wenum-int-mismatch
warning on acc_on_device declaration.
2023-03-28 David Malcolm <dmalcolm@redhat.com>
PR c/107002
* c-typeck.cc (parser_build_binary_op): Update for new param of
check_for_xor_used_as_pow.
2023-03-10 Jakub Jelinek <jakub@redhat.com>
PR c/108079
* c-decl.cc (pop_scope): Suppress OPT_Wunused_variable warning
after diagnosing it.
2023-02-28 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/108894
* c-decl.cc (strict_flex_array_level_of): Move to c-common.cc
and rename to c_strict_flex_array_level_of.
(is_flexible_array_member_p): Adjust caller.
2023-02-18 Martin Uecker <uecker@tugraz.at>
PR c/108375
* c-decl.cc (decl_jump_unsafe): Use c_type_variably_modified_p.
(diagnose_mismatched_decl): Dito.
(warn_about_goto): Dito:
(c_check_switch_jump_warnings): Dito.
(finish_decl): Dito.
(finish_struct): Dito.
(grokdeclarator): Set C_TYPE_VARIABLY_MODIFIED.
(finish_struct): Set C_TYPE_VARIABLY_MODIFIED.
* c-objc-common.cc (c_var_mod_p): New function.
(c_var_unspec_p): Remove.
* c-objc-common.h: Set lang hook.
* c-parser.cc (c_parser_declararion_or_fndef): Use c_type_variably_modified_p.
(c_parser_typeof_specifier): Dito.
(c_parser_has_attribute_expression): Dito.
(c_parser_generic_selection): Dito.
* c-tree.h: Define C_TYPE_VARIABLY_MODIFIED and define c_var_mode_p.
* c-typeck.cc: Remove c_vla_mod_p and use C_TYPE_VARIABLY_MODIFIED.
2023-02-16 Patrick Palka <ppalka@redhat.com>
* c-parser.h: Mechanically drop static from static inline
functions via s/^static inline/inline/g.
2023-02-10 Joseph Myers <joseph@codesourcery.com>
* c-convert.cc (c_convert): Allow conversion of a null pointer
constant to nullptr_t.
* c-typeck.cc (null_pointer_constant_p): Remove static.
(convert_for_assignment): Allow conversion of a null pointer
constant to nullptr_t.
(digest_init): Handle NULLPTR_TYPE among scalar conversions.
* c-tree.h (null_pointer_constant_p): Declare.
2023-02-09 Tobias Burnus <tobias@codesourcery.com>
* c-parser.cc (c_parser_omp_allocate): Parse align
clause and check for restrictions.
2023-02-08 Joseph Myers <joseph@codesourcery.com>
* c-typeck.cc (check_constexpr_init): Remove argument
null_pointer_constant. Only check pointer initializers for being
null.
(digest_init): Update calls to check_constexpr_init.
2023-02-02 Joseph Myers <joseph@codesourcery.com>
* c-typeck.cc (build_binary_op): Allow comparisons between
pointers and nullptr_t values that are not null pointer constants.
2023-02-02 Joseph Myers <joseph@codesourcery.com>
* c-typeck.cc: Include "realmpfr.h".
(constexpr_init_fits_real_type): Do not allow signaling NaN
conversions to different types with the same mode. Handle
conversions from binary to decimal types.
(check_constexpr_init): Do not disallow real initializers for
complex types. Do not disallow binary initializers for decimal
floating types.
2023-01-31 Marek Polacek <polacek@redhat.com>
PR c++/107593
PR c++/108597
* c-objc-common.cc (instantiation_dependent_expression_p): New.
2023-01-27 Joseph Myers <joseph@codesourcery.com>
* c-parser.cc (c_parser_declaration_or_fndef): Do not allow braces
around auto initializer.
2023-01-16 Jakub Jelinek <jakub@redhat.com>
PR c++/105593
* c-parser.cc (c_parser_initializer): Check warning_enabled_at
at the DECL_SOURCE_LOCATION (decl) for OPT_Winit_self instead
of warn_init_self.
2023-01-14 Jakub Jelinek <jakub@redhat.com>
PR c++/108365
* c-typeck.cc (build_binary_op): Use may_shorten_divmod for integral
division or modulo.
2023-01-13 Qing Zhao <qing.zhao@oracle.com>
* c-decl.cc (strict_flex_array_level_of): ... here.
2023-01-11 Jakub Jelinek <jakub@redhat.com>
PR c/105972
* c-parser.cc (c_parser_declaration_or_fndef): Disable debug non-bind
markers for K&R function parameter declarations of nested functions.
2023-01-09 Joseph Myers <joseph@codesourcery.com>
* c-decl.cc (build_compound_literal): Call record_inline_static.
2023-01-06 Joseph Myers <joseph@codesourcery.com>
* c-parser.cc (c_parser_postfix_expression): Handle integer
generic arguments to functions passed to __builtin_tgmath as
_Float32x if any argument has _FloatNx or _Complex _FloatNx type.
Do not handle integer arguments to some narrowing functions as
_Float64.
2022-12-19 Jakub Jelinek <jakub@redhat.com>
PR c/108043
* c-parser.cc (c_parser_postfix_expression_after_paren_type): Diagnose
compound literals with function type.
2022-12-07 Joseph Myers <joseph@codesourcery.com>
* c-decl.cc (declspecs_add_type, declspecs_add_scspec): Check for
auto, constexpr and a type used together.
2022-12-06 Qing Zhao <qing.zhao@oracle.com>
* c-decl.cc (is_flexible_array_member_p): Call new function
strict_flex_array_level_of.
2022-11-24 Florian Weimer <fweimer@redhat.com>
PR c/107805
* c-decl.cc (declspecs_add_type): Propagate error_mark_bode
from type to specs.
2022-11-17 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
* c-decl.cc (start_function): Set the result decl source
location to the location of the typespec.
2022-11-17 David Malcolm <dmalcolm@redhat.com>
PR analyzer/107711
* c-parser.cc (ana::c_translation_unit::consider_macro): Pass NULL
to cpp_create_reader, rather than ident_hash, so that the new
reader gets its own hash table.
2022-11-15 David Malcolm <dmalcolm@redhat.com>
PR analyzer/106302
* c-parser.cc: Include "analyzer/analyzer-language.h" and "toplev.h".
(class ana::c_translation_unit): New.
(c_parser_translation_unit): Call ana::on_finish_translation_unit.
2022-11-12 Joseph Myers <joseph@codesourcery.com>
* c-decl.cc (start_underspecified_init)
(finish_underspecified_init): Handle name == NULL_TREE for
compound literals.
(merge_decls): Merge C_DECL_DECLARED_CONSTEXPR.
(shadow_tag_warned): Check for constexpr.
(start_decl): Add parameter do_push.
(build_compound_literal): Set C_DECL_DECLARED_CONSTEXPR.
(grokdeclarator): Handle constexpr.
(finish_struct): Set C_TYPE_FIELDS_NON_CONSTEXPR.
(declspecs_add_scspec): Handle constexpr.
* c-parser.cc (c_token_starts_compound_literal)
(c_token_starts_declspecs, c_parser_declaration_or_fndef)
(c_parser_declspecs, c_parser_gnu_attribute_any_word)
(c_parser_compound_literal_scspecs)
(c_parser_postfix_expression_after_paren_type): Handle constexpr.
Update calls to start_init.
(c_parser_declaration_or_fndef, c_parser_initializer)
(c_parser_initval): Pass true for new argument of
convert_lvalue_to_rvalue. Call convert_lvalue_to_rvalue for
constexpr compound literals.
(c_parser_static_assert_declaration_no_semi)
(c_parser_enum_specifier, c_parser_struct_declaration)
(c_parser_alignas_specifier, c_parser_initelt, c_parser_label):
Call convert_lvalue_to_rvalue on expressions required to be
integer constant expressions.
(c_parser_omp_declare_reduction): Update call to start_init.
* c-tree.h (C_TYPE_FIELDS_NON_CONSTEXPR)
(C_DECL_DECLARED_CONSTEXPR): New macros.
(struct c_declspecs): Add constexpr_p.
(start_decl, convert_lvalue_to_rvalue, start_init): Update
prototypes.
* c-typeck.cc (require_constant_value, require_constant_elements):
Change to bool.
(require_constexpr_value, maybe_get_constexpr_init)
(constexpr_init_fits_real_type, check_constexpr_init): New.
(convert_lvalue_to_rvalue): Add new parameter for_init. Call
maybe_get_constexpr_init.
(store_init_value): Update call to digest_init.
(digest_init): Add parameters int_const_expr, arith_const_expr and
require_constexpr. Check constexpr initializers.
(constructor_top_level): Remove.
(struct initializer_stack): Remove top_level. Add
require_constexpr_value.
(start_init): Remove parameter top_level. Add parameters
init_require_constant and init_require_constexpr. Save
require_constexpr_value on stack.
(pop_init_level): Use a null pointer constant for zero initializer
of pointer initialized with {}.
(output_init_element): Update call to digest_init. Avoid passing
null pointer constants of pointer type through digest_init a
second time when initializing a constexpr object.
2022-11-03 Joseph Myers <joseph@codesourcery.com>
* c-decl.cc (in_underspecified_init, start_underspecified_init)
(finish_underspecified_init): New.
(shadow_tag_warned, parser_xref_tag, start_struct, start_enum):
Give errors inside initializers of underspecified declarations.
(grokdeclarator): Handle (erroneous) case of C2X auto on a
parameter.
(declspecs_add_type): Handle c2x_auto_p case.
(declspecs_add_scspec): Handle auto possibly setting c2x_auto_p in
C2X mode.
(finish_declspecs): Handle c2x_auto_p.
* c-parser.cc (c_parser_declaration_or_fndef): Handle C2X auto.
* c-tree.h (C_DECL_UNDERSPECIFIED): New macro.
(struct c_declspecs): Add c2x_auto_p.
(start_underspecified_init, finish_underspecified_init): New
prototypes.
* c-typeck.cc (build_external_ref): Give error for underspecified
declaration referenced in its initializer.
2022-10-28 Joseph Myers <joseph@codesourcery.com>
* c-decl.cc (grokdeclarator): Pass
arg_info->no_named_args_stdarg_p to build_function_type.
(grokparms): Check arg_info->no_named_args_stdarg_p before
converting () to (void).
(build_arg_info): Initialize no_named_args_stdarg_p.
(get_parm_info): Set no_named_args_stdarg_p.
(start_function): Pass TYPE_NO_NAMED_ARGS_STDARG_P to
build_function_type.
(store_parm_decls): Count (...) functions as prototyped.
* c-parser.cc (c_parser_direct_declarator): Allow '...' after open
parenthesis to start parameter list.
(c_parser_parms_list_declarator): Always allow '...' with no
arguments, call pedwarn_c11 and set no_named_args_stdarg_p.
* c-tree.h (struct c_arg_info): Add field no_named_args_stdarg_p.
* c-typeck.cc (composite_type): Handle
TYPE_NO_NAMED_ARGS_STDARG_P.
(function_types_compatible_p): Compare
TYPE_NO_NAMED_ARGS_STDARG_P.
2022-10-28 Jakub Jelinek <jakub@redhat.com>
* c-parser.cc (c_parser_omp_all_clauses): Allow optional
comma before the first clause.
(c_parser_omp_allocate, c_parser_omp_atomic, c_parser_omp_depobj,
c_parser_omp_flush, c_parser_omp_scan_loop_body,
c_parser_omp_ordered, c_finish_omp_declare_variant,
c_parser_omp_declare_target, c_parser_omp_declare_reduction,
c_parser_omp_requires, c_parser_omp_error,
c_parser_omp_assumption_clauses): Likewise.
2022-10-28 Joseph Myers <joseph@codesourcery.com>
PR c/61469
* c-convert.cc (c_convert): Handle enums with underlying boolean
type like bool.
* c-decl.cc (shadow_tag_warned): Allow shadowing declarations for
enums with enum type specifier, but give errors for storage class
specifiers, qualifiers or alignment specifiers in non-definition
declarations of such enums.
(grokdeclarator): Give error for non-definition use of type
specifier with an enum type specifier.
(parser_xref_tag): Add argument has_enum_type_specifier. Pass it
to lookup_tag and use it to set ENUM_FIXED_UNDERLYING_TYPE_P.
(xref_tag): Update call to parser_xref_tag.
(start_enum): Add argument fixed_underlying_type. Complete enum
type with a fixed underlying type given in the definition. Give
error for defining without a fixed underlying type in the
definition if one was given in a prior declaration. Do not mark
enums with fixed underlying type as packed for -fshort-enums.
Store the enum type in the_enum.
(finish_enum): Do not adjust types of values or check their range
for an enum with a fixed underlying type. Set underlying type of
enum and variants.
(build_enumerator): Check enumeration constants for enum with
fixed underlying type against that type and convert to that type.
Increment in the underlying integer type, with handling for bool.
(c_simulate_enum_decl): Update call to start_enum.
(declspecs_add_type): Set specs->enum_type_specifier_ref_p.
* c-objc-common.cc (c_get_alias_set): Use ENUM_UNDERLYING_TYPE
rather than recomputing an underlying type based on size.
* c-parser.cc (c_parser_declspecs)
(c_parser_struct_or_union_specifier, c_parser_typeof_specifier):
Set has_enum_type_specifier for type specifiers.
(c_parser_enum_specifier): Handle enum type specifiers.
(c_parser_struct_or_union_specifier): Update call to
parser_xref_tag.
(c_parser_omp_atomic): Check for boolean increment or decrement
using C_BOOLEAN_TYPE_P.
* c-tree.h (C_BOOLEAN_TYPE_P): New.
(struct c_typespec): Add has_enum_type_specifier.
(struct c_declspecs): Add enum_type_specifier_ref_p.
(struct c_enum_contents): Add enum_type.
(start_enum, parser_xref_tag): Update prototypes.
* c-typeck.cc (composite_type): Allow for enumerated types
compatible with bool.
(common_type, comptypes_internal, perform_integral_promotions):
Use ENUM_UNDERLYING_TYPE.
(parser_build_binary_op, build_unary_op, convert_for_assignment)
(c_finish_return, c_start_switch, build_binary_op): Check for
boolean types using C_BOOLEAN_TYPE_P.
2022-10-24 Jakub Jelinek <jakub@redhat.com>
PR c++/107358
* c-typeck.cc (build_binary_op): Pass operands before excess precision
promotions to scalar_to_vector call.
2022-10-24 Arsen Arsenović <arsen@aarsen.me>
* c-decl.cc (finish_function): Ignore hosted when deciding
whether to implicitly return zero, but check noreturn.
* c-objc-common.cc (c_missing_noreturn_ok_p): Loosen the
requirements to just MAIN_NAME_P when hosted, or `int main'
otherwise.
2022-10-20 Richard Biener <rguenther@suse.de>
PR c/107305
PR c/107306
* gimple-parser.cc (c_parser_parse_gimple_body): Verify
the parsed IL and zap the body on error.
2022-10-18 Joseph Myers <joseph@codesourcery.com>
PR c/107164
* c-decl.cc (shadow_tag_warned): If pedantic, diagnose "enum tag;"
with previous declaration visible.
2022-10-18 Joseph Myers <joseph@codesourcery.com>
PR c/36113
* c-decl.cc (finish_enum): If any enumerators do not fit in int,
convert all to the type of the enumeration. pedwarn if no integer
type fits all enumerators and default to
widest_integer_literal_type_node in that case. Otherwise pedwarn
for type wider than intmax_t.
(build_enumerator): pedwarn for enumerators outside the range of
uintmax_t or intmax_t, and otherwise use pedwarn_c11 for
enumerators outside the range of int. On overflow, attempt to
find a wider type that can hold the value of the next enumerator.
Do not convert value to type determined with
c_common_type_for_size.
2022-10-14 Jakub Jelinek <jakub@redhat.com>
* c-typeck.cc (convert_arguments): Don't promote __bf16 to
double.
2022-10-14 Joseph Myers <joseph@codesourcery.com>
* c-decl.cc (build_compound_literal): Add parameter scspecs.
Handle storage class specifiers.
* c-parser.cc (c_token_starts_compound_literal)
(c_parser_compound_literal_scspecs): New.
(c_parser_postfix_expression_after_paren_type): Add parameter
scspecs. Call pedwarn_c11 for use of storage class specifiers.
Update call to build_compound_literal.
(c_parser_cast_expression, c_parser_sizeof_expression)
(c_parser_alignof_expression): Handle storage class specifiers for
compound literals. Update calls to
c_parser_postfix_expression_after_paren_type.
(c_parser_postfix_expression): Update syntax comment.
* c-tree.h (build_compound_literal): Update prototype.
* c-typeck.cc (c_mark_addressable): Diagnose taking address of
register compound literal.
2022-10-07 Qing Zhao <qing.zhao@oracle.com>
* c-decl.cc (flexible_array_member_type_p): New function.
(one_element_array_type_p): Likewise.
(zero_length_array_type_p): Likewise.
(add_flexible_array_elts_to_size): Call new utility
routine flexible_array_member_type_p.
(is_flexible_array_member_p): New function.
(finish_struct): Set the new DECL_NOT_FLEXARRAY flag.
2022-10-06 Joseph Myers <joseph@codesourcery.com>
* c-parser.cc (c_parse_init): Add D_EXT11 to mask if flag_no_asm
and not C2x.
(c_keyword_starts_typename, c_token_starts_declspecs)
(c_parser_declspecs, c_parser_objc_selector): Handle
RID_TYPEOF_UNQUAL.
(c_parser_typeof_specifier): Handle RID_TYPEOF_UNQUAL.
Distinguish typeof for C2x from __typeof__ for all standard
versions and typeof before C2x.
* c-typeck.cc (build_function_call_vec): Use unqualified version
of non-void return type.
(build_unary_op): Use unqualified type for increment and
decrement.
2022-10-06 Jakub Jelinek <jakub@redhat.com>
* c-parser.cc (c_parser_omp_assumption_clauses): Emit IFN_ASSUME
call for holds clause on assume construct.
2022-10-06 Jakub Jelinek <jakub@redhat.com>
PR c++/106654
* c-parser.cc (handle_assume_attribute): New function.
(c_parser_declaration_or_fndef): Handle assume attribute.
(c_parser_attribute_arguments): Add assume_attr argument,
if true, parse first argument as conditional expression.
(c_parser_gnu_attribute, c_parser_std_attribute): Adjust
c_parser_attribute_arguments callers.
(c_parser_statement_after_labels) <case RID_ATTRIBUTE>: Handle
assume attribute.
2022-10-04 Jakub Jelinek <jakub@redhat.com>
* c-lang.h (struct c_omp_declare_target_attr): New type.
(current_omp_declare_target_attribute): Change type from
int to vec<c_omp_declare_target_attr, va_gc> *.
* c-parser.cc (c_parser_translation_unit): Adjust for that change.
If last pushed directive was begin declare target, use different
wording and simplify format strings for easier translations.
(c_parser_omp_clause_device_type): Uncomment
check_no_duplicate_clause call.
(c_parser_omp_declare_target): Adjust for the
current_omp_declare_target_attribute type change, push { -1 }.
Use error_at rather than warning_at for declare target with
only device_type clauses.
(OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Define.
(c_parser_omp_begin): Add begin declare target support.
(c_parser_omp_end): Adjust for the
current_omp_declare_target_attribute type change, adjust
diagnostics wording and simplify format strings for easier
translations.
* c-decl.cc (current_omp_declare_target_attribute): Change type from
int to vec<c_omp_declare_target_attr, va_gc> *.
(c_decl_attributes): Adjust for the
current_omp_declare_target_attribute type change. If device_type
was present on begin declare target, add "omp declare target host"
and/or "omp declare target nohost" attributes.
2022-09-29 Joseph Myers <joseph@codesourcery.com>
* c-decl.cc (handle_std_noreturn_attribute): New function.
(std_attribute_table): Add _Noreturn and noreturn.
2022-09-27 Jakub Jelinek <jakub@redhat.com>
* c-lang.h (current_omp_begin_assumes): Declare.
* c-parser.cc: Include bitmap.h.
(c_parser_omp_end_declare_target): Rename to ...
(c_parser_omp_end): ... this. Handle also end assumes.
(c_parser_omp_begin, c_parser_omp_assumption_clauses,
c_parser_omp_assumes, c_parser_omp_assume): New functions.
(c_parser_translation_unit): Also diagnose #pragma omp begin assumes
without corresponding #pragma omp end assumes.
(c_parser_pragma): Use %s in may only be used at file scope
diagnostics to decrease number of translatable messages. Handle
PRAGMA_OMP_BEGIN and PRAGMA_OMP_ASSUMES. Handle PRAGMA_OMP_END
rather than PRAGMA_OMP_END_DECLARE_TARGET and call c_parser_omp_end
for it rather than c_parser_omp_end_declare_target.
(c_parser_omp_construct): Handle PRAGMA_OMP_ASSUME.
* c-decl.cc (current_omp_begin_assumes): Define.
2022-09-24 Jakub Jelinek <jakub@redhat.com>
PR c/106981
* c-typeck.cc (c_tree_equal): Only strip NON_LVALUE_EXPRs at the
start. For CONSTANT_CLASS_P or CASE_CONVERT: return false if t1 and
t2 have different types.
2022-09-22 David Malcolm <dmalcolm@redhat.com>
PR c/106830
* c-parser.cc (c_parser_initelt): Initialize m_decimal.
(c_parser_cast_expression): Likewise.
(c_parser_alignof_expression): Likewise.
(c_parser_postfix_expression_after_paren_type): Likewise.
(c_parser_postfix_expression_after_primary): Likewise.
(c_parser_expression): Likewise.
(c_parser_omp_variable_list): Likewise.
(c_parser_transaction_expression): Likewise.
* c-tree.h (c_expr::set_error): Likewise.
* c-typeck.cc (c_expr_sizeof_expr): Likewise.
(parser_build_unary_op): Likewise.
(parser_build_binary_op): Likewise.
(digest_init): Likewise.
(pop_init_level): Likewise.
* gimple-parser.cc (c_parser_gimple_call_internal): Likewise.
2022-09-19 Marek Polacek <polacek@redhat.com>
PR c/106947
* c-typeck.cc (maybe_warn_for_null_address): Don't emit stray
notes.
2022-09-15 Richard Biener <rguenther@suse.de>
* c-decl.cc (build_void_list_node): Remove.
2022-09-14 Julian Brown <julian@codesourcery.com>
* c-typeck.cc (c_finish_omp_clauses): Remove whole mapping node group
on error.
2022-09-07 Joseph Myers <joseph@codesourcery.com>
* c-parser.cc (c_parser_static_assert_declaration_no_semi)
(c_parser_alignas_specifier, c_parser_alignof_expression): Allow
for C2x spellings of keywords.
(c_parser_postfix_expression): Handle RID_TRUE and RID_FALSE.
2022-09-06 Jakub Jelinek <jakub@redhat.com>
* c-parser.cc (c_parser_omp_clause_doacross_sink): Don't verify val
in omp_cur_iteration - 1 has integer_type_node type.
2022-09-03 Jakub Jelinek <jakub@redhat.com>
* c-parser.cc (c_parser_omp_clause_name): Handle doacross.
(c_parser_omp_clause_depend_sink): Renamed to ...
(c_parser_omp_clause_doacross_sink): ... this. Add depend_p argument.
Handle parsing of doacross(sink:omp_cur_iteration-1). Use
OMP_CLAUSE_DOACROSS_SINK_NEGATIVE instead of
OMP_CLAUSE_DEPEND_SINK_NEGATIVE, build OMP_CLAUSE_DOACROSS instead
of OMP_CLAUSE_DEPEND and set OMP_CLAUSE_DOACROSS_DEPEND flag on it.
(c_parser_omp_clause_depend): Use OMP_CLAUSE_DOACROSS_SINK and
OMP_CLAUSE_DOACROSS_SOURCE instead of OMP_CLAUSE_DEPEND_SINK and
OMP_CLAUSE_DEPEND_SOURCE, build OMP_CLAUSE_DOACROSS for depend(source)
and set OMP_CLAUSE_DOACROSS_DEPEND on it.
(c_parser_omp_clause_doacross): New function.
(c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DOACROSS.
(c_parser_omp_depobj): Use OMP_CLAUSE_DEPEND_INVALID instead of
OMP_CLAUSE_DEPEND_SOURCE.
(c_parser_omp_for_loop): Don't diagnose here linear clause together
with ordered with argument.
(c_parser_omp_simd): Don't diagnose ordered clause with argument on
for simd.
(OMP_ORDERED_DEPEND_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DOACROSS.
(c_parser_omp_ordered): Handle also doacross and adjust for it
diagnostic wording.
* c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_DOACROSS.
Don't handle OMP_CLAUSE_DEPEND_SOURCE and OMP_CLAUSE_DEPEND_SINK.
2022-09-02 David Malcolm <dmalcolm@redhat.com>
PR c/90885
* c-parser.cc (c_parser_string_literal): Clear ret.m_decimal.
(c_parser_expr_no_commas): Likewise.
(c_parser_conditional_expression): Likewise.
(c_parser_binary_expression): Clear m_decimal when popping the
stack.
(c_parser_unary_expression): Clear ret.m_decimal.
(c_parser_has_attribute_expression): Likewise for result.
(c_parser_predefined_identifier): Likewise for expr.
(c_parser_postfix_expression): Likewise for expr.
Set expr.m_decimal when handling a CPP_NUMBER that was a decimal
token.
* c-tree.h (c_expr::m_decimal): New bitfield.
* c-typeck.cc (parser_build_binary_op): Clear result.m_decimal.
(parser_build_binary_op): Call check_for_xor_used_as_pow.
2022-09-01 Joseph Myers <joseph@codesourcery.com>
* c-decl.cc (grokparms): Handle () in a function declaration the
same as (void) for C2X.
2022-08-31 Joseph Myers <joseph@codesourcery.com>
* c-parser.cc (c_parser_label): Pass attributes to do_case.
* c-typeck.cc (do_case): Add argument ATTRS. Pass it to
c_add_case_label.
2022-08-26 Jakub Jelinek <jakub@redhat.com>
* c-typeck.cc (convert_arguments): Handle BUILT_IN_ISSIGNALING.
2022-08-25 Marek Polacek <polacek@redhat.com>
* c-convert.cc (c_convert) <case POINTER_TYPE>: Handle NULLPTR_TYPE.
Give a better diagnostic when converting to nullptr_t.
* c-decl.cc (c_init_decl_processing): Perform C-specific nullptr
initialization.
* c-parser.cc (c_parse_init): Maybe OR D_C2X into mask.
(c_parser_postfix_expression): Handle RID_NULLPTR.
* c-typeck.cc (null_pointer_constant_p): Return true when expr is
nullptr_node.
(build_unary_op) <case TRUTH_NOT_EXPR>: Handle NULLPTR_TYPE.
(build_conditional_expr): Handle the case when the second/third operand
is NULLPTR_TYPE and third/second operand is POINTER_TYPE.
(convert_for_assignment): Handle converting an expression of type
nullptr_t to pointer/bool.
(build_binary_op) <case TRUTH_XOR_EXPR>: Handle NULLPTR_TYPE.
<case EQ_EXPR>: Handle comparing operands of type nullptr_t.
2022-08-25 Joseph Myers <joseph@codesourcery.com>
* c-decl.cc (start_decl): Do not diagnose initialization of
variable-sized objects here.
* c-parser.cc (c_parser_braced_init): Add argument DECL. All
callers changed.
(c_parser_initializer): Diagnose initialization of variable-sized
objects other than with braced initializer.
(c_parser_braced_init): Use pedwarn_c11 for empty initializer
braces and update diagnostic text. Diagnose initialization of
variable-sized objects with nonempty braces.
* c-typeck.cc (digest_init): Update diagnostic for initialization
of variable-sized objects.
(really_start_incremental_init, set_designator)
(process_init_element): Update comments.
(pop_init_level): Allow scalar empty initializers.
2022-08-17 Tobias Burnus <tobias@codesourcery.com>
Chung-Lin Tang <cltang@codesourcery.com>
PR c++/104493
* c-decl.cc (c_decl_attributes, finish_decl): Call omp_mappable_type
instead of removed langhook.
* c-typeck.cc (c_finish_omp_clauses): Likewise.
2022-08-11 Marek Polacek <polacek@redhat.com>
PR middle-end/102633
* c-parser.cc (c_parser_initializer): Add new tree parameter. Use it.
Call suppress_warning.
(c_parser_declaration_or_fndef): Pass d down to c_parser_initializer.
(c_parser_omp_declare_reduction): Pass omp_priv down to
c_parser_initializer.
2022-08-08 Tom Honermann <tom@honermann.net>
* c-parser.cc (c_parser_string_literal): Use char8_t as the type
of CPP_UTF8STRING when char8_t support is enabled.
* c-typeck.cc (digest_init): Allow initialization of an array
of character type by a string literal with type array of
char8_t.
2022-08-01 David Malcolm <dmalcolm@redhat.com>
* c-typeck.cc (build_c_cast): Quote names of address spaces in
diagnostics.
(convert_for_assignment): Add a note to address space mismatch
diagnostics, specifying the expected and actual types.
2022-07-10 Lewis Hyatt <lhyatt@gmail.com>
PR preprocessor/97498
* c-parser.cc (c_parser_pragma): Set input_location to the
location of the pragma, rather than the start of the line.
2022-07-04 Tobias Burnus <tobias@codesourcery.com>
Chung-Lin Tang <cltang@codesourcery.com>
Thomas Schwinge <thomas@codesourcery.com>
* c-parser.cc (c_parser_omp_target_data, c_parser_omp_target_update,
c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Set
OMP_REQUIRES_TARGET_USED.
(c_parser_omp_requires): Remove sorry.
2022-07-01 Tobias Burnus <tobias@codesourcery.com>
* c-parser.cc (c_parser_omp_target_enter_data,
c_parser_omp_target_exit_data): Accept tofrom
map-type modifier but use 'to' / 'from' internally.
2022-06-16 David Malcolm <dmalcolm@redhat.com>
* c-decl.cc (implicitly_declare): Add auto_diagnostic_group to
group the warning with any note.
(warn_about_goto): Likewise to group error or warning with note.
Bail out if the warning wasn't emitted, to avoid emitting orphan
notes.
(lookup_label_for_goto): Add auto_diagnostic_group to
group the error with the note.
(check_earlier_gotos): Likewise.
(c_check_switch_jump_warnings): Likewise for any error/warning.
Conditionalize emission of the notes.
(diagnose_uninitialized_cst_member): Likewise for warning,
conditionalizing emission of the note.
(grokdeclarator): Add auto_diagnostic_group to group the "array
type has incomplete element type" error with any note.
(parser_xref_tag): Add auto_diagnostic_group to group warnings
with their notes. Conditionalize emission of notes.
(start_struct): Add auto_diagnostic_group to group the
"redefinition of" errors with any note.
(start_enum): Likewise for "redeclaration of %<enum %E%>" error.
(check_for_loop_decls): Likewise for pre-C99 error.
2022-06-07 Jakub Jelinek <jakub@redhat.com>
* c-parser.cc (c_parser_omp_clause_linear): Parse OpenMP 5.2
style linear clause modifiers. Set
OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER flag on the clauses when
old style modifiers are used.
* c-typeck.cc (c_finish_omp_clauses): Only reject linear clause
with val modifier on simd or for if the old style modifiers are
used.
2022-06-02 David Malcolm <dmalcolm@redhat.com>
* c-lang.cc (LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE): Redefine.
(c_get_sarif_source_language): New.
* c-tree.h (c_get_sarif_source_language): New decl.
2022-05-31 Jason Merrill <jason@redhat.com>
* Make-lang.in (c.tags): Look at *.cc.
2022-05-31 Jakub Jelinek <jakub@redhat.com>
* c-parser.cc (OMP_SCOPE_CLAUSE_MASK): Add firstprivate and allocate
clauses.
2022-05-28 Jakub Jelinek <jakub@redhat.com>
* c-parser.cc (c_parser_omp_declare_target): If OMP_CLAUSE_LINK was
seen first, use "%<to%>" or "%<enter%>" depending on
OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
"%<to%> or %<enter%>" wording.
2022-05-27 Jakub Jelinek <jakub@redhat.com>
* c-parser.cc (c_parser_omp_clause_name): Parse enter clause.
(c_parser_omp_all_clauses): For to clause on declare target, use
OMP_CLAUSE_ENTER clause with OMP_CLAUSE_ENTER_TO instead of
OMP_CLAUSE_TO_DECLARE clause. Handle PRAGMA_OMP_CLAUSE_ENTER.
(OMP_DECLARE_TARGET_CLAUSE_MASK): Add enter clause.
(c_parser_omp_declare_target): Use OMP_CLAUSE_ENTER instead of
OMP_CLAUSE_TO_DECLARE.
* c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_ENTER instead
of OMP_CLAUSE_TO_DECLARE, to OMP_CLAUSE_ENTER_TO use "to" as clause
name in diagnostics instead of
omp_clause_code_name[OMP_CLAUSE_CODE (c)].
2022-05-25 Jakub Jelinek <jakub@redhat.com>
PR c/91134
* c-tree.h (build_component_ref): Add ARROW_LOC location_t argument.
* c-typeck.cc (build_component_ref): Likewise. If DATUM is
INDIRECT_REF and ARROW_LOC isn't UNKNOWN_LOCATION, print a different
diagnostic and fixit hint if DATUM has pointer type.
* c-parser.cc (c_parser_postfix_expression,
c_parser_omp_variable_list): Adjust build_component_ref callers.
* gimple-parser.cc (c_parser_gimple_postfix_expression_after_primary):
Likewise.
2022-05-24 Jakub Jelinek <jakub@redhat.com>
PR c/105378
* c-parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
2022-05-18 Marek Polacek <polacek@redhat.com>
PR c/105131
* c-decl.cc (diagnose_mismatched_decls): Warn about enum/integer type
mismatches.
* c-tree.h (comptypes_check_enum_int): Declare.
* c-typeck.cc (comptypes): No longer static.
2022-05-17 Marek Polacek <polacek@redhat.com>
* c-decl.cc (finish_enum): Store the CONST_DECL into TREE_VALUE, not
its value.
2022-05-17 Jakub Jelinek <jakub@redhat.com>
* c-parser.cc (c_parser_omp_clause_depend): Parse
inoutset depend-kind.
(c_parser_omp_depobj): Likewise.
2022-05-16 Martin Liska <mliska@suse.cz>
* c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
2022-05-12 Jakub Jelinek <jakub@redhat.com>
* c-parser.cc (c_parse_init): Register omp_all_memory as keyword
if flag_openmp.
(c_parser_postfix_expression): Diagnose uses of omp_all_memory
in postfix expressions.
(c_parser_omp_variable_list): Handle omp_all_memory in depend
clause.
* c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
keyword in depend clause as null_pointer_node, diagnose invalid
uses.
2022-05-09 Martin Liska <mliska@suse.cz>
* c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
macros.
(c_parser_binary_expression): Likewise.
2022-05-07 Marek Polacek <polacek@redhat.com>
PR c++/101833
PR c++/47634
* c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
2022-04-08 Jakub Jelinek <jakub@redhat.com>
PR c/105149
* c-typeck.cc (c_build_va_arg): Reject function types.
2022-03-22 Marek Polacek <polacek@redhat.com>
PR c/82283
PR c/84685
* c-typeck.cc (struct initializer_stack): Add 'designated' member.
(start_init): Set it.
(finish_init): Restore constructor_designated.
(push_init_level): Set constructor_designated to the value of
constructor_designated in the upper constructor_stack.
2022-03-12 Thomas Schwinge <thomas@codesourcery.com>
PR other/65095
* c-typeck.cc (handle_omp_array_sections_1)
(c_oacc_check_attachments): Call 'user_omp_clause_code_name'
instead of 'c_omp_map_clause_name'.
2022-03-09 Joseph Myers <joseph@codesourcery.com>
* c-typeck.cc (function_types_compatible_p): Do not handle C2X
differently from earlier standards for unprototyped function type
compatibility.
2022-03-09 Jakub Jelinek <jakub@redhat.com>
PR c/104711
* c-fold.cc (c_fully_fold_internal): Don't emit
-Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
* c-typeck.cc (build_binary_op): Likewise.
2022-03-07 Jakub Jelinek <jakub@redhat.com>
* c-parser.cc (c_parser_omp_clause_map): Add missing space in string
literal.
2022-02-23 Richard Biener <rguenther@suse.de>
* gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
SSA names without definition.
(c_parser_gimple_declaration): Handle pointer typed SSA names.
2022-02-17 Jakub Jelinek <jakub@redhat.com>
PR c/104532
* c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
convert_lvalue_to_rvalue and build_indirect_ref instead of
build_simple_mem_ref.
2022-02-11 Richard Biener <rguenther@suse.de>
* gimple-parser.cc (c_parser_gimple_statement): Properly parse
VEC_COND_EXPRs.
2022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
* c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
clause.
(c_parser_omp_variable_list): Handle array sections.
(c_parser_omp_clause_has_device_addr): Added.
(c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
case.
(c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
OMP_CLAUSE_MASK.
* c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
(c_finish_omp_clauses): Handle array sections.
2022-02-09 Jakub Jelinek <jakub@redhat.com>
PR c/104427
* c-parser.cc (c_parser_postfix_expression)
<case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
instead of build1_loc to build PAREN_EXPR.
* c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
* c-fold.cc (c_fully_fold_internal): Likewise.
2022-01-17 Martin Liska <mliska@suse.cz>
* Make-lang.in: Rename .c names to .cc.
* c-convert.cc: Likewise.
* c-decl.cc (struct lang_identifier): Likewise.
(pop_scope): Likewise.
(finish_decl): Likewise.
* c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
* c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
* c-parser.h (GCC_C_PARSER_H): Likewise.
* c-tree.h (c_keyword_starts_typename): Likewise.
(finish_declspecs): Likewise.
(c_get_alias_set): Likewise.
(enum c_oracle_request): Likewise.
(tag_exists_p): Likewise.
(set_c_expr_source_range): Likewise.
* c-typeck.cc (c_common_type): Likewise.
(c_finish_omp_clauses): Likewise.
* config-lang.in: Likewise.
2022-01-17 Martin Liska <mliska@suse.cz>
* c-aux-info.c: Moved to...
* c-aux-info.cc: ...here.
* c-convert.c: Moved to...
* c-convert.cc: ...here.
* c-decl.c: Moved to...
* c-decl.cc: ...here.
* c-errors.c: Moved to...
* c-errors.cc: ...here.
* c-fold.c: Moved to...
* c-fold.cc: ...here.
* c-lang.c: Moved to...
* c-lang.cc: ...here.
* c-objc-common.c: Moved to...
* c-objc-common.cc: ...here.
* c-parser.c: Moved to...
* c-parser.cc: ...here.
* c-typeck.c: Moved to...
* c-typeck.cc: ...here.
* gccspec.c: Moved to...
* gccspec.cc: ...here.
* gimple-parser.c: Moved to...
* gimple-parser.cc: ...here.
2022-01-17 Andrew Stubbs <ams@codesourcery.com>
* c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
2022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
PR c++/103705
* c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
outer node for ARRAY_REFs.
2022-01-01 Jakub Jelinek <jakub@redhat.com>
PR objc/103639
* c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
ObjC foreach, emit normal BREAK_STMT rather than goto to label.
2021-12-17 Marek Polacek <polacek@redhat.com>
PR c/103649
* c-decl.c (c_warn_unused_attributes): Don't warn for
attribute_ignored_p.
* c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
arguments when the attribute is ignored.
2021-12-14 Jakub Jelinek <jakub@redhat.com>
PR c/103587
* c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
consume the pragma and silently skip to the pragma eol.
2021-12-12 Jonathan Wakely <jwakely@redhat.com>
* c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
* c-parser.c: Likewise.
2021-12-09 Jakub Jelinek <jakub@redhat.com>
PR pch/71934
* c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
to resort_data.new_value.
2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
* c-parser.c (struct omp_dim): New struct type for use inside
c_parser_omp_variable_list.
(c_parser_omp_variable_list): Allow multiple levels of array and
component accesses in array section base-pointer expression.
(c_parser_omp_clause_to): Set 'allow_deref' to true in call to
c_parser_omp_var_list_parens.
(c_parser_omp_clause_from): Likewise.
* c-typeck.c (handle_omp_array_sections_1): Extend allowed range
of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
POINTER_PLUS_EXPR.
(c_finish_omp_clauses): Extend allowed ranged of expressions
involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
PR middle-end/92120
* c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
call to c_parser_omp_variable_list to 'true'.
* c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
array base handling.
(c_finish_omp_clauses): Handle 'A->member' case in map clauses.
2021-11-30 Thomas Schwinge <thomas@codesourcery.com>
* c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
orphan loop" checking.
2021-11-30 Cesar Philippidis <cesar@codesourcery.com>
Thomas Schwinge <thomas@codesourcery.com>
* c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
OpenACC gang reductions.
2021-11-30 Richard Biener <rguenther@suse.de>
* gimple-parser.c (c_parser_gimple_postfix_expression):
avoid unreachable code after break.
2021-11-29 Eric Gallager <egallager@gcc.gnu.org>
PR other/103021
* Make-lang.in: Use ETAGS variable in TAGS target.
2021-11-29 Richard Biener <rguenther@suse.de>
* c-typeck.c (c_tree_equal): Remove unreachable return.
* c-parser.c (get_matching_symbol): Likewise.
2021-11-23 Jakub Jelinek <jakub@redhat.com>
* c-typeck.c (c_clone_omp_udr): Don't initialize
id.transform_lang_insert_block.
2021-11-19 Martin Sebor <msebor@redhat.com>
PR c++/33925
PR c/102867
* c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
code resulting from macro expansion.
2021-11-19 Martin Liska <mliska@suse.cz>
Revert:
2021-11-19 Martin Liska <mliska@suse.cz>
* c-parser.c (add_debug_begin_stmt): Use option directly.
2021-11-18 Matthias Kretz <m.kretz@gsi.de>
* c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
* c-parser.c (c_parser_postfix_expression): Likewise.
2021-11-18 Martin Liska <mliska@suse.cz>
* c-parser.c (add_debug_begin_stmt): Use option directly.
2021-11-17 Martin Sebor <msebor@redhat.com>
PR c/101702
* c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
bounds before deciding if they're constant.
2021-11-15 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
2021-11-11 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_omp_clause_num_teams): Parse optional
lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
OMP_CLAUSE_NUM_TEAMS_EXPR.
(c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
combined target teams even lower-bound expression.
2021-11-11 Richard Biener <rguenther@suse.de>
* gimple-parser.c: Shuffle bitmap.h include.
2021-11-03 Joseph Myers <joseph@codesourcery.com>
PR c/103031
* c-convert.c (c_convert): New function, based on convert.
(convert): Make into wrapper of c_convert.
(convert_init): New function.
* c-typeck.c (enum impl_conv): Add ic_init_const.
(convert_for_assignment): Handle ic_init_const like ic_init. Add
new argument to convert_and_check call.
(digest_init): Pass ic_init_const to convert_for_assignment for
initializers required to be constant.
2021-11-02 Richard Sandiford <richard.sandiford@arm.com>
* c-tree.h (c_simulate_record_decl): Declare.
* c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
* c-decl.c (c_simulate_record_decl): New function.
2021-10-22 Eric Gallager <egallager@gcc.gnu.org>
PR other/102663
* Make-lang.in: Add dummy c.install-dvi target.
2021-10-15 Richard Biener <rguenther@suse.de>
PR c/102763
* gimple-parser.c
(c_parser_gimple_postfix_expression_after_primary): Check
for a pointer do be dereferenced by ->.
2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
* c-parser.c (c_finish_omp_declare_variant): Change call from
c_omp_check_context_selector to omp_check_context_selector. Change
call from c_omp_mark_declare_variant to omp_mark_declare_variant.
2021-10-09 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_omp_structured_block_sequence): New function.
(c_parser_omp_scan_loop_body): Use it.
(c_parser_omp_sections_scope): Likewise.
2021-10-07 Richard Biener <rguenther@suse.de>
* c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
2021-10-05 Richard Biener <rguenther@suse.de>
PR c/102605
* gimple-parser.c (c_parser_gimple_postfix_expression):
Accept more address _Literals.
2021-10-04 Marek Polacek <polacek@redhat.com>
PR c++/97573
* c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
2021-10-01 Martin Sebor <msebor@redhat.com>
PR c/102103
* c-typeck.c (maybe_warn_for_null_address): New function.
(build_binary_op): Call it.
2021-10-01 Jakub Jelinek <jakub@redhat.com>
Richard Biener <rguenther@suse.de>
PR sanitizer/102515
* c-typeck.c (build_binary_op): Call ubsan_instrument_division
for division even for SANITIZE_SI_OVERFLOW.
2021-10-01 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_omp_clause_order): Set
OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
2021-09-28 Andrew Pinski <apinski@marvell.com>
PR c/32122
* c-parser.c (c_parser_statement_after_labels): Pass
the c_expr instead of the tree to c_finish_goto_ptr.
* c-typeck.c (c_finish_goto_ptr): Change the second
argument type to c_expr.
* c-tree.h (c_finish_goto_ptr): Likewise.
Error out if the expression was not of a pointer type.
2021-09-22 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
modifiers.
2021-09-18 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_omp_clause_order): Parse unconstrained
and reproducible modifiers.
(OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
2021-09-18 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_omp_clause_default): Handle private and
firstprivate arguments, adjust diagnostics on unknown argument.
2021-09-17 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
is true.
2021-09-10 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
cond.value is >, < or == with omp_atomic_lhs as one of the operands,
don't call build_conditional_expr, instead build a COND_EXPR directly.
(c_parser_binary_expression): Avoid calling parser_build_binary_op
if omp_atomic_lhs even in more cases for >, < or ==.
(c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
acq_rel on atomic read/write and acq_rel/acquire clauses on update.
* c-typeck.c (build_binary_op): For flag_openmp only handle
MIN_EXPR/MAX_EXPR.
2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
* c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
directive.
2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
* c-decl.c (enum deprecated_states): Add unavailable state.
(merge_decls): Copy unavailability.
(quals_from_declspecs): Handle unavailable case.
(start_decl): Amend the logic handling suppression of nested
deprecation states to include unavailability.
(smallest_type_quals_location): Amend comment.
(grokdeclarator): Handle the unavailable deprecation state.
(declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
* c-tree.h (struct c_declspecs): Add unavailable_p.
* c-typeck.c (build_component_ref): Handle unavailability.
(build_external_ref): Likewise.
2021-09-01 Roger Sayle <roger@nextmovesoftware.com>
Joseph Myers <joseph@codesourcery.com>
PR c/79412
* c-decl.c (duplicate_decls): On significant mismatches, mark the
types of both (non-function) decls as error_mark_node, so that the
middle-end can see the code is malformed.
(free_attr_access_data): Don't process if the type has been set to
error_mark_node.
2021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
* c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
and 'ancestor' in 'target device' clauses.
2021-08-23 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_omp_clause_num_tasks,
c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
2021-08-22 Martin Uecker <muecker@gwdg.de>
PR c/98397
* c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
for pointers to arrays with qualifiers.
(build_conditional_expr): For C23 don't lose qualifiers for pointers
to arrays when the other pointer is a void pointer. Update warnings.
(convert_for_assignment): Update warnings for C2X when converting from
void* with qualifiers to a pointer to array with the same qualifiers.
2021-08-20 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_omp_error): New function.
(c_parser_pragma): Handle PRAGMA_OMP_ERROR.
2021-08-20 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
comma at the end of list.
(c_parser_omp_requires): Likewise.
2021-08-19 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_omp_requires): Don't call
c_parser_peek_2nd_token and optionally consume token if current
token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
2021-08-18 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_omp_nothing): New function.
(c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
2021-08-18 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_statement_after_labels): Add restart label
near the start of the function. If c_parser_pragma returns false,
goto restart.
(c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
return what c_parser_omp_declare returned. Return true instead of
false after emitting errors that the directive is not allowed in
pragma_stmt context.
(c_parser_omp_ordered): Return true instead of
false after emitting errors that the directive is not allowed in
pragma_stmt context.
(c_parser_omp_target_update): Likewise.
(c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
Change return type from tree to bool, return false if the
directive should be ignored in pragma_stmt contexts.
(c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
return their result directly.
(c_parser_omp_cancellation_point): Change return type from void to
bool, return false if the directive should be ignored in pragma_stmt
contexts.
(c_parser_omp_declare): Likewise.
2021-08-17 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
(c_parser_omp_scope): New function.
(c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
2021-08-12 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
(c_parser_omp_clause_filter): New function.
(c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
(OMP_MASKED_CLAUSE_MASK): Define.
(c_parser_omp_masked): New function.
(c_parser_omp_parallel): Handle parallel masked.
(c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
* c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
2021-08-12 Martin Uecker <muecker@gwdg.de>
PR c/101838
PR c/29970
* c-typeck.c (c_expr_sizeof_type): Evaluate
size expressions for structs of variable size.
2021-08-12 Tobias Burnus <tobias@codesourcery.com>
* c-parser.c (c_parser_omp_clause_proc_bind): Accept
'primary' as alias for 'master'.
2021-08-10 Martin Uecker <muecker@gwdg.de>
PR c/29970
* c-typeck.c (c_expr_sizeof_expr): Evaluate
size expressions for structs of variable size.
2021-08-06 Tamar Christina <tamar.christina@arm.com>
* c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
* c-tree.h (c_simulate_enum_decl): Likewise.
2021-08-06 Martin Sebor <msebor@redhat.com>
* c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
vec arguments to by-reference.
(c_finish_omp_declare_simd): Same.
(c_parser_compound_statement_nostart): Same.
(c_parser_for_statement): Same.
(c_parser_objc_methodprotolist): Same.
(c_parser_oacc_routine): Same.
(c_parser_omp_for_loop): Same.
(c_parser_omp_declare_simd): Same.
2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>
Cesar Philippidis <cesar@codesourcery.com>
* c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
(c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
(OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
* c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
2021-07-20 Martin Sebor <msebor@redhat.com>
* c-tree.h (c_build_function_call_vec): Adjust by-value argument to
by-const-reference.
* c-typeck.c (c_build_function_call_vec): Same.
2021-07-15 Martin Sebor <msebor@redhat.com>
PR c/101289
PR c/97548
* c-decl.c (get_parm_array_spec): Strip nops.
2021-07-06 Martin Sebor <msebor@redhat.com>
* c-objc-common.c (c_tree_printer): Remove support for %G and %K.
2021-07-02 Jakub Jelinek <jakub@redhat.com>
PR c/101297
* c-parser.c (c_parser_omp_atomic): Consume comma only if it
appears before a CPP_NAME.
2021-06-25 Martin Sebor <msebor@redhat.com>
* c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
warning_suppressed_p, suppress_warning, and copy_no_warning.
(diagnose_mismatched_decls): Same.
(duplicate_decls): Same.
(grokdeclarator): Same.
(finish_function): Same.
(c_write_global_declarations_1): Same.
* c-fold.c (c_fully_fold_internal): Same.
* c-parser.c (c_parser_expr_no_commas): Same.
(c_parser_postfix_expression): Same.
* c-typeck.c (array_to_pointer_conversion): Same.
(function_to_pointer_conversion): Same.
(default_function_array_conversion): Same.
(convert_lvalue_to_rvalue): Same.
(default_conversion): Same.
(build_indirect_ref): Same.
(build_function_call_vec): Same.
(build_atomic_assign): Same.
(build_unary_op): Same.
(c_finish_return): Same.
(emit_side_effect_warnings): Same.
(c_finish_stmt_expr): Same.
(c_omp_clause_copy_ctor): Same.
2021-06-24 Jakub Jelinek <jakub@redhat.com>
PR c/101176
* c-parser.c (c_parser_has_attribute_expression): Set source range for
the result.
2021-06-24 Jakub Jelinek <jakub@redhat.com>
PR c/101171
* c-typeck.c (build_c_cast): Don't call note_integer_operands on
error_mark_node.
2021-06-24 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
C_ORT_OMP for clauses on target construct.
(OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
(c_parser_omp_target): For non-combined target add
map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
C_ORT_OMP_TARGET to c_finish_omp_clauses.
* c-typeck.c (handle_omp_array_sections): Adjust ort handling
for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
never present on C_ORT_*DECLARE_SIMD.
(c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
corresponding map clauses.
2021-06-21 Jakub Jelinek <jakub@redhat.com>
PR inline-asm/100785
* c-typeck.c (c_mark_addressable): Diagnose trying to make
bit-fields addressable.
2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
* c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
similar.
2021-06-14 Tobias Burnus <tobias@codesourcery.com>
PR c/100913
* c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
var in the error case.
2021-06-07 Eric Botcazou <ebotcazou@adacore.com>
PR c/100920
* c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
spot built-in functions.
2021-06-06 Jakub Jelinek <jakub@redhat.com>
PR c/100902
* c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
even when target is combined with other constructs.
2021-06-06 Eric Botcazou <ebotcazou@adacore.com>
PR c/100920
* c-decl.c (finish_struct): Fix thinko in previous change.
* c-typeck.c (convert_for_assignment): Do not warn on pointer
assignment and initialization for storage order purposes if the
RHS is a call to a DECL_IS_MALLOC function.
2021-06-04 Martin Sebor <msebor@redhat.com>
PR c/100783
* c-objc-common.c (print_type): Handle erroneous types.
2021-06-03 Jakub Jelinek <jakub@redhat.com>
PR c++/100859
* c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
after depend only cases.
2021-05-31 Richard Biener <rguenther@suse.de>
PR c++/88601
* c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
* c-parser.c (c_parser_postfix_expression): Likewise.
2021-05-28 Richard Biener <rguenther@suse.de>
PR c/100803
* gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
invalid if conditions.
2021-05-28 Jakub Jelinek <jakub@redhat.com>
PR middle-end/99928
* c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
(c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
if present in map_head, map_field_head or map_firstprivate_head
bitmaps.
2021-05-28 Tobias Burnus <tobias@codesourcery.com>
* c-parser.c (c_parser_omp_clause_affinity): New.
(c_parser_omp_clause_name, c_parser_omp_variable_list,
c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
* c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
c_finish_omp_clauses): Likewise.
2021-05-26 Eric Botcazou <ebotcazou@adacore.com>
PR c/100653
* c-decl.c (finish_struct): Warn for a union containing an aggregate
field with a differing scalar storage order.
2021-05-21 Jakub Jelinek <jakub@redhat.com>
PR middle-end/99928
* c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
if a decl is mentioned both in map clause and in such firstprivate
clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
2021-05-19 Jakub Jelinek <jakub@redhat.com>
PR middle-end/99928
* c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
master when combined with taskloop.
(c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
parallel master when not combined with taskloop.
2021-05-18 Richard Biener <rguenther@suse.de>
PR c/100522
* gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
Diagnose calls to non-functions.
(c_parser_gimple_statement): Diagnose unexpected assignment RHS.
2021-05-17 Richard Biener <rguenther@suse.de>
PR c/100625
* gimple-parser.c (c_parser_gimple_label): Avoid building
a GIMPLE label with NULL label decl.
2021-05-13 Martin Sebor <msebor@redhat.com>
PR c/100550
* c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
2021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
* c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
'close'.
2021-05-10 Martin Liska <mliska@suse.cz>
* c-aux-info.c (affix_data_type): Use startswith
function instead of strncmp.
* c-typeck.c (build_function_call_vec): Likewise.
* gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
2021-05-07 Eric Botcazou <ebotcazou@adacore.com>
* c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
on the address of a pointer field in a record with reverse SSO.
2021-05-04 Tobias Burnus <tobias@codesourcery.com>
* c-typeck.c (c_finish_omp_clauses): Accept float + complex
for || and && reductions.
2021-04-29 Joseph Myers <joseph@codesourcery.com>
* c-typeck.c (function_types_compatible_p): For C2X, treat
unprototyped function as compatible with non-variadic prototyped
function even if some argument types are changed by the default
argument promotions.
2021-04-15 Martin Sebor <msebor@redhat.com>
PR c/99420
PR c/99972
* c-decl.c (pushdecl): Always propagate type attribute.
2021-04-15 Richard Sandiford <richard.sandiford@arm.com>
PR c/98852
* c-typeck.c (c_common_type): Do not drop attributes that
affect type identity.
2021-04-10 Jakub Jelinek <jakub@redhat.com>
PR c/99990
* c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
error_mark_node.
2021-03-25 Jakub Jelinek <jakub@redhat.com>
PR c++/99565
* c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
to operand_equal_p.
2021-03-19 Jakub Jelinek <jakub@redhat.com>
PR c/99588
* c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
with modifycode NOP_EXPR produces and mark the _Atomic var as read
if found.
(build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
2021-03-15 Tobias Burnus <tobias@codesourcery.com>
PR c++/99509
* c-decl.c (finish_decl): For 'omp declare target implicit' vars,
ensure that the varpool node is marked as offloadable.
2021-03-05 Tobias Burnus <tobias@codesourcery.com>
PR c/99137
* c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
2021-02-24 Martin Sebor <msebor@redhat.com>
PR middle-end/97172
* c-decl.c (free_attr_access_data): Clear attribute arg spec.
2021-02-18 Jakub Jelinek <jakub@redhat.com>
PR c/99136
* c-typeck.c (c_finish_return): Don't wrap retval into
EXCESS_PRECISION_EXPR in functions that return void.
2021-02-11 Marek Polacek <polacek@redhat.com>
* c-parser.c (c_parser_if_statement): Use vec_free.
2021-02-04 Martin Sebor <msebor@redhat.com>
PR c/97882
* c-decl.c (locate_old_decl): Add type to diagnostic output.
(diagnose_mismatched_decls): Same.
(start_function): Introduce temporaries for better readability.
* c-typeck.c (comptypes_internal): Only consider complete enum
types in comparisons with integers.
2021-02-01 Martin Sebor <msebor@redhat.com>
PR middle-end/97172
* c-decl.c (free_attr_access_data): New function.
(c_parse_final_cleanups): Call free_attr_access_data.
2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
* c-parser.c (c_parser_omp_clause_detach): New.
(c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
(OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
* c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
clause. Prevent use of detach with mergeable and overriding the
data sharing mode of the event handle.
2021-01-15 Jakub Jelinek <jakub@redhat.com>
* c-typeck.c (c_finish_omp_clauses): For reduction build array with
unqualified element type and then call c_build_qualified_type on the
ARRAY_TYPE.
2021-01-07 Richard Biener <rguenther@suse.de>
* gimple-parser.c (c_parser_gimple_compound_statement): Only
reallocate loop array if it is too small.
2020-12-16 Martin Uecker <muecker@gwdg.de>
PR c/98047
* c-typeck.c (build_modify_expr): Drop qualifiers.
2020-12-16 Martin Uecker <muecker@gwdg.de>
PR c/98260
* c-parser.c (c_parser_expression): Look into
nop expression when marking expressions as read.
2020-12-14 Martin Liska <mliska@suse.cz>
PR sanitizer/98204
* c-typeck.c (pointer_diff): Do not emit a top-level
sanitization.
(build_binary_op): Likewise.
2020-12-09 Tobias Burnus <tobias@codesourcery.com>
* c-parser.c (c_parser_omp_allocate): New.
(c_parser_omp_construct): Call it.
2020-12-09 Richard Biener <rguenther@suse.de>
PR c/98200
* gimple-parser.c (c_parser_gimple_postfix_expression): Return
early on error.
2020-12-07 Martin Uecker <muecker@gwdg.de>
PR c/97981
* c-typeck.c (convert_lvalue_to_rvalue): Move the code
that drops qualifiers to the end of the function.
2020-11-26 Martin Uecker <muecker@gwdg.de>
PR c/65455
PR c/92935
* c-parser.c (c_parser_declaration_or_fndef): Remove
redundant code to drop qualifiers of _Atomic types for __auto_type.
(c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
types for __typeof__.
2020-11-24 Jakub Jelinek <jakub@redhat.com>
PR c/97958
* c-parser.c (c_parser_binary_expression): For omp atomic binary
expressions, use make_node instead of build2 to avoid checking build2
performs.
2020-11-23 Joseph Myers <joseph@codesourcery.com>
PR c/95630
* c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
for comparisons of complete and incomplete pointers.
2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
* c-aux-info.c (gen_type): Support opaque types.
2020-11-20 Martin Sebor <msebor@redhat.com>
PR middle-end/97879
* c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
2020-11-20 Jakub Jelinek <jakub@redhat.com>
PR other/97911
* Make-lang.in (c.serial): Change from goal to a variable.
(.PHONY): Drop c.serial.
2020-11-20 Martin Uecker <muecker@gwdg.de>
* c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
2020-11-19 Jakub Jelinek <jakub@redhat.com>
PR c/97860
* c-decl.c (get_parm_array_spec): Bail out of nelts is
error_operand_p.
2020-11-18 Jakub Jelinek <jakub@redhat.com>
* Make-lang.in (c.serial): New goal.
(.PHONY): Add c.serial c.prev.
(cc1$(exeext)): Call LINK_PROGRESS.
2020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
* c-parser.c (c_parser_asm_statement): Parse outputs for asm
goto too.
* c-typeck.c (build_asm_expr): Remove an assert checking output
absence for asm goto.
2020-11-13 Jakub Jelinek <jakub@redhat.com>
* c-typeck.c (c_finish_omp_clauses): Don't clear
OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
PR objc/77404
* c-parser.c (c_parser_objc_class_definition): Pass the
location of the class name to the interface declaration.
2020-11-10 Strager Neds <strager.nds@gmail.com>
* c-decl.c (merge_decls): Use new overload of
set_decl_section_name.
2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
* c-parser.c (c_parser_omp_target_data): Add use of
new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
handled map clause kind.
(c_parser_omp_target_enter_data): Likewise.
(c_parser_omp_target_exit_data): Likewise.
(c_parser_omp_target): Likewise.
* c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
(c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
same struct field access to co-exist on OpenMP construct.
2020-11-07 Martin Uecker <muecker@gwdg.de>
* c-parser.c (c_parser_label): Implement mixing of labels and code.
(c_parser_all_labels): Likewise.
2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
* c-parser.c (c_parser_objc_at_property_declaration):
Improve parsing fidelity. Associate better location info
with @property attributes. Clean up the interface to
objc_add_property_declaration ().
2020-11-06 Nathan Sidwell <nathan@acm.org>
* c-decl.c (diagnose_mismatched_decls): Rename
DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
(warn_if_shadowing, implicitly_declare, names_builtin_p)
(collect_source_refs): Likewise.
* c-typeck.c (inform_declaration, inform_for_arg)
(convert_for_assignment): Likewise.
2020-11-06 Tobias Burnus <tobias@codesourcery.com>
* c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
OpenACC matching.
(c_parser_omp_construct): Update call.
2020-11-04 Jakub Jelinek <jakub@redhat.com>
PR c++/97670
* c-typeck.c (c_finish_omp_clauses): Look through array reductions to
find underlying decl to clear in the aligned_head bitmap.
2020-11-04 Joseph Myers <joseph@codesourcery.com>
* c-decl.c (handle_nodiscard_attribute): New.
(std_attribute_table): Add nodiscard.
* c-parser.c (c_parser_std_attribute): Expect argument to
nodiscard attribute to be a string. Do not special-case ignoring
nodiscard.
* c-typeck.c (maybe_warn_nodiscard): New.
(build_compound_expr, emit_side_effect_warnings): Call
maybe_warn_nodiscard.
(c_process_expr_stmt, c_finish_stmt_expr): Also call
emit_side_effect_warnings if warn_unused_result.
2020-10-29 Asher Gordon <AsDaGo@posteo.net>
* c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
with XDELETE.
(finish_init): Likewise.
(pop_init_level): Likewise.
2020-10-28 Joseph Myers <joseph@codesourcery.com>
* c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
error_at for omitted parameter name.
2020-10-28 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_omp_clause_name): Handle allocate.
(c_parser_omp_clause_allocate): New function.
(c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
(OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
PRAGMA_OMP_CLAUSE_ALLOCATE.
* c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
2020-10-27 Joseph Myers <joseph@codesourcery.com>
* c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
standard attributes.
2020-10-23 Marek Polacek <polacek@redhat.com>
PR c++/91741
* c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
(c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
(c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
* c-tree.h (char_type_p): Declare.
* c-typeck.c (char_type_p): No longer static.
2020-10-23 Martin Sebor <msebor@redhat.com>
PR middle-end/97552
* c-decl.c (get_parm_array_spec): Handle static VLA parameters.
2020-09-19 Martin Sebor <msebor@redhat.com>
PR c/50584
* c-decl.c (lookup_last_decl): Define new function.
(c_decl_attributes): Call it.
(start_decl): Add argument and use it.
(finish_decl): Call build_attr_access_from_parms and decl_attributes.
(get_parm_array_spec): Define new function.
(push_parm_decl): Call get_parm_array_spec.
(start_function): Call warn_parm_array_mismatch. Build attribute
access and add it to current function.
* c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
in forms of array parameters.
* c-tree.h (start_decl): Add argument.
2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
* c-decl.c (c_break_label, c_cont_label): Delete, and replace
with...
(in_statement): New.
(start_function): Adjust for above change.
(c_push_function_context, c_pop_function_context): Likewise.
* c-lang.h (struct language_function): Likewise.
* c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
* c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
New.
(c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
(c_parser_switch_statement): Adjust break/switch context handling
and calls to renamed functions.
(c_parser_while_statement): Adjust break/switch context handling and
build a WHILE_STMT.
(c_parser_do_statement): Ditto, with DO_STMT respectively.
(c_parser_for_statement): Ditto, with FOR_STMT respectively.
(c_parser_omp_for_loop): Adjust break/switch context handling.
* c-tree.h (c_break_label, c_cont_label): Delete.
(IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
(IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
(in_statement, switch_statement_break_seen_p): Declare.
(c_start_case, c_finish_case): Renamed to...
(c_start_switch, c_finish_switch).
(c_finish_bc_stmt): Adjust arguments.
* c-typeck.c (build_function_call_vec): Don't try to print
statements with %qE format.
(struct c_switch): Rename switch_expr field to switch_stmt.
Add break_stmt_seen_p field.
(c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
instead of a SWITCH_EXPR. Update for changes to struct c_switch.
(do_case): Update for changes to struct c_switch.
(c_finish_case): Rename to c_finish_switch. Update for changes to
struct c_switch and change of representation from SWITCH_EXPR to
SWITCH_STMT.
(c_finish_loop): Delete.
(c_finish_bc_stmt): Update to reflect changes to break/continue
state representation. Build a BREAK_STMT or CONTINUE_STMT instead
of a GOTO_EXPR except for objc foreach loops.
2020-09-01 Jakub Jelinek <jakub@redhat.com>
PR c++/96867
* c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
only on PARM_DECLs.
2020-08-28 Martin Sebor <msebor@redhat.com>
PR c/96596
* c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
argument type.
2020-08-27 Martin Liska <mliska@suse.cz>
* gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
growth function to true.
2020-08-25 Tobias Burnus <tobias@codesourcery.com>
PR c/96678
* c-typeck.c (handle_omp_array_sections_1): Talk about
array function parameter in the error message.
2020-08-18 Jakub Jelinek <jakub@redhat.com>
PR c/96571
* c-parser.c (c_parser_generic_selection): Change match_found from bool
to int, holding index of the match. Call mark_exp_read on the selector
expression and on expressions other than the selected one.
2020-08-01 Richard Sandiford <richard.sandiford@arm.com>
PR c/96377
* c-typeck.c (process_init_element): Split test for whether to
recurse into a record, union or array into...
(initialize_elementwise_p): ...this new function. Don't recurse
into a vector type if the initialization value is also a vector.
2020-07-31 Richard Biener <rguenther@suse.de>
PR debug/96383
* c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
Define to c_common_finalize_early_debug.
2020-07-22 Tobias Burnus <tobias@codesourcery.com>
* c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
(c_parser_omp_critical): Permit hint(0) clause without named critical.
(c_parser_omp_construct): Don't assert if error_mark_node is returned.
2020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
PR target/95237
* c-decl.c (finish_decl): Call target hook
lower_local_decl_alignment to lower local decl alignment.
2020-07-09 Julian Brown <julian@codesourcery.com>
Thomas Schwinge <thomas@codesourcery.com>
PR middle-end/95270
* c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
for standalone attach/detach clauses.
2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
* c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
set, warn for conversion between pointers that point to incompatible
scalar storage orders.
2020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
* c-parser.c (c_parser_statement_after_labels): Pass correct
parameters to c_parser_do_statement.
2020-06-16 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_expr_no_commas): Save, clear and restore
c_in_omp_for.
(c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
premature c_fully_fold. Defer explicit c_fully_fold calls to after
c_finish_omp_for.
* c-tree.h (c_in_omp_for): Declare.
* c-typeck.c (c_in_omp_for): Define.
(build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
(digest_init): Likewise.
(build_binary_op): Likewise.
2020-06-16 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
from kind by comma rather than colon.
2020-06-05 Mark Wielaard <mark@klomp.org>
* c-decl.c (implicit_decl_warning): When warned and olddecl is
an undeclared builtin, then add a fixit header hint, if found.
(implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
warning_at about implicit builtin declaration type mismatch.
2020-06-03 Mark Wielaard <mark@klomp.org>
* c-parser.c (struct c_parser): Add seen_string_literal
bitfield.
(c_parser_consume_token): Reset seen_string_literal.
(c_parser_error_richloc): Add name_hint if seen_string_literal
and next token is a CPP_NAME and we have a missing header
suggestion for the name.
(c_parser_string_literal): Set seen_string_literal.
2020-06-03 Mark Wielaard <mark@klomp.org>
* c-parser.c (c_parser_postfix_expression_after_primary): Add
scope with matching_parens after CPP_OPEN_PAREN.
2020-06-03 Tobias Burnus <tobias@codesourcery.com>
* c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
* Make-lang.in: Remove extra slash.
2020-05-19 Martin Liska <mliska@suse.cz>
* c-parser.c: Fix typo.
2020-05-14 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
2020-05-07 Richard Biener <rguenther@suse.de>
PR middle-end/94703
* gimple-parser.c (c_parser_parse_ssa_name): Do not set
DECL_GIMPLE_REG_P.
2020-04-30 Jakub Jelinek <jakub@redhat.com>
PR c/94842
* c-decl.c (set_labels_context_r): In addition to context-less
LABEL_DECLs adjust also LABEL_DECLs with context equal to
parent function if any.
(store_parm_decls): Adjust comment.
2020-04-19 Jakub Jelinek <jakub@redhat.com>
PR objc/94637
* c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
two CPP_COLON tokens.
2020-04-17 Jakub Jelinek <jakub@redhat.com>
PR other/94629
* c-parser.c (c_parser_oacc_routine): Remove redundant assignment
to data.clauses.
2020-04-15 Jakub Jelinek <jakub@redhat.com>
PR c/94593
* c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
requires directive when not at file scope.
2020-04-08 Tobias Burnus <tobias@codesourcery.com>
PR middle-end/94120
* c-decl.c (c_check_in_current_scope): New function.
* c-tree.h (c_check_in_current_scope): Declare it.
* c-parser.c (c_parser_oacc_declare): Add check that variables
are declared in the same scope as the directive. Fix handling
of namespace vars.
2020-04-07 Jakub Jelinek <jakub@redhat.com>
PR c++/94512
* c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
if c_parser_omp_master succeeded.
2020-03-23 Jakub Jelinek <jakub@redhat.com>
PR gcov-profile/94029
PR c/94239
* c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
the function_start_locus location. Don't do that afterwards for the
__GIMPLE body parsing.
2020-03-19 Jakub Jelinek <jakub@redhat.com>
PR gcov-profile/94029
* c-tree.h (finish_function): Add location_t argument defaulted to
input_location.
* c-parser.c (c_parser_compound_statement): Add endlocp argument and
set it to the locus of closing } if non-NULL.
(c_parser_compound_statement_nostart): Return locus of closing }.
(c_parser_parse_rtl_body): Likewise.
(c_parser_declaration_or_fndef): Propagate locus of closing } to
finish_function.
* c-decl.c (finish_function): Add end_loc argument, use it instead of
input_location to set function_end_locus.
2020-03-17 Jakub Jelinek <jakub@redhat.com>
PR c/94172
* c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
(TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
* c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
ENUMERAL_TYPEs.
(finish_incomplete_vars): New function, moved from finish_struct. Use
relayout_decl instead of layout_decl.
(finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
being TYPE_VFIELD. Use finish_incomplete_vars.
(finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
finish_incomplete_vars.
* c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
also on ENUMERAL_TYPEs.
2020-03-16 Jakub Jelinek <jakub@redhat.com>
PR c/94179
* c-fold.c (c_fully_fold_internal): Handle MEM_REF.
2020-03-13 Martin Sebor <msebor@redhat.com>
PR c/94040
* c-decl.c (builtin_structptr_type_count): New constant.
(match_builtin_function_types): Reject decls that are incompatible
in types pointed to by pointers.
(diagnose_mismatched_decls): Adjust comments.
2020-03-05 Joseph Myers <joseph@codesourcery.com>
PR c/93577
* c-typeck.c (pop_init_level): Do not diagnose initializers as
empty when initialized type is error_mark_node.
(set_designator, process_init_element): Ignore initializers for
elements of a variable-size type or of error_mark_node.
2020-03-01 Martin Sebor <msebor@redhat.com>
PR middle-end/93926
* c-decl.c (types_close_enough_to_match): New function.
(match_builtin_function_types):
(diagnose_mismatched_decls): Add missing inform call to a warning.
2020-03-01 Martin Sebor <msebor@redhat.com>
PR c/93812
* c-typeck.c (build_functype_attribute_variant): New function.
(composite_type): Call it.
2020-02-25 Jakub Jelinek <jakub@redhat.com>
PR other/93912
* gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
Rename last argument from probablity to probability.
2020-02-13 Jakub Jelinek <jakub@redhat.com>
PR c/93576
* c-decl.c (grokdeclarator): If this_size_varies, only push size into
*expr if it has side effects.
2020-01-30 Jeff Law <law@redhat.com>
PR c/88660
* c-parser.c (c_parser_switch_statement): Make sure to request
marking the switch expr as used.
2020-01-22 Joseph Myers <joseph@codesourcery.com>
PR c/93348
* c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
argument with integer operands.
2020-01-16 Kerem Kat <keremkat@gmail.com>
PR c/92833
* c-parser.c (c_parser_consume_token): Fix peeked token stack pop
to support 4 available tokens.
2020-01-15 Joseph Myers <joseph@codesourcery.com>
PR c/93072
* c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
determine whether to set DECL_CONTEXT.
2020-01-13 Joseph Myers <joseph@codesourcery.com>
PR c/93241
* c-typeck.c (build_c_cast): Check for expressions with integer
operands that can occur in an unevaluated part of an integer
constant expression and call note_integer_operands as needed.
2019-01-08 Richard Biener <rguenther@suse.de>
PR middle-end/93199
* gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
permanently.
2020-01-01 Jakub Jelinek <jakub@redhat.com>
Update copyright years.
2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
* c-decl.c (collect_source_ref_cb): Delete.
(for_each_global_decl): Rename into...
(collect_source_refs): ...this. Call collect_source_ref directly.
(c_parse_final_cleanups): Always call collect_source_ref on the main
input filename.
2019-12-19 Julian Brown <julian@codesourcery.com>
Cesar Philippidis <cesar@codesourcery.com>
* c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
detach clauses.
(c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
Allow deref (->) in variable lists if true.
(c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
Pass to c_parser_omp_variable_list.
(c_parser_oacc_data_clause): Support attach and detach clauses. Update
call to c_parser_omp_variable_list.
(c_parser_oacc_all_clauses): Support attach and detach clauses.
(OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
(OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
* c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
and detach. Support deref.
(handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
GOMP_MAP_ALWAYS_POINTER for OpenACC.
(c_oacc_check_attachments): New function.
(c_finish_omp_clauses): Check attach/detach arguments for being
pointers using above. Support deref.
2019-12-19 Julian Brown <julian@codesourcery.com>
Maciej W. Rozycki <macro@codesourcery.com>
Tobias Burnus <tobias@codesourcery.com>
Thomas Schwinge <thomas@codesourcery.com>
* c-parser.c (c_parser_omp_clause_name): Support no_create.
(c_parser_oacc_data_clause): Likewise.
(c_parser_oacc_all_clauses): Likewise.
(OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
(OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
PRAGMA_OACC_CLAUSE_NO_CREATE.
* c-typeck.c (handle_omp_array_sections): Support
GOMP_MAP_NO_ALLOC.
2019-12-09 David Malcolm <dmalcolm@redhat.com>
* c-objc-common.c (range_label_for_type_mismatch::get_text):
Replace label_text ctor calls.
2019-12-04 Joseph Myers <joseph@codesourcery.com>
PR c/36941
PR c/88827
* c-typeck.c (convert_lvalue_to_rvalue): Call
require_complete_type for arguments not of void types.
(build_indirect_ref): Do not diagnose dereferencing pointers to
incomplete types.
* c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
2019-12-03 Joseph Myers <joseph@codesourcery.com>
PR c/88704
* c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
old-style parameter definitions.
2019-12-01 Sandra Loosemore <sandra@codesourcery.com>
PR target/92499
* c-decl.c (flexible_array_type_p): Move to common code.
2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
* c-decl.c (start_decl): Allow initialization of variables whose
size is a POLY_INT_CST.
(finish_decl): Use verify_type_context to check whether the target
allows variables with a particular type to have static or thread-local
storage duration. Don't raise a second error if such variables do
not have a constant size.
(grokdeclarator): Use verify_type_context to check whether the
target allows fields or array elements to have a particular type.
* c-typeck.c (pointer_diff): Use verify_type_context to test whether
the target allows pointer difference for the types involved.
(build_unary_op): Likewise for pointer increment and decrement.
2019-11-29 Joseph Myers <joseph@codesourcery.com>
* c-parser.c (struct c_parser): Add members raw_tokens and
raw_tokens_used.
(c_lex_one_token): Add argument raw. Handle lexing raw tokens and
using previously-lexed raw tokens.
(c_parser_peek_nth_token_raw)
(c_parser_check_balanced_raw_token_sequence): New functions.
(c_parser_nth_token_starts_std_attributes): Use
c_parser_check_balanced_raw_token_sequence for Objective-C.
2019-11-25 Joseph Myers <joseph@codesourcery.com>
PR c/91985
* c-decl.c (finish_declspecs): Use int instead of decimal
floating-point types if decimal floating-point not supported.
2019-11-25 Joseph Myers <joseph@codesourcery.com>
* c-tree.h (struct c_declarator): Use a structure for id member.
* c-decl.c (grokdeclarator): Extract attributes from cdk_id
declarators at the start, not when handling individual declarators
later. Use u.id.id instead of u.id.
(grokfield): Use u.id.id instead of u.id.
(build_id_declarator): Set u.id.id and u.id.attrs.
(finish_declspecs): Handle postfix attributes in case of typedef
name or typeof used.
* c-parser.c (c_parser_direct_declarator)
(c_parser_direct_declarator_inner): Place declarator for
attributes inside that for function or array, not outside. Set
u.id.attrs for identifiers.
(c_parser_parameter_declaration): Use u.id.id instead of u.id.
* gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
instead of u.id.
2019-11-22 Jakub Jelinek <jakub@redhat.com>
PR c/90677
* c-decl.c (identifier_global_tag): Define.
2019-11-20 Richard Biener <rguenther@suse.de>
PR c/92088
* c-decl.c (grokdeclarator): Prevent inlining of nested
function with VLA arguments.
2019-11-20 Joseph Myers <joseph@codesourcery.com>
* c-decl.c (c_warn_type_attributes): New function.
(groktypename, grokdeclarator, finish_declspecs): Call
c_warn_type_attributes before applying attributes to types.
* c-tree.h (c_warn_type_attributes): Declare.
2019-11-19 Joseph Myers <joseph@codesourcery.com>
* c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
standard attributes.
* c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
pedwarn for unknown standard attributes and return error_mark_node
for them.
2019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
* c-parser.c (c_parser_parse_rtl_body): Always call
run_rtl_passes, even if startwith pass is not provided.
2019-11-15 Joseph Myers <joseph@codesourcery.com>
* c-parser.c (c_parser_std_attribute_specifier): Diagnose
duplicate standard attributes.
2019-11-15 Joseph Myers <joseph@codesourcery.com>
* c-decl.c (std_attribute_table): Add maybe_unused.
2019-11-15 Joseph Myers <joseph@codesourcery.com>
* c-decl.c (std_attribute_table): Add fallthrough.
* c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
attribute at top level.
2019-11-15 Joseph Myers <joseph@codesourcery.com>
* c-decl.c (std_attribute_table): New.
(c_init_decl_processing): Register attributes from
std_attribute_table.
* c-parser.c (c_parser_attribute_arguments): Add arguments
require_string and allow_empty_args. All callers changed.
(c_parser_std_attribute): Set require_string argument for
"deprecated" attribute.
2019-11-14 Joseph Myers <joseph@codesourcery.com>
* c-parser.c (c_parser_postfix_expression)
(c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
* gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
* c-typeck.c (build_conditional_expr): Use truth_type_for instead
of build_same_sized_truth_vector_type.
(build_vec_cmp): Likewise.
2019-11-14 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_omp_context_selector): Don't require score
argument to fit into shwi, just to be INTEGER_CST. Diagnose
negative score.
* c-parser.c (c_parser_omp_context_selector): Rename
CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
and string literals.
2019-11-14 Joseph Myers <joseph@codesourcery.com>
* c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
ctsk_tagfirstref_attrs.
(struct c_declspecs): Update description of attrs. Add
postfix_attrs and non_std_attrs_seen_p. Increase size of
typespec_kind bit-field.
(c_warn_unused_attributes): New declaration.
(parser_xref_tag): Update prototype.
* c-decl.c (c_warn_unused_attributes): New function.
(shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
ctsk_tagref_attrs. Handle attribute declarations.
(check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
(grokdeclarator): Handle standard attributes.
(parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
attributes to incomplete type reference.
(xref_tag): Update call to parser_xref_tag.
(declspecs_add_addrspace, declspecs_add_type)
(declspecs_add_scspec, declspecs_add_attrs): Set
non_std_attrs_seen_p.
(finish_declspecs): Apply postfix standard attributes to type.
* c-parser.c (c_token_starts_declspecs)
(c_token_starts_declaration, c_parser_next_token_starts_declspecs)
(c_parser_next_tokens_start_declaration): Update comments.
(c_parser_consume_token, c_parser_consume_pragma): Handle moving
parser->tokens[2] to parser->tokens[1].
(c_parser_nth_token_starts_std_attributes)
(c_parser_std_attribute_specifier_sequence): New functions.
(c_parser_declaration_or_fndef): Add arguments have_attrs and
attrs. All callers changed. Handle standard attributes.
(c_parser_parms_declarator, c_parser_parms_list_declarator)
(c_parser_parameter_declaration): Add argument have_gnu_attrs.
All callers changed.
(c_parser_declspecs): Add arguments start_std_attr_ok and
end_std_attr_ok. All callers changed. Handle standard
attributes.
(c_parser_enum_specifier, c_parser_struct_or_union_specifier)
(c_parser_direct_declarator, c_parser_direct_declarator_inner)
(c_parser_compound_statement_nostart, c_parser_all_labels)
(c_parser_label, c_parser_statement, c_parser_for_statement):
Handle standard attributes.
* c-parser.h (c_parser_declspecs): Update prototype.
* gimple-parser.c (c_parser_gimple_declaration): Update call to
c_parser_declspecs.
2019-11-12 Martin Liska <mliska@suse.cz>
* gimple-parser.c: Do not include params.h.
2019-11-12 Martin Liska <mliska@suse.cz>
* gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
macro.
2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
Frederik Harwath <frederik@codesourcery.com>
gcc/c/
* c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
(c_parser_oacc_kernels_parallel): Rename function to...
(c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
(c_parser_omp_construct): Update accordingly.
2019-11-11 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_translation_unit): Diagnose declare target
without corresponding end declare target.
2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
* c-convert.c (convert): Only handle vector conversions if one of
the types satisfies gnu_vector_type_p or if -flax-vector-conversions
allows it.
* c-typeck.c (build_array_ref): Only allow vector indexing if the
vectors satisfy gnu_vector_type_p.
(build_unary_op): Only allow unary operators to be applied to
vectors if they satisfy gnu_vector_type_p.
(digest_init): Only allow by-element initialization of vectors
if they satisfy gnu_vector_type_p.
(really_start_incremental_init): Likewise.
(push_init_level): Likewise.
(pop_init_level): Likewise.
(process_init_element): Likewise.
(build_binary_op): Only allow binary operators to be applied to
vectors if they satisfy gnu_vector_type_p.
2019-11-08 Joseph Myers <joseph@codesourcery.com>
* c-decl.c (grokparms): Convert () in a function definition to
(void) for C2x.
(store_parm_decls_oldstyle): Pedwarn for C2x.
(store_parm_decls): Update comment about () not generating a
prototype.
2019-11-07 Joseph Myers <joseph@codesourcery.com>
* c-parser.c (c_parser_attribute_arguments): New function.
Factored out of c_parser_gnu_attribute.
(c_parser_gnu_attribute): Use c_parser_attribute_arguments.
(c_parser_balanced_token_sequence, c_parser_std_attribute)
(c_parser_std_attribute_specifier): New functions.
(c_parser_transaction_attributes): Use
c_parser_std_attribute_specifier.
2019-11-07 Joseph Myers <joseph@codesourcery.com>
* c-parser.c (c_parser): Remove lex_untranslated_string. Add
lex_joined_string and translate_strings_p.
(c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
c_lex_with_flags.
(c_parser_string_literal): New function.
(c_parser_static_assert_declaration_no_semi): Use
c_parser_string_literal. Do not set lex_untranslated_string.
(c_parser_asm_string_literal): Use c_parser_string_literal.
(c_parser_simple_asm_expr): Do not set lex_untranslated_string.
(c_parser_gnu_attributes): Set and restore translate_strings_p
instead of lex_untranslated_string.
(c_parser_asm_statement): Do not set lex_untranslated_string.
(c_parser_asm_operands): Likewise.
(c_parser_has_attribute_expression): Set and restore
translate_strings_p instead of lex_untranslated_string.
(c_parser_postfix_expression): Use c_parser_string_literal.
(pragma_lex): Likewise.
(c_parser_pragma_pch_preprocess): Set lex_joined_string.
(c_parse_file): Set translate_strings_p.
* gimple-parser.c (c_parser_gimple_postfix_expression)
(c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
* c-parser.c (c_parser_string_literal): Declare function.
2019-11-02 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_finish_omp_declare_variant): Use
omp_get_context_selector instead of c_omp_get_context_selector.
2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
* c-tree.h (c_simulate_enum_decl): Declare.
* c-decl.c (c_simulate_enum_decl): New function.
* c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
* c-tree.h (c_simulate_builtin_function_decl): Declare.
* c-decl.c (c_simulate_builtin_function_decl): New function.
* c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
to the above.
2019-10-28 Martin Sebor <msebor@redhat.com>
PR c/66970
* c-decl.c (names_builtin_p): Define a new function.
2019-10-28 Richard Biener <rguenther@suse.de>
PR c/92249
* gimple-parser.c (c_parser_parse_gimple_body): Make
current_bb the entry block initially to easier recover
from errors.
(c_parser_gimple_compound_statement): Adjust.
2019-10-24 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_finish_omp_declare_variant): Use
omp_context_selector_matches instead of
c_omp_context_selector_matches.
* c-decl.c (c_decl_attributes): Add "omp declare target block"
attribute in between declare target and end declare target
pragmas.
2019-10-15 Joseph Myers <joseph@codesourcery.com>
* c-parser.c (c_parser_attribute_any_word): Rename to
c_parser_gnu_attribute_any_word. All callers changed.
(c_parser_attribute): Rename to c_parser_gnu_attribute. All
callers changed.
(c_parser_attributes): Rename to c_parser_gnu_attributes. All
callers changed.
(c_parser_declaration_or_fndef, c_parser_declspecs)
(c_parser_enum_specifier, c_parser_struct_or_union_specifier)
(c_parser_struct_declaration, c_parser_declarator)
(c_parser_gnu_attribute, c_parser_compound_statement)
(c_parser_label, c_parser_statement, c_parser_objc_method_decl)
(c_parser_transaction_attributes): Add "gnu-" prefix to names of
attribute-related syntax productions.
2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
* c-objc-common.c (useful_aka_type_p): Replace with...
(get_aka_type): ...this new function. Given the original type,
decide which aka type to print (if any). Only look through typedefs
if user_facing_original_type_p.
(print_type): Update accordingly.
2019-10-14 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
into int NESTED, if it is 2, diagnose missing commas in between
clauses.
(c_parser_omp_context_selector): Pass 2 as last argument to
c_parser_omp_all_clauses.
2019-10-12 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_omp_context_selector): Improve error recovery.
For simd properties, put them directly into TREE_VALUE.
(c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
If c_omp_context_selector_matches is 0, don't add attribute, otherwise
add "omp declare variant base" attribute rather than
"omp declare variant".
2019-10-11 Joseph Myers <joseph@codesourcery.com>
* c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
2019-10-10 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
true, terminate processing on closing paren and don't skip to end of
pragma line.
(c_parser_omp_declare_simd): Handle also declare variant.
(omp_construct_selectors, omp_device_selectors,
omp_implementation_selectors, omp_user_selectors): New variables.
(c_parser_omp_context_selector,
c_parser_omp_context_selector_specification,
c_finish_omp_declare_variant): New functions.
(c_finish_omp_declare_simd): Handle both declare simd and
declare variant.
(c_parser_omp_declare): Handle declare variant.
2019-10-02 Joseph Myers <joseph@codesourcery.com>
* c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
CPP_COLON tokens.
2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
* c-objc-common.c (useful_aka_type_p): New function.
(print_type): Use it to decide whether an aka type is worth printing.
2019-09-27 Jakub Jelinek <jakub@redhat.com>
PR c++/88203
* c-parser.c (c_parser_predefined_identifier): New function.
(c_parser_postfix_expression): Use it.
(c_parser_omp_variable_list): Parse predefined identifiers.
* c-typeck.c (c_finish_omp_clauses): Allow predefined variables
in shared and firstprivate clauses, even when they are predetermined
shared.
2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
* c-typeck.c (build_function_call_vec): Take the original function
decl as an optional final parameter. Pass all built-in calls to
check_builtin_function_arguments.
2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
PR c/91815
* c-decl.c (pushdecl): In C detect duplicate declarations across scopes
of identifiers in the external scope only for variables and functions.
2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
PR c/78736
* c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
PR pch/61250
* c-parser.c (c_parse_file): Call c_common_no_more_pch ()
after determining that the first token is not
PRAGMA_GCC_PCH_PREPROCESS.
2019-08-22 Eric Botcazou <ebotcazou@adacore.com>
* c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
FUNCTION_DECL to the right value in the presence of nested declarators.
2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
PR middle-end/91421
* c-decl.c (merge_decls): Use copy_decl_built_in_function.
2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
PR middle-end/91421
* c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
of a built_in_function.
(diagnose_mismatched_decls, implicitly_declare): Update accordingly.
2019-08-10 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_omp_clause_name): Parse device_type.
(c_parser_omp_clause_device_type): New function.
(c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
(OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
(c_parser_omp_declare_target): Handle device_type clauses. Remove
diagnostics for declare target with clauses nested in clause-less
declare target declaration-definition-seq.
* c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
2019-08-09 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (check_no_duplicate_clause): Simplify using
omp_find_clause.
(c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
directive name modifiers.
(c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
PR c/91401
* c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
check_no_duplicate_clause call. Comment it out, instead emit a
warning for duplicate dist_schedule clauses.
2019-08-08 Richard Sandiford <richard.sandiford@arm.com>
* c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
2019-08-08 Jakub Jelinek <jakub@redhat.com>
* c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
instead of generic_head to track duplicates.
2019-08-07 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
(c_parser_omp_clause_use_device_addr): New function.
(c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
(OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
(c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
map or use_device_* clauses.
* c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
in OpenMP, require pointer type rather than pointer or array type.
Handle OMP_CLAUSE_USE_DEVICE_ADDR.
2019-07-31 Jakub Jelinek <jakub@redhat.com>
PR c/91192
* c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
even if finish is UNKNOWN_LOCATION, just use start as finish in that
case.
2019-07-25 Martin Liska <mliska@suse.cz>
Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
PR c++/23383
* c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
2019-07-25 Martin Liska <mliska@suse.cz>
* c-decl.c (merge_decls): Use new macros
(e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
2019-07-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/83518
* gimple-parser.c (c_parser_parse_gimple_body): When we have
a CFG also rebuild cgraph edges.
2019-07-20 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_omp_clause_name): Handle bind clause.
(c_parser_omp_clause_bind): New function.
(c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
(OMP_LOOP_CLAUSE_MASK): Define.
(c_parser_omp_loop): New function.
(c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
loop combined with parallel or teams.
(c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
* c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
2019-07-18 Richard Sandiford <richard.sandiford@arm.com>
PR c/53633
* c-decl.c (finish_function): Check targetm.warn_func_return
before issuing a -Wreturn-type warning.
2019-07-12 Alexandre Oliva <oliva@adacore.com>
* gimple-parser.c (c_parser_gimple_try_stmt): New.
(c_parser_compound_statement): Call it.
2019-07-12 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_omp_clause_name): Handle order clause.
(c_parser_omp_clause_order): New function.
(c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
(OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
PRAGMA_OMP_CLAUSE_ORDER.
* c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
2019-07-10 Richard Biener <rguenther@suse.de>
* gimple-parser.c (c_parser_gimple_postfix_expression): Support
_Literal (int *) &x for address literals.
2019-07-09 Martin Sebor <msebor@redhat.com>
PR c++/61339
* c-decl.c (xref_tag): Change class-key of PODs to struct and others
to class.
(field_decl_cmp): Same.
* c-parser.c (c_parser_struct_or_union_specifier): Same.
* c-tree.h: Same.
* gimple-parser.c (c_parser_gimple_compound_statement): Same.
2019-07-09 Martin Sebor <msebor@redhat.com>
PR c++/61339
* c-decl.c: Change class-key from class to struct and vice versa
to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
* gimple-parser.c: Same.
2019-07-01 Richard Biener <rguenther@suse.de>
* gimple-parser.c (c_parser_gimple_postfix_expression): Handle
_Literal (char *) &"foo" for address literals pointing to
STRING_CSTs.
2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* c-parser.c (c_parse_init): Create keyword for "__intN__" type.
* c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
C incompatibility if alternate "__intN__" form is used.
2019-06-24 Martin Sebor <msebor@redhat.com>
* c-typeck.c (build_binary_op): Hyphenate floating-point.
2019-06-10 Jakub Jelinek <jakub@redhat.com>
* c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
(c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
(c_parser_omp_scan_loop_body): New function.
(c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
inscan reduction clauses.
* c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
non-inscan reductions on the same construct, or inscan reductions with
ordered or schedule clauses, or inscan array reductions.
2019-06-05 Martin Sebor <msebor@redhat.com>
PR c/90737
* c-typeck.c (c_finish_return): Only consider functions returning
pointers as candidates for -Wreturn-local-addr.
2019-06-05 Martin Sebor <msebor@redhat.com>
* c-decl.c (start_decl): Adjust quoting and hyphenation
in diagnostics.
(finish_decl): Same.
(finish_enum): Same.
(start_function): Same.
(declspecs_add_type): Same.
* c-parser.c (warn_for_abs): Same.
* c-typeck.c (build_binary_op): Same.
2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
PR c/89433
* c-parser.c (c_finish_oacc_routine): Rework checking if already
marked with an OpenACC 'routine' directive.
PR c/89433
* c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
(c_finish_oacc_routine): Call oacc_verify_routine_clauses.
PR c/89433
* c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
clauses from "omp declare target" attribute.
2019-05-16 Martin Sebor <msebor@redhat.com>
* c-decl.c (start_decl): Quote keywords, operators, and
types in diagnostics.
(finish_decl): Same.
* c-parser.c (c_parser_asm_statement): Same.
(c_parser_conditional_expression): Same.
(c_parser_transaction_cancel): Same.
* c-typeck.c (c_common_type): Same.
(build_conditional_expr): Same.
(digest_init): Same.
(process_init_element): Same.
(build_binary_op): Same.
2019-05-17 Richard Biener <rguenther@suse.de>
* gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
(c_parser_gimple_unary_expression): Likewise.
(c_parser_gimple_parentized_ternary_expression): New function.
2019-05-16 Richard Biener <rguenther@suse.de>
* gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
(c_parser_gimple_unary_expression): Likewise.
2019-05-15 Richard Biener <rguenther@suse.de>
* gimple-parser.c (c_parser_gimple_postfix_expression): Handle
__BIT_FIELD_REF.
2019-05-14 Richard Biener <rguenther@suse.de>
* gimple-parser.c (c_parser_gimple_statement): Remove
questionable auto-promotion to VIEW_CONVERT_EXPR.
(c_parser_gimple_typespec): Split out from __MEM parsing.
(c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
* tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
as __VIEW_CONVERT with -gimple.
2019-05-09 Martin Liska <mliska@suse.cz>
* gimple-parser.c (c_parser_gimple_statement): Support __MIN and
__MAX.
(c_parser_gimple_unary_expression): Parse also binary expression
__MIN and __MAX.
(c_parser_gimple_parentized_binary_expression): New function.
2019-05-09 Martin Liska <mliska@suse.cz>
* gimple-parser.c (struct gimple_parser): Add probability.
for gimple_parser_edge.
(gimple_parser::push_edge): Add new argument probability.
(c_parser_gimple_parse_bb_spec): Parse also probability
if present.
(c_parser_parse_gimple_body): Set edge probability.
(c_parser_gimple_compound_statement): Consume token
before calling c_parser_gimple_goto_stmt.
Parse BB counts.
(c_parser_gimple_statement): Pass new argument.
(c_parser_gimple_goto_stmt): Likewise.
(c_parser_gimple_if_stmt): Likewise.
(c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
* c-parser.c (c_parser_declaration_or_fndef): Pass
hot_bb_threshold argument.
* c-tree.h (struct c_declspecs): Add hot_bb_threshold
field.
(c_parser_gimple_parse_bb_spec_edge_probability): New.
2019-04-26 Jakub Jelinek <jakub@redhat.com>
PR debug/90197
* c-tree.h (c_finish_loop): Add 2 further location_t arguments.
* c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
(c_parser_do_statement): Likewise.
(c_parser_for_statement): Likewise. Formatting fixes.
* c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
emit DEBUG_BEGIN_STMTs if needed.
2019-04-19 Jakub Jelinek <jakub@redhat.com>
PR c/89888
* c-typeck.c (struct c_switch): Remove outside_range_p member.
(c_start_case): Don't clear it.
(do_case): Adjust c_add_case_label caller.
(c_finish_case): Adjust c_do_switch_warnings caller.
PR c++/90108
* c-decl.c (merge_decls): If remove is main variant and
DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
variant that has newdecl as TYPE_NAME if any.
2019-04-12 Jakub Jelinek <jakub@redhat.com>
PR c/89933
* c-decl.c (merge_decls): When newdecl's type is its main variant,
don't try to remove it from the variant list, but instead assert
it has no variants.
2019-04-01 Richard Biener <rguenther@suse.de>
PR c/71598
* c-tree.h (c_get_alias_set): Declare.
* c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
* c-objc-common.c (c_get_alias_set): Treat enumeral types
as the underlying integer type.
2019-03-19 Martin Sebor <msebor@redhat.com>
PR tree-optimization/89688
* c-decl.c (finish_decl): Call braced_lists_to_string for more
kinds of initializers.
2019-03-19 Jakub Jelinek <jakub@redhat.com>
PR c/89734
* c-decl.c (grokdeclarator): Call c_build_qualified_type on function
return type even if quals_used is 0. Formatting fixes.
2019-03-14 Richard Biener <rguenther@suse.de>
* c-tree.h (enum c_declspec_il): New.
(struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
enum bitfield.
* c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
Pass start pass and declspec_il to c_parser_parse_gimple_body.
(c_parser_declspecs): Adjust.
* gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
and bitmap.h.
(struct gimple_parser): New.
(gimple_parser::push_edge): New method.
(c_parser_gimple_parse_bb_spec): New helper.
(c_parser_parse_gimple_body): Get start pass and IL specification.
Initialize SSA and CFG.
(c_parser_gimple_compound_statement): Handle CFG and SSA build.
Build a gimple_parser parsing state and pass it along.
(c_parser_gimple_statement): Change intermittend __PHI internal
function argument for the edge.
(c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
(c_parser_gimple_goto_stmt): Record edges to build.
(c_parser_gimple_if_stmt): Likewise.
* gimple-parser.h (c_parser_parse_gimple_body): Adjust.
(c_parser_gimple_or_rtl_pass_list): Likewise.
2019-03-11 Martin Liska <mliska@suse.cz>
* c-decl.c (check_for_loop_decls): Wrap an option name
in a string format message and fix GNU coding style.
* c-parser.c (c_parser_declspecs): Likewise.
2019-03-08 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/89550
* c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
returned true.
(c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
or warning returned true.
2019-02-28 Jakub Jelinek <jakub@redhat.com>
PR c/89525
* c-typeck.c (convert_arguments): Call inform_declaration only if
the previous warning_at call returned true.
2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
* c-parser.c (c_parser_oacc_shape_clause): Add loc formal
parameter. Adjust all users.
(c_parser_oacc_simple_clause): Replace parser with loc formal
parameter. Adjust all users.
2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
PR c/87924
* c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
2019-02-15 Jakub Jelinek <jakub@redhat.com>
PR c/89340
* c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
before c_decl_attributes rather than after it.
2019-02-06 Jakub Jelinek <jakub@redhat.com>
PR c/89211
* c-parser.c (c_parser_declaration_or_fndef): Don't update
DECL_ARGUMENTS of d if it has been defined already. Use a single if
instead of 3 nested ifs.
2019-02-06 Joseph Myers <joseph@codesourcery.com>
PR c/88584
* c-decl.c (finish_decl): Do not complete array types for arrays
with external linkage not at file scope.
2019-02-05 Richard Biener <rguenther@suse.de>
PR c/88606
* c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
all type variants when not supported.
2019-01-30 Jakub Jelinek <jakub@redhat.com>
PR c/89061
* c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
* c-decl.c (decl_jump_unsafe): Return false for
C_DECL_COMPOUND_LITERAL_P decls.
(build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
2019-01-29 Jakub Jelinek <jakub@redhat.com>
PR c/89045
* c-decl.c (build_compound_literal): Don't pushdecl if in parameter
scope.
PR c/86125
* c-decl.c (last_fileptr_type): Remove.
(last_structptr_types): New variable.
(match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
{old,new}rettype instead of the types themselves. Assert
last_structptr_types array has the same number of elements
as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
argument oldtype and newtype. Instead of handling
just fileptr_type_node specially, handle all builtin_structptr_types
pointer nodes. Formatting fix.
2019-01-24 Martin Sebor <msebor@redhat.com>
PR c/86125
PR c/88886
PR middle-end/86308
* c-decl.c (match_builtin_function_types): Add arguments.
(diagnose_mismatched_decls): Diagnose mismatched declarations
of built-ins more strictly.
2019-01-24 Jakub Jelinek <jakub@redhat.com>
PR c++/88976
* c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
on #pragma omp cancel with different modifiers.
2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
PR c/51628
PR c/88664
* c-typeck.c (convert_for_assignment): Upate the
warn_for_address_or_pointer_of_packed_member call.
2019-01-16 Tom Honermann <tom@honermann.net>
Jason Merrill <jason@redhat.com>
* c-typeck.c (digest_init): Revised the error message produced for
ill-formed cases of array initialization with a string literal.
(error_init): Make variadic.
2019-01-12 Jakub Jelinek <jakub@redhat.com>
* c-typeck.c (convert_for_assignment): Fix a comment typo.
2019-01-07 Jakub Jelinek <jakub@redhat.com>
PR c/88701
* c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
if current_function_decl is non-NULL.
2019-01-07 Joseph Myers <joseph@codesourcery.com>
PR c/88720
PR c/88726
* c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
whether a function is nested, not DECL_EXTERNAL. Diagnose inline
functions declared but never defined only for external scope, not
for other scopes.
2019-01-07 Jakub Jelinek <jakub@redhat.com>
PR c++/85052
* c-parser.c (c_parser_postfix_expression): Parse
__builtin_convertvector.
2019-01-01 Jakub Jelinek <jakub@redhat.com>
Update copyright years.
2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
PR c/51628
* c-typeck.c (convert_for_assignment): Call
warn_for_address_or_pointer_of_packed_member.
2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
* c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
a more specific error message (instead of just falling through).
2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
* c-parser.c (c_parser_asm_statement): Keep track of the location each
asm qualifier is first seen; use that to give nicer "duplicate asm
qualifier" messages. Delete 'quals" variable, instead pass the
"is_volatile_ flag to build_asm_stmt directly.
* c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
* c-typeck.c (build_asm_stmt): Ditto; adjust.
2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
* c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
"done" boolean variable.
2018-12-19 David Malcolm <dmalcolm@redhat.com>
PR c++/87504
* c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
Move from here to gcc-rich-location.h and gcc-rich-location.c.
(build_binary_op): Use struct op_location_t and
class binary_op_rich_location.
2018-12-11 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/88426
* c-convert.c (convert): Call c_fully_fold before calling
ubsan_instrument_float_cast.
2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
* c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
setting "quals".
2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
* c-parser.c (c_parser_asm_statement): Detect the inline keyword
after asm. Pass a flag for it to build_asm_expr.
* c-tree.h (build_asm_expr): Update declaration.
* c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
set ASM_INLINE_P.
2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
PR inline-asm/55681
* c-parser.c (c_parser_asm_statement): Update grammar. Allow any
combination of volatile and goto, in any order, without repetitions.
2018-12-04 James Norris <jnorris@codesourcery.com>
Cesar Philippidis <cesar@codesourcery.com>
Julian Brown <julian@codesourcery.com>