Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.other/lookup16.C

raw
1 // { dg-do assemble }
2 // Copyright (C) 1999 Free Software Foundation, Inc.
3 // Contributed by Nathan Sidwell 25 Aug 1999 <[email protected]>
4
5 // Bug 3
6 // typenames are not injected early enough, [basic.scope.pdecl]3.3.1/4
7 // indicates this should compile.
8
9 struct A {
10 };
11
12 struct B : A {
13 typedef A Parent;
14 struct F {
15 };
16 };
17
18 struct C : B {
19 typedef B Parent;
20 struct G {};
21 struct F : C::Parent::F {
22 typedef C::Parent::F Parent;
23 };
24 };
25
26 struct D : B {
27 typedef B Parent;
28 struct F : D::Parent::F { // finds the wrong Parent
29 typedef D::Parent::F Parent;
30 };
31 };