diff options
author | Joseph Myers <joseph@codesourcery.com> | 2006-09-30 20:46:06 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2006-09-30 20:46:06 +0100 |
commit | 7ed322d7b5f0b66806d3c3185511a93d8a98e969 (patch) | |
tree | e7f9e9ef9055bb20c3907865efd402c942dc4871 /gcc/c.opt | |
parent | 19add4f7e416da5706eb0e0a0cbbd980a74f4b86 (diff) | |
download | gcc-7ed322d7b5f0b66806d3c3185511a93d8a98e969.zip gcc-7ed322d7b5f0b66806d3c3185511a93d8a98e969.tar.gz gcc-7ed322d7b5f0b66806d3c3185511a93d8a98e969.tar.bz2 |
re PR c/24010 (Duplicate C99 dot initializer warning missing)
PR c/24010
* c.opt (Woverride-init): New.
* c-opts.c (c_common_post_options): Default warn_override_init to
extra_warnings.
* c-typeck.c (add_pending_init, output_init_element): Warn for
overriding initializers without side effects.
* doc/invoke.texi (-Woverride-init): Document.
(-Wextra): Update.
testsuite:
* gcc.dg/Woverride-init-1.c, gcc.dg/Woverride-init-2.c,
gcc.dg/Woverride-init-3.c: New tests.
From-SVN: r117334
Diffstat (limited to 'gcc/c.opt')
-rw-r--r-- | gcc/c.opt | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -319,6 +319,10 @@ Woverloaded-virtual C++ ObjC++ Var(warn_overloaded_virtual) Warn about overloaded virtual function names +Woverride-init +C ObjC Var(warn_override_init) Init(-1) +Warn about overriding initializers without side effects + Wparentheses C ObjC C++ ObjC++ Var(warn_parentheses) Warn about possibly missing parentheses |