Getting Alignment and Type Information at Compile Time
The C compiler has two built-in functions that return information about a data type’s byte alignment and its data type.
- The function call __builtin_align(typeID) returns the byte alignment used for the data type typeID. This value depends on the target platform for which the compiler is generating object code.
- The function call __builtin_type(typeID) returns an integral value that describes the data type typeID. This value depends on the target platform for which the compiler is generating object code.