TCPL/A.07.04.5_Unary_Minus_Operator

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.

TCPL/A.07.04.5_Unary_Minus_Operator (2008-02-23 15:34:13由localhost编辑)