[Bug libstdc++/54005] Use __atomic_always_lock_free in libstdc++ is_lock_free instead of __atomic_is_lock_free
egallager at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Oct 3 02:36:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54005
--- Comment #19 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #18)
> (In reply to Hans-Peter Nilsson from comment #16)
> > (In reply to Jonathan Wakely from comment #14)
> > > Can we close this?
> >
> > No. IIUC, we're still/again using __atomic_is_lock_free with alignment
> > deduced from the current object rather than the type (even though it's now a
> > proxy-object; the faked pointer is constructed from the alignment of the
> > current object).
>
> It's constructed from __alignof(_M_i) and since r221945 that is given a
> fixed alignment:
>
> static constexpr int _S_alignment =
> sizeof(_ITp) > alignof(_ITp) ? sizeof(_ITp) : alignof(_ITp);
>
> alignas(_S_alignment) __int_type _M_i;
>
> So it will be the same for all objects of the type.
>
> There was an additional fix in r227878 for Bug 65913.
>
> > So, r221701 was wrong to change from null to the alignment-deduced
> > fake-pointer.
>
> I think the current code is right, and per-type.
>
> I still want to close this.
With what resolution? FIXED? WORKSFORME?
More information about the Gcc-bugs
mailing list