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);
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.
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() 3'000'000) ; begin(Container ), end(Container), 1);
{
vector<long int> Container(
iota(
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 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: 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.’
In file included from /usr/include/
/usr/include/
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.