<div class="gmail_quote">On Wed, Feb 23, 2011 at 5:58 PM, Chris Lattner <span dir="ltr"><<a href="mailto:clattner@apple.com">clattner@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 id=":3fu">Mentioning the "promoted type" doesn't make sense in a lot of cases (when there is no promotion happening).  It seems completely fine to simplify it to:<br>
<br>
"shift result (%0) requires %1 bits to represent, but %2 only has %3 bits"<br>
<br>
What do you think?</div></blockquote></div><br><div>I agree the 'promoted' part may not add much to some folks. It's a bit standards-ish. Happy to drop that part.</div><div><br></div><div>However, I think highlighting that the 'int' is the type of the shift expression really helps. When we found this in our code, one of the primary responses we had was:</div>
<div><br></div><div>int64_t i = 10 << 30;</div><div>^^^^^^</div><div>"But it says int64_t right there!!"</div><div><br></div><div>Basically, I'm hoping we can educate the user on where the type came from to understand why this code is wrong.</div>