bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

improve clang support (11)


From: Bruno Haible
Subject: improve clang support (11)
Date: Sun, 09 Aug 2020 13:29:05 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-186-generic; KDE/5.18.0; x86_64; ; )

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  <bruno@clisp.org>

        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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]