ruby-changes:65056
From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Wed, 27 Jan 2021 09:30:36 +0900 (JST)
Subject: [ruby-changes:65056] 3f4f10bb60 (master): attributes on enumerators are GCC6-ism
https://git.ruby-lang.org/ruby.git/commit/?id=3f4f10bb60 From 3f4f10bb603a1c8979919c6b0ca1d8b2e7adba67 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, 20 Jan 2021 11:33:32 +0900 Subject: attributes on enumerators are GCC6-ism See also https://gcc.gnu.org/gcc-6/changes.html Clang has this feature when __has_extension(enumerator_attributes) is set. MSVC has #pragma deprecated instead. --- include/ruby/internal/fl_type.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/include/ruby/internal/fl_type.h b/include/ruby/internal/fl_type.h index 6641dfe..29cc6ba 100644 --- a/include/ruby/internal/fl_type.h +++ b/include/ruby/internal/fl_type.h @@ -28,8 +28,10 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/fl_type.h#L28 #include "ruby/internal/attr/noalias.h" #include "ruby/internal/attr/pure.h" #include "ruby/internal/cast.h" +#include "ruby/internal/compiler_since.h" #include "ruby/internal/core/rbasic.h" #include "ruby/internal/dllexport.h" +#include "ruby/internal/has/extension.h" #include "ruby/internal/special_consts.h" #include "ruby/internal/stdbool.h" #include "ruby/internal/value.h" @@ -167,11 +169,27 @@ ruby_fl_type { https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/fl_type.h#L169 RUBY_FL_PROMOTED = RUBY_FL_PROMOTED0 | RUBY_FL_PROMOTED1, RUBY_FL_FINALIZE = (1<<7), RUBY_FL_TAINT + +#if RBIMPL_HAS_EXTENSION(enumerator_attributes) + RBIMPL_ATTR_DEPRECATED(("taintedness turned out to be a wrong idea.")) +#elif RBIMPL_COMPILER_SINCE(GCC, 6, 0, 0) RBIMPL_ATTR_DEPRECATED(("taintedness turned out to be a wrong idea.")) +#elif defined(_MSC_VER) +# pragma deprecated(RUBY_FL_TAINT) +#endif + = (1<<8), RUBY_FL_SHAREABLE = (1<<8), RUBY_FL_UNTRUSTED + +#if RBIMPL_HAS_EXTENSION(enumerator_attributes) + RBIMPL_ATTR_DEPRECATED(("trustedness turned out to be a wrong idea.")) +#elif RBIMPL_COMPILER_SINCE(GCC, 6, 0, 0) RBIMPL_ATTR_DEPRECATED(("trustedness turned out to be a wrong idea.")) +#elif defined(_MSC_VER) +# pragma deprecated(RUBY_FL_UNTRUSTED) +#endif + = (1<<8), RUBY_FL_SEEN_OBJ_ID = (1<<9), RUBY_FL_EXIVAR = (1<<10), -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/