is there a C macro or some kind of way that i can check if my c program was compiled as 64bit or 32bit at compile time in C?
Compiler: GCC Operating systems that i n
An easy one that will make language lawyer squeem.
if(sizeof (void *) * CHARBIT == 64) { ... } else { ... }
As it is a constant expression an optimizing compiler will drop the test and only put the right code in the executable.