http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48116
Summary: -Wreturn-type does not work as advertised
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: [email protected]
ReportedBy: [email protected]
I'm using svn trunk gcc as of today.
-Wreturn-type is documented as:
[... warn] about a `return' statement with a expression
in a function whose return-type is `void'.
I tried it with this test case:
void x (void) { }
void y(void) { return x(); }
I expected a warning on the `return', but did not get one:
I used "gcc -Wreturn-type -O2 -c q.c"