[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] Cast to unsigned
From: |
Gunnar Farneback |
Subject: |
Re: [gnugo-devel] Cast to unsigned |
Date: |
Thu, 07 Aug 2003 21:17:53 +0200 |
User-agent: |
EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/20.7 (sparc-sun-solaris2.7) (with unibyte mode) |
Arend wrote:
> IIRC rotating out of the sign bit for negative ints is undefined or
> implementation defined in ANSI C. That'd mean it has to be unsigned.
According to the book I have (Harbison & Steele, C a Reference Manual)
shifting the sign bit left just discards it and shifting it right
gives the implementation a choice of shifting in a 0 or a copy of the
sign bit. Either way would give the same result in our application.
Well, this is not all that important.
/Gunnar