3 ms·
The article mentions it's a halt-on-error pattern: https://www.sandordargo.com/blog/2026/09/16/cpp26-trivial-infinite-loops#:~:text=But%20why%20would%20anyone%
by omoikane 16d ago
The article mentions it's a halt-on-error pattern:
https://www.sandordargo.com/blog/2026/09/16/cpp26-trivial-infinite-loops#:~:text=But%20why%20would%20anyone%20write%20while%20(true)%3B%20in%20the%20first%20place%3F https://www.sandordargo.com/blog/2026/09/16/cpp26-trivial-in...
Edit: sorry, missed the UB bit.
- rcxdude 16d agoThat's more why you would want them to be defined in the first place.
- Lvl999Noob 16d agoThat 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.
- pseudohadamard 15d agoOne minor nit, it's not halt-on-error, it's restart-on-error since the watchdog then restarts the system. The technical term for this is rejuvenation and it's standard practice in SCADA and similar to deal with this-shouldn't-happen error conditions.