4.14.1. Targeting the source language with the compiler

To target a specific source language with the compiler:

ISO standard C

Use the compiler option:

armcc --c90

This is the default option.

Strict ISO standard C

Use the compiler options:

armcc --c90 --strict
ISO standard C++

Use the compiler option:

armcc --cpp
Strict ISO standard C++

Use the compiler options:

armcc --cpp --strict

If you do not specify any of these options, the compiler determines the source language from the extension of your source files. However, if you specify multiple source files for a single compiler invocation that contain different source languages, then specify one of these compiler options. For example, to compile f1.c and f2.cpp for ISO standard C++:

armcc --cpp f1.c f2.cpp

If you specify any assembly language sources, then the compiler invokes the assembler to assemble these source files.

You can also use the armcpp command to invoke the C++ compiler.

Copyright © 2005, 2006 ARM Limited. All rights reserved.ARM DUI 0276B
Non-Confidential