From b18a6b648e3c74a3b7360d2557015b05aa8b0390 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Fri, 10 Apr 2020 22:03:03 +0900 Subject: [PATCH] include/ruby/3: do not skip RUBY3_UNREACHABLE_RETURN Revert "Revert "include/ruby/3/core/rtypeddata.h: Use 0 instead of NULL for C++ compiler"" Revert "include/ruby/3/core/rtypeddata.h: Use 0 instead of NULL for C++ compiler" Revert "include/ruby/3: Skip RUBY3_UNREACHABLE_RETURN for icc" Revert "include/ruby/3: Stop RUBY3_UNREACHABLE_RETURN to suppress a SunC warning" This reverts commit b965e7e05e4307e3c4b396673e63dbc493ef2f20. This reverts commit d2bb2e066b5a914283dd3ea473fc1762183af013. This reverts commit 8ab4c55e7a70f5a5bd041d93f425eeef4a47c01e. This reverts commit 78eec3cdc5ff0664b421e041f4f70a814542b914. After https://github.com/ruby/ruby/pull/3011, we no longer need these ifdef guards. --- include/ruby/3/core/rtypeddata.h | 2 -- include/ruby/3/memory.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/include/ruby/3/core/rtypeddata.h b/include/ruby/3/core/rtypeddata.h index 21b08570fe..cc00fa2500 100644 --- a/include/ruby/3/core/rtypeddata.h +++ b/include/ruby/3/core/rtypeddata.h @@ -160,9 +160,7 @@ RTYPEDDATA_TYPE(VALUE obj) #if ! RUBY_NDEBUG if (RB_UNLIKELY(! RTYPEDDATA_P(obj))) { rb_unexpected_type(obj, RUBY_T_DATA); -# if ! defined(__sun) && ! RUBY3_COMPILER_IS(Intel) RUBY3_UNREACHABLE_RETURN(NULL); -# endif } #endif diff --git a/include/ruby/3/memory.h b/include/ruby/3/memory.h index 4e9741eee5..9001fd2ab3 100644 --- a/include/ruby/3/memory.h +++ b/include/ruby/3/memory.h @@ -253,9 +253,7 @@ ruby3_size_mul_or_raise(size_t x, size_t y) } else { ruby_malloc_size_overflow(x, y); -# if ! defined(__sun) && ! RUBY3_COMPILER_IS(Intel) RUBY3_UNREACHABLE_RETURN(0); -# endif } }