[PATCH] get rid of windows C4146 warning in MathExtras.h

Peng Cheng gm4cheng at gmail.com
Wed Feb 27 05:02:28 PST 2013


Hi Duncan,

See detals at http://msdn.microsoft.com/en-us/library/4kh09110.aspx

Thanks,
-Peng

On Wednesday, February 27, 2013, Duncan Sands wrote:

> Hi Peng,
>
> On 27/02/13 05:16, Peng Cheng wrote:
>
>> For 32bit, -Val is changed to ((uint32_t)(0x100000000-Value)**).
>>
>> For 64bit, -Val is changed to ((uint64_t)( UINT64_MAX - Value + 1 )).
>>
>> Both new fixes are essentially the same as the underlying operations for
>> -Val.
>>   So, there is no semantics change, and no extra computational cost.
>>
>> See fix in the patch attached.
>>
>
> what is it that the windows compiler is complaining about exactly?
>
> Ciao, Duncan.
>
> ______________________________**_________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/**mailman/listinfo/llvm-commits<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/20130227/7565cb14/attachment.html>


More information about the llvm-commits mailing list