OSDN Git Service

2011-06-04 Jonathan Wakely <jwakely.gcc@gmail.com>
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 4 Jun 2011 16:11:41 +0000 (16:11 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 4 Jun 2011 16:11:41 +0000 (16:11 +0000)
PR c++/33840
* g++.dg/diagnostic/bitfld2.C: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174642 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/diagnostic/bitfld2.C [new file with mode: 0644]

index 483bffc..fb95911 100644 (file)
@@ -1,3 +1,8 @@
+2011-06-04  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+       PR c++/33840
+       * g++.dg/diagnostic/bitfld2.C: New.
+
 2011-06-04  Jakub Jelinek  <jakub@redhat.com>
 
        PR target/49281
diff --git a/gcc/testsuite/g++.dg/diagnostic/bitfld2.C b/gcc/testsuite/g++.dg/diagnostic/bitfld2.C
new file mode 100644 (file)
index 0000000..10b7d9c
--- /dev/null
@@ -0,0 +1,9 @@
+// PR c++/33840
+// { dg-do compile }
+
+template<int> struct A
+{
+  struct {} : 2;   // { dg-error "expected ';' after struct" }
+};
+// { dg-error "ISO C.. forbids declaration" "" { target *-*-* } 6 }
+// { dg-error "ISO C.. prohibits anonymous" "" { target *-*-* } 6 }