> On the other hand, C does not have a way to tell the compiler: > > "this is my loop variable, it must not be modified inside the loop" > > neither you can say: > > "this is the upper bound of the loop, it must not be modified" > > either.
No, but the compiler can almost always trivially determine that nothing in the loop can modify the variable, so I'm not sure I understand your point.