[committed] libstdc++: Fix compare_exchange_padding.cc test for std::atomic_ref
Jonathan Wakely
jwakely@redhat.com
Mon Oct 31 17:05:53 GMT 2022
On Mon, 31 Oct 2022 at 17:03, Eric Botcazou <botcazou@adacore.com> wrote:
>
> > I suppose we could use memcmp on the as variable itself, to inspect
> > the actual stored padding rather than the returned copy of it.
>
> Yes, that's probably the only safe stance when optimization is enabled.
Strictly speaking, it's not safe, because it's undefined to use memcmp
on an object of a non-trivial type. But it should work.
More information about the Libstdc++
mailing list