This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Fix most -Wmissing-prototypes -Wmissing-declarations warnings
- From: Tom Tromey <tromey at redhat dot com>
- To: Pedro Alves <pedro at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 18 Feb 2009 13:03:23 -0700
- Subject: Re: Fix most -Wmissing-prototypes -Wmissing-declarations warnings
- References: <200902180201.05118.pedro@codesourcery.com>
- Reply-to: tromey at redhat dot com
>>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:
Pedro> With all the latest talk about declarations and prototypes, I
Pedro> got curious and tried building GDB on x86_64-linux with
Pedro> `-Wmissing-declarations -Wmissing-prototypes' added to
Pedro> WARN_CFLAGS, like so:
Nice. I'm in favor of going this route. It seems to me that this can
catch real bugs and doesn't really have a downside.
Pedro> E.g., notice that a few functions here are really unnused and
Pedro> should probably either be deleted, or there's a bug hiding in
Pedro> there: e.g., i386-nat.c:child_post_startup_inferior or
Pedro> ada-typeprint.c:ada_typedef_print.
The ada_typedef_print thing is a known oddity:
http://sourceware.org/ml/gdb-patches/2008-09/msg00541.html
I was hoping an Ada maintainer would deal with this.
Pedro> I've also tried adding "-Wmissing-prototypes", but it shows up a
Pedro> few more issues than I have energy at the moment to look at.
Did you mean some other option here?
Tom