From: Ivan Maidanski Date: Fri, 8 Dec 2017 06:58:05 +0000 (+0300) Subject: Disable workaround in stack_pop_acquire that was needed for ancient Clang X-Git-Tag: v7.6.2~31 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=40cce5ab66471c693ce7b7d0ad141a5cbe81870c;p=libatomic_ops 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). --- 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. */