On Fri, Dec 5, 2008 at 9:45 AM, <tiberipa@xxxxxxxxxxxxxxx> wrote: > > 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)? It is a requirement of the C specification. If you were to create an array of these structures, each structure has to be aligned. Hence, the structure size has to be a multiple of the required alignment.