dmd 1.046 and 2.031 releases
Robert Jacques
sandford at jhu.edu
Tue Jul 7 21:59:40 PDT 2009
On Wed, 08 Jul 2009 00:08:13 -0400, Brad Roberts <braddr at puremagic.com>
wrote:
> Walter Bright wrote:
>> Robert Jacques wrote:
>>> On Tue, 07 Jul 2009 23:01:58 -0400, Walter Bright
>>> <newshound1 at digitalmars.com> wrote:
>>>> Robert Jacques wrote:
>>>>> (Caveat: most 32-bit compilers probably defaulted integer to int,
>>>>> though 64-bit compilers are probably defaulting integer to long.)
>>>>
>>>> All 32 bit C compilers defaulted int to 32 bits. 64 bit C compilers
>>>> are setting int at 32 bits for sensible compatibility reasons.
>>>
>>> But are the 64-bit compilers setting the internal "integer" type to 32
>>> or 64 bits? (I'm not running any 64-bit OSes at the moment to test
>>> this)
>>
>> Not that I've seen. I'd be very surprised if any did.
>
>> From wikipedia: http://en.wikipedia.org/wiki/64-bit
>
> model short int long llong ptrs Sample operating systems
> LLP64 16 32 32 64 64 Microsoft Win64 (X64/IA64)
> LP64 16 32 64 64 64 Most UNIX and UNIX-like systems
> (Solaris, Linux, etc)
> ILP64 16 64 64 64 64 HAL
> SILP64 64 64 64 64 64 ?
Thanks, but what we're looking for is is what format the data is in in
register. For example, in 32-bit C, bytes/shorts are computed as ints and
truncated back down. I've found some references to 64-bit native integers
in the CLI spec, but nothing definative.
The question boils down to is b == 0 or not:
int a = 2147483647;
long b = a+a+2; // or long long depending on platform
More information about the Digitalmars-d-announce
mailing list