Skip to content

Commit d9f2d2b

Browse files
committed
maybe fix other warning
1 parent dd82c2c commit d9f2d2b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/absl/container/internal/raw_hash_set.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,11 @@ inline bool IsEmptyOrDeleted(ctrl_t c) { return c < kSentinel; }
324324
// Work around this by using the portable implementation of Group
325325
// when using -funsigned-char under GCC.
326326
inline __m128i _mm_cmpgt_epi8_fixed(__m128i a, __m128i b) {
327-
#if defined(__GNUC__) && !defined(__clang__)
327+
// dd: in the latest gcc we get warnings about overflow here.
328+
// the linked bug was fixed in gcc 9 and fixes were backported
329+
// to gcc 7 and 8 patch releases. To fix the warning, I just
330+
// added a check for the GCC version.
331+
#if defined(__GNUC__) && (__GNUC__ < 9) && !defined(__clang__)
328332
if (std::is_unsigned<char>::value) {
329333
const __m128i mask = _mm_set1_epi8(0x80);
330334
const __m128i diff = _mm_subs_epi8(b, a);

0 commit comments

Comments
 (0)