// CSE 374 15au HP. // Conditional compilation example // Use cpp -P to see preprocessor output, // Use cpp -P -DTRACE to see how command-line defines work. // Use gcc to build without define, gcc -DTRACE to build with. #include // #define TRACE #ifdef TRACE #define PRTRACE printf("here\n"); #else #define PRTRACE #endif int main() { PRTRACE; printf("main\n"); PRTRACE; return 0; }