long long in 64-bit modes
John Love-Jensen
eljay@adobe.com
Fri Oct 14 12:22:00 GMT 2005
Hi Corey,
(Sorry for the delay, I was out of town.)
> How does the long long type change in 64-bit modes for C and C++?
>
> Does it stay 64-bit and is deprecated for long?
My expectation is:
int - natural word size of the architecture
short - half the word size of the architecture
long - twice the word size of the architecture
long long - (if available at all) twice the size of long
NOTE: my expectation differs from the C/C++ standard as the constraints of
those data types.
So for a 64-bit architecture:
short - 32 bit
int - 64 bit
long - 128 bit
long long - 256 bit
That's my expectation. That's not what I'm seeing on the 64-bit platforms I
work on.
However, for me, an acceptable alternative is C99's <stdint.h>.
--Eljay
More information about the Gcc-help
mailing list