This is the mail archive of the
mailing list for the GCC project.
Re: Effective c++ member initialization list spurious warning?
- From: Miles Bader <miles dot bader at necel dot com>
- To: John Love-Jensen <eljay at adobe dot com>
- Cc: James Tebneff <tebneff at gmail dot com>, MSX to GCC <gcc-help at gcc dot gnu dot org>
- Date: Wed, 07 Nov 2007 11:34:45 +0900
- Subject: Re: Effective c++ member initialization list spurious warning?
- References: <firstname.lastname@example.org> <C3546BF4.269C3email@example.com>
- Reply-to: Miles Bader <miles at gnu dot org>
John Love-Jensen <firstname.lastname@example.org> writes:
> (I don't use -Weffc++. I wish there was some finer granularity over which
> of the seven particular Effective C++ warnings are enabled.)
Indeed... some of the effc++ "rules", though they probably make sense as
general guidelines, seem downright silly when applied mechanically
(e.g. "Make destructors virtual in base classes"), but others seem
useful enough (e.g. "Have `operator=' return a reference to `*this'").
 This is a _good idea_ in many cases, but may not make much sense
when there are no other virtual methods and no data members in the
derived class, and the resulting addition of a vtable pointer and
overhead of calling a virtual destructor is often unacceptable.
Yo mama's so fat when she gets on an elevator it HAS to go down.