<div dir="ltr"><div>I'd probably prefer to fix all the warnings of that bool type (there's only about a dozen or so) rather than put all the push pop pragma's all over the place. Because clang will than warn about unknown pragma's. So they'll have to be #If _LIBCPP_MSVC etc.</div>
<div> </div><div>It's just cleaner to change the code. Is that ok with you howard?</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Oct 10, 2013 at 5:14 AM, Reid Kleckner <span dir="ltr"><<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Clang and gcc have a concept of "system" headers, for which they suppress all warnings.  It's assumed that the user doesn't care about unactionable warnings in code they don't own.<br>

</div><div><br></div><div>I believe MSVC doesn't make this distinction, so I worry that some user might try to build with /W3, and warnings from libc++ headers.</div><div><br></div><div>Both of your previous fixes were in headers, in which case we may actually want to commit them or use #pragma warning(push) #pragma warning(disable : 4800) ... #pragma warning pop().  Your original fix is probably less ugly than the pragma.</div>

<div><br></div><div>Sorry for running you around!  :(  If the warning had been in source code, this fix would work.  This is still probably worth committing, since we don't care about these warnings at all in .cpp files.</div>

</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Oct 9, 2013 at 7:30 AM, G M <span dir="ltr"><<a href="mailto:gmisocpp@gmail.com" target="_blank">gmisocpp@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
<div dir="ltr"><div>Hi Everyone</div><div> </div><div>Here's a patch to disable implicit int to bool warnings for msvc libcxx by changing the project file default to silence this warning.</div><div> </div><div>There are about a dozen or so instances of this warning in libcxx and I am happy to make those changes manually if consensus forms to prefer that but so far that isn't the case.</div>


<div> </div><div>It's simply changing things like bool b = x & m; to b = (x&m) != 0;</div><div> </div><div>In absence of consensus to me making these types of changes I've gone with this change to the project file to disable the warnings instead. This change only effects MSVC, other compilers already default to this it seems.</div>


</div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>