This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
suggested compile warnings
- From: "Theodore A. Roth" <troth at openavr dot org>
- To: gdb at sources dot redhat dot com
- Date: Fri, 23 May 2003 11:57:10 -0700 (PDT)
- Subject: suggested compile warnings
Hi,
I've always been configuring gdb with --enable-gdb-build-warnings=-Werror
and thought that there where a bunch of gcc compile warnings issued.
Looking more closely at my builds, that doesn't seem to be true.
For my own apps, I like to use '-Wall -Werror' as it lets the compiler
catch a lot of my stupid mistakes. I tried '-Wall -Werror' for gdb,
but that seems to be too restrictive for gdb source.
Does anyone else compile gdb with any of the -W<foo> gcc options?
Is there a recommended list of these which should be used?
For example, adding -Wunused (without -Werror), turns up 149 wanrings.
Most are unused variables, some are static decl's for functions that
aren't defined. Most if not all of these should be trivial to fix.
Ted Roth