This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Wmissing-base-class-initializer (PR7651 Define -Wextra strictly in terms of other warning flags)
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Manuel López-Ibáñez <lopezibanez at gmail dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: 10 Jan 2007 03:37:01 +0100
- Subject: Re: Wmissing-base-class-initializer (PR7651 Define -Wextra strictly in terms of other warning flags)
- References: <6c33472e0701071303s1d476b45ke44b24caa131cb20@mail.gmail.com>
"Manuel López-Ibáñez" <lopezibanez@gmail.com> writes:
| :ADDPATCH C++:
|
| This patch continues the effort to fix PR7651 [1].
|
| A new option -Wmissing-base-class-initializer takes over the warning
| for a base class that is not initialized in a derived class' copy
| constructor. The new
| option is enabled by -Wextra, so we keep the current behaviour but add
| the ability to enable/disable this individual warning.
Any reason (except that the current implementation is that way) that
this should not part be part of -Wuninitialized?
Logically, what such a class does is to leave an object partially
copied or partially uninitialized -- where the uninitialized part is
the subobject not copied to.
I appreciate -Wuninitialized is documented to work only at n > 0 level
of optimization, but see recent related notes.
-- Gaby