libstdc++: Strip cv-qualifiers in std::atomic<FP> (PR 95282)
authorJonathan Wakely <jwakely@redhat.com>
Tue, 16 Jun 2020 21:34:55 +0000 (22:34 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Tue, 16 Jun 2020 21:34:55 +0000 (22:34 +0100)
commite40b11a91cb345db1324c3cb8f75b01e28056693
tree31db062e48f4fa492a5f246413308332f5316ca7
parentcc799df98f6eaf73763a069f7854e490a0416573
libstdc++: Strip cv-qualifiers in std::atomic<FP> (PR 95282)

This improves the previous fix for PR 95282, and extends it to also
apply to the exchange function (which has a similar problem and would
become ill-formed with my proposed fix for PR 95378).

PR libstdc++/95282
* include/bits/atomic_base.h (__atomic_impl::load): Use the _Val
alias instead of deducing _Tp as an unqualified type.
(__atomic_impl::exchange): Use the _Val alias to remove volatile
from the reinterpret_cast result type.
libstdc++-v3/include/bits/atomic_base.h