This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[RFC] : Compiling libstdc++ with warnings on
- From: chris jefferson <caj at cs dot york dot ac dot uk>
- To: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Wed, 14 Dec 2005 18:30:51 +0000
- Subject: [RFC] : Compiling libstdc++ with warnings on
Every so often someone brings up some reason libstdc++ should compile
with a higher warning level. I decided to see how hard it is to compile
the test suite with -Wextra, and got the following:
1) There are a small number of bugs in the testsuite headers (all
functions without a return statement which don't return void)
2) A large number of "unused variables" in various tests (easy to fix
with the unused attribute).
In the actual library, there were only 2 real problems. Both tuple<>
(that is, the empty tuple) and bitset<0> produce a number of warnings,
involving either unused parameters or redundant tests. The only way to
fix these is to specialize some functions for the empty tuple and bitset<0>.
Does having these overloads and a bunch of __attribute__((unused)) in
lots of tests seem reasonable? Or not worth the effort?