This is the mail archive of the
gcc-help@gcc.gnu.org
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: <359fcc390711041605kd46dcc7s5b6c6215447d4af@mail.gmail.com> <C3546BF4.269C3%eljay@adobe.com>
- Reply-to: Miles Bader <miles at gnu dot org>
John Love-Jensen <eljay@adobe.com> 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"[1]), but others seem
useful enough (e.g. "Have `operator=' return a reference to `*this'").
[1] 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.
-Miles
--
Yo mama's so fat when she gets on an elevator it HAS to go down.