<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 24, 2015 at 12:36 PM, Aaron Ballman <span dir="ltr"><<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Tue, Mar 24, 2015 at 2:42 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br>
><br>
><br>
> On Tue, Mar 24, 2015 at 11:29 AM, Andy Kaylor <<a href="mailto:andrew.kaylor@intel.com">andrew.kaylor@intel.com</a>><br>
> wrote:<br>
>><br>
>> REPOSITORY<br>
>>   rL LLVM<br>
>><br>
>> ================<br>
>> Comment at: cmake/modules/HandleLLVMOptions.cmake:286<br>
>> @@ +285,3 @@<br>
>> +    -wd4706 # Suppress 'assignment within conditional expression'<br>
>> +    -wd4310 # Suppress 'cast truncates constant value'<br>
>> +    -wd4701 # Suppress 'potentially uninitialized local variable'<br>
>> ----------------<br>
>> dblaikie wrote:<br>
>> > You mentioned this one fired ~200 times - this might actually be worth<br>
>> > doing a small sample check to see what it's firing on. Perhaps these are<br>
>> > things we should fix - unless they appear in dependent expressions in<br>
>> > templates, in which case they're probably false positives.<br>
>> ><br>
>> > The rest of these disables I'm totally fine with - if you want, please<br>
>> > commit them separately/ahead of the rest of the review.<br>
>> These look pretty harmless.  All of the ones I looked at were something<br>
>> like these:<br>
>><br>
>> ```<br>
>> uint8_t(~0U)<br>
>> (char)0xFF<br>
>> (uint16_t)-1U<br>
><br>
><br>
> Yeah, those all look like they do exactly what the user intended... I wonder<br>
> if MSVC expects those to be written some other way? *shrug*<br>
<br>
</div></div>MSVC is very picky about the way you write unsigned values like that.<br>
~0U is about the only way to get it to not complain (aside from<br>
spelling out the full bit pattern). We do run into this fairly<br>
frequently in practice.<br></blockquote><div><br>Sounds like it warned on "uint8_t(~0U)" too, though?<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
~Aaron<br>
</font></span></blockquote></div><br></div></div>