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

Aaron Ballman aaron at aaronballman.com
Wed Feb 27 10:26:35 PST 2013


Patch committed with some minor formatting changes in r176193.  Thank
you for the contribution!

~Aaron

On Wed, Feb 27, 2013 at 12:21 PM, Peng Cheng <gm4cheng at gmail.com> wrote:
> Hi Duncan,
>
> Yes.  I like "1+~Val" better.  It is lighter and cleaner.
>
> The updated patch is attached with both your and Aaron's comments.
>
> Thanks,
> -Peng
>
> On Wed, Feb 27, 2013 at 9:57 AM, Duncan Sands <baldrick at free.fr> wrote:
>>
>> 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