<div dir="ltr">For the record, MSVC does a truncation (it doesn't do any funny reinterpret-really-means-static cast stuff).  256 byte aligned pointers do become false.  =P  Clang should probably just error out even if MSVC accepts.</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 5, 2013 at 9:31 AM, Hans Wennborg <span dir="ltr"><<a href="mailto:hans@chromium.org" target="_blank">hans@chromium.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all,<br>
<br>
This patch makes Clang disallow reinterpret_cast from pointer to bool<br>
on Windows.<br>
<br>
Currently, it's allowed by accident and later triggers an exception.<br>
Support was added in r131201 to allow conversion from pointers to<br>
integral types on windows since this is apparently used in system<br>
headers. However, converting pointers to bool is already supported in<br>
a civilized manner via static_cast and c-style cast. Allowing it<br>
through reinterpret_cast seems like a bad idea.<br>
<br>
Please take a look.<br>
<br>
Thanks,<br>
Hans<br>
<br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div>