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] |
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.
Bootstrapped and regression tested with --enable-languages=all on i686-pc-linux-gnu.
[*] Don't be afraid to say that the name sucks, if it does. However, in such case, please, suggest an alternative.
PR middle-end/7651 * c.opt (Wuninitializable-member): New. * doc/invoke.texi (Wuninitializable-member): Document it. (Wextra): Enabled by -Wextra. (C++ Language Options): Add it. * c-opts.c (c_common_post_options): Enabled by -Wextra.
cp/ 2006-12-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR middle-end/7651 * class.c (check_field_decls): Replace Wextra with Wuninitializable-member.
testsuite/ 2006-12-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR middle-end/7651 * g++.dg/warn/Wuninitializable-member.C: New. * g++.dg/warn/Wuninitializable-member-Wextra.C: New. * g++.dg/warn/Wuninitializable-member-no.C: New.
Attachment:
wuninitializable-member.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |