diff options
Diffstat (limited to 'gl/m4/stdalign.m4')
| -rw-r--r-- | gl/m4/stdalign.m4 | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/gl/m4/stdalign.m4 b/gl/m4/stdalign.m4 index 2b4762f3..885feafd 100644 --- a/gl/m4/stdalign.m4 +++ b/gl/m4/stdalign.m4 | |||
| @@ -1,9 +1,10 @@ | |||
| 1 | # stdalign.m4 | 1 | # stdalign.m4 |
| 2 | # serial 1 | 2 | # serial 3 |
| 3 | dnl Copyright 2011-2024 Free Software Foundation, Inc. | 3 | dnl Copyright 2011-2025 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| 7 | dnl This file is offered as-is, without any warranty. | ||
| 7 | 8 | ||
| 8 | # Check for alignas and alignof that conform to C23. | 9 | # Check for alignas and alignof that conform to C23. |
| 9 | 10 | ||
| @@ -81,10 +82,10 @@ AC_DEFUN([gl_ALIGNASOF], | |||
| 81 | 82 | ||
| 82 | References: | 83 | References: |
| 83 | ISO C23 (latest free draft | 84 | ISO C23 (latest free draft |
| 84 | <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n3047.pdf>) | 85 | <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3096.pdf>) |
| 85 | sections 6.5.3.4, 6.7.5, 7.15. | 86 | sections 6.5.3.4, 6.7.5, 7.15. |
| 86 | C++11 (latest free draft | 87 | C++11 (latest free draft |
| 87 | <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf>) | 88 | <https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf>) |
| 88 | section 18.10. */ | 89 | section 18.10. */ |
| 89 | 90 | ||
| 90 | /* alignof (TYPE), also known as _Alignof (TYPE), yields the alignment | 91 | /* alignof (TYPE), also known as _Alignof (TYPE), yields the alignment |
| @@ -103,11 +104,13 @@ AC_DEFUN([gl_ALIGNASOF], | |||
| 103 | 104 | ||
| 104 | /* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023 | 105 | /* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023 |
| 105 | <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. | 106 | <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. |
| 106 | clang versions < 8.0.0 have the same bug. */ | 107 | clang versions < 8.0.0 have the same bug. |
| 108 | IBM XL C V16.1.0 cc (non-clang) has the same bug. */ | ||
| 107 | # if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \ | 109 | # if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \ |
| 108 | || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \ | 110 | || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \ |
| 109 | && !defined __clang__) \ | 111 | && !defined __clang__) \ |
| 110 | || (defined __clang__ && __clang_major__ < 8)) | 112 | || (defined __clang__ && __clang_major__ < 8) \ |
| 113 | || defined __xlC__) | ||
| 111 | # undef/**/_Alignof | 114 | # undef/**/_Alignof |
| 112 | # ifdef __cplusplus | 115 | # ifdef __cplusplus |
| 113 | # if (201103 <= __cplusplus || defined _MSC_VER) | 116 | # if (201103 <= __cplusplus || defined _MSC_VER) |
| @@ -178,7 +181,8 @@ AC_DEFUN([gl_ALIGNASOF], | |||
| 178 | # if ((defined _Alignas \ | 181 | # if ((defined _Alignas \ |
| 179 | && !(defined __cplusplus \ | 182 | && !(defined __cplusplus \ |
| 180 | && (201103 <= __cplusplus || defined _MSC_VER))) \ | 183 | && (201103 <= __cplusplus || defined _MSC_VER))) \ |
| 181 | || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) | 184 | || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__ \ |
| 185 | && !defined __xlC__)) | ||
| 182 | # define alignas _Alignas | 186 | # define alignas _Alignas |
| 183 | # endif | 187 | # endif |
| 184 | # endif | 188 | # endif |
