https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77299
--- Comment #12 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #11) > So, do we want instead some pragma to temporarily do the > opposite of #pragma GCC system_header and another one to undo it? Something like PR 80472? That would solve a number of libstdc++ bugs, like PR 58876. And maybe PR 87614. See also PR 43167 which is related to the general problem, but probably wouldn't be helped by your suggestion unless we made 99% of libstdc++ headers non-system headers and just treated small regions as "system headers".