Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Bitfields and Crafty

Author: Robert Hyatt

Date: 22:09:24 07/20/01

Go up one level in this thread


On July 16, 2001 at 14:58:04, Tord Romstad wrote:

>On July 11, 2001 at 23:36:39, Robert Hyatt wrote:
>
>>2.  The ANSI standards committee did the same stupid thing with bit fields that
>>they did with other key issues, "this is left to the vendor's discretion..."
>>Ie is a char signed or unsigned by default?  Depends on the compiler.
>
>Please tell me you are just kidding.  I have always assumed that chars are
>signed by default, and a lot of my code depends on it.  Are you saying that
>my code could stop working when I switch to another compiler?
>
>Tord


Nope...  I got ripped when I first ported crafty to an IBM RS6000 for someone
here at UAB.  I had chars for the chess board, and the thing crashed badly
as it ended up with two white (positive) kings, etc.. no black pieces of any
kind.  Once I added "signed" the problem was fixed.  I then went to the standard
and found there was no required default for chars, for reasons I don't
understand.



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.