From 77114b6512f21b15a4a72c2bd7b9471a266f17db Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 13 Jan 2023 11:40:24 -0800 Subject: [PATCH] =?utf8?q?Don=E2=80=99t=20use=20alloc=5Fsize=20with=20xlcl?= =?utf8?q?ang=2016.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * 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 | 8 ++++++++ m4/gnulib-common.m4 | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) 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 -- 2.39.5