This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/26785] New: "extra qualification" error gives line number of end of declaration
- From: "tbm at cyrius dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Mar 2006 17:03:09 -0000
- Subject: [Bug c++/26785] New: "extra qualification" error gives line number of end of declaration
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The line number mentioned in the "extra qualification" error is not
ideal. Instead of showing the line number on which the extra
qualification actually occurs it shows the last line of the
declaration.
(sid)6102:tbm@deprecation: ~] cat > test.cpp
class foo {
foo::foo(int a,
int b,
int c);
};
int main() {
}
(sid)6103:tbm@deprecation: ~] g++ test.cpp
test.cpp:4: error: extra qualification `foo::' on member `foo'
I'd like to see "test.cpp:2: ..." here.
Presumably it checks things like that after reading a complete
declaration. I would have thought it could track what the first line
of the declaration was though.
seen with:
gcc version 4.1.0 20060219 (prerelease) (Debian 4.1-0exp9)
gcc version 4.0.3 (Debian 4.0.3-1) [using -pedantic]
--
Summary: "extra qualification" error gives line number of end of
declaration
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tbm at cyrius dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26785