On Thu, Jan 14, 2021 at 4:55 PM Ilie Halip <ilie.halip@xxxxxxxxx> wrote: > > Hi Masahiro, > > > + #elif defined(__INTEL_COMPILER) > > + /* How to get the version of intel compiler? */ > > + ICC 0 0 0 > > According to Intel documentation[1], this should do the trick: > > ICC __INTEL_COMPILER __INTEL_COMPILER_UPDATE > __INTEL_COMPILER_BUILD_DATE > > I don't have the compiler installed, but I tested this on godbolt[2] and > looks fine to me. What do you think? > > [1] https://software.intel.com/content/www/us/en/develop/documentation/cpp-compiler-developer-guide-and-reference/top/compiler-reference/macros/additional-predefined-macros.html > [2] https://godbolt.org/z/E5PE6f > > I.H. Thanks. The following is the result from godbolt (except the beta releases of 21.1.*) version __INTEL_COMPILER __INTEL_COMPILER_UPDATE 13.0.1 1300 (unsupported) 16.0.3 1600 3 17.0.0 1700 0 18.0.0 1800 0 19.0.0 1900 0 19.0.1 1900 0 Presumably, the version string xx.yy.zz corresponds to __INTEL_COMPILER=xxyy __INTEL_COMPILER_UPDATE=zz The output from 19.0.1 does not make sense, though. BTW, when I tried ICC a few years ago, I could not build the kernel with it. -- Best Regards Masahiro Yamada