Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Compiler bug (OT)

Author: David Rasmussen

Date: 12:44:03 12/09/01

Go up one level in this thread


On December 09, 2001 at 09:33:10, Christophe Theron wrote:

>
>I still have to find a bug the in code generated by the GCC 2.95.2. Maybe it has
>bugs, but I have never encountered one since I use this compiler for the DOS
>version of Chess Tiger which I'm working on daily since 1997.
>

It has bugs, just look at the bug reports. But it is pretty stable compared to
most other versions. Unfortunately, it isn't very C++ compliant.

>Anyway I think the best protection I have against compiler bugs is to use
>several compilers.
>

I agree 100%

>I compile the Chess Tiger engine with GCC and MSVC, then I let it chew a set of
>positions. I compare the total number of nodes computed. It must be exactly the
>same. If it is not, I hunt the problem until I find where the difference comes
>from.
>
>Then I also compile Tiger with the 68000 version of GCC (Palm version) and do
>the same test. The engine is identical, so the output must be identical.
>
>My assumption is that it is extremely unlikely that the same compiler bug will
>appear in 2 different compilers.
>

I do the exact same thing. Not only are compiler bugs found. Different compilers
give different warnings/errors. And they generate different code, so some of
your own bugs might actually only surface with a certain compiler. I try in
general to check as many compilers as possible, and also make sure that my
program generates as few warnings as possible.

/David



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.