News for hackers. Stuff that matters.
Re:How expensive is integer-overflow trapping in C++? by R0b0t1 on Thursday September 24, 2020 @11:18AM (#24579404)
Are you sure? IIRC overflow or underflow is always UB per the (earlier?) C standards; they did not expect a single popular representation system for numbers.
Re:How expensive is integer-overflow trapping in C++? by MaxBarraclough on Thursday September 24, 2020 @12:37PM (#24580480)
Yes, I'm quite sure. C mandates that unsigned integer types use the typical binary representation, and it mandates wrapping arithmetic. I don't know much about the early C standards, it's possible it wasn't always this way.

https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?pa...

https://stackoverflow.com/a/18195756/