News for hackers. Stuff that matters.
Re:Impact of Undefined Behavior on Performance by cwzwarich on Friday July 09, 2021 @02:56PM (#27787204)
> If you have defined wrapping/saturating semantics then you don't get this option, even if overflow is a bug in your program.

Well, unsigned overflow is also a potential bug, and it's defined behavior. So if you want useful integer overflow diagnostics, you already need to break the C/C++ spec.

Of course, the correct way to model this in a programming language is to distinguish between bitvectors with defined twos-complement operations and fixed-range integers.

There are no comments on this comment yet.