public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* long long in 64-bit modes
@ 2005-10-10  5:20 corey taylor
  2005-10-14 12:22 ` John Love-Jensen
  0 siblings, 1 reply; 2+ messages in thread
From: corey taylor @ 2005-10-10  5:20 UTC (permalink / raw)
  To: gcc-help

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?

corey

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: long long in 64-bit modes
  2005-10-10  5:20 long long in 64-bit modes corey taylor
@ 2005-10-14 12:22 ` John Love-Jensen
  0 siblings, 0 replies; 2+ messages in thread
From: John Love-Jensen @ 2005-10-14 12:22 UTC (permalink / raw)
  To: corey taylor, gcc-help

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-10-14 12:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-10  5:20 long long in 64-bit modes corey taylor
2005-10-14 12:22 ` John Love-Jensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).