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:
parent
efcdf68e64
commit
e129be7592
1 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue