Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [ob/6.0] Fix a new sparc build failure
Date: Sun, 29 Jun 2003 22:15:00 -0000	[thread overview]
Message-ID: <3EFF64DA.70405@redhat.com> (raw)
In-Reply-To: <20030629213727.GA15297@nevyn.them.org>

> 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



  reply	other threads:[~2003-06-29 22:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-29 21:17 Daniel Jacobowitz
2003-06-29 21:31 ` Andrew Cagney
2003-06-29 21:37   ` Daniel Jacobowitz
2003-06-29 22:15     ` Andrew Cagney [this message]
2003-07-03 14:00       ` Daniel Jacobowitz
2003-07-03 14:24         ` Andrew Cagney
2003-07-07 18:09           ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3EFF64DA.70405@redhat.com \
    --to=ac131313@redhat.com \
    --cc=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox