]> Savannah Git Hosting - gnulib.git/commitdiff
Don’t use alloc_size with xlclang 16.1
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 13 Jan 2023 19:40:24 +0000 (11:40 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 13 Jan 2023 20:15:50 +0000 (12:15 -0800)
* 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.1.0, and which otherwise issues
warnings like “./xalloc.h:141:3: warning: 1540-2990 The attribute
"__attribute__((alloc_size(2, 3)))" is not supported.  The
attribute is ignored.” when building bleeding-edge GNU grep.

ChangeLog
m4/gnulib-common.m4

index 916ed890c7f7297f8c635af99ccbcff15baec5bb..866a405d4a9f3b66352fc09385600633cbe2ad94 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2023-01-13  Paul Eggert  <eggert@cs.ucla.edu>
 
+       Don’t use alloc_size with xlclang 16.1
+       * 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.1.0, and which otherwise issues
+       warnings like “./xalloc.h:141:3: warning: 1540-2990 The attribute
+       "__attribute__((alloc_size(2, 3)))" is not supported.  The
+       attribute is ignored.” when building bleeding-edge GNU grep.
+
        localename: -Wtautological-pointer-compare
        Problem found by xlclang 16.1 on AIX 7.2.
        * lib/localename.c (duplocale, freelocale):
index 26239caa2b148937420807c3be1765ff015921b9..2db3376b01e00fd8944c0b7cd2c9d8f4093de52b 100644 (file)
@@ -71,7 +71,7 @@ AC_DEFUN([gl_COMMON_BODY], [
      && (!defined __clang_minor__ \
          || (defined __apple_build_version__ \
              ? 6000000 <= __apple_build_version__ \
-             : 3 < __clang_major__ + (5 <= __clang_minor__))))
+             : 5 <= __clang_major__)))
 # define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__)
 #else
 # define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr