From: Luis Lavena Date: 2010-09-24T00:41:52+09:00 Subject: [ruby-core:32518] [Ruby 1.9-Bug#3761] List of possible casting issues under LLP64 Issue #3761 has been updated by Luis Lavena. Thank you wanabe and Nakada-san. I'm having other warnings related to gc:

x86_64-w64-mingw32-gcc -O3 -g -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -I. -I.ext/include/x86_64-mingw32 -I../include -I.. -include ruby/config.h -include ruby/missing.h -DRUBY_EXPORT   -o gc.o -c ../gc.c
../gc.c: In function ���obj_free���:
../gc.c:2193:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
../gc.c: In function ���rb_objspace_call_finalizer���:
../gc.c:2908:7: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
Looking at both lines of the warnings seems that pointer is been casted to (long) Changing that to size_t (the supposed to be pointer size) solve the issue in both part of the equality check: From: if ((long)RANY(obj)->as.data.dfree == -1) { To: if ((size_t)RANY(obj)->as.data.dfree == (size_t)-1) { But I'm unsure of the implications. The warning is solve but I'm ignorant on the correctness. What do you think? Thank you for working on this. ---------------------------------------- http://redmine.ruby-lang.org/issues/show/3761 ---------------------------------------- http://redmine.ruby-lang.org