[PATCH] D42411: [test-suite] Fix ambigous call to overloaded function isnan
Simon Dardis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 23 03:16:25 PST 2018
sdardis created this revision.
sdardis added a reviewer: hfinkel.
Older versions of glibc expose isnan as C99 macros and C++ functions, causing
a compilation failure of the CLAMR benchmark. Address this by explicitly calling
the c++ version of this function.
For reference: https://sourceware.org/bugzilla/show_bug.cgi?id=19439,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48891
Repository:
rT test-suite
https://reviews.llvm.org/D42411
Files:
MultiSource/Benchmarks/DOE-ProxyApps-C++/CLAMR/clamr_cpuonly.cpp
Index: MultiSource/Benchmarks/DOE-ProxyApps-C++/CLAMR/clamr_cpuonly.cpp
===================================================================
--- MultiSource/Benchmarks/DOE-ProxyApps-C++/CLAMR/clamr_cpuonly.cpp
+++ MultiSource/Benchmarks/DOE-ProxyApps-C++/CLAMR/clamr_cpuonly.cpp
@@ -499,7 +499,7 @@
int error_status = STATUS_OK;
- if (isnan(H_sum)) {
+ if (::isnan(H_sum)) {
printf("Got a NAN on cycle %d\n",ncycle);
error_status = STATUS_NAN;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42411.131025.patch
Type: text/x-patch
Size: 475 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180123/47e1b0ff/attachment.bin>
More information about the llvm-commits
mailing list