Re: long long in 64-bit modes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux