Uses of \"short\" ?
preece at ccvaxa.UUCP
preece at ccvaxa.UUCP
Wed Oct 16 01:02:00 AEST 1985
> /* Written 2:45 am Oct 12, 1985 by gwyn at BRL.ARPA in ccvaxa:net.lang.c
> */ There is absolutely no use for types "int8", "int16", and "int32"
> since the shortest C types that fit them can always be used: "signed
> char", "short", and "long".
----------
At risk of belaboring the obvious, the point is that "int8",
"int16", and "int32" mean the same thing everywhere, while
"unsigned char", "short", and "long" are machine dependent.
If one carefully uses short and long so that code compiles
efficiently both on my UTX machine and Guy Harris's PDP-11s,
it STILL may break on another machine where short and long
are NOT the usual 16 and 32 bits. That's the whole point.
If you're going to spend much energy on generating portable
code you MUST use typedefs with funny names that actually have
specific, machine independent definitions.
--
scott preece
gould/csd - urbana
ihnp4!uiucdcs!ccvaxa!preece
More information about the Comp.lang.c
mailing list