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

Example 4-3 Global register - initialization error<br />

__global_reg(1) int x=1; // error in C, OK in C++<br />

4.1.7 __inline<br />

The __inline keyword suggests to the compiler that it compiles a C or C++ function<br />

inline, if it is sensible to do so.<br />

The semantics of __inline are exactly the same as those of the C++ inline keyword.<br />

__inline is a storage class qualifier. It does not affect the type of a function.<br />

Example<br />

__inline int f(int x)<br />

{<br />

return x*5+1;<br />

}<br />

int g(int x, int y)<br />

{<br />

return f(x) + f(y);<br />

}<br />

See also<br />

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

4.1.8 __int64<br />

The __int64 keyword is a synonym for the keyword sequence long long.<br />

__int64 is accepted even when using --strict.<br />

See also<br />

• --[no_]strict on page 2-84<br />

• long long on page 3-8.<br />

4.1.9 __INTADDR__<br />

The __INTADDR__ operation treats the enclosed expression as a constant expression, and<br />

converts it to an integer constant.<br />

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

Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!