diff options
Diffstat (limited to 'internal/compilers.h')
-rw-r--r-- | internal/compilers.h | 18 |
1 files changed, 0 insertions, 18 deletions
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 */ |