https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129
--- Comment #10 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Maxim Cournoyer from comment #9) > About not using it: sure, this works, but now how can a project enable > warnings just for their own headers and not those of the whole system? This > seems to be a valid use case. This works, but is tedious to do for every warning: #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #include <third-party-library/header.h> #pragma GCC diagnostic pop