Compilation error on MSVC with strict floating-point in version 3.46.0
(1) By cjihrig on 2024-06-11 13:13:01 [source]
It appears that the compilation error in this issue has reoccurred in SQLite 3.46.0. Specifically, this commit reintroduces non-constant initializers.
(2) By Richard Hipp (drh) on 2024-06-11 13:23:55 in reply to 1 [link] [source]
Why do none of the developers see this error? Are you using an older version of MSVC that contains a bug? Or are you activating some compile-time option that we are unaware of that makes MSVC complain about constant expressions used as variable initializers?
(3) By cjihrig on 2024-06-11 14:27:21 in reply to 2 [link] [source]
I will try to get more details. I don't have access to Windows myself. I am integrating SQLite into the Node.js project and started seeing the compilation error in the CI after upgrading to 3.46.0. The failing build is happening on an ARM64 machine running Visual Studio 2022 (MSVC 14.39.33519).
(4) By LiquidBacn (bjvanderklippe) on 2024-07-02 14:12:57 in reply to 2 [link] [source]
MSVC is odd about compiling floats due to potential differences between systems and floating point calculations.
Specifically the /fp:strict
flag was mentioned in the linked forum post.
Maybe the static analysis under Windows should be updated to include this flag?
It's been mentioned that readability is worse with it, which is fair. But also solvable with a couple of comments.