gcc/testsuite/g++.old-deja/g++.other/typedef8.C
raw| 1 | // { dg-do assemble } |
| 2 | // |
| 3 | // Copyright (C) 2000 Free Software Foundation, Inc. |
| 4 | // Contributed by Nathan Sidwell 17 Aug 2000 <[email protected]> |
| 5 | |
| 6 | // bug 39. We'd generated bogus errors when using a typedef of a nested class. |
| 7 | |
| 8 | struct X1 |
| 9 | { |
| 10 | typedef struct { |
| 11 | } MyStruct1; |
| 12 | typedef struct M2 { |
| 13 | } MyStruct2; |
| 14 | }; |
| 15 | |
| 16 | X1::MyStruct1 foo() |
| 17 | { |
| 18 | X1::MyStruct1 m1; |
| 19 | return m1; |
| 20 | } |
| 21 | |
| 22 | X1::MyStruct2 baz() |
| 23 | { |
| 24 | X1::MyStruct2 m1; |
| 25 | return m1; |
| 26 | } |