1 /* Copyright (C) 2002 Free Software Foundation, Inc.
3 Source: Neil Booth, 12 Feb 2002.
5 In the declaration of proc, x must be parsed as a typedef name (C99
6 6.7.5.3 p11. Also see C89 DR #009, which was erroneously omitted
7 from C99, and resubmitted as DR #249: if in a parameter
8 declaration, an identifier can be read as a typedef name or a
9 paramter name, it is read as a typedef name). */
11 /* { dg-do compile } */
15 int proc(int (x
)); /* x is a typedef, param to proc is a function. */
16 int proc2(int x
); /* x is an identifier, param is an int. */
18 /* Parameter to proc3 is unnamed, with type a function that returns
19 int and takes a single argument of type function with one int
20 parameter returning int. In particular, proc3 is not a function
21 that takes a parameter y that is a function with one int parameter
23 int proc3(int (y (x
)));
27 proc (proc2
); /* { dg-bogus "integer from pointer" } */
28 return proc3 (proc
); /* { dg-bogus "incompatible pointer type" } */