Wondering if anyone knows the flag for gcc to disable tailcall optimizations. Basically in a tailcall optimization, gcc will replace a stack frame when the return value fro
Untested: -fno-optimize-sibling-calls
-fno-optimize-sibling-calls
http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
GCC manual:
-foptimize-sibling-calls Optimize sibling and tail recursive calls. Enabled at levels -O2, -O3, -Os.
So either compile with -O0/-O1, or use -fno-optimize-sibling-calls.
-O0
-O1