]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
intprops: Avoid bogus "warning: division by zero is undefined" on clang.
authorBruno Haible <bruno@clisp.org>
Sun, 16 Aug 2020 17:12:28 +0000 (19:12 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 16 Aug 2020 17:12:28 +0000 (19:12 +0200)
* lib/intprops.h (_GL__GENERIC_BOGUS): Define to 1 on clang.

ChangeLog
lib/intprops.h

index dc27e2294abcf9eba6ad596562717222e0b0f2a4..1c79439beda9e2afc8820239c3813afb90473dbc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2020-08-16  Bruno Haible  <bruno@clisp.org>
+
+       intprops: Avoid bogus "warning: division by zero is undefined" on clang.
+       * lib/intprops.h (_GL__GENERIC_BOGUS): Define to 1 on clang.
+
 2020-08-16  Bruno Haible  <bruno@clisp.org>
 
        log2l: Disable MSVC workaround on clang.
index 2ab1b6ff6a9aa390ea749f4b00e4336d71d97e44..6ee63244abbd42bdd5c34a06f6c7c82d28a573a0 100644 (file)
    For now, assume all versions of GCC-like compilers generate bogus
    warnings for _Generic.  This matters only for compilers that
    lack relevant builtins.  */
-#if __GNUC__
+#if __GNUC__ || defined __clang__
 # define _GL__GENERIC_BOGUS 1
 #else
 # define _GL__GENERIC_BOGUS 0