Hi,
I think -Wunused and -Wall should imply -Wunused-local-typedefs unless
the user specifies -Wno-unused-local-typedefs.
I actually first tried this (actually adding it to -Wall -extra and
-Wunused) and found out the following issue.

A typedef can be defined in a macro in a system header, be expanded in a
function and not be used by the function.  In this case we shouldn't
warn, but PR preprocessor/7263 makes us warn nonetheless.  There are
many spots of that kind in the libstdc++ test suite.

Paolo Carlini<paolo.carl...@oracle.com>  writes:

Hi,
I think -Wunused and -Wall should imply -Wunused-local-typedefs
unless the user specifies -Wno-unused-local-typedefs.
IMHO, this is a very good idea looking forward, but then I think we
should make sure the warning plays well with system headers either
as-is or together with some other pending work of Dodji. In
particular, as I probably mentioned already in the trail, we really
want to double check that debug-mode does not trigger warnings, I'm a
bit of worried because many people use and like it.
Exactly.  This would be a side effect of PR preprocessor/7263?

So do you guys think we should add it nonetheless and just add
-Wno-unused-local-typedefs to the tests that exhibit the above issue
before fixing PR preprocessor/7263?
Personally, I don't have a strong opinion, but I think it's very important to have a solid plan for 4.7.0: we don't want to regress in terms of warnings spilled from system headers, we slowly made good progress over the years and now the situation is pretty good and much less confusing than it used to be to the users. For sure, anyway, I'm available to clean up a bit some of the warnings emitted by the library, if that can help the process.

Paolo.

Reply via email to