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

libstdc++: Fix -Wshift-count-overflow warning in std::bitset

This shift only happens if the unsigned long long type is wider than
unsigned long but the compiler warns when it sees the shift, without
caring if it's reachable.

Use the preprocessor to compare the sizes and just reuse _M_to_ulong()
if sizeof(long) == sizeof(long long).

libstdc++-v3/ChangeLog:

	* include/std/bitset (_Base_bitset::_M_do_to_ullong): Avoid
	-Wshift-count-overflow warning.
parent 924137b9
No related branches found
No related tags found
Loading
Loading
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