+2015-04-24 Jason Merrill <jason@redhat.com>
+
+ * constexpr.c (potential_constant_expression_1) [MINUS_EXPR]:
+ Remove obsolete code.
+ [NE_EXPR]: Likewise.
+
2015-04-23 Jason Merrill <jason@redhat.com>
PR c++/65646
}
case MINUS_EXPR:
- /* -- a subtraction where both operands are pointers. */
- if (TYPE_PTR_P (TREE_OPERAND (t, 0))
- && TYPE_PTR_P (TREE_OPERAND (t, 1)))
- {
- if (flags & tf_error)
- error ("difference of two pointer expressions is not "
- "a constant expression");
- return false;
- }
want_rval = true;
goto binary;
case GE_EXPR:
case EQ_EXPR:
case NE_EXPR:
- /* -- a relational or equality operator where at least
- one of the operands is a pointer. */
- if (TYPE_PTR_P (TREE_OPERAND (t, 0))
- || TYPE_PTR_P (TREE_OPERAND (t, 1)))
- {
- if (flags & tf_error)
- error ("pointer comparison expression is not a "
- "constant expression");
- return false;
- }
want_rval = true;
goto binary;