------- Comment #2 from pinskia at gcc dot gnu dot org  2005-12-11 04:05 -------
I should note that doing:
static void *a0ra, *a1ra;
void __attribute__((noinline)) a0(void) { a0ra = __builtin_return_address(0); }
void __attribute__((noinline)) a1(void) { a1ra = __builtin_return_address(0); }
int foo(void) { a0(); a1(); return a1ra - a0ra; }
int main()
{
    printf("pd=%d\n", foo());
    return 0;
}

You get the code which you want.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25345

Reply via email to