From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27608 invoked by alias); 21 Feb 2009 16:21:24 -0000 Received: (qmail 27597 invoked by uid 22791); 21 Feb 2009 16:21:23 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 21 Feb 2009 16:21:17 +0000 Received: (qmail 21428 invoked from network); 21 Feb 2009 16:21:15 -0000 Received: from unknown (HELO orlando) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 21 Feb 2009 16:21:15 -0000 From: Pedro Alves To: tromey@redhat.com Subject: Re: Fix most -Wmissing-prototypes -Wmissing-declarations warnings Date: Sun, 22 Feb 2009 01:06:00 -0000 User-Agent: KMail/1.9.10 Cc: gdb-patches@sourceware.org References: <200902180201.05118.pedro@codesourcery.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200902211621.12228.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-02/txt/msg00414.txt.bz2 On Wednesday 18 February 2009 20:03:23, Tom Tromey wrote: > >>>>> "Pedro" =3D=3D Pedro Alves writes: >=20 > 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: >=20 > 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. I've created PR build/9877 for this. Maintainers of each native configuration are encouraged to fix these warnings for their hosts. >=20 > 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. >=20 > The ada_typedef_print thing is a known oddity: >=20 > http://sourceware.org/ml/gdb-patches/2008-09/msg00541.html >=20 > I was hoping an Ada maintainer would deal with this. Yeah, me too. I didn't know if we should delete it or if it should be being used in the language vector but it had been missed. I see Joel handled it already. Thanks! > 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. >=20 > Did you mean some other option here? Yeah, I meant -Wstrict-prototypes. E.g., In file included from ../../src/gdb/../readline/../readline/readline.h:37, from ../../src/gdb/corelow.c:43: ../../src/gdb/../readline/../readline/rltypedefs.h:35: aviso: function dec= laration isn=E2=80=99t a prototype ../../src/gdb/../readline/../readline/rltypedefs.h:36: aviso: function dec= laration isn=E2=80=99t a prototype ../../src/gdb/../readline/../readline/rltypedefs.h:37: aviso: function dec= laration isn=E2=80=99t a prototype ../../src/gdb/../readline/../readline/rltypedefs.h:38: aviso: function dec= laration isn=E2=80=99t a prototype I've created PR build/9878 for this one. --=20 Pedro Alves