diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/other/bitfield3.C')
-rw-r--r-- | gcc/testsuite/g++.dg/other/bitfield3.C | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/other/bitfield3.C b/gcc/testsuite/g++.dg/other/bitfield3.C new file mode 100644 index 000000000..befd7f817 --- /dev/null +++ b/gcc/testsuite/g++.dg/other/bitfield3.C @@ -0,0 +1,19 @@ +// PR c++/33841 +// { dg-do compile } + +template<int> struct A +{ + // multiple errors below: missing semicolon, no anonymous structs, etc. + struct {} : 2; // { dg-error "" } +}; + +template<int> struct B +{ + int a; + // multiple errors below: missing semicolon, no anonymous structs, etc. + struct {} : 2; // { dg-error "" } + int b; +}; + +struct C : A<0> {}; +struct D : B<0> {}; |