This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: __bswap_constant_16 not compiled when -Werror -Wsign-conversion is given (32bit LE ARM)
- From: Andreas Jaeger <aj at suse dot com>
- To: Edward Jee <edjee at google dot com>
- Cc: libc-help <libc-help at sourceware dot org>
- Date: Tue, 21 May 2013 15:48:43 +0200
- Subject: Re: __bswap_constant_16 not compiled when -Werror -Wsign-conversion is given (32bit LE ARM)
- References: <CACBWV96dWwchoXBWMrM994RNL09TP+R4pJUujqSZtBdDWqY=yQ at mail dot gmail dot com> <519B1ACE dot 4090608 at suse dot com> <CACBWV97gt3XRW6c4bQbGv90FmK7D_Ktq2YrDP6xxx=ZphFMMvg at mail dot gmail dot com>
On 05/21/2013 09:22 AM, Edward Jee wrote:
Hi Andreas, thanks a lot for your response.
That change (BZ #12194) uses 0xff for sysdeps/s390/bits/byteswap.h .
But uses 0xffu bits/byteswap.h .
In my platform I use bits/byteswap.h . And, it seems that ((x) >> 8)
promotes the data to signed value. So (((x) >> 8) && 0xffu) seems to
fail when -Werror -Wsign-conversion .
I can't understand very well why bits/byteswap.h uses 0xffu , while
most of the other platform-dependent byteswap.h use 0xff.
Edward, please file a bug report and let us look closer at this,
Andreas
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 NÃrnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix ImendÃrffer,HRB16746 (AG NÃrnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126