]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/c-family/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
index 31c817a2fa4a56b76cbe2b3a2444fcf46ea20388..1fade0a09292e7f8bff8f0bc85ea7932fc0f0454 100644 (file)
@@ -1,3 +1,475 @@
+2022-10-12  Lewis Hyatt  <lhyatt@gmail.com>
+
+       PR preprocessor/60014
+       PR preprocessor/60723
+       * c-ppoutput.cc (class token_streamer): Remove member
+       line_marker_emitted to...
+       (token_streamer::stream): ...a local variable here. Set
+       print.prev_was_system_token on all code paths.
+
+2022-10-10  Nathan Sidwell  <nathan@acm.org>
+
+       * c-opts.cc (c_common_post_options): Bump abi to 18.
+
+2022-10-10  Marek Polacek  <polacek@redhat.com>
+
+       PR c++/106937
+       * c-pretty-print.cc (pp_c_specifier_qualifier_list): Print only GNU
+       attributes here.
+       (c_pretty_printer::direct_abstract_declarator): Print the standard [[]]
+       attributes here.
+       (pp_c_attributes): Remove.
+       (pp_c_attributes_display): Print the [[]] form if appropriate.  Use
+       get_attribute_name.  Don't print a trailing space when printing the
+       [[]] form.
+       * c-pretty-print.h (pp_c_attributes): Remove.
+
+2022-10-07  Qing Zhao  <qing.zhao@oracle.com>
+
+       * c-attribs.cc (handle_strict_flex_array_attribute): New function.
+       (c_common_attribute_table): New item for strict_flex_array.
+       * c.opt: (fstrict-flex-arrays): New option.
+       (fstrict-flex-arrays=): New option.
+
+2022-10-07  Martin Liska  <mliska@suse.cz>
+
+       * name-hint.h: Use std::move.
+
+2022-10-07  Jakub Jelinek  <jakub@redhat.com>
+
+       * c-common.cc (attribute_fallthrough_p): Lookup fallthrough attribute
+       only in gnu namespace or as standard attribute, treat fallthrough
+       attributes in other namespaces like any other unknown attribute.
+
+2022-10-06  Joseph Myers  <joseph@codesourcery.com>
+
+       * c-common.cc (c_common_reswords): Mark typeof as D_EXT11.  Add
+       typeof_unqual.
+       * c-common.h (enum rid): Add RID_TYPEOF_UNQUAL.
+       (D_EXT11): New macro.  Values of subsequent macros updated.
+
+2022-10-06  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/106654
+       * c-attribs.cc (handle_assume_attribute): New function.
+       (c_common_attribute_table): Add entry for assume attribute.
+       * c-lex.cc (c_common_has_attribute): Handle
+       __have_cpp_attribute (assume).
+
+2022-10-04  Jakub Jelinek  <jakub@redhat.com>
+
+       * c-omp.cc (c_omp_directives): Uncomment begin declare target
+       entry.
+
+2022-10-03  Patrick Palka  <ppalka@redhat.com>
+
+       * c-common.cc (c_common_reswords): Use RID_IS_SAME instead of
+       RID_IS_SAME_AS.
+
+2022-10-03  Joseph Myers  <joseph@codesourcery.com>
+
+       * c-cppbuiltin.cc (builtin_define_float_constants): Do not
+       special-case __*_EPSILON__ setting for IBM long double for C2x.
+
+2022-09-30  Patrick Palka  <ppalka@redhat.com>
+
+       * c-common.cc (c_common_reswords): Use cp/cp-trait.def to handle
+       C++ traits.
+       * c-common.h (enum rid): Likewise.
+
+2022-09-29  Joseph Myers  <joseph@codesourcery.com>
+
+       * c-lex.cc (c_common_has_attribute): Handle noreturn attribute for
+       C.
+
+2022-09-29  Patrick Palka  <ppalka@redhat.com>
+
+       * c-common.cc (c_common_reswords): Add __remove_cv,
+       __remove_reference and __remove_cvref.
+       * c-common.h (enum rid): Add RID_REMOVE_CV, RID_REMOVE_REFERENCE
+       and RID_REMOVE_CVREF.
+
+2022-09-27  Marek Polacek  <polacek@redhat.com>
+
+       PR c++/101165
+       PR c++/106882
+       * c-cppbuiltin.cc (c_cpp_builtins): Define __cpp_implicit_move.
+
+2022-09-27  Marek Polacek  <polacek@redhat.com>
+
+       * c-format.cc (c_keywords): Drop nothrow.
+
+2022-09-27  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/106651
+       * c-cppbuiltin.cc (c_cpp_builtins): Predefine
+       __cpp_static_call_operator=202207L for C++23.
+
+2022-09-27  Jakub Jelinek  <jakub@redhat.com>
+
+       * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ASSUME,
+       PRAGMA_OMP_ASSUMES and PRAGMA_OMP_BEGIN.  Rename
+       PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
+       * c-pragma.cc (omp_pragmas): Add assumes and begin.
+       For end rename PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
+       (omp_pragmas_simd): Add assume.
+       * c-common.h (c_omp_directives): Declare.
+       * c-omp.cc (omp_directives): Rename to ...
+       (c_omp_directives): ... this.  No longer static.  Uncomment
+       assume, assumes, begin assumes and end assumes entries.
+       In end declare target entry rename PRAGMA_OMP_END_DECLARE_TARGET
+       to PRAGMA_OMP_END.
+       (c_omp_categorize_directive): Adjust for omp_directives to
+       c_omp_directives renaming.
+
+2022-09-27  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/106652
+       PR c++/85518
+       * c-common.cc (c_common_reswords): Change _Float{16,32,64,128} and
+       _Float{32,64,128}x flags from D_CONLY to 0.
+       (shorten_binary_op): Punt if common_type returns error_mark_node.
+       (shorten_compare): Likewise.
+       (c_common_nodes_and_builtins): For C++ record _Float{16,32,64,128}
+       and _Float{32,64,128}x builtin types if available.  For C++
+       clear float128t_type_node.
+       * c-cppbuiltin.cc (c_cpp_builtins): Predefine
+       __STDCPP_FLOAT{16,32,64,128}_T__ for C++23 if supported.
+       * c-lex.cc (interpret_float): For q/Q suffixes prefer
+       float128t_type_node over float128_type_node.  Allow
+       {f,F}{16,32,64,128} suffixes for C++ if supported with pedwarn
+       for C++20 and older.  Allow {f,F}{32,64,128}x suffixes for C++
+       with pedwarn.  Don't call excess_precision_type for C++.
+
+2022-09-26  Marek Polacek  <polacek@redhat.com>
+
+       PR c++/106656
+       * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_char8_t
+       for C++20.
+
+2022-09-23  Marek Polacek  <polacek@redhat.com>
+
+       PR c++/106784
+       * c-common.cc (c_common_reswords): Add __is_convertible and
+       __is_nothrow_convertible.
+       * c-common.h (enum rid): Add RID_IS_CONVERTIBLE and
+       RID_IS_NOTHROW_CONVERTIBLE.
+
+2022-09-22  David Malcolm  <dmalcolm@redhat.com>
+
+       PR c/106830
+       * c-warn.cc (check_for_xor_used_as_pow): Don't try checking
+       values that don't fit in uhwi.
+
+2022-09-15  Richard Biener  <rguenther@suse.de>
+
+       * c-common.h (build_void_list_node): Remove.
+       * c-common.cc (c_common_nodes_and_builtins): Do not initialize
+       void_list_node.
+
+2022-09-09  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
+
+       * c-format.cc (convert_format_name_to_system_name): Fix warning.
+
+2022-09-07  Joseph Myers  <joseph@codesourcery.com>
+
+       * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY
+       for alignas, alignof, bool, false, static_assert, thread_local and
+       true.
+
+2022-09-07  Jakub Jelinek  <jakub@redhat.com>
+
+       * c.opt (Winvalid-utf8): Use ObjC instead of objC.  Remove
+       " in comments" from description.
+       (Wunicode): New option.
+
+2022-09-06  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c/106836
+       * c-omp.cc (c_omp_split_clauses): Handle OMP_CLAUSE_DOACROSS.
+
+2022-09-03  Jakub Jelinek  <jakub@redhat.com>
+
+       * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DOACROSS.
+       * c-omp.cc (c_finish_omp_depobj): Check also for OMP_CLAUSE_DOACROSS
+       clause and diagnose it.  Don't handle OMP_CLAUSE_DEPEND_SOURCE and
+       OMP_CLAUSE_DEPEND_SINK.  Assert kind is not OMP_CLAUSE_DEPEND_INVALID.
+
+2022-09-02  David Malcolm  <dmalcolm@redhat.com>
+
+       PR c/90885
+       * c-common.h (check_for_xor_used_as_pow): New decl.
+       * c-lex.cc (c_lex_with_flags): Add DECIMAL_INT to flags as appropriate.
+       * c-warn.cc (check_for_xor_used_as_pow): New.
+       * c.opt (Wxor-used-as-pow): New.
+
+2022-09-01  Jason Merrill  <jason@redhat.com>
+
+       * c-common.cc (c_common_nodes_and_builtins): Set TREE_STRING_FLAG on
+       char8_t.
+       (braced_list_to_string): Check for char-sized elements.
+
+2022-09-01  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/106655
+       * c.opt (-Winvalid-utf8): New warning.
+       * c-opts.cc (c_common_handle_option) <case OPT_finput_charset_>:
+       Set cpp_opts->cpp_input_charset_explicit.
+       (c_common_post_options): If -finput-charset=UTF-8 is explicit
+       in C++23, enable -Winvalid-utf8 by default and if -pedantic
+       or -pedantic-errors, make it a pedwarn.
+
+2022-08-31  Joseph Myers  <joseph@codesourcery.com>
+
+       * c-attribs.cc (handle_deprecated_attribute): Check and pedwarn
+       for LABEL_DECL.
+       * c-common.cc (c_add_case_label): Add argument ATTRS.  Call
+       decl_attributes.
+       * c-common.h (do_case, c_add_case_label): Update declarations.
+       * c-lex.cc (c_common_has_attribute): For C, produce a result of
+       201910 for fallthrough and 202106 for maybe_unused.
+
+2022-08-26  Marek Polacek  <polacek@redhat.com>
+
+       PR c++/81159
+       * c.opt (Wself-move): New option.
+
+2022-08-26  Jakub Jelinek  <jakub@redhat.com>
+
+       * c-common.cc (check_builtin_function_arguments): Handle
+       BUILT_IN_ISSIGNALING.
+
+2022-08-26  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/106648
+       * c-cppbuiltin.cc (c_cpp_builtins): Predefine
+       __cpp_named_character_escapes to 202207L.
+
+2022-08-25  Marek Polacek  <polacek@redhat.com>
+
+       * c-common.cc (c_common_reswords): Enable nullptr in C2X.
+       (c_common_nodes_and_builtins): Create the built-in node for nullptr.
+       * c-common.h (enum c_tree_index): Add CTI_NULLPTR, CTI_NULLPTR_TYPE.
+       (struct c_common_resword): Resize the disable member.
+       (D_C2X): Add.
+       (nullptr_node): Define.
+       (nullptr_type_node): Define.
+       (NULLPTR_TYPE_P): Define.
+       * c-pretty-print.cc (c_pretty_printer::simple_type_specifier): Handle
+       NULLPTR_TYPE.
+       (c_pretty_printer::direct_abstract_declarator): Likewise.
+       (c_pretty_printer::constant): Likewise.
+
+2022-08-16  Tom Honermann  <tom@honermann.net>
+
+       PR c++/106423
+       * c-opts.cc (c_common_post_options): Disable -Wc++20-compat
+       diagnostics in C++20 and later.
+       * c.opt (Wc++20-compat): Enable hooks for the preprocessor.
+
+2022-08-11  Marek Polacek  <polacek@redhat.com>
+
+       PR middle-end/102633
+       * c-gimplify.cc (c_gimplify_expr) <case DECL_EXPR>: Don't call
+       suppress_warning here.
+
+2022-08-08  Tom Honermann  <tom@honermann.net>
+
+       PR preprocessor/106426
+       * c-opts.cc (c_common_post_options): Assign cpp_opts->unsigned_utf8char
+       subject to -fchar8_t, -fsigned-char, and/or -funsigned-char.
+
+2022-08-08  Tom Honermann  <tom@honermann.net>
+
+       * c-lex.cc (lex_string, lex_charconst): Use char8_t as the type
+       of CPP_UTF8CHAR and CPP_UTF8STRING when char8_t support is
+       enabled.
+       * c-opts.cc (c_common_post_options): Set flag_char8_t if
+       targeting C2x.
+
+2022-07-31  Lewis Hyatt  <lhyatt@gmail.com>
+
+       PR c++/66290
+       * c-common.h: Rename global done_lexing to
+       override_libcpp_locations.
+       * c-common.cc (c_cpp_diagnostic): Likewise.
+       * c-opts.cc (c_common_finish): Set override_libcpp_locations
+       (formerly done_lexing) immediately prior to calling cpp_finish ().
+
+2022-07-27  Lewis Hyatt  <lhyatt@gmail.com>
+
+       * c-ppoutput.cc (token_streamer::stream): Update input_location
+       prior to streaming each token.
+
+2022-07-23  Immad Mir  <mirimmad@outlook.com>
+
+       * c-attribs.cc: (c_common_attribute_table): add three new attributes
+       namely: fd_arg, fd_arg_read and fd_arg_write.
+       (handle_fd_arg_attribute): New.
+
+2022-07-15  Marek Polacek  <polacek@redhat.com>
+
+       PR c++/104477
+       * c-common.cc (c_common_reswords): Add
+       __reference_constructs_from_temporary and
+       __reference_converts_from_temporary.
+       * c-common.h (enum rid): Add RID_REF_CONSTRUCTS_FROM_TEMPORARY and
+       RID_REF_CONVERTS_FROM_TEMPORARY.
+
+2022-07-15  Jonathan Wakely  <jwakely@redhat.com>
+
+       * c-format.cc (class range_label_for_format_type_mismatch):
+       Adjust to new label_text API.
+
+2022-07-11  Lewis Hyatt  <lhyatt@gmail.com>
+
+       PR preprocessor/106252
+       * c-pragma.cc (handle_pragma_diagnostic_impl): Don't look up the
+       option argument prior to verifying the option was found.
+
+2022-07-07  David Malcolm  <dmalcolm@redhat.com>
+
+       * c-format.cc (range_label_for_format_type_mismatch::get_text):
+       Update for removal of label_text::maybe_free in favor of automatic
+       memory management.
+
+2022-07-06  Lewis Hyatt  <lhyatt@gmail.com>
+
+       PR preprocessor/53920
+       PR c++/53431
+       * c-common.cc (c_option_is_from_cpp_diagnostics): New function.
+       * c-common.h (c_option_is_from_cpp_diagnostics): Declare.
+       (c_pp_stream_token): Declare.
+       * c-ppoutput.cc (init_pp_output): Refactor logic about skipping
+       pragmas to...
+       (should_output_pragmas): ...here. New function.
+       (token_streamer::stream): Support handling early pragmas.
+       (do_line_change): Likewise.
+       (c_pp_stream_token): New function.
+       * c-pragma.cc (struct pragma_diagnostic_data): New helper class.
+       (pragma_diagnostic_lex_normal): New function. Moved logic for
+       interpreting GCC diagnostic pragmas here.
+       (pragma_diagnostic_lex_pp): New function for parsing diagnostic pragmas
+       directly from libcpp.
+       (handle_pragma_diagnostic): Refactor into helper function...
+       (handle_pragma_diagnostic_impl): ...here.  New function.
+       (handle_pragma_diagnostic_early): New function.
+       (handle_pragma_diagnostic_early_pp): New function.
+       (struct pragma_ns_name): Renamed to...
+       (struct pragma_pp_data): ...this.  Add new "early_handler" member.
+       (c_register_pragma_1): Support early pragmas in the preprocessor.
+       (c_register_pragma_with_early_handler): New function.
+       (c_register_pragma): Support the new early handlers in struct
+       internal_pragma_handler.
+       (c_register_pragma_with_data): Likewise.
+       (c_register_pragma_with_expansion): Likewise.
+       (c_register_pragma_with_expansion_and_data): Likewise.
+       (c_invoke_early_pragma_handler): New function.
+       (c_pp_invoke_early_pragma_handler): New function.
+       (init_pragma): Add early pragma support for diagnostic pragmas.
+       * c-pragma.h (struct internal_pragma_handler): Add new early handler
+       members.
+       (c_register_pragma_with_early_handler): Declare.
+       (c_invoke_early_pragma_handler): Declare.
+       (c_pp_invoke_early_pragma_handler): Declare.
+
+2022-07-05  Marek Polacek  <polacek@redhat.com>
+
+       PR c++/105626
+       * c-format.cc (check_format_arg): Don't emit -Wformat warnings with
+       u8 strings.
+
+2022-07-01  Marek Polacek  <polacek@redhat.com>
+
+       PR c++/106111
+       * c-common.h (enum rid): Update RID_LAST_CXX20.
+
+2022-06-30  Jonathan Wakely  <jwakely@redhat.com>
+
+       * known-headers.cc (get_stdlib_header_for_name): Add <time.h>
+       names.
+
+2022-06-24  Jason Merrill  <jason@redhat.com>
+
+       PR c++/87729
+       PR c++/20423
+       * c.opt (Woverloaded-virtual): Add levels, include in -Wall.
+
+2022-06-18  Jakub Jelinek  <jakub@redhat.com>
+
+       * c-ubsan.cc (ubsan_instrument_division, ubsan_instrument_shift):
+       Use flag_sanitize_trap & SANITIZE_??? instead of
+       flag_sanitize_undefined_trap_on_error.  If 2 sanitizers are involved
+       and flag_sanitize_trap differs for them, emit __builtin_trap only
+       for the comparison where trap is requested.
+       (ubsan_instrument_vla, ubsan_instrument_return): Use
+       lag_sanitize_trap & SANITIZE_??? instead of
+       flag_sanitize_undefined_trap_on_error.
+
+2022-06-13  Jason Merrill  <jason@redhat.com>
+
+       * c-ubsan.cc (ubsan_instrument_return): Use BUILTINS_LOCATION.
+
+2022-05-27  Marek Polacek  <polacek@redhat.com>
+
+       PR c/90658
+       * c-attribs.cc (get_priority): Check FUNCTION_DECL.
+
+2022-05-27  Jakub Jelinek  <jakub@redhat.com>
+
+       * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ENTER.
+
+2022-05-20  David Malcolm  <dmalcolm@redhat.com>
+
+       * c-format.cc: Replace uses of "FINAL" and "OVERRIDE" with "final"
+       and "override".
+       * c-pretty-print.h: Likewise.
+
+2022-05-18  Marek Polacek  <polacek@redhat.com>
+
+       PR c/105131
+       * c.opt (Wenum-int-mismatch): New.
+
+2022-05-18  Marek Polacek  <polacek@redhat.com>
+
+       PR c++/105497
+       * c-warn.cc (c_do_switch_warnings): Don't warn about unhandled
+       enumerator when it was marked with attribute unused.
+
+2022-05-18  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * c-ada-spec.cc (dump_ada_node) <COMPLEX_TYPE>: Deal with usual
+       floating-point complex types.
+       <POINTER_TYPE>: Do not use limited_with clause if the designated
+       type is a scalar type.
+
+2022-05-17  Jakub Jelinek  <jakub@redhat.com>
+
+       * c-omp.cc (c_finish_omp_depobj): Handle
+       OMP_CLAUSE_DEPEND_INOUTSET.
+
+2022-05-16  Jason Merrill  <jason@redhat.com>
+
+       PR c/105492
+       * c-attribs.cc (handle_mode_attribute): Don't fix broken typedefs
+       here.
+
+2022-05-16  Martin Liska  <mliska@suse.cz>
+
+       * c-common.cc (ARRAY_SIZE): Use ARRAY_SIZE.
+       (c_common_nodes_and_builtins): Likewise.
+       * c-format.cc (check_tokens): Likewise.
+       (check_plain): Likewise.
+       * c-pragma.cc (c_pp_lookup_pragma): Likewise.
+       (init_pragma): Likewise.
+       * known-headers.cc (get_string_macro_hint): Likewise.
+       (get_stdlib_header_for_name): Likewise.
+       * c-attribs.cc: Likewise.
+
+2022-05-13  Richard Biener  <rguenther@suse.de>
+
+       * c-omp.cc: Remove gimple-fold.h include.
+
 2022-05-12  Jakub Jelinek  <jakub@redhat.com>
 
        * c-common.h (enum rid): Add RID_OMP_ALL_MEMORY.