SQLite Forum

VisualStudio 2022: C4746 concerning "volatile" triggers under ARM64
Login
When compiling the sqlite3 source code in the recently released VisualStudio 2022 for ARM64 with warning [C4746](https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-c4746?view=msvc-170) enabled, this triggers
```
error C4746: volatile access of '<expression>' is subject to /volatile:<iso|ms> setting; consider using __iso_volatile_load/store intrinsic functions
```
in numerours lines.

Does this need attention or is sqlite already designed to work without the additional memory fences that are added in the [/volatile](https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-c4746?view=msvc-170):ms mode? In the latter case, might it be a good idea disable C4746 via `#pragma warning`?

Repro:

 * Visual Studio 2022 -> New Project -> Console App
 * Add sqlite3.c (almalgamtion) to the source files
 * In the configuration drop-down (set to `x64` by default), click "Configuration Manager"
  - Active Solution Platform -> "<New...>"
  - `ARM64`, Copy from `x64`
  - [OK], [CLOSE]
 * Right Click on Project in the Solution Explorer
  - Properties -> "C/C++" -> Advanced 
  - Treat Specific Warnings as Errors: 4746
  - [OK]
 * Compile