From 186118c32e951099a1046df5515be956f46152e2 Mon Sep 17 00:00:00 2001 From: Anton Potapov Date: Fri, 18 Jun 2021 16:58:16 +0300 Subject: [PATCH] Fix GCC 11 warnings Signed-off-by: Anton Potapov --- include/oneapi/tbb/detail/_concurrent_unordered_base.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/oneapi/tbb/detail/_concurrent_unordered_base.h b/include/oneapi/tbb/detail/_concurrent_unordered_base.h index 3abcce2b29..877ac2a3d4 100644 --- a/include/oneapi/tbb/detail/_concurrent_unordered_base.h +++ b/include/oneapi/tbb/detail/_concurrent_unordered_base.h @@ -910,6 +910,10 @@ class concurrent_unordered_base { // Deallocate the memory node_allocator_traits::deallocate(dummy_node_allocator, node, 1); } else { + // GCC 11.1 issues a warning here that incorrect destructor might be called for dummy_nodes + #if (__TBB_GCC_VERSION >= 110100 && __TBB_GCC_VERSION < 120000 ) && !__clang__ && !__INTEL_COMPILER + volatile + #endif value_node_ptr val_node = static_cast(node); value_node_allocator_type value_node_allocator(my_segments.get_allocator()); // Destroy the value