Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.bugs/891230_01.C

raw
1 // { dg-do run }
2 // g++ 1.36.1 bug 891230_01
3
4 // g++ gives typedefs which are nested within class declarations a scope
5 // which is local to the class declaration itself. This causes examples
6 // like the following to get compile-time errors.
7
8 // Cfront 2.0 passes this test.
9
10 // keywords: typedef, nested types, scope
11
12 struct foo {
13
14 typedef foo* foo_p;
15 void member (foo_p);
16 };
17
18 void foo::member (foo_p p) { // { dg-bogus "" } s
19 }
20
21 int main () { return 0; }