[Vm-dev] [commit][3704] converting int to pointer is 64bits risky, better use long even for dummy

Ryan Macnak rmacnak at gmail.com
Sun May 8 17:28:31 UTC 2016


On Sat, May 7, 2016 at 7:49 AM, Eliot Miranda <eliot.miranda at gmail.com>
wrote:

>
>
> > On May 6, 2016, at 10:41 PM, Tobias Pape <Das.Linux at gmx.de> wrote:
> >
> >
> >
> >> On 07.05.2016, at 00:20, Eliot Miranda <eliot.miranda at gmail.com> wrote:
> >>
> >>
> >>
> >>
> >>> On May 6, 2016, at 1:37 PM, commits at squeakvm.org wrote:
> >>>
> >>>
> >>> Revision: 3704
> >>> Author:   nice
> >>> Date:     2016-05-06 13:37:49 -0700 (Fri, 06 May 2016)
> >>> Log Message:
> >>> -----------
> >>> converting int to pointer is 64bits risky, better use long even for
> dummy
> >>
> >> It isn't risky, it's broken :-)
> >
> >
> > What about intptr_t then?
>
> Rejected because it's a pretentious neologism, and because it's not a
> basic type. long however, is a basic type, is big enough to hold a pointer,
> is not pretentious, and is, in fact what intptr_t is defined in terms of
> anyway.
>

Not on all platforms, which is why intptr_t exists. long is only required
to be at least 32 bits, not to be wide enough to hold a pointer. Windows is
an LLP64 system.


> If we have to add support for all the possible renaming a if the basic
> integer types in the type inference machinery we'll have numbers in the
> double digits.  KISS.
>
>
> >
> > Best regards
> >    -tobias
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20160508/e18ad291/attachment.htm


More information about the Vm-dev mailing list