https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119388
--- Comment #12 from Giuseppe D'Angelo <dangelog at gmail dot com> --- The testcase was just meant to show that a warning originating in a system header was still be emitted, not that the specific warning didn't make sense :) Of course it was silly/extreme. But I understand that emitting warnings from there is a deliberate choice, so people have to find different workarounds. Do you think it's worth clarifying this behavior on the online docs? Specifically here: https://gcc.gnu.org/onlinedocs/cpp/System-Headers.html "All warnings, other than those generated by ‘#warning’ (see Diagnostics), are suppressed while GCC is processing a system header." ... although I'm not exactly sure how to amend to make it more accurately describe the current behavior (since it's only apparently about _some_ warnings still being emitted).