|
|
|
|
|
by marcosdumay
36 days ago
|
|
Applying the increment or decrement operators over the same variable more than once on the same line should be a compile-time error. Anyway, yes, this one example has an obvious order it should be applied. But still, something like it shouldn't be allowed. |
|
That would be nice, but don't forget the more general case of pointers and aliasing:
The compiler cannot statically catch every possible instance of a statement where a variable is updated more than once.