https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119388
--- Comment #11 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Giuseppe D'Angelo from comment #8) > Well, that's a laudable goal, but I'm very afraid it'll just cause the > corresponding warnings to be entirely disabled instead -- since in many > cases the end-user can't upgrade the system header, nor the compiler > version. And this exposes users to real bugs in their own code. :-( You can disable specific warnings when including headers that are known to be buggy but you can't upgrade. For your compiler explorer demo: #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wuninitialized" #include <stuff.h> #pragma GCC diagnostic pop This is more targeted than "it's a system header, so ignore all its bugs".