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

Duncan Sands baldrick at free.fr
Wed Feb 27 01:13:38 PST 2013


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.




More information about the llvm-commits mailing list