aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.old-deja/g++.bugs/891229_02.C
blob: d91987bdf18d6b44c12b4efbdeecf595aa27b159 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// { dg-do assemble  }
// g++ 1.36.1 bug 891229_02

// g++ limits the scope of names which are declared as typedef names within
// another type to that other type.

// This conflicts with the (global) scope given to such names by cfront 2.0.

// Cfront 2.0 passes this test.

// Note 2/15/94:  The standard has changed; this limiting of scope is correct
// behavior.  See 9.9.  --jason

// keywords: typedef, nested types, scope

struct foo {
	foo ();
	typedef void (*function_p) (void);
};

function_p fp;		// { dg-error "" } no such type in scope

foo::foo () {}

int main () { return 0; }