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

}<br />

aLocal += Function_Attributes_const_0(b);<br />

return aLocal;<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-37<br />

• __pure on page 5-14 in the Compiler User Guide.<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-34 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!