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

            Bug ID: 81242
           Summary: Clear-to-EOL in diagnostics colorization corrupts
                    output
           Product: gcc
           Version: 6.3.1
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fw at gcc dot gnu.org
                CC: dmalcolm at redhat dot com
  Target Milestone: ---

It appears that GCC suffers from the same issue as grep when it comes to
coloring and line wraps.

  http://invisible-island.net/xterm/xterm.faq.html#grep_colors

Reproducer to be run in an 80-columns wide xterm:

printf "f%014dx;\n" 0 | gcc -x c -fsyntax-only  -

Output is:

$ printf "f%014dx;\n" 0 | gcc -Wall -x c -fsyntax-only  -
<stdin>:1:1: warning: data definition has no type or storage class
<stdin>:1:1: warning: type defaults to ‘int’ in declaration of
‘f00000000000000’ [-Wimplicit-int]

Note the missing “x” at the end of the identifier.

Seen with gcc-6.3.1-1.fc25.x86_64 and gcc-4.8.5-16.el7.x86_64.

Reply via email to