public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/33003] New: missed diagnostic about unused variable.
@ 2007-08-06 12:02 pluto at agmk dot net
2007-08-06 12:34 ` [Bug c++/33003] " pinskia at gcc dot gnu dot org
2007-08-13 17:36 ` pluto at agmk dot net
0 siblings, 2 replies; 3+ messages in thread
From: pluto at agmk dot net @ 2007-08-06 12:02 UTC (permalink / raw)
To: gcc-bugs
class X
{
public:
static X& instance();
static void init();
private:
X();
};
void f()
{
X& x = X::instance();
x.init();
}
in this case the 'x' variable is initialized and unused.
gcc-4.2 accepts this w/o any warning at -Wall -Wextra
but vs2005-express reports warning C4189 at warning level 4.
--
Summary: missed diagnostic about unused variable.
Product: gcc
Version: 4.2.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pluto at agmk dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33003
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/33003] missed diagnostic about unused variable.
2007-08-06 12:02 [Bug c++/33003] New: missed diagnostic about unused variable pluto at agmk dot net
@ 2007-08-06 12:34 ` pinskia at gcc dot gnu dot org
2007-08-13 17:36 ` pluto at agmk dot net
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-08-06 12:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2007-08-06 12:33 -------
To the developer (and me), x is not unused.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33003
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/33003] missed diagnostic about unused variable.
2007-08-06 12:02 [Bug c++/33003] New: missed diagnostic about unused variable pluto at agmk dot net
2007-08-06 12:34 ` [Bug c++/33003] " pinskia at gcc dot gnu dot org
@ 2007-08-13 17:36 ` pluto at agmk dot net
1 sibling, 0 replies; 3+ messages in thread
From: pluto at agmk dot net @ 2007-08-13 17:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pluto at agmk dot net 2007-08-13 17:36 -------
$[9.4/2]
--
pluto at agmk dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33003
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-08-13 17:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-06 12:02 [Bug c++/33003] New: missed diagnostic about unused variable pluto at agmk dot net
2007-08-06 12:34 ` [Bug c++/33003] " pinskia at gcc dot gnu dot org
2007-08-13 17:36 ` pluto at agmk dot net
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).