This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
size of struct with aligned attributes
- From: tiberipa at evidence dot eu dot com
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 5 Dec 2008 15:45:36 +0100 (CET)
- Subject: size of struct with aligned attributes
I all,
I have the following code:
struct
{
float v[25] __attribute__((align(16)));
}
the size of this struct is 28*4.
Is there a rule (documented somewhere) in gcc which says that the
size of a struct with aligned attributes is a multiple of the required
alignment (in this case 16)?
note that if I declare the following :
struct
{
float v[25] __attribute__((align(32)));
}
the size of this is a multiple of 32.
Paolo.