Re:Everything in C is undefined behavior
by mananaysiempre on Wednesday May 20, 2026 @06:05AM
(#48205424)
Not from the standard’s point of view. The traditional (in some circles) use of volatile for atomic variables was not sanctioned by the C11/C++11 thread model; if you want an atomic, write atomic, not volatile, or be aware of your dependency on a compiler (like MSVC) that explicitly amends the language definition so as to allow cross-thread access to volatile variables.
[ Parent
| on HN ]
Thread was a poor choice of word. Outside the control of the program is a better way to put it. Like memory mapped io.