From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30400 invoked by alias); 18 Feb 2009 20:04:42 -0000 Received: (qmail 30391 invoked by uid 22791); 18 Feb 2009 20:04:42 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 18 Feb 2009 20:04:35 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n1IK3TMO008098; Wed, 18 Feb 2009 15:03:29 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n1IK3TmQ016083; Wed, 18 Feb 2009 15:03:29 -0500 Received: from opsy.redhat.com (vpn-13-158.rdu.redhat.com [10.11.13.158]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n1IK3OuQ017823; Wed, 18 Feb 2009 15:03:27 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id E7A1F37824C; Wed, 18 Feb 2009 13:03:23 -0700 (MST) To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: Fix most -Wmissing-prototypes -Wmissing-declarations warnings References: <200902180201.05118.pedro@codesourcery.com> From: Tom Tromey Reply-To: tromey@redhat.com Date: Wed, 18 Feb 2009 22:54:00 -0000 In-Reply-To: <200902180201.05118.pedro@codesourcery.com> (Pedro Alves's message of "Wed\, 18 Feb 2009 02\:01\:04 +0000") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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/msg00388.txt.bz2 >>>>> "Pedro" == Pedro Alves 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