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

In this code Function_Attributes_const_0 might be called once only, with the result<br />

being doubled to obtain the correct return value.<br />

See also<br />

• __attribute__((pure)) on page 4-33<br />

• __pure on page 4-15 in the <strong>Compiler</strong> User <strong>Guide</strong>.<br />

4.3.4 __attribute__((deprecated))<br />

This function attribute indicates that a function exists but the compiler must generate a<br />

warning if the deprecated function is used.<br />

Note<br />

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

compiler.<br />

Example<br />

int Function_Attributes_deprecated_0(int b) __attribute__ ((deprecated));<br />

4.3.5 __attribute__((malloc))<br />

This function attribute indicates that the function can be treated like malloc and the<br />

associated optimizations can be performed.<br />

Note<br />

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

compiler.<br />

Example<br />

void * Function_Attributes_malloc_0(int b) __attribute__ ((malloc));<br />

4.3.6 __attribute__((noinline))<br />

This function attribute suppresses the inlining of a function at the call points of the<br />

function.<br />

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

Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!