11.4.1. Compiler options

The ARM C compiler has a number of command-line options that control the way in which code is generated.

By default, the ARM C compiler is highly optimizing. By default, the code produced from your source is balanced for a compromise of code size versus execution speed. However, there are a number of compiler options that can affect the size and performance of generated code. These may be used individually or may be combined to give the required effect.

For a full description of optimization and other command-line options see Chapter 2 The ARM Compilers in the ARM Software Development Toolkit Reference Guide. That chapter includes a description of the -pcc option, but a little more information about that option follows:


The code generated by the compiler can be slightly larger when compiling with the -pcc switch. This is because of extra restrictions on the C language in the ANSI standard that the compiler can take advantage of when compiling in ANSI mode.

If your code compiles in ANSI mode, do not use the -pcc option. The Dhrystone application provides a good example. It is written in old-style Kernighan and Ritchie C, but compiles more efficiently in ANSI mode, even though it causes the compiler to generate a number of warning messages.

Copyright © 1997, 1998 ARM Limited. All rights reserved.ARM DUI 0040D