* gcc.dg/i386-fpcvt-1.c: New test.
[official-gcc.git] / gcc / testsuite / gcc.dg / decl-1.c
blobbfbc9fb5326ad11d7a02d35a1b55d05220fa9ae3
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 ommitted
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 } */
13 typedef int x;
14 typedef int y;
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
22 returning int. 8-) */
23 int proc3(int (y (x)));
25 int main ()
27 proc (proc2); /* { dg-bogus "integer from pointer" } */
28 return proc3 (proc); /* { dg-bogus "incompatible pointer type" } */