[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#8732: uinttostr: comparison of unsigned expression < 0 is always fal
From: |
Eric Blake |
Subject: |
bug#8732: uinttostr: comparison of unsigned expression < 0 is always false |
Date: |
Wed, 25 May 2011 13:54:54 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.10 |
On 05/25/2011 01:23 AM, Voelker, Bernhard wrote:
> Hi *,
>
> building coreutils-8.12 with '--enable-gcc-warnings' fails on my SLES 10.3
> server:
>
> CC uinttostr.o
> cc1: warnings being treated as errors
> In file included from uinttostr.c:3:
> anytostr.c: In function 'uinttostr':
> anytostr.c:39: warning: comparison of unsigned expression < 0 is always false
It would be _really_ nice if there were a way to have gcc shut up that
particular warning when it is the result of a macro expansion that first
checks whether an expresssion is signed or unsigned. That is, gcc is
issuing the warning for 'is_signed(e) ? (e < 0 ? a : b) : b', even
though the 'e < 0' sub-expression is provably dead code for an unsigned
expression and therefore the warning is spurious. But we don't know how
to shut up gcc.
This also affects recent gnulib lib/intprops.h, so ideas are welcome.
In the meantime, configure with CFLAGS='-Wno-error' to allow warnings to
still be listed but not halt compilation.
--
Eric Blake address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature