[Bug c/60360] __attribute((aligned(...))) changes sizeof(...) of struct
glisse at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Feb 28 07:19:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60360
--- Comment #5 from Marc Glisse <glisse at gcc dot gnu.org> ---
When you call sizeof on a type T, by definition, it tells you how far 2
consecutive elements are in an array of T (obviously that needs to be a
multiple of the alignment). When you call it on a variable like this, it can't
be used as part of an array, so it will happily give you the smaller answer.
More information about the Gcc-bugs
mailing list