3 ms·
I think C11 and later have similar forward progress requirements as C++11 and later, C just has an additional exception for loops with constant conditions.
by rrss 5y ago
I think C11 and later have similar forward progress requirements as C++11 and later, C just has an additional exception for loops with constant conditions.
- foxfluff 5y agoN1570 "An iteration statement whose controlling expression is not a constant expression, that performs no input/output operations, does not access volatile objects, and performs no synchronization or atomic operations in its body, controlling expression, or (in the case of a for statement) its expression-3, may be assumed by the implementation to terminate." Doesn't seem like UB but optimizing effectless loops out is permitted.