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: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Joshua J Cogliati <jrincayc at yahoo 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 15:21:43 +0000
- 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> <52613001 dot 9030606 at yahoo dot com>
On Fri, 18 Oct 2013, Joshua J Cogliati wrote:
> 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.
Really I think it's better for the dg-warning text to test the actual
warning text rather than the name of the option that's also reported as
part of the compiler output ("conversion" matches both, of course).
The problem isn't so much the change to dg-warning, though, as the change
to dg-options. Previously the test asserted that certain things warn with
-Wconversion, by changing it you lose the assertion that -Wconversion
enables those warnings. So I think the test should remain as-is,
verifying that -Wfloat-conversion causes certain warnings, and then be
copied in a form using -Wfloat-conversion to verify that
-Wfloat-conversion also causes the same warnings.
Looking at <http://gcc.gnu.org/ml/gcc-patches/2013-10/msg01148.html>,
there are also some formatting problems, "if(" which should have a space
before the "(".
--
Joseph S. Myers
joseph@codesourcery.com