size_t + ptrdiff_t

Manu turkeyman at gmail.com
Mon Feb 20 03:28:44 PST 2012


On 20 February 2012 13:16, Walter Bright <newshound2 at digitalmars.com> wrote:

> On 2/20/2012 3:02 AM, Manu wrote:
>
>> ? I must have misunderstood something... I've never seen a 64bit C
>> compiler
>> where 'int' is 64bits.
>>
>
> What are you using in C code for a most efficient integer type?
>

#ifdef. No 2 C compilers ever seem to agree.
It's a major problem in C, hence bringing it up here. Even size_t is often
broken in C. I have worked on 64bit systems with 32bit pointers where
size_t was still 64bit, but ptrdiff_t was 32bit (I think PS3 is like this,
but maybe my memory fails me)

I want to be confident when I declare a numeric type that can interact with
pointers, and also when I want the native type.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120220/4c93c7a7/attachment.html>


More information about the Digitalmars-d mailing list