Commit e4c4792d by Jason Merrill Committed by Jason Merrill

* error.c (dump_expr): Avoid printing (*&i) for references.

From-SVN: r217899
parent b3392804
2014-11-20 Jason Merrill <jason@redhat.com>
* error.c (dump_expr): Avoid printing (*&i) for references.
2014-11-20 Ville Voutilainen <ville.voutilainen@gmail.com> 2014-11-20 Ville Voutilainen <ville.voutilainen@gmail.com>
PR c++/63959 PR c++/63959
......
...@@ -2299,7 +2299,13 @@ dump_expr (cxx_pretty_printer *pp, tree t, int flags) ...@@ -2299,7 +2299,13 @@ dump_expr (cxx_pretty_printer *pp, tree t, int flags)
TREE_TYPE (ttype))) TREE_TYPE (ttype)))
{ {
if (TREE_CODE (ttype) == REFERENCE_TYPE) if (TREE_CODE (ttype) == REFERENCE_TYPE)
dump_unary_op (pp, "*", t, flags); {
STRIP_NOPS (op);
if (TREE_CODE (op) == ADDR_EXPR)
dump_expr (pp, TREE_OPERAND (op, 0), flags);
else
dump_unary_op (pp, "*", t, flags);
}
else else
dump_unary_op (pp, "&", t, flags); dump_unary_op (pp, "&", t, flags);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment