This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/47429] New: -Wfatal-errors hiding line number of offending caller


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: unassigned@gcc.gnu.org
        ReportedBy: navin.kumar@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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]