diff options
author | 卜部昌平 <[email protected]> | 2019-12-04 10:26:41 +0900 |
---|---|---|
committer | 卜部昌平 <[email protected]> | 2019-12-26 20:45:12 +0900 |
commit | c27bcd70574165d30bb3a9dc50a6b35fc419ab2b (patch) | |
tree | c70419a17f0c7d4fb92c03420678b5ba74c94bef /internal/compilers.h | |
parent | adc49f0f9a1106fc5a81b5aba684ec1578ac7d6d (diff) |
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.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/2711
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 */ |