• by josephcsible on 2/12/2023, 3:34:28 AM

    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.