mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-06 10:53:50 +08:00
Silence "may be used uninitialized" GCC 15 warning
closes https://github.com/official-stockfish/Stockfish/pull/6083 No functional change
This commit is contained in:
committed by
Joost VandeVondele
parent
4f021cab3b
commit
c13c1d2c30
@@ -33,12 +33,16 @@
|
||||
namespace Stockfish::Eval::NNUE {
|
||||
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#if __GNUC__ >= 13
|
||||
#define sf_assume(cond) __attribute__((assume(cond)))
|
||||
#else
|
||||
#define sf_assume(cond) \
|
||||
do \
|
||||
{ \
|
||||
if (!(cond)) \
|
||||
__builtin_unreachable(); \
|
||||
} while (0)
|
||||
#endif
|
||||
#else
|
||||
// do nothing for other compilers
|
||||
#define sf_assume(cond)
|
||||
|
||||
Reference in New Issue
Block a user