Boost logo

Boost :

Subject: [boost] checking __INTEL_COMPILER == 9999
From: Blower, Melanie (melanie.blower_at_[hidden])
Date: 2015-11-13 14:45:35


 A few years ago, circa 2010, the Intel 12.x compiler was released without having a correct value for the macro __INTEL_COMPILER. It was released using the development-only version number 9999 instead of the correct value 12xx. Later on, an Intel 12.x compiler was updated to remove this problem and the version number made correct.

Meanwhile, since boost needed to add some workarounds, there was code added in a couple of boost files to check for version 9999. The check for 9999 in boost causes trouble in our current development compiler in-house testing. Is it possible to have this version checking removed from the boost sources? There's no advantage to boost users, and possibly a disadvantage if someone is still using a not-updated 12.x compiler. But hopefully that is unlikely, we're currently shipping our 16.x compiler.

Here's the diff,

diff --git a/include/boost/config/compiler/intel.hpp b/include/boost/config/compiler/intel.hpp
index 7789b94..bbbf876 100644
--- a/include/boost/config/compiler/intel.hpp
+++ b/include/boost/config/compiler/intel.hpp
@@ -47,11 +47,7 @@
 #undef BOOST_COMPILER

 #if defined(__INTEL_COMPILER)
-#if __INTEL_COMPILER == 9999
-# define BOOST_INTEL_CXX_VERSION 1200 // Intel bug in 12.1.
-#else
 # define BOOST_INTEL_CXX_VERSION __INTEL_COMPILER
-#endif
 #elif defined(__ICL)
 # define BOOST_INTEL_CXX_VERSION __ICL
 #elif defined(__ICC)
@@ -93,11 +89,7 @@
 #include "boost/config/compiler/common_edg.hpp"

 #if defined(__INTEL_COMPILER)
-#if __INTEL_COMPILER == 9999
-# define BOOST_INTEL_CXX_VERSION 1200 // Intel bug in 12.1.
-#else
 # define BOOST_INTEL_CXX_VERSION __INTEL_COMPILER
-#endif
 #elif defined(__ICL)
 # define BOOST_INTEL_CXX_VERSION __ICL
 #elif defined(__ICC)
@@ -289,7 +281,7 @@ template<> struct assert_intrinsic_wchar_t<unsigned short> {};
 // (Niels Dekker, LKEB, May 2010)
 // Apparently Intel 12.1 (compiler version number 9999 !!) has the same issue (compiler regression).
 #if defined(__INTEL_COMPILER)
-# if (__INTEL_COMPILER <= 1110) || (__INTEL_COMPILER == 9999) || (defined(_WIN32) && (__INTEL_COMPILER < 1600))
+# if (__INTEL_COMPILER <= 1110) || (__INTEL_COMPILER == 1210) || (defined(_WIN32) && (__INTEL_COMPILER < 1600))
 # define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
 # endif
 #endif

Here's the other checking for 9999 that I found. Not known to cause a problem.
diff --git a/include/boost/regex/v4/regex_format.hpp b/include/boost/regex/v4/regex_format.hpp
index e9006a7..bf2e552 100644
--- a/include/boost/regex/v4/regex_format.hpp
+++ b/include/boost/regex/v4/regex_format.hpp
@@ -180,7 +180,7 @@ private:
    }
    inline int toi(ForwardIter& i, ForwardIter j, int base)
    {
-#if defined(_MSC_VER) && defined(__INTEL_COMPILER) && ((__INTEL_COMPILER == 9999) || (__INTEL_COMPILER == 1210))
+#if defined(_MSC_VER) && defined(__INTEL_COMPILER) && (__INTEL_COMPILER == 1210)
       // Workaround for Intel support issue #656654.
       // See also https://svn.boost.org/trac/boost/ticket/6359
       return toi(i, j, base, mpl::false_());

The intel.hpp check for 9999 causes this problem, among others,
float128 tests from (boost_multiprecision suite) fail due to workaround in intel.hpp fo 12.1 compiler that was released with __INTEL_COMPILER == 9999
Fails like this:
$ "icpc" -c -xc++ -O0 -w1 -inline-level=0 -fPIC -m64 -DBOOST_ALL_NO_LIB=1 -DSLOW_COMPILER -DTEST_FLOAT128 -I"../../.." -I"../include" -c -o "../../../bin.v2/libs/multiprecision/test/test_tanh_float128.test/intl-lnx/dbg/dbg-symbl-\
off/test_tanh.o" "test_tanh.cpp"
In file included from test_tanh.cpp(53):
../../../boost/multiprecision/float128.hpp(48): error: identifier "_Quad" is undefined
  typedef _Quad float128_type;
          ^

Thanks and regards, Melanie Blower


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk