]> https://gitweb.dealii.org/ - dealii.git/commitdiff
bundled/tbb: fix compilation with gcc-13 15725/head
authorMatthias Maier <tamiko@43-1.org>
Wed, 12 Jul 2023 06:02:19 +0000 (01:02 -0500)
committerMatthias Maier <tamiko@43-1.org>
Wed, 12 Jul 2023 06:04:50 +0000 (01:04 -0500)
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<tbb::task*>(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

index 0b04c6b98a450a8cb0743731076dd5067911fc91..757195029c35f1434bf6f5f8623c1dedacfffd7e 100644 (file)
@@ -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 */
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.