diff options
author | ngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-20 12:29:06 +0000 |
---|---|---|
committer | ngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-20 12:29:06 +0000 |
commit | 2b97ab88e031327b1beaa6b169cd3ec966901067 (patch) | |
tree | c66ed88344429502f20d818b6b6b16ee2c71d60e /eval_error.c | |
parent | 27c13f82b9312f984789bb5a0426328272b3b873 (diff) | |
download | ruby-2b97ab88e031327b1beaa6b169cd3ec966901067.tar.gz |
Use RB_GNUC_EXTENSION_BLOCK instead of __extension__
* include/ruby/defines.h (RB_GNUC_EXTENSION, RB_GNUC_EXTENSION_BLOCK):
macros for skipping __extension__ on non-GCC compilers.
* eval_error.c (warn_print): use RB_GNUC_EXTENSION_BLOCK instead of
__extension__ because __extension__ is a GNU extension.
Fix compile error on Solaris 10 with Oracle Solaris Studio 12.x.
[Bug #12397] [ruby-dev:49629].
* internal.h (rb_fstring_cstr, rb_fstring_enc_cstr): ditto
* include/ruby/encoding.h (rb_enc_str_new, rb_enc_str_new_cstr): ditto
* include/ruby/intern.h (rb_str_new, rb_str_new_cstr,
rb_usascii_str_new, rb_utf8_str_new, rb_tainted_str_new_cstr,
rb_usascii_str_new_cstr, rb_utf8_str_new_cstr,
rb_external_str_new_cstr, rb_locale_str_new_cstr,
rb_str_buf_new_cstr, rb_str_cat_cstr, rb_exc_new_cstr): ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_error.c')
-rw-r--r-- | eval_error.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/eval_error.c b/eval_error.c index d18658bb14..6b996fa073 100644 --- a/eval_error.c +++ b/eval_error.c @@ -4,12 +4,11 @@ */ #ifdef HAVE_BUILTIN___BUILTIN_CONSTANT_P -#define warn_print(x) __extension__ ( \ -{ \ +#define warn_print(x) RB_GNUC_EXTENSION_BLOCK( \ (__builtin_constant_p(x)) ? \ rb_write_error2((x), (long)strlen(x)) : \ - rb_write_error(x); \ -}) + rb_write_error(x) \ +) #else #define warn_print(x) rb_write_error(x) #endif |