diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-10-27 17:55:34 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2007-10-27 17:55:34 +0200 |
commit | 1e3eacc7cb6d8d6471303df1148877379fe584cb (patch) | |
tree | e20644e65214c9faa7091e3e93e044f503db04da /gcc/cp/cxx-pretty-print.c | |
parent | d02dbde6c7e32fb62ea6ee372b0b9748ff9d39b9 (diff) | |
download | gcc-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.c | 5 |
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; |