https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95765
--- Comment #4 from Takatoshi Kondo <redboltz at gmail dot com> --- Thank you for fixing the warnings. > Users should not be routinely using -Wsystem-headers to find problems with > their own code (that defeats the entire purpose of suppressing warnings in > system headers). > > I've fixed some warnings in libstdc++ code, but the real problem here is Bug > 43167 (and Bug 43167 comment 17 has almost exactly the same example). I agree. If warnings relate to templates would be reported without `-Wsystem-headers`, it is ideal.