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"
#endif

int main(void) {
    return 0;
}

Possible output:

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

Feedback about page:

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



Table Of Contents