From 4ac42874bc5b39b82199d9d86eea1c64efe4d73d Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Wed, 20 May 2020 17:20:59 +0900 Subject: Update include/ruby/assert.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 卜部昌平 --- include/ruby/assert.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include') 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 /* -- cgit v1.2.3