Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: problems compiling

Author: Dann Corbit

Date: 04:35:53 12/31/01

Go up one level in this thread


On December 31, 2001 at 07:06:05, Peter Rosendahl wrote:
[snip]
>That's strange. I just compiled the original program with the change 'int
>g_pieces[33]' using MSVC 6.0 with some different optimizations and
>also with gcc 2.95.3-5 (cygwin special, no optimizations) and can't
>reproduce the error. Maybe there is another problem caused by usage of undefined
>memory?

For GCC and MSVC, I don't get any errors.  With Intel C++, I get wrong results
unless I use the /Qipo flag.

Here is the LCLint output:

LCLint 2.5q --- 26 July 2000

atak.c: (in function is_attacked)
atak.c(18,17): Operand of ! is non-boolean (int): !(j & 0x88)
  The operand of a boolean operator is not a boolean. Use +ptrnegate to allow !
  to be used on pointers. (-boolops will suppress message)
atak.c(32,17): Operand of ! is non-boolean (int): !(j & 0x88)
disp.c: (in function disp_b)
disp.c(19,13): Test expression for if not boolean, type int: i & 0x88
  Test expression type is not boolean or int. (-predboolint will suppress
  message)
disp.c(41,15): Incompatible types for + (int, char): ((i) & 7) + 'a'
  A character constant is used as an int. Use +charintliteral to allow
  character constants to be used as ints.  (This is safe since the actual type
  of a char constant is int.)
disp.c(41,51): Left operand of >> is not unsigned value (int): (i) >> 4
  An operand to a shift operator is not unsigned values.  This may have
  unexpected results depending on the signed representations. (-shiftsigned
  will suppress message)
disp.c(46,23): Left operand of >> is not unsigned value (int): (i) >> 4
disp.c(48,30): Left operand of >> is not unsigned value (int): (i) >> 4
disp.c(50,21): Test expression for if not boolean, type int: g_castle & 1
disp.c(54,21): Test expression for if not boolean, type int: g_castle & 2
disp.c(58,21): Test expression for if not boolean, type int: g_castle & 4
disp.c(62,21): Test expression for if not boolean, type int: g_castle & 8
disp.c(66,22): Operand of ! is non-boolean (int): !j
disp.c(68,30): Left operand of >> is not unsigned value (int): (i) >> 4
disp.c(73,36): Incompatible types for + (int, char): ((g_ep) & 7) + 'a'
disp.c(73,62): Left operand of >> is not unsigned value (int): (g_ep) >> 4
disp.c(74,30): Left operand of >> is not unsigned value (int): (i) >> 4
disp.c(76,21): Test expression for if not boolean, type int: g_wtm
disp.c: (in function disp_f)
disp.c(93,13): Test expression for if not boolean, type int: i & 0x88
disp.c(109,14): Incompatible types for + (int, char): ((i) & 7) + 'a'
disp.c(114,23): Left operand of >> is not unsigned value (int): (i) >> 4
disp.c(119,9): Test expression for if not boolean, type int: g_wtm
disp.c(124,9): Test expression for if not boolean, type int: g_castle & 1
disp.c(128,9): Test expression for if not boolean, type int: g_castle & 2
disp.c(132,9): Test expression for if not boolean, type int: g_castle & 4
disp.c(136,9): Test expression for if not boolean, type int: g_castle & 8
disp.c(140,10): Operand of ! is non-boolean (int): !j
disp.c(146,25): Incompatible types for + (int, char): ((g_ep) & 7) + 'a'
disp.c(146,51): Left operand of >> is not unsigned value (int): (g_ep) >> 4
find.c: (in function perft)
find.c(33,10): Operand of ! is non-boolean (int): !depth
find.c(39,13): Test expression for if not boolean, type int:
                  make_move(move_stack[i].m)
init.c: (in function reset_piece_square)
init.c(30,13): Test expression for if not boolean, type int: i & 0x88
move.c: (in function comp_to_coord)
move.c(10,36): Incompatible types for + (int, char): ((m.from) & 7) + 'a'
move.c(10,64): Left operand of >> is not unsigned value (int): (m.from) >> 4
move.c(10,80): Incompatible types for + (int, char): ((m.to) & 7) + 'a'
move.c(10,106): Left operand of >> is not unsigned value (int): (m.to) >> 4
move.c(12,34): Incompatible types for + (int, char): ((m.from) & 7) + 'a'
move.c(12,62): Left operand of >> is not unsigned value (int): (m.from) >> 4
move.c(12,78): Incompatible types for + (int, char): ((m.to) & 7) + 'a'
move.c(12,104): Left operand of >> is not unsigned value (int): (m.to) >> 4
move.c(8,9): Test expression for if not boolean, type int: m.promoted
move.c(15,12): Unqualified static storage str returned as implicitly only: str
  Static storage is transferred in an inconsistent way. (-statictrans will
  suppress message)
