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

Duncan Sands baldrick at free.fr
Wed Feb 27 06:57:07 PST 2013


Hi Peng,

On 27/02/13 15:28, Peng Cheng wrote:
> Suppressing warning was the my first attempt to fix this warning, and just as
> Aaron said, the warning suppressing was added into multiple places, looking ugly.
>
> The attached patch is the second attempt,  People, who wrote "-Val" with "Val"
> as unsigned , normally understand this change with the original code as comments
> as Aaron suggests.

can't you just replace -Val with 1+~Val ?

Ciao, Duncan.



More information about the llvm-commits mailing list