> My understanding of that syntax is that it is a compiler memory barrier, not a CPU memory barrier because the asm block is empty (no sfence or mfence).
In C11, you can write compiler-only fences with atomic_signal_fence:
https://en.cppreference.com/w/c/atomic/atomic_signal_fence
(In practice, though, I think it is rare that you actually want a compiler-only fence. Instead, correct use of acquire/release operations prevents reorderings.)