29.12.2014 Views

RealView Compilation Tools Compiler Reference Guide - ARM ...

RealView Compilation Tools Compiler Reference Guide - ARM ...

RealView Compilation Tools Compiler Reference Guide - ARM ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Compiler</strong>-specific Features<br />

4.8 <strong>Compiler</strong> predefines<br />

This section documents the predefined macros of the <strong>ARM</strong> compiler.<br />

4.8.1 Predefined macros<br />

Table 4-18 lists the macro names predefined by the <strong>ARM</strong> compiler for C and C++.<br />

Where the value field is empty, the symbol is only defined.<br />

Name Value When defined<br />

Table 4-18 Predefined macros<br />

__arm__ – Always defined for the <strong>ARM</strong> compiler, even when you specify the --thumb<br />

option.<br />

See also __<strong>ARM</strong>CC_VERSION.<br />

__<strong>ARM</strong>CC_VERSION ver Always defined. It is a decimal number, and is guaranteed to increase between<br />

releases. The format is PVtbbb where:<br />

• P is the major version<br />

• V is the minor version<br />

• t is the patch release<br />

• bbb is the build number.<br />

Note<br />

Use this to distinguish between RVCT and other tools that define __arm__.<br />

__APCS_INTERWORK – When you specify the --apcs /interwork option or set the CPU architecture to<br />

<strong>ARM</strong>v5T or later.<br />

__APCS_ROPI – When you specify the --apcs /ropi option.<br />

__APCS_RWPI – When you specify the --apcs /rwpi option.<br />

__APCS_FPIC – When you specify the --apcs /fpic option.<br />

__ARRAY_OPERATORS – In C++ compiler mode, to specify that array new and delete are enabled.<br />

__BASE_FILE__ name Always defined. Similar to __FILE__, but indicates the primary source file<br />

rather than the current one (that is, when the current file is an included file).<br />

__BIG_ENDIAN – If compiling for a big-endian target.<br />

_BOOL – In C++ compiler mode, to specify that bool is a keyword.<br />

__cplusplus – In C++ compiler mode.<br />

<strong>ARM</strong> DUI 0348A Copyright © 2007, 2010 <strong>ARM</strong> Limited. All rights reserved. 4-103<br />

Non-Confidential

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!