clang does not have __builtin_add_overflow_p __builtin_sub_overflow_p __builtin_mul_overflow_p Therefore the condition (7 <= __GNUC__) used in intprops.h and xalloc-oversized.h is fine: it evaluates to false on clang (since clang pretends to be GCC 4.2.1 compatible on Unix platforms).
2020-08-09 Bruno Haible <[email protected]> intprops: Fix typo in comment. * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW_P): Fix typo in comment. diff --git a/lib/intprops.h b/lib/intprops.h index 6de65b0..c0bfecd 100644 --- a/lib/intprops.h +++ b/lib/intprops.h @@ -239,7 +239,7 @@ #endif /* True if __builtin_add_overflow_p (A, B, C) works, and similarly for - __builtin_mul_overflow_p and __builtin_mul_overflow_p. */ + __builtin_sub_overflow_p and __builtin_mul_overflow_p. */ #define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__) /* The _GL*_OVERFLOW macros have the same restrictions as the
