unsigned char vs. signed char

Florian Weimer fweimer at redhat.com
Wed Jul 16 08:55:57 UTC 2014


On 07/15/2014 07:22 PM, Adam Jackson wrote:
> On Tue, 2014-07-15 at 10:40 -0600, Orion Poplawski wrote:
>> Did you know that "char" defaults to "signed char" on x86 but "unsigned char"
>> on ppc and arm?  I didn't.
>
> Yep, found that out the hard way.  It annoyed me enough that I went
> digging in the gcc source to find the answer for all platforms:
>
> http://ajax.fedorapeople.org/is-char-signed-or-not.txt

Any idea why aarch64 and ppc64le got this wrong?

(Signed chars were at the top of my list of proposed ABI fixes for 
ppc64le. *sigh*)

-- 
Florian Weimer / Red Hat Product Security


More information about the devel mailing list