> On 13 September 2015 at 19:21, erik quanstrom <quans...@quanstro.net> wrote:
> 
> > isn't the && !mixedasop() added to the condition the problem:
> > the cast should not be elided if it's a float/double.  t
> >
> 
> the test is correct, because in mixed-mode assignment, you want to do the
> calculation in float/double,
> then convert it to the integer type, not convert the rhs float/double to
> the integer type at the start.
> ie, I += D  is I = I+D which is I = (double)I + D, not I += (int)D;

ah, you're right.

- erik

Reply via email to