Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.jason/typeck.C

raw
1 // { dg-do assemble }
2 // Bug: g++ fails to catch incompatibilities in the parameter lists when
3 // assigning.
4
5 typedef struct S *type_p;
6 typedef struct S const *ctype_p;
7
8 typedef ctype_p (*PF) (int);
9
10 type_p callee (type_p arg) { return 0; }
11
12 void foobar ()
13 {
14 static PF p = callee; // { dg-error "" }
15
16 p = callee; // { dg-error "" }
17 }
18
19 PF pp = callee; // { dg-error "" }