ruby-changes:49434
From: shyouhei <ko1@a...>
Date: Tue, 2 Jan 2018 16:19:31 +0900 (JST)
Subject: [ruby-changes:49434] shyouhei:r61544 (trunk): int (*)(void) is incompatible with void*
shyouhei 2018-01-02 15:41:42 +0900 (Tue, 02 Jan 2018) New Revision: 61544 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61544 Log: int (*)(void) is incompatible with void* Modified files: trunk/lib/mkmf.rb Index: lib/mkmf.rb =================================================================== --- lib/mkmf.rb (revision 61543) +++ lib/mkmf.rb (revision 61544) @@ -2584,7 +2584,8 @@ MESSAGE https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L2584 src = src.sub(/\{/) do $& + "\n if (argc > 1000000) {\n" + - refs.map {|n|" printf(\"%p\", &#{n});\n"}.join("") + + refs.map {|n|" int (* volatile #{n}p)(void)=(int (*)(void))&#{n};\n"}.join("") + + refs.map {|n|" printf(\"%d\", (*#{n}p)());\n"}.join("") + " }\n" end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/