On Tue, 4 Feb 2014, Marek Polacek wrote:

> Starting with revision 206620, if we have LHS op= RHS and RHS has
> side effects, we preevaluate RHS first, which means that we wrap it
> in C_MAYBE_CONST_EXPR_EXPR + SAVE_EXPR.  This regressed -Wconversion,
> since we now issue bogus warnings.  The reason is that conversion_warning
> doesn't grok C_MAYBE_CONST_EXPR_EXPR/SAVE_EXPR, meaning that it
> just calls unsafe_conversion_p on it that warns.  But for e.g. relational
> and equality operators that's useless as those always yield 0 or 1.
> This patch fixes this by unwrapping the expr first.
> 
> Regtested/bootstrapped on x86_64-linux, ok for trunk?

OK.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to