public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* -Wall
@ 2005-08-31 18:55 Paul Koning
  2005-08-31 19:33 ` -Wall Mark Kettenis
  2005-08-31 19:56 ` -Wall Stan Shebs
  0 siblings, 2 replies; 3+ messages in thread
From: Paul Koning @ 2005-08-31 18:55 UTC (permalink / raw)
  To: gdb

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?  

      paul

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: -Wall
  2005-08-31 18:55 -Wall Paul Koning
@ 2005-08-31 19:33 ` Mark Kettenis
  2005-08-31 19:56 ` -Wall Stan Shebs
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Kettenis @ 2005-08-31 19:33 UTC (permalink / raw)
  To: pkoning; +Cc: gdb

> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: -Wall
  2005-08-31 18:55 -Wall Paul Koning
  2005-08-31 19:33 ` -Wall Mark Kettenis
@ 2005-08-31 19:56 ` Stan Shebs
  1 sibling, 0 replies; 3+ messages in thread
From: Stan Shebs @ 2005-08-31 19:56 UTC (permalink / raw)
  To: Paul Koning; +Cc: gdb

Paul Koning wrote:

>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?  
>
For the enumerated -W flags that Mark mentions, sure. Don't forget
to test a variety of cross configs and as many natives as possible;
much of the troublesome code is in config-specific source files.

Stan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-08-31 19:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-31 18:55 -Wall Paul Koning
2005-08-31 19:33 ` -Wall Mark Kettenis
2005-08-31 19:56 ` -Wall Stan Shebs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).