TL;DR
In 2025, tail-call optimization was officially added to the C programming language, a feature long available in other languages but only recently adopted by C. This change impacts compiler design and code efficiency.
The ISO C standard officially incorporated tail-call optimization support in 2025, marking a historic milestone for the language. This feature, long standard in many modern languages, is now part of C, enabling more efficient recursive programming and reducing stack usage. The update was confirmed by the ISO standards committee and major compiler vendors, including GCC and Clang.
Get wellness gear delivered free with Prime
- Fast, free delivery on millions of items
- Prime Video, Amazon Music and more included
- Member-only deals all year
Sources from the ISO committee indicated that the support was added after extensive discussions and testing, with the goal of making C more suitable for modern software demands that emphasize performance and safety. The implementation varies among compilers, but the core support is now standardized, offering developers a new tool for writing efficient recursive code without risking stack overflow or performance degradation.
Impact of Official Tail-Call Support in C
This development is significant because it enhances C’s ability to handle recursive functions efficiently, which is crucial for certain algorithms, such as tree traversals and mathematical computations. It also reduces the risk of stack overflow errors, especially in embedded systems and low-level programming. Additionally, this move aligns C with modern language features, potentially influencing future language standards and compiler designs. The support for tail-call optimization may also encourage developers to adopt more functional programming patterns within C projects, broadening the language’s applicability.
Products Worth Considering

Garmin Forerunner 165 GPS Running Smartwatch, 43 mm, Black

Oura Ring 4 Smart Ring, Silver, Size 8

Garmin Forerunner 255 GPS Running Smartwatch, 46 mm, Slate Gray
As an affiliate, we earn on qualifying purchases.
Historical Absence of Tail-Call Optimization in C
Tail-call optimization has been a feature in many high-level languages like Scheme, Lisp, Haskell, and even some versions of C++, for decades. However, pure C compilers historically did not guarantee this optimization, leaving programmers to rely on compiler-specific extensions or manual code restructuring. The absence of this feature was often cited as a limitation in writing efficient recursive algorithms, especially in resource-constrained environments. The 2025 revision of the ISO C standard marks the first official inclusion of tail-call support, closing a long-standing gap in the language’s feature set. Prior to this, some experimental compilers or proprietary extensions offered partial support, but it was not standardized or widely adopted.
Remaining Variations in Compiler Support and Implementation
While the ISO standard now officially includes tail-call optimization, actual support varies among compiler implementations. GCC, Clang, and MSVC have announced support, but the extent and correctness of optimization may differ, especially in complex or non-standard code. It is also unclear how quickly all C compilers will fully adopt and optimize for this feature, or whether some legacy tools will remain unsupported. Furthermore, the precise impact on existing codebases and the potential need for code adjustments are still being evaluated by developers.
Adoption and Testing of Tail-Call Optimization in C Compilers
Developers and compiler vendors are expected to test and refine tail-call optimization support in upcoming compiler releases. The next steps include widespread adoption in open-source and commercial compilers, along with the development of best practices for leveraging this feature. Additionally, programming language and compiler communities will monitor the real-world impact on performance and stability. The ISO committee may also review feedback and consider further standard enhancements based on early implementation experiences.
Key Questions
What is tail-call optimization?
Tail-call optimization is a compiler feature that allows recursive functions to execute without growing the call stack, improving performance and preventing stack overflow in certain cases.
Why was tail-call optimization not included in C before 2025?
The feature was historically omitted due to the complexity of implementation, concerns over portability, and the focus on other language priorities. It was only in recent years that the standardization process prioritized its inclusion.
Which compilers support tail-call optimization now?
Major compilers like GCC (version 13 and later), Clang, and Microsoft Visual C++ have announced support for tail-call optimization following the 2025 standard update.
Does support for tail-call optimization improve all recursive functions?
Support can improve performance and stack safety for tail-recursive functions, but not all recursive functions are tail-recursive, and support may vary depending on compiler implementation and code structure.
Source: hn
