else
pp_minus (pp);
pp_c_whitespace (pp);
- pp->multiplicative_expression (TREE_OPERAND (e, 1));
+ {
+ tree op1 = TREE_OPERAND (e, 1);
+ if (code == POINTER_PLUS_EXPR
+ && TREE_CODE (op1) == INTEGER_CST
+ && tree_int_cst_sign_bit (op1))
+ /* A pointer minus an integer is represented internally as plus a very
+ large number, don't expose that to users. */
+ op1 = convert (ssizetype, op1);
+ pp->multiplicative_expression (op1);
+ }
break;
default:
else
pp_string (pp, M_("<unknown operator>"));
pp_cxx_whitespace (pp);
- dump_expr (pp, TREE_OPERAND (t, 1), flags | TFF_EXPR_IN_PARENS);
+ tree op1 = TREE_OPERAND (t, 1);
+ if (TREE_CODE (t) == POINTER_PLUS_EXPR
+ && TREE_CODE (op1) == INTEGER_CST
+ && tree_int_cst_sign_bit (op1))
+ /* A pointer minus an integer is represented internally as plus a very
+ large number, don't expose that to users. */
+ op1 = convert (ssizetype, op1);
+ dump_expr (pp, op1, flags | TFF_EXPR_IN_PARENS);
pp_cxx_right_paren (pp);
}