https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67996
--- Comment #2 from Kim Gräsman <kim.grasman at gmail dot com> --- Thanks, I figured that was why. The warning is not a problem if I'm using <ios> directly, then I can just disable it locally. But we ran into this with a third-party library having the code above in one of their headers. This makes it nigh-impossible for us to enable -Wswitch for our own code, as the third-party header could be indirectly included in any translation unit. ios: enum seekdir { beg, cur, end, _S_ios_seekdir_end }; third-party.h: switch(seekdir) { case beg: break; case cur: break; case end: break; } us.cpp: #include "third-party.h" // WARN I wasn't sure if the extra enumerator was allowed by the standard, so thanks for confirming that. We've now worked around it by patching the third-party to use an if/else chain instead, but I thought I'd raise it anyway because it creates a messy situation when the warning "leaks" like this.