04.01.2015 Views

RealView Compilation Tools - ARM Information Center

RealView Compilation Tools - ARM Information Center

RealView Compilation Tools - ARM Information Center

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Compiler-specific Features<br />

4.11 Compiler predefines<br />

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

4.11.1 Predefined macros<br />

Table 4-24 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 />

Table 4-24 Predefined macros<br />

Name Value When defined<br />

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

--thumb 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<br />

between releases. The format is PVbbbb where:<br />

• P is the major version<br />

• V is the minor version<br />

• bbbb is the build number.<br />

Note<br />

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

__arm__.<br />

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

architecture to <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<br />

enabled.<br />

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

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

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 />

4-198 Copyright © 2007-2010 <strong>ARM</strong>. All rights reserved. <strong>ARM</strong> DUI 0348C<br />

Non-Confidential,<br />

ID101213

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

Saved successfully!

Ooh no, something went wrong!