]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
alignasof: port to IBM XL C V16.1
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 18 Jan 2025 06:11:54 +0000 (22:11 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 18 Jan 2025 06:12:48 +0000 (22:12 -0800)
* m4/stdalign.m4 (gl_ALIGNASOF):
Work around similar bug in IBM XL C V16.1.0 cc (non-clang).
Since this is the last version of this obsolescent compiler,
assume the bug is in earlier versions.

ChangeLog
m4/stdalign.m4

index 43e1361ed7799e651295a001050e18a327d7acce..bd3417c7ef7f15d8ab960d4575d447452b3a1117 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2025-01-17  Paul Eggert  <eggert@cs.ucla.edu>
 
+       alignasof: port to IBM XL C V16.1
+       * m4/stdalign.m4 (gl_ALIGNASOF):
+       Work around similar bug in IBM XL C V16.1.0 cc (non-clang).
+       Since this is the last version of this obsolescent compiler,
+       assume the bug is in earlier versions.
+
        stdalign, stdnoreturn: improve deprecation warnings
        * modules/stdalign, modules/stdalign-h, modules/stdnoreturn:
        * modules/stdnoreturn-h: Use more consistent deprecation
index bb2d1555373bfd8e592db6b5c48ce714e2400058..bd4ec12e89cafe4d162d620f74c982a75483b882 100644 (file)
@@ -1,5 +1,5 @@
 # stdalign.m4
-# serial 1
+# serial 2
 dnl Copyright 2011-2025 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -104,11 +104,13 @@ AC_DEFUN([gl_ALIGNASOF],
 
 /* GCC releases before GCC 4.9 had a bug in _Alignof.  See GCC bug 52023
    <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.
-   clang versions < 8.0.0 have the same bug.  */
+   clang versions < 8.0.0 have the same bug.
+   IBM XL C V16.1.0 cc (non-clang) has the same bug.  */
 #  if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \
        || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \
            && !defined __clang__) \
-       || (defined __clang__ && __clang_major__ < 8))
+       || (defined __clang__ && __clang_major__ < 8) \
+       || defined __xlC__)
 #   undef/**/_Alignof
 #   ifdef __cplusplus
 #    if (201103 <= __cplusplus || defined _MSC_VER)