Sandor Dargo personal blog
C++26: Trivial infinite loops are no longer undefined behaviour
Let’s start with a question! Is this program well-defined? 1 2 3 4 int main() { while (true) ; } If you said yes, you’d be wrong — at least before C++26. A while (true); loop with no side effects used to be undefined behaviour. Compilers were free to assume it terminates, and some — Clang in particular — would…
- Points
- 173
- HN comments
- 290
- Submissions
- 1
- Cited by
- 0 commenters
Programming LanguagesSoftware Engineering2026
On Hacker News
| Submitted | Title on HN | Points | Comments |
|---|---|---|---|
| Sep 17, 2026 | C++26: Trivial infinite loops are no longer undefined behaviour by ibobev | 173 | 290 |