[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gnome-pim: Cannot open user-cal.vcf or GnomeCard.gcrd on PPC

On Thu, 13 Apr 2000, Brendan J Simon wrote:
> I guess this is due to ANSI C not defining the signedness for char (I
> assume it doesn't otherwise we wouldn't be having this discussion).  
> Most built in C types default to signed (eg. int, short, long) and
> this is what most compilers implement for C.  I guess it depends on
> the default system compiler.
> Yes, the _pure_ fix is to modify all source code that uses char to use
> a new abstract type of signed char or unsigned char.  This is a
> practical nightmare but is achievable given enough time.  The other
> solution is to specify the char type on the compiler command line
> (assuming the compiler has this flexibility).
> I am a big PowerPC fan but I would like to know the reasoning behind
> the Linux/PPC people choosing unsigned char as the default char type.  
> Why go against the convention ?  I hope there is a really good reason
> that will help progress the C programming environment to better
> things.

I believe it is the same on Linux PPC, as on ARM.  My understanding of the
reason why ARM uses unsigned char as the default char type, is it is
faster.  The ARM core was designed with unsigned char types in mind, there
is extra over head to make the change from unsigned to singed.

These are not the only two architectures which have a default char type of
unsigned.  Just because some people in the ix86 world decide to make false
assumptions does not necessarily it should be encouraged.  What's next an
int is now always 32 bits?


Reply to: