bug-gnulib
[Top][All Lists]
Advanced

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

libc-config: Apply lesson learned on 2023-01-13


From: Bruno Haible
Subject: libc-config: Apply lesson learned on 2023-01-13
Date: Mon, 29 Jan 2024 18:19:41 +0100

On 2023-01-13, Paul Eggert committed:

        * m4/gnulib-common.m4 (_GL_HAS_ATTRIBUTE): Require Clang 5 instead
        of 3.5 for this, to pacify xlclang 16.1.0 on AIX 7.2, which
        advertises itself as clang 4.0.1

The other use of __has_attribute, in lib/cdefs.h, should better be kept
consistent with this.


2024-01-29  Bruno Haible  <bruno@clisp.org>

        libc-config: Apply lesson learned on 2023-01-13.
        * lib/cdefs.h (__glibc_has_attribute): On non-Apple platforms, don't
        use __has_attribute for clang versions < 5.0.

diff --git a/lib/cdefs.h b/lib/cdefs.h
index 87ddce319d..1bb3c8f635 100644
--- a/lib/cdefs.h
+++ b/lib/cdefs.h
@@ -43,7 +43,7 @@
      && (!defined __clang_minor__ \
          || (defined __apple_build_version__ \
              ? 6000000 <= __apple_build_version__ \
-             : 3 < __clang_major__ + (5 <= __clang_minor__))))
+             : 5 <= __clang_major__)))
 # define __glibc_has_attribute(attr) __has_attribute (attr)
 #else
 # define __glibc_has_attribute(attr) 0






reply via email to

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