diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2013-05-24 10:05:22 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2013-05-24 10:05:22 +0000 |
commit | 99b8202a118ba0ab7eaaa21f83581998d7bcdc6f (patch) | |
tree | d4862268e3e15e9009de8f6be540ef2f1f9db56c /gcc | |
parent | df09b22cf9e06a2b1c429161297c7c0ac1d5f194 (diff) | |
download | gcc-99b8202a118ba0ab7eaaa21f83581998d7bcdc6f.zip gcc-99b8202a118ba0ab7eaaa21f83581998d7bcdc6f.tar.gz gcc-99b8202a118ba0ab7eaaa21f83581998d7bcdc6f.tar.bz2 |
re PR c++/26572 (Invalid local class definition not diagnosed)
2013-05-24 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/26572
* g++.dg/template/error51.C: New.
2013-05-24 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/25503
* g++.dg/template/bitfield2.C: New.
From-SVN: r199288
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/template/bitfield2.C | 16 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/template/error51.C | 9 |
3 files changed, 35 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b8455ce..bb3b499 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2013-05-24 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/26572 + * g++.dg/template/error51.C: New. + +2013-05-24 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/25503 + * g++.dg/template/bitfield2.C: New. + 2013-05-24 Eric Botcazou <ebotcazou@adacore.com> * gnat.dg/specs/noinline1.ads: New test. diff --git a/gcc/testsuite/g++.dg/template/bitfield2.C b/gcc/testsuite/g++.dg/template/bitfield2.C new file mode 100644 index 0000000..e9a5320 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/bitfield2.C @@ -0,0 +1,16 @@ +// PR c++/25503 + +template<int N> +struct Test +{ + Test() + { + typedef struct StaticAssert {unsigned condition : (N); } XXX; // { dg-error "zero width" } + } +}; + +int +main() +{ + Test<0> T; +} diff --git a/gcc/testsuite/g++.dg/template/error51.C b/gcc/testsuite/g++.dg/template/error51.C new file mode 100644 index 0000000..b3a6cfb --- /dev/null +++ b/gcc/testsuite/g++.dg/template/error51.C @@ -0,0 +1,9 @@ +// PR c++/26572 + +template<int> void foo() +{ + struct A; // { dg-error "declaration" } + struct B : A {}; // { dg-error "invalid use of incomplete" } +} + +template void foo<0>(); |