use configure-detected sanity of _Alignof

This is actually already checked in (Ruby's) configure.
This commit is contained in:
卜部昌平 2023-08-25 14:21:55 +09:00
parent fa54406f50
commit 12ec1fb2b1
Notes: git 2023-08-25 08:28:18 +00:00

View File

@ -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))