mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-03-02 23:18:44 +00:00
c.inc (AFAICT erroneously) defined _Atomic(t) as `volatile t *`, when it should have just said `volatile t`, when __STDC_VERSION__ was too small. This happens when we’re compiling C++, but in C++11, _Atomic is a define supplied by the STL rather than a keyword supplied by the compiler. Wait though, it gets better: in C++11, _Atomic hooks you into the morass that is stdatomic.h, and ultimately refers everything back to std::atomic<T>. The gory, horrifying details are in libcxx's __atomic/cxx_atomic_impl.h. The tldr is that for our purposes it’s fine to just say volatile and use the normal libc/intrin/atomic.h functions. |
||
---|---|---|
.. | ||
c.inc | ||
cxx.inc | ||
cxxtypescompat.inc | ||
llp64.inc | ||
lp64.inc | ||
lp64arg.inc | ||
normalize.inc |