Recent submissions

Comment · 2 years ago
Comment · 2 years ago
Thanks!

More details here: https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Message-Format...

I hope my choices here work well on a wide variety of terminals.

Comment · 2 years ago
FWIW I implemented SARIF output in GCC 13, which gives a machine-readable interchange format for the errors. It's viewable by e.g. VS Code (via a plugin). Hopefully that makes it easier to grok the messages.

You can see an example of the output here: https://godbolt.org/z/aan6Kfxds (that's the first example from the article, with -fdiagnostics-format=sarif-stderr added to the command-line options)

That doesn't cover the diagrams though (which I currently serialize in SARIF form by making a placeholder Markdown text containing "code" containing the diagram).

I experimented with SVG output for the diagrams, but didn't get this in good enough shape for GCC 14.

I've got a few ideas for more general UX improvements with how we do diagnostics, which I'll try in GCC 15 once we're finished focusing on GCC 14 bugfixing.

Comment · 2 years ago
FWIW I implemented SARIF output in GCC 13 which is viewable by e.g. VS Code (via a plugin) - though the ASCII art isn't.

You can see an example of the output here: https://godbolt.org/z/aan6Kfxds (that's the first example from the article, with -fdiagnostics-format=sarif-stderr added to the command-line options)

I experimented with SVG output for the diagrams, but didn't get this in good enough shape for GCC 14.

Comment · 8 years ago
Comment · 8 years ago
Comment · 8 years ago
Indeed, dealing with multiple configurations with lots of dependencies is hard.

I looked in the option metadata for our C/C++ frontends and -Wduplicated-branches isn't flagged as RejectNegative, so -Wno-duplicated-branches ought to work; I think you ought to be able to set that on a pragma. Does that help?

Comment · 8 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton