1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/bigdecimal] Suppress warning at NO_SANITIZE on gcc

https://github.com/ruby/bigdecimal/commit/f6765b8071
This commit is contained in:
Kenta Murata 2021-01-14 09:23:03 +09:00
parent efcdf68e64
commit e129be7592

View file

@ -8,6 +8,16 @@
# define ATOMIC_PTR_CAS(var, old, new) RUBY_ATOMIC_PTR_CAS(var, old, new)
#endif
#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
#undef strtod
#define strtod BigDecimal_strtod
#undef dtoa