Skip to content
Snippets Groups Projects
Commit bf883e64 authored by Jonathan Wakely's avatar Jonathan Wakely
Browse files

libstdc++: Remove redundant zeroing in std::bitset::operator>>= [PR113806]

The unused bits in the high word are already zero before this operation.
Shifting the used bits to the right cannot affect the unused bits, so we
don't need to sanitize them.

libstdc++-v3/ChangeLog:

	PR libstdc++/113806
	* include/std/bitset (bitset::operator>>=): Remove redundant
	call to _M_do_sanitize.
parent e7ae13a8
No related branches found
No related tags found
No related merge requests found
......@@ -1094,10 +1094,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
operator>>=(size_t __position) _GLIBCXX_NOEXCEPT
{
if (__builtin_expect(__position < _Nb, 1))
{
this->_M_do_right_shift(__position);
this->_M_do_sanitize();
}
this->_M_do_right_shift(__position);
else
this->_M_do_reset();
return *this;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment