summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-07-28 06:05:14 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-07-28 06:05:14 +0000
commit7475d443089ea3bccafa6744f612853bdc91d9f5 (patch)
tree3c02d9294e66ce485a2a820d0816cef189f2f9c4
parent55378a9eb60b2ae4bfb9051f28f5264d8043008d (diff)
ruby.h: use __extension__
* include/ruby/ruby.h (ruby_fl_type): use __extension__ to get rid of pedantic warning against RUBY_FL_USER19. https://github.com/skylightio/skylight-ruby/issues/64 * include/ruby/ruby.h (rb_mul_size_overflow): ditto for use of int128. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog9
-rw-r--r--include/ruby/ruby.h6
2 files changed, 15 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index cb27c1e..7837d59 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Thu Jul 28 15:05:12 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * include/ruby/ruby.h (ruby_fl_type): use __extension__ to get rid
+ of pedantic warning against RUBY_FL_USER19.
+ https://github.com/skylightio/skylight-ruby/issues/64
+
+ * include/ruby/ruby.h (rb_mul_size_overflow): ditto for use of
+ int128.
+
Wed Jul 27 10:32:59 2016 Martin Duerst <duerst@it.aoyama.ac.jp>
* enc/windows_1253.c: Remove dead code found by Coverity Scan.
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index 4156c11..583b338 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -792,6 +792,9 @@ VALUE rb_obj_setup(VALUE obj, VALUE klass, VALUE type);
#define RGENGC_WB_PROTECTED_NODE_CREF 1
#endif
+#ifdef __GNUC__
+__extension__
+#endif
enum ruby_fl_type {
RUBY_FL_WB_PROTECTED = (1<<5),
RUBY_FL_PROMOTED0 = (1<<5),
@@ -1603,6 +1606,9 @@ static inline int
rb_mul_size_overflow(size_t a, size_t b, size_t max, size_t *c)
{
#ifdef DSIZE_T
+# ifdef __GNUC__
+ __extension__
+# endif
DSIZE_T c2 = (DSIZE_T)a * (DSIZE_T)b;
if (c2 > max) return 1;
*c = (size_t)c2;