This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Minimum target alignment for a datatype
- From: Chris Lattner <CLATTNER at apple dot com>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 22 Jul 2005 11:07:43 -0700
- Subject: Minimum target alignment for a datatype
Hi All,
I'm trying to determine (in target-independent code) what the
*minimum* target alignment of a type is. For example, on darwin,
double's are normally 4-byte aligned, but are 8-byte aligned in some
cases (e.g. when they are the first element of a struct). TYPE_ALIGN
on a double returns 8 bytes, is there any way to find out that they
may end up being aligned to a 4-byte boundary?
Thanks,
-Chris