News for hackers. Stuff that matters.
Re:Signed Integers Are Two’s Complement by ridiculous_fish on Thursday May 31, 2018 @01:25AM (#17194163)
The modern case for keeping signed overflow as UB is that it unlocks compiler optimizations. For example, it allows compilers to assume that `x+1>x`.

If implementations are forced to define signed overflow, then these optimizations are necessarily lost. So implementation-defined is effectively the same as fully-defined.

Re:Signed Integers Are Two’s Complement by Sean1708 on Thursday May 31, 2018 @05:25AM (#17195054)
I suppose the question is, which of these optimisations are actually useful for the compiler to do automatically? Yours is the example that's always thrown about, but it always seems like the kind of optimisation that the programmer should be responsible for.