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

In the following example, section function attribute overrides the #pragma arm section<br />

setting.<br />

#pragma arm section code="foo"<br />

int f2()<br />

{<br />

return 1;<br />

} // into the 'foo' area<br />

__attribute__ ((section ("bar"))) int f3()<br />

{<br />

return 1;<br />

} // into the 'bar' area<br />

int f4()<br />

{<br />

return 1;<br />

} // into the 'foo' area<br />

#pragma arm section<br />

See also<br />

• #pragma arm section [section_sort_list] on page 4-50.<br />

4.3.10 __attribute__((unused))<br />

The unused function attribute prevents the compiler from generating warnings if the<br />

function is not referenced. This does not change the behavior of the unused function<br />

removal process.<br />

Note<br />

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

compiler.<br />

Example<br />

static int Function_Attributes_unused_0(int b) __attribute__ ((unused));<br />

4.3.11 __attribute__((used))<br />

This function attribute informs the compiler that a function is to be retained in the<br />

object, even if it is unreferenced.<br />

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

Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!