[TUHS] C history question: why is signed integer overflow UB?
Dave Horsfall
dave at horsfall.org
Sat Aug 16 07:59:46 AEST 2025
On Fri, 15 Aug 2025, Douglas McIlroy wrote:
> Idle thought; There's been mention of 1's complement. If overflow is UB
> because of that possibility, maybe ==0 should be, too!
I understand that with ones-complement machines (such as the CDC series),
a computation resulting in -0 will be normalised to 0 (but a bit inversion
won't).
-- Dave
More information about the TUHS
mailing list