I wanted to see if GnuChess, which was converted to BCX 20 years ago, could compile with our
latest tools. After about an hour of editing, the latest BCX produced C source that compiled without
warnings or errors with Lcc-Win32.
If I remove intrin.h (unused) from BcxChess.c, Pelles v11 also compiles, with only a
handful of warnings. Then the program seems to run okay but I didn't test every aspect of it.
bcxchess.c(1872): warning #2243: Check precedence for operator '&'; use parentheses to clarify.
bcxchess.c(2040): warning #2243: Check precedence for operator '|'; use parentheses to clarify.
bcxchess.c(2338): warning #2243: Check precedence for operator '&'; use parentheses to clarify.
bcxchess.c(2401): warning #2243: Check precedence for operator '&'; use parentheses to clarify.
bcxchess.c(5623): warning #2808: Operation on 'a' may be undefined.
bcxchess.c(5637): warning #2808: Operation on 'a' may be undefined.
The point to this bug report:
If intrin.h is not removed from BcxChess.c, the following errors occur:
C:\Pellesc\Include\xmmintrin.h(286): error #2120:
Redeclaration of '_mm_prefetch', previously declared at C:\Pellesc\Include\Win\winnt.h(2707);
expected 'void __cdecl function(const char *, int)' but found 'void __cdecl function(char *, int)'.
C:\Pellesc\Include\intrin.h(269): error #2120:
Redeclaration of '_bittest', previously declared at C:\Pellesc\Include\Win\winnt.h(2317);
expected 'unsigned char __cdecl function(const long int *, long int)' but found 'unsigned char __cdecl function(long int *, long int)'.
C:\Pellesc\Include\intrin.h(92): error #2120:
Redeclaration of 'strlen', previously declared at C:\Pellesc\Include\string.h(38);
expected 'unsigned int __cdecl function(const char *)' but found 'unsigned int __cdecl function(char *)'.
C:\Pellesc\Include\intrin.h(93): error #2120:
Redeclaration of 'strcpy', previously declared at C:\Pellesc\Include\string.h(36);
expected 'char * __cdecl function(char * restrict, const char * restrict)' but found 'char * __cdecl function(char * restrict, char * restrict)'.
C:\Pellesc\Include\intrin.h(94): error #2120:
Redeclaration of 'strcmp', previously declared at C:\Pellesc\Include\string.h(35);
expected 'int __cdecl function(const char *, const char *)' but found 'int __cdecl function(char *, char *)'.
C:\Pellesc\Include\intrin.h(97): error #2120:
Redeclaration of 'wcslen', previously declared at C:\Pellesc\Include\wchar.h(96);
expected 'unsigned int __cdecl function(const wchar_t *)' but found 'unsigned int __cdecl function(wchar_t *)'.
C:\Pellesc\Include\intrin.h(98): error #2120:
Redeclaration of 'wcscpy', previously declared at C:\Pellesc\Include\wchar.h(88);
expected 'wchar_t * __cdecl function(wchar_t * restrict, const wchar_t * restrict)' but found 'wchar_t * __cdecl function(wchar_t * restrict, wchar_t * restrict)'.
C:\Pellesc\Include\intrin.h(99): error #2120:
Redeclaration of 'wmemcpy', previously declared at C:\Pellesc\Include\wchar.h(112);
expected 'wchar_t * __cdecl function(wchar_t * restrict, const wchar_t * restrict, unsigned int)' but found 'wchar_t * __cdecl function(wchar_t * restrict, wchar_t * restrict, unsigned int)'.
It's not a big deal but I thought it was worth reporting. - Thanks!