Zdenek Dvorak wrote:
IMHO, using loops relying on the behavior of overflow of an induction variable (*) is an ugly hack and whoever writes such a code does not deserve for his program to work.
I suspect everyone would agree on this, and in practice I would guess that a) there are no programs that rely on this b) the value of the optimization if any, is probably almost all from this treatment of induction variables in loops. Perhaps the proper resolution here is to implement and document that gcc will wrap except in the case of loop variables (needs some more careful documentation of course).