Re: 64 bit
Re: 64 bit
- Subject: Re: 64 bit
- From: David Fang <email@hidden>
- Date: Mon, 24 Dec 2007 17:49:15 -0500 (EST)
Hi,
Yes, I know, this reply comes awfully late, but 'twas the night
before Christmas, and I'm bored in the house, catching up on mailing
lists without using a mouse...
Of course this all assumes that portability is indeed a goal :-)
Sure, and it all stems from the fact that there isn't a portable 64-bit
integer type in C++.
(FWIW, I wasn't paying a great deal of attention and hadn't actually noticed
that he was using C++ rather than C. Also, on the <inttypes.h> point, I seem
to recall reading somewhere that <inttypes.h> is supposed to be more widely
deployed in practice than <stdint.h>, so maybe using the former is better for
portability.)
One option is to use -m64, which results in 64b long. This gets around
having to use the pedantically rejected "long long". (ints are still 32b,
pointers are 64b.)
If you need *exactly* 64b, look for types like "int64_t" in the system's
type headers.
Both options have worked well for me in the past.
Happy Holidays.
Fang
David Fang
Computer Systems Laboratory
Electrical & Computer Engineering
Cornell University
http://www.csl.cornell.edu/~fang/
-- (2400 baud? Netscape 3.0?? lynx??? No problem!)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >64 bit (From: email@hidden) |
| >Re: 64 bit (From: Nick Zitzmann <email@hidden>) |
| >Re: 64 bit (From: Perry Winkel <email@hidden>) |
| >Re: 64 bit (From: Alastair Houghton <email@hidden>) |
| >Re: 64 bit (From: "Sean McBride" <email@hidden>) |
| >Re: 64 bit (From: Peter O'Gorman <email@hidden>) |
| >Re: 64 bit (From: Alastair Houghton <email@hidden>) |