This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++] fix alias and members


On 06/08/10 14:46, Jason Merrill wrote:
On 06/08/2010 05:59 AM, Nathan Sidwell wrote:
+ alias = lookup_attribute ("alias", DECL_ATTRIBUTES (decl)) != 0;
+
+ if (alias && TREE_CODE (decl) == FUNCTION_DECL)
+ record_key_method_defined (decl);

This seems wrong for weak aliases.

I'm not sure. aliases have to be to another symbol defined in the same translation unit. So, for the target to be in multiple TU's it'd have to be weak/comdat, which implies either an out-of-line inline function definition or a template instantiation. Is that something that makes sense to support?


My understanding of the use-case for weak aliases was to a non-weak unique symbol. So it seemed ok to me for the aliased symbol to be a key method.

nathan

--
Nathan Sidwell    ::   http://www.codesourcery.com   ::         CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]