31-08-2026, 12:52 PM
In a comma expression (which is discouraged by another advisory rule, 12.3, but could still be used), there is a clear separation in term of execution between what comes before and what comes after the comma. Therefore, I think the rationale is not very strong in this case.
What would you think of relaxing 13.3 and making this example compliant (it would still be non-compliant with 12.3):
What would you think of relaxing 13.3 and making this example compliant (it would still be non-compliant with 12.3):
Code:
int f(int n, int*dest) {
for (int i = 0 ; i<10 ; ++i, ++dest) { // Currently non-compliant
*dest = i*i;
}
}
