Name: Anonymous 2012-03-14 9:56
Is GCC able to optimize tail calls through function pointers?
$ cat | gcc -xc - && ./a.out
typedef (*fp)();
u(fp x)
{
return x(x);
}
main()
{
return u(u);
}
-O{s,2,3} and see the magic happening.