In the following code, it seems that I can't get the correct address of the second function.
Link to Ideone : http://ideone.com/r07UZc
#include <stdio.h>
class A
{
public:
__attribute__((noinline)) int func1();
__attribute__((noinline)) int func2();
};
int A::func1()
{
return 1;
}
int A::func2()
{
return 2;
}
int main()
{
printf("%p %p\n", &A::func1, &A::func2);
return 0;
}
The printed values are : 0x80484d0 (nil)
The first address seem to be correct but not the second. Why ?