ruby-changes:60695
From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Wed, 8 Apr 2020 16:22:43 +0900 (JST)
Subject: [ruby-changes:60695] 6163a4e1b3 (master): RUBY3_HAS_BUILTIN: fix for nonexistent builtin
https://git.ruby-lang.org/ruby.git/commit/?id=6163a4e1b3 From 6163a4e1b33ed7df27d0c37e835ce04407857a16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= <shyouhei@r...> Date: Wed, 8 Apr 2020 16:18:59 +0900 Subject: RUBY3_HAS_BUILTIN: fix for nonexistent builtin Trying to fix icc breakage: https://rubyci.org/logs/rubyci.s3.amazonaws.com/icc-x64/ruby-master/log/20200408T050004Z.fail.html.gz It seems the macro had problems when a builtin does not exist for the target compiler. Force evaluete to 0 then, by adding 0 to the expression. diff --git a/include/ruby/3/has/builtin.h b/include/ruby/3/has/builtin.h index 51e1875..b095ffd 100644 --- a/include/ruby/3/has/builtin.h +++ b/include/ruby/3/has/builtin.h @@ -65,7 +65,7 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/3/has/builtin.h#L65 #else # /* Take config.h definition when available */ -# define RUBY3_HAS_BUILTIN(_) RUBY3_TOKEN_PASTE(RUBY3_HAS_BUILTIN_, _) +# define RUBY3_HAS_BUILTIN(_) (RUBY3_TOKEN_PASTE(RUBY3_HAS_BUILTIN_, _)+0) # define RUBY3_HAS_BUILTIN___builtin_add_overflow HAVE_BUILTIN___BUILTIN_ADD_OVERFLOW # define RUBY3_HAS_BUILTIN___builtin_alloca_with_align HAVE_BUILTIN___BUILTIN_ALLOCA_WITH_ALIGN # define RUBY3_HAS_BUILTIN___builtin_assume_aligned HAVE_BUILTIN___BUILTIN_ASSUME_ALIGNED -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/