On 11 April 2016 at 20:09, Prasad Ghangal <prasad.ghan...@gmail.com> wrote: > > Hi! > > This is proposed patch for > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48116 (-Wreturn-type does > not work as advertised) > > Currently gcc doesn't give any warning with -Wreturn-type or -Wall > option for test cases like : > > void x (void) { } > void y(void) { return x(); } > > > applying this patch gives: > > $gcc foo.c -S -Wreturn-type > foo.c: In function ‘y’: > foo.c:2:23: warning: ISO C forbids ‘return’ with expression, in > function returning void [-Wreturn-type] > void y(void) { return x(); } > ^~~ > foo.c:2:6: note: declared here > void y(void) { return x(); } > ^ > > $gcc foo.c -S -Wall > foo.c: In function ‘y’: > foo.c:2:23: warning: ISO C forbids ‘return’ with expression, in > function returning void [-Wreturn-type] > void y(void) { return x(); } > ^~~ > foo.c:2:6: note: declared here > void y(void) { return x(); } > ^ > > $gcc foo.c -S -pedantic > foo.c: In function ‘y’: > foo.c:2:23: warning: ISO C forbids ‘return’ with expression, in > function returning void [-Wpedantic] > void y(void) { return x(); } > ^~~ > foo.c:2:6: note: declared here > void y(void) { return x(); } > ^ > > > I have fully bootstrapped and tested on x86_64-pc-linux. > > > > Thanks, > Prasad Ghangal
*PING* https://gcc.gnu.org/ml/gcc-patches/2016-04/msg00474.html Is this patch OK for gcc 7? Thanks, Prasad Ghangal