From: Paul Eggert <eggert@cs.ucla.edu>
To: bug-gnulib@gnu.org
Cc: Paul Eggert <eggert@cs.ucla.edu>
Subject: [PATCH 2/4] Don’t use alloc_size with xlclang 16.1
Date: Fri, 13 Jan 2023 12:17:02 -0800 [thread overview]
Message-ID: <20230113201704.325290-2-eggert@cs.ucla.edu> (raw)
In-Reply-To: <20230113201704.325290-1-eggert@cs.ucla.edu>
* 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
next prev parent reply other threads:[~2023-01-13 20:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-13 20:17 [PATCH 1/4] localename: -Wtautological-pointer-compare Paul Eggert
2023-01-13 20:17 ` Paul Eggert [this message]
2023-01-13 20:17 ` [PATCH 3/4] assert-h: fix configure comment-out Paul Eggert
2023-01-13 20:17 ` [PATCH 4/4] assert-h: suppress xlclang 16.1 false alarms Paul Eggert
2023-01-13 22:59 ` [PATCH 1/4] localename: -Wtautological-pointer-compare Bruno Haible
2023-01-13 23:36 ` Paul Eggert
2023-01-14 11:00 ` Bruno Haible
2023-01-15 3:02 ` Paul Eggert
2023-01-15 22:03 ` Bruno Haible
2023-01-16 0:15 ` Paul Eggert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230113201704.325290-2-eggert@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=bug-gnulib@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).