On Thu, 19 Nov 2015, Marek Polacek wrote:

> On Wed, Nov 18, 2015 at 09:14:46PM +0000, Joseph Myers wrote:
> > remove_c_maybe_const_expr doesn't seem to be quite what you want.  Apart 
> > from this not being a case covered by the comment on the function, you're 
> > ignoring the possibility of the side effects in the 
> > C_MAYBE_CONST_EXPR_PRE.  So I think you want something else: if either 
> > argument is a C_MAYBE_CONST_EXPR whose C_MAYBE_CONST_EXPR_PRE is non-NULL 
> > and has side-effects, don't run the comparison, and otherwise it's OK to 
> > go down to the C_MAYBE_CONST_EXPR_EXPR.
> 
> Indeed, thanks.  The following variant does what you suggest.  Perhaps
> I should've introduced a new helper function, but I couldn't find a
> proper name.
> 
> Bootstrapped/regtested on x86_64-linux, ok for trunk?

OK.

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

Reply via email to