Author: Dieter Buerssner
Date: 15:06:30 12/06/02
Go up one level in this thread
>My point is that the particular trick "b & -b" is portable for signed types but >the problems can come later (or before!). I am assuming that we are talking >about signed and unsigned int. Please correct me if I am wrong. Standard C does not enforce two complement encoding of signed integer types (it does enforce "this" for unsigned type). Even then, I think -(INT_MIN) is undefined behaviour. But I will admit, that I could not find it at the moment in the Standard text. Perhaps my memory is betraying me ... Cheers, Dieter
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.