3 ms·
Not true, C++ made it so trivial infinite loops are not UB because it turns out they do have legitimate uses. https://lists.isocpp.org/std-proposals/2020/05/13
by Certhas 5mo ago
Not true, C++ made it so trivial infinite loops are not UB because it turns out they do have legitimate uses.
https://lists.isocpp.org/std-proposals/2020/05/1322.php https://lists.isocpp.org/std-proposals/2020/05/1322.php
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p2809r3.html https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p28...
- account42 5mo agoYes, the C++ committee has been making some stupid decisions lately. This is not the only one. Low level platform-specific code that needs to hot spin until an interrupt happens can use assembly for that part which it will need to do for the interrupt handler anyway.
- TuxSH 5mo agoYou don't even need to use assembly for this, the wait for interrupt typically involves side effects.