diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2019-03-11 13:46:09 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2019-03-11 13:46:09 +0000 |
commit | 355d4eb36aeb970743537e2f9b98d4c53c9e0eab (patch) | |
tree | 7896c9d80c03dd4e95bc7bb311138f75f39e5b44 | |
parent | 1a823c9ae986d2d45e6aa7867c4c8e3c200e0b5c (diff) | |
download | gcc-355d4eb36aeb970743537e2f9b98d4c53c9e0eab.zip gcc-355d4eb36aeb970743537e2f9b98d4c53c9e0eab.tar.gz gcc-355d4eb36aeb970743537e2f9b98d4c53c9e0eab.tar.bz2 |
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.
From-SVN: r269585
-rw-r--r-- | libstdc++-v3/ChangeLog | 3 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 4d99b05..9c5b1bba 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -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. 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 e05b7a5..568d0d7 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() { |