2 /* { dg-do compile } */
3 /* { dg-options "-Wc++-compat -Wpedantic" } */
7 extern void foo_E (enum E1
);
8 extern void foo_v (void *p
);
9 extern void foo_sc (int, int, signed char *);
10 extern unsigned char *uc
;
11 extern signed char sc
;
12 extern const signed char *csc
;
19 const void (*ffp
)(void);
20 foo_v (fp
); /* { dg-warning "10:ISO C forbids passing argument" } */
21 foo_E (B
); /* { dg-warning "10:enum conversion when passing argument" } */
22 foo_sc (1, 2, uc
); /* { dg-warning "17:pointer targets in passing argument" } */
23 foo_sc (1, 2, f
); /* { dg-warning "17:passing argument" } */
24 foo_sc (1, 2, sc
); /* { dg-warning "17:passing argument" } */
25 foo_sc (uc
, 2, &sc
); /* { dg-warning "11:passing argument" } */
26 foo_sc (1, 2, csc
); /* { dg-warning "17:passing argument" } */
29 typedef void (*fp
)(void);
30 typedef void (*nrfp
)(void) __attribute__((noreturn
));
31 void f1 (nrfp
); void f2 (fp x
) { f1 (x
); } extern int e
; /* { dg-warning "38:passing argument" } */