Add RBIMPL_ATTR_NONSTRING_ARRAY()
macro for GCC 15
This commit is contained in:
parent
ce51ef30df
commit
bbf1130f91
Notes:
git
2025-05-05 09:25:18 +00:00
@ -437,7 +437,7 @@ rb_cp50221_encoder = {
|
||||
|
||||
/* JIS0201 to JIS0208 conversion table */
|
||||
enum {tbl0208_num = 0xDF - 0xA1 + 1};
|
||||
RBIMPL_ATTR_NONSTRING() static const char tbl0208[tbl0208_num][2] = {
|
||||
RBIMPL_ATTR_NONSTRING_ARRAY() static const char tbl0208[tbl0208_num][2] = {
|
||||
"\x21\x23", "\x21\x56", "\x21\x57", "\x21\x22",
|
||||
"\x21\x26", "\x25\x72", "\x25\x21", "\x25\x23",
|
||||
"\x25\x25", "\x25\x27", "\x25\x29", "\x25\x63",
|
||||
|
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user