diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/anon7.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/anon7.C | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/anon7.C b/gcc/testsuite/g++.old-deja/g++.other/anon7.C new file mode 100644 index 00000000000..ba624a059b5 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/anon7.C @@ -0,0 +1,24 @@ +// Build don't link: + +struct A { + union { + int a; // ERROR - conflicts with previous declaration + }; + int a; // ERROR - +}; + +struct B { + int b; // ERROR - conflicts with previous declaration + union { + int b; // ERROR - duplicate member + }; // ERROR - declaration of +}; + +struct C { + union { + int c; // ERROR - conflicts with previous declaration + }; + union { + int c; // ERROR - duplicate member + }; // ERROR - declaration of +}; |