This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [RFC] : Compiling libstdc++ with warnings on
- From: Paolo Carlini <pcarlini at suse dot de>
- To: chris jefferson <caj at cs dot york dot ac dot uk>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Wed, 14 Dec 2005 19:39:25 +0100
- Subject: Re: [RFC] : Compiling libstdc++ with warnings on
- References: <43A064DB.1050904@cs.york.ac.uk>
chris jefferson wrote:
>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).
>
>
I think we should fix this immediately.
>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>.
>
>
This part is a bit more debatable, but I'm in favor, assuming we can
keep binary compatiblity, nothing too dirty, well, the usual standard
requirements.
>Does having these overloads and a bunch of __attribute__((unused)) in
>lots of tests seem reasonable? Or not worth the effort?
>
>
I hope we don't need too many __attribute__((unused))... Can you go into
the details?
Thanks,
Paolo.