1.2 Source language modes of the compiler

The compiler can compile different varieties of C and C++ source code.

ISO C90

The compiler compiles C as defined by the 1990 C standard and addenda.

  • ISO/IEC 9899:1990. The 1990 International Standard for C.

  • ISO/IEC 9899 AM1. The 1995 Normative Addendum 1, adding international character support through wchar.h and wtype.h.

ISO C99

The compiler compiles C as defined by the 1999 C standard and addenda:

  • ISO/IEC 9899:1999. The 1999 International Standard for C.

  • ISO/IEC 9899:1999/Cor 2:2004. Technical Corrigendum 2.

ISO C++03

The compiler compiles C++ as defined by the 2003 standard, excepting export templates:

  • ISO/IEC 14882:2003. The 2003 International Standard for C++.

ISO C++11

The compiler compiles supported features of C++11 as defined by the 2011 standard.

  • ISO/IEC 14882:2011. The 2011 International Standard for C++.

The compiler provides support for numerous extensions to the C and C++ languages. For example, it supports some GNU compiler extensions. The compiler has several modes in which compliance with a source language is either enforced or relaxed:

Strict mode

In strict mode the compiler enforces compliance with the language standard relevant to the source language.

To compile in strict mode, use the command-line option --strict.

GNU mode

In GNU mode all the GNU compiler extensions to the relevant source language are available.

To compile in GNU mode, use the compiler option --gnu.

Throughout this document, the term:

C90

Means ISO C90, together with the ARM extensions.

Use the compiler option --c90 to compile C90 code. This is the default.

Strict C90

Means C as defined by the 1990 C standard and addenda.

Use the compiler options --C90 --strict to enforce strict C90 code. Because C90 is the default, you could omit --C90.

C99

Means ISO C99, together with the ARM and GNU extensions.

Use the compiler option --c99 to compile C99 code.

Strict C99

Means C as defined by the 1999 C standard and addenda.

Use the compiler options --c99 --strict to compile strict C99 code.

Standard C

Means C90 or C99 as appropriate.

C

Means any of C90, strict C90, C99, strict C99, and Standard C.

C++03

Means ISO C++03, excepting export templates, either with or without the ARM extensions.

Use the compiler option --cpp to compile C++03 code.

Use the compiler options --cpp --cpp_compat to maximize binary compatibility with C++03 code compiled using older compiler versions.

Strict C++03

Means ISO C++03, excepting export templates.

Use the compiler options --cpp --strict to compile strict C++03 code.

C++11

Means ISO C++11, either with or without the ARM extensions.

Use the compiler option --cpp11 to compile C++11 code.

Use the compiler options --cpp11 --cpp_compat to compile a subset of C++11 code that maximizes compatibility with code compiled to the C++ 2003 standard.

Strict C++11

Means ISO C++11.

Use the compiler options --cpp11 --strict to compile strict C++11 code.

Standard C++

Means strict C++03 or strict C++11 as appropriate.

C++

Means any of C++03, strict C++03, C++11, strict C++11.

Non-ConfidentialPDF file icon PDF versionARM DUI0472M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.