[Bug c++/33003] New: missed diagnostic about unused variable.
pluto at agmk dot net
gcc-bugzilla@gcc.gnu.org
Mon Aug 6 12:02:00 GMT 2007
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
More information about the Gcc-bugs
mailing list