From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1455 invoked by alias); 29 Jun 2003 22:15:03 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 1425 invoked from network); 29 Jun 2003 22:15:00 -0000 Received: from unknown (HELO localhost.redhat.com) (24.157.166.107) by sources.redhat.com with SMTP; 29 Jun 2003 22:15:00 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 008A32B5F; Sun, 29 Jun 2003 18:14:50 -0400 (EDT) Message-ID: <3EFF64DA.70405@redhat.com> Date: Sun, 29 Jun 2003 22:15:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com Subject: Re: [ob/6.0] Fix a new sparc build failure References: <20030629211653.GA29914@nevyn.them.org> <3EFF59D8.10001@redhat.com> <20030629213727.GA15297@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-06/txt/msg00877.txt.bz2 > On Sun, Jun 29, 2003 at 05:27:52PM -0400, Andrew Cagney wrote: > >> >sparc_y_regnum is mentioned in the tm header, so sparc-nat.c actually >> >references it. Fixes another sparc-native build failure; checked in. > >> >> Missing an extern declaration? The nat file would be getting -Wimplict. > > > No, the extern declaration is there too. There was an extern followed > by a static, which some future version of GCC (probably 3.4) will warn > about. Huh? cagney@nettle$ gcc --version 2.95.3 cagney@nettle$ gcc -c foo.c foo.c:2: warning: static declaration for `foo' follows non-static cagney@nettle$ cat foo.c extern void foo (void); static void foo (void) { }; Notice where it occures: #if defined (GDB_MULTI_ARCH) && (GDB_MULTI_ARCH > 0) [...] /* Multi-arch the nPC and Y registers. */ #define Y_REGNUM (sparc_y_regnum ()) extern int sparc_npc_regnum (void); extern int sparc_y_regnum (void); And the sparc-elf cross target, it turns out, isn't multi-arch so wouldn' get the warning :-/ Can you please move the extern declaration to "sparc-tdep.h"? Without it, there's yet another -Wmissing-prototypes to fix. Andrew