On Thu, Jan 14, 2021 at 4:34 PM David Malcolm via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: ... > > One remaining issue raised in that Emacs bug is the encoding of these > > lines, and, indeed, the encoding of GCC's stderr in general: > > currently we emit a mixture of bytes and UTF-8; I believe we emit > > filenames as bytes, diagnostic messages as UTF-8, and quote source > > code > > in the original encoding (PR other/93067 covers converting it to UTF- > > 8 on > > output). Currently this patch prints octal-escaped bytes for bytes > > within filenames and replacement text that aren't printable (which > > is what -fdiagnostics-parseable-fixits also does). Doing so at least > > allows the common case of ASCII-encoded sources and filenames to > > work, > > whilst allowing for future formats that address the encoding issues. > > > > Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. > > > > Thoughts? > > Dave > > In the absence of feedback, I've rebased the patch, retested it as > above, and pushed it to master > (as f10960558540636800cf5d3d6355969621fbc17e) > > Dave >
I just wanted to note that a patch to fix PR other/93067 is waiting for review here: https://gcc.gnu.org/pipermail/gcc-patches/2020-December/562316.html in case it may be desirable to get this in the same release as the new GCC_EXTRA_DIAGNOSTIC_OUTPUT feature. Thanks! -Lewis