On 09/02/2011 02:45 AM, bearophile wrote:
Timon Gehr:

according to TDPL p53., that fact is defined. (unary minus: -x == ~x+1)

Uhmmmm.

Bye,
bearophile

For unsigned integers it is clearly defined:

1000... => 0111... => 1000...

And according to TDPL p53: "This manipulation does not raise particular questions about the signedness of val".

So, it is guaranteed that it will work for long.min .

Reply via email to