That's not ASCII, but it does look like a nice improvement. I actually like the use of the warning sign emoji too.
You can pass -fdiagnostics-text-art-charset=[none|ascii|unicode|emoji] if you want real ASCII.
GCC 14 Boasts Nice ASCII Art for Visualizing Buffer Overflows
41–50 of 54 posts
Re: GCC 14 Boasts Nice ASCII Art for Visualizing Buffer Overflows
#42Had to check the article date at first to see if the "-Wanalyzer-infinite-loop" was a play on casually solving the halting problem with a gcc flag!
Re: GCC 14 Boasts Nice ASCII Art for Visualizing Buffer Overflows
#43Re: GCC 14 Boasts Nice ASCII Art for Visualizing Buffer Overflows
#44It looks very cool, but how do screen readers parse this? My guess is not well.
How well do screen readers parse other compiler errors? This isn’t me trying to be snarky, I actually have no idea! Reading a C++ template error is hard enough as a sighted person
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.
Re: GCC 14 Boasts Nice ASCII Art for Visualizing Buffer Overflows
#45Earlier quoted context omitted.
You can pass -fdiagnostics-text-art-charset=[none|ascii|unicode|emoji] if you want real ASCII.
Wait, really? That’s awesome
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.
Re: GCC 14 Boasts Nice ASCII Art for Visualizing Buffer Overflows
#46It looks very cool, but how do screen readers parse this? My guess is not well.
How well do screen readers parse other compiler errors? This isn’t me trying to be snarky, I actually have no idea! Reading a C++ template error is hard enough as a sighted person
I like to ask this question on posts about new libraries or developer tools, because most developers don't consider the accessibility of the features they're building.
Re: GCC 14 Boasts Nice ASCII Art for Visualizing Buffer Overflows
#47Earlier quoted context omitted.
How well do screen readers parse other compiler errors? This isn’t me trying to be snarky, I actually have no idea! Reading a C++ template error is hard enough as a sighted person
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…
Re: GCC 14 Boasts Nice ASCII Art for Visualizing Buffer Overflows
#48Re: GCC 14 Boasts Nice ASCII Art for Visualizing Buffer Overflows
#49Earlier quoted context omitted.
Wait, really? That’s awesome
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.
Color is definitely one of the things that do NOT work well on a wide variety of terminals. try a white-on-firebrick VTE, or a black-on-darkgoldenrod (awesome for sun-glare, btw), white-on-green, white-on-purple for a change to see how well they mingle...
Re: GCC 14 Boasts Nice ASCII Art for Visualizing Buffer Overflows
#50Earlier quoted context omitted.
How well do screen readers parse other compiler errors? This isn’t me trying to be snarky, I actually have no idea! Reading a C++ template error is hard enough as a sighted person
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…
An advice to anyone out there making software: give a screen reader a whirl! Take it as a learning experience!