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-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4771445b888bb3bff6e43c3df97e730212d79fb3;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 a957642..e43ba3d 100644 --- a/src/atomic_ops_stack.c +++ b/src/atomic_ops_stack.c @@ -235,7 +235,7 @@ void AO_stack_push_release(AO_stack_t *list, AO_t *element) 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. */