Discussion about this post

User's avatar
Kip Hamiltons's avatar

Isn't your implementation UB? You cast after the addition? So you're casting the result, after the signed overflow (UB) would have already happened, no?

Expand full comment
1 more comment...

No posts