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

to the real function. Where a function is defined as static, the function name is replaced<br />

by the alias name and the function is declared external if the alias name is declared<br />

external.<br />

Note<br />

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

compiler.<br />

Note<br />

Variables names might also be aliased using the corresponding variable attribute<br />

__attribute__((alias)).<br />

Syntax<br />

return-type newname([argument-list]) __attribute__((alias("oldname")));<br />

Where:<br />

oldname<br />

newname<br />

is the name of the function to be aliased<br />

is the new name of the aliased function.<br />

Example<br />

#include <br />

void foo(void)<br />

{<br />

printf("%s\n", __FUNCTION__);<br />

}<br />

void bar(void) __attribute__((alias("foo")));<br />

void gazonk(void)<br />

{<br />

bar(); // calls foo<br />

}<br />

See also<br />

• __attribute__((alias)) on page 4-40.<br />

4.3.2 __attribute__((always_inline))<br />

This function attribute indicates that a function must be inlined.<br />

4-30 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!