From: Tanaka Akira Date: 2005-05-21T19:45:57+09:00 Subject: [ruby-dev:26195] test_event(TestSetTraceFunc) failed on ruby-1.8 built with gcc-4.0 ruby 1.8 を gcc 4.0 で作ると 1) Failure: test_event(TestSetTraceFunc) [./test/ruby/test_settracefunc.rb:133]: <["return", 7, :bar, TestSetTraceFunc]> expected but was <["return", 6, :bar, TestSetTraceFunc]>. というようにテストが失敗します。 調べてみると、とりあえず次のように volatile を入れると直ります。 Index: eval.c =================================================================== RCS file: /src/ruby/eval.c,v retrieving revision 1.616.2.97 diff -u -r1.616.2.97 eval.c --- eval.c 18 May 2005 14:39:22 -0000 1.616.2.97 +++ eval.c 21 May 2005 10:40:41 -0000 @@ -5540,7 +5540,7 @@ ID oid; int argc; /* OK */ VALUE *argv; /* OK */ - NODE *body; /* OK */ + volatile NODE *body; /* OK */ int nosuper; { NODE *b2; /* OK */ あと、/* OK */ というコメントはどうすべきかよくわかりません。 % ./miniruby -v ruby 1.8.3 (2005-05-19) [i686-linux] % gcc --version gcc (GCC) 4.0.1 20050521 (prerelease) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -- [田中 哲][たなか あきら][Tanaka Akira]