2012/3/22 Andreas Schwab > Fabrice Popineau writes: > > > You mean you can't negate a signed int ? > > Yes, it can overflow. > > Well ... the range is not wider with an unsigned int. Maybe I'm too naive but if x is unsigned, I don't expect to see -x . The implicit semantics for unsigned is x >= 0. Sorry to be so stubborn, but I hate those sign extensions that can arise anywhere. My point is that even if the effect is intended by using unsigned this way, if the same variable is upgraded to long, the sign extension will occur, probably unintented, and not flagged harder by the compiler. -- Fabrice