From: Jason Merrill Date: Fri, 21 Nov 2014 00:47:45 +0000 (-0500) Subject: * error.c (dump_expr): Avoid printing (*&i) for references. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e4c4792d37be8f7835dac75e929e7011ccba91fa;p=gcc.git * error.c (dump_expr): Avoid printing (*&i) for references. From-SVN: r217899 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 2c98a7103d1..305565fa350 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2014-11-20 Jason Merrill + + * error.c (dump_expr): Avoid printing (*&i) for references. + 2014-11-20 Ville Voutilainen PR c++/63959 diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 76f86cb0d74..7d79771ec26 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -2299,7 +2299,13 @@ dump_expr (cxx_pretty_printer *pp, tree t, int flags) TREE_TYPE (ttype))) { 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 dump_unary_op (pp, "&", t, flags); }