signed/unsigned char/short/int/long [was: #defines with parameters]
Chip Salzenberg
chip at ateng.ateng.com
Thu Dec 22 04:31:32 AEST 1988
According to pcg at aber-cs.UUCP (Piercarlo Grandi), concerning the fact that
the signedness of char is implementation-defined:
>[...] it is apparent in hindsight that syntax and
>semantics are incomplete, as there is no way to ensure the signedness of a
>"char" (a similar problem exists with bit fields), and that syntax does not
>properly reflect semantics.
Sure. But for hysterical -- oops, I meant historical -- reasons, X3J11
couldn't fix it. They did provide a way to specify signed and unsigned
chars when we care to, which is all we really need anyway.
>My contentions (for the last time!) are that
> [1] this is not necessary, as it is more natural to drop the pretense
> that "char" is a type distinct from "int", and instead adopt the notion
> that "char" is like "short", an adjective that modifies the length of its
> base type;
Well, sure. But you're too late.
X3J11 did a good job. Let's leave well enough alone.
--
Chip Salzenberg <chip at ateng.com> or <uunet!ateng!chip>
A T Engineering Me? Speak for my company? Surely you jest!
Beware of programmers carrying screwdrivers.
More information about the Comp.lang.c
mailing list