This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12796] New: Wrong line number in error message
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Oct 2003 21:56:20 -0000
- Subject: [Bug c++/12796] New: Wrong line number in error message
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12796
Summary: Wrong line number in error message
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
Compiling the following code snippet
=========================================
struct A {};
struct B
{
int i;
A::X;
};
=========================================
causes the following error message:
bug.cc:4: error: type `B' is not a base type for type `A'
However, the bug is in line 6 and not in line 4.
This affects all versions of gcc.
Well, 2.95.x reports a different line, namely 7, which is also incorrect.