This is the mail archive of the gcc-help@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: 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


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