+2021-01-21 Paul Eggert <eggert@cs.ucla.edu>
+
+ Port FALLTHROUGH to clang 3.4 and earlier
+ Problem reported by Akim Demaille in:
+ https://lists.gnu.org/r/bug-gnulib/2021-01/msg00241.html
+ * lib/cdefs.h (__glibc_has_attribute):
+ * m4/gnulib-common.m4 (gl_COMMON_BODY):
+ Do not trust __has_attribute in clang 3.4 and earlier, as
+ <https://releases.llvm.org/3.5.0/tools/clang/docs/ReleaseNotes.html>
+ says that __has_attribute is unreliable in these old versions.
+
2021-01-20 Bruno Haible <bruno@clisp.org>
gc-random: Fix link error in tests.
#if defined __has_attribute && __has_attribute (...)
even though they do not need to evaluate the right-hand side of the &&.
Similarly for __has_builtin, etc. */
-#ifdef __has_attribute
+#if (defined __has_attribute \
+ && (!defined __clang_minor__ \
+ || 3 < __clang_major__ + (5 <= __clang_minor__)))
# define __glibc_has_attribute(attr) __has_attribute (attr)
#else
# define __glibc_has_attribute(attr) 0
#endif])
AH_VERBATIM([attribute],
[/* Attributes. */
-#ifdef __has_attribute
+#if (defined __has_attribute \
+ && (!defined __clang_minor__ \
+ || 3 < __clang_major__ + (5 <= __clang_minor__)))
# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__)
#else
# define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr