https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89629
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- I think we should just use size_t for the len_aligned variable: --- a/libstdc++-v3/libsupc++/hash_bytes.cc +++ b/libstdc++-v3/libsupc++/hash_bytes.cc @@ -139,7 +139,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Remove the bytes not divisible by the sizeof(size_t). This // allows the main loop to process the data as 64-bit integers. - const int len_aligned = len & ~0x7; + const size_t len_aligned = len & ~0x7; const char* const end = buf + len_aligned; size_t hash = seed ^ (len * mul); for (const char* p = buf; p != end; p += 8)