summaryrefslogtreecommitdiff
path: root/include/ruby/assert.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/ruby/assert.h')
-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
/*