diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-23 16:17:57 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-23 16:17:57 +0000 |
commit | 98bddfefc1773dc9a0f3771eb65224c26ee66281 (patch) | |
tree | c1185959dc1c4bc0faadab109a6e605edfb6f2ca /include/ruby/ruby.h | |
parent | 0c8e6ae0b87d5e180385e4c46d83384e9eb7d28f (diff) | |
download | ruby-98bddfefc1773dc9a0f3771eb65224c26ee66281.tar.gz |
undef HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P on GCC 4.8
GCC 4.8 with optimization causes error if it compiles following code.
[Bug #14221]
```c
__builtin_choose_expr(__builtin_constant_p(b),0,1)
```
https://github.com/ruby/ruby/pull/1778
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby/ruby.h')
-rw-r--r-- | include/ruby/ruby.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index 56aca0db5f..7c1b909113 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -26,15 +26,17 @@ extern "C" { #include RUBY_EXTCONF_H #endif +#include "defines.h" + #if defined(__cplusplus) /* __builtin_choose_expr and __builtin_types_compatible aren't available * on C++. See https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html */ # undef HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P # undef HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P +#elif GCC_VERSION_BEFORE(4,8,6) /* Bug #14221 */ +# undef HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P #endif -#include "defines.h" - #ifndef ASSUME # ifdef UNREACHABLE # define ASSUME(x) (RB_LIKELY(!!(x)) ? (void)0 : UNREACHABLE) |