[Bug c/95378] __atomic_load will write to objects of cv-qualified types
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jun 16 21:35:07 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95378
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:
https://gcc.gnu.org/g:e40b11a91cb345db1324c3cb8f75b01e28056693
commit r11-1401-ge40b11a91cb345db1324c3cb8f75b01e28056693
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Tue Jun 16 22:34:55 2020 +0100
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.
More information about the Gcc-bugs
mailing list