Mind your language

Discussion of chess software programming and technical issues.

Moderator: Ras

OliverBr
Posts: 817
Joined: Tue Dec 18, 2007 9:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch

Re: Mind your language

Post by OliverBr »

petero2 wrote: Wed Jul 23, 2025 1:16 pm What about viewtopic.php?p=973106#p973106
Yes. That was a bug (albeit without consequences). So there is undefined behavior... from the programmer :roll:
But also from the compiler, because I never got a warning (or used the wrong options).
I guess there are more bugs in the code. 8-)
There is a nasty a with TT-hashtables and repetition. But this has little to do with the programming language, because it also happens in the Java version of a OliThink.

Of course, Java is quite strict on those undefined behaviors. Uninitialized variables are not allowed, you don't have access to free pointers and access to arrays is being checked with IndexOutOfBoundExcpetions thrown.
Chess Engine OliThink: http://brausch.org/home/chess
OliThink GitHub:https://github.com/olithink