PR libstdc++/86280 fix undefined left shift on 32-bit targets
PR libstdc++/86280 * include/experimental/memory_resource (__resource_adaptor_common::_AlignMgr::_M_token_size): Use type large enough for result of left shift. From-SVN: r261888
This commit is contained in:
parent
5885a1bd53
commit
0b4bc9a1e8
@ -1,5 +1,10 @@
|
||||
2018-06-22 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
PR libstdc++/86280
|
||||
* include/experimental/memory_resource
|
||||
(__resource_adaptor_common::_AlignMgr::_M_token_size): Use type large
|
||||
enough for result of left shift.
|
||||
|
||||
PR libstdc++/86138
|
||||
* include/bits/basic_string.tcc:
|
||||
[__cplusplus > 201402 && !_GLIBCXX_USE_CXX11_ABI]
|
||||
|
@ -326,7 +326,7 @@ namespace pmr {
|
||||
return 1;
|
||||
if (_M_align <= (1ul << (sizeof(short) * __CHAR_BIT__)))
|
||||
return sizeof(short);
|
||||
if (_M_align <= (1ul << (sizeof(int) * __CHAR_BIT__)))
|
||||
if (_M_align <= (1ull << (sizeof(int) * __CHAR_BIT__)))
|
||||
return sizeof(int);
|
||||
return sizeof(char*);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user