Closed jgmbenoit closed 2 years ago
Actually adding the NaN at the end of the array should not be necessary because with the error check, the code will never go past the end of the array. The static analysers are smart enough to see this.
I have no idea how smart are analyzers and compilers (gcc
becomes more and more smart (and annoying)). On the other hand, it does not hurt to use NAN
as end-of-array flag.
Thanks a lot!
This patch fixes issue #37 as follows:: 1] it may silence sanitizers by adding a
NAN
to the concerned arrays; 2] it emit an error message when the number of pre-coded iterations is exceeded.