This is the mail archive of the gcc-patches@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: Wmissing-base-class-initializer (PR7651 Define -Wextra strictly in terms of other warning flags)


"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


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