Keil™, An ARM® Company

RealView Compiler User's Guide

Pragmas

3.2. Pragmas

The ARM compiler recognizes pragmas of the following form:

#pragma [no_]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 multiple optimizations

These pragmas enable you to assign multiple optimizations on individual functions. The pragmas must be placed outside of a function, and you cannot apply more than one of these optimizations on a function. The following pragmas control these optimizations:

Pragmas controlling code generation

The following pragmas control how code is generated:

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:

Copyright © 2007 ARM Limited. All rights reserved.ARM DUI 0375A