If the preprocessor encounters an #error
directive, compilation is halted and the diagnostic message included is printed.
#define DEBUG
#ifdef DEBUG
#error "Debug Builds Not Supported"
#endif
int main(void) {
return 0;
}
Possible output:
$ gcc error.c
error.c: error: #error "Debug Builds Not Supported"