diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2013-09-09 13:34:44 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2013-09-09 13:34:44 +0000 |
commit | c0c66032cabc9ec8ca24f8e9d5d8f1e616bba373 (patch) | |
tree | fb3a56350841d4f14ed66365799f9c6d6881954a | |
parent | 274b2532360e1615cdbde890c32c928c69ac45cc (diff) | |
download | gcc-c0c66032cabc9ec8ca24f8e9d5d8f1e616bba373.zip gcc-c0c66032cabc9ec8ca24f8e9d5d8f1e616bba373.tar.gz gcc-c0c66032cabc9ec8ca24f8e9d5d8f1e616bba373.tar.bz2 |
error.c (dump_expr, [...]): Fix.
2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
* error.c (dump_expr, [PSEUDO_DTOR_EXPR]): Fix.
* cxx-pretty-print.c (cxx_pretty_printer::postfix_expression):
Tweak, TREE_OPERAND (t, 1) may be null.
From-SVN: r202401
-rw-r--r-- | gcc/cp/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/cp/cxx-pretty-print.c | 7 | ||||
-rw-r--r-- | gcc/cp/error.c | 11 |
3 files changed, 19 insertions, 7 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 9ba17c8..8bd332b 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,10 +1,16 @@ +2013-09-09 Paolo Carlini <paolo.carlini@oracle.com> + + * error.c (dump_expr, [PSEUDO_DTOR_EXPR]): Fix. + * cxx-pretty-print.c (cxx_pretty_printer::postfix_expression): + Tweak, TREE_OPERAND (t, 1) may be null. + 2013-09-08 Caroline Tice <cmtice@google.com> PR c++/58300 * vtable-class-hierarchy.c (vtv_generate_init_routine): In preinit case, move call to assemble_vtv_preinit_initializer to after call to cgraph_process_new_functions. - + 2013-09-08 Tom de Vries <tom@codesourcery.com> PR c++/58282 diff --git a/gcc/cp/cxx-pretty-print.c b/gcc/cp/cxx-pretty-print.c index 4578a5b..86d8b47 100644 --- a/gcc/cp/cxx-pretty-print.c +++ b/gcc/cp/cxx-pretty-print.c @@ -618,8 +618,11 @@ cxx_pretty_printer::postfix_expression (tree t) case PSEUDO_DTOR_EXPR: postfix_expression (TREE_OPERAND (t, 0)); pp_cxx_dot (this); - pp_cxx_qualified_id (this, TREE_OPERAND (t, 1)); - pp_cxx_colon_colon (this); + if (TREE_OPERAND (t, 1)) + { + pp_cxx_qualified_id (this, TREE_OPERAND (t, 1)); + pp_cxx_colon_colon (this); + } pp_complement (this); pp_cxx_unqualified_id (this, TREE_OPERAND (t, 2)); break; diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 78c74b6..a51984e 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -2472,12 +2472,15 @@ dump_expr (cxx_pretty_printer *pp, tree t, int flags) break; case PSEUDO_DTOR_EXPR: - dump_expr (pp, TREE_OPERAND (t, 2), flags); + dump_expr (pp, TREE_OPERAND (t, 0), flags); pp_cxx_dot (pp); - dump_type (pp, TREE_OPERAND (t, 0), flags); - pp_cxx_colon_colon (pp); + if (TREE_OPERAND (t, 1)) + { + dump_type (pp, TREE_OPERAND (t, 1), flags); + pp_cxx_colon_colon (pp); + } pp_cxx_complement (pp); - dump_type (pp, TREE_OPERAND (t, 1), flags); + dump_type (pp, TREE_OPERAND (t, 2), flags); break; case TEMPLATE_ID_EXPR: |