gcc/testsuite/gcc.dg/c11-unproto-3.c
raw| 1 | /* Test function declarations without prototypes for C11. */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-std=c11 -pedantic-errors" } */ |
| 4 | |
| 5 | void f1 (); |
| 6 | void |
| 7 | f1a (void) |
| 8 | { |
| 9 | f1 (1, 2); |
| 10 | } |
| 11 | |
| 12 | void f2 (); |
| 13 | void f2 (int); |
| 14 | |
| 15 | void f3 (); |
| 16 | |
| 17 | _Static_assert (_Generic (f3, |
| 18 | void (*) (int) : 1, |
| 19 | default : 3) == 1, "unprototyped test"); |