joerg added a comment.

I find this warning confusing. I find a4 to be perfectly expected. IMO this 
warning should be applied only, if the effective value of the expression is not 
the same as in the modulo-n arithmetic. This means that if (-x) is explicitly 
or implicitly cast to a less wide unsigned type, it should not warn. It would 
consider a warning for the case of using (-x) if integer promotion rules makes 
it negative though. The question is, how to best patch around the warning 
though. What options does MSVC have for that? I.e. what equivalent expressions 
do not trigger this warning?


https://reviews.llvm.org/D52137



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to