diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2021-12-08 19:36:24 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2021-12-08 23:41:03 +0000 |
commit | c15aa46cca0649b68613d3292cf71c7cc57ef78f (patch) | |
tree | fa11127d7fef8066bda5f640cbd3ffda7c2c52cc /libphobos/src/std/internal/windows | |
parent | b77968a70537429b4f548f90c369d26e6b6943cc (diff) | |
download | gcc-c15aa46cca0649b68613d3292cf71c7cc57ef78f.zip gcc-c15aa46cca0649b68613d3292cf71c7cc57ef78f.tar.gz gcc-c15aa46cca0649b68613d3292cf71c7cc57ef78f.tar.bz2 |
libstdc++: Fix undefined shift when _Atomic_word is 64-bit
The check for _Atomic_word being 32-bit is just a normal runtime
condition for C++11 and C++14, because it doesn't use if-constexpr. That
means the 1LL << (CHAR_BIT * sizeof(_Atomic_word)) expression expands to
1LL << 64 on Solaris, which is ill-formed.
This adds another indirection so that the shift width is zero if the
code is unreachable.
libstdc++-v3/ChangeLog:
* include/bits/shared_ptr_base.h (_Sp_counted_base::_M_release()):
Make shift width conditional on __double_word condition.
Diffstat (limited to 'libphobos/src/std/internal/windows')
0 files changed, 0 insertions, 0 deletions