Long Longs

hosking at convexs.UUCP hosking at convexs.UUCP
Mon Mar 3 09:56:00 AEST 1986


> Does anyone have a good solution?
>  
> Does C++ have long longs? Does anyone know of ANY language that does?
> 
>  
>  
> Bob Silverman

We ran into exactly this sort of problem with the Convex C-1.  It has 64 bit
registers, but we didn't want to make "long" be 64 bits, for a number of
reasons, including "portability" with existing code which assumed that
sizeof(long) == sizeof(int) (Argh!!), and performance impact on typical
applications.
/* Danger, Will Robinson!  Flames from hoptoad!laura approaching! */
We therefore support "short" "int" "long" and "long long" - where
sizeof(long long) == 64 bits.

You can argue that this is not portable, and I'd have to agree, but it seemed
like the best solution at the time, given that we had to get a product to
market in order to survive.  Had we been doing the C compiler as a research
project, we might very well have made different decisions.

				Doug Hosking
				Convex Computer Corp.
				Richardson, TX
				{allegra, ihnp4, uiucdcs}!convex!hosking



More information about the Comp.lang.c mailing list