From: Matthias Maier Date: Wed, 12 Jul 2023 06:02:19 +0000 (-0500) Subject: bundled/tbb: fix compilation with gcc-13 X-Git-Tag: relicensing~693^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F15725%2Fhead;p=dealii.git bundled/tbb: fix compilation with gcc-13 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; | ^~~~ ``` --- 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 */