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++/12796] New: Wrong line number in error message


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.


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