In designing a new programming language, is it safe to assume that a C int and a pointer are the same size on the machine?
No; on my MacOS X 10.6.5. machine, an int is 32 bits and a pointer is 64 bits by default.
int
If you need an integer that's the right size to hold a pointer too, use #include (or ) and uintptr_t - assuming you have C99 support, or can simulate it.
#include
uintptr_t