Speaking as a professional compiler engineer, this is the biggest reason why signed overflow is treated as UB.<p>It is incredibly useful to talk about a loop&#x27;s trip count or the values an induction variable can have.<p>It turns out that taking advantage of signed overflow lets us do that in more places, a boon to all the programs which don&#x27;t dynamically execute signed overflow.<p>The tradeoff, however, is that the programing model gets way more complicated.  I have talked to the engineer who introduced this optimizing power to our compiler and he sorta regrets it.<p>IMO, we need better, higher level ways of talking about a loop&#x27;s iteration space.  Today, in C or C++, we are forced to represent the iteration space of a loop using the language&#x27;s algebra.  This is severely limiting when each operation on a signed type might introduce UB.  With a higher level mechanism, we can separate the behavior that we want for loops from the behavior we want for everything else in a nice, clean way.