ruby-changes:60967
From: Nobuyoshi <ko1@a...>
Date: Fri, 1 May 2020 18:44:37 +0900 (JST)
Subject: [ruby-changes:60967] 76d9be9ce9 (master): Get rid of -Wgnu-zero-variadic-macro-arguments errors
https://git.ruby-lang.org/ruby.git/commit/?id=76d9be9ce9 From 76d9be9ce9c304f3fd59cee7624dbbcea1d2db39 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 1 May 2020 14:12:12 +0900 Subject: Get rid of -Wgnu-zero-variadic-macro-arguments errors As zero variadic macro argument, `rb_scan_args(argc, argv, "")` (or `"0"`), means 0-arity method and should be defined so, that case doesn't need to consider. diff --git a/include/ruby/3/scan_args.h b/include/ruby/3/scan_args.h index b1a29f7..409cef9 100644 --- a/include/ruby/3/scan_args.h +++ b/include/ruby/3/scan_args.h @@ -380,7 +380,7 @@ rb_scan_args_set(int kw_flag, int argc, const VALUE *argv, https://github.com/ruby/ruby/blob/trunk/include/ruby/3/scan_args.h#L380 argc, argvp, fmt, \ (sizeof((VALUE*[]){__VA_ARGS__})/sizeof(VALUE*)), \ ((VALUE*[]){__VA_ARGS__})), \ - (rb_scan_args)(argc, argvp, fmt, ## __VA_ARGS__)) + (rb_scan_args)(argc, argvp, fmt, __VA_ARGS__)) # define rb_scan_args_kw(kw_flag, argc, argvp, fmt, ...) \ __builtin_choose_expr( \ __builtin_constant_p(fmt), \ @@ -388,7 +388,7 @@ rb_scan_args_set(int kw_flag, int argc, const VALUE *argv, https://github.com/ruby/ruby/blob/trunk/include/ruby/3/scan_args.h#L388 kw_flag, argc, argvp, fmt, \ (sizeof((VALUE*[]){__VA_ARGS__})/sizeof(VALUE*)), \ ((VALUE*[]){__VA_ARGS__})), \ - (rb_scan_args_kw)(kw_flag, argc, argvp, fmt, ## __VA_ARGS__)) + (rb_scan_args_kw)(kw_flag, argc, argvp, fmt, __VA_ARGS__ /**/)) #endif #endif /* RUBY3_SCAN_ARGS_H */ -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/