summaryrefslogtreecommitdiff
path: root/include/ruby
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2025-05-05 16:16:26 +0900
committerNobuyoshi Nakada <[email protected]>2025-05-05 18:25:04 +0900
commitbbf1130f918ca26e33aba4711ccf99a8083517ea (patch)
tree8ce617405eb6d5e7a1f72afefc5e177a08156bfb /include/ruby
parentce51ef30df5bf07ec3881a377f0011b8f20ec507 (diff)
Add `RBIMPL_ATTR_NONSTRING_ARRAY()` macro for GCC 15
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13256
Diffstat (limited to 'include/ruby')
-rw-r--r--include/ruby/internal/attr/nonstring.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/ruby/internal/attr/nonstring.h b/include/ruby/internal/attr/nonstring.h
index de26e926d4..9a66180e19 100644
--- a/include/ruby/internal/attr/nonstring.h
+++ b/include/ruby/internal/attr/nonstring.h
@@ -25,8 +25,14 @@
/** 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()
+# 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 */