]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR c/40563 (-Wc++-compat does not warn about uninitialized const field in struct)
authorShujing Zhao <pearly.zhao@oracle.com>
Tue, 17 Aug 2010 08:25:20 +0000 (08:25 +0000)
committerShujing Zhao <pzhao@gcc.gnu.org>
Tue, 17 Aug 2010 08:25:20 +0000 (08:25 +0000)
commit51f4ec666943c03673484c21f621e1034550e4df
treeb2173160d60dbebd4e1f80ea7c24c0016432cdc3
parent571d54deb6edc944f1e9f361302b2fa99b568d64
re PR c/40563 (-Wc++-compat does not warn about uninitialized const field in struct)

/gcc
2010-08-17  Shujing Zhao  <pearly.zhao@oracle.com>

        PR c/40563
* c-decl.c (diagnose_uninitialized_cst_member): New function.
(finish_decl): Use it to issue a -Wc++-compat warning about
uninitialized const field in struct or union.

(finish_struct): Use strip_array_types.

/gcc/testsuite
2010-08-17  Shujing Zhao  <pearly.zhao@oracle.com>

PR c/40563
* gcc.dg/Wcxx-compat-20.c: New test.

From-SVN: r163296
gcc/ChangeLog
gcc/c-decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/Wcxx-compat-20.c [new file with mode: 0644]