summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/anon4.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/anon4.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/anon4.C16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/anon4.C b/gcc/testsuite/g++.old-deja/g++.other/anon4.C
new file mode 100644
index 000000000..2a01be3d0
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/anon4.C
@@ -0,0 +1,16 @@
+// { dg-do assemble }
+
+// Copyright (C) 1999 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 20 May 1999 <nathan@acm.org>
+
+// Anon unions cannot have user defined member functions
+// [class.union/2]. Make sure we spot that.
+
+
+struct A
+{
+ union
+ { // { dg-error "" } anon union cannot have member fns
+ void bad();
+ };
+};