2 /* { dg-do compile } */
3 /* { dg-options "-fpermissive -Wc++-compat -Wpointer-sign -Wpedantic" } */
11 return 0; /* { dg-warning "10:enum conversion from 'int' to 'enum e' in return" } */
17 return s
; /* { dg-error "10:incompatible types when returning" } */
23 return 3; /* { dg-warning "10:in function returning void" } */
29 return a
; /* { dg-warning "10:returning 'int \\*' from a function with return type 'int' makes integer from pointer without a cast" } */
35 return a
; /* { dg-warning "10:returning 'int' from a function with return type 'int \\*' makes pointer from integer without a cast" } */
41 return i
; /* { dg-warning "10:pointer targets in returning 'int \\*' from a function with return type 'unsigned int \\*' differ" } */
45 fn7 (void (*fp
) (void))
47 return fp
; /* { dg-warning "10:ISO C forbids return between function pointer" } */