aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/other
diff options
context:
space:
mode:
authoraustern <austern@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-21 17:24:44 +0000
committeraustern <austern@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-21 17:24:44 +0000
commit64ab1bb300268a8ba4fba704b2da1e162577e50d (patch)
treeb2e9cdb17584c9a96c270f5e1bcf17953905af86 /gcc/testsuite/g++.dg/other
parentf3f795548f5860fdf265cda46045425567e66ea4 (diff)
PR c++/15049
* cp/decl.c (grokvardecl): Accept declarations of global variables using anonymous types. * testsuite/g++.dg/other/anon3.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87814 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.dg/other')
-rw-r--r--gcc/testsuite/g++.dg/other/anon3.C7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/other/anon3.C b/gcc/testsuite/g++.dg/other/anon3.C
new file mode 100644
index 00000000000..87cbfb544cd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/anon3.C
@@ -0,0 +1,7 @@
+// pr c++/15049
+// Origin: Matt Austern <austern@apple.com>
+// Test that we can declare a global variable whose type is anonymous.
+
+// { dg-do compile }
+
+enum { a = 3 } x;