VisualStudio 2022: C4746 concerning "volatile" triggers under ARM64
(1) By treh (tobireh) on 2021-11-15 14:42:37 [link] [source]
When compiling the sqlite3 source code in the recently released VisualStudio 2022 for ARM64 with warning C4746 enabled, this triggers
in numerours lines.
error C4746: volatile access of '<expression>' is subject to /volatile:<iso|ms> setting; consider using __iso_volatile_load/store intrinsic functions
Does this need attention or is sqlite already designed to work without the additional memory fences that are added in the /volatile:ms mode? In the latter case, might it be a good idea disable C4746 via
- Visual Studio 2022 -> New Project -> Console App
- Add sqlite3.c (almalgamtion) to the source files
- In the configuration drop-down (set to
x64by default), click "Configuration Manager"
- Active Solution Platform -> "<New...>"
ARM64, Copy from
- [OK], [CLOSE]
- Right Click on Project in the Solution Explorer
- Properties -> "C/C++" -> Advanced
- Treat Specific Warnings as Errors: 4746
(2) By Gunter Hick (gunter_hick) on 2021-11-18 13:34:10 in reply to 1 [source]
Maybe you will get more traffic if you include the exact version of SQLite you are attempting to compile and some of the actual warning messages.