&gt;It seems keywords are added to ensure serialization&#x2F;atomicity, then compilers find a way to optimize it away&#x2F;make it useless<p>No, what happens is keywords (or more broadly, semantics) are added which provide certain guarantees given certain preconditions. Then, developers write code that depends on those guarantees and fails to meet the preconditions, but happens to work anyway. At some point, the implementation adds some optimization which -- while still providing the appropriate guarantees when the preconditions are met -- breaks that code.<p>I know C and C++ can be a royal pain in the ass sometimes, but I have little sympathy for developers who flip the &quot;I know what I&#x27;m doing, please assume my code is right and make it run fast&quot; switch, then get upset with the compiler when it turns out that their code actually _isn&#x27;t_ right and the compiler performs an optimization they weren&#x27;t expecting. If you don&#x27;t want the compiler to reorder your memory access, then don&#x27;t fuck around with the memory_order flags.