[llvm] r233067 - Silencing some MSVC warnings "C4805: '^' : unsafe mix of type 'bool' and type 'unsigned int' in operation"; NFC.
David Blaikie
dblaikie at gmail.com
Tue Mar 24 10:46:28 PDT 2015
On Tue, Mar 24, 2015 at 10:44 AM, Kaylor, Andrew <andrew.kaylor at intel.com>
wrote:
> On Tue, Mar 24, 2015 at 9:23 AM, David Blaikie <dblaikie at gmail.com>
> wrote:
> > Looking at the docs (sparse as they are) on MSDN
> https://msdn.microsoft.com/en-us/library/1hy2y0bk%28v=vs.90%29.aspx
> perhaps this warning was intended for the comparison case & spilled over
> into assignment?
> >
> > 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.
> >
> > None of the first page of Google results for C4805 seem to indicate
> anything more sinister going on here.
>
>
> 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.
>
His this come up much/at all?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150324/a6360556/attachment.html>
More information about the llvm-commits
mailing list