[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 09:13:24 PDT 2015
On Tue, Mar 24, 2015 at 5:47 AM, Aaron Ballman <aaron at aaronballman.com>
wrote:
> Author: aaronballman
> Date: Tue Mar 24 07:47:51 2015
> New Revision: 233067
>
> URL: http://llvm.org/viewvc/llvm-project?rev=233067&view=rev
> Log:
> Silencing some MSVC warnings "C4805: '^' : unsafe mix of type 'bool' and
> type 'unsigned int' in operation"; NFC.
>
FWIW, Andy Kaylor's started a review/discussion on disabling some MSVC
warnings and cleaning up others to get a baseline.
This is one I'm sort of inclined to disable (as mentioned in the review
thread & some other recent discussions - the basic bar that's certainly
been applied to GCC and I think is a reasonable one is: If the warning
doesn't meet the quality bar to be added to Clang, then it probably doesn't
meet the quality bar to be enabled for building LLVM projects and we should
just disable the warning rather than fixing it even once)
>
> Modified:
> llvm/trunk/lib/Support/APFloat.cpp
>
> Modified: llvm/trunk/lib/Support/APFloat.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/APFloat.cpp?rev=233067&r1=233066&r2=233067&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Support/APFloat.cpp (original)
> +++ llvm/trunk/lib/Support/APFloat.cpp Tue Mar 24 07:47:51 2015
> @@ -1430,7 +1430,7 @@ APFloat::addOrSubtractSignificand(const
>
> /* Determine if the operation on the absolute values is effectively
> an addition or subtraction. */
> - subtract ^= sign ^ rhs.sign;
> + subtract ^= static_cast<bool>(sign ^ rhs.sign);
>
> /* Are we bigger exponent-wise than the RHS? */
> bits = exponent - rhs.exponent;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150324/980d3eb5/attachment.html>
More information about the llvm-commits
mailing list