From d9fd09aa21f4578bd0232c9b5e477bfba4d3029b Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Sun, 31 Jul 2022 14:32:04 +0100 Subject: [PATCH] Suppress Ruby.h gcc warnings --- Lib/ruby/rubyhead.swg | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Lib/ruby/rubyhead.swg b/Lib/ruby/rubyhead.swg index bf4e36248..06c430bf6 100644 --- a/Lib/ruby/rubyhead.swg +++ b/Lib/ruby/rubyhead.swg @@ -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 +#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.