News for hackers. Stuff that matters.
Re:When ‘int’ is the new ‘short’ by zurn on Wednesday July 08, 2015 @05:06AM (#9850572)
Different semantics: int overflow is undefined but can handle negative values, unsigned wraps around. So you would use int if your expression can yield a negative value.

(You can't thus check for int overflow by checking for wraparound, see http://c-faq.com/misc/intovf.html)

Re:When ‘int’ is the new ‘short’ by stinos on Wednesday July 08, 2015 @05:25AM (#9850636)
> So you would use int if your expression can yield a negative value.

Of course, but as you say it yourself: if. It seems a bit too general to abandon unsigned completely because there are cases where it is not appropriate. By that logic there wouldn't be much types one can use at all.