This is C++ so there's no reason to use macros here.
* testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
const variables instead of macros.
Tested x86_64-linux, committed to trunk.
commit 1eadaf7d34cfaaabb976e68a2fe163aab774463b
Author: Jonathan Wakely <[email protected]>
Date: Mon Mar 11 13:17:41 2019 +0000
Change test to use const variables instead of macros
This is C++ so there's no reason to use macros here.
* testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
const variables instead of macros.
diff --git
a/libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc
b/libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc
index e05b7a5fd6e..568d0d7d007 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc
@@ -25,8 +25,8 @@
#include <atomic>
-#define ACQ memory_order_acquire | __memory_order_hle_acquire
-#define REL memory_order_release | __memory_order_hle_release
+const auto ACQ = std::memory_order_acquire | std::__memory_order_hle_acquire;
+const auto REL = std::memory_order_release | std::__memory_order_hle_release;
int main()
{