From e3978c521e11c70ab5900e489e96e0c0f82776ff Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Wed, 12 Jul 2023 01:02:19 -0500 Subject: [PATCH] bundled/tbb: fix compilation with gcc-13 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This fixes compilation with gcc-13 that complains about the unqualified identifier "task" changing meaning: it first refers to `class task` in the offending line and later is defined as a member function `task()`: ``` FAILED: bundled/tbb-2018_U2/src/CMakeFiles/bundled_tbb_release.dir/tbb/arena.cpp.o /usr/bin/c++ -DDO_ITT_NOTIFY -DNDEBUG -DUSE_PTHREAD -D__TBB_BUILD=1 -I/home/tamiko/workspace/dealii/build/bundled/tbb-2018_U2/src -I/home/tamiko/workspace/dealii/bundled/tbb-2018_U2/src -I/home/tamiko/workspace/dealii/bundled/tbb-2018_U2/src/../include -I/home/tamiko/workspace/dealii/bundled/tbb-2018_U2/src/rml/include -I/home/tamiko/workspace/dealii/build/include -I/home/tamiko/workspace/dealii/include -std=c++17 -fPIC -Wextra -Wmissing-braces -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wsuggest-override -Wswitch -Wsynth -Wwrite-strings -Wno-placement-new -Wno-deprecated-declarations -Wno-literal-suffix -Wno-psabi -Wno-class-memaccess -Wno-parentheses -Wno-unused-local-typedefs -Wno-implicit-fallthrough -Wno-stringop-overflow -Wno-deprecated-copy -fopenmp-simd -flifetime-dse=1 -O2 -funroll-loops -funroll-all-loops -fstrict-aliasing -MD -MT bundled/tbb-2018_U2/src/CMakeFiles/bundled_tbb_release.dir/tbb/arena.cpp.o -MF bundled/tbb-2018_U2/src/CMakeFiles/bundled_tbb_release.dir/tbb/arena.cpp.o.d -o bundled/tbb-2018_U2/src/CMakeFiles/bundled_tbb_release.dir/tbb/arena.cpp.o -c /home/tamiko/workspace/dealii/bundled/tbb-2018_U2/src/tbb/arena.cpp In file included from /home/tamiko/workspace/dealii/bundled/tbb-2018_U2/src/tbb/scheduler_common.h:43, from /home/tamiko/workspace/dealii/bundled/tbb-2018_U2/src/tbb/scheduler.h:24, from /home/tamiko/workspace/dealii/bundled/tbb-2018_U2/src/tbb/arena.cpp:23: /home/tamiko/workspace/dealii/bundled/tbb-2018_U2/src/../include/tbb/task.h:266:20: error: declaration of ‘tbb::task& tbb::internal::task_prefix::task()’ changes meaning of task’ [-Wchanges-meaning] 266 | tbb::task& task() {return *reinterpret_cast(this+1);} | ^~~~ /home/tamiko/workspace/dealii/bundled/tbb-2018_U2/src/../include/tbb/task.h:225:9: note: used here to mean ‘class tbb::task’ 225 | task* next_offloaded; | ^~~~ /home/tamiko/workspace/dealii/bundled/tbb-2018_U2/src/../include/tbb/task.h:33:7: note: declared here 33 | class task; | ^~~~ ``` --- bundled/tbb-2018_U2/include/tbb/task.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundled/tbb-2018_U2/include/tbb/task.h b/bundled/tbb-2018_U2/include/tbb/task.h index 0b04c6b98a..757195029c 100644 --- a/bundled/tbb-2018_U2/include/tbb/task.h +++ b/bundled/tbb-2018_U2/include/tbb/task.h @@ -222,7 +222,7 @@ namespace internal { #if __TBB_TASK_PRIORITY //! Pointer to the next offloaded lower priority task. /** Used to maintain a list of offloaded tasks inside the scheduler. **/ - task* next_offloaded; + tbb::task* next_offloaded; }; #endif /* __TBB_TASK_PRIORITY */ -- 2.39.5