64 bit ints

Gerald Hawkins jerry at starfish.Convergent.COM
Sun Oct 30 16:25:49 AEST 1988


>From article <6264 at june.cs.washington.edu>, by david at june.cs.washington.edu (David Callahan):
> 
> words. "Char" should be 8bits of course and "long int" 64 since
> 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?
> 
-
I'm no expert, but I understand that the language standard allows short, int,
and long to all be the same length if that is convenient.  Of course, if you
do that, you cut off an easy way for people who have to make machine
dependant stuff work; ie, if someone was silly enough to depend on int being
16 bits for variables, and you had to port the application to this machine,
it may be nice to have a short be 16 bits so the code could easily be
modified to say 'short' instead of 'int'.

Obviously, no-one reading this ever creates machine dependant code, though.
We know that already.  


Rainy Days and
Automatic Weapons Fire
Alway Get Me Down.

These opinions are mine.
Jerry.  (jerry at Starfish.Convergent.COM)
-----



More information about the Comp.lang.c mailing list