summaryrefslogtreecommitdiff
path: root/contrib
AgeCommit message (Collapse)Author
2025-11-22changelog: Add algol68 as a bugzilla componentHEADtrunkmasterAndrew Pinski
Adds algol68 as a bugzilla component for commits. Pushed as obvious. contrib/ChangeLog: * gcc-changelog/git_commit.py: Add algol68. Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
2025-11-17Daily bump.GCC Administrator
2025-11-16Remove /usr/ccs references on SolarisRainer Orth
/usr/ccs/bin has been replaced by a symlink to /usr/bin since at least Solaris 11.3, so there's no reason to use that path any longer. This patch removes all references to it. Tested on i386-pc-solaris2.11. 2025-11-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> * configure.ac (md_exec_prefix): Don't set on Solaris. * configure: Regenerate. contrib: * make_sunver.pl ($elfdump): Remove ccs from path. gcc: * config/sol2.h (MD_EXEC_PREFIX): Remove. libstdc++-v3: * scripts/extract_symvers.pl: Remove ccs from elfdump path.
2025-11-14Daily bump.GCC Administrator
2025-11-13contrib/check-params-in-docs.py: Compensate for r16-5132Filip Kastl
r16-5132-g6786a073fcead3 added mention of the '=' variant of the '--param' command line option to gcc/doc/invoke.texi. This confused contrib/check-params-in-docs.py. Fix that. Commiting as obvious. contrib/ChangeLog: * check-params-in-docs.py: Start parsing from @itemx --param=@var{name}=@var{value} instead of @item --param @var{name}=@var{value}. Signed-off-by: Filip Kastl <fkastl@suse.cz>
2025-11-13Daily bump.GCC Administrator
2025-11-12Add stdarch to the list of ignored prefixesOwen Avery
Since libgrust/rustc-lib/stdarch is a library copied from rustc, we should include the directory in ignored_prefixes. contrib/ChangeLog: * gcc-changelog/git_commit.py (ignored_prefixes): Add 'libgrust/rustc-lib/stdarch/'. Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
2025-11-12Daily bump.GCC Administrator
2025-11-11diagnostics: add experimental SARIF JSON-RPC notifications for IDEs [PR115970]David Malcolm
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3358r0.html#msvc describes a feature of Visual Studio 2022 version 17.8. which can send its diagnostics in SARIF form to a pipe when setting the environment variable SARIF_OUTPUT_PIPE: https://learn.microsoft.com/en-us/cpp/build/reference/sarif-output?view=msvc-170#retrieving-sarif-through-a-pipe The precise mechanism above involves Windows-specific details (windows pipes and HANDLEs). The following patch implements an analogous feature for GCC, using Unix domain sockets rather than the Windows-specific details. With this patch, GCC's cc1, cc1plus, etc will check if EXPERIMENTAL_SARIF_SOCKET is set in the environment, and if so, will attempt to connect to that socket. It will send a JSON-RPC notification to the socket for every diagnostic emitted. Like the MSVC feature, the diagnostics are sent one-at-a-time as SARIF "result" objects, rather than sending a full SARIF "log" object. The patch includes a python test script which runs a server. Tested by running the script in one terminal: $ ../../src/contrib/sarif-listener.py listening on socket: /tmp/tmpjgts0u0i/socket and then invoking a build in another terminal with the envvar set to the pertinent socket: $ EXPERIMENTAL_SARIF_SOCKET=/tmp/tmpjgts0u0i/socket \ make check-gcc RUNTESTFLAGS="analyzer.exp=*" and watching as all the diagnostics generated during the build get sent to the listener. The idea is that an IDE ought to be able to create a socket and set the environment variable when invoking a build, and then listen for all the diagnostics, without needing to manually set build flags to inject SARIF output. This feature is experimental and subject to change or removal without notice; I'm adding it to make it easier for IDE developers to try it out and give feedback. contrib/ChangeLog: PR diagnostics/115970 * sarif-listener.py: New file. gcc/ChangeLog: PR diagnostics/115970 * diagnostics/sarif-sink.cc: Include <sys/un.h> and <sys/socket.h>. (sarif_builder::end_group): Update comment. (sarif_sink::on_end_group): Drop "final". (class sarif_socket_sink): New subclass. (maybe_open_sarif_sink_for_socket): New function. * diagnostics/sarif-sink.h: (maybe_open_sarif_sink_for_socket): New decl. * doc/invoke.texi (EXPERIMENTAL_SARIF_SOCKET): Document new environment variable. * toplev.cc: Define INCLUDE_VECTOR. Add include of "diagnostics/sarif-sink.h". (toplev::main): Call diagnostics::maybe_open_sarif_sink_for_socket. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
2025-10-31Daily bump.GCC Administrator
2025-10-30gccrs: Add libcore to the list of ignored prefixesOwen Avery
contrib/ChangeLog: * gcc-changelog/git_commit.py (ignored_prefixes): Add 'libgrust/rustc-lib/core/'. Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
2025-10-17Daily bump.GCC Administrator
2025-10-16diagnostics: generalize state graph code to use json::property instances (v2)David Malcolm
In r16-1631-g2334d30cd8feac I added support for capturing state information from -fanalyzer in the form of embedded XML strings in SARIF output. In r16-2211-ga5d9debedd2f46 I rewrote this so the state was captured in the form of a SARIF directed graph, using various custom types. I want to add the ability to capture other kinds of graph in our SARIF output (e.g. inheritance hierarchies, CFGs, etc), so the following patch reworks the state graph handling code to minimize the use of custom types. Instead, the patch introduces various json::property types, and describes the state graph serialization in terms of instances of these properties, rather than hardcoding string attribute names in readers and writers. The custom SARIF properties live in a new "gcc/custom-sarif-properties/" directory. The "experimental-html" scheme keys "show-state-diagrams-dot-src" and "show-state-diagrams-sarif" become "show-graph-dot-src" and "show-graph-dot-src" in preparation for new kinds of graph in the output. This is an updated version of the patch, tested to build with GCC 5 (which the previous version didn't leading to PR bootstrap/122151) contrib/ChangeLog: * gcc.doxy (INPUT): Add gcc/custom-sarif-properties gcc/ChangeLog: * Makefile.in (OBJS-libcommon): Add custom-sarif-properties/digraphs.o and custom-sarif-properties/state-graphs.o. Remove diagnostics/state-graphs.o. * configure: Regenerate. * configure.ac: Add custom-sarif-properties to subdir iteration. * custom-sarif-properties/digraphs.cc: New file. * custom-sarif-properties/digraphs.h: New file. * custom-sarif-properties/state-graphs.cc: New file. * custom-sarif-properties/state-graphs.h: New file. * diagnostics/diagnostics-selftests.cc (run_diagnostics_selftests): Drop call of state_graphs_cc_tests. * diagnostics/diagnostics-selftests.h (state_graphs_cc_tests): Delete decl. * diagnostics/digraphs.cc: Include "custom-sarif-properties/digraphs.h". Move include of "selftest.h" to within CHECKING_P section. (using digraph_object): New. (namespace properties): New. (diagnostics::digraphs::object::get_attr): Delete. (diagnostics::digraphs::object::set_attr): Delete. (diagnostics::digraphs::object::set_json_attr): Delete. (digraph_object::get_property): New definitions, for various property types. (digraph_object::set_property): Likewise. (digraph_object::maybe_get_property): New. (digraph_object::get_property_as_tristate): New. (digraph_object::ensure_property_bag): New. (digraph::get_graph_kind): New. (digraph::set_graph_kind): New. Add include of "custom-sarif-properties/state-graphs.h". (selftest::test_simple_graph): Rewrite to use json::property instances rather than string attribute names. (selftest::test_property_objects): New test. (selftest::digraphs_cc_tests): Call it. * diagnostics/digraphs.h: Include "tristate.h". (object::get_attr): Delete. (object::set_attr): Delete. (object::get_property): New decls. (object::set_property): New decls. (object::maybe_get_property): New. (object::get_property_as_tristate): New. (object::set_json_attr): Delete. (object::ensure_property_bag): New. (graph::get_graph_kind): New. (graph::set_graph_kind): New. * diagnostics/html-sink.cc (html_generation_options::html_generation_options): Update for field renamings. (html_generation_options::dump): Likewise. (html_builder::maybe_make_state_diagram): Likewise. (html_builder::add_graph): Show SARIF and .dot src inline, if requested. * diagnostics/html-sink.h (html_generation_options::m_show_state_diagrams_sarif): Rename to... (html_generation_options::m_show_graph_sarif): ...this. (html_generation_options::m_show_state_diagrams_dot_src): Rename to... (html_generation_options::m_show_graph_dot_src0): ...this. * diagnostics/output-spec.cc (html_scheme_handler::maybe_handle_kv): Rename keys. (html_scheme_handler::get_keys): Likewise. * diagnostics/state-graphs-to-dot.cc: : Reimplement throughout to use json::property instances found within custom_sarif_properties throughout, rather than types in diagnostics::state_graphs. * diagnostics/state-graphs.cc: Deleted file. * diagnostics/state-graphs.h: Delete almost all, except decl of diagnostics::state_graphs::make_dot_graph. * doc/invoke.texi: Update for changes to "experimental-html" sink keys. * json.cc (json::object::set_string): New. (json::object::set_integer): New. (json::object::set_bool): New. (json::object::set_array_of_string): New. * json.h: Include "label-text.h". (struct json::property): New template. (json::string_property): New. (json::integer_property): New. (json::bool_property): New. (json::json_property): New. (using json::array_of_string_property): New. (struct json::enum_traits): New. (enum_json::property): New. (json::value::dyn_cast_array): New vfunc. (json::value::dyn_cast_integer_number): New vfunc. (json::value::set_string): New. (json::value::set_integer): New. (json::value::set_bool): New. (json::value::set_array_of_string): New. (json::value::maybe_get_enum): New. (json::value::set_enum): New. (json::array::dyn_cast_array): New. (json::integer_number::dyn_cast_integer_number): New. (object::maybe_get_enum): New. (object::set_enum): New. gcc/analyzer/ChangeLog: * ana-state-to-diagnostic-state.cc: Reimplement throughout to use json::property instances found within custom_sarif_properties throughout, rather than types in diagnostics::state_graphs. * ana-state-to-diagnostic-state.h: Likewise. * checker-event.cc: Likewise. * sm-malloc.cc: Likewise. gcc/testsuite/ChangeLog: * gcc.dg/plugin/diagnostic_plugin_test_graphs.cc (report_diag_with_graphs): Port from set_attr to set_property. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
2025-10-09Daily bump.GCC Administrator
2025-10-08Update to Unicode 17.0.0Jakub Jelinek
The following patch updates GCC from Unicode 16.0.0 to 17.0.0. I've followed what the README says and updated also one script from glibc, but that needed another Unicode file - HangulSyllableType.txt - around as well, so I'm adding it. I've added one new test to named-universal-char-escape-1.c for randomly chosen character from new CJK block. Note, Unicode 17.0.0 authors forgot to adjust the 4-8 table, I've filed bugreports about that but the UnicodeData.txt changes for the range ends and the new range seems to match e.g. what is in the glyph tables, so the patch follows UnicodeData.txt and not 4-8 table here. Another thing was that makeuname2c.cc didn't handle correctly when the size of the generated string table modulo 77 was 76 or 77, in which case it forgot to emit a semicolon after the string literal and so failed to compile. And as can be seen in the emoji-data.txt diff, some properties like Extended_Pictographic have been removed from certain characters, e.g. from the Mahjong cards characters except U+1F004, and one libstdc++ test was testing that property exactly on U+1F000. Dunno why that was changed, but U+1F004 is the only colored one among tons of black and white ones. 2025-10-08 Jakub Jelinek <jakub@redhat.com> contrib/ * unicode/README: Add HangulSyllableType.txt file to the list as newest utf8_gen.py from glibc now needs it. Adjust git commit hash and change unicode 16 version to 17. * unicode/from_glibc/utf8_gen.py: Updated from glibc. * unicode/DerivedCoreProperties.txt: Updated from Unicode 17.0.0. * unicode/emoji-data.txt: Likewise. * unicode/PropList.txt: Likewise. * unicode/GraphemeBreakProperty.txt: Likewise. * unicode/DerivedNormalizationProps.txt: Likewise. * unicode/NameAliases.txt: Likewise. * unicode/UnicodeData.txt: Likewise. * unicode/EastAsianWidth.txt: Likewise. * unicode/DerivedGeneralCategory.txt: Likewise. * unicode/HangulSyllableType.txt: New file. gcc/testsuite/ * c-c++-common/cpp/named-universal-char-escape-1.c: Add test for \N{CJK UNIFIED IDEOGRAPH-3340E}. libcpp/ * makeucnid.cc (write_copyright): Adjust copyright year. * makeuname2c.cc (generated_ranges): Adjust end points for a couple of ranges based on UnicodeData.txt Last changes and add a whole new CJK UNIFIED IDEOGRAPH- entry. None of these changes are in the 4-8 table, but clearly it has just been forgotten. (write_copyright): Adjust copyright year. (write_dict): Fix up condition when to print semicolon. * generated_cpp_wcwidth.h: Regenerate. * ucnid.h: Regenerate. * uname2c.h: Regenerate. libstdc++-v3/ * include/bits/unicode-data.h: Regenerate. * testsuite/ext/unicode/properties.cc: Test __is_extended_pictographic on U+1F004 rather than U+1F000.
2025-10-05Daily bump.GCC Administrator
2025-10-05contrib: Ignore commit b40ef6e9dc09 Sync toplevel files from binutils-gdbMark Wielaard
contrib/ChangeLog: * gcc-changelog/git_update_version.py (ignored_commits): Add commit b40ef6e9dc096c8c19399e94947a1965258a6942.
2025-10-03Revert: r16-4193 ("diagnostics: generalize state graph code to use ↵David Malcolm
json::property instances") This reverts commit e4ab1f87805a6555bc327538d67067f3a690eddc. Patch r16-4193-ge4ab1f87805a65 seems to have broken the build with GCC 5.5 (PR bootstrap/122151). Sorry about this. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
2025-10-02diagnostics: generalize state graph code to use json::property instancesDavid Malcolm
In r16-1631-g2334d30cd8feac I added support for capturing state information from -fanalyzer in the form of embedded XML strings in SARIF output. In r16-2211-ga5d9debedd2f46 I rewrote this so the state was captured in the form of a SARIF directed graph, using various custom types. I want to add the ability to capture other kinds of graph in our SARIF output (e.g. inheritance hierarchies, CFGs, etc), so the following patch reworks the state graph handling code to minimize the use of custom types. Instead, the patch introduces various json::property types, and describes the state graph serialization in terms of instances of these properties, rather than hardcoding string attribute names in readers and writers. The custom SARIF properties live in a new "gcc/custom-sarif-properties/" directory. The "experimental-html" scheme keys "show-state-diagrams-dot-src" and "show-state-diagrams-sarif" become "show-graph-dot-src" and "show-graph-dot-src" in preparation for new kinds of graph in the output. contrib/ChangeLog: * gcc.doxy (INPUT): Add gcc/custom-sarif-properties gcc/ChangeLog: * Makefile.in (OBJS-libcommon): Add custom-sarif-properties/digraphs.o and custom-sarif-properties/state-graphs.o. Remove diagnostics/state-graphs.o. * configure: Regenerate. * configure.ac: Add custom-sarif-properties to subdir iteration. * custom-sarif-properties/digraphs.cc: New file. * custom-sarif-properties/digraphs.h: New file. * custom-sarif-properties/state-graphs.cc: New file. * custom-sarif-properties/state-graphs.h: New file. * diagnostics/diagnostics-selftests.cc (run_diagnostics_selftests): Drop call of state_graphs_cc_tests. * diagnostics/diagnostics-selftests.h (state_graphs_cc_tests): Delete decl. * diagnostics/digraphs.cc: Include "custom-sarif-properties/digraphs.h". Move include of "selftest.h" to within CHECKING_P section. (using digraph_object): New. (namespace properties): New. (diagnostics::digraphs::object::get_attr): Delete. (diagnostics::digraphs::object::set_attr): Delete. (diagnostics::digraphs::object::set_json_attr): Delete. (digraph_object::get_property): New definitions, for various property types. (digraph_object::set_property): Likewise. (digraph_object::maybe_get_property): New. (digraph_object::get_property_as_tristate): New. (digraph_object::ensure_property_bag): New. (digraph::get_graph_kind): New. (digraph::set_graph_kind): New. Add include of "custom-sarif-properties/state-graphs.h". (selftest::test_simple_graph): Rewrite to use json::property instances rather than string attribute names. (selftest::test_property_objects): New test. (selftest::digraphs_cc_tests): Call it. * diagnostics/digraphs.h: Include "tristate.h". (object::get_attr): Delete. (object::set_attr): Delete. (object::get_property): New decls. (object::set_property): New decls. (object::maybe_get_property): New. (object::get_property_as_tristate): New. (object::set_json_attr): Delete. (object::ensure_property_bag): New. (graph::get_graph_kind): New. (graph::set_graph_kind): New. * diagnostics/html-sink.cc (html_generation_options::html_generation_options): Update for field renamings. (html_generation_options::dump): Likewise. (html_builder::maybe_make_state_diagram): Likewise. (html_builder::add_graph): Show SARIF and .dot src inline, if requested. * diagnostics/html-sink.h (html_generation_options::m_show_state_diagrams_sarif): Rename to... (html_generation_options::m_show_graph_sarif): ...this. (html_generation_options::m_show_state_diagrams_dot_src): Rename to... (html_generation_options::m_show_graph_dot_src0): ...this. * diagnostics/output-spec.cc (html_scheme_handler::maybe_handle_kv): Rename keys. (html_scheme_handler::get_keys): Likewise. * diagnostics/state-graphs-to-dot.cc: : Reimplement throughout to use json::property instances found within custom_sarif_properties throughout, rather than types in diagnostics::state_graphs. * diagnostics/state-graphs.cc: Deleted file. * diagnostics/state-graphs.h: Delete almost all, except decl of diagnostics::state_graphs::make_dot_graph. * doc/invoke.texi: Update for changes to "experimental-html" sink keys. * json.cc (json::object::set_string): New. (json::object::set_integer): New. (json::object::set_bool): New. (json::object::set_array_of_string): New. * json.h: Include "label-text.h". (struct json::property): New template. (json::string_property): New. (json::integer_property): New. (json::bool_property): New. (json::json_property): New. (using json::array_of_string_property): New. (struct json::enum_traits): New. (enum_json::property): New. (json::value::dyn_cast_array): New vfunc. (json::value::dyn_cast_integer_number): New vfunc. (json::value::set_string): New. (json::value::set_integer): New. (json::value::set_bool): New. (json::value::set_array_of_string): New. (json::value::maybe_get_enum): New. (json::value::set_enum): New. (json::array::dyn_cast_array): New. (json::integer_number::dyn_cast_integer_number): New. (object::maybe_get_enum): New. (object::set_enum): New. gcc/analyzer/ChangeLog: * ana-state-to-diagnostic-state.cc: Reimplement throughout to use json::property instances found within custom_sarif_properties throughout, rather than types in diagnostics::state_graphs. * ana-state-to-diagnostic-state.h: Likewise. * checker-event.cc: Likewise. * sm-malloc.cc: Likewise. gcc/testsuite/ChangeLog: * gcc.dg/plugin/diagnostic_plugin_test_graphs.cc (report_diag_with_graphs): Port from set_attr to set_property. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
2025-09-24Daily bump.GCC Administrator
2025-09-23contrib: Fix typo in comment in libstdc++ scriptJonathan Wakely
contrib/ChangeLog: * unicode/gen_libstdcxx_unicode_data.py: Fix comment type.
2025-09-23Daily bump.GCC Administrator
2025-09-22contrib: Add DerivedGeneralCategory.txt to comment in libstdc++ scriptJonathan Wakely
contrib/ChangeLog: * unicode/gen_libstdcxx_unicode_data.py: Update comment at the top of the file to mention DerivedGeneralCategory.txt prerequisite.
2025-09-18Daily bump.GCC Administrator
2025-09-17uninclude: Add lib/gcc/<anything>/include as an possible include dirAndrew Pinski
While running uninclude on PR99912's preprocessed source uninclude didn't uninclude some of the x86_64 target headers. This was because `lib/gcc/<anything>/include` was not noticed as an possible system include dir. It supported `gcc-lib/<anything>/include` though. contrib/ChangeLog: * uninclude: Add `lib/gcc/<anything>/include`.
2025-09-11Daily bump.GCC Administrator
2025-09-10compare_tests: Improve non-unique tests reportChristophe Lyon
If the results include several configurations (schedule of variations), do not report summary lines as duplicates. Indeed with several configurations, it's likely that the results contain the same # of expected passes XXXXX The patch just keeps lines starting with test state prefix to avoid this problem. contrib/ChangeLog: * compare_tests: Improve non-unique tests report when testing several configurations.
2025-09-09Daily bump.GCC Administrator
2025-09-08compare_tests: Report non-unique test namesChristophe Lyon
Test "names" (the string after 'PASS:' or 'FAIL:' etc... is expected to be unique, otherwise this will confuse comparison scripts. This patch displays the lists of non-unique test names in the 'before' and in the 'now' results. contrib/ChangeLog: * compare_tests: Report non-unique test names.
2025-08-18Daily bump.GCC Administrator
2025-08-17MAINTAINERS, contrib: Appease check-MAINTAINERS.py (email order)Filip Kastl
The contrib/check-MAINTAINERS.py script sorts by surname, name, bugzilla handle and email (in this order). Document this. Switch around Andrew Pinski's entries in Contributing under DCO. Pushing as obvious. ChangeLog: * MAINTAINERS: Switch around Andrew Pinski's entries in Contributing under DCO. contrib/ChangeLog: * check-MAINTAINERS.py: Document the way the script sorts entries. Signed-off-by: Filip Kastl <fkastl@suse.cz>
2025-08-08Daily bump.GCC Administrator
2025-08-07contrib/download_prerequisites: Update GMP, MPFR, MPC [PR120237]Tobias Burnus
Download newer versions of GMP, MPFR and MPC (the latest); besides the usual bug fixes and smaller features, MPFR adds new functions for C23, some of which are already used in GCC in the middle (fold-const-call.cc) and in Fortran 2023 for the 'pi' trignonometric functions, if MPFR is new enough. contrib/ChangeLog: PR other/120237 * download_prerequisites: Update to download GMP 6.3.0 (before 6.2.1), MPFR 4.2.2 (before 4.1.0), and MPC 1.3.1 (before 1.2.1). * prerequisites.md5: Update hash. * prerequisites.sha512: Likewise.
2025-07-29Daily bump.GCC Administrator
2025-07-28git_commit.py: add "diagnostics" to bug componentsDavid Malcolm
contrib/ChangeLog * gcc-changelog/git_commit.py: Add "diagnostics" to bug components.
2025-07-26Daily bump.GCC Administrator
2025-07-25diagnostics: introduce namespace diagnostics::pathsDavid Malcolm
Move more diagnostic-specific code from gcc/ to gcc/diagnostics/ No functional change intended. contrib/ChangeLog: * filter-clang-warnings.py: Update for move of diagnostic-path-output.cc to diagnostics/paths-output.cc. gcc/ChangeLog: * Makefile.in (OBJS): Replace lazy-diagnostic-path.o with diagnostics/lazy-paths.o. (OBJS-libcommon): Replace diagnostic-path.o with diagnostics/paths.o, diagnostic-path-output.o with diagnostics/paths-output.o, and selftest-diagnostic-path.o with diagnostics/selftest-paths.o. (EXTRA_BACKEND_OBJS): Replace lazy-diagnostic-path.o with diagnostics/lazy-paths.o. * diagnostic-format-html.cc: Update #include for "diagnostic-path.h" moving to "diagnostics/paths.h", diagnostic_thread_id_t to diagnostics::paths::thread_id_t, diagnostic_event_id_t to diagnostics::paths::event_id_t, diagnostic_path to diagnostics::paths::path, and diagnostic_thread to diagnostics::paths::thread, and diagnostic_event to diagnostics::paths::event. * diagnostic-format-html.h: Likewise. * diagnostic-format-sarif.cc: Likewise. Update PROPERTY_PREFIX for threadFlowLocations from "gcc/diagnostic_event/" to "gcc/diagnostics/paths/event/". * diagnostic-format-text.cc: Likewise. * diagnostic-format-text.h: Likewise. * diagnostic.cc: Likewise. * diagnostic.h: Likewise. * diagnostic-event-id.h: Move to... * diagnostics/event-id.h: ...here, updating header guard. (diagnostics:paths:event_id_t): New typedef. (diagnostic_thread_id_t): Replace with... (diagnostics:paths:thread_id_t): New typedef. * lazy-diagnostic-path.cc: Move to... * diagnostics/lazy-paths.cc: ...here. Update for above changes, lazy_diagnostic_path becomes diagnostics::paths::lazy_path. (lazy_diagnostic_path_cc_tests): Rename to... (diagnostics_lazy_paths_cc_tests): ...this. * lazy-diagnostic-path.h: Move to... * diagnostics/lazy-paths.h: ...here, updating header guard. Update for above changes. * diagnostic-path-output.cc: Move to... * diagnostics/paths-output.cc: ...here. Update for above changes. (diagnostic_path_output_cc_tests): Rename to... (diagnostics_paths_output_cc_tests): ...this. * diagnostic-path.cc: Move to... * diagnostics/paths.cc: ...here. Update for above changes. * diagnostic-path.h: Move to... * diagnostics/paths.h: ...here, updating header guard. Update #include for moving "diagnostic-event-id.h" to "diagnostics/event-id.h". (class diagnostic_event): Convert to... (class diagnostics::paths::event): ...this. (class diagnostic_thread): Convert to... (class diagnostics::paths::thread): ...this. (class diagnostic_path): Convert to... (class diagnostics::paths::path): ...this. * diagnostic-show-locus.cc: Update for above changes. * doc/analyzer.texi: Likewise. * selftest-diagnostic-path.cc: Move to... * diagnostics/selftest-paths.cc: ...here. Update for above changes, and for "selftest-diagnostic-path.h" moving to "diagnostics/selftest-paths.h". * selftest-diagnostic-path.h: Move to... * diagnostics/selftest-paths.h: ...here, updating header guard. Update for above changes. * libgdiagnostics.cc: Update for above changes. * libsarifreplay.cc: Update property prefix for threadFlowLocations from "gcc/diagnostic_event/" to "gcc/diagnostics/paths/event/". * pretty-print-format-impl.h: Update for above changes. * pretty-print.cc: Likewise. * selftest-run-tests.cc (selftest::run_tests): Update for renaming of lazy_diagnostic_path_cc_tests to diagnostics_lazy_paths_cc_tests, and of diagnostic_path_output_cc_tests to diagnostics_paths_output_cc_tests. * selftest.h (lazy_diagnostic_path_cc_tests): Replace decl with... (diagnostics_lazy_paths_cc_tests): ...this. (diagnostic_path_output_cc_tests): Replace decl with... (diagnostics_paths_output_cc_tests): ...this. * simple-diagnostic-path.cc: Clarify that this relates to "tree" and thus shouldn't be in "diagnostics". Update for above changes. * simple-diagnostic-path.h: Likewise. gcc/analyzer/ChangeLog: * access-diagram.cc: Update for changes to diagnostic paths: "diagnostic-path.h" moving to "diagnostics/paths.h", "diagnostic-event-id.h" moving to "diagnostics/event-id.h", diagnostic_event_id_t to diagnostics::paths::event_id_t, diagnostic_path to diagnostics::paths::path, and diagnostic_event to diagnostics::paths::event. * access-diagram.h: Likewise. * analyzer.cc: Likewise. * bounds-checking.cc: Likewise. * call-info.cc: Likewise. * checker-event.cc: Likewise. * checker-event.h: Likewise. * checker-path.cc: Likewise. * checker-path.h: Likewise. * common.h: Likewise. * diagnostic-manager.cc: Likewise. * pending-diagnostic.cc: Likewise. * pending-diagnostic.h: Likewise. * program-point.cc: Likewise. * program-state.cc: Likewise. * region-model.cc: Likewise. * sm-fd.cc: Likewise. * sm-file.cc: Likewise. * sm-malloc.cc: Likewise. * sm-pattern-test.cc: Likewise. * sm-sensitive.cc: Likewise. * sm-signal.cc: Likewise. * sm-taint.cc: Likewise. * varargs.cc: Likewise. gcc/testsuite/ChangeLog: * gcc.dg/plugin/analyzer_gil_plugin.cc: Update #include for "diagnostic-path.h" moving to "diagnostics/paths.h", diagnostic_thread_id_t to diagnostics::paths::thread_id_t, diagnostic_event_id_t to diagnostics::paths::event_id_t, diagnostic_path to diagnostics::paths::path, and diagnostic_thread to diagnostics::paths::thread, and diagnostic_event to diagnostics::paths::event. * gcc.dg/plugin/diagnostic_plugin_test_paths.cc: Likewise. * lib/sarif.py (get_state_graph): Update property prefix for threadFlowLocations from "gcc/diagnostic_event/" to "gcc/diagnostics/paths/event/". * gcc.dg/sarif-output/include-chain-2.h: Update comment. libcpp/ChangeLog: * include/rich-location.h: Replace diagnostic_path with diagnostics::paths::path. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
2025-07-25diagnostics: introduce a "gcc/diagnostics" subdirectoryDavid Malcolm
The "gcc" subdirectory of our source tree currently contains a total of almost 1000 .cc and .h files, enough to hit rate-limiting in some git web UIs, and obscuring the logical relationships between subsystems. In r16-2211-ga5d9debedd2f46 I started introducing a "namespace diagnostics" so it makes sense to move such code into a new "gcc/diagnostics" subdirectory. My intent is for the "diagnostics" namespace/directory to contain shared parts of the diagnostics code that are in libcommon, in particular which don't have knowledge of trees. This patch begins moving of the existing code within "namespace diagnostics" into a new "gcc/diagnostics" subdirectory. No functional change intended. renamed: gcc/diagnostic-digraphs.cc -> gcc/diagnostics/digraphs.cc renamed: gcc/diagnostic-digraphs.h -> gcc/diagnostics/digraphs.h renamed: gcc/diagnostic-state-to-dot.cc -> gcc/diagnostics/state-graphs-to-dot.cc renamed: gcc/diagnostic-state-graphs.cc -> gcc/diagnostics/state-graphs.cc renamed: gcc/diagnostic-state-graphs.h -> gcc/diagnostics/state-graphs.h contrib/ChangeLog: * gcc.doxy (INPUT): Add gcc/diagnostics subdir. gcc/ChangeLog: * Makefile.in (OBJS-libcommon): Rename diagnostic-digraphs.o to diagnostics/digraphs.o. Rename diagnostic-state-graphs.o to diagnostics/state-graphs.o. Rename diagnostic-state-to-dot.o to diagnostics/state-graphs-to-dot.o. (PLUGIN_HEADERS): Add $(srcdir)/diagnostics/*.h. (install-plugin:): Likewise. * configure: Regenerate. * configure.ac (gccdepdir): Add "diagnostics" to directories. * diagnostic-format-html.cc: Update #includes for move of "diagnostic-digraphs.h" to "diagnostics/digraphs.h" and of move of "diagnostic-state-graphs.h" to "diagnostics/state-graphs.h". * diagnostic-format-sarif.cc: Likewise. * diagnostic-path.cc: Likewise for state-graphs.h * diagnostic-digraphs.cc: Move... * diagnostics/digraphs.cc: ...to here. Update #include for renaming of digraphs.h. (selftest::diagnostic_digraphs_cc_tests): Rename to... (selftest::diagnostics_digraphs_cc_tests): ...this. * diagnostic-digraphs.h: Move... * diagnostics/digraphs.h: ...to here, updating header guard. * diagnostic-state-to-dot.cc: Move... * diagnostics/state-graphs-to-dot.cc: ...to here. Update #include of state-graphs.h. * diagnostic-state-graphs.cc: Move... * diagnostics/state-graphs.cc: ...to here. Update #include of state-graphs.h. (selftest::diagnostic_state_graphs_cc_tests): Rename... (selftest::diagnostics_state_graphs_cc_tests): ...to this. * diagnostic-state-graphs.h: Move... * diagnostics/state-graphs.h: ...to here, updating header guard. * libgdiagnostics.cc: Update #includes for move of "diagnostic-digraphs.h" to "diagnostics/digraphs.h" and of move of "diagnostic-state-graphs.h" to "diagnostics/state-graphs.h". * selftest-run-tests.cc (selftest::run_tests): Update for function renamings that reflect file renamings. * selftest.h (selftest::diagnostic_digraphs_cc_tests): Rename to... (selftest::diagnostics_digraphs_cc_tests): ...this. (selftest::diagnostic_state_graphs_cc_tests): Rename... (selftest::diagnostics_state_graphs_cc_tests): ...to this. gcc/analyzer/ChangeLog: * ana-state-to-diagnostic-state.cc: Update #include for move of "diagnostic-state-graphs.h" to "diagnostics/state-graphs.h". * ana-state-to-diagnostic-state.h: Likewise. * checker-event.cc: Likewise. * checker-event.h: Update #include for move of "diagnostic-digraphs.h" to "diagnostics/digraphs.h". * program-state.cc: : Update #include for move of "diagnostic-state-graphs.h" to "diagnostics/state-graphs.h". gcc/testsuite/ChangeLog: * gcc.dg/plugin/diagnostic_plugin_test_graphs.cc: Update #include for move of "diagnostic-digraphs.h" to "diagnostics/digraphs.h". Signed-off-by: David Malcolm <dmalcolm@redhat.com>
2025-07-24Daily bump.GCC Administrator
2025-07-23contrib: add 'zlib' to ignored_prefixesSam James
This fixes the same problem for syncing zlib that H.J. hit for libffi in r12-4561-g25ab851dd333d7. contrib/ChangeLog: PR other/105404 * gcc-changelog/git_commit.py (ignored_prefixes): Add zlib/.
2025-07-17Daily bump.GCC Administrator
2025-07-16contrib: add gcc/text-art to Doxygen inputDavid Malcolm
contrib/ChangeLog: * gcc.doxy (INPUT): Add directory "gcc/text-art". Signed-off-by: David Malcolm <dmalcolm@redhat.com>
2025-07-12Daily bump.GCC Administrator
2025-07-11Stop updating gcc-12 branchRichard Biener
contrib/ * gcc-changelog/git_update_version.py: Stop updating gcc-12 branch.
2025-07-09Daily bump.GCC Administrator
2025-07-08Handle non default git prefix configurationsPierre-Emmanuel Patry
Mklog parses the diff content from prepare-commit-msg hook but fails when git has been configured with mnemonicPrefix. Forcing the default values for the prefixes would set a distinct diff configuration supported by mklog and prevent most failures. contrib/ChangeLog: * prepare-commit-msg: Force default git prefixes. Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
2025-07-08Daily bump.GCC Administrator
2025-07-07Ignore more clang warnings in contrib/filter-clang-warnings.pyMartin Jambor
in contrib we have a script filter-clang-warnings.py which supposedly filters out uninteresting warnings emitted by clang when it compiles GCC. I'm not sure if anyone else uses it but our internal SUSE testing infrastructure does. Since Martin Liška left, I have mostly ignored the warnings and so they have multiplied. In an effort to improve the situation, I have tried to fix those warnings which I think are worth it and would like to adjust the filtering script so that we get to zero "interesting" warnings again. The changes are the following: 1. Ignore -Woverloaded-shift-op-parentheses warnings. IIUC, those make some sense when << and >> are used for I/O but since that is not the case in GCC they are not really interesting. 2. Ignore -Wunused-function and -Wunneeded-internal-declaration. I think it is OK to occasionally prepare APIs before they are used (and with our LTO we should be able to get rid of them). 3. Ignore -Wvla-cxx-extension and -Wunused-command-line-argument which just don't seem to be useful. 4. Ignore -Wunused-private-field warning in diagnostic-path-output.cc which can only be correct if quite a few functions are removed and looks like it is just not an oversight: gcc/diagnostic-path-output.cc:271:35: warning: private field 'm_logical_loc_mgr' is not used [-Wunused-private-field] 5. Ignore a case in -Wunused-but-set-variable about named_args which is used in a piece of code behind an ifdef in ipa-strub.cc. 6. Adjust the gimple-match and generic-match filters to the fact that we now have multiple such files. 7. Ignore warnings about using memcpy to copy around wide_ints, like the one below. I seem to remember wide-int has undergone fairly rigorous review and TBH I just hope I know what we are doing. gcc/wide-int.h:1198:11: warning: first argument in call to 'memcpy' is a pointer to non-trivially copyable type 'wide_int_storage' [-Wnontrivial-memcall] 8. Ignore -Wc++11-narrowing warning reported in omp-builtins.def when it is included from JIT. The code probably has a bigger issue described in PR 120960. 9. Since the patch number 14 in the original series did not get approved, I assume that private member field m_wanted_type of class element_expected_type_with_indirection in c-family/c-format.cc will get a use sooner or later, so I ignore a warning about it being unused. 10. I have decided to ignore warnings in m2/gm2-compiler-boot about unused stuff (all reported unused stuff are variables). These sources are in the build directory so I assume they are somehow generated and so warnings about unused things are a bit expected and probably not too bad. 11. On the Zulip chat, I have informed Rust folks they have a bunch of -Wunused-private-field cases in the FE. Until they sort it out I'm ignoring these. I might add the missing explicit type-cast case here too if it takes time for the patch I'm posting in this series to reach master. 12. I ignore warning about use of offsetof in libiberty/sha1.c which is apparently only a "C23 extension:" libiberty/sha1.c:239:11: warning: defining a type within 'offsetof' is a C23 extension [-Wc23-extensions] libiberty/sha1.c:460:11: warning: defining a type within 'offsetof' is a C23 extension [-Wc23-extensions] 13. I have enlarged the list of .texi files where warnings somehow got reported. Not sure why that happens. 14. In analyzer/sm.cc there are several "no-op" methods which have named but unused parameters. It seems this is deliberate and so I have filtered the -Wunused-parameter warning for this file. I have also re-arranged the entries in a way which hopefully makes somewhat more sense. Thanks, Martin contrib/ChangeLog: 2025-07-07 Martin Jambor <mjambor@suse.cz> * filter-clang-warnings.py (skip_warning): Also ignore -Woverloaded-shift-op-parentheses, -Wunused-function, -Wunneeded-internal-declaration, -Wvla-cxx-extension', and -Wunused-command-line-argument everywhere and a warning about m_logical_loc_mgr in diagnostic-path-output.cc. Adjust gimple-match and generic-match "filenames." Ignore -Wnontrivial-memcall warnings in wide-int.h, all warnings about unused stuff in files under m2/gm2-compiler-boot, all -Wunused-private-field in rust FE, in analyzer/ana-state-to-diagnostic-state.h and c-family/c-format.cc, all Warnings in avr-mmcu.texi, install.texi and libgccjit.texi and all -Wc23-extensions warnings in libiberty/sha1.c. Ignore -Wunused-parameter in analyzer/sm.cc. Reorder entries.
2025-06-30Daily bump.GCC Administrator
2025-06-29contrib/mklog.py: Fix writing to a global variableFilip Kastl
The last patch of mklog.py put top-level code into function 'main()'. Because of this, writing to global variable 'root' has to be preceded by explicitly declaring 'root' as global. Otherwise the write only has a local effect. Without this change, the '-d' cmdline flag would be broken. Commited as obvious. contrib/ChangeLog: * mklog.py: In 'main()', specify variable 'root' as global. Signed-off-by: Filip Kastl <fkastl@suse.cz>