On Wed, Feb 23, 2011 at 5:58 PM, Chris Lattner <[email protected]> wrote:

> 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:
>
> "shift result (%0) requires %1 bits to represent, but %2 only has %3 bits"
>
> What do you think?
>

I agree the 'promoted' part may not add much to some folks. It's a bit
standards-ish. Happy to drop that part.

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:

int64_t i = 10 << 30;
^^^^^^
"But it says int64_t right there!!"

Basically, I'm hoping we can educate the user on where the type came from to
understand why this code is wrong.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to