This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/10416: 'unused variable' warning ignores ctor/dtor side-effects
- From: bangerth at dealii dot org
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, gccbugs at contacts dot eelis dot net, nobody at gcc dot gnu dot org
- Date: 16 Apr 2003 23:15:53 -0000
- Subject: Re: c++/10416: 'unused variable' warning ignores ctor/dtor side-effects
- Reply-to: bangerth at dealii dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, gccbugs at contacts dot eelis dot net, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Synopsis: 'unused variable' warning ignores ctor/dtor side-effects
State-Changed-From-To: open->closed
State-Changed-By: bangerth
State-Changed-When: Wed Apr 16 23:15:53 2003
State-Changed-Why:
The compiler cannot know what you want. If you don't like
the warning, switch it off, or follow what the manual
says:
@item -Wunused-variable
@opindex Wunused-variable
Warn whenever a local variable or non-constant static variable is unused
aside from its declaration
To suppress this warning use the @samp{unused} attribute
(@pxref{Variable Attributes}).
W.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10416