diff options
Diffstat (limited to 'include/ruby/internal/attr/nonstring.h')
| -rw-r--r-- | include/ruby/internal/attr/nonstring.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/ruby/internal/attr/nonstring.h b/include/ruby/internal/attr/nonstring.h index de26e926d4..da2501f7bf 100644 --- a/include/ruby/internal/attr/nonstring.h +++ b/include/ruby/internal/attr/nonstring.h @@ -25,8 +25,16 @@ /** Wraps (or simulates) `__attribute__((nonstring))` */ #if RBIMPL_HAS_ATTRIBUTE(nonstring) # define RBIMPL_ATTR_NONSTRING() __attribute__((nonstring)) +# if RBIMPL_COMPILER_SINCE(GCC, 15, 0, 0) +# define RBIMPL_ATTR_NONSTRING_ARRAY() RBIMPL_ATTR_NONSTRING() +# elif defined(__clang_major__) && __clang_major__ >= 21 +# define RBIMPL_ATTR_NONSTRING_ARRAY() RBIMPL_ATTR_NONSTRING() +# else +# define RBIMPL_ATTR_NONSTRING_ARRAY() /* void */ +# endif #else # define RBIMPL_ATTR_NONSTRING() /* void */ +# define RBIMPL_ATTR_NONSTRING_ARRAY() /* void */ #endif #endif /* RBIMPL_ATTR_NONSTRING_H */ |
