diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/init')
-rw-r--r-- | gcc/testsuite/g++.dg/init/array21.C | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/init/array32.C | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/testsuite/g++.dg/init/array21.C b/gcc/testsuite/g++.dg/init/array21.C index f41ce86b1d9..5438af1d477 100644 --- a/gcc/testsuite/g++.dg/init/array21.C +++ b/gcc/testsuite/g++.dg/init/array21.C @@ -2,6 +2,6 @@ void foo() { - const int x[] = 0; // { dg-error "size" } + const int x[] = 0; // { dg-error "initializer" } ++x; } diff --git a/gcc/testsuite/g++.dg/init/array32.C b/gcc/testsuite/g++.dg/init/array32.C new file mode 100644 index 00000000000..06b27a94a8a --- /dev/null +++ b/gcc/testsuite/g++.dg/init/array32.C @@ -0,0 +1,7 @@ +// PR c++/42315 + +extern int x[]; + +int i = x[0]; + +int x[] = 0; // { dg-error "" } |