Hacker News new | ask | show | jobs
by IncRnd 1207 days ago
Nowadays you can direct clang to require tail-call elimination in C. [1] In gcc you can provide the optimization flag, -foptimize-sibling-calls, which is automatically selected at -O2, -O3, or -Os. [2]

[1] https://clang.llvm.org/docs/AttributeReference.html#musttail

[2] https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html