Intel® C++ Compiler 16.0 User and Reference Guide
The Intel® C++ Compiler supports the predefined macros listed in the table below. The compiler also includes predefined macros specified by the ISO/ANSI standard.
Unless otherwise stated, the macros are supported on systems based on IA-32 and Intel® 64 architectures.
Macro | Description |
---|---|
__APPLE__ (OS X*) |
Defined as '1'. |
__APPLE_CC__ (OS X) |
The gcc* build number |
__ARRAY_OPERATORS (Linux*) |
Defined as '1'. |
__AVX__ (Windows*, Linux, OS X) |
On Windows*, defined as '1' when option /arch:AVX, /QxAVX, or higher processor targeting options are specified. On Linux*, defined as '1' when option -march=corei7-avx, -mavx, -xAVX, or higher processor targeting options are specified.
NoteAvailable only for compilations targeting Intel® 64 architecture. |
__AVX2__ (Windows, Linux, OS X) |
On Windows, defined as '1' when option /arch:CORE-AVX2, /QxCORE-AVX2, or higher processor targeting options are specified. On Linux, defined as '1' when option -march=core-avx2, -xCORE-AVX2, or higher processor targeting options are specified.
NoteAvailable only for compilations targeting Intel® 64 architecture. |
__AVX512BW__ (Windows, Linux, OS X) |
Defined as '1' for processors that support Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Byte and Word instructions. It is also defined as '1' when option [Q]xCORE-AVX512 or higher processor-targeting options are specified. |
__AVX512CD__ (Windows, Linux, OS X) |
Defined as '1' for processors that support Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Conflict Detection instructions. It is also defined as '1' when option [Q]xCORE-AVX512, [Q]xCOMMON-AVX512, [Q]xMIC-AVX512, or higher processor-targeting options are specified. |
__AVX512DQ__ (Windows, Linux, OS X) |
Defined as '1' for processors that support Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Doubleword and Quadword instructions. It is also defined as '1' when option [Q]xCORE-AVX512 or higher processor-targeting options are specified. |
__AVX512ER__ (Windows, Linux, OS X) |
Defined as '1' for processors that support Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Exponential and Reciprocal instructions. It is also defined as '1' when option [Q]xMIC-AVX512 or higher processor-targeting options are specified. |
__AVX512F__ (Windows, Linux, OS X) |
Defined as '1' for processors that support Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Foundation instructions. It is also defined as '1' when option [Q]xCORE-AVX512, [Q]xCOMMON-AVX512, [Q]xMIC-AVX512 or higher processor-targeting options are specified. |
__AVX512PF__ (Windows, Linux, OS X) |
Defined as '1' for processors that support Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Prefetch instructions. It is also defined as '1' when option [Q]xMIC-AVX512 or higher processor-targeting options are specified. |
__AVX512VL__ (Windows, Linux, OS X) |
Defined as '1' for processors that support Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Vector Length extensions. It is also defined as '1' when option [Q]xCORE-AVX512 or higher processor-targeting options are specified. |
__BASE_FILE__ (Linux) |
Name of source file |
_BOOL (Linux) |
Defined as '1'. |
__cilk (Windows, Linux) |
Defined as '200'. However, if you specify option [Q]cilk-serialize or the negative form of option [Q]intel-extensions, the value is undefined. |
__COUNTER__ (Windows) |
Defined as '0'. |
__cplusplus (Linux) |
Defined as '1' (with C++ compiler). |
__DEPRECATED (Linux) |
Defined as '1'. |
__DYNAMIC__ (OS X) |
Defined as '1'. |
__EDG__ (Windows, Linux, OS X) |
Defined as '1'. |
__EDG_VERSION__ (Windows, Linux, OS X) |
EDG version |
__ELF__ (Linux) |
Defined as '1' at the start of compilation. |
__EXCEPTIONS (Linux) |
Defined as '1' when option fno-exceptions is not used. |
__gnu_linux__ (Linux) |
Defined as '1' at the start of compilation. |
__GFX__ (Windows, Linux) |
You can use this macro to protect code that should only be compiled for and executed on Intel® Graphics Technology. It is defined by default. It builds code that runs on the CPU and the target, but this macro is only defined during the target compilation. It is undefined when you use the negative form of option [q or Q]offload. |
__GNUC__ (Linux) |
The major version number of gcc* installed on the system or explicitly specified via –gcc-name/ –gxx-name. |
__GNUC_MINOR__ (Linux) |
The minor version number of gcc* or g++* installed on the system or explicitly specified via –gcc-name/ –gxx-name. |
__GNUC_PATCHLEVEL__ (Linux) |
The patch level version number of gcc* or g++* installed on the system or explicitly specified via –gcc-name/ –gxx-name. |
__GNUG__ (Linux) |
The major version number of g++* installed on the system or explicitly specified via –gcc-name/ –gxx-name. |
__GXX_ABI_VERSION (Linux) |
The value of this is dependent on the -fabi-version option, if set.
102: -fabi-version=1 || gcc version < 3.4 1008: gcc version >= 5.0 999999: -fabi-version=0 100? Where ? matches the -fabi-version passed: -fabi-version=2,3,4,5,6,7,8,9 1002: Gcc version > 3.5 and < 5.0 |
__HONOR_STD (Linux, OS X) |
Defined as '1'. |
__i386__ __i386 i386 (Linux, OS X) |
Defined as '1' for compilations targeting IA-32 architecture. |
__ICC (Linux, OS X) |
The Intel C++ Compiler version.
NoteThis macro may be affected by compiler options, such as -no-icc. |
__ICL (Windows) |
The Intel C++ Compiler version.
NoteThis macro may be affected by compiler options, such as /Qicl-. |
_INC_STDIO (Windows) |
Defined, no value. |
_INTEGRAL_MAX_BITS (Windows) |
64 |
__INTEL_COMPILER (Linux, OS X) |
The Intel C++ Compiler version.
NoteThis macro may be affected by compiler options, such as -no-icc. |
__INTEL_COMPILER_BUILD_DATE (Windows, Linux, OS X) |
The Intel compiler build date. It takes the form YYYYMMDD, where YYYY is the year, MM is the month, and DD is the day. |
__INTEL_COMPILER_UPDATE (Windows, Linux, OS X) |
Returns the current minor update number of the Intel compiler, starting at 0. You can use this macro to differentiate between compiler updates when you have multiple updates of the Intel® C++ Compiler installed concurrently. Example: For Intel® C++ Compiler version XX.0.2, the macro would preprocess to "2". |
__INTEL_CXX11_MODE__ (Windows, Linux) |
Enables C++11 experimental support for C++ programs. Defined as '1' when option [Q]std=c++11 is specified. |
__INTEL_MS_COMPAT_LEVEL (Windows) |
Defined as '1'. Equal to the same value n as specified by option [Q]msn. |
__INTEL_OFFLOAD (Windows, Linux) |
Defined as '1' while building code to run on the CPU and on the coprocessor. It is defined by default. It is undefined when you specify the negative form of option [q or Q]offload, or option /Qmic (Windows*) or -mmic (Linux*). You can use this symbol in conjunction with the negative form of option [q or Q]offload, or the /Qmic (Windows*) or -mmic (Linux*) option to protect code on the host that should only be executed for an offload build, such as calls to the omp_set_num_threads_target family of APIs in offload.h. |
__INTEL_RTTI__ (Linux, OS X) |
Defined as '1' when option -fno-rtti is not specified. |
__INTEL_STRICT_ANSI__ (Linux, OS X) |
Defined as '1' when option -strict-ansi is specified. |
__KNC__ (Windows, Linux) |
This macro is similar to __MIC__, but it is defined by the compiler while building code to run on the Intel® Xeon Phi™ coprocessor x100 product family (formerly code name Knights Corner). |
__linux__ __linux linux (Linux) |
Defined as '1' at the start of compilation. |
__LITTLE_ENDIAN__ (OS X) |
Defined as '1'. |
__LONG_DOUBLE_SIZE__ (Windows, Linux, OS X) |
On Linux and OS X, defined as 80. On Windows, defined as 64; defined as 80 when option /Qlong-double is specified. |
__LONG_DOUBLE_64__ (Linux) |
When this macro is defined, the long double type is 64-bits. It is defined when you specify option -mlong-double-64. |
__LONG_MAX__ (Linux) |
9223372036854775807L NoteAvailable only for compilations targeting Intel® 64 architecture. |
__LP64__ (Linux) __LP64 (Linux) |
Defined as '1'.
NoteAvailable only for compilations targeting Intel® 64 architecture. |
_M_AMD64 (Windows) |
Defined as '1' while building code targeting Intel® 64 architecture. |
_M_IX86 (Windows) |
700 |
_M_X64 (Windows) |
Defined as '1' while building code targeting Intel® 64 architecture. |
__MACH__ (OS X) |
Defined as '1'. |
__MIC__ (Windows, Linux) |
Defined as '1' while building code to run on the Intel® MIC Architecture coprocessor. It is defined by default during the coprocessor compilation. It is also defined as '1' when you specify option /Qmic (Windows*) or -mmic (Linux*) since that option tells the compiler to build an application that runs natively on Intel® MIC Architecture. It is undefined when you use the negative form of option [q or Q]offload. You can specify this symbol to protect code that should only be compiled for and executed on the coprocessor, such as intrinsic functions that only run on Intel® MIC Architecture, or the corresponding header files, such as zmmintrin.h. To build code that runs only on the coprocessor, specify option /Qmic (Windows*) or -mmic (Linux*). |
__MMX__ (Linux, OS X) |
Defined as '1'. On Linux, it is available only on systems based on Intel® 64 architecture. |
_MSC_EXTENSIONS (Windows) |
Defined as '1'. |
_MSC_FULL_VER (Windows) |
The Visual C++* version being used. 190022609 for Visual C++* 2015 1800210051 for Visual C++* 2013 170061030 for Visual C++* 2012 160040219 for Visual C++* 2010 |
_MSC_VER (Windows) |
The Visual C++* version being used. 1900 for Visual C++* 2015 1800 for Visual C++* 2013 1700 for Visual C++* 2012 1600 for Visual C++* 2010 |
_MT (Windows) |
On Windows, defined as '1' when a multithreaded DLL or library is used (when option /MD[d] or /MT[d] is specified). |
__NO_INLINE__ __NO_MATH_INLINES __NO_STRING_INLINES (Linux, OS X) |
Defined as '1'. |
OFFLOAD_STATUS_INIT(statusvarname) (Windows, Linux) |
Initializes the variable for the status clause in an offload pragma to a known value before offloading code. After the offload, you can examine statusvarname to check if the pragma was executed at all, whether the offload succeeded or failed, and, if relevant, why it failed. See offload. |
_OPENMP (Windows, Linux, OS X) |
201511 when you specify option [Q]openmp. |
__OPTIMIZE__ (Linux, OS X) |
Defined as '1'. |
__pentium4 __pentium4__ (Linux, OS X) |
Defined as '1'. |
_PGO_INSTRUMENT (Windows, Linux) |
Defined as '1' when option [Q]cov-gen or [Q]prof-gen is specified. |
__PIC__ __pic__ (Linux, OS X) |
On Linux, defined as '1' when option fPIC is specified. On OS X, defined as '1'. Only __PIC__ is allowed on OS X. |
_PLACEMENT_DELETE (Linux) |
Defined as '1'. |
__PTRDIFF_TYPE__ (Linux, OS X) |
On Linux, defined as int on IA-32 architecture; defined as long on Intel® 64 architecture. On OS X, defined as int/long. |
__QMSPP_ (Windows, OS X) |
Defined as '1'. |
__REGISTER_PREFIX__ (Linux, OS X) |
|
__SIGNED_CHARS__ (Windows, Linux, OS X) |
Defined as '1'. |
_SIZE_T_DEFINED (Windows) |
Defined, no value. |
__SIZE_TYPE__ (Linux, OS X) |
On Linux, defined as unsigned on IA-32 architecture; defined as unsigned long on Intel® 64 architecture. On OS X, defined as unsigned long. |
__SSE__ (Windows, Linux, OS X) |
On Linux and OS X, defined as '1' for processors that support SSE instructions. On Windows, defined as '1'. It is undefined when option /arch:IA32 is specified. |
__SSE2__ (Windows, Linux, OS X) |
On Linux and OS X, defined as '1' for processors that support Intel® SSE2 instructions. On Windows, defined as '1' by default or when option /arch:SSE2, /QxSSE2, /QaxSSE2, or higher processor targeting options are specified. |
__SSE3__ (Windows, Linux, OS X) |
On Linux and OS X, defined as '1' for processors that support Intel® SSE3 instructions. On Windows, defined as '1' when option /arch:SSE3, /QxSSE3, or higher processor targeting options are specified. |
__SSE4_1__ (Windows, Linux) |
On Linux, defined as '1' for processors that support Intel® SSE4 instructions. On Windows, defined as '1' when option /arch:SSE4.1, /QxSSE4.1, or higher processor targeting options are specified. |
__SSE4_2__ (Windows, Linux) |
On Linux, defined as '1' for processors that support SSSE4 instructions. On Windows, defined as '1' when option /arch:SSE4.2, /QxSSE4.2, or higher processor targeting options are specified. |
__SSSE3__ (Windows, Linux, OS X) |
On Linux and OS X, defined as '1' for processors that support SSSE3 instructions. On Windows, defined as '1' when option arch:SSSE3, QxSSSE3, or higher processor targeting options are specified. |
__STDC__ (OS X) |
Defined as '1'. |
__STDC_HOSTED__ (OS X) |
Defined as '1'. |
__TARGET_ARCH_MIC (Windows, Linux) |
Defined as '1' when building code to run on theIntel® Xeon Phi™ coprocessor (code name Knights Landing) during offload compilation. It is defined by default when you specify -qoffload-arch=mic-avx512 (Linux) or /Qoffload-arch=mic-avx512 (Windows*). You can specify this macro to protect code that should only be compiled for and executed on the Intel® Xeon Phi™ coprocessor (code name Knights Landing) during offloading. |
unix __unix __unix__ (Linux) |
Defined as '1'. |
__USER_LABEL_PREFIX__ (Linux, OS X) |
|
_VA_LIST_DEFINED (Windows) |
Defined, no value. |
__VERSION__ (Linux, OS X) |
Intel® C++ Compiler version string |
__w64 (Windows) |
Defined, no value. |
__WCHAR_MAX__ (OS X) |
2147483647 |
__WCHAR_T (Linux) |
Defined as '1'. |
_WCHAR_T_DEFINED (Windows) |
Defined when option /Zc:wchar_t is specified or "wctype_t" is defined in the header file. |
__WCHAR_TYPE__ (Linux, OS X) |
On Linux, defined as long int on IA-32 architecture; defined as int on Intel® 64 architecture. On OS X, defined as long int. |
_WCTYPE_T_DEFINED (Windows) |
Defined when "wctype_t" is defined in the header file. |
_WIN32 (Windows) |
Defined as '1' while building code targeting IA-32 or Intel® 64 architecture. |
_WIN64 (Windows) |
Defined as '1' while building code targeting Intel® 64 architecture. |
__WINT_TYPE__ (Linux, OS X) |
Defined as unsigned int. |
__x86_64 __x86_64__ (Linux, OS X) |
Defined as '1' while building code targeting Intel® 64 architecture. |