This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/47429] New: -Wfatal-errors hiding line number of offending caller
- From: "navin.kumar at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 24 Jan 2011 04:24:45 +0000
- Subject: [Bug c++/47429] New: -Wfatal-errors hiding line number of offending caller
- Auto-submitted: auto-generated
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.