On Tue, 17 Jun 2014, Sylvestre Ledru wrote: > On 05/06/2014 20:01, Joseph S. Myers wrote: > > > >> Initially, I implemented -Wmissing-return to manage this case ( > >> https://gcc.gnu.org/ml/gcc-patches/2014-01/msg00820.html ) but Jason > >> suggested to remove that: > >> https://gcc.gnu.org/ml/gcc-patches/2014-01/msg01033.html > >> (I don't have a strong opinion on the subject). > > I think splitting the option like that makes sense. Compatibility > > indicates that -Wreturn-type and -Wall should still enable > > -Wmissing-return, but only the other pieces of -Wreturn-type should be > > enabled by default, at least for C. (Enabling -Wimplicit-int by default > > might be a good starting point.) > OK. > As attachment, you will find a potential implementation. Is that what > you expect?
It would help a lot if it included testcases for what various options / option combinations do / do not enable. I expect that each option continues to enable the warnings it does at present (so if a user explicitly does -Wreturn-type it also enables the -Wmissing-return warnings, for example) - but some warnings would start to be enabled by default. If someone does e.g. -Wno-implicit that would disable the default -Wimplicit-int; if they do -Wno-implicit -Wimplicit that would have the same effect as just -Wimplicit (so keeping the default warnings enabled, and possibly enabling others). -- Joseph S. Myers jos...@codesourcery.com