libstdc++: Add atomic_fetch_xor to <stdatomic.h>
authorJonathan Wakely <jwakely@redhat.com>
Wed, 9 Feb 2022 13:38:33 +0000 (13:38 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 10 Feb 2022 13:01:10 +0000 (13:01 +0000)
commit3e539985cc7a28516054cc080ffd9681aa745afa
tree3600e86d9d6a4f96a854c870c599da949e3aacec
parent3d5f4f76e6db0895181ebca538748379bfe6058f
libstdc++: Add atomic_fetch_xor to <stdatomic.h>

This function (and the explicit memory over version) are present in both
C++ <atomic> and C <stdatomic.h>, so should be in C++ <stdatomic.h> too.
There is a library issue incoming for this, but the resolution is
obvious.

libstdc++-v3/ChangeLog:

* include/c_compatibility/stdatomic.h (atomic_fetch_xor): Add
using-declaration.
(atomic_fetch_xor_explicit): Likewise.
* testsuite/29_atomics/headers/stdatomic.h/c_compat.cc: Check
arithmetic and logical operations for atomic_int.
libstdc++-v3/include/c_compatibility/stdatomic.h
libstdc++-v3/testsuite/29_atomics/headers/stdatomic.h/c_compat.cc