From 40cce5ab66471c693ce7b7d0ad141a5cbe81870c Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Fri, 8 Dec 2017 09:58:05 +0300 Subject: [PATCH] Disable workaround in stack_pop_acquire that was needed for ancient Clang * src/atomic_ops_stack.c [!USE_ALMOST_LOCK_FREE && AO_HAVE_compare_double_and_swap_double && __clang__] (AO_stack_pop_acquire): Do not declare cptr local variable as volatile if AO_CLANG_PREREQ(3, 5). --- src/atomic_ops_stack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/atomic_ops_stack.c b/src/atomic_ops_stack.c index b57ed85..b607c74 100644 --- a/src/atomic_ops_stack.c +++ b/src/atomic_ops_stack.c @@ -230,7 +230,7 @@ void AO_stack_push_release(AO_stack_t *list, AO_t *element) AO_ATTR_NO_SANITIZE_THREAD AO_t *AO_stack_pop_acquire(AO_stack_t *list) { -# ifdef __clang__ +# if defined(__clang__) && !AO_CLANG_PREREQ(3, 5) AO_t *volatile cptr; /* Use volatile to workaround a bug in */ /* clang-1.1/x86 causing test_stack failure. */ -- 2.40.0