Compile-time checking will include #ifdef 'ing for __LP64__ , which is the standard for ARM data size. The runtime should include checking the size of the pointers, for example:
if (sizeof(void*) == 4) { // Executing in a 32-bit environment } else if (sizeof(void*) == 8) { // Executing in a 64-bit environment }
Fortunately, pointer sizes are the only things that different standards agree on for compiling 64-bit code.
CodaFi
source share