4 ms·
Wait, why would it do that?
by 2fast4you 7y ago
Wait, why would it do that?
- saagarjha 7y agoFrom a recent (http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf) draft, section 6.8.5, Iteration statements: > 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.
- the_why_of_y 7y agoFor that condition to be met, the compiler would have to prove that g() doesn't do IO, etc - but the OP said it calls msgrcv(2), so it's not an issue.