Consider:

  int main () { goto foo; { int i = 0; foo:; } }

Compiling this snippet /without/ -Wfatal-errors produces:

  t.cpp: In function ‘int main()’:
  t.cpp:1: error: jump to label ‘foo’
  t.cpp:1: error:   from here
  t.cpp:1: error:   crosses initialization of ‘int i’

Compiling the snippet /with/ -Wfatal-errors, we get:

  t.cpp: In function ‘int main()’:
  t.cpp:1: error: jump to label ‘foo’
  compilation terminated due to -Wfatal-errors.

Alas, half the error message has disappeared.


-- 
           Summary: -Wfatal-errors truncates multi-line error messages.
           Product: gcc
           Version: 4.2.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gcc-bugzilla at contacts dot eelis dot net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33952

Reply via email to