This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/40528] Add a new ifunc attribute
- From: "hjl dot tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jun 2009 16:14:15 -0000
- Subject: [Bug c/40528] Add a new ifunc attribute
- References: <bug-40528-682@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from hjl dot tools at gmail dot com 2009-06-26 16:14 -------
For C++:
class Foo
{
private:
virtual void foo1 ()
{
printf ("I am %s\n", __PRETTY_FUNCTION__);
}
public:
virtual void __attribute__ ((ifunc)) foo ()
{
return &Foo::foo1;
}
};
class Bar : public Foo
{
private:
void foo1 ()
{
printf ("I am %s\n", __PRETTY_FUNCTION__);
}
public:
void foo ()
{
return &Bar::foo1;
}
};
Should Bar::foo inherit the ifun attribute from Foo::foo?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40528