This patch adds the ability for users of diagnostics::output_spec to
add custom key/values pairs to
-fdiagnostics-{add,set}-output=SCHEME:KEY=VALUE
The intent is for allow e.g. capturing compiler-specific information in
SARIF sinks (CFGs, inheritance hierarchies, etc)
Successfully bootstrapped
Pushed to trunk as r16-4189-g8f076a05a8dac3.
gcc/testsuite/ChangeLog:
* gcc.dg/plugin/start_unit_plugin.cc: Fix typo in comment.
---
gcc/testsuite/gcc.dg/plugin/start_unit_plugin.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/testsuite/gcc.dg/plugin/start_unit_
SARIF "fix" objects SHOULD have a "description" property (§3.55.2) that
describes the proposed fix, but currently GCC's SARIF output doesn't
support this, and we don't capture this anywhere internally as we build
fix-it hints in the compiler.
Currently we can have zero or more instances of fixit_h
No functional change intended.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-3957-g60d748800835fb.
gcc/ChangeLog:
* diagnostics/buffering.cc: Drop include of "diagnostic.h".
* diagnostics/buffering.h: Likewise.
* diagnostics/context.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-3959-g423d7b24e7cff2.
gcc/ChangeLog:
* diagnostics/client-data-hooks.h (client_data_hooks::dump): New.
* diagnostics/context.cc (context::dump): Dump
m_client_data_hooks.
(client_d
Modernization; no functional change intended.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-3958-g21fe45f111cf53.
gcc/ChangeLog:
* diagnostics/paths-output.cc: Update for conversion of
location_aspect to enum class.
* diagnostics/sou
Comment #2 of PR c++/121966 notes that the "inherited here" messages
should be nested *within* the note they describe.
Implemented by this patch, which also nests other notes emitted for
rejection_reason within the first note of print_z_candidate.
Successfully bootstrapped & regrtested on x86_64-
In r15-6116-gd3dd24acd74605 I updated print_z_candidates to show the
number of candidates, and a number for each candidate.
PR c++/121966 notes that the printed count is sometimes higher than
what's actually printed: I missed the case where candidates in the
list aren't printed due to not being vi
In r16-2766-g7969e4859ed007 I added a new field to replay_opts
but forgot to initialize it in set_defaults.
Fixed thusly.
Spotted thanks to valgrind.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-3938-gddabda614fed35.
gcc/ChangeLog:
* sarif-replay
Successfully regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-3939-g76fd69ef3dfa00.
gcc/testsuite/ChangeLog:
* g++.dg/analyzer/unique_ptr-1.C: Rename to...
* g++.dg/analyzer/std-unique_ptr-1.C: ...this.
* g++.dg/analyzer/unique_ptr-2.C: Rename to...
* g++.d
On Sat, 2025-09-13 at 01:42 -0300, Alexandre Oliva wrote:
>
> Add __get_errno_ptr() as yet another synonym for __errno_location.
>
> This came up while updating a port for a target that uses this
> function
> name in the implementation of errno. Tested on that target, and on
> x86_64-linux-gnu a
On Fri, 2025-09-12 at 16:45 +0100, Peter Damianov wrote:
> UTF-8 characters in diagnostic output (such as the warning emoji ⚠️
> used by fanalyzer) display as mojibake on Windows unless the utf8
> code page is being used
>
> This patch adds UTF-8 to UTF-16 conversion when outputting to a
> console
Successfully regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-3826-g85a97e1a8ee934.
gcc/testsuite/ChangeLog:
* gcc.dg/plugin/crash-test-write-though-null-sarif.c: Rename to...
* gcc.dg/plugin/crash-test-write-through-null-sarif.c: ...this.
* gcc.dg/plugin/crash-tes
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-3828-g259347de43e965.
gcc/ChangeLog:
PR diagnostics/120063
* diagnostics/context.cc (context::execution_failed_p): Also treat
any kind::fatal errors as leading to failed execution.
PR diagnostics/121876 tracks an issue inside our crash-handling, where
if an ICE happens when we're within a nested diagnostic, an assertion
fails inside diagnostic::context::set_diagnostic_buffer, leading to
a 2nd ICE. Happily, this does not infinitely recurse, but it obscures
the original ICE an
On Wed, 2025-09-10 at 18:23 +0100, Richard Earnshaw (lists) wrote:
> On 10/09/2025 14:06, Jeff Law wrote:
> >
> >
> > On 9/10/25 4:23 AM, Iain Sandoe wrote:
> >
> > > Now we have this facility - and it is firing on my testboxes
> > > (since i use this
> > > script to post-process [per .sum file
On Tue, 2025-09-02 at 12:04 +0530, soum...@nvidia.com wrote:
> From: Soumya AR
>
> This patch extends various compiler components to handle the newly
> added
> atomic fetch min/max builtins:
>
[...]
>
> 3. Static Analyzer: Extended kf_atomic_fetch_op and
> kf_atomic_op_fetch classes
> to m
report information to the logger
+ on what the context is doing. */
+ logging::logger *m_logger;
};
/* Client supplied function to announce a diagnostic
diff --git a/gcc/diagnostics/html-sink.cc b/gcc/diagnostics/html-sink.cc
index 1fd317a8b808..64dcefeedaad 100644
--- a/gcc/diagnostics/htm
No functional change intended.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-3194-g1da90c533f9446.
gcc/ChangeLog:
* diagnostics/output-spec.cc (sarif_scheme_handler::make_sink):
Populate sarif_generation_options instance directly, rather tha
On Wed, 2025-08-13 at 11:24 +0200, Richard Biener wrote:
> On Wed, Jul 30, 2025 at 4:42 PM Qing Zhao wrote:
[...snip...]
>
> >
> >
> > diff --git a/gcc/diagnostic-context-rich-location.h
> > b/gcc/diagnostic-context-rich-location.h
> > new file mode 100644
> > index 000..676b9d23b05
I added this test back in r7-934-g15c671a79ca66d, but it looks like
r15-2125-g81824596361cf4 changed the error message.
Tested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-3172-gf622df9af2e7c1.
gcc/testsuite/ChangeLog:
PR testsuite/119783
jit.dg/test-error-impossible-must-tail-c
Tested on x86_64-pc-linux-gnu; fixes jit.dg/test-asm.cc.
Pushed to trunk as r16-3171-gd6d1fa0039e68e.
gcc/jit/ChangeLog:
PR jit/121516
* libgccjit++.h (context::new_struct_type): Replace use of
&fields[0] with fields.data ().
(context::new_function): Likewise for pa
On Sat, 2025-08-09 at 00:39 +0100, Sam James wrote:
> Sam James writes:
>
> > David Malcolm writes:
> >
> > > [...]
> > > Test bootstrap on x86_64 in progress. Is there an easy way to
> > > force
> > > the bootstrap to use 32-bit?
>
Looks like I broke the build with r16-3091-gac4e7455a33237 on hosts
where unsigned == size_t.
../../gcc/gcc/diagnostics/dumping.cc:98:1: error: redefinition of ‘void
diagnostics::dumping::emit_field(FILE*, int, const char*, T) [with T = unsigned
int; FILE = FILE]’
98 | emit_field (FILE *outfi
No functional change intended.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-3089-gd7d0ea918fad92.
gcc/cp/ChangeLog:
* error.cc (cp_adjust_diagnostic_info): Convert "context" arg from
ptr to const &.
gcc/ChangeLog:
* diagnostics/con
No functional change intended.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-3090-gf14fee14d440cf.
gcc/ChangeLog:
* diagnostic.h (diagnostics::get_cwe_url): Move decl to
diagnostics/metadata.h.
(diagnostics::maybe_line_and_column): M
ast (i)),
m_count_for_kind[i]);
none = false;
}
if (none)
-fprintf (out, "%*s(none)\n", indent + 2, "");
+dumping::emit_none (out, indent + 2);
}
void
diff --git a/gcc/diagnostics/dumping.cc b/gcc/diagnostics/dumping.cc
new file mode 1
In GCC 15 I added an experimental nesting view in text sinks
for hierarchical diagnostics, such as C++ template problems.
This patch enables it for text sinks by default. The old
behavior can be restored via -fno-diagnostics-show-nesting,
which the patch also adds to -fdiagnostics-plain-output.
Consolidate 3 fields in diagnostics::context and
diagnostics::column_policy into a new struct
diagnostics::column_options.
No functional change intended; reduces the number of public
fields in diagnostics::context.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as
This patch adds support to sarif-replay for "nestingLevel"
from "P3358R0 SARIF for Structured Diagnostics"
https://wg21.link/P3358R0
Doing so revealed a bug where libgdiagnostics was always
creating new location_t values (and thus also
diagnostic_physical_location instances), rather than reusing
e
For the common case where a diagnostic has no metadata, sarif-replay's
html output was adding a stray space followed by an empty for
the metadata.
Fixed thusly.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-2765-g0fb30003867635.
gcc/ChangeLog:
PR
Modernization; no functional change intended.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-2767-gb963237a903f73.
gcc/ChangeLog:
* dump-context.h: Convert "enum optinfo_item_kind" into
"enum class kind" within class optinfo_item.
* d
No functional change intended.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-2763-g7dea2582b3a5e4.
gcc/ChangeLog:
* diagnostics/context.h: Split struct source_printing_options out
into "diagnostics/source-printing-options.h" and include it.
This patch splits out class option_manager to its own header,
and renames it to class option_id_manager to better describe its
purpose.
No functional change intended.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-2762-g268ec60da01c67.
gcc/ChangeLog:
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-2764-g74f59bf10dfef1.
gcc/ChangeLog:
* diagnostics/context.h: Move struct counters to its own header
and include it.
* diagnostics/counters.h: New file, from the above.
---
gcc/diagnostic
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-2761-g3cff171b243f4d.
gcc/ChangeLog:
* diagnostics/buffering.h: Update comment to refer to output sinks
rather than output formats.
Signed-off-by: David Malcolm
---
gcc/diagnostics/bufferi
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r16-2760-gc125e86853a23b.
gcc/ChangeLog:
* gimple-warn-recursion.cc (pass_warn_recursion::execute): Add
missing auto_diagnostic_group.
Signed-off-by: David Malcolm
---
gcc/gimple-warn-recursio
On Mon, 2025-07-28 at 16:50 +, Thomas de Bock wrote:
> This patch optimizes out calls to __dynamic_cast when the type being
> cast to is final (or its destructor), replacing them with a simple
> comparison of the types' vtable addresses. This is already
> implemented and done by default in clan
On Mon, 2025-07-28 at 13:44 +0200, Mikael Pettersson wrote:
> Current trunk doesn't bootstrap with --enable-checking=release
> due to improper nesting of namespaces and #if CHECKING_P blocks.
Sorry about this.
> This corrects that.
Thanks for the fix; I've pushed it as r16-2586-g1f36aabfe81aa1.
On Wed, 2025-07-23 at 20:01 +, Qing Zhao wrote:
> Hi,
>
> This is the 7th version of the patches for fixing PR109071.
I just pushed a big reorganization of GCC's diagnostics subsystem to
trunk as r16-2520-g6d9152659f4f6a through r16-2553-gbae1f7e29816b9:
[PATCH 00/34] Introduce "gcc/diagnos
No functional change intended.
gcc/ChangeLog:
* diagnostic.h: Use TextOrHtml rather than Sink for template
params.
* diagnostics/context.h: Likewise.
* diagnostics/selftest-context.cc: Use "html_or_text" rather than
"sink".
* diagnostics/source-print
No functional change intended.
gcc/ChangeLog:
* diagnostics/selftest-paths.cc: Don't include "demangle.h"
and "backtrace.h".
* diagnostics/source-printing.cc: Likewise.
* diagnostics/state-graphs.cc: Don't include "graphviz.h",
"xml.h", "xml-printer.h", or "
No functional change intended.
gcc/ChangeLog:
* Makefile.in (OBJS-libcommon): Replace diagnostics/changes.o with
diagnostics/edit-context.o.
* diagnostic.cc: Update for move of diagnostics/edit-context.h to
diagnostics/changes.h.
(diagnostics::context::initi
{
// no-op for text
}
diff --git a/gcc/lazily-created.h b/gcc/lazily-created.h
new file mode 100644
index ..a6010cac8b57
--- /dev/null
+++ b/gcc/lazily-created.h
@@ -0,0 +1,51 @@
+/* Template for deferring object creation until the object is needed.
+ Copyright (C) 2024-2025 Free Sof
This has GCC-specific stuff in it (options and "GTY"), and so should
not be in the "diagnostics/" subdir, and should avoid a "diagnostics"
prefix in its name.
No functional change intended.
gcc/ChangeLog:
* Makefile.in (OBJS-libcommon): Replace diagnostic-spec.o with
gcc-diagnosti
No functional change intended.
gcc/c-family/ChangeLog:
* c-common.cc: Update usage of "diagnostic_info" to explicitly
refer to "diagnostics::diagnostic_info".
* c-opts.cc: Likewise.
gcc/c/ChangeLog:
* c-errors.cc: Update usage of "diagnostic_info" to explicitly
No functional change intended.
gcc/ada/ChangeLog:
* gcc-interface/misc.cc: Make
diagnostics::context::m_source_printing private.
gcc/analyzer/ChangeLog:
* program-point.cc: Make diagnostics::context::m_source_printing
private.
gcc/c-family/ChangeLog:
* c-c
No functional change intended.
gcc/ChangeLog:
* Makefile.in (OBJS-libcommon): Add diagnostics/file-cache.o.
* diagnostics/changes.cc: Update for file_cache and char_span
moving from input.h to diagnostics/file-cache.h and into the
"diagnostics::" namespace.
option_id,
+ option_id opt_id,
diagnostic_t new_kind,
location_t where);
diff --git a/gcc/diagnostics/option-id.h b/gcc/diagnostics/option-id.h
new file mode 100644
index ..4132775bb837
--- /dev/null
+++ b/gcc/diagnostics/
No functional change intended.
gcc/ChangeLog:
* Makefile.in (OBJS-libcommon): Replace diagnostic-color.o with
diagnostics/color.o.
(PLUGIN_HEADERS): Remove diagnostic-color.h in favor of glob.
* common.opt: Update for move of diagnostic-color.h to
diagnostic
No functional change intended.
gcc/c-family/ChangeLog:
* c-opts.cc (c_diagnostic_text_finalizer): Add "m_" prefix to
fields of diagnostic_info.
gcc/c/ChangeLog:
* c-errors.cc: Update to add "m_" prefix to fields of
diagnostic_info throughout.
gcc/cp/ChangeLog:
uot; 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
---
contrib/filter-clang-w
Move diagnostic-show-locus.cc to diagnostics/source-printing.cc
Move diagnostic-label-effects.h to diagnostics/source-printing-effects.h
Move selftest-diagnostic-show-locus.h
to diagnostics/selftest-source-printing.h
No functional change intended.
gcc/ChangeLog:
* Makefile.in (OBJS):
No functional change intended.
gcc/ChangeLog:
* diagnostic.h (struct diagnostic_info): Move to
diagnostics/diagnostic-info.h as diagnostics::diagnostic_info.
Add typedef bringing it back into root namespace, for now.
* diagnostics/diagnostic-info.h: New file, based
No functional change intended.
gcc/ChangeLog:
* diagnostic.h (enum diagnostics_column_unit): Move to
diagnostics/context-options.h.
(enum diagnostics_escape_format): Likewise.
(enum diagnostics_output_format): Likewise.
(enum diagnostic_path_format): Likewis
No functional change intended.
gcc/ChangeLog:
* Makefile.in (OBJS-libcommon): Replace diagnostic.o with
diagnostics/context.o.
gcc/c-family/ChangeLog:
* c-common.cc (c_family_tests): Add include of
"diagnostics/diagnostics-selftests.h". Replace
c_diagnosti
No functional change intended.
gcc/ChangeLog:
* Makefile.in (OBJS-libcommon): Replace selftest-diagnostic.o with
diagnostics/selftest-context.o.
* diagnostic.cc: Update for move of selftest-diagnostic.h to
diagnostics/selftest-context.h.
* diagnostics/html-s
rnel_plugin.cc: Likewise.
* gcc.dg/plugin/analyzer_known_fns_plugin.cc: Likewise.
* gcc.dg/plugin/diagnostic_plugin_test_graphs.cc: Likewise. Also
update for move of diagnostic_metadata to diagnostics::metadata.
* gcc.dg/plugin/diagnostic_plugin_test_metadata.cc: Likewise.
* gcc
No functional change intended.
gcc/ChangeLog:
* diagnostic.h: Move include of "unique-argv.h"
and various forward decls into...
* diagnostics/context.h: ...here.
---
gcc/diagnostic.h | 37 ++---
gcc/diagnostics/context.h | 35 ++
or move of
diagnostic_client_version_info to diagnostics::client_version_info.
* tree-diagnostic-client-data-hooks.cc: Likewise.
* tree-diagnostic.cc: Likewise.
Signed-off-by: David Malcolm
---
gcc/diagnostic-format-html.cc | 2 +-
gcc/diagnostic-forma
nostics/diagnostics-selftests.cc
@@ -0,0 +1,54 @@
+/* Selftest support for diagnostics.
+ Copyright (C) 2019-2025 Free Software Foundation, Inc.
+ Contributed by David Malcolm .
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it
+under the terms of t
No functional change intended.
gcc/ChangeLog:
* common.opt: Update for move of diagnostic-url.h to
diagnostics/url.h.
* diagnostic.cc: Likewise.
* diagnostics/color.cc: Likewise.
* diagnostics/text-sink.cc: Likewise.
* diagnostic-url.h: Move to...
s/buffering.cc
@@ -0,0 +1,199 @@
+/* Support for buffering diagnostics before flushing them to output sinks.
+ Copyright (C) 2024-2025 Free Software Foundation, Inc.
+ Contributed by David Malcolm .
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it
diagnostics::paths::selftest::test_event
selftest::test_diagnostic_path diagnostics::paths::selftest::test_path
selftest::test_diagnostic_threaddiagnostics::paths::selftest::test_thread
selftest::test_html_diagnostic_context diagnostics::selftest::test_html_context
selftest::test_logical_location_mana
No functional change intended.
gcc/ChangeLog:
* Makefile.in (OBJS-libcommon): Add
diagnostics/option-classifier.o.
* diagnostic.cc (diagnostics::option_classifier::init): Move to
diagnostics/option-classifier.cc.
(diagnostics::option_classifier::fini): Likew
header guard.
(class diagnostic_output_file): Move to...
(class diagnostics::output_file): ...here.
* libgdiagnostics.cc (sarif_sink::sarif_sink): Update for
move of diagnostic_output_file to diagnostics::output_file.
Signed-off-by: David Malcolm
---
gcc
l_location_kind to
enum diagnostics::logical_locations::kind.
gcc/analyzer/ChangeLog:
* checker-event.h (checker_event::get_logical_location): Update
for conversion of logical_location to
diagnostics::logical_locations::key.
(checker_event::m_logical_loc): Likewise.
gcc/ChangeLog:
* Makefile.in (OBJS): Replace diagnostic-macro-unwinding.o with
diagnostics/macro-unwinding.o.
* diagnostic-macro-unwinding.cc: Move to...
* diagnostics/macro-unwinding.cc: ...here, moving content into
namespace diagnostics.
* diagnosti
diagnostics_output_spec_cc_tests.
* selftest.h (diagnostic_output_spec_cc_tests): Rename decl to...
(diagnostics_output_spec_cc_tests): ...this.
Signed-off-by: David Malcolm
---
gcc/Makefile.in | 2 +-
.../output-spec.cc} | 56
. Update
for move of edit_context to diagnostics::edit_context.
Signed-off-by: David Malcolm
---
gcc/Makefile.in | 2 +-
gcc/diagnostic-format-html.cc | 2 +-
gcc/diagnostic.cc | 4
iagnostic_diagram): Convert to...
(class diagnostics::diagram): ...this.
gcc/testsuite/ChangeLog:
* gcc.dg/plugin/diagnostic_plugin_test_text_art.cc: Update
#include for move of "diagnostic-diagram.h" to
"diagnostics/diagram.h". Update for m
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-gr
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
1 - 100 of 1683 matches
Mail list logo