In perl.perl6.internals, you wrote:
>On Thu, Sep 13, 2001 at 09:43:06AM -0700, Damien Neil wrote:
>> The language lawyer in me insists that I point out that this is
>> inherently nonportable. 

>That as may be, Perl 5 runs on nearly 80 platforms and uses this
>trick. 

[interchanging pointers and integers]

Well, sort of.  More precisely, an IV is definitely supposed to be big
enough to hold a pointer.  The reverse isn't necessarily true.  If you
build with -Duse64bitall, for example, you might well end up with 
32-bit pointers but 64-bit IVs and UVs.

Perl does do some integer to pointer casts (see the INT2PTR stuff in
perl.h), but it's only supposed to do those in restricted situations
where we "know" that the int will actually fit into the pointer.

>Is that portable enough for you?

Don't we also still have ptr-vs-int alignment issues with one of the 
big iron systems? Sorry I don't recall any more details.

-- 
    Andy Dougherty              [EMAIL PROTECTED]
    Dept. of Physics
    Lafayette College, Easton PA 18042

Reply via email to