This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Wuninitializable-member (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: 29 Dec 2006 20:46:11 +0100
- Subject: Re: Wuninitializable-member (PR7651 Define -Wextra strictly in terms of other warning flags)
- References: <6c33472e0612291127r63f47ad9x9f335afad3009fa1@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 -Wuninitializable-member [*] takes over the warning for a
| non-static reference or non-static const member appearing in a class
| without constructor. The new option is enabled by -Wextra, so we keep
| the current behaviour but add the ability to enable/disable this
| individual warning.
Why -Wuninitializable-member?
I would think that -Wuninitialized should take over this.
A non-static uninitialized reference member is just a time-bomb for
the majority of the cases.
Also, as finer grained diagnostic control are being introduced, we
should strive for concise notation (we don't want to degenerate to
numerics or some other hierophyphic notation) but we should make sure
command lines don't become terrific (even though we expect people to
move to Makefiles or fancy IDEs).
-- Gaby