move.c: (in function gen)
move.c(57,13): Test expression for if not boolean, type int: g_castle & 1
move.c(60,13): Test expression for if not boolean, type int: g_castle & 2
move.c(102,13): Test expression for if not boolean, type int: g_castle & 4
move.c(105,13): Test expression for if not boolean, type int: g_castle & 8
move.c(25,9): Test expression for if not boolean, type int: g_wtm
move.c: (in function gen_knight_all)
move.c(154,13): Test expression for if not boolean, type int: j & 0x88
move.c: (in function gen_bishop_all)
move.c(171,17): Operand of ! is non-boolean (int): !(j & 0x88)
move.c: (in function gen_rook_all)
move.c(193,17): Operand of ! is non-boolean (int): !(j & 0x88)
move.c: (in function gen_king_all)
move.c(215,13): Test expression for if not boolean, type int: j & 0x88
move.c: (in function push)
move.c(229,13): Left operand of && is non-boolean (int): (g_wtm) && (to <= 7)
move.c(232,22): Operand of ! is non-boolean (int): !(g_wtm)
move.c(246,9): Test expression for if not boolean, type int: captured
move.c: (in function make_move)
move.c(276,13): Test expression for if not boolean, type int: is_checked(g_wtm)
move.c(281,21): Test expression for if not boolean, type int:
                   is_attacked(117, 0)
move.c(284,21): Test expression for if not boolean, type int:
                   is_attacked(115, 0)
move.c(288,21): Test expression for if not boolean, type int:
                   is_attacked(117, 1)
move.c(291,21): Test expression for if not boolean, type int:
                   is_attacked(115, 1)
move.c(279,13): Test expression for if not boolean, type int: g_wtm
move.c(275,9): Test expression for if not boolean, type int: m.castled
move.c(308,35): Right operand of || is non-boolean (int):
                   (g_piece[m.from] == 1) || (m.captured)
move.c(331,21): Test expression for if not boolean, type int: is_checked(1)
move.c(325,17): Test expression for if not boolean, type int: m.promoted
move.c(348,21): Test expression for if not boolean, type int: is_checked(1)
move.c(337,17): Test expression for if not boolean, type int: m.is_ep
move.c(362,17): Test expression for if not boolean, type int: is_checked(1)
move.c(374,21): Test expression for if not boolean, type int: is_checked(0)
move.c(368,17): Test expression for if not boolean, type int: m.promoted
move.c(391,21): Test expression for if not boolean, type int: is_checked(0)
move.c(380,17): Test expression for if not boolean, type int: m.is_ep
move.c(405,17): Test expression for if not boolean, type int: is_checked(0)
move.c(420,13): Test expression for if not boolean, type int:
                   is_checked(g_wtm ^ 1)
move.c(444,17): Test expression for if not boolean, type int: is_checked(1)
move.c(458,17): Test expression for if not boolean, type int: is_checked(1)
move.c(464,13): Test expression for if not boolean, type int: is_checked(1)
move.c(485,17): Test expression for if not boolean, type int: is_checked(0)
move.c(499,17): Test expression for if not boolean, type int: is_checked(0)
move.c(505,13): Test expression for if not boolean, type int: is_checked(0)
move.c(428,14): Test expression for if not boolean, type int: g_wtm
move.c: (in function unmake_move)
move.c(537,14): Operand of ! is non-boolean (int): !(g_wtm)
move.c(538,17): Test expression for if not boolean, type int: m.is_ep
move.c(551,17): Test expression for if not boolean, type int: m.captured
move.c(564,17): Test expression for if not boolean, type int: m.is_ep
move.c(577,17): Test expression for if not boolean, type int: m.captured
move.c(594,14): Operand of ! is non-boolean (int): !(g_wtm)
move.c(595,17): Test expression for if not boolean, type int: m.captured
move.c(608,17): Test expression for if not boolean, type int: m.captured
move.c(593,9): Test expression for if not boolean, type int: m.promoted
move.c(625,14): Operand of ! is non-boolean (int): !(g_wtm)
move.c(629,17): Test expression for if not boolean, type int: m.captured
move.c(643,17): Test expression for if not boolean, type int: m.captured
move.c(657,32): Operand of ! is non-boolean (int): !(g_wtm)
move.c(660,13): Test expression for if not boolean, type int: m.captured
move.c(697,13): Test expression for if not boolean, type int: m.captured
test.c: (in function test)
test.c(30,13): Test expression for if not boolean, type int: is_checked(1)
test.c(45,17): Test expression for if not boolean, type int:
                  make_move(move_stack[j].m)
time.c: (in function get_ms)
time.c(6,11): Passed storage timebuffer contains 4 undefined fields:
                 time, millitm, timezone, dstflag
  Storage derivable from a parameter, return value or global is not defined.
  Use /*@out@*/ to denote passed or returned storage which need not be defined.
  (-compdef will suppress message)

Finished LCLint checking --- 97 code errors found



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.