This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch] PR55189 enable -Wreturn-type by default
- From: Sylvestre Ledru <sylvestre at debian dot org>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Jason Merrill <jason at redhat dot com>
- Date: Mon, 11 Aug 2014 09:44:11 +0200
- Subject: Re: [Patch] PR55189 enable -Wreturn-type by default
- Authentication-results: sourceware.org; auth=none
- References: <538F7856 dot 1090104 at debian dot org> <Pine dot LNX dot 4 dot 64 dot 1406042321130 dot 2874 at digraph dot polyomino dot org dot uk> <53903961 dot 9030501 at debian dot org> <Pine dot LNX dot 4 dot 64 dot 1406051749260 dot 2819 at digraph dot polyomino dot org dot uk> <53A07226 dot 4040803 at debian dot org> <Pine dot LNX dot 4 dot 64 dot 1406171712280 dot 23412 at digraph dot polyomino dot org dot uk> <53A07CCC dot 2030004 at debian dot org> <Pine dot LNX dot 4 dot 64 dot 1406171739550 dot 23412 at digraph dot polyomino dot org dot uk> <53BAD646 dot 7020102 at debian dot org> <Pine dot LNX dot 4 dot 64 dot 1407302205070 dot 3490 at digraph dot polyomino dot org dot uk>
On 31/07/2014 00:08, Joseph S. Myers wrote:
> On Mon, 7 Jul 2014, Sylvestre Ledru wrote:
>
>> Hello,
>>
>> On 17/06/2014 19:41, Joseph S. Myers wrote:
>>> On Tue, 17 Jun 2014, Sylvestre Ledru wrote:
>>>
>>>> OK. I will do that.
>>>> We should test the following:
>>>> * default => run just -Wreturn-type
>>>> * -Wreturn-type => Run both
>>>> * -Wreturn-type + -Wmissing-return => Run both
>>>> * -Wno-return-type + -Wmissing-return => Run just the second one
>>>> * -Wno-return-type + -Wno-missing-return => Run none
>>>> Do you see any other?
>>> That looks like the right things to test, if there are no changes for
>>> anything other than those options.
>> Here it is:
>> https://github.com/sylvestre/gcc/commit/db8aaac91aa09fd1ec1cc8974586aec45a221e71
>>
>> Is that what you expected?
> The test Wmissing-return2.c only has one of the two warnings. But as per
> "-Wreturn-type => Run both", and for backwards compatibility with the
> existing definition of -Wreturn-type, both warnings should appear for this
> test.
Make sense. Thanks for the feedback and the help.
Here it is:
https://github.com/sylvestre/gcc/commit/089ffc9fb85034111b892ee10190dc12b5dbe551
> (It's simply that only a subset of -Wreturn-type seems suitable to
> enable by default for C. Maybe the default subset, -Wreturn-type
> -Wno-missing-return (which is a combination that should also be included
> in the testcases), should have its own option name, although I don't know
> what that would be.)
>
What about implementing that in an further commit?
I have touched more than 1200 test files and I would like to see that
merged soon to avoid more conflicts.
By the way, do you prefer a single commit for all tests or one per
directory (gfortran, C++, gcc, OpenMP) ?
Thanks
Sylvestre