From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25441 invoked by alias); 3 Jul 2003 14:00:39 -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 25434 invoked from network); 3 Jul 2003 14:00:39 -0000 Received: from unknown (HELO crack.them.org) (146.82.138.56) by sources.redhat.com with SMTP; 3 Jul 2003 14:00:39 -0000 Received: from dsl093-172-017.pit1.dsl.speakeasy.net ([66.93.172.17] helo=nevyn.them.org ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 19Y4eU-0003tG-00; Thu, 03 Jul 2003 09:01:34 -0500 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 19Y4dV-0003Ag-00; Thu, 03 Jul 2003 10:00:33 -0400 Date: Thu, 03 Jul 2003 14:00:00 -0000 From: Daniel Jacobowitz To: Andrew Cagney Cc: gdb-patches@sources.redhat.com Subject: Re: [ob/6.0] Fix a new sparc build failure Message-ID: <20030703140033.GB11555@nevyn.them.org> Mail-Followup-To: Andrew Cagney , gdb-patches@sources.redhat.com References: <20030629211653.GA29914@nevyn.them.org> <3EFF59D8.10001@redhat.com> <20030629213727.GA15297@nevyn.them.org> <3EFF64DA.70405@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3EFF64DA.70405@redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-07/txt/msg00068.txt.bz2 On Sun, Jun 29, 2003 at 06:14:50PM -0400, Andrew Cagney wrote: > >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. Would you prefer creating a sparc-tdep.h for this, or just moving the prototype out of the #if? There's no sparc-tdep.h yet and I don't want to do surgery on the sparc port to populate it properly. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer