Error directive
suggest changeIf 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"
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents