13-02-2015, 12:15 PM
In the 1st clause what is meant by “assign a value to the loop counterâ€. May this “value†be an expression with side-effects? Note: the 2nd and 3rd clauses explicitly refer to expressions and whether side-effects are permitted.
Code:
int index;
for ( set_val(&index) ; index < 10 ; index++) // Is this compliant if set_val assigns to index
Posted by and on behalf of the MISRA C Working Group