]> granicus.if.org Git - libatomic_ops/commitdiff
Disable workaround in stack_pop_acquire that was needed for ancient Clang
authorIvan Maidanski <ivmai@mail.ru>
Fri, 8 Dec 2017 06:58:05 +0000 (09:58 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 8 Dec 2017 06:58:05 +0000 (09:58 +0300)
* 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

index a957642ba5bb542625f8654a6bd4cd9d461adad5..e43ba3d17c9dcad41a1a2daff21b9a71b6dd8b69 100644 (file)
@@ -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.    */