On Fri, Aug 22, 2014 at 12:24:16PM -0400, Jason Merrill wrote:
> On 08/22/2014 11:59 AM, Marek Polacek wrote:
> >+      if (TREE_CODE (current.lhs) == INTEGER_CST)
> >+        warn_logical_not_parentheses (current.loc, current.tree_type,
> >+                                      current.lhs, rhs);
> >+      else if (EXPR_P (current.lhs))
> >+        warn_logical_not_parentheses (current.loc, current.tree_type,
> >+                                      TREE_OPERAND (current.lhs, 0), rhs);
> 
> Sorry to nitpick, but now that we aren't checking the lhs for BOOLEAN_TYPE,
> do we need to look at it at all?

I believe so: if the LHS is an INTEGER_CST, we can't use TREE_OPERAND
on it.  Happens e.g. for if (!5 > a).

        Marek

Reply via email to