weak for Darwin
Geoffrey Keating
geoffk@geoffk.org
Mon Nov 1 18:31:00 GMT 2004
"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.
More information about the Libstdc++
mailing list