summaryrefslogtreecommitdiff
path: root/include/ruby/3/attr/pure.h
diff options
context:
space:
mode:
-rw-r--r--include/ruby/3/attr/pure.h19
1 files changed, 7 insertions, 12 deletions
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -21,26 +23,19 @@
#include "ruby/assert.h"
/** Wraps (or simulates) `__attribute__((pure))` */
-#if defined(RUBY3_ATTR_PURE)
-# /* Take that. */
-
-#elif RUBY3_HAS_ATTRIBUTE(pure)
# define RUBY3_ATTR_PURE() __attribute__((__pure__))
-
#elif RUBY3_COMPILER_SINCE(SunPro, 5, 10, 0)
# define RUBY3_ATTR_PURE() _Pragma("does_not_write_global_data")
-
#else
# define RUBY3_ATTR_PURE() /* void */
#endif
/** Enables #RUBY3_ATTR_PURE iff. #RUBY_NDEBUG. */
-#if defined(RUBY3_ATTR_PURE_ON_NDEBUG)
-# /* Take that. */
-
-#elif RUBY_NDEBUG
# define RUBY3_ATTR_PURE_ON_NDEBUG() RUBY3_ATTR_PURE()
-
#else
# define RUBY3_ATTR_PURE_ON_NDEBUG() /* void */
#endif