From: "ko1 (Koichi Sasada)" Date: 2013-12-24T11:48:06+09:00 Subject: [ruby-dev:47860] [ruby-trunk - Bug #9287] 'rb_obj_write' discards qualifiers from pointer target type Issue #9287 has been updated by ko1 (Koichi Sasada). 下記のようなプログラムで警告が出るか確認してもらうことは出来るでしょうか。 --- #include int main() { const int foo = 0; int *ptr = (int *)&foo; *ptr = 1; printf("foo: %d\n", foo); return 0; } ---------------------------------------- Bug #9287: 'rb_obj_write' discards qualifiers from pointer target type https://bugs.ruby-lang.org/issues/9287#change-43860 Author: naruse (Yui NARUSE) Status: Assigned Priority: Normal Assignee: ko1 (Koichi Sasada) Category: core Target version: ruby -v: ruby 2.1.0dev (2013-12-23 trunk 44360) [i386-freebsd9.2] Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN array.c: In function 'rb_ary_new_from_args': array.c:506: warning: passing argument 2 of 'rb_obj_write' discards qualifiers from pointer target type などといった警告が出ます。 http://fb32.rubyci.org/~chkbuild/ruby-trunk/log/20131223T070301Z.log.html.gz -- http://bugs.ruby-lang.org/