[C++] fix alias and members
Nathan Sidwell
nathan@codesourcery.com
Tue Jun 8 19:46:00 GMT 2010
On 06/08/10 20:19, Jason Merrill
> static void f() __attribute ((weakref, alias ("g")));
>
> int main()
> {
> if (f)
> f();
> }
>
> does not require a definition of g. Apparently weakrefs are different
> from weak aliases; I was previously confusing the two. But this case
> still involves attribute "alias".
hm, ok, but a weakref must have static (local) linkage, which is something a
member function cannot have. The case where a member function could behave
as-if it had static linkage would be in an anonymous namespace. But in that
case the class itself is local to the TU. So again, I think we're ok.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery
More information about the Gcc-patches
mailing list