Subject: Re: weird lossage with xcompile macppc -> sparc
To: matthew green <mrg@eterna.com.au>
From: Martin Husemann <martin@duskware.de>
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
((char)-1)
if char is unsigned, use
((unsigned char)-1)
Isn't the "unsigned" in the latter case redundant anyway?
Martin
Disclaimer: too early, no coffee yet, ...