Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #14510: Avoid triggering undefined behaviour in base_uint<BITS>…
…::bits() Summary: PR14510 backport https://github.com/bitcoin/bitcoin/pull/14510/files 96f6dc9fc50b1cc59e26d50940ebf46e1bdcc0ba Avoid triggering undefined behaviour in base_uint<BITS>::bits() (practicalswift) Pull request description: Avoid triggering undefined behaviour in `base_uint<BITS>::bits()`. `1 << 31` is undefined behaviour in C++11. Given the reasonable assumption of `sizeof(int) * CHAR_BIT == 32`. Test Plan: `make check` Reviewers: Fabien, #bitcoin_abc, deadalnix Reviewed By: #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D3126
- Loading branch information