News for hackers. Stuff that matters.
Re:Pitfalls in C and C++: Unsigned Types (2011) by codehero on Wednesday September 25, 2013 @02:39PM (#6446427)
I've definitely been bitten by this kind of bug before, but I did not come to this author's conclusion. What I learned is that each step of a calculation has lower and upper bounds, regardless of int type. You always make sure your inputs, intermediates and products fall within these bounds. Consequently, the author's advice becomes irrelevant.

There are no comments on this comment yet.