mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 21:14:23 +02:00
use configure-detected sanity of _Alignof
This is actually already checked in (Ruby's) configure.
This commit is contained in:
parent
fa54406f50
commit
12ec1fb2b1
Notes:
git
2023-08-25 08:28:18 +00:00
1 changed files with 4 additions and 1 deletions
|
@ -199,7 +199,10 @@
|
||||||
/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023
|
/* 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>.
|
<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. */
|
||||||
#if (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112 \
|
#if defined(HAVE__ALIGNOF)
|
||||||
|
# /* Autoconf detected availability of a sane `_Alignof()`. */
|
||||||
|
# define ALIGN_OF(type) RB_GNUC_EXTENSION(_Alignof(type))
|
||||||
|
#elif (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112 \
|
||||||
|| (defined(__GNUC__) && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \
|
|| (defined(__GNUC__) && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \
|
||||||
&& !defined(__clang__)) \
|
&& !defined(__clang__)) \
|
||||||
|| (defined(__clang__) && __clang_major__ < 8))
|
|| (defined(__clang__) && __clang_major__ < 8))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue