This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: weak for Darwin
- From: Geoffrey Keating <geoffk at geoffk dot org>
- To: "Aaron W. LaFramboise" <aaronavay62 at aaronwl dot com>
- Cc: gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: 31 Oct 2004 21:45:18 -0800
- Subject: Re: weak for Darwin
- References: <20041026060731.4F9AE1B4B330@geoffk5.apple.com> <418454B8.1000905@aaronwl.com>
"Aaron W. LaFramboise" <aaronavay62@aaronwl.com> writes:
> > * libsupc++/new_op.cc (new): Make weak.
> The reason I'm asking is that I think this change will break non-ELF
> targets where weak symbols are translation-unit local (that is, weak
> symbols have meaning #2, but not meaning #1). One such binary format is
> PECOFF, and I think there are others that have similar semantics.
Could you describe the nature of the breakage you'd expect? I would
imagine such targets will quietly ignore the 'weak' (just like Darwin
does with weak_import), so that you can do
void foo(void) __attribute__((weak));
in a header, and then actually include that header when defining foo.