gnugo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gnugo-devel] I stepped on a bug


From: Gunnar Farnebäck
Subject: Re: [gnugo-devel] I stepped on a bug
Date: Thu, 06 Oct 2005 18:51:49 +0200
User-agent: EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/21.3 (sparc-sun-solaris2.9) MULE/5.0 (SAKAKI)

Felix wrote:
> I found that the compile log contained errors like this one:
> owl.c:4867: warning: comparison is always true due to limited range of
> data type

Thanks. That is fairly certain to be the problem.

> The same errors can be found in the debian build log for PPC:
> http://buildd.debian.org/build.php?pkg=gnugo
> 
> I also compiled the same source on Mac OS X (running in MOL on the
> same Mac Mini), which did not result in the same errors.
> 
> The problem seems to be signedness. I edited owl.c and changed char to
> signed char on lines 221, 4639, 4727, 4728 and 4863. Then I recompiled
> gnugo. After that a quick test seems to indicate the bug is gone.
> This fix is probable a bit to simple, and I haven't read the entire
> code (or even the entire file owl.c), but this should help you fix it.

Two calls to mark_string() should be changed to signed_mark_string()
as well, otherwise it looks correct.

> I'd appreciate it if you'd let me know whether this signedness problem
> is a bug in gnugo or in gcc.

It's definitely a bug in GNU Go.

> I'm not sure whether chars are meant to be signed or unsigned by
> default

The compiler is free to choose.

Thank you very much. You can expect a new development version some day
soon, fixing this.

/Gunnar




reply via email to

[Prev in Thread] Current Thread [Next in Thread]