aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tool/mk_builtin_loader.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/tool/mk_builtin_loader.rb b/tool/mk_builtin_loader.rb
index 91a66b16b4..dafab79fd0 100644
--- a/tool/mk_builtin_loader.rb
+++ b/tool/mk_builtin_loader.rb
@@ -56,9 +56,15 @@ def mk_builtin_header file
f.puts
f.puts " // arity_check"
+ f.puts "COMPILER_WARNING_PUSH"
+ f.puts "#if GCC_VERSION_SINCE(5, 1, 0) || __clang__"
+ f.puts "COMPILER_WARNING_ERROR(-Wincompatible-pointer-types)"
+ f.puts "#endif"
bs.each{|func, argc|
f.puts " if (0) rb_builtin_function_check_arity#{argc}(#{func});"
}
+ f.puts "COMPILER_WARNING_POP"
+
path = File.expand_path(file)
f.puts