Error directive

suggest change

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"

int main(void) {
    return 0;

Possible output:

$ gcc error.c
error.c: error: #error "Debug Builds Not Supported"

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents