long long vs 16-bit machines
Thomas M. Breuel
uunet!ai.mit.edu!tmb
Wed Dec 11 19:48:59 PST 1991
Steve Correll writes:
> Dictating the sizes of "long" and "long long" is probably a mistake, because
> even after you have decided to cater to existing sloppy code, you may choose
> different sizes depending on the environment (machines with 32-bit pointers
> and 64-bit registers may prefer that "long" remain 32 bits, whereas machines
> with 64-bit pointers and registers may prefer that "long" and "long long" both
> be 64 bits). But it would be useful to standardize the existence of "long long"
> and the requirement that it be at least as large as "long". That would also
> recognize existing practice by Amdahl, GCC, and others.
I think it would make sense to mandate that "long long" be at least 64
bits wide and at least as wide as the type "long". Otherwise, I
believe the specifications of ANSI C for integral types should be left
alone.
That way, people who need high precision integer arithmetic can use
"long long" with some confidence, and that is the motivation for
providing "long long" in the first place.
Thomas.
More information about the Numeric-interest
mailing list