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 uninitialize class members.
- From: Neil Booth <neil at daikokuya dot co dot uk>
- To: 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 20:51:01 +0000
- Subject: Re: c++/924: -Wuninitialized does not seem to warn on uninitialize class members.
- References: <20021110202910.23604.qmail@sources.redhat.com>
bangerth@dealii.org wrote:-
> Synopsis: -Wuninitialized does not seem to warn on uninitialize class members.
>
> State-Changed-From-To: analyzed->closed
> State-Changed-By: bangerth
> State-Changed-When: Sun Nov 10 12:29:10 2002
> State-Changed-Why:
> You get the warning with -Weffc++:
> tmp/g> /home/bangerth/bin/gcc-3.3x-pre/bin/c++ -Weffc++ -c x.cc
> x.cc:1: warning: `class no_init' has pointer data members
> x.cc:1: warning: but does not override `no_init(const no_init&)'
> x.cc:1: warning: or `operator=(const no_init&)'
> x.cc: In constructor `no_init::no_init()':
> x.cc:7: warning: `no_init::ptr' should be initialized in the member
> initialization list
Shouldn't -Wuninitialised warn too? Or at least, document that this
case is not warned about? We shouldn't be too hasty to close bugs.
Neil.