[Bug c++/69763] _Alignof(double) in C gives different results from alignof(double) in C++
richard-gccbugzilla at metafoo dot co.uk
gcc-bugzilla@gcc.gnu.org
Thu Feb 11 20:34:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69763
--- Comment #3 from Richard Smith <richard-gccbugzilla at metafoo dot co.uk> ---
I'm pretty sure neither the C nor C++ committees intended for alignof(T) to
give different results in the different languages. And even with the rule in
[basic.align]p2, GCC can still choose to specify that the alignment requirement
of 'double' is 4 in C++, to make its C and C++ modes agree. (It's not wrong to
align a double to 4 bytes, even though GCC would prefer to 8-byte align it when
it can.)
More information about the Gcc-bugs
mailing list