[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/4] Don’t use alloc_size with xlclang 16.1
From: |
Paul Eggert |
Subject: |
[PATCH 2/4] Don’t use alloc_size with xlclang 16.1 |
Date: |
Fri, 13 Jan 2023 12:17:02 -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 | 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 <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):
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.37.2