1 #ifndef RBIMPL_ATTR_CONST_H
2 #define RBIMPL_ATTR_CONST_H
28 #if RBIMPL_HAS_ATTRIBUTE(const)
29 # define RBIMPL_ATTR_CONST() __attribute__((__const__))
30 #elif RBIMPL_HAS_DECLSPEC_ATTRIBUTE(noalias)
32 # define RBIMPL_ATTR_CONST() __declspec(noalias)
33 #elif RBIMPL_COMPILER_SINCE(SunPro, 5, 10, 0)
34 # define RBIMPL_ATTR_CONST() _Pragma("no_side_effect")
36 # define RBIMPL_ATTR_CONST()
40 #if !defined(RUBY_DEBUG) || !RUBY_DEBUG
41 # define RBIMPL_ATTR_CONST_UNLESS_DEBUG() RBIMPL_ATTR_CONST()
43 # define RBIMPL_ATTR_CONST_UNLESS_DEBUG()
Defines RBIMPL_HAS_ATTRIBUTE.
Defines RBIMPL_COMPILER_SINCE.
Defines RBIMPL_HAS_DECLSPEC_ATTRIBUTE.