2018-04-09 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr29521-2.c
blob734652c90ca19d9aca4685421c20d95471c54a81
1 /* PR 29521 : warning for return with expression in function returning void */
2 /* { dg-do compile } */
3 /* { dg-options "-pedantic-errors" } */
5 void func (void) { }
7 void func2 (void)
9 return func (); /* { dg-error "ISO C forbids 'return' with expression" } */
12 void func3 (void)
14 return 1; /* { dg-error "'return' with a value" } */