Quantcast
Channel: Intel Developer Zone Articles
Viewing all articles
Browse latest Browse all 3384

limits(1120): error : identifier "__builtin_nanf" is undefined

$
0
0
Reference Number : DPD200577079
Version :
  • Intel Parallel Studio XE 2015 Composer Edition or higher for C++ Windows with Visual Studio 2015 Update 1 only
  • Intel Parallel Studio XE 2016 Composer Edition or higher for C++ Windows with Visual Studio 2015 Update 1 only
Operating System : Windows
Problem Description :
With recently released Microsoft* Visual Studio 2015* update1, it changed the following builtin intrinsics into macros:
  • __builtin_huge_val
  • __builtin_huge_valf
  • __builtin_nan
  • __builtin_nanf
  • __builtin_nans
  • __builtin_nansf
With this change when building a program that uses the "<limit>" header file from Visual Studio 2015 Update 1 with the Intel C++ compiler from above products, the following errors will be emitted:
  nq-cilk.cpp
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\limits(1115): error : identifier "__builtin_huge_valf" is undefined
           return (__builtin_huge_valf());
                   ^
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\limits(1120): error : identifier "__builtin_nanf" is undefined
           return (__builtin_nanf("0"));
Resolution Status :

This issue has been reported and worked on. Please use the following workaround.

1) For command line build, add following to the compiler options:
-D__builtin_huge_val()=HUGE_VAL -D__builtin_huge_valf()=HUGE_VALF -D__builtin_nan=nan -D__builtin_nanf=nanf -D__builtin_nans=nan -D__builtin_nansf=nanf

2) For building with Visual Studio 2015 IDE, open project's properties dialog and select C/C++ > Preprocessor add the following definitions to the "Preprocessor Definitions" for all the project configurations:

__builtin_huge_val()=HUGE_VAL
__builtin_huge_valf()=HUGE_VALF
__builtin_nan=nan
__builtin_nanf=nanf
__builtin_nans=nan
__builtin_nansf=nanf

 


Viewing all articles
Browse latest Browse all 3384

Trending Articles



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