The __ALIGNOF__ keyword returns the alignment requirement for a specified type, or for the type of a specified object.
__ALIGNOF__(type)
__ALIGNOF__(expr)
Where:
__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.
typedef struct s_foo { int i; short j; } foo;
typedef __packed struct s_bar { int i; short j; } bar;
return __ALIGNOF(struct s_foo); // returns 4
return __ALIGNOF(foo); // returns 4
return __ALIGNOF(bar); // returns 1