For a long time I haven't been building a 32 bits version of my program (Bobcat), only 64 bits. Now I'm trying to build a 32 bit version again and ran into the following issue.
In my Search.h I have:
Code: Select all
protocol->postPv(search_depth/2, max_ply, node_count, nodesPerSecond(), timeUsed(), transt->getLoad(), score, pv);
Code: Select all
virtual void postPv(int depth, int max_ply, uint64 node_count, uint64 nodes_per_second, uint64 time, int hash_full, int score, const char* pv);
And the implementation just writes an UCI info command to stdout. In 64 bits compile this gives an output like:
Code: Select all
info depth 1 seldepth 1 score cp 7 hashfull 0 nodes 2 nps 2000 time 1 pv a2a3
Code: Select all
info depth 1 seldepth 1 score cp 7 hashfull 0 nodes 2 nps 0 time 2000 pv (null)
Am I overlooking something obvious, or is this a compiler bug or is mixing int's with unsigned __int64's undefined? I cannot find anything about this issue on internet.
BTW. making all arguments of type uint64 solves it, but am just curious what is going on.
Gunnar