Intel® C++ Compiler 16.0 User and Reference Guide
The Intel compiler is compatible with the Clang compiler. The release notes contains the details of the compatible versions. Clang is a part of the LLVM project to create a new compiler front-end that supports the C, C++, Objective C, and Objective C++ languages. For more information about clang and the LLVM project, see clang: a C language family front-end at http://clang.llvm.org.
C language object files created with the Intel compiler on the OS X* platform are binary compatible with the Clang and C/C++ language libraries. You can use the Intel compiler or the Clang compiler to pass object files to the linker.
On OS X* you have:
ICL Intel® C++ Compiler – this compiler has a Clang-based front-end and is invoked using icl/icl++ command. You can use Clang options with this compiler.
ICC Intel® C++ Compiler – this compiler has a EDG-based front-end and is invoked using icc/icpc command. You cannot use Clang options with this compiler.
The compiler compiles code written in C/C++, and Objective-C languages. When you invoke the compiler using the commands icl/icl++ or icc/icpc, they use the libc++ library and headers by default to compile your code. You can switch to using the GNU implementation of the standard C++ library using the compiler option, -stdlib=libstdc++.
On OS X* v10.8 and earlier, the Intel® C++ Compiler uses the GNU implementation of the C++ Standard Library (libstdc++) by default. On OS X* v10.9 and later, the default library used by the Intel® C++ Compilers is libc++.
All the major features available with the GCC compatible compiler, like OpenMP* and Cilk™ Plus, are available with the Clang-based compiler, with the exception of the following minor features:
Decimal FP types (_Decimal32, _Decimal64, _Decimal128)
Usage of restrict keyword as an identifier
Nested functions (GCC language extension)
Exported templates
Use the -help command to obtain a list of supported options, pragmas, and intrinsics.
You can use predefined macros to guard code that should be compiled with specific compilers. The Intel® C++ Compiler on OS X* defines the __INTEL_COMPILER and __INTEL_CLANG_COMPILER macros to specify the compiler to be used to compile portions of code. The macro can be used to guard code that can be compiled with specific compilers.
The __INTEL_COMPILER macro is used as follows:
#ifdef __INTEL_COMPILER // Code compilable with icc , icl #else // Code for other compilers #endifAlso, you can use the __EDG__ macro to guard code to be compiled exclusively with icc, the EDG-based front-end compiler.
You can use the __INTEL_CLANG_COMPILER macro to guard code to be compiled exclusively with icl (the Clang compiler). However, it is recommended that you replace existing macro checks suitably to prevent build failures because code that can be compiled using icc [EDG compiler] may not necessarily compile using icl [Clang compiler].
Macro checks can be replaced with:
#if defined(__INTEL_COMPILER) // Code compilable with icc, icl # if defined(__INTEL_CLANG_COMPILER) // Code compilable with icl only # if defined(__EDG__) // Code compilable with icc only # endif #else // Code for other compilers #endif
You may not need to replace all __INTEL_COMPILER checks. For example, you need not replace the macro checks for code that uses Intel-specific intrinsics and pragmas because such code can be compiled using icc (EDG compiler) or icl (CLANG compiler).