On 12/22/2015 12:07 AM, Patrick Palka wrote:
+  if (code == EQ_EXPR || code == NE_EXPR)
+    {
+      if (TREE_CODE (lhs) == PTRMEM_CST && CONSTANT_CLASS_P (rhs))
+       lhs = cplus_expand_constant (lhs);
+      if (TREE_CODE (rhs) == PTRMEM_CST && CONSTANT_CLASS_P (lhs))
+       rhs = cplus_expand_constant (rhs);
+    }

If both sides are PTRMEM_CST, we should be able to compare them without expanding, using cp_tree_equal.

Jason


Reply via email to