]> https://gitweb.dealii.org/ - dealii.git/commit
bundled/tbb: fix compilation with gcc-13 15726/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:09:17 +0000 (01:09 -0500)
commit373de71f4780e933a77db063c39a3b7799a66a8f
tree68274cdfc1099db7a14f124ac530bbf5ccd613ff
parent6964660ba83314cf16382c5cf03f9033248bbbd8
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<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

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.