This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR 40752: -Wconversion generates false warnings for operands not larger than target type
- From: Manuel López-Ibáñez <lopezibanez at gmail dot com>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>, Gcc Patch List <gcc-patches at gcc dot gnu dot org>, Ian Lance Taylor <iant at google dot com>
- Date: Wed, 9 May 2012 15:39:59 +0200
- Subject: Re: PR 40752: -Wconversion generates false warnings for operands not larger than target type
- References: <6c33472e0907211554o743845e6p3d05114274c526ab@mail.gmail.com> <6c33472e0908101650v5a1b829cp835c0f816e6cd8da@mail.gmail.com> <Pine.LNX.4.64.0908102358530.2744@digraph.polyomino.org.uk> <AANLkTikFxusN2nZhfwvMzkndp42ebvu1_ghBqcCA0I_6@mail.gmail.com> <4FA7E1CA.3040604@oracle.com> <CAESRpQALycXE5TSd+cwZn+j8qyHZ4pukx=nxDVFczBPqxguyvA@mail.gmail.com> <4FAA6F6F.7010903@oracle.com>
On 9 May 2012 15:21, Paolo Carlini <paolo.carlini@oracle.com> wrote:
> Good, I even have a patch essentially ready for that, but can you point me
> to that detailed feedback? I couldn't find it when I looked for it.
This is how I understood the following paragraph:
>>>>> I still think the warnings for these cases are mostly correct (there
>>>>> are
>>>>> cases where you may be able to make deductions about the range of
>>>>> possible
>>>>> values of the expression being converted) and appropriate, and if
>>>>> disabled
>>>>> should be disabled under some separate -Wno-conversion-whatever option.
That is,
cases where you not are able to make a deduction about ranges => the
warnings are appropriate and should be disabled only under a separate
option.
cases where you are able to deduce the ranges => warning is not appropriate
But I may have misinterpreted it.
Cheers,
Manuel.
>
> Thanks
> Paolo.