]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/c/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / c / ChangeLog
index f911a55977bd0ebd37514d052c20b5627a0e67bf..f6175775c20d517888531442ad3eb2c89816ca11 100644 (file)
@@ -1,3 +1,277 @@
+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