https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66318

Mikhail Maltsev <miyuki at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |miyuki at gcc dot gnu.org

--- Comment #4 from Mikhail Maltsev <miyuki at gcc dot gnu.org> ---
I think those tools will not like a newline character in the filename either.
And I doubt that there is a reliable way to parse output of GCC if newlines are
not escaped:

$ cat ./test.cc
void foo();

#line 1 "test1.cc:3:1 error: something wrong!\ntest2.cc"
void bar()
{
    foo("abc");
}

$ /opt/gcc-6.0.0/bin/g++ -c ./test.cc
test1.cc:3:1 error: something wrong!
test2.cc: In function 'void bar()':
test1.cc:3:1 error: something wrong!
test2.cc:3:14: error: too many arguments to function 'void foo()'
./test.cc:1:6: note: declared here
 void foo();

Anyway, GCC already suppresses color diagnostics when stderr is not a TTY
(implemented in should_colorize function). Probably the same logic could be
applied to hypothetical "should_escape".

Reply via email to