# Predefined Preprocessor Symbols

IA-32 is not available on macOS. IA-32 is deprecated on other operating systems and will be removed in a future release.

Preprocessor symbols (macros) let you substitute values in a program before it is compiled. The substitution is performed in the preprocessing phase.

The preprocessor symbols shown in the table below are predefined by the compiler system and are available to compiler directives and to `fpp`. If you want to use other symbol names, you need to specify them on the command line.

You can use the D compiler option to define the symbol names to be used during preprocessing. This option performs the same function as the #define preprocessor directive.

Preprocessing with `fpp` replaces every occurrence of the defined symbol name with the specified value. Preprocessing compiler directives only allow IF and IF DEFINED.

If you want to disable symbol replacement (also known as macro expansion) during the preprocessor step, you can specify the macro=no preprocessor option for `fpp`.

Disabling preprocessor symbol replacement is useful for running `fpp` to perform conditional compilation (using #ifdef, etc.) without replacement.

You can use the U preprocessor option to suppress an automatic definition of a preprocessor symbol. This option suppresses any symbol definition currently in effect for the specified name. This option also performs the same function as an #undef preprocessor directive.

The symbols in the following table can be used in both `fpp` and Fortran compiler conditional compilations.

Symbol | Description
--- | ---
__APPLE__ (macOS) | Defined as '1'.
__AVX512BW__ (Windows, Linux, macOS) | Defined as '1' for processors that support Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Byte and Word Instructions (BWI). __AVX512BW__ is also defined as '1' when option [Q]xCORE-AVX512 or higher processor-targeting options are specified.
__AVX512CD__ (Windows, Linux, macOS) | Defined as '1' for processors that support Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Conflict Detection Instructions (CDI). __AVX512CD__ is also defined as '1' when option [Q]xCORE-AVX512, [Q]xCOMMON-AVX512, or higher processor-targeting options are specified.
__AVX512DQ__ (Windows, Linux, macOS) | Defined as '1' for processors that support Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Doubleword and Quadword Instructions (DQI). __AVX512DQ__ is also defined as '1' when option [Q]xCORE-AVX512 or higher processor-targeting options are specified.
__AVX512ER__ (Windows, Linux, macOS) | Defined as '1' for processors that support Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Exponential and Reciprocal Instructions.
__AVX512F__ (Windows, Linux, macOS) | Defined as '1' for processors that support Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Foundation instructions. __AVX512ER__ is also defined as '1' when option [Q]xCORE-AVX512, [Q]xCOMMON-AVX512, or higher processor-targeting options are specified.
__AVX512PF__ (Windows, Linux, macOS) | Defined as '1' for processors that support Intel® Advanced Vector Extensions 512 (Intel® AVX-512) PreFetch Instructions (PFI).
__AVX512VL__ (Windows, Linux, macOS) | Defined as '1' for processors that support Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Vector Length Extensions (VLE). __AVX512VL__ is also defined as '1' when option [Q]xCORE-AVX512 or higher processor-targeting options are specified.
_DEBUG (Windows) | Defined as '1' only if options /dbglibs, /MT[d], or /MD[d] are specified.
_DLL (Windows) | Defined as '1' only if one of the following options is specified or implied: /libs:dll /MD /MDd /MDs
__ELF__ (Linux) | Defined as '1' at the start of compilation.
__gnu_linux__ (Linux) | Defined as '1' at the start of compilation.
__i386__ __i386 i386 (Linux, macOS) | Defined as '1' for compilations targeting IA-32 architecture (C++ only). IA-32 is not available on macOS. IA-32 is deprecated on other operating systems and will be removed in a future release.
__INTEL_COMPILER (Windows, Linux, macOS) | For ifx: The version of the compiler in the form VVVVMU, where VVVV is the major version, M is the minor version, and U is the update version. For example, Version 2021.1.2 is indicated by a value of 202112. See also symbol __INTEL_LLVM_COMPILER. For ifort: The version of the compiler in the form VVVV, where VVVV is the major version. For example, Version 2021.1.2 is indicated by a value of 2021.
__INTEL_COMPILER_BUILD_DATE (Windows, Linux, macOS) | The 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) | The compiler update number within a version (example: 1 for Update 1). See also symbol __INTEL_COMPILER.
__INTEL_LLVM_COMPILER (Windows, Linux) | The version of the compiler in the form VVVVMMUU 1, where VVVV is the major release version, MM is the minor release version, and UU is the update number. For example, the base release of 2021.1 is represented by the value 20210100. This symbol is also recognized by CMake, and it is only available for ifx. See also symbol __INTEL_COMPILER.
__linux__ __linux linux (Linux) | Defined as '1' at the start of compilation.
_M_AMD64 (Windows) | Defined as '1' while building code targeting Intel® 64 architecture.
_M_IX86=700 (Windows) | Defined as '1' while building code targeting IA-32 architecture (C++ only). IA-32 is not available on macOS. IA-32 is deprecated on other operating systems and will be removed in a future release.
_M_X64 (Windows) | Defined as '1' while building code targeting Intel® 64 architecture.
__MACH__ (macOS) | Defined as '1'.
_MT (Windows) | Defined as '1' only if option /threads or /MT is specified.
_OPENMP=201611 (Windows, Linux, macOS) | Defined when OpenMP processing has been requested (that is, option [q or Q]openmp has been specified along with option fpp). The value takes the form YYYYMM, where YYYY is the year and MM is the month of the supported OpenMP Fortran specification. The currently supported OpenMP API is 5.0 Version TR4, dated November 2016. Some OpenMP Version 5.1 features are also supported.
__PIC__ __pic__ (Linux) | Defined as '1' only if the code requested compilation as position-independent code.
__SYCL_COMPILER_VERSION (Windows, Linux, macOS) | The build date of the SYCL library, presented in the format YYYYMMDD. This symbol is only available for ifx. ### Note This is only available after the SYCL library headers are included in the source code.
SYCL_LANGUAGE_VERSION | The SYCL_LANGUAGE_VERSION is defined only when compiling SYCL code. This symbol is only available for ifx.
_WIN32 (Windows) | Defined as '1' while building code targeting IA-32 or Intel® 64 architecture. IA-32 is not available on macOS. IA-32 is deprecated on other operating systems and will be removed in a future release.
_WIN64 (Windows) | Defined as '1' while building code targeting Intel® 64 architecture.
__x86_64 __x86_64__ (Linux, macOS) | Defined as '1' while building code targeting Intel® 64 architecture.

Footnotes:

1 The 2021.1 Intel® Fortran Compiler (ifx) produces the __INTEL_COMPILER format for this macro. Subsequent releases use the format as documented.

Parent topic: fpp Preprocessing

## See Also

arch compiler option
march compiler option
m compiler option
D compiler option
U compiler option
dll compiler option
fpp compiler option
libs compiler option
qopenmp, Qopenmp compiler option
threads compiler option
x, Qx compiler option