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

           Summary: -Wfatal-errors hiding line number of offending caller
           Product: gcc
           Version: 4.5.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: navin.ku...@gmail.com


When compiling with -Wfatal-errors, the line number of the offending caller is
not visible.

Code:
class Blah {
  int test;
};

struct Evil : public Blah {
  int test() { return Blah::test; }
};


When compiling with g++ -c -Wall -Werror, the output is:
test.cc: In member function 'int Evil::test()':
test.cc:3:6: error: 'int Blah::test' is private
test.cc:8:28: error: within this context

When compiling with g++ -c -Wall -Werror -Wfatal-errors, the output is:
test.cc: In member function 'int Evil::test()':
test.cc:3:6: error: 'int Blah::test' is private

There is no mention of line 8 when "-Wfatal-errors" is used.

Reply via email to