Download RealView Compilation Tools Compiler Reference Guide
Transcript
Compiler-specific Features
Return value
__alignof__(type) returns the alignment requirement for the type type, or 1 if there is
no alignment requirement.
__alignof__(expr) returns the alignment requirement for the type of the lvalue expr, or
1 if there is no alignment requirement.
Example
int Alignment_0(void)
{
return __alignof__(int);
}
See also
•
4.1.3
__ALIGNOF__.
__ALIGNOF__
The __ALIGNOF__ keyword returns the alignment requirement for a specified type, or for
the type of a specified object.
Syntax
__ALIGNOF__(type)
__ALIGNOF__(expr)
Where:
type
expr
is a type
is an lvalue.
Return value
__ALIGNOF__(type) returns the alignment requirement for the type type, or 1 if there is
no alignment requirement.
__ALIGNOF__(expr) returns the alignment requirement for the type of the lvalue expr, or
1 if there is no alignment requirement. The lvalue itself is not evaluated.
4-4
Copyright © 2007, 2010 ARM Limited. All rights reserved.
Non-Confidential
ARM DUI 0348A