This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: c/9072: -Wconversion should be split into two distinct flags
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Segher Boessenkool <segher at koffie dot nl>
- Cc: 128950 at bugs dot debian dot org, gcc-patches at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org, debian-gcc at lists dot debian dot org
- Date: Sun, 29 Dec 2002 01:05:43 -0800
- Subject: Re: c/9072: -Wconversion should be split into two distinct flags
- References: <E18S3wH-0003k0-00@tango.net.local> <3E0DD7BA.548AF30C@koffie.nl><87r8c1cja1.fsf@egil.codesourcery.com> <3E0EB6C3.B8868471@koffie.nl>
Segher Boessenkool <segher@koffie.nl> writes:
> Zack Weinberg wrote:
>>
>> I'm very much in favor of making -Wconversion more useful, but is
>> there any reason not to shift the argument-type-conversion warnings
>> entirely over to -Wtraditional? Particularly if the warning is
>> avoided for prototypes in system headers (so that 'sinf' and the like
>> raise no complaints) -- this would, for instance, catch the occasional
>> problem we have with arguments of type 'bool' in GCC itself.
>>
>> Then -Wconversion would be entirely for dubious type conversions on
>> assignment.
>
> This is the intended behaviour of my patch, modulo in my opinion passing
> a "too wide" argument to a function is a dubious assignment, too.
I may have misunderstood the effect of your patch - it seemed like you
would need to give both -Wconversion and -Wtraditional to get the
argument-type conversion warnings. I was suggesting that this should
happen with just -Wtraditional.
zw