From accda7408346cc992ff57af22090e9b4dfaa5da5 Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Thu, 31 Oct 2024 10:03:20 +0100 Subject: [PATCH] Remove unused member functions from deque_anchor Starting with clang 19, the unused member functions cas that take a deque_anchor fail to compile because they attempt to call load directly on the deque_anchor type, whereas they should be calling load on the atomic stored in the deque_anchor. Neither GCC nor clang until version 18 failed to compile the broken member functions (because they were unused they were never instantiatied). Since the functions are unused, simply remove them. Related llvm issue: https://github.com/llvm/llvm-project/issues/102177. --- .../include/pika/concurrency/deque.hpp | 41 ------------------- 1 file changed, 41 deletions(-) diff --git a/libs/pika/concurrency/include/pika/concurrency/deque.hpp b/libs/pika/concurrency/include/pika/concurrency/deque.hpp index 5eb8da8d1..83007ddd0 100644 --- a/libs/pika/concurrency/include/pika/concurrency/deque.hpp +++ b/libs/pika/concurrency/include/pika/concurrency/deque.hpp @@ -123,47 +123,6 @@ namespace pika::concurrency::detail { pair lrs(std::memory_order mo = std::memory_order_acquire) const { return pair_.load(mo); } - node* left(std::memory_order mo = std::memory_order_acquire) const - { - return pair_.load(mo).get_left_ptr(); - } - - node* right(std::memory_order mo = std::memory_order_acquire) const - { - return pair_.load(mo).get_right_ptr(); - } - - tag_t status(std::memory_order mo = std::memory_order_acquire) const - { - return pair_.load(mo).get_left_tag(); - } - - tag_t tag(std::memory_order mo = std::memory_order_acquire) const - { - return pair_.load(mo).get_right_tag(); - } - - bool cas(deque_anchor& expected, deque_anchor const& desired, - std::memory_order mo = std::memory_order_acq_rel) - { - return pair_.compare_exchange_strong(expected.load(std::memory_order_acquire), - desired.load(std::memory_order_acquire), mo); - } - - bool cas(pair& expected, deque_anchor const& desired, - std::memory_order mo = std::memory_order_acq_rel) - { - return pair_.compare_exchange_strong( - expected, desired.load(std::memory_order_acquire), mo); - } - - bool cas(deque_anchor& expected, pair const& desired, - std::memory_order mo = std::memory_order_acq_rel) - { - return pair_.compare_exchange_strong( - expected.load(std::memory_order_acquire), desired, mo); - } - bool cas( pair& expected, pair const& desired, std::memory_order mo = std::memory_order_acq_rel) {