re PR c++/30301 (Invalid static member of anonymous class or union diagnosed too...
authorJason Merrill <jason@gcc.gnu.org>
Wed, 26 Feb 2014 21:44:48 +0000 (16:44 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 26 Feb 2014 21:44:48 +0000 (16:44 -0500)
PR c++/30301
* g++.dg/parse/unnamed2.C: New.

From-SVN: r208185

gcc/testsuite/g++.dg/parse/unnamed2.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/parse/unnamed2.C b/gcc/testsuite/g++.dg/parse/unnamed2.C
new file mode 100644 (file)
index 0000000..d2b96f8
--- /dev/null
@@ -0,0 +1,6 @@
+// PR c++/30301
+
+template<int T> struct A
+{
+  union { static int i; };     // { dg-error "static data.*unnamed" }
+};