<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Oct 14, 2014 at 11:38 AM, jahanian <span dir="ltr"><<a href="mailto:fjahanian@apple.com" target="_blank">fjahanian@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Currently we do not warn Integer overflow in presence of casts; as in:<div><div style="margin:0px;font-size:11px;font-family:Menlo">unsigned long long l = 65536 * 65536;</div></div><div style="margin:0px;font-size:11px;font-family:Menlo"><br></div><div style="margin:0px;font-size:11px;font-family:Menlo">This small patch fixes it:</div></div></blockquote><div><br></div><div>lgtm, thanks!</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div style="margin:0px;font-size:11px;font-family:Menlo">Also, is there a reason we do not warn on overflow for unsigned; as in:</div><div style="margin:0px;font-size:11px;font-family:Menlo"><div style="margin:0px">unsigned long long l2 = 65536 * (unsigned)65536;</div><div style="margin:0px">Even though resulting constant is the unexpected 0.</div></div></div></blockquote><div><br></div><div>The result is defined to be zero. We could warn, but false positives are likely.</div></div></div></div>