This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, PR 53001] Re: Patch to split out new warning flag for floating point conversion
- From: Joshua J Cogliati <jrincayc at yahoo dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: Dodji Seketeli <dodji at redhat dot com>, gcc-patches at gcc dot gnu dot org, jason at redhat dot com, manu at gcc dot gnu dot org
- Date: Fri, 18 Oct 2013 06:56:33 -0600
- Subject: Re: [PATCH, PR 53001] Re: Patch to split out new warning flag for floating point conversion
- Authentication-results: sourceware.org; auth=none
- References: <52554AA2 dot 50706 at yahoo dot com> <Pine dot LNX dot 4 dot 64 dot 1310092037370 dot 12619 at digraph dot polyomino dot org dot uk> <525AA8E5 dot 807 at yahoo dot com> <87zjqcp6jx dot fsf at redhat dot com> <Pine dot LNX dot 4 dot 64 dot 1310142333000 dot 19760 at digraph dot polyomino dot org dot uk>
On 10/14/2013 05:34 PM, Joseph S. Myers wrote:
> On Mon, 14 Oct 2013, Dodji Seketeli wrote:
>
>>> This patch has passes the existing -Wconversion testcases. It
>>> modifies Wconversion-real.c, Wconversion-real-integer.c and
>>> pr35635.c to be more specific
>>
>> If the patch passes existing tests, I'd be inclined to leave
>> them tests alone and add new ones that are specific to what this
>> patch
>
> Indeed, it's best not to change what an existing test tests.
This patch does not change any of the non-commented c and c++ code.
It changes the dg comments.
Example:
- fsi (3.1f); /* { dg-warning "conversion" } */
+ fsi (3.1f); /* { dg-warning "float-conversion" } */
If you want I can change it to (in separate files if desired):
fsi (3.1f); /* { dg-warning "conversion" } */
fsi (3.1f); /* { dg-warning "float-conversion" } */
so that now the tests are run both ways, but it would test the exact
same code path.
>>> * gcc/c-family/c-common.c Switching unsafe_conversion_p to
>>> return an enumeration with more detail, and conversion_warning
>>> to use this information.
>>
>> The correct format for this ChangeLog entry would be:
>>
>> <tab>* gcc/c-family/c-common.c (unsafe_conversion_p):
>> <insert-your-comment-here>.
>
> And ChangeLog entries give the path to the file relative to the
> relevant ChangeLog file, which is that in the closest containing
> directory to the file being modified. Since there's one in
> gcc/c-family, that means the path in this case is just c-common.c.
>
Thanks for pointing out that detail about the changelog, I will fix
that next time I send the patch.