<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div></div><div><br></div><div><br></div><div><blockquote type="cite"><div class="gmail_quote"><div>Yes, that would make sense to me, although we will need some mechanism to suppress the warning in the case where the overflow produces an error (as happens in constant expressions in C++11), and we'd need to avoid repeatedly evaluating subexpressions.</div></div></blockquote><br></div><div>I am afraid I don't see how  this warning can be avoided in case of constant expressions in C++11. Expression evaluations are disjoint from declarations specs.</div><div>For example, clang already issues this warning (and error for constant expressions ) in the case of left-shift operations. </div><div>constexpr int ll = (2147483647 << 2);</div><div><br></div><div>Can't we have the additional warning? Please advise.</div><div><br></div><div>- Fariborz</div><div><br></div><div><br></div><div><br><blockquote type="cite"><div class="gmail_quote">
<div> </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 class="im"><div><blockquote type="cite"><blockquote type="cite">Also, I changed the warning per your other comments.<br>
In r172102.<br></blockquote><br>Thanks! The "results in a new value" wording seems a bit awkward, how<br>about just saying "overflow in case constant expression results in<br>value %0"?</blockquote></div>
</div></div></blockquote></div>
</blockquote></div><br></body></html>