4.3. Pragmas

The ARM compiler recognizes the following forms of pragma:

#pragma no_feature-name
#pragma feature_name

Note

Pragmas override related command-line options. For example, #pragma arm overrides the --thumb command-line option.

For more information see the relevant section in the Compiler Reference Guide:

Pragmas for saving and restoring the pragma state

The following pragmas enable you to save and restore the pragma state:

Pragmas controlling optimization goals

These pragmas enable you to assign optimization goals to individual functions. The pragmas must be placed outside of a function. The following pragmas control these optimizations:

Pragmas controlling code generation

The following pragmas control how code is generated:

Pragmas controlling loop unrolling:

The following pragmas control how loops are unrolled:

Pragmas controlling PreCompiled Header (PCH) processing

The following pragmas control PCH processing:

Pragmas controlling anonymous structures and unions

The following pragma controls the use of anonymous structures and unions:

Pragmas controlling diagnostic messages

The following pragmas control the output of the diagnostic messages that have a -D postfix in the message number:

Miscellaneous pragmas
Copyright © 2002-2010 ARM. All rights reserved.ARM DUI 0205J
Non-ConfidentialID101213