* non-mulit-arch compiles probs
@ 2002-04-10 8:40 Andrew Cagney
2002-04-10 9:50 ` Andreas Schwab
2002-04-10 16:16 ` Michael Snyder
0 siblings, 2 replies; 5+ messages in thread
From: Andrew Cagney @ 2002-04-10 8:40 UTC (permalink / raw)
To: gdb-patches
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).
fixing ...
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: non-mulit-arch compiles probs
2002-04-10 8:40 non-mulit-arch compiles probs Andrew Cagney
@ 2002-04-10 9:50 ` Andreas Schwab
2002-04-10 10:03 ` Andrew Cagney
2002-04-10 16:16 ` Michael Snyder
1 sibling, 1 reply; 5+ messages in thread
From: Andreas Schwab @ 2002-04-10 9:50 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches
Andrew Cagney <ac131313@cygnus.com> writes:
|> 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).
As long as the extern declaration is not visible while the static
definition is compiled, all is well.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: non-mulit-arch compiles probs
2002-04-10 9:50 ` Andreas Schwab
@ 2002-04-10 10:03 ` Andrew Cagney
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Cagney @ 2002-04-10 10:03 UTC (permalink / raw)
To: Andreas Schwab; +Cc: gdb-patches
> As long as the extern declaration is not visible while the static
> definition is compiled, all is well.
>
> Andreas.
Yes, me `fixing' the -Werror compile problem makes that declaration
visible :-(
enjoy,
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: non-mulit-arch compiles probs
2002-04-10 8:40 non-mulit-arch compiles probs Andrew Cagney
2002-04-10 9:50 ` Andreas Schwab
@ 2002-04-10 16:16 ` Michael Snyder
2002-04-10 16:23 ` Andrew Cagney
1 sibling, 1 reply; 5+ messages in thread
From: Michael Snyder @ 2002-04-10 16:16 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches
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?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: non-mulit-arch compiles probs
2002-04-10 16:16 ` Michael Snyder
@ 2002-04-10 16:23 ` Andrew Cagney
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Cagney @ 2002-04-10 16:23 UTC (permalink / raw)
To: Michael Snyder; +Cc: gdb-patches
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-04-10 23:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-10 8:40 non-mulit-arch compiles probs Andrew Cagney
2002-04-10 9:50 ` Andreas Schwab
2002-04-10 10:03 ` Andrew Cagney
2002-04-10 16:16 ` Michael Snyder
2002-04-10 16:23 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox