Hacker News new | ask | show | jobs
by dmitrygr 88 days ago
they will do it for unsigned. for signed they will do a bit more to do the same rounding as C promises
2 comments

Here is how that looks like:

https://godbolt.org/z/rooee4esd

It's unfortunate that C tied overflow behavior to the signedness of integer types.