This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ PATCH] Fix -Wlogical-not-parentheses (PR c++/62199)


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?

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]