[Bug c++/65147] alignment of std::atomic object is not correct

joseph at codesourcery dot com gcc-bugzilla@gcc.gnu.org
Fri Feb 20 22:11:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65147

--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
On Fri, 20 Feb 2015, alexey.lapshin at oracle dot com wrote:

> According to the documentation -
> https://gcc.gnu.org/wiki/Atomic/GCCMM/UnalignedPolicy alignment of atomic
> object should match it`s size.
> Alignment in the test case below does not match with documentation.

Not in itself a bug to fail to follow preliminary plans.  *But*:

> This behavior also differs from gcc. Gcc aligns 8-bytes objects to 8-bytes.

Differences between C and C++ atomics might be a bug - there may be intent 
for them to be ABI-compatible (although that didn't get implemented), 
unlike other aspects of the early plans you point to where intent changed 
over the course of implementation.



More information about the Gcc-bugs mailing list