https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92059

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
-Wsystem-headers shows more undefined behaviour too:

In file included from dynbs.cc:1:
/usr/include/c++/8/tr2/dynamic_bitset: In instantiation of
‘std::tr2::dynamic_bitset<_WordT, _Alloc>& std::tr2::dynamic_bitset<_WordT,
_Alloc>::operator=(const std::tr2::dynamic_bitset<_WordT, _Alloc>&) [with
_WordT = long long unsigned int; _Alloc = std::allocator<long long unsigned
int>]’:
dynbs.cc:5:8:   required from here
/usr/include/c++/8/tr2/dynamic_bitset:682:7: warning: no return statement in
function returning non-void [-Wreturn-type]
       }
       ^
/usr/include/c++/8/tr2/dynamic_bitset: In instantiation of
‘std::tr2::__dynamic_bitset_base<_WordT,
_Alloc>::__dynamic_bitset_base(std::tr2::__dynamic_bitset_base<_WordT,
_Alloc>::size_type, long long unsigned int, const allocator_type&) [with _WordT
= long long unsigned int; _Alloc = std::allocator<long long unsigned int>;
std::tr2::__dynamic_bitset_base<_WordT, _Alloc>::size_type = long unsigned int;
std::tr2::__dynamic_bitset_base<_WordT, _Alloc>::allocator_type =
std::allocator<long long unsigned int>]’:
/usr/include/c++/8/tr2/dynamic_bitset:583:15:   required from
‘std::tr2::dynamic_bitset<_WordT,
_Alloc>::dynamic_bitset(std::tr2::dynamic_bitset<_WordT, _Alloc>::size_type,
long long unsigned int, const allocator_type&) [with _WordT = long long
unsigned int; _Alloc = std::allocator<long long unsigned int>;
std::tr2::dynamic_bitset<_WordT, _Alloc>::size_type = long unsigned int;
std::tr2::dynamic_bitset<_WordT, _Alloc>::allocator_type = std::allocator<long
long unsigned int>]’
dynbs.cc:4:38:   required from here
/usr/include/c++/8/tr2/dynamic_bitset:100:13: warning: left shift count >=
width of type [-Wshift-count-overflow]
      __mask <<= _S_bits_per_block;
      ~~~~~~~^~~~~~~~~~~~~~~~~~~~~

Reply via email to