gcc/testsuite/g++.old-deja/g++.ns/type2.C
raw| 1 | // { dg-do assemble } |
| 2 | // |
| 3 | // Copyright (C) 2001 Free Software Foundation, Inc. |
| 4 | // Contributed by Nathan Sidwell 11 April 2001 <[email protected]> |
| 5 | // Origin:[email protected] |
| 6 | |
| 7 | // Bug 2125. TYPE_DECLS never had their DECL_CONTEXT set, which |
| 8 | // confused forward references to classes. |
| 9 | |
| 10 | typedef void T; |
| 11 | namespace A { |
| 12 | class C; |
| 13 | typedef class C C; |
| 14 | typedef int T; |
| 15 | class C |
| 16 | { |
| 17 | T i; // got bogus error, found wrong T |
| 18 | }; |
| 19 | } |