Quantcast
Channel: Intel® Software - Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1175

icpc 18.0.1 for Mac breaks cmath

$
0
0

I just upgraded to Intel C++ version 18.0.1 and discovered that cmath is apparently broken. The simple program

#include <cmath>
int main(int argc,char **argv)
{
    double x = 0.0/0.0;
    if (std::isnan(x)) return 0;
    else return 1;

}

will not compile (it would for previous versions of Intel and works fine for GNU). The error message I get is

icpc isnan.cc

isnan.cc(5): error: expected an identifier
      if (std::isnan(x)) return 0;

I get the same error for other floating point checks like std::isfinite().

 


Viewing all articles
Browse latest Browse all 1175

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>