gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnu-arch-users] Re: 64-bit cleaning [PATCH]


From: John Goerzen
Subject: [Gnu-arch-users] Re: 64-bit cleaning [PATCH]
Date: Sat, 06 Sep 2003 22:44:42 -0500
User-agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Rational FORTRAN, linux)

Miles Bader <address@hidden> writes:

> John Goerzen <address@hidden> writes:
>> That is an interesting observation, though what it doesn't express is
>> whether different platforms actually react positvely to passing things
>> of different sizes along.
>
> What does that mean?  I think in general on a sane system you can always
> pass ints or pointers in a long, and be able to restore them later
> without damage.

What it means is there is an open question in my mind:

  Can you pass a small int-like thing in a larger pointer and be
  able to reliably extract it later, in a portable fashion?

For instance, can you reliably pass a 32-bit int in a 64-bit void *
and expect it to work everywhere?  Or more to the point, pass an int
in a void * and expect it to work even when they are different sizes?

I do know that it does work on Alpha, but I do not know if it actually
works elsewhere, and it is definately not a good way to go in any
case.

> IIRC, an exception (and it is a big exception I suppose) is that on
> 64-bit platforms, Microsoft defines long as 32-bits and pointers as
> 64-bits.  Assholes.

Ugh.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]