This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


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

Re: -W* rules for engagement?


We should definitely try to eleminate all warnings from GDB.  And
indeed picking the right set of warning flags is important.  Having a
lot of spurious warnings makes it harder to spot the important ones
(or even to spot errors, having Emacs walk through all the warnings
before hitting the first real error can be quite annoying).

   So what then?  I'd like to suggest we pad out the current list of
   warnings:

     -Wimplicit -Wreturn-type -Wcomment -Wformat -Wparentheses
   -Wpointer-arith

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.

   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.

Mark

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