32 bit longs
Norman Diamond
diamond at jit345.swstokyo.dec.com
Tue Jan 22 13:22:06 AEST 1991
In article <231 at nazgul.UUCP> bright at nazgul.UUCP (Walter Bright) writes:
-------------
!!!!!!!!!!!!!
?????????????
>If you have a need for *exactly* 32 bits, you can do things like:
> x &= 0xFFFFFFFF; /* truncate result to 32 bits */
>... Alternatively, you can do things like:
> if (sizeof(x) == 4)
> /* code here depends on 32 bits in x */
On a machine with 36-bit words and C support hacked with 9-bit chars,
this test will give an undesired result.
On a machine with 16-bit bytes, this test will give an undesired result
either way, if x really has 32 bits or if it doesn't.
It is hard to believe that Mr. Bright would make this kind of mistake.
--
Norman Diamond diamond at tkov50.enet.dec.com
If this were the company's opinion, I wouldn't be allowed to post it.
More information about the Comp.lang.c
mailing list