Possible Duplicate:
Are there are any platforms where pointers to different types have different sizes?
I have read in several places that pointers of different types may have different representations in standard-conforming C implementations. This is one thing that makes it necessary to cast pointer arguments to printf, e.g.
int foo;
printf("address is %p\n", (void *) &foo);
I was skeptical of this and poked through the C99 standard (document WG14 N1256, available at http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf). At 6.2.5.27 it reads:
A pointer to void shall have the same representation and alignment requirements as a pointer to a character type. Similarly, pointers to qualified or unqualified versions of compatible types shall have the same representation and alignment requirements. All pointers to structure types shall have the same representation and alignment requirements as each other. All pointers to union types shall have the same representation and alignment requirements as each other. Pointers to other types need not have the same representation or alignment requirements.
So, it does indeed sound like a conforming C99 implementation could use different representations for pointers of different types.
My question is this: what C implementations/architectures exist that actually use different representations for pointers of different types?