[IFUNC] PATCH: Add an ifunc attribute

Paolo Bonzini bonzini@gnu.org
Thu Jul 2 13:29:00 GMT 2009


>> __typeof (foo) bar __attribute__((alias (mangle (foo))));
>> __typeof (::foo) baz __attribute__((alias (mangle (::foo))));
>
> How do you handle
>
> int foo (int, long);
> static int foo1 (int x, long y);
> static int foo2 (int x, long y);
> int foo (float, long);
> static int foo3 (float x, long y);
> static int foo4 (float x, long y);
>
> Which foo does __typeof (foo) refer to?

Accept __attribute__ ((ifunc (int foo(int, long)) then.  And then do

typedef int foo_type (int, long);
foo *bar (void) __attribute__ ((ifunc (foo_type foo)))

Paolo



More information about the Gcc-patches mailing list