diff options
author | 卜部昌平 <[email protected]> | 2021-04-09 17:56:43 +0900 |
---|---|---|
committer | 卜部昌平 <[email protected]> | 2021-04-13 14:30:21 +0900 |
commit | f411fcd14587cfbf1efb86944134b993c04b050e (patch) | |
tree | 2a8eafc72186f56061625165bf450b86f98ca52c /include/ruby/internal/has/builtin.h | |
parent | 6878d51731c596fa4dc375b997c1c883d585db02 (diff) |
get rid of #pragma GCC diagnostic ignored "-Wundef"
Use of TOKEN_PASTE was a bad idea at the first place. Just use ##
everywhere. Nobody practically lacks token pasting.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4371
Diffstat (limited to 'include/ruby/internal/has/builtin.h')
-rw-r--r-- | include/ruby/internal/has/builtin.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/ruby/internal/has/builtin.h b/include/ruby/internal/has/builtin.h index 18cfc69e19..ece354a1b2 100644 --- a/include/ruby/internal/has/builtin.h +++ b/include/ruby/internal/has/builtin.h @@ -47,7 +47,7 @@ # * __has_builtin only since GCC 10. This section can be made more # * granular. */ # /* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66970 */ -# define RBIMPL_HAS_BUILTIN(_) RBIMPL_TOKEN_PASTE(RBIMPL_HAS_BUILTIN_, _) +# define RBIMPL_HAS_BUILTIN(_) (RBIMPL_HAS_BUILTIN_ ## _) # define RBIMPL_HAS_BUILTIN___builtin_add_overflow RBIMPL_COMPILER_SINCE(GCC, 5, 1, 0) # define RBIMPL_HAS_BUILTIN___builtin_alloca RBIMPL_COMPILER_SINCE(GCC, 0, 0, 0) # define RBIMPL_HAS_BUILTIN___builtin_alloca_with_align RBIMPL_COMPILER_SINCE(GCC, 6, 1, 0) @@ -78,7 +78,7 @@ #else # /* Take config.h definition when available */ -# define RBIMPL_HAS_BUILTIN(_) (RBIMPL_TOKEN_PASTE(RBIMPL_HAS_BUILTIN_, _)+0) +# define RBIMPL_HAS_BUILTIN(_) ((RBIMPL_HAS_BUILTIN_ ## _)+0) # define RBIMPL_HAS_BUILTIN___builtin_add_overflow HAVE_BUILTIN___BUILTIN_ADD_OVERFLOW # define RBIMPL_HAS_BUILTIN___builtin_alloca_with_align HAVE_BUILTIN___BUILTIN_ALLOCA_WITH_ALIGN # define RBIMPL_HAS_BUILTIN___builtin_assume_aligned HAVE_BUILTIN___BUILTIN_ASSUME_ALIGNED |