Change test to use const variables instead of macros
authorJonathan Wakely <jwakely@redhat.com>
Mon, 11 Mar 2019 13:46:09 +0000 (13:46 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 11 Mar 2019 13:46:09 +0000 (13:46 +0000)
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.

From-SVN: r269585

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc

index 4d99b05f3eca3516494a4837cf6188d85e510cd8..9c5b1bbaf7a94a10e84e6afd29e33510523474f7 100644 (file)
@@ -1,5 +1,8 @@
 2019-03-11  Jonathan Wakely  <jwakely@redhat.com>
 
+       * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
+       const variables instead of macros.
+
        PR libstdc++/89629
        * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
        Use correct type for len_aligned.
index e05b7a5fd6e211a991567178ce3f6a891a4d7c6b..568d0d7d0070c5ed22df95ac39babe4f46c8e18d 100644 (file)
@@ -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()
 {