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

Return value<br />

__alignof__(type) returns the alignment requirement for the type type, or 1 if there is<br />

no alignment requirement.<br />

__alignof__(expr) returns the alignment requirement for the type of the lvalue expr, or<br />

1 if there is no alignment requirement.<br />

Example<br />

int Alignment_0(void)<br />

{<br />

return __alignof__(int);<br />

}<br />

See also<br />

• __ALIGNOF__.<br />

4.1.3 __ALIGNOF__<br />

The __ALIGNOF__ keyword returns the alignment requirement for a specified type, or for<br />

the type of a specified object.<br />

Syntax<br />

__ALIGNOF__(type)<br />

__ALIGNOF__(expr)<br />

Where:<br />

type<br />

expr<br />

is a type<br />

is an lvalue.<br />

Return value<br />

__ALIGNOF__(type) returns the alignment requirement for the type type, or 1 if there is<br />

no alignment requirement.<br />

__ALIGNOF__(expr) returns the alignment requirement for the type of the lvalue expr, or<br />

1 if there is no alignment requirement. The lvalue itself is not evaluated.<br />

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