[libcxx-commits] [libcxx] a30a794 - [libc++] Fix broken stdatomic test on GCC
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Feb 15 06:26:33 PST 2022
Author: Louis Dionne
Date: 2022-02-15T09:26:27-05:00
New Revision: a30a7948d59470fe9403102b192b3e7ddaf21849
URL: https://github.com/llvm/llvm-project/commit/a30a7948d59470fe9403102b192b3e7ddaf21849
DIFF: https://github.com/llvm/llvm-project/commit/a30a7948d59470fe9403102b192b3e7ddaf21849.diff
LOG: [libc++] Fix broken stdatomic test on GCC
The test would trigger -Wtautological-compare. I think that the little
we gain from comparing addresses isn't worth the added complexity to
work around the warning.
Added:
Modified:
libcxx/test/std/atomics/stdatomic.h.syn/types.compile.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/test/std/atomics/stdatomic.h.syn/types.compile.pass.cpp b/libcxx/test/std/atomics/stdatomic.h.syn/types.compile.pass.cpp
index 82ee041902f9a..6d2f810f0163b 100644
--- a/libcxx/test/std/atomics/stdatomic.h.syn/types.compile.pass.cpp
+++ b/libcxx/test/std/atomics/stdatomic.h.syn/types.compile.pass.cpp
@@ -142,12 +142,12 @@ void f() {
static_assert(std::is_same_v<std::atomic<const long>, _Atomic(const long)>);
static_assert(std::is_same_v<std::memory_order, ::memory_order>);
- static_assert(&std::memory_order_relaxed == &::memory_order_relaxed);
- static_assert(&std::memory_order_consume == &::memory_order_consume);
- static_assert(&std::memory_order_acquire == &::memory_order_acquire);
- static_assert(&std::memory_order_release == &::memory_order_release);
- static_assert(&std::memory_order_acq_rel == &::memory_order_acq_rel);
- static_assert(&std::memory_order_seq_cst == &::memory_order_seq_cst);
+ static_assert(std::memory_order_relaxed == ::memory_order_relaxed);
+ static_assert(std::memory_order_consume == ::memory_order_consume);
+ static_assert(std::memory_order_acquire == ::memory_order_acquire);
+ static_assert(std::memory_order_release == ::memory_order_release);
+ static_assert(std::memory_order_acq_rel == ::memory_order_acq_rel);
+ static_assert(std::memory_order_seq_cst == ::memory_order_seq_cst);
static_assert(std::is_same_v<std::atomic_flag, ::atomic_flag>);
More information about the libcxx-commits
mailing list