https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101228
Bug ID: 101228 Summary: #include <execution> triggers Intel TBB warning for tbb/task.h Product: gcc Version: 11.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: kip at thevertigo dot com Target Milestone: --- I've managed to reproduce this issue on two different machines, one amd64 and the other ppc64le. Both were using g++-11 (Ubuntu 11.1.0-1ubuntu1~21.04) 11.1.0. Here is a minimal: #include <algorithm> #include <execution> using namespace std; int main() { vector<long int> Container(3'000'000); iota(begin(Container), end(Container), 1); sort(execution::par, begin(Container), end(Container)); return 0; } Compiling raises the following pragma in header generated warning: $ g++-11 test.cpp -o test -Wall -Werror -std=c++17 -ltbb && ./test In file included from /usr/include/c++/11/pstl/parallel_backend_tbb.h:26, from /usr/include/c++/11/pstl/parallel_backend.h:20, from /usr/include/c++/11/pstl/algorithm_impl.h:22, from /usr/include/c++/11/pstl/glue_execution_defs.h:50, from /usr/include/c++/11/execution:32, from test.cpp:4: /usr/include/tbb/task.h:21:139: note: ‘#pragma message: TBB Warning: tbb/task.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.’ 21 | ("TBB Warning: tbb/task.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.") | ^ Compiling again with #define TBB_SUPPRESS_DEPRECATED_MESSAGES 1 prepended to the beginning and the warning disappears. This appears to have crept in some how with the 11 series. The <execution> header is indirectly including some deprecated Intel header from the TBB library.