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: John Love-Jensen <eljay at adobe dot com>
- To: James Tebneff <tebneff at gmail dot com>, MSX to GCC <gcc-help at gcc dot gnu dot org>
- Date: Mon, 05 Nov 2007 06:43:00 -0600
- Subject: Re: Effective c++ member initialization list spurious warning?
Hi James,
> Given that msg is guaranteed to be initialized is this warning
> absolutely necessary?
If you are trying to abide by Effective C++ coding style suggestions (as
incorporated into GCC ala -Weffc++), the warning is "necessary".
In that enabling the warning is optional in the first place, the warning is
not "necessary". The -Weffc++ generates warnings about perfectly ISO 14882
compliant C++ code.
If you do not want to abide by GCC's warning facility regarding Effective
C++ coding style suggestions, then do not use -Weffc++.
(I don't use -Weffc++. I wish there was some finer granularity over which
of the seven particular Effective C++ warnings are enabled.)
HTH,
--Eljay