ChangeLog:
* diagnostic-state-to-dot.cc (state_diagram::m_show_tags): Drop
unused field.
Signed-off-by: David Malcolm
---
gcc/diagnostic-state-to-dot.cc | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/gcc/diagnostic-state-to-dot.cc b/gcc/diagnostic-state-
Tested with "doxygen contrib/gcc.doxy"
Pushed to trunk as r16-2307-g48b572ce868829.
contrib/ChangeLog:
* gcc.doxy (INPUT): Add directory "gcc/text-art".
Signed-off-by: David Malcolm
---
contrib/gcc.doxy | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
On Wed, 2025-07-16 at 15:58 +0200, Martin Jambor wrote:
> Hello David,
>
> On Fri, Jul 11 2025, David Malcolm wrote:
> > In r16-1631-g2334d30cd8feac I added support for capturing state
> > information from -fanalyzer in XML form, and adding a way to
> > visualize
>
eferring to other events by ID.
* sarif-replay.dg/2.1.0-valid/3.11.6-embedded-links.sarif: Add
HTML and SARIF output, and call out to Python scripts to verify
the output. Add example of a result with a link in its message.
* sarif-replay.dg/2.1.0-valid/embedded-links
toff): Likewise. Use std::max.
(selftest::assert_not_suggested_for): Use nullptr.
(selftest::test_find_closest_string): Likewise.
* spellcheck.h: Replace TYPE with StringLikeType in templates,
and use CamelCase.
Signed-off-by: David Malcolm
---
gcc/spellcheck.cc |
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-2210-gd7c1e9b37caad5.
gcc/ChangeLog:
* json.cc (json::object::clone): New.
(json::object::clone_as_object): New.
(json::array::clone): New.
(json::float_number::clone): New.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-2209-g1ea72a15031cd8.
gcc/ChangeLog:
* json.cc (string::string): When constructing from pointer and
length, ensure the new buffer is null-terminated.
(selftest::test_strcmp): New.
tics/topics/logical-locations.rst: Markup fix.
* doc/libgdiagnostics/tutorial/02-physical-locations.rst: Clarify
wording of what "the source file" means, and that a range can't
have multiple files.
Signed-off-by: David Malcolm
---
.../libgdiagnostics/topics/comp
On Mon, 2025-06-30 at 15:24 -0400, David Malcolm wrote:
> The "json" output format for diagnostics was deprecated in GCC 15,
> with
> advice to users seeking machine-readable diagnostics from GCC to use
> SARIF instead.
>
> This patch eliminates it from GCC 16,
erty): Likewise.
(diagnostic_event::meaning): Likewise.
gcc/testsuite/ChangeLog:
* gcc.dg/plugin/analyzer_gil_plugin.cc
(gil_diagnostic::get_meaning_for_state_change): Convert
diagnostic_event::meaning enums to enum class.
Signed-off-by: David Malcolm
---
gcc/anal
wise.
* lazy-diagnostic-path.cc: Likewise.
* simple-diagnostic-path.cc: Likewise.
* tree-diagnostic-client-data-hooks.cc: Likewise.
Signed-off-by: David Malcolm
---
gcc/diagnostic-color.cc | 14 +++---
gcc/diagnostic-format-sarif.cc | 14 +++---
gcc/diagno
format-json-pr105916.F90: Deleted test.
Signed-off-by: David Malcolm
---
gcc/Makefile.in | 1 -
gcc/common.opt| 11 +-
gcc/diagnostic-format-json.cc | 605 --
gcc/diagnostic-for
On Mon, 2025-06-30 at 16:47 +, Qing Zhao wrote:
[...snip...]
> The output with -fdiagnostics-show-context=1 is:
>
> /home/opc/Work/GCC/latest-gcc-
> write/gcc/testsuite/gcc.dg/pr109071_7.c: In function ‘foo’:
> /home/opc/Work/GCC/latest-gcc-
> write/gcc/testsuite/gcc.dg/pr109071_7.c:12:6: wa
On Thu, 2025-06-26 at 17:45 +, Yuao Ma wrote:
> Hi all,
>
> This patch, a follow-up to r16-1652-g0606d2b979f401, implements
> middle-end
> optimizations (e.g., constant folding) for our trigonometric pi-based
> function
> built-ins.
>
> This patch is part of
> https://gcc.gnu.org/pipermail/fo
this, adding
dg-require-dot...
* gcc.dg/analyzer/state-diagram-5-sarif.c: ...and this.
Signed-off-by: David Malcolm
---
gcc/diagnostic-format-html.cc | 3 +-
...ate-diagram-5.c => state-diagram-5-html.c} | 11 ++
.../gcc.dg/analyzer/state-diagram-5-sarif.c
text::inhibit_notes.
Signed-off-by: David Malcolm
---
gcc/ada/gcc-interface/misc.cc | 2 +-
gcc/c-family/c-opts.cc| 2 +-
gcc/cp/error.cc | 2 +-
gcc/diagnostic.h | 43 +++
gcc/opts.cc | 2 +-
gcc/tople
and
sarif_serialization_format into...
(sarif_scheme_handler::make_sarif_gen_opts): ...this...
(sarif_scheme_handler::make_sarif_serialization_object): ...and
this.
Signed-off-by: David Malcolm
---
gcc/diagnostic-output-spec.cc | 43 ++-
1
On Wed, 2025-06-25 at 16:04 +0200, Martin Jambor wrote:
> Hi,
>
> When compiling diagnostic-path-output.cc with clang, it warns that
> path_label::get_effects should be marked as override. That looks
> like
> a good idea and from a brief look I also believe it should be marked
> as final (the oth
On Tue, 2025-06-24 at 15:16 +0200, Marc Poulhiès wrote:
> Having both an enum and a variable with the same name triggers an
> error with
> gcc 5.
>
> ChangeLog:
>
> * c/gcc/diagnostic-state-to-dot.cc
> (get_color_for_dynalloc_state):
> Rename argument dynalloc_state to dynalloc_st.
>
No functional change intended.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-1635-ge6406aefd1a25b.
gcc/analyzer/ChangeLog:
* region-model.cc
(exception_thrown_from_unrecognized_call::print): Add
"final override" to vfunc.
---
gcc/an
This patch refactors the support for -fdiagnostics-add-output=SCHEME
from GCC's options parsing so that it is also available to
sarif-replay and to other clients of libgdiagnostics.
With this users of sarif-replay and other such tools can generate HTML
or SARIF as well as text output, using the sa
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Successful run of analyzer integration tests on x86_64-pc-linux-gnu.
Pushed to trunk as r16-1630-g5a64c96cfe7a4d.
gcc/ChangeLog:
PR other/116792
* diagnostic-format-html.cc (html_token_printer::print_tokens):
Ha
No functional change intended.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-1567-g4eb111363899a9.
gcc/analyzer/ChangeLog:
* checker-event.h (checker_event::get_kind): New accessor.
(checker_event::m_kind): Make private.
* checker-pa
On Wed, 2025-06-11 at 11:57 -0400, Jason Merrill wrote:
> On 6/3/25 7:02 PM, David Malcolm wrote:
> > On Sat, 2025-05-31 at 23:25 -0400, Jason Merrill wrote:
> > > + if (kind == DK_POP)
> > > + opt += offset;
> >
> > I'm wondering why the
sing ASSERT_XML_PRINT_EQ.
(selftest::test_printer): Likewise.
(selftest::test_attribute_ordering): Likewise.
Signed-off-by: David Malcolm
---
gcc/diagnostic-format-html.cc | 219 --
gcc/selftest-xml.h| 50
gcc/xml.cc| 2
e to use search by id.
(get_message_within_diag): Update to use search by class.
libcpp/ChangeLog:
PR other/116792
* include/line-map.h (typedef expanded_location): Convert to...
(struct expanded_location): ...this.
(operator==): New decl, for expanded_location
Spotted whilst implementing nesting support in the
experimental-html diagnostic sink.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-1403-gb619b4d7e7a507.
gcc/ChangeLog:
* gimple-ssa-warn-access.cc
(pass_waccess::maybe_check_dealloc_call): Ad
I've been seeing issues in the experimental-html sink where the nesting
of tags goes wrong.
The two issues I've seen are:
* the pp_token_list from the diagnostic message that reaches the
html_token_printer doesn't always have matching pairs of begin/end
tokens (PR other/120610)
* a bug in diag
children::add_text_from_pp): New decl.
Signed-off-by: David Malcolm
---
gcc/diagnostic-path-output.cc | 6 +++---
gcc/diagnostic-show-locus.cc | 2 +-
gcc/xml-printer.h | 1 +
gcc/xml.cc| 12
gcc/xml.h | 1 +
5 files changed, 18 insertio
this.
* selftest-logical-location.cc
(test_logical_location_manager::item_from_funcname): Update for
conversion of enum logical_location_kind to enum class.
* tree-logical-location.cc
(tree_logical_location_manager::get_kind): Likewise.
Signed-off-by: David Malcolm
---
eLog:
PR other/116792
* gcc.dg/html-output/missing-semicolon.py: Update expected
text. Drop out-of-date comment.
Signed-off-by: David Malcolm
---
gcc/diagnostic-format-html.cc | 27 +-
gcc/diagnostic-format-json.cc | 23 +++--
gcc/dia
cc_tests): New.
* xml.h (struct doctypedecl): New decl.
Signed-off-by: David Malcolm
---
gcc/diagnostic-format-html.cc | 19 +++
gcc/xml.cc| 19 ++-
gcc/xml.h | 8
3 files changed, 41 insertions(+), 5 deletions(-)
di
file, based on material from
diagnostic-format-html.cc.
Signed-off-by: David Malcolm
---
gcc/Makefile.in | 1 +
gcc/diagnostic-format-html.cc | 313 -
gcc/selftest-run-tests.cc | 1 +
gcc/selftest.h| 1 +
gcc/xml.cc
dget::paint_to_canvas): Likewise.
Signed-off-by: David Malcolm
---
gcc/text-art/widget.cc | 10 ++
gcc/text-art/widget.h | 11 ---
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/gcc/text-art/widget.cc b/gcc/text-art/widget.cc
index 3c68018c3b54..5d3e5178484c 100644
--- a/gcc/
No functional change intended.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-1267-g0401957b86fa29.
gcc/ChangeLog:
* selftest.h: Fix the sorting of the various *_cc_tests decls.
---
gcc/selftest.h | 14 +++---
1 file changed, 7 insertions(+)
On Sat, 2025-05-31 at 23:25 -0400, Jason Merrill wrote:
> From f57505c7c6fa05a14e285c14a81021655a43ccbc Mon Sep 17 00:00:00
> 2001
> From: Jason Merrill
> Date: Wed, 20 Nov 2024 16:20:52 +0100
> Subject: [PATCH] c++: modules and #pragma diagnostic
> To: gcc-patches@gcc.gnu.org
>
> To respect the
t/diagnostic-ranges-html.py: New test script.
* gcc.dg/format/diagnostic-ranges.c: Add HTML generation to
options, and invoke the new script to check the HTML output.
Signed-off-by: David Malcolm
---
gcc/diagnostic-format-html.cc | 13 +-
gcc/dia
per character.
* g++.dg/diagnostic/long-short-colorization.C: Likewise.
* g++.dg/plugin/show-template-tree-color-labels.C: Likewise.
* gcc.dg/bad-binary-ops-highlight-colors.c: Likewise.
* gcc.dg/format/colors.c: Likewise.
Signed-off-by: David Malcolm
---
gcc/diagno
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-975-g8b3300fe2c2794.
gcc/ChangeLog:
* diagnostic-format-html.cc (HTML_STYLE): Fix PatternFly URL in
comment.
Signed-off-by: David Malcolm
---
gcc/diagnostic-format-html.cc | 2 +-
1
s of xml::printer.
(html_builder::make_element_for_diagnostic): Create an
xml::printer and use it with the html_token_printer.
Signed-off-by: David Malcolm
---
gcc/diagnostic-format-html.cc | 46 ++-
1 file changed, 13 insertions(+), 33 deletions(-)
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-973-g554d2a2f0e2006.
gcc/ChangeLog:
* diagnostic-format-html.cc (html_builder::make_metadata_element):
Gracefully handle the case where "url" is null.
Signed-off-by: David Mal
mat_postprocessor::clone): Use unique_ptr.
(pretty_printer::set_format_postprocessor): New.
(pretty_printer::m_format_postprocessor): Use unique_ptr.
(pp_format_postprocessor): Update for use of unique_ptr, removing
reference from return type.
Signed-off-by: David Malco
On Thu, 2025-05-29 at 09:11 -0400, Jason Merrill wrote:
> On 5/27/25 5:12 PM, Jason Merrill wrote:
> > On 5/27/25 4:47 PM, Jason Merrill wrote:
> > > On 5/27/25 1:33 PM, David Malcolm wrote:
> > > > On Fri, 2025-05-23 at 16:58 -0400, Jason Merrill wrote:
> > >
On Tue, 2025-05-27 at 17:21 -0400, Patrick Palka wrote:
>
> On Tue, 27 May 2025, Patrick Palka wrote:
>
> > On Tue, 27 May 2025, David Malcolm wrote:
> >
> > > On Fri, 2025-05-23 at 16:58 -0400, Jason Merrill wrote:
> > > > On 4/14/25 9:57 AM, Jason M
On Fri, 2025-05-23 at 16:58 -0400, Jason Merrill wrote:
> On 4/14/25 9:57 AM, Jason Merrill wrote:
> > On 1/9/25 10:00 PM, Jason Merrill wrote:
> > > Tested x86_64-pc-linux-gnu. Is the diagnostic.h change OK for
> > > trunk?
> >
> > Ping?
>
> Ping.
Sorry for the delay in responding; comments be
On Thu, 2025-05-22 at 17:01 -0400, Jason Merrill wrote:
> Tested x86_64-pc-linux-gnu, any objection?
LGTM
Thanks
Dave
>
> -- 8< --
>
> r10-1211 added various -Wformat-diag warnings about quoting in GCC
> diagnostic strings, but didn't change these two quoting warnings to
> use that
> flag as w
On Thu, 2025-04-03 at 13:58 +0200, Rasmus Villemoes wrote:
> In many setups, especially when CI and/or some meta-build system like
> Yocto or buildroot, is involved, gcc ends up being invoked using
> absolute path names, which are often long and uninteresting.
>
> That amounts to a lot of noise bo
On Mon, 2025-04-07 at 15:04 +, Qing Zhao wrote:
[...snip...]
> diff --git a/gcc/move-history-rich-location.cc b/gcc/move-history-
> rich-location.cc
> new file mode 100644
> index 000..120498d165e
> --- /dev/null
> +++ b/gcc/move-history-rich-location.cc
[...snip...]
> +
> +/* Imple
Add barebones support for
* diagnostic metadata rules
* quoted source
* generated patches
* execution paths
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-579-ge4ccad8faf5266.
gcc/ChangeLog:
PR other/116792
* diagnostic-format-html.cc: Includ
On Thu, 2025-05-08 at 23:29 -0300, Alexandre Oliva wrote:
>
> On vxworks, the included netinet/in.h header indirectly includes
> , that fails on C++ <11. Skip the test.
>
> Tested with gcc-14 targeting ppc-vx7r2 and ppc64-vx7r2. Also tested
> with trunk on ppc64le-linux-gnu, and with gcc-14 tar
On Thu, 2025-05-08 at 23:31 -0300, Alexandre Oliva wrote:
>
> vxworks' headers use #if instead of #ifdef to test for
> __STDC_WANT_LIB_EXT1__, so the definition in the analyzer test
> strotok-cppreference.c catches a bug there, but not something it's
> meant to catch or that we could fix in GCC, s
/gcc/testsuite/gcc.dg/plugin/diagnostic_plugin_xhtml_format.cc
+++ b/gcc/diagnostic-format-html.cc
@@ -1,6 +1,5 @@
-/* Verify that we can write a non-trivial diagnostic output format
- as a plugin (XHTML).
- Copyright (C) 2018-2024 Free Software Foundation, Inc.
+/* HTML output for diagnostics.
+
On Tue, 2025-05-06 at 14:00 +0530, soum...@nvidia.com wrote:
> From: Soumya AR
>
> Hi,
>
> This RFC and subsequent patch series introduces support for printing
> and parsing
> of aarch64 tuning parameters in the form of JSON.
>
> It is important to note that this mechanism is specifically inten
On Tue, 2025-05-06 at 11:34 +0100, Richard Sandiford wrote:
> writes:
> > From: Soumya AR
> >
> > Hi,
> >
> > This RFC and subsequent patch series introduces support for
> > printing and parsing
> > of aarch64 tuning parameters in the form of JSON.
>
> Thanks for doing this. It looks really u
No functional change intended.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-417-gf4fa41cd5ccbcc.
gcc/ChangeLog:
* selftest-diagnostic.cc (test_diagnostic_context::report): Use
diagnostic_option_id rather than plain int.
* selftest-d
arif: New test.
Signed-off-by: David Malcolm
---
gcc/diagnostic-format-sarif.cc| 27 +++
.../topics/logical-locations.rst | 28 +++
gcc/libgdiagnostics.cc| 117 +++--
gcc/libgdiagnostics.h | 18 +-
gcc/lib
ndex ..4df685001e67
--- /dev/null
+++ b/gcc/doc/libgdiagnostics/topics/compatibility.rst
@@ -0,0 +1,179 @@
+.. Copyright (C) 2015-2025 Free Software Foundation, Inc.
+ Originally contributed by David Malcolm
+
+ This is free software: you can redistribute it and/or modify it
+ under the t
replay.dg/2.1.0-unhandled/3.27.10-none-level.sarif: Likewise.
Signed-off-by: David Malcolm
---
gcc/json.cc | 49
gcc/json.h| 47 +++
gcc/libsarifreplay.cc | 79 +++
-3.py: New test script.
* g++.dg/sarif-output/sarif-output.exp: New script, adapted
from gcc.dg/sarif-output/sarif-output.exp.
* libgdiagnostics.dg/test-logical-location-c.py: Update for using
theRun.logicalLocations.
* libgdiagnostics.dg/test-warning-with-p
Previously we used an abstract base class logical_location with
concrete subclasses to separate the diagnostics subsystem from
implementation details of "tree" and of libgdiagnostics.
This approach required allocating implementation objects on the heap
whenever working with logical locations, and
Fixes a couple of pedantic warnings.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-315-g49d2c6ced2c894.
gcc/ChangeLog:
* prime-paths.cc (limit_checked_add): Remove redundant trailing
';'.
(enters_through_p): Likewise.
---
gcc/prime-
The SARIF 2.1.0 spec says that although a "SARIF log file SHALL contain
a serialization of the SARIF object model into the JSON format ... in the
future, other serializations might be defined." (§3.1)
I've been experimenting with alternative serializations of SARIF (CBOR
and JSON5 for now). To he
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-313-g8c80fc106482dd.
gcc/testsuite/ChangeLog:
PR analyzer/107017
* c-c++-common/analyzer/sprintf-3.c: New test, covering use of
sprintf with specific format strings. Doesn't yet find prob
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-312-g039ba6580f5328.
gcc/analyzer/ChangeLog:
* sm-malloc.cc (malloc_diagnostic::describe_state_change): Tweak
the "EXPR is NULL" message for the case where EXPR is a null
pointer.
gcc/tes
On Tue, 2025-04-29 at 21:51 +0200, Marc Poulhiès wrote:
> Having both an enum and a variable with the same name triggers an
> error with
> gcc 5.
>
> exploded-graph.h:351:29: error: ‘status’ is not a class, namespace,
> or enumeration
>
> gcc/analyzer/ChangeLog:
> * exploded-graph.h (set_
536-1.C: New test.
* g++.dg/analyzer/nrvo-pr111536-1b.C: New test.
* g++.dg/analyzer/nrvo-pr111536-2.C: New test.
* g++.dg/analyzer/nrvo-pr111536-2b.C: New test.
Signed-off-by: David Malcolm
---
gcc/analyzer/engine.cc| 2 +-
gcc/analyzer/program-stat
Implement ana::translation_unit for the C++ frontend with a
no-op placeholder implementation, for now.
No functional change intended; a follow-up may implement
things further.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-263-g13f4b12393fa98.
gcc/cp/Change
ite/ChangeLog:
* gcc.dg/plugin/analyzer_cpython_plugin.cc: Convert
enum poison_kind to "enum class".
Signed-off-by: David Malcolm
---
gcc/analyzer/access-diagram.cc| 16 ++--
gcc/analyzer/bounds-checking.cc | 26 ++---
gcc/analyzer/
zero.
gcc/testsuite/ChangeLog:
PR analyzer/109366
* g++.dg/analyzer/unique_ptr-1.C: New test.
* g++.dg/analyzer/unique_ptr-2.C: New test.
Signed-off-by: David Malcolm
---
gcc/analyzer/region-model-manager.cc | 6 ++
gcc/testsuite/g++.dg/analyzer/unique_ptr-1.C
(make_signal_state_machine): Likewise.
(make_pattern_test_state_machine): Likewise.
(make_va_list_state_machine): Likewise.
(make_fd_state_machine): Likewise.
* varargs.cc (make_va_list_state_machine): Update to use
std::unique_ptr.
Signed-off-by: David Malcolm
---
gcc/analyzer/engine.cc
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-256-g5ecea59621c63a.
gcc/analyzer/ChangeLog:
* region-model.cc (region_model::on_stmt_pre): Use internal_error
if we see an unexpected gimple stmt code.
Signed-off-by: David Malcolm
---
ails::make_dump_widget): New.
* call-details.h (call_details::dump): Declare new overload.
(call_details::make_dump_widget): New decl.
Signed-off-by: David Malcolm
---
gcc/analyzer/call-details.cc | 59
gcc/analyzer/call-details.h | 4 +++
2 f
c.dg/plugin/analyzer_gil_plugin.cc: Likewise.
* gcc.dg/plugin/analyzer_kernel_plugin.cc: Likewise.
* gcc.dg/plugin/analyzer_known_fns_plugin.cc: Likewise.
Signed-off-by: David Malcolm
---
gcc/analyzer/access-diagram.cc| 22 ++-
gcc/analyzer/access-diagram.h
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-252-gbc39b0072f5660.
gcc/ChangeLog:
* diagnostic.h (diagnostic_context::m_opt_permissive): Convert
from int to diagnostic_option_id. Update comment.
Signed-off-by: David Malcolm
---
No functional change intended.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-260-g4e1f545df9da1d.
gcc/analyzer/ChangeLog:
* call-summary.cc (call_summary_replay::call_summary_replay):
Convert "summary" from call_summary * to call_summary &.
we know the pointer must be non-null.
Signed-off-by: David Malcolm
---
gcc/analyzer/analyzer.cc | 24 +--
gcc/analyzer/call-details.cc | 32 ++--
gcc/analyzer/call-details.h | 10 +-
gcc/analyzer/call-info.cc | 2 +-
: Likewise.
Pass "true" for "formatted" param.
Signed-off-by: David Malcolm
---
gcc/diagnostic-format-sarif.cc | 140 ++---
gcc/diagnostic-format-sarif.h | 36 ++---
gcc/diagnostic.cc | 4 +-
gcc/libgdiagnostics.c
ass_manager::finish_optimization_passes): Likewise.
(pass_manager::pass_manager): Likewise.
(pass_manager::dump_profile_report): Likewise.
Signed-off-by: David Malcolm
---
gcc/pass_manager.h | 20 ++--
gcc/passes.cc | 34 +-
(cp_parser_error_1): Use ::make_unique rather than "new" when
making suggest_missing_header.
Signed-off-by: David Malcolm
---
gcc/c-family/name-hint.h | 6 +++--
gcc/c/c-decl.cc | 19 +---
gcc/c/c-parser.cc| 8 ---
gcc/cp/name-lookup.cc| 49 +++
vate.
(diagnostic_abort_on_error): Delete.
* opts.cc (setup_core_dumping): Update for above changes.
Signed-off-by: David Malcolm
---
gcc/diagnostic.h | 16
gcc/opts.cc | 2 +-
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/gcc/diagnostic.h b/gcc/diagnost
I forgot to push this before going on vacation; sorry.
Pushed to trunk.
---
htdocs/gcc-15/changes.html | 260 +++-
htdocs/gcc-15/diag-color-screenshot.png | Bin 0 -> 33062 bytes
2 files changed, 257 insertions(+), 3 deletions(-)
create mode 100644 htdocs/gcc-15
I believe these don't get detected by DejaGnu's regexp.
Found by dg-lint.
Pushed to trunk as r15-8994-g1ee9caf2f84832.
libstdc++-v3/ChangeLog:
* testsuite/17_intro/shared_with_static_deps.cc: Fix malformed
dg-require-static-libstdcxx directive.
* testsuite/17_intro/static
Pushed to trunk as r15-8993-gc88abca94a6abb.
gcc/testsuite/ChangeLog:
* g++.dg/abi/pure-virtual1.C: Fix dg-require-weak directive.
* g++.target/i386/mangling-alias1.C: Fix dg-require-ifunc
directive.
---
gcc/testsuite/g++.dg/abi/pure-virtual1.C| 2 +-
gcc/testsuite
ntrib/dg-lint/dg-lint
create mode 100644 contrib/dg-lint/libgdiagnostics.py
create mode 100644 contrib/dg-lint/test-1.c
create mode 100644 contrib/dg-lint/test-2.c
diff --git a/contrib/dg-lint/dg-lint b/contrib/dg-lint/dg-lint
new file mode 100755
index ..01d58d7a3e95
--- /dev/null
+++ b/cont
Found by dg-lint.
gcc/testsuite/ChangeLog:
* gcc.target/aarch64/atomic-inst-ldlogic.c: Add missing trailing
" }" for 2 dg-final directives.
* gcc.target/aarch64/saturating_arithmetic_1.c: Fix dg-do compile.
* gcc.target/aarch64/saturating_arithmetic_2.c: Likewise.
-
On Wed, 2025-03-26 at 19:59 +0100, Jakub Jelinek wrote:
> On Wed, Mar 26, 2025 at 02:34:43PM -0400, David Malcolm wrote:
>
> Thanks for working on this.
> My python is very limited, so just adding some comments rather
> than doing patch review.
>
> > +COMMON_MISSPELL
Found by dg-lint.
gcc/testsuite/ChangeLog:
* gcc.target/arm/cmse/cmse-17.c: Fix missing space before trailing
"}" in dg-options.
* gcc.target/arm/short-vfp-1.c: Likewise for dg-final; also after
leading "{", in 5 places.
---
gcc/testsuite/gcc.target/arm/cmse/cmse-1
Found by dg-lint.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/cmo-zicbop-1.c: Fix missing space before
trailing } in dg-do directive.
* gcc.target/riscv/cmo-zicbop-2.c: Likewise.
* gcc.target/riscv/prefetch-zicbop.c: Likewise.
* gcc.target/riscv/prefetch-zih
bgdiagnostics.py
create mode 100644 contrib/dg-lint/test-1.c
create mode 100644 contrib/dg-lint/test-2.c
diff --git a/contrib/dg-lint/dg-lint b/contrib/dg-lint/dg-lint
new file mode 100755
index ..20157c304137
--- /dev/null
+++ b/contrib/dg-lint/dg-lint
@@ -0,0 +1,210 @@
+#!/usr/bin/env pyt
Found by dg-lint.
gcc/testsuite/ChangeLog:
* gcc.target/s390/target-attribute/tattr-1.c: Fix missing trailing
close brace on dg-do directive.
* gcc.target/s390/target-attribute/tattr-2.c: Likewise.
---
gcc/testsuite/gcc.target/s390/target-attribute/tattr-1.c | 2 +-
gcc/te
Found by dg-lint.
gcc/testsuite/ChangeLog:
* gcc.target/powerpc/pr70243.c: Fix missing trailing " }" in
dg-do directive.
* gcc.target/powerpc/pr91903.c: Likewise.
---
gcc/testsuite/gcc.target/powerpc/pr70243.c | 2 +-
gcc/testsuite/gcc.target/powerpc/pr91903.c | 2 +-
2 fi
Found by dg-lint.
gcc/testsuite/ChangeLog:
* gcc.target/bfin/l2.c: Fix missing space before trailing "}"
in dg-bfin-processors directive.
---
gcc/testsuite/gcc.target/bfin/l2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/testsuite/gcc.target/bfin/l2.c
Found by dg-lint.
gcc/testsuite/ChangeLog:
* gcc.target/ia64/mfused-madd-vect.c: Fix missing trailing " }" in
dg-do directive.
* gcc.target/ia64/mfused-madd.c: Likewise.
* gcc.target/ia64/mno-fused-madd.c: Likewise.
---
gcc/testsuite/gcc.target/ia64/mfused-madd-vec
Found by dg-lint.
gcc/testsuite/ChangeLog:
* gcc.target/i386/addr-space-1.c: Add missing trailing }
to dg-do directive.
* gcc.target/i386/strub-pr118006.c: Fix ordering of dg-do and
dg-require- directive so that dg-do is first.
---
gcc/testsuite/gcc.target/i386/add
Found by dg-lint.
gcc/testsuite/ChangeLog:
* gcc.dg/ipa/pr110377.c: Fix missing trailing " }" in dg-do
directive.
* gcc.dg/plugin/infoleak-1.c: Fix dg-bogus directive.
* gcc.dg/pr101364-1.c: Fix missing trailing " }" in dg-options
directive.
* gcc.dg
Found by dg-lint.
gcc/testsuite/ChangeLog:
* gcc.target/arc/taux-1.c: Fix missing trailing '" }' from
dg-options.
* gcc.target/arc/taux-2.c: Likewise.
---
gcc/testsuite/gcc.target/arc/taux-1.c | 2 +-
gcc/testsuite/gcc.target/arc/taux-2.c | 2 +-
2 files changed, 2 inserti
gcc/testsuite/ChangeLog:
* c-c++-common/gomp/metadirective-target-device-2.c: Fix missing
trailing " }" on dg-do directive.
* gcc.dg/gomp/attrs-21.c: Likewise for dg-options.
* gcc.dg/gomp/parallel-2.c: Drop ":" from dg-message.
---
gcc/testsuite/c-c++-common/gomp/m
only tested the testsuite fixes on x86_64-pc-linux-gnu; there
were some new PASSes and no regressions, but I haven't tested the
tests on non-x86 archs.
Thoughts?
David Malcolm (12):
contrib: add dg-lint and libgdiagnostics.py [PR116163]
testsuite: fix broken dg directives
testsuite, gomp:
diagnostic_context's dtor assumed that it owned the m_urlifier pointer
and would delete it.
As of r15-5988-g5a022062d22e0b this isn't always the case -
auto_urlify_attributes is used in various places in the C/C++ frontends
and in the middle-end to temporarily override the urlifier with an
on-stac
On Sat, 2025-03-15 at 16:14 -0500, Robert Dubner wrote:
> This works on a x86_64-linux machine, although I had to do a complete
> rebuild to make it take.
>
> If this meets with the approval of the global reviewers, please apply
> it,
> with a suitable commit message.
>
> The main characteristic
1 - 100 of 1611 matches
Mail list logo