Skip to content

What volatile Actually Governs: It Holds Back the Compiler, Not Data Races ​

volatile may be the most misunderstood keyword in C++. This topic covers only what it actually governs: restraining the compiler from merging, deleting, or reordering memory accesses. Data races are none of its business, and disassembly draws the boundary.

pdf-latest-41-gc317b3f · c317b3f · 2026-10-24