Debian Codegraph @

gcc/testsuite/g++.dg/lookup/typedef1.C

raw
1 // PR c++/33516
2 // { dg-do compile }
3
4 struct S1;
5 typedef S1 T1;
6 struct S1 {
7 typedef int U;
8 T1::U i;
9 };
10 struct S2;
11 typedef S2 T2;
12 struct S2 {
13 typedef int U;
14 };
15 T2::U j;
16 struct S3;
17 typedef S3 T3;
18 struct S3 {
19 typedef int U;
20 S3::U i;
21 };
22
23 void
24 foo ()
25 {
26 S1 s1;
27 S2 s2;
28 S3 s3;
29 s1.i = 6;
30 j = 7;
31 s3.i = 8;
32 }