[ELDK] char type is being interpreted as 'unsigned char'
Douglas, Jim (Jim)
jdouglas at avaya.com
Thu Feb 21 14:39:26 CET 2008
> -----Original Message-----
> From: eldk-bounces at lists.denx.de [mailto:eldk-bounces at lists.denx.de]
> In message <22F058C3ED9D784E90CE473F2A9847F0028D1CB9 at in-exchange> you
> > I'm using 'char' data types in my program. On Redhat enterprise
> > (2.6.9-55.ELsmp / gcc 3.4.6) it is being interpreted as 'signed
> > and providing a value range of -128 to +127.
> > When I cross compile for ELDK 4.1/PPC 8280 (using ARCH=powerpc /
> > CROSS_COMPILE=ppc_6xx-, ppc_6xx-gcc 4.0.0), char is getting
> > as 'unsigned char' and providing a value range of 0 - 255.
> Both of this is perfectly legal.
> > Is there a way I can make 'char' being interpreted as 'signed char'
> > this ELDK platform?
> Declare your variables as "signed char" types.
> I have to admit that I consider code that depends on such things to be
Or: export CFLAGS=-fsigned-char
> Best regards,
> Wolfgang Denk
> DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> panic: kernel trap (ignored)
> eldk mailing list
> eldk at lists.denx.de
More information about the eldk