From: Yukihiro Matsumoto Date: 2004-11-03T00:55:19+09:00 Subject: Re: x86_64 -- warning and errors Hi, In message "Re: x86_64 -- warning and errors" on Tue, 2 Nov 2004 22:12:57 +0900, ts writes: |gcc -g -O2 -I. -I. -c regexec.c |regexec.c: In function `match_at': |regexec.c:1147: warning: cast to pointer from integer of different size | 1) Failure: |test_sum(TestString) | [./ruby/test_string.rb:8:in `check_sum' | ./ruby/test_string.rb:16:in `test_sum' | ./ruby/test_string.rb:15:in `upto' | ./ruby/test_string.rb:15:in `test_sum']: |<363> expected but was |<0>. Does this patch improve the situation? matz. --- string.c 31 Oct 2004 17:37:52 -0000 1.213 +++ string.c 2 Nov 2004 15:52:40 -0000 @@ -4455,3 +4455,3 @@ rb_str_sum(argc, argv, str) else { - unsigned int sum = 0; + unsigned long sum = 0; Index: regexec.c =================================================================== RCS file: /var/cvs/src/ruby/regexec.c,v retrieving revision 1.3 diff -p -u -1 -r1.3 regexec.c --- regexec.c 1 Nov 2004 23:49:15 -0000 1.3 +++ regexec.c 2 Nov 2004 15:52:40 -0000 @@ -256,3 +256,3 @@ onig_region_copy(OnigRegion* to, OnigReg #define INVALID_STACK_INDEX -1 -typedef int StackIndex; +typedef long StackIndex;