<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 24, 2015 at 10:44 AM, Kaylor, Andrew <span dir="ltr"><<a href="mailto:andrew.kaylor@intel.com" target="_blank">andrew.kaylor@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<div>
<div><span class="">
<div>
<div>
<p class="MsoNormal">On Tue, Mar 24, 2015 at 9:23 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br>
> Looking at the docs (sparse as they are) on MSDN <a href="https://msdn.microsoft.com/en-us/library/1hy2y0bk%28v=vs.90%29.aspx" target="_blank">https://msdn.microsoft.com/en-us/library/1hy2y0bk%28v=vs.90%29.aspx</a> perhaps this warning was intended for the comparison case
& spilled over into assignment?<br>
<span style="color:#1f497d">> </span><br>
><span style="color:#1f497d"> </span>In the comparison case it's still not going to explode on MSVC in new/interesting ways, by the sounds of it. It's just seems to be talking about "int == bool" comparison promoting the bool to an int, then comparing the ints,
rather than the other way around, which perhaps the user intended.<br>
> <br>
> None of the first page of Google results for C4805 seem to indicate anything more sinister going on here.<br>
<u></u><u></u></p>
</div>
</div>
</span><p class="MsoNormal"><span style="color:#1f497d">So what about the “int == bool” case? It may not explode, but it at least has the potential to do something different than was intended. If we disable the warning globally, that case will be hidden as well.
MSVC considers this a level 1 warning, which is the main reason I’m reluctant to disable it.</span></p></div></div></div></div></blockquote><div><br>His this come up much/at all?<br></div></div></div></div>