[Gc] size_t and ptrdiff_t size

MenTaLguY mental at rydia.net
Tue Nov 16 14:04:39 PST 2004

While ISO C is pretty free with its definitions of size_t and ptrdiff_t,
apparently POSIX places an additional restriction on them -- neither ought
to be wider than unsigned long or long, respectively.

So, while that restriction works as expected on an LP64 system, on an
LLP64 system size_t and friends are limited to 32 bits.

This means that there isn't really a standard portable integer type that
is guaranteed to be as wide as a pointer.

-mental, wishing everyone had adopted LP64

More information about the Gc mailing list