64 bit ints

Guido van Rossum guido at cwi.nl
Sun Oct 30 21:56:28 AEST 1988


One argument for making int = long = 64 bits is that function call
arguments smaller than int are widened to int; if 64 is your machine's
word size you probably don't want to push partial words on the stack as
parameters.  This is even more true when part-word accesses are more
expensive.

On the other hand, if the machine is equally versatile in handling 8,
16, 32 and 64 bit quantities, *and* you care about porting software
written for 32-bit architectures, you may choose to add a 'long long'
type for 64 bits, and use short=16, int=long=32 bits.  You may still get
into trouble with programs that (illegally!) assume a pointer fits in a
long...
--
Guido van Rossum, Centre for Mathematics and Computer Science (CWI), Amsterdam
guido at piring.cwi.nl or mcvax!piring!guido or guido%piring.cwi.nl at uunet.uu.net



More information about the Comp.lang.c mailing list