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]

Re: feature suggestion/request


martin@mira.isdn.cs.tu-berlin.de writes:
> >   Would it be possible for egcs to produce a warning
> > 
> >     constructor Bla::Bla () might not initialize member variable k
> > 
> >   for this code?
> 
> How about
> 
> mira% g++ -Weffc++ a.cc 
> a.cc: In method `Bla::Bla()':
> a.cc:7: warning: `Bla::k' should be initialized in the member initialization list
> 

Great!  Could|Should this be switched on automatically if you issue -Wall? 

-- 

Han-Wen Nienhuys, hanwen@cs.uu.nl ** GNU LilyPond - The Music Typesetter 
      http://www.cs.uu.nl/people/hanwen/lilypond/index.html 


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