Hi, All. I just tried to compile a C++ program with _Quad keyword in Visual Studio 2017 using ICC 18 update 3. I added "/Qoption,cpp,--extended_float_type" to project additional compiler options. However, ICC emit "E0020: identifier "_Quad" is undefined" error message. I searched ICC 18 Developer Guide and Reference relating to quadruple precision float topic and couldn't find anything. Is "_Quad" keyword still supported in ICC 18, or I made a mistake in compiler options? Appreciate for assistance.
- Development Tools
- Intel® C++ Compiler
- Intel® Parallel Studio XE
- Intel® System Studio
- Parallel Computing
Thank you for the reply. Here are compiler options I set on VS 2017. I put "/Qoption,cpp,--extended_float_type" in additional options. Did I make everthing correct?
Thank you. However, I tried both "-Qoption,cpp,--extended_float_types" and "/Qoption,cpp,--extended_float_types", still no luck. It looks that ICC receive "/Qoption" settings without issue any warning even if unacceptable, while in microsoft compiler, it will generate the following warning: "cl : Command line warning D9002: ignoring unknown option '/Qoption,cpp,--extended_float_types' ". Looks like I really got stucked with quadruple-precision float in ICC in windows. I haven't got any chance to try linux version through.
Nie, Sean wrote:
"cl : Command line warning D9002: ignoring unknown option '/Qoption,cpp,--extended_float_types' ".
This warning means that you are using CL (MS compiler) but not ICL (Intel compiler). Check that you chose Intel C++ Compiler for your project.
Dear Olga, the build was done in ICC, not in MS CL. The purpose of quoting CL warning is to show that ICC does not display any warnings in either '/Qoption,cpp,--extended_float_types' or '/Qoption,cpp,--extended_float_type' option. Since no warnings displayed, it is deemed to get accepted. However, the result doesn't come out as expected. ICC always complain that '_Quad' keyword is undefined. Thanks.
ICC emit "E0020: identifier "_Quad" is undefined" error message.
Looks like now I understand. You see this error in the Error List like the first one on the picture, right?
Then this is not ICL that emits this error but MS IntelliSense that tries to find syntax errors in your code. I bet you have Build+IntelliSense option to show issues in Error List (like on my pic). You can choose Build Only option to stop displaying errors found by IntelliSense.
You should look for build errors marked by the red crossed circle that would show real problem in case you don't use correct "-Qoption,cpp,--extended_float_types" option.
Thank you so much for the help. I didn't notice that "E00xx" error was generated by intellisense. After selecting "Build only" option, I find the real errors during build process shown in the screen capture. I'm using boost::multiprecision::float128. The following errors seems to be some incompatibility problems with boost::multiprecision::float128 library. I searched in stackoverflow.com, and can't find a solution.
Dear Olga, finally I make it work. My findings are:
a) both "-Qoption,cpp,--extended_float_type" and "-Qoption,cpp,--extended_float_types" (with or without 's') are ok for ICC.
b) "-DBOOST_MATH_USE_FLOAT128" option shall NOT be used, because the compiler will look for __float128 keyword of gnu "quadmath.h", not the "_Quad" keyword.
c) Looks like ICC quad math library does not support "fmaq", "signbitq", "remainderq" and "remquoq" functions any more. After commenting the code block in boost float128.hpp where those four functions invoked, the float128 example code at https://www.boost.org/doc/libs/1_67_0/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/float128.html can be compiled with success. However, the output differs in the last four decimal bits from that of gcc quadmath:
0.693147180559945309417232121458176614 vs. 0.693147180559945309417232121458176575 for log(2)
4.02387260077093773543702433923003973e+2564 vs. 4.02387260077093773543702433923004111e+2564 for tgamma(2)
a) Is the descrepancy due to disable above four functions?
b) Does Intel use different name for above four functions?
c) Does this lead to a recommended revision for boost::multiprecision::float128?
Thank you so much for your help.
- OS: Windows 10 x64 1803
- Visual studio 2017 15.7.3
- Intel C++ compiler 18.0 update 3