libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / Wreturn-mismatch-2a.c
blob836651ed9257d94361706a5592e7163134533c67
1 /* { dg-do compile } */
2 /* { dg-options "-Wall" } */
4 void f1 (void);
6 int
7 f2 (void)
9 f1 ();
10 } /* { dg-warning "control reaches end of non-void\[^\n\r\]*-Wreturn-type" } */
12 static inline int
13 f3 (void)
15 f1 ();
16 } /* { dg-warning "no return statement in function\[^\n\r\]*-Wreturn-type" } */
18 void
19 f4 (void)
21 return 1; /* { dg-error "with a value,\[^\n\r\]*-Wreturn-mismatch" } */
24 void
25 f5 (void)
27 return f1 ();
30 int
31 f6 (void)
33 return; /* { dg-error "with no value,\[^\n\r\]*Wreturn-mismatch" } */
36 int
37 f7 (void)
39 return f1 (); /* { dg-error "void value not ignored as it ought to be" } */
40 } /* { dg-warning "control reaches end of non-void\[^\n\r\]*-Wreturn-type" } */