diff options
author | Ian Lance Taylor <iant@google.com> | 2009-06-19 15:32:43 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2009-06-19 15:32:43 +0000 |
commit | 642324bb16ffe88f0aa81c4ced9bdc1ba63471ab (patch) | |
tree | fe9acae7789cd322367a02a4039509a1a001b489 /gcc/testsuite | |
parent | dc491a250a946a50bdea3813e9f1f67d368e348b (diff) | |
download | gcc-642324bb16ffe88f0aa81c4ced9bdc1ba63471ab.zip gcc-642324bb16ffe88f0aa81c4ced9bdc1ba63471ab.tar.gz gcc-642324bb16ffe88f0aa81c4ced9bdc1ba63471ab.tar.bz2 |
ggc-page.c (ggc_pch_write_object): Initialize emptyBytes.
./: * ggc-page.c (ggc_pch_write_object): Initialize emptyBytes.
* sdbout.c (sdb_debug_hooks): Initialize non-SDB_DEBUGGING_INFO
version.
* c-decl.c (finish_decl): If -Wc++-compat, warn about
uninitialized const.
testsuite/:
* gcc.dg/Wcxx-compat-17.c: New testcase.
From-SVN: r148710
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/Wcxx-compat-17.c | 21 |
2 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index db6c860..fec4369 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2009-06-19 Ian Lance Taylor <iant@google.com> + * gcc.dg/Wcxx-compat-17.c: New testcase. + +2009-06-19 Ian Lance Taylor <iant@google.com> + * gcc.dg/Wcxx-compat-15.c: New testcase. 2009-06-19 Ian Lance Taylor <iant@google.com> diff --git a/gcc/testsuite/gcc.dg/Wcxx-compat-17.c b/gcc/testsuite/gcc.dg/Wcxx-compat-17.c new file mode 100644 index 0000000..78760d6 --- /dev/null +++ b/gcc/testsuite/gcc.dg/Wcxx-compat-17.c @@ -0,0 +1,21 @@ +/* { dg-do compile } */ +/* { dg-options "-Wc++-compat" } */ +const int v1; /* { dg-warning "invalid in C\[+\]\[+\]" } */ +const char * const v2; /* { dg-warning "invalid in C\[+\]\[+\]" } */ +struct s { int f1; int f2; }; +const struct s v3; /* { dg-warning "invalid in C\[+\]\[+\]" } */ +const int v4 = 1; +const char * const v5 = 0; +const struct s v6 = { 0, 0 }; +const struct s v7 = { 0 }; +void +f() +{ + const int v11; /* { dg-warning "invalid in C\[+\]\[+\]" } */ + const char * const v12; /* { dg-warning "invalid in C\[+\]\[+\]" } */ + const struct s v13; /* { dg-warning "invalid in C\[+\]\[+\]" } */ + const int v14 = 1; + const char * const v15 = 0; + const struct s v16 = { 0, 0 }; + const struct s v17 = { 0 }; +} |