No, the [cast patch](https://sqlite.org/src/info/6ff9673847c0b417) alone does not alter the way Embarcadero's C++ Builder compiles the [for loop](https://www.sqlite.org/src/info?name=afe8c2394cf6de2a&ln=676). However, the other two patches do fix the problem. The cast is not needed, but it does not hurt, either. To C++ Builder it makes no difference. There is just an (unrelated) "Warning W8004 fts5_aux.c 643: 'rc' is assigned a value that is never used in function fts5Bm25Function". At last, I noticed your fix takes into account a test for a `rc` return which I overlooked. Thanks for that, and for the fast answer!