On Sat, 19 Jul 2003, Vincent BĂ©ron wrote:
: That's an easy one. One an Alpha, sizeof(int) != sizeof(foo *). I think : sizeof(int) == 8, while sizeof(foo *) == 4.
Other way round. sizeof(int) == 4; sizeof(void *) == 8.
: gcc is kind enough to warn you about this potentially nasty situation, : although in these particular cases I don't see how putting the pointer : in something larger will create a problem.
Use intptr_t. If that's not available (via autoconf test), typedef intptr_t to be "unsigned long" locally, as "long" is the size of a pointer on all typical ILP32 and LP64 hosts.