<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:koraq@xs4all.nl" title="Mark de Wever <koraq@xs4all.nl>"> <span class="fn">Mark de Wever</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - No warning on casting between pointer and non-pointer-sized int"
href="https://bugs.llvm.org/show_bug.cgi?id=8718">bug 8718</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>koraq@xs4all.nl
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>FIXED
</td>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - No warning on casting between pointer and non-pointer-sized int"
href="https://bugs.llvm.org/show_bug.cgi?id=8718#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - No warning on casting between pointer and non-pointer-sized int"
href="https://bugs.llvm.org/show_bug.cgi?id=8718">bug 8718</a>
from <span class="vcard"><a class="email" href="mailto:koraq@xs4all.nl" title="Mark de Wever <koraq@xs4all.nl>"> <span class="fn">Mark de Wever</span></a>
</span></b>
<pre>I just tested with a recent master and the original test gives:
/tmp/int-ptr-cast-size-mismatch.c:23:10: warning: cast to 'void *' from smaller
integer type 'short' [-Wint-to-void-pointer-cast]
return (void *)s;
Arnd's code gives
bug.cc:1275:12: error: cast from pointer to smaller type 'int' loses
information
switch ((int)&a) {}
^~~~~~~
bug.cc:1276:13: error: cast from pointer to smaller type 'int' loses
information
return (int)&a;
^~~~~~~</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>