Skip to content

Commit dd3e0fa

Browse files
committed
build: Fix false positive CHECK_ATOMIC test for clang-15
1 parent 0de63b8 commit dd3e0fa

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

build-aux/m4/l_atomic.m4

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ dnl warranty.
77
# Clang, when building for 32-bit,
88
# and linking against libstdc++, requires linking with
99
# -latomic if using the C++ atomic library.
10-
# Can be tested with: clang++ test.cpp -m32
10+
# Can be tested with: clang++ -std=c++20 test.cpp -m32
1111
#
1212
# Sourced from http://bugs.debian.org/797228
1313

@@ -27,8 +27,11 @@ m4_define([_CHECK_ATOMIC_testbody], [[
2727
auto t1 = t.load();
2828
t.compare_exchange_strong(t1, 3s);
2929
30-
std::atomic<int64_t> a{};
30+
std::atomic<double> d{};
31+
d.store(3.14);
32+
auto d1 = d.load();
3133
34+
std::atomic<int64_t> a{};
3235
int64_t v = 5;
3336
int64_t r = a.fetch_add(v);
3437
return static_cast<int>(r);

0 commit comments

Comments
 (0)