[Openmp-commits] [PATCH] D105474: [openmp] [test] Add missing <limits> include to capacity_nthreads
Michał Górny via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Jul 6 05:01:08 PDT 2021
mgorny created this revision.
mgorny added reviewers: ronlieb, jdoerfert, tianshilei1992.
Herald added subscribers: jfb, guansong, yaxunl.
mgorny requested review of this revision.
Herald added a subscriber: sstefan1.
Otherwise the build against libstdc++ fails:
$ "clang++" "-fopenmp" "-pthread" "-I" "/home/mgorny/git/llvm-project/openmp/runtime/test" "-I" "/home/mgorny/git/llvm-project/build.libomp/runtime/src" "-L" "/home/mgorny/git/llvm-project/build.libomp/runtime/src" "-I" "/home/mgorny/git/llvm-project/openmp/runtime/test/ompt" "-std=c++14" "/home/mgorny/git/llvm-project/openmp/runtime/test/tasking/hidden_helper_task/capacity_nthreads.cpp" "-o" "/home/mgorny/git/llvm-project/build.libomp/runtime/test/tasking/hidden_helper_task/Output/capacity_nthreads.cpp.tmp" "-lm" "-latomic"
# command stderr:
/home/mgorny/git/llvm-project/openmp/runtime/test/tasking/hidden_helper_task/capacity_nthreads.cpp:12:31: error: no member named 'numeric_limits' in namespace 'std'
std::numeric_limits<int>::max());
~~~~~^
/home/mgorny/git/llvm-project/openmp/runtime/test/tasking/hidden_helper_task/capacity_nthreads.cpp:12:49: error: expected '(' for function-style cast or type construction
std::numeric_limits<int>::max());
~~~^
/home/mgorny/git/llvm-project/openmp/runtime/test/tasking/hidden_helper_task/capacity_nthreads.cpp:12:52: error: no member named 'max' in the global namespace
std::numeric_limits<int>::max());
~~^
3 errors generated.
error: command failed with exit status: 1
https://reviews.llvm.org/D105474
Files:
openmp/runtime/test/tasking/hidden_helper_task/capacity_nthreads.cpp
Index: openmp/runtime/test/tasking/hidden_helper_task/capacity_nthreads.cpp
===================================================================
--- openmp/runtime/test/tasking/hidden_helper_task/capacity_nthreads.cpp
+++ openmp/runtime/test/tasking/hidden_helper_task/capacity_nthreads.cpp
@@ -4,6 +4,7 @@
#include <algorithm>
#include <cassert>
+#include <limits>
#include <vector>
int main(int argc, char *argv[]) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105474.356682.patch
Type: text/x-patch
Size: 426 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210706/e6e7c8f0/attachment.bin>
More information about the Openmp-commits
mailing list