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

4.2.2 __declspec(dllimport)<br />

The __declspec(dllimport) attribute imports a symbol through the dynamic symbol<br />

table when building DLL libraries.<br />

Usage<br />

When an inline function is marked __declspec(dllimport), the function definition in<br />

this compilation unit might be inlined, but is never generated out-of-line. An out-of-line<br />

call or address reference uses the imported symbol.<br />

The dllimport attribute can be used on extern functions and variables.<br />

See also<br />

• __declspec(dllexport) on page 4-24.<br />

4.2.3 __declspec(noinline)<br />

The __declspec(noinline) attribute suppresses the inlining of a function at the call<br />

points of the function.<br />

Note<br />

This __declspec attribute has the function attribute equivalent __attribute__(noinline).<br />

See also<br />

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

• __attribute__((noinline)) on page 4-32.<br />

4.2.4 __declspec(noreturn)<br />

The __declspec(noreturn) attribute asserts that a function never returns.<br />

Note<br />

This __declspec attribute has the function attribute equivalent __attribute__(noreturn).<br />

Usage<br />

Use this attribute to reduce the cost of calling a function that never returns, such as<br />

exit(). If a noreturn function returns to its caller, the behavior is undefined.<br />

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

Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!