In C / C ++, the code I'm trying to install includes an outdated system header:
From the title:
#ifdef __GNUC__ #warning "this header is deprecated" #endif
As we compile here with gcc -Wall -Werror , compilation stops. Ultimately, itโs better to replace obsolete features, but for now I want to disable this warning.
Compiling without -Werror certainly works, but since it is part of a fully automated build process, I prefer not to.
Enabling the header with #undef ing __GNUC__ before and #define then possible, but I'm worried about side effects inside the included header.
Is there a way to disable #warning or relax -Werror for just one header?
c gcc c-preprocessor preprocessor-directive
Thomas erker
source share