[LLVMdev] Re: New primitive type for 32/64 compatibility?

Chris Lattner sabre at nondot.org
Mon Apr 18 08:02:19 PDT 2005

On Sat, 16 Apr 2005, Mike Hearn wrote:
> On Sat, 16 Apr 2005 10:38:10 -0500, Chris Lattner wrote:
>> While I don't think that having 'long_t' or something like that is
>> necessarily a good idea, I do think that having an 'intptr' type could be
>> a useful feature, with the advantage of it being a language-independent
>> construct.  I think this would capture what you're really going for, and
>> have very simple and well-defined meaning.
> Yes, maybe ... what exactly is the definition of this type? On LP64
> systems the width of ints and pointers are different.

intptr_t is an integer that is always the same size as the pointer, on an 
LP64 system, it would be 64-bits, regardless the size the C compiler 
thinks long, long long or int should be.



More information about the llvm-dev mailing list