Defining Macros

You can use the -A and -D options to define the assertion and macro names to be used during preprocessing. The -U option directs the preprocessor to suppress an automatic definition of a macro.

Use the -A option to make an assertion. This option performs the same function as the #assert preprocessor directive. The form of this option is:

-Aname[(value)]

Argument  Description
name indicates an identifier for the assertion
value  

indicates a value  for the assertion. If a value  is specified, it should be quoted, along with the parentheses delimiting it.

For example, to make an assertion for the identifier fruit with the value orange,banana use the following command:

The compiler provides a number of predefined macros. For a list of predefined macros available to the Intel® C++ Compiler, see the Predefined Macros table below.

Enter -A- to suppress all predefined macros, except for those beginning with the double underscore.

Use the -D option to define a macro. This option performs the same function as the #define preprocessor directive. The form of this option is:

-Dname[{=|#}value]

Argument  Description
name The name of the macro to define.
value Indicates a value to be substituted for name. If you do not enter a value, name is set to 1. The value should be quoted if it contains non-alphanumerics.

For example, to define a macro called SIZE with the value 100 use the following command:

Use the -Uname option to suppress any automatic definition for the specified name. The -U option performs the same function as a #undef preprocessor directive. It can be used to undefine any macro, in addition to the predefined onces.

For more details about preprocessor directives, see a language reference such as C: A Reference Manual.

Predefined Macros

The predefined macros available for the Intel C++ Compiler compilations targeted for IA-32- and Itanium(TM)-based systems are described in the tables below. The Default column describes whether the macro is enabled (ON) or disabled (OFF) by default. The Disable column lists the option that disables the macro; no indicates that the macro cannot be disabled.

Predefined Macros for Compilations Targeted for IA-32 Systems

Macro Name Default Disable Description / When Used
__INTEL_COMPILER=n n=600 no Defines the compiler version. Defined as 600 for the Intel C++ Compiler V6.0. Always defined.
__ICC=n n=600 no Enables the Intel C++ Compiler. Assigned value refers to version of the compiler (e.g., 600 is 6.00). Supported for legacy reasons. Use __INTEL_COMPILER instead.
__cplusplus C++ only no Defined when compiling C++ source.

__EDG__

ON

 

Defined to have the value 1.

Predefined Macros for Compilations Targeted for Itanium(TM)-based Systems

Macro Name Default Disable Description / When Used
__INTEL_COMPILER=n n=600 no Defines the compiler version. Defined as 600 for the Intel C++ Compiler V6.0. Always defined.
__ECC=n n=600 no Enables the Intel C++ Compiler. Assigned value refers to version of the compiler (e.g., 600 is 6.00). Supported for legacy reasons. Use __INTEL_COMPILER instead.
__cplusplus C++ only no Enables compilation of C++ source.
_INTEGRAL_MAX_BITS=n n=64 -U Indicates support for the __int64 type.
_M_IA64=n n=64100 -U Indicates the value for the preprocessor identifier to reflect the Itanium(TM) architecture.