ruby-changes:60712
From: Yusuke <ko1@a...>
Date: Thu, 9 Apr 2020 14:25:16 +0900 (JST)
Subject: [ruby-changes:60712] b965e7e05e (master): Revert "include/ruby/3/core/rtypeddata.h: Use 0 instead of NULL for C++ compiler"
https://git.ruby-lang.org/ruby.git/commit/?id=b965e7e05e From b965e7e05e4307e3c4b396673e63dbc493ef2f20 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Thu, 9 Apr 2020 14:24:23 +0900 Subject: Revert "include/ruby/3/core/rtypeddata.h: Use 0 instead of NULL for C++ compiler" This reverts commit d2bb2e066b5a914283dd3ea473fc1762183af013. It didn't work: https://rubyci.org/logs/rubyci.s3.amazonaws.com/icc-x64/ruby-master/log/20200409T050004Z.log.html.gz#end ``` In file included from ../../.././include/ruby/3/core.h(32), from ../../.././include/ruby/ruby.h(28), from ../../.././include/ruby.h(33), from init.c(1): ../../.././include/ruby/3/core/rtypeddata.h(164): warning #967: conversion from "int" to "const struct rb_data_type_struct *"; sizes do not match RUBY3_UNREACHABLE_RETURN(0); ``` diff --git a/include/ruby/3/core/rtypeddata.h b/include/ruby/3/core/rtypeddata.h index 9ba1f36..21b0857 100644 --- a/include/ruby/3/core/rtypeddata.h +++ b/include/ruby/3/core/rtypeddata.h @@ -160,8 +160,8 @@ RTYPEDDATA_TYPE(VALUE obj) https://github.com/ruby/ruby/blob/trunk/include/ruby/3/core/rtypeddata.h#L160 #if ! RUBY_NDEBUG if (RB_UNLIKELY(! RTYPEDDATA_P(obj))) { rb_unexpected_type(obj, RUBY_T_DATA); -# if ! defined(__sun) - RUBY3_UNREACHABLE_RETURN(0); +# if ! defined(__sun) && ! RUBY3_COMPILER_IS(Intel) + RUBY3_UNREACHABLE_RETURN(NULL); # endif } #endif -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/