Comment 1 for bug 1538629

Revision history for this message
David Brown (davidbrown) wrote :

I think this is an effect of the counter being "volatile". The line "while (--cy)" is being handled as two operations - first "cy" is decremented, then it is compared to 0. Since cy is marked volatile, these operations are not combined.

The C standards are not very clear on exactly how such code should be interpreted - I believe it is right for the compiler to be a bit conservative here.