[libcxx-commits] [PATCH] D97044: [libc++] [C++2b] [P0943] Add stdatomic.h header.
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri May 13 13:13:22 PDT 2022
ldionne added a comment.
@dblaikie @rnk
Thanks both for your heads up. Could you perhaps share the error messages you were seeing (and ideally how you were building these TUs)?
================
Comment at: libcxx/include/stdatomic.h:234-236
+# ifdef _LIBCPP_ATOMIC
+# error <stdatomic.h> is incompatible with <atomic> before C++23. Please compile with -std=c++23.
+# endif
----------------
I suspect this is the issue. This might be too aggressive.
Before C++23, if you include `<stdatomic.h>` and then `<atomic>`, things break inside `<atomic>` in horrible ways. We have an error message in `<atomic>` to catch that. However, if you include `<atomic>` AND THEN `<stdatomic.h>`, perhaps things just work, and we don't need to flag anything like we try to do here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97044/new/
https://reviews.llvm.org/D97044
More information about the libcxx-commits
mailing list