This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]