Conformance to the C Standard

You can set the Intel® C++ Compiler to accept either

The compiler is set by default to accept extensions and not be limited to the ANSI/ISO standard.

Understanding the ANSI/ISO Standard C Dialect

The Intel C++ Compiler provides conformance to the ANSI/ISO standard for C language compilation (ISO/IEC 9899:1990). This standard requires that conforming C compilers accept minimum translation limits. This compiler exceeds all of the ANSI/ISO requirements for minimum translation limits.

Macros Included with the Compiler

The ANSI/ISO standard for C language requires that certain predefined macros be supplied with conforming compilers. The following table lists the macros that the Intel C++ Compiler supplies in accordance with this standard:

The compiler provides predefined macros in addition to the predefined macros required by the standard.

Macro Description
__cplusplus The name __cplusplus is defined when compiling a C++ translation unit.
__DATE__ The date of compilation as a string literal in the form Mmm dd yyyy.
__FILE__ A string literal representing the name of the file being compiled.
__LINE__ The current line number as a decimal constant.
__STDC__ The name __STDC__ is defined when compiling a C translation unit.
__TIME__ The time of compilation. As a string literal in the form hh:mm:ss.

C99 Support

The following C99 features are supported in this version of the Intel C++ Compiler when using the -c99 option:

Note

The -restrict option enables the recognition of the restrict keyword as defined by the ANSI standard.  By qualifying a pointer with the restrict keyword, the user asserts that an object accessed via the pointer is only accessed via that pointer in the given scope.  It is the user’s responsibility to use the restrict keyword only when this assertion is true.  In these cases, the use of restrict will have no effect on program correctness, but may allow better optimization.

These features are not supported: