Actions
Bug #5464
closedcompile error in vm_eval.c
Description
Solaris 10 にて Fujitsu C Compiler Version 5.6 を使ってtrunkをコンパイルしたところ、以下のコンパイルエラーが出ました。
"./vm_eval.c", line 275: error: initialization: constant expression is expected for variable: `args'
このコンパイラでは、Cの配列の初期値としてコンパイル時に確定するものしか使えないようです。
1要素ずつ代入するようにするパッチを添付します。他の環境でも問題ないと思います。
--- vm_eval.c (revision 33484)
+++ vm_eval.c (working copy)
@@ -272,7 +272,10 @@
me = rb_method_entry(klass, idRespond_to);
if (me && !(me->flag & NOEX_BASIC)) {
- VALUE args[2] = {ID2SYM(mid), Qtrue};
-
VALUE args[2];
-
args[0] = ID2SYM(mid);
-
if (!RTEST(vm_call0(th, recv, idRespond_to, 2, args, me))) {args[1] = Qtrue;
return Qundef;
}
Files
Updated by nobu (Nobuyoshi Nakada) about 13 years ago
- Category set to core
- Status changed from Open to Assigned
- Assignee set to ngoto (Naohisa Goto)
- Target version set to 3.0
Updated by ngoto (Naohisa Goto) about 13 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r33494.
Naohisa, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- ChangeLog: forgot [Bug #5464] [ruby-dev:44632] for the previous commit
Actions
Like0
Like0Like0