Hacker News new | ask | show | jobs
by cwzwarich 4891 days ago
Checking for signed overflow by first performing signed overflow is a great C antipattern.
1 comments

Exactly. I've seen plenty of overflow detection libraries that do precisely this. The undefined overflow plus the lack of access to CPU flags makes a pretty good argument against doing this stuff at the C/C++ level.