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

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

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

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

Note<br />

This function attribute is a GNU compiler extension that is supported by the <strong>ARM</strong><br />

compiler. It has the __declspec equivalent __declspec(noinline).<br />

Example<br />

static int b __attribute__ ((noinline));<br />

See also<br />

• #pragma [no_]inline on page 4-56<br />

• __declspec(noinline) on page 4-25.<br />

4.3.7 __attribute__((noreturn))<br />

This function attribute informs the compiler that the function does not return. The<br />

compiler can then perform optimizations by removing the code that is never reached.<br />

Note<br />

This function attribute is a GNU compiler extension that is supported by the <strong>ARM</strong><br />

compiler. It has the __declspec equivalent __declspec(noreturn).<br />

Example<br />

int Function_Attributes_NoReturn_0(void) __attribute__ ((noreturn));<br />

See also<br />

• __declspec(noreturn) on page 4-25.<br />

4.3.8 __attribute__((pure))<br />

Many functions have no effects except to return a value, and that the return value<br />

depends only on the parameters and global variables. Functions of this kind can be<br />

subject to data flow analysis and might be eliminated.<br />

Note<br />

This function attribute is a GNU compiler extension that is supported by the <strong>ARM</strong><br />

compiler.<br />

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

Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!