This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]