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.
This commit is contained in:
parent
c7d1387721
commit
3f4f10bb60
Notes:
git
2021-01-27 09:30:41 +09:00
@ -28,8 +28,10 @@
|
||||
#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 {
|
||||
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),
|
||||
|
Loading…
x
Reference in New Issue
Block a user