long long

Paul Kohlmiller uunet!robin.svl.cdc.com!paul
Thu Dec 12 10:30:02 PST 1991


Tim Peters writes:
> I know of only two specific mappings for current (true) 64-bit machines
> (if anyone knows of others, I'd be delighted to see 'em -- please pass
> them on!):
 I added the cyber 180 mappings:
   Bit sizes of C types
        cray    ksr    CDC 180
char       8      8      8
short     64     16     32
int       64     32     64
long      64     64     64
pointer   64     64     64 (actually 48 but that wouldn't fly so ...)

Could someone clear something up for me?
If there are programs that assume sizeof(int)==sizeof(long) then why do
they use both? The only reason that I can see for using long instead of int
(if they are the same size) is to get the correct type checking done when
interfacing to something that must be typed long (like some things in the
standard library).

BTW, would it be acceptable to say that long long can be no more than
64 bits (but it could be less than 64). I suggest this so that the current
implementations on 64 bit machines do not use long long for 128. If they do, 
then when current 32-bit machines want to provide a 128-bit facility they
will start using long long long. In other words, if we have to swallow
long long, can we at least agree that the next time we need another size we
will do something that can be consistent across all machines.

Paul Kohlmiller
CDC




More information about the Numeric-interest mailing list