[Bug target/52023] _Alignof (double) yields wrong value on x86
joseph at codesourcery dot com
gcc-bugzilla@gcc.gnu.org
Fri Jan 27 23:30:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023
--- Comment #10 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2012-01-27 23:12:38 UTC ---
I don't think the test programs here are strictly conforming - the offset
could be bigger than the alignment, and alignments are values
"representing the number of bytes between successive addresses at which a
given object can be allocated" which I don't think necessarily have
literally to count bytes (they may be some other less direct encoding of
alignment requirements that satisfies the requirements of 6.2.8). But I
think the bug is correct; alignof should return the least ABI alignment
requirement for a type, which is the biggest requirement that the compiler
can actually rely on when given a pointer to that type.
More information about the Gcc-bugs
mailing list