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

Re: wmappl

On Thu, Jul 11, 2002 at 12:09:43AM +0200, Mij wrote:
> That's right, but as Theo noted, expliciting the char "signed" clears 
> the problem.
> That's really strange. I think this depends on two's complement notation 
> AND endianess,
> but I'm really curious to know something more.
> "Signed" is an implicit keyword, and it doesn't implies any specific 
> behaviour. It's simply
> implied. Then, I think the problem comes from a gcc optimization.

'char' defaults to 'unsigned char' on ppc, while it's 'signed char' on
most other platforms.  Therefore, 'if (some_char < 0)' doesn't make
sense on ppc, but it's perfectly fine on, say, x86.  But as already
noted, the correct fix shall use 'int' instead of 'char' because
'fgetc()' needs to return 257 distinct values.


To UNSUBSCRIBE, email to debian-powerpc-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Reply to: