[Top][All Lists]

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

Re: [gnugo-devel] gnugo-3.8 bug report

From: Gunnar Farnebäck
Subject: Re: [gnugo-devel] gnugo-3.8 bug report
Date: Wed, 7 Sep 2022 22:00:55 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0

Just turn off the warning or ignore it? This is clearly a false positive. Even the variable name indicates that xor is intended.


On 9/7/22 17:32, David Binderman wrote:
Hello there,

Gcc has recently been extended with the warning for xor
used as pow. So:


mkpat.c:1939:51: warning: result of '2^2' is 0; did you mean '1 << 2' (4)? 

Source code is

      int xor_att = (el[k].color == color ? ATT_O ^ ATT_O : ATT_O ^ ATT_X);

I assume you meant

      int xor_att = (el[k].color == color) ? (ATT_O ^ ATT_O) : (ATT_O ^ ATT_X);


mkpat.c:2005:55: warning: result of '2^1' is 3; did you mean '1 << 1' (2)? 



David Binderman

gnugo-devel mailing list

reply via email to

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