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

Peng Cheng gm4cheng at gmail.com
Tue Feb 26 20:16:16 PST 2013


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130226/bae660ef/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MathExtras.patch
Type: application/octet-stream
Size: 1029 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130226/bae660ef/attachment.obj>


More information about the llvm-commits mailing list