Remix.run Logo
ameliaquining 10 hours ago

The article, most unfortunately, doesn't explain why anyone would want infinite loops to be UB in the first place. I found this explanation: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1528.htm

layer8 3 hours ago | parent | next [-]

See https://news.ycombinator.com/item?id=49760653.

omoikane 10 hours ago | parent | prev [-]

The article mentions it's a halt-on-error pattern:

https://www.sandordargo.com/blog/2026/09/16/cpp26-trivial-in...

Edit: sorry, missed the UB bit.

Lvl999Noob 10 hours ago | parent | next [-]

That says why they don't want it to be UB. The question, I believe, was why they want statically-known-infinite non-trivial loops to continue being UB.

rcxdude 10 hours ago | parent | prev [-]

That's more why you would want them to be defined in the first place.