This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: non-mulit-arch compiles probs
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: Michael Snyder <msnyder at redhat dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Wed, 10 Apr 2002 19:23:40 -0400
- Subject: Re: non-mulit-arch compiles probs
- References: <3CB45339.2010007@cygnus.com> <3CB4C50D.677DCC52@redhat.com>
> Andrew Cagney wrote:
>
>>
>> FYI,
>>
>> The file std-regs.c doesn't compile with -Werror on non-multi-arch
>> targets. They all dropped like flies.
>>
>> Adding to the fun, I've found an entry for the ``how did this ever
>> compile'' category:
>>
>> exec.c:print_section_info (struct target_ops *t, bfd *abfd)
>> maint.c:print_section_info (const char *name, flagword flags,
>>
>> (one is static, the other has a .h declaration).
>
>
> Doesn't the static one override the global one?
Yes, you can have both a static and a global function with the same
name. I think it is asking for trouble though. As with my case, when
the global function's declaration becomes visible in the file with the
static declaration (new #include) the compile will barf (the functions
had different signatures).
enjoy,
Andrew