aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cxx-pretty-print.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-10-27 17:55:34 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2007-10-27 17:55:34 +0200
commit1e3eacc7cb6d8d6471303df1148877379fe584cb (patch)
treee20644e65214c9faa7091e3e93e044f503db04da /gcc/cp/cxx-pretty-print.c
parentd02dbde6c7e32fb62ea6ee372b0b9748ff9d39b9 (diff)
downloadgcc-1e3eacc7cb6d8d6471303df1148877379fe584cb.zip
gcc-1e3eacc7cb6d8d6471303df1148877379fe584cb.tar.gz
gcc-1e3eacc7cb6d8d6471303df1148877379fe584cb.tar.bz2
re PR c++/33844 (Broken diagnostic: 'dotstar_expr/member_ref' not supported by pp_cxx_unqualified_id)
PR c++/33844 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print ->* rather than .*. * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR. * g++.dg/other/ptrmem8.C: New test. From-SVN: r129682
Diffstat (limited to 'gcc/cp/cxx-pretty-print.c')
-rw-r--r--gcc/cp/cxx-pretty-print.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/cxx-pretty-print.c b/gcc/cp/cxx-pretty-print.c
index 5cbf82c..1de5964 100644
--- a/gcc/cp/cxx-pretty-print.c
+++ b/gcc/cp/cxx-pretty-print.c
@@ -814,7 +814,10 @@ pp_cxx_pm_expression (cxx_pretty_printer *pp, tree t)
case MEMBER_REF:
case DOTSTAR_EXPR:
pp_cxx_pm_expression (pp, TREE_OPERAND (t, 0));
- pp_cxx_dot (pp);
+ if (TREE_CODE (t) == MEMBER_REF)
+ pp_cxx_arrow (pp);
+ else
+ pp_cxx_dot (pp);
pp_star(pp);
pp_cxx_cast_expression (pp, TREE_OPERAND (t, 1));
break;