public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/26785] New: "extra qualification" error gives line number of end of declaration
@ 2006-03-21 17:03 tbm at cyrius dot com
2006-03-21 17:05 ` [Bug c++/26785] " pinskia at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: tbm at cyrius dot com @ 2006-03-21 17:03 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/26785] "extra qualification" error gives line number of end of declaration
2006-03-21 17:03 [Bug c++/26785] New: "extra qualification" error gives line number of end of declaration tbm at cyrius dot com
@ 2006-03-21 17:05 ` pinskia at gcc dot gnu dot org
2006-03-21 17:06 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-21 17:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-03-21 17:05 -------
This is the crazy parser getting the line number "wrong".
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26785
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/26785] "extra qualification" error gives line number of end of declaration
2006-03-21 17:03 [Bug c++/26785] New: "extra qualification" error gives line number of end of declaration tbm at cyrius dot com
2006-03-21 17:05 ` [Bug c++/26785] " pinskia at gcc dot gnu dot org
@ 2006-03-21 17:06 ` pinskia at gcc dot gnu dot org
2006-10-16 15:22 ` mueller at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-21 17:06 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-03-21 17:06:09
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26785
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/26785] "extra qualification" error gives line number of end of declaration
2006-03-21 17:03 [Bug c++/26785] New: "extra qualification" error gives line number of end of declaration tbm at cyrius dot com
2006-03-21 17:05 ` [Bug c++/26785] " pinskia at gcc dot gnu dot org
2006-03-21 17:06 ` pinskia at gcc dot gnu dot org
@ 2006-10-16 15:22 ` mueller at gcc dot gnu dot org
2006-10-16 15:39 ` tbm at cyrius dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mueller at gcc dot gnu dot org @ 2006-10-16 15:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from mueller at gcc dot gnu dot org 2006-10-16 15:22 -------
ehm, this is the same with any warning/error message? why would this case be
special?
--
mueller at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mueller at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26785
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/26785] "extra qualification" error gives line number of end of declaration
2006-03-21 17:03 [Bug c++/26785] New: "extra qualification" error gives line number of end of declaration tbm at cyrius dot com
` (2 preceding siblings ...)
2006-10-16 15:22 ` mueller at gcc dot gnu dot org
@ 2006-10-16 15:39 ` tbm at cyrius dot com
2008-08-06 16:40 ` manu at gcc dot gnu dot org
2008-08-06 16:44 ` manu at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: tbm at cyrius dot com @ 2006-10-16 15:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from tbm at cyrius dot com 2006-10-16 15:38 -------
(In reply to comment #2)
> ehm, this is the same with any warning/error message? why would this case be
> special?
I never noticed before, but it would still be nice to get this changed.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26785
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/26785] "extra qualification" error gives line number of end of declaration
2006-03-21 17:03 [Bug c++/26785] New: "extra qualification" error gives line number of end of declaration tbm at cyrius dot com
` (3 preceding siblings ...)
2006-10-16 15:39 ` tbm at cyrius dot com
@ 2008-08-06 16:40 ` manu at gcc dot gnu dot org
2008-08-06 16:44 ` manu at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: manu at gcc dot gnu dot org @ 2008-08-06 16:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from manu at gcc dot gnu dot org 2008-08-06 16:38 -------
Subject: Bug 26785
Author: manu
Date: Wed Aug 6 16:37:06 2008
New Revision: 138816
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=138816
Log:
2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR 26785
* diagnostic.c (permerror_at): New.
* toplev.h (permerror_at): Declare.
cp/
* decl.c (grokdeclarator): Use explicit location with
permerror_at.
testsuite/
* g++.dg/warn/pr26785.C: New.
Added:
trunk/gcc/testsuite/g++.dg/warn/pr26785.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
trunk/gcc/diagnostic.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/toplev.h
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26785
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/26785] "extra qualification" error gives line number of end of declaration
2006-03-21 17:03 [Bug c++/26785] New: "extra qualification" error gives line number of end of declaration tbm at cyrius dot com
` (4 preceding siblings ...)
2008-08-06 16:40 ` manu at gcc dot gnu dot org
@ 2008-08-06 16:44 ` manu at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: manu at gcc dot gnu dot org @ 2008-08-06 16:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from manu at gcc dot gnu dot org 2008-08-06 16:42 -------
Fixed in GCC 4.4.
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26785
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-08-06 16:44 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-21 17:03 [Bug c++/26785] New: "extra qualification" error gives line number of end of declaration tbm at cyrius dot com
2006-03-21 17:05 ` [Bug c++/26785] " pinskia at gcc dot gnu dot org
2006-03-21 17:06 ` pinskia at gcc dot gnu dot org
2006-10-16 15:22 ` mueller at gcc dot gnu dot org
2006-10-16 15:39 ` tbm at cyrius dot com
2008-08-06 16:40 ` manu at gcc dot gnu dot org
2008-08-06 16:44 ` manu at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).