From c27bcd70574165d30bb3a9dc50a6b35fc419ab2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Wed, 4 Dec 2019 10:26:41 +0900 Subject: internal/gc.h rework Improved readability by reducing the use of macros. Also moved some part of internal/compilers.h into this file, because it seems to be the right place for them. --- internal/compilers.h | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'internal/compilers.h') diff --git a/internal/compilers.h b/internal/compilers.h index 781dd9cfc9..0f470937c5 100644 --- a/internal/compilers.h +++ b/internal/compilers.h @@ -236,22 +236,4 @@ rb_obj_builtin_type(VALUE obj) # define BITFIELD(type, name, size) unsigned int name : size #endif -#if defined(USE_UNALIGNED_MEMBER_ACCESS) && USE_UNALIGNED_MEMBER_ACCESS && \ - (defined(__clang__) || GCC_VERSION_SINCE(9, 0, 0)) -#include "warnings.h" -# define UNALIGNED_MEMBER_ACCESS(expr) __extension__({ \ - COMPILER_WARNING_PUSH; \ - COMPILER_WARNING_IGNORED(-Waddress-of-packed-member); \ - typeof(expr) unaligned_member_access_result = (expr); \ - COMPILER_WARNING_POP; \ - unaligned_member_access_result; \ -}) -#else -# define UNALIGNED_MEMBER_ACCESS(expr) expr -#endif -#define UNALIGNED_MEMBER_PTR(ptr, mem) UNALIGNED_MEMBER_ACCESS(&(ptr)->mem) - -#undef RB_OBJ_WRITE -#define RB_OBJ_WRITE(a, slot, b) UNALIGNED_MEMBER_ACCESS(rb_obj_write((VALUE)(a), (VALUE *)(slot), (VALUE)(b), __FILE__, __LINE__)) - #endif /* INTERNAL_COMPILERS_H */ -- cgit v1.2.1