From: Bruno Haible Date: Sun, 16 Aug 2020 17:12:28 +0000 (+0200) Subject: intprops: Avoid bogus "warning: division by zero is undefined" on clang. X-Git-Tag: v1.0~3720 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=41ea6b89ba6cd4ef8af34ec2c0cf7a4d437c3260;p=thirdparty%2Fgnulib.git intprops: Avoid bogus "warning: division by zero is undefined" on clang. * lib/intprops.h (_GL__GENERIC_BOGUS): Define to 1 on clang. --- diff --git a/ChangeLog b/ChangeLog index dc27e2294a..1c79439bed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2020-08-16 Bruno Haible + + 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 log2l: Disable MSVC workaround on clang. diff --git a/lib/intprops.h b/lib/intprops.h index 2ab1b6ff6a..6ee63244ab 100644 --- a/lib/intprops.h +++ b/lib/intprops.h @@ -396,7 +396,7 @@ 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