[Patch] PR55189 enable -Wreturn-type by default
Sylvestre Ledru
sylvestre@debian.org
Wed Aug 20 21:42:00 GMT 2014
On 20/08/2014 00:02, Joseph S. Myers wrote:
> On Fri, 15 Aug 2014, Sylvestre Ledru wrote:
>
>> It is indeed useless. I removed it. Thanks
>> http://sylvestre.ledru.info/0001-Enable-warning-Wreturn-type-by-default.patch
> I don't think most of the testsuite changes in this patch should be
> needed, and we should be conservative about changing existing testcases
> because of the risk that it affects what they test. Most of the changes
> seem like they would only have been relevant for the previous version that
> enabled -Wmissing-return warnings by default.
>
> The change to gcc.dg/c90-impl-int-1.c is simply wrong - the specific point
> of that testcase is to test various cases of implicit int, so you can't
> add explicit int return types to it.
>
> You need, obviously, the new tests for how -W(no-)missing-return and
> -W(no-)return-type work and what the defaults are. Existing tests should
> only need to be changed if they do in fact fail with the compiler patch
> applied.
>
Thanks for the feedback.
I updated the patch (including the gcc.dg/c90-impl-int-1.c change):
http://sylvestre.ledru.info/0001-Enable-warning-Wreturn-type-by-default.patch
For information, the number of files modified by this commit dropped
from 1298 to 818.
Thanks,
Sylvestre
More information about the Gcc-patches
mailing list