News for hackers. Stuff that matters.
Re:Signed Integers Are Two’s Complement by kazinator on Thursday May 31, 2018 @11:37AM (#17197110)
Or you could just convert from the unsigned to the signed type, rather than dragging unions into it.

This conversion doesn't have undefined behavior; it produces an implementation defined result.

C programs can simulate two's complement math using unsigned types, avoiding UB. Then rely on IB to convert between signed and unsigned.

There are no comments on this comment yet.