GCC has `[[gnu::musttail]] return`.
But yes, framing TCO as an optimization is unfortunate.
And there's also [[clang::musttail]] and [[msvc::musttail]].
As well as an effort to get it standardized: https://isocpp.org/files/papers/D3939R0.html (in C++).
And there's also [[clang::musttail]] and [[msvc::musttail]].
As well as an effort to get it standardized: https://isocpp.org/files/papers/D3939R0.html (in C++).