Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libcxx/include/stdatomic.h | ||
---|---|---|
2 | Copy-paste of wchar.h. |
libcxx/include/stdatomic.h | ||
---|---|---|
2 | Thanks for pointing this. I'll fix it in the next revision. |
Does it line up property with ./clang/lib/Headers/stdatomic.h ? I think this other header might need some adjustment as well, for example the hosted/freestanding part.
I haven't found anything really different from https://github.com/llvm/llvm-project/blob/main/clang/lib/Headers/stdatomic.h.
There are some differences because e.g. ATOMIC_VAR_INIT, atomic_init, kill_dependency aren't mentioned in the paper, but nothing crucial IMO.
Concerning hosted/freestanding, I'm not sure I know what should be verified/done. The clang/lib/Headers/stdatomic.h just includes system's stdatomic.h in hosted env. when available.
What I am more afraid of is rather incompatibilities between C's _Atomic and C++'s atomic.
I haven't tested it extensively, but there were at least some differences in sizeof. And the standard (strongly) recommends to make them compatible (cf. https://eel.is/c++draft/stdatomic.h.syn#4).
libcxx/include/stdatomic.h | ||
---|---|---|
133 | Should I use ::_VSTD::atomic<T> or should we go for changing _VSTD to ::std? Or is it not worth the trouble? | |
libcxx/test/std/atomics/stdatomic.h.syn/types.pass.cpp | ||
21 | Anyone has an idea about this? Is this an omission in the standard (given that it includes atomic_char8_t) or it should match C11 and so omit both ATOMIC_CHAR8_T_LOCK_FREE and atomic_char8_t? |