summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/typedef5.C
blob: d8f74aee938bc7e13426e7e4f5c9e85e7f933dc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Build don't link:

// by Alexandre Oliva <oliva@dcc.unicamp.br>

typedef int t;
typedef t* u;
typedef u v;
typedef v* (*w)(t);
typedef int t;
typedef t* u;
typedef u v;
typedef v* (*w)(t const); // this is ok
typedef v* (*w)(t); // ERROR - covers message `previously declared here'
typedef v* (*const w)(t); // ERROR - invalid redeclaration
typedef v const* (*w)(t); // ERROR - invalid redeclaration
typedef v* const (*w)(t); // ERROR - invalid redeclaration