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

Re: wmappl

Bastien Nocera writes:
> On Thu, 2002-07-11 at 07:48, Albert D. Cahalan wrote:
>> Bastien Nocera writes:
>>> On Wed, 2002-07-10 at 23:09, Mij wrote:

>>>> "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 on PPC is unsigned.
>> It doesn't have to be. What benefits do we get from
>> being incompatible with the rest of the world?
>> Not that a signed char (negative letters???) makes
>> any sense, but that's the norm.
>> I don't think it would be terribly hard to fix this.
>> At the syscall level, and even at the libc level,
>> there wouldn't be much of an ABI difference at all.
>> If anything, buggy behavior would disappear.
> No need to send your humours to me. K&R never said that
> char should be signed, it's not the norm.

K&R made char signed.

K&R's compiler didn't have a "signed" keyword at all,
so if char had not been signed then there would not
have been any signed 8-bit type.

K&R didn't need the 0xff character, so using char in
place of int would generally make no difference.
I stay out of Latin America, so my little Y doesn't
get the runs; them foreigners can deal with it.)

Even Microsoft got this right.

AFAIK, we inherit the unsigned default from AIX.
IBM made char unsigned to match what they'd done
on S/370 and AS/400 hardware. On those platforms,
IBM was using EBCDIC instead of ASCII, and needed
to make char unsigned to prevent regular characters
(basic numbers and letters) from being negative.

Not many people were dumb enough to follow IBM.

> People just assume it, "Hey, it works on my machine,
> so it should work everywhere". Next you're gonna tell
> me that MMX assembly should also work on PPC because
> "What benefits do we get from being incompatible with
> the rest of the world?".

Benefit: a processor that doesn't consume 75 watts
Cost: must use AltiVec assembly instead of MMX assembly

That was easy. Where's the benefit for unsigned char?

> Your time would be better spent fixing the programs
> that make this wrong assumption.

Yeah, with -fsigned-char in every Makefile... or fix the
whole lot by changing the gcc default. It's just stupid
to be swimming against the flow on this.

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

Reply to: