News for hackers. Stuff that matters.
Re:Pitfalls in C and C++: Unsigned Types (2011) by dbrower on Thursday September 26, 2013 @10:36AM (#6451018)
I take this as an overgeneralization from the bugs the original author runs into most often, which may be domain specific -- overflow in signal processing being endemic to the problem.

In many other cases, one of the common bugs is unexpected sign extension when a type is promoted to a larger one -- the most common being extension of a signed character to an integer, which can result in some wildly negative values.

Those who have been hit by that frequently will prefer unsigned types.

As with most things, your mileage may vary.

-dB

There are no comments on this comment yet.