Suppress Ruby.h gcc warnings

This commit is contained in:
William S Fulton 2022-07-31 14:32:04 +01:00
commit d9fd09aa21

View file

@ -1,5 +1,20 @@
#if __GNUC__ >= 7
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wregister"
#if __GNUC__ >= 10
#pragma GCC diagnostic ignored "-Wvolatile"
#if __GNUC__ >= 11
#pragma GCC diagnostic ignored "-Wdeprecated-enum-enum-conversion"
#endif
#endif
#endif
#include <ruby.h>
#if __GNUC__ >= 7
#pragma GCC diagnostic pop
#endif
/* Ruby 1.9.1 has a "memoisation optimisation" when compiling with GCC which
* breaks using rb_intern as an lvalue, as SWIG does. We work around this
* issue for now by disabling this.