This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: -W* rules for engagement?
- To: Mark Kettenis <kettenis at wins dot uva dot nl>
- Subject: Re: -W* rules for engagement?
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Tue, 23 May 2000 20:46:09 +1000
- CC: gdb-patches at sourceware dot cygnus dot com
- Organization: Cygnus Solutions
- References: <3923B19F.29591370@cygnus.com> <200005181027.MAA15469@landau.wins.uva.nl>
Mark Kettenis wrote:
> Hmm, how important is -Wpointer-arith? It generates a lot of warnings
> from code in <string.h> on Linux and the Hurd, due to a bug in gcc
> 2.95. For now I've just disabled it in my local CVS tree.
I don't see that here :-( It was added because, at the time, I found it
very easy to get past GCC.
> with a few additional key warnings such as -Wuninitialized
> -Wmissing-prototypes (any others?) and then try to get these down to
> zero so that -Werror can be used on this contracted list. Beyond that,
> people, can pursue things at their leisure.
>
> How to approach this? I'm easy. I am wary of fix warning a-thons and
> the like. Often fixing a warning involves a careful re-examination of
> the code. If someone wants to take it on, I'm again easy.
>
> Enabling additional warnings one by one, giving people a few weeks to
> recover and fix things, is probably the best idea. The majority of
> those won't really involve a lot of re-examination of code. And the
> cases where it does, that code will probably benefit from a
> re-examination, at least if people will review, update and add
> comments to that code.
I'm going to add -Wuninitialized next (I just tripped up on a bug it
would have caught :-( :-).
-Wmissing-prototypes is interesting - people are so good at adding ISO-C
prototypes from -Wimplicit that it can almost be avoided! :-)
Andrew