https://bugs.ruby-lang.org/
https://bugs.ruby-lang.org/favicon.ico?1711330511
2013-02-25T02:08:34Z
Ruby Issue Tracking System
Backport193 - Backport #7946: 1.9.3-p385以降でclangでのビルド時にエラー(error: implicit conversion loses integer precision)
https://bugs.ruby-lang.org/issues/7946?journal_id=36948
2013-02-25T02:08:34Z
sorah (Sorah Fukumori)
her@sorah.jp
<ul><li><strong>Assignee</strong> set to <i>mrkn (Kenta Murata)</i></li></ul>
Backport193 - Backport #7946: 1.9.3-p385以降でclangでのビルド時にエラー(error: implicit conversion loses integer precision)
https://bugs.ruby-lang.org/issues/7946?journal_id=36951
2013-02-25T02:56:32Z
naruse (Yui NARUSE)
naruse@airemix.jp
<ul></ul><p>I noticed that clang version 4.1 doesn't fail.</p>
<p>% clang --version<br>
Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)<br>
Target: x86_64-apple-darwin12.2.1<br>
Thread model: posix</p>
<p>But clang version 4.2 fails.</p>
<p>% clang --version<br>
Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM 3.2svn)<br>
Target: x86_64-apple-darwin12.2.1<br>
Thread model: posix</p>
<p>Anyway Ruby should avoid this.</p>
Backport193 - Backport #7946: 1.9.3-p385以降でclangでのビルド時にエラー(error: implicit conversion loses integer precision)
https://bugs.ruby-lang.org/issues/7946?journal_id=36955
2013-02-25T03:43:52Z
naruse (Yui NARUSE)
naruse@airemix.jp
<ul><li><strong>Tracker</strong> changed from <i>Bug</i> to <i>Backport</i></li><li><strong>Project</strong> changed from <i>Ruby master</i> to <i>Backport193</i></li><li><strong>Status</strong> changed from <i>Open</i> to <i>Assigned</i></li><li><strong>Assignee</strong> changed from <i>mrkn (Kenta Murata)</i> to <i>usa (Usaku NAKAMURA)</i></li><li><strong>Priority</strong> changed from <i>Normal</i> to <i>5</i></li></ul><p>1.9.3 のみに影響します。以下のパッチで回避できます。</p>
<a name="Index-stc"></a>
<h1 >Index: st.c<a href="#Index-stc" class="wiki-anchor">¶</a></h1>
<p>--- st.c (revision 39476)<br>
+++ st.c (working copy)<br>
@@ -515,7 +515,7 @@<br>
st_index_t hash_val, bin_pos;</p>
<pre><code> if (table->entries_packed) {
</code></pre>
<ul>
<li>
<pre><code> int i;
</code></pre>
</li>
</ul>
<ul>
<li>
<pre><code> st_index_t i;
if (MORE_PACKABLE_P(table)) {
i = table->num_entries++;
table->bins[i*2] = (struct st_table_entry*)key;
</code></pre>
</li>
</ul>
<a name="Index-threadc"></a>
<h1 >Index: thread.c<a href="#Index-threadc" class="wiki-anchor">¶</a></h1>
<p>--- thread.c (revision 39476)<br>
+++ thread.c (working copy)<br>
@@ -2161,7 +2161,7 @@<br>
static int<br>
vm_living_thread_num(rb_vm_t *vm)<br>
{</p>
<ul>
<li>return vm->living_threads->num_entries;</li>
</ul>
<ul>
<li>return (int)vm->living_threads->num_entries;<br>
}</li>
</ul>
<p>int</p>
Backport193 - Backport #7946: 1.9.3-p385以降でclangでのビルド時にエラー(error: implicit conversion loses integer precision)
https://bugs.ruby-lang.org/issues/7946?journal_id=37023
2013-02-26T09:57:35Z
usa (Usaku NAKAMURA)
usa@garbagecollect.jp
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>This issue was solved with changeset r39503.<br>
Isao, thank you for reporting this issue.<br>
Your contribution to Ruby is greatly appreciated.<br>
May Ruby be with you.</p>
<hr>
<ul>
<li>
<p>st.c (st_add_direct): int is not always same with st_index_t. some<br>
version of clang reports error.</p>
</li>
<li>
<p>thread.c (vm_living_thread_num): ditto.<br>
reported by d6rkaiz (Isao Sugimoto) at <a href="/issues/7946">[ruby-dev:47096]</a><br>
[Backport <a class="issue tracker-4 status-5 priority-4 priority-default closed" title="Backport: 1.9.3-p385以降でclangでのビルド時にエラー(error: implicit conversion loses integer precision) (Closed)" href="https://bugs.ruby-lang.org/issues/7946">#7946</a>]</p>
</li>
</ul>