Subject: Re: weird lossage with xcompile macppc -> sparc
To: matthew green <>
From: Martin Husemann <>
List: tech-toolchain
Date: 09/21/2002 11:07:27
On Sat, Sep 21, 2002 at 04:15:02PM +1000, matthew green wrote:

> because a "signedness" test in mksyntax.c fails somehow:

Uhmm, mksyntax is run as a host program, so it determines the hosts char
signedness. borken.

> 	if (sign)
> 		fprintf(hfile, "#define UPEOF ((char)%d)\n\n", -base);
> 	else
> 		fprintf(hfile, "#define UPEOF ((unsigned char)%d)\n\n", -base);

And I must be missing something here: if "char" is signed, use 


if char is unsigned, use

 ((unsigned char)-1) 

Isn't the "unsigned" in the latter case redundant anyway?

Disclaimer: too early, no coffee yet, ...