will __attribute__((aligned(CACHE_LINE_SIZE))) break struct alignment

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

 



Hi,

I am using something like this:

  struct S1 {
    int index __attribute__((aligned(CACHE_LINE_SIZE)));
    struct S2 some_other;
  };

I am not using anything like `#pragma pack`.

I am wondering whether adding that
`__attribute__((aligned(CACHE_LINE_SIZE)))` will break GCC's automatic
alignment for S1 and S2. Can anyone point me to any document which
specify this behavior?

Thanks,
Yubin



[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