64 bit ints
Marc Guyott
mguyott at mirror.TMC.COM
Tue Nov 1 05:07:05 AEST 1988
In article <225800084 at uxe.cso.uiuc.edu> mcdonald at uxe.cso.uiuc.edu writes:
>
>
>>Suppose I am designing a C compiler for a machine with 64bit
>>words.
>>pointers will be.
>
>>How long should an "int" be (32 or 64)?
>>How about a "short int" (16/32)?
>>How is this decision altered if partial word accesses
>>are more expensive than full word accesses?
>>
>The answer here should be very clear:
> Make the compiler so that it can handle the general case of
> int 32 bits
Didn't K&R define an "int" as being the natural word size of the hardware
that you are running on? So for an 80286 an int should be 16 bits, for a
machine with a 32 bit word an int should be 32 bits, and for the machine
described above an int should be 64 bits. Comments?
Marc
----
... I never saw the morning until I stayed up all night ...
Tom Waits
Marc Guyott mguyott at mirror.TMC.COM
{mit-eddie, pyramid, harvard!wjh12, xait, datacube}!mirror!mguyott
Mirror Systems Cambridge, MA 02140 617/661-0777
More information about the Comp.lang.c
mailing list