This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]