Wmissing-base-class-initializer (PR7651 Define -Wextra strictly in terms of other warning flags)

Gabriel Dos Reis gdr@integrable-solutions.net
Tue Jan 9 22:13:00 GMT 2007


"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.

I'm looking into this.

I would like to re-state a general concern I have made when reviewing
some of your patches.

Yes, -Wextra should be split into sub-options.  No, we should not end
up with a situation where there is a one-to-one and onto mapping
between the -W options and any single diagnostic message we spit.  If we
arrive there, then we have failed to properly keep our user interface
from leaking implementation details (that may vary over releases).

-Wextra should be split into *logical* subsets.  I fully appreciate
the task is hard, but if we review only one option at a time, we may
very well miss the picture and end up leaking implementation detail
information.  One way to do that is that we have a summary of the kind
of messages currently controlled by -Wextra.

I'm not saying this particular patch does that; I'm just expressing a
general concern I've already expressed when reviewing some of the
"break out" patches.

I'll get back to this patch in a moment.

-- Gaby



More information about the Gcc-patches mailing list