This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: long long in 64-bit modes


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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]