aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-05-20 17:20:59 +0900
committerKoichi Sasada <ko1@atdot.net>2020-05-26 03:21:14 +0900
commit4ac42874bc5b39b82199d9d86eea1c64efe4d73d (patch)
treebcb32f244be359113e9a8295325fbad7661d1596 /include
parent21991e6ca59274e41a472b5256bd3245f6596c90 (diff)
downloadruby-4ac42874bc5b39b82199d9d86eea1c64efe4d73d.tar.gz
Update include/ruby/assert.h
Co-authored-by: 卜部昌平 <shyouhei@ruby-lang.org>
Diffstat (limited to 'include')
-rw-r--r--include/ruby/assert.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/ruby/assert.h b/include/ruby/assert.h
index 41ecbd8936..14a6e280ce 100644
--- a/include/ruby/assert.h
+++ b/include/ruby/assert.h
@@ -32,7 +32,13 @@
#endif
#if RUBY_DEBUG > 0 && defined(NDEBUG)
-#warning NDEBUG is ignored because RUBY_DEBUG>0.
+#if defined(_MSC_VER)
+# pragma message("NDEBUG is ignored because RUBY_DEBUG>0.")
+#elif defined(__GNUC__)
+# pragma GCC warning "NDEBUG is ignored because RUBY_DEBUG>0."
+#else
+# error NDEBUG is ignored because RUBY_DEBUG>0.
+#endif
#endif
/*