This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/924: -Wuninitialized does not seem to warn on uninitializeclass members.
- From: Wolfgang Bangerth <bangerth at ticam dot utexas dot edu>
- To: Neil Booth <neil at daikokuya dot co dot uk>
- Cc: bangerth at dealii dot org, <gcc-bugs at gcc dot gnu dot org>, <gcc-prs at gcc dot gnu dot org>, <mdejong at redhat dot com>, <nobody at gcc dot gnu dot org>, <gcc-gnats at gcc dot gnu dot org>
- Date: Sun, 10 Nov 2002 15:02:54 -0600 (CST)
- Subject: Re: c++/924: -Wuninitialized does not seem to warn on uninitializeclass members.
> > State-Changed-From-To: analyzed->closed
> > State-Changed-Why:
> > You get the warning with -Weffc++:
>
> Shouldn't -Wuninitialised warn too? Or at least, document that this
> case is not warned about?
Maybe. But -Wuninitialized reads
`-Wuninitialized'
An automatic variable is used without first being initialized.
and we are not talking about automatic variables, but a member variable.
I should have stated this more clearly. (Also, there are good reasons to
initialize member variables later; -Wunitialized only covers the case
where a variable is actually _used_ uninitialized, but this as well is not
the case here.)
> We shouldn't be too hasty to close bugs.
I'd be happy to re-open the report if you want me to.
Regards
Wolfgang
-------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth@ticam.utexas.edu
www: http://www.ticam.utexas.edu/~bangerth