diff options
-rw-r--r-- | include/ruby/3/attr/maybe_unused.h | 14 |
1 files changed, 6 insertions, 8 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. @@ -22,18 +24,14 @@ #include "ruby/3/has/cpp_attribute.h" /** Wraps (or simulates) `[[maybe_unused]]` */ -#if defined(RUBY3_ATTR_MAYBE_UNUSED) -# /* Take that. */ - -#elif RUBY3_HAS_CPP_ATTRIBUTE(maybe_unused) # define RUBY3_ATTR_MAYBE_UNUSED() [[maybe_unused]] - #elif RUBY3_HAS_C_ATTRIBUTE(maybe_unused) # define RUBY3_ATTR_MAYBE_UNUSED() [[maybe_unused]] - #elif RUBY3_HAS_ATTRIBUTE(unused) # define RUBY3_ATTR_MAYBE_UNUSED() __attribute__((__unused__)) - #else # define RUBY3_ATTR_MAYBE_UNUSED() /* void */ #endif |