This is the mail archive of the gdb@sourceware.org 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]
Other format: [Raw text]

Re: -Wall


> Date: Wed, 31 Aug 2005 14:54:54 -0400
> From: Paul Koning <pkoning@equallogic.com>
> 
> Gdb (6.3 at least) generates a bunch of warnings when compiled with
> -Wall (or a similar set of "warn for everything I can think of"
> switches that are popular around here).
> 
> Would patches to cure these be welcome?  
> 

configure.ac has this note:

# NOTE: Don't add -Wall or -Wunused, they both include
# -Wunused-parameter which reports bogus warnings.

so currently GDB has its own set of warning flags, currently:

build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
-Wformat -Wparentheses -Wpointer-arith -Wformat-nonliteral \
-Wunused-label -Wunused-function"

Further down there is:

# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
# -Wunused-function -Wunused-variable -Wunused-value
# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
# -Woverloaded-virtual -Winline -Werror"

which probably qualifies as "warn for almost everything I can think
of".  The main reason for not enabling those is that there is still
too much shoddy code in GDB that triggers these, making -Werror
basically unusable.  But I'd certainly welcome patches to remove
warnings on that list.

The best thing to do would probably be to target the options one at a
time and then add the corresponding -W to the list used by GDB.

Mark


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