GNU bug report logs -
#8732
uinttostr: comparison of unsigned expression < 0 is always false
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
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 eblake <at> redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
[signature.asc (application/pgp-signature, attachment)]
This bug report was last modified 14 years and 54 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.