Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

ICPC 18 Update 1: _DecimalXXX not defined in dfp754.h with /Qintel-extensions-

jase439
Beginner
817 Views

In Intel 2018 Update 1 under VS2017 15.5.0:

Setting /Qintel-extensions- (disable Intel extensions) caused a flood of errors related to decimal floating point values referenced in dfp754.h:


Error        identifier "_Decimal32" is undefined    sstask    C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018\windows\compiler\include\dfp754.h    55    
Error        identifier "_Decimal64" is undefined    sstask    C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018\windows\compiler\include\dfp754.h    56    
Error        identifier "_Decimal128" is undefined    sstask    C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018\windows\compiler\include\dfp754.h    57    
Error        identifier "_Decimal32" is undefined    sstask    C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018\windows\compiler\include\dfp754.h    58    
Error        identifier "_Decimal64" is undefined    sstask    C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018\windows\compiler\include\dfp754.h    59    
Error        identifier "_Decimal128" is undefined    sstask    C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018\windows\compiler\include\dfp754.h    60    
Error        "_Decimal32" is not a type name    sstask    C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018\windows\compiler\include\dfp754.h    63    

This file is #included at the bottom of <math.h> which is a general purpose #include that should not be predicated upon the presence of Intel intrinsics and extensions. Many standard headers implicitly pull in math.h.

This behavior is new to ICC 18 and does not occur in prior releases.

The source of the error appears to be this preprocessor directive in dfp754.h:

#if (((defined __cplusplus) && ((defined(_GLIBCXX_DECIMAL)) || ((defined(__INTEL_COMPILER)) && ((defined(_WIN32)) || (defined(_WIN64)))))) || ((!defined __cplusplus) && (defined __STDC_WANT_DEC_FP__) && (defined __STDC_DEC_FP__)))

This clause "((defined(__INTEL_COMPILER)) && ((defined(_WIN32)) || (defined(_WIN64))))))" universally qualifies the inclusion of this header for all Windows targets.

Workaround:

Add /D__DFP754_H_INCLUDED to suppress inclusion of this header or enable Intel intrinsics and extensions.

 

0 Kudos
3 Replies
Jingwei_Z_Intel
Employee
817 Views

Hi Jason, 

Thank you for pointing out the issue and workaround. The problem will be fixed in Update 2.

Thanks,

Jingwei

0 Kudos
Vicente_Munuera__Pab
817 Views

Hi Jingwei and Jason,

I struggled with this issue, so for the sake of people's health, i'd say that you should on visual studio 2017:

add /D__DFP754_H_INCLUDED to Properties > C/C++ > Command line > Additional options

 

Cheers and thank you for your workaround Jason.

0 Kudos
muthulakshmi_s_
Beginner
817 Views

With new 2018 update i am getting the below error:

Unable to obtain mapped memory

** It was compiling properly in the older versions of Intel parallel studio, after upgrading to latest version IPS2018 Update Pack 1, i am facing this error.

Please let me know on how to resolve this on priority.

0 Kudos
Reply