[MLton] Building MLton

John Skaller skaller@users.sourceforge.net
Mon, 04 Jul 2005 19:04:43 +1000


--=-VLcYdg0bmoGqOWo33PF4
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Mon, 2005-07-04 at 10:09 +0300, Vesa Karvonen wrote:
> Quoting John Skaller <skaller@users.sourceforge.net>:
> > 1. Simple hack -- not good but it may get a result fastest:
> >   use 'unsigned long' instead of 'unsigned int' for a word.
> >   That's the same size as a pointer on gcc/x86-64 at the moment.
> >   Downside: more storage for system 'integer' type.
>=20
> I'm not entirely sure what you are after here, but, in C and C++, if you
> want an (unsigned) integer type that is the same size as a pointer, you
> should probably be using the (size_t) ptrdiff_t typedef.

I'm not sure, I think:  ptrdiff_t only has to be big enough to
hold the signed difference between two pointers into
the same object.

So it is perfectly feasible to have 64 bit addresses,
but only 32 bit size_t and ptrdiff_t=20

.. as far as I can glean from the C99 Standard anyhow.

--=20
John Skaller <skaller at users dot sourceforge dot net>
Download Felix: http://felix.sf.net

--=-VLcYdg0bmoGqOWo33PF4
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQBCyPurw7vY25tjqN4RAv8NAJ97Nb1PyAbY5/jRViI9e9pEb1rFygCdGYjx
WRE+dmX7mr+Ph22B/8Z8FGc=
=v2O7
-----END PGP SIGNATURE-----

--=-VLcYdg0bmoGqOWo33PF4--