diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/other/anon2.C')
-rw-r--r-- | gcc/testsuite/g++.dg/other/anon2.C | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/other/anon2.C b/gcc/testsuite/g++.dg/other/anon2.C new file mode 100644 index 000000000..98d8c2065 --- /dev/null +++ b/gcc/testsuite/g++.dg/other/anon2.C @@ -0,0 +1,22 @@ +// Test that we can have an unnamed struct inside an anonymous union. + +struct A +{ + union + { + struct { int i; } foo; + }; +}; + +static union +{ + struct { int i; } foo; +}; + +int main () +{ + union + { + struct { int i; } bar; + }; +} |