Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: GCC and 64bit Integers

Author: Dave Gomboc

Date: 13:42:39 04/04/00

Go up one level in this thread


On April 04, 2000 at 16:32:20, Christophe Theron wrote:

>On April 04, 2000 at 14:36:10, Frank Phillips wrote:
>
>>On April 03, 2000 at 22:35:47, Robert Hyatt wrote:
>>
>>[Snip]
>>>>It is indicative of an uninitialized variable.  A procedure call such as the
>>>ones above simply stomp on the stack before your code gets to use the value
>>>that was not initialized.
>>>
>>>you might try gcc -Wall -O2 to let it build a dependency graph and look for
>>>such problems.  If it sees a path from the top of the procedure to the bottom,
>>>where any variable is referenced before it is initialized (local variables
>>>only) it will give you a warning...
>>
>>Bob/Christophe
>>
>>Just as you predicted, an uninitialised variable.  Everything is now back to
>>normal.
>>
>>Easy when you know how……… Thanks, this was driving me insane.
>>
>>The gcc Wall option is very useful and found the extra variable easy.  I had
>>looked and looked and looked and………………….
>>
>>Frank
>
>
>I suggest to have -Wall all the time. Do not change the warning level to match
>the needs of your sources. Change your sources so -Wall detects NO warning, and
>it will save yourself from a lot of trouble.
>
>
>    Christophe

Yes, I try compiling with maximum warnings on multiple compilers to catch as
many potential problems as possible.  I have used CC from SGI and CC from SUN at
University, g++ at home and there, and MSVC and IBM VisualAge for C++ from home.
 Going through that process brings my attention to all sorts of things that I
might well have missed otherwise.

Dave



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.