http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33255
--- Comment #23 from dodji at seketeli dot org <dodji at seketeli dot org> 2011-07-25 14:29:15 UTC --- > --- Comment #19 from Paolo Carlini <paolo.carlini at oracle dot com> > 2011-07-24 22:49:32 UTC --- > Just as a note, wanted also to add that if I understand correctly the > (temporary?!?) small issue with system headers, it would also affect people > building their code with -D_GLIBCXX_CONCEPT_CHECKS (by itself largely > deprecated and not being updated for c++0x). Again, I don't see this as a > serious issue if the new warning remains, for now at least, outside > -Wall. Building libstdc++ itself without _GLIBCXX_CONCEPT_CHECKS raises this warning for e.g: typedef typename iterator_traits<_II1>::value_type _ValueType1; typedef typename iterator_traits<_II2>::value_type _ValueType2; [..] __glibcxx_function_requires(_LessThanOpConcept<_ValueType1, _ValueType2>) __glibcxx_function_requires(_LessThanOpConcept<_ValueType2, _ValueType1>) (in libstdc++-v3/include/bits/stl_algobase.h) As the macro __glibcxx_function_requires is defined to nothing (without -D_GLIBCXX_CONCEPT_CHECKS) _ValueType1 and _ValueType2 appear unused here. So yes, -Wunused-local-typedefs definitely needs to be put out of --Wall -Extra (and -Wunused). Thanks.