以下全都是参考这里回答的:http://stackoverflow.com/questions/8026694/c-unary-minus-operator-behavior-with-unsigned-operands
(1)C99中是这样解释“-”操作符:The result of the unary - operator is the negative of its (promoted) operand. The integer
promotions are performed on the operand, and the result has the promoted type.
但是关于怎么计算什么也没有说。。。
(2)The C programming Language(K&R C)是这样解释“-”操作符:A.7.4.5 Unary Minus Operator
The operand of the unary - operator must have arithmetic type, and the result is the negative of its operand. An integral operand undergoes integral promotion. The negative of an unsigned quantity is computed by subtracting the promoted value from the largest value of the promoted type and adding one;but negative zero is zero. The type of the result is the type of the promoted operand.
这里说了对整型数取负需要进行整型提升,特别说明了对于unsinged int取负的计算方法。
(3)C++11中是这样解释“-”操作符:The