Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Compiler bug?

Author: Sune Fischer

Date: 14:57:37 07/03/02

Go up one level in this thread


On July 03, 2002 at 17:00:49, Robert Hyatt wrote:

>On July 03, 2002 at 16:09:37, Sune Fischer wrote:
>
>>Hi quick question.
>>
>>// this one is "faulty":
>>#define RANK64(r) (0x00000000000000FF<<(r<<3))  // r is 0-7
>>
>
>That long number is _not_ a 64 bit value.  If you cast the hex constant
>to 64 bits, the shift amount doesn't need to be cast (and it might well be
>more efficient that way as well).

Then it has to be because of the leading zeros, because usually it _is_ a 64 bit
number. The same trick on the file worked great, but that number is
0x0101010101010101, which is then correctly read as a 64 bit type.

-S.



This page took 0.01 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.