size of struct with aligned attributes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux