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] add more detail to -Wconversion and -Woverflow (PR 80731)


On 06/05/2017 10:05 AM, Thomas Preudhomme wrote:
Hi,

newlib-stdint.h defines UINT32_TYPE as "long unsigned int" for ILP32
targets. This leads such target to warn on "long unsigned int"
conversation rather than "unsigned int". This patch modifies the
dg-warning regexp to allow an option "long " prefix in the warning,
thereby working for LP64 and ILP32 targets.

Ah, that explains it.


ChangeLog entry is as follows:

*** gcc/testsuite/ChangeLog ***

2017-06-05  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    * gcc.dg/utf16-4.c: Accept "long unsigned int" as well as
    "unsigned int" in conversation warning on line 15.

Is it ok for trunk?

The dg-warning PASSes once this patch is applied.

Yes, relaxing the test to allow for both underlying char32_t types
makes sense.

Thanks
Martin


Best regards,

Thomas

On 04/06/17 23:54, Martin Sebor wrote:
On 06/02/2017 11:11 AM, Renlin Li wrote:
Hi Martin,

I noticed the following failures after your change r248431.
FAIL: c-c++-common/Wfloat-conversion.c  -Wc++-compat   (test for
warnings, line 42)
FAIL: c-c++-common/Wfloat-conversion.c  -Wc++-compat   (test for
warnings, line 43)

It happens on arm target which is not a large_long_double target.
The patch here add the missing target selector. After the change, those
test
won't checked in arm target.

Here I have a simple fix to it. Okay to commit?

r248431 wasn't meant to change when any of these warnings fire,
only their text and the amount of detail included in them.  The
removal of the { target large_long_double } selector was by
accident.

Please go ahead and commit your fix.  Thanks!


gcc/testsuite/ChangeLog:

2017-06-02 Renlin Li <renlin.li@arm.com>

* c-c++-common/Wfloat-conversion.c: Add large_long_double target
selector to related line.



And there is another failure:
FAIL: gcc.dg/utf16-4.c  (test for warnings, line 15)

The warning message is slightly different from expected.
utf16-4.c:10:15: warning: character constant too long for its type
utf16-4.c:15:15: warning: conversion from 'long unsigned int' to
'char16_t {aka short unsigned int}' changes value from '410401' to
'17185'

The test passes for me now.  The initial commit had introduced
bug 80731 but it's recently been fixed.  Can you please try
again with the latest sources?

Martin


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