c++/924: -Wuninitialized does not seem to warn on uninitialize class members.

Neil Booth neil@daikokuya.co.uk
Sun Nov 10 12:56:00 GMT 2002


The following reply was made to PR c++/924; it has been noted by GNATS.

From: Neil Booth <neil@daikokuya.co.uk>
To: bangerth@dealii.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
	mdejong@redhat.com, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: c++/924: -Wuninitialized does not seem to warn on uninitialize class members.
Date: Sun, 10 Nov 2002 20:51:01 +0000

 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.



More information about the Gcc-prs mailing list