public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/23293] New: Misleading names in diagnostics for typedefs in functions
@ 2005-08-08 21:54 sylvain dot pion at sophia dot inria dot fr
2005-08-08 21:55 ` [Bug c++/23293] " sylvain dot pion at sophia dot inria dot fr
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: sylvain dot pion at sophia dot inria dot fr @ 2005-08-08 21:54 UTC (permalink / raw)
To: gcc-bugs
Compiling the attached program with g++ -Wall (3.3, 3.4, 4.0 and 4.1)
produces :
demo.C: In function `void generate_warning() [with U = P<unrelated_function()::K>]':
demo.C:19: instantiated from here
demo.C:14: warning: unused variable 'u'
The problem here is that the warning names the type P<S> as
P<unrelated_function()::K>, because it was first instantiated there,
and it gives the typedef name.
But the warning is generated in the function generate_warning(),
which is completely unrelated to unrelated_function().
--
Summary: Misleading names in diagnostics for typedefs in
functions
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sylvain dot pion at sophia dot inria dot fr
CC: gcc-bugs at gcc dot gnu dot org,sylvain dot pion at
sophia dot inria dot fr
GCC host triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23293
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/23293] Misleading names in diagnostics for typedefs in functions
2005-08-08 21:54 [Bug c++/23293] New: Misleading names in diagnostics for typedefs in functions sylvain dot pion at sophia dot inria dot fr
2005-08-08 21:55 ` [Bug c++/23293] " sylvain dot pion at sophia dot inria dot fr
@ 2005-08-08 21:55 ` sylvain dot pion at sophia dot inria dot fr
2005-08-08 22:01 ` [Bug c++/23293] [3.4/4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: sylvain dot pion at sophia dot inria dot fr @ 2005-08-08 21:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From sylvain dot pion at sophia dot inria dot fr 2005-08-08 21:55 -------
Created an attachment (id=9448)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9448&action=view)
c++ program that generates the warning
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23293
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/23293] Misleading names in diagnostics for typedefs in functions
2005-08-08 21:54 [Bug c++/23293] New: Misleading names in diagnostics for typedefs in functions sylvain dot pion at sophia dot inria dot fr
@ 2005-08-08 21:55 ` sylvain dot pion at sophia dot inria dot fr
2005-08-08 21:55 ` sylvain dot pion at sophia dot inria dot fr
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: sylvain dot pion at sophia dot inria dot fr @ 2005-08-08 21:55 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23293
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/23293] [3.4/4.0/4.1 Regression] Misleading names in diagnostics for typedefs in functions
2005-08-08 21:54 [Bug c++/23293] New: Misleading names in diagnostics for typedefs in functions sylvain dot pion at sophia dot inria dot fr
2005-08-08 21:55 ` [Bug c++/23293] " sylvain dot pion at sophia dot inria dot fr
2005-08-08 21:55 ` sylvain dot pion at sophia dot inria dot fr
@ 2005-08-08 22:01 ` pinskia at gcc dot gnu dot org
2005-08-08 22:06 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-08 22:01 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-08 22:01 -------
Confirmed, a regression from 2.95.3:
earth:~>~/ia32_linux_gcc2_95//bin/gcc t.cc -W -Wall
t.cc: In function `void generate_warning<P<S> >()':
t.cc:19: instantiated from here
t.cc:14: warning: unused variable `struct P<S> * u'
It was even worse in 3.0.4-3.3.3:
earth:~>~/ia32_linux_gcc3_0/bin/gcc t.cc -W -Wall
t.cc: In function `void generate_warning() [with U = P<void
unrelated_function()::K>]':
t.cc:19: instantiated from here
t.cc:14: warning: unused variable `P<void unrelated_function()::K>*u'
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |minor
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Known to fail| |3.0.4 3.1.2 3.2.3 3.3.5
| |3.4.2 4.0.0
Known to work| |2.95
Last reconfirmed|0000-00-00 00:00:00 |2005-08-08 22:01:23
date| |
Summary|Misleading names in |[3.4/4.0/4.1 Regression]
|diagnostics for typedefs in |Misleading names in
|functions |diagnostics for typedefs in
| |functions
Target Milestone|--- |4.0.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23293
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/23293] [3.4/4.0/4.1 Regression] Misleading names in diagnostics for typedefs in functions
2005-08-08 21:54 [Bug c++/23293] New: Misleading names in diagnostics for typedefs in functions sylvain dot pion at sophia dot inria dot fr
` (2 preceding siblings ...)
2005-08-08 22:01 ` [Bug c++/23293] [3.4/4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-08-08 22:06 ` pinskia at gcc dot gnu dot org
2005-08-08 22:08 ` pinskia at gcc dot gnu dot org
2005-09-27 16:25 ` mmitchel at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-08 22:06 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-08 22:06 -------
This is related to PR 22573.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23293
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/23293] [3.4/4.0/4.1 Regression] Misleading names in diagnostics for typedefs in functions
2005-08-08 21:54 [Bug c++/23293] New: Misleading names in diagnostics for typedefs in functions sylvain dot pion at sophia dot inria dot fr
` (3 preceding siblings ...)
2005-08-08 22:06 ` pinskia at gcc dot gnu dot org
@ 2005-08-08 22:08 ` pinskia at gcc dot gnu dot org
2005-09-27 16:25 ` mmitchel at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-08 22:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-08 22:08 -------
And related to PR 17763.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23293
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/23293] [3.4/4.0/4.1 Regression] Misleading names in diagnostics for typedefs in functions
2005-08-08 21:54 [Bug c++/23293] New: Misleading names in diagnostics for typedefs in functions sylvain dot pion at sophia dot inria dot fr
` (4 preceding siblings ...)
2005-08-08 22:08 ` pinskia at gcc dot gnu dot org
@ 2005-09-27 16:25 ` mmitchel at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-09-27 16:25 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.0.2 |4.0.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23293
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-09-27 16:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-08 21:54 [Bug c++/23293] New: Misleading names in diagnostics for typedefs in functions sylvain dot pion at sophia dot inria dot fr
2005-08-08 21:55 ` [Bug c++/23293] " sylvain dot pion at sophia dot inria dot fr
2005-08-08 21:55 ` sylvain dot pion at sophia dot inria dot fr
2005-08-08 22:01 ` [Bug c++/23293] [3.4/4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-08-08 22:06 ` pinskia at gcc dot gnu dot org
2005-08-08 22:08 ` pinskia at gcc dot gnu dot org
2005-09-27 16:25 ` mmitchel 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).