[PATCH] get rid of windows C4146 warning in MathExtras.h
Duncan Sands
baldrick at free.fr
Wed Feb 27 05:08:57 PST 2013
Hi Peng,
> See detals at http://msdn.microsoft.com/en-us/library/4kh09110.aspx
I see, thanks. Can't you just suppress the warning instead? The current code
is correct, and your proposed fix makes the code too hard to read IMO.
Ciao, Duncan.
>
> 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>
>
More information about the llvm-commits
mailing list