diff options
author | jinroq <[email protected]> | 2023-06-29 11:44:54 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2023-07-01 23:16:54 +0900 |
commit | a70320b8cd2c8590fb01607cca354a9bc57dde0a (patch) | |
tree | 4e5e83881d71153f38f1b3a0ba3c60bae161c889 /parser_st.c | |
parent | 174dbe33cc183e48897e8819ad694b0b44642a9f (diff) |
Define `NO_SANITIZE` with reference to ext/bigdecimal/missing.c
Diffstat (limited to 'parser_st.c')
-rw-r--r-- | parser_st.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/parser_st.c b/parser_st.c index 5d3148bc0d..c7a45d25e6 100644 --- a/parser_st.c +++ b/parser_st.c @@ -146,6 +146,16 @@ nonempty_memcpy(void *dest, const void *src, size_t n) #undef st_locale_insensitive_strncasecmp #define st_locale_insensitive_strncasecmp rb_parser_st_locale_insensitive_strncasecmp +#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +/* GCC warns about unknown sanitizer, which is annoying. */ +# undef NO_SANITIZE +# define NO_SANITIZE(x, y) \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wattributes\"") \ + __attribute__((__no_sanitize__(x))) y; \ + _Pragma("GCC diagnostic pop") +#endif + #ifndef NO_SANITIZE # define NO_SANITIZE(x, y) y #endif |