[PATCH, PR 53001] Re: Patch to split out new warning flag for floating point conversion

Manuel López-Ibáñez lopezibanez@gmail.com
Wed Nov 20 09:43:00 GMT 2013


I committed this as revision 205090 on behalf of Joshua.

Cheers,

Manuel.

On 15 November 2013 05:15, Joshua J Cogliati <jrincayc@yahoo.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> The patch is the same as before (but for newer revision 204343 so line
> numbers are a bit different), but the copyright assignment has been
> sorted out and the changelog has been modified as discussed by Dodji
> Seketeli.  I think it is ready to be applied.  Thanks for all the
> comments and suggestions.
>
> For gcc/c-family/ChangeLog:
>
>         PR c/53001
>         Splitting out a -Wfloat-conversion from -Wconversion for
>         conversions that lower floating point number precision
>         or conversion from floating point numbers to integers
>         * c-common.c (unsafe_conversion_p): Make this function
>         return an enumeration with more detail.
>         (conversion_warning): Use the new return type of
>         unsafe_conversion_p to separately warn either about conversions
>         that lower floating point number precision or about the other
>         kinds of conversions.
>         * c-common.h (enum conversion_safety): New enumeration.
>         (unsafe_conversion_p): switching return type to
>         conversion_safety enumeration.
>         * c.opt: Adding new warning float-conversion and
>         enabling it -Wconversion
>
> For gcc/ChangeLog:
>
>         PR c/53001
>         Splitting out a -Wfloat-conversion from -Wconversion for
>         conversions that lower floating point number precision
>         or conversion from floating point numbers to integers
>         * doc/invoke.texi: Adding documentation about
>         -Wfloat-conversion
>
> For gcc/testsuite/ChangeLog
>
>         PR c/53001
>         Splitting out a -Wfloat-conversion from -Wconversion for
>         conversions that lower floating point number precision
>         or conversion from floating point numbers to integers
>         * c-c++-common/Wfloat-conversion.c: Copies relevant
>         tests from c-c++-common/Wconversion-real.c,
>         gcc.dg/Wconversion-real-integer.c and gcc.dg/pr35635.c into
>         new testcase for conversions that are warned about by
>         -Wfloat-conversion
>
> On 11/05/2013 05:12 AM, Dodji Seketeli wrote:
>> Sorry for my late reply on this.
>>
>> I just have one very small nit for one ChangeLog entry, expressed
>> below.  If nobody objects in the next 48 hours, I'd say this is OK
>> to commit with the nit fixed.
>>
>> I am not seeing your name in the MAINTAINERS file.  Have you filed
>> copyright assignment to the FSF and do you have it all sorted?
>>
>> Joshua J Cogliati <jrincayc@yahoo.com> writes:
>>
>>> Since part of it was to go into c-family (as per Joseph S.
>>> Myers's email) and parts are not in c-family, I split the
>>> changelog into three parts.   I also changed the formatting of
>>> the changelog and patch as per Dodji's comments. The attached
>>> patch is the same as before, but the diff for Wfloat-conversion.c
>>> is as a new file, not as a copy of Wconversion-real.c.  Thanks
>>> for reviewing it.  If there is anything else that needs changing,
>>> please tell me.
>>>
>>>
>>> For gcc/c-family/ChangeLog:
>>>
>>> PR c/53001 Splitting out a -Wfloat-conversion from -Wconversion
>>> for conversions that lower floating point number precision or
>>> conversion from floating point numbers to integers * c-common.c
>>> (unsafe_conversion_p): Make this function return an enumeration
>>> with more detail.
>>
>> This is nicely formatted now, thank you.
>>
>>> (conversion_warning): Use the new return type of
>>> unsafe_conversion_p to separately warn either about conversions
>>> that lower floating point number precision or about the other
>>> kinds of conversions. * c-common.h: Adding conversion_safety
>>> enumeration. (unsafe_conversion_p): switching return type to
>>> conversion_safety enumeration.
>>
>> Here, this should be:
>>
>> * c-common.h (enum conversion_safety): New enumeration.
>> (unsafe_conversion_p): switching return type to conversion_safety
>> enumeration.
>>
>> OK to commit with the above changes, if you have your copyright
>> properly assigned to the FSF.
>>
>> Thank for working on this.  It is appreciated.
>>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.15 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQEcBAEBAgAGBQJShh6BAAoJEFeOW05LP1faRt8H/iDxkB+KafIoVoBVuL/XinOc
> WhMvD+jV/fZFHey/O3WBCBPWeKP/5Gyvf+Z9YnioAnc3xAkil/SqMYDRKW+4obnJ
> x6XqeOHaq5TX0LLIhUDXX3TQWHYEzHTRmowqsedONUVz2nIsPoF52Q09wijsjXKq
> isllMKYj8TEVYTVN0NrlbhkkmG/6w+0NmSUuoDViHIdl/fX728CxpzgVzJLxjMQb
> wPNidbmeFomoTblM+imjc2vdqn+wiTwWY74gxV8oywv/J6otMfEodVSQcAQCSAyJ
> MvEhUFPHG+Ptt2KKPJVnAusUnm8TBdnrPV78uvtexGOW2mLMXR2YkdP/iAhmmgs=
> =M4aL
> -----END PGP SIGNATURE-----



More information about the Gcc-patches mailing list