[Patch] PR55189 enable -Wreturn-type by default

Jason Merrill jason@redhat.com
Thu Jan 16 19:44:00 GMT 2014


My preference would be to turn -Wreturn-type on by default, but not 
create the separate -Wmissing-return flag.  As I argued in 2002, there 
should only be one flag.

To avoid spurious warnings on code with infinite loops we could add a 
simple check for infinite loops and suppress the warning in that case. 
Basically, if we see a loop with an always-true condition and no breaks.

Jason



More information about the Gcc-patches mailing list