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

Peng Cheng gm4cheng at gmail.com
Wed Feb 27 09:21:09 PST 2013


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


More information about the llvm-commits mailing list