This is the mail archive of the 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: [IFUNC] PATCH: Add an ifunc attribute

On Sun, Jun 28, 2009 at 9:57 AM, Richard
Guenther<> wrote:
> On Sun, Jun 28, 2009 at 6:37 PM, H.J. Lu<> wrote:
>> On Sun, Jun 28, 2009 at 9:17 AM, Richard
>> Guenther<> wrote:
>>> On Sun, Jun 28, 2009 at 5:10 PM, H.J. Lu<> wrote:
>>>> Hi,
>>>> Here is a patch to add ifunc attribute, including many testscases
>>>> in C and C++. ?Any comments?
>>> +/* Get the function return type inside function body. ?Return a pointer
>>> + ? to the function for IFUNC function. ?*/
>>> +
>>> +static inline tree
>>> +function_return_type (const_tree decl)
>>> +{
>>> + ?if (DECL_IS_IFUNC (decl))
>>> + ? ?return build_pointer_type (TREE_TYPE (decl));
>>> + ?else
>>> + ? ?return TREE_TYPE (TREE_TYPE (decl));
>>> +}
>>> that's just ... gross. ?Instead adjust the function signature properly.
>>> Which of course makes your proposal not viable at all.
>>> I think your solution is overdesigned. ?Do you really expect so much
>>> usage that you need to make it easy to use from C++ (easy as in
>>> not mangle manually)?
>> I was told that people do want to use ifunc attribute in C++ class.
> They will be able to. ?Just not in a way that is 100% pretty and feels
> integrated.
> So what.

There are a dozen C++ ifunc tests on ifunc branch. Can you show
me what the different C++ syntax looks like with a different ifunc
attribute approach?



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