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

--- Comment #21 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Peter Dimov from comment #19)
> This should work.

In simple cases, yes. But if we have a mixed C++11 and C++14 (or later)
codebase, it's possible for the std::atomic to be initialized in a C++11 TU, so
padding is not cleared, and the CAS to be done in a C++14 TU, so it assumes
padding is cleared. And so we have the same problem.

Reply via email to