1 comment

[ 1.5 ms ] story [ 13.6 ms ] thread
The C standard says this:

> An iteration statement may be assumed by the implementation to terminate if its controlling expression is not a constant expression,158) and none of the following operations are performed in its body, controlling expression or (in the case of a for statement) its expression-3:159)

> — input/output operations

> — accessing a volatile object

> — synchronization or atomic operations.

So I guess this behavior is totally legitimate now after all.