From: Paul Eggert Date: Fri, 13 Jan 2023 19:40:24 +0000 (-0800) Subject: Don’t use alloc_size with xlclang 16.1 X-Git-Tag: v1.0~1841 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=77114b6512f21b15a4a72c2bd7b9471a266f17db;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 916ed890c7..866a405d4a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2023-01-13 Paul Eggert + 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): diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4 index 26239caa2b..2db3376b01 100644 --- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 @@ -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