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]

Re: [RFC] : Compiling libstdc++ with warnings on


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.


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