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: indirect function support


On Tue, May 18, 2010 at 11:49 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, May 18, 2010 at 3:37 PM, Nathan Sidwell <nathan@codesourcery.com> wrote:
>> H.J. Lu wrote:
>>
>>> Is that a good idea to ask programmers to do name mangling by
>>> hand? ?It can be quite complicated for ?complex C++ classes
>>> and they have to update the alias when member functions are changed.
>>> We need to make it easy to use.
>>
>> The alias attribute already requires this (for non-member functions, for
>> member functions, alias was simply broken). ?While it would be nice to
>> improve alias, I don't see why that should be a requirement of adding ifunc
>> support to alias.
>
> It is not about adding ifunc support to alias. It is about providing a user
> friendly ifunc implementation.

I don't think we need something beyond what Nathan implemented.

The easiest way for the user is to forward to C linkage ifuncs from
templates, members, etc. and this is what we should encourage
in our documentation.

Any support for mangling should be orthogonal, maybe by a
C++ extension like __mangle decltype(...) or __mangle decl
resulting in a string literal.

Richard.


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