diff options
author | Roger Sayle <roger@eyesopen.com> | 2005-06-12 23:46:46 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2005-06-12 23:46:46 +0000 |
commit | da5839d66452f961916a5c06cfbfda1edbfa5810 (patch) | |
tree | 9c4f15da470224c82769a2879d6820f9c39319e7 /gcc/cp | |
parent | bf0606afc1f4ffb6f59ebccb30813c60aa122b56 (diff) | |
download | gcc-da5839d66452f961916a5c06cfbfda1edbfa5810.zip gcc-da5839d66452f961916a5c06cfbfda1edbfa5810.tar.gz gcc-da5839d66452f961916a5c06cfbfda1edbfa5810.tar.bz2 |
re PR c++/21930 (pretty printer confusion)
PR c++/21930
* error.c (dump_expr): UNARY_PLUS_EXPR need not handle void types.
Treat CONVERT_EXPR identically to NOP_EXPR.
* g++.dg/other/error10.C: New test case.
From-SVN: r100865
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/error.c | 11 |
2 files changed, 8 insertions, 9 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 82b0ee2..fa37b36 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2005-06-12 Roger Sayle <roger@eyesopen.com> + + PR c++/21930 + * error.c (dump_expr): UNARY_PLUS_EXPR need not handle void types. + Treat CONVERT_EXPR identically to NOP_EXPR. + 2005-06-10 Aldy Hernandez <aldyh@redhat.com> PR c++/10611 diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 71b7173..c897b64 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -1512,15 +1512,7 @@ dump_expr (tree t, int flags) break; case UNARY_PLUS_EXPR: - if (TREE_TYPE (t) && VOID_TYPE_P (TREE_TYPE (t))) - { - pp_cxx_left_paren (cxx_pp); - dump_type (TREE_TYPE (t), flags); - pp_cxx_right_paren (cxx_pp); - dump_expr (TREE_OPERAND (t, 0), flags); - } - else - dump_unary_op ("+", t, flags); + dump_unary_op ("+", t, flags); break; case ADDR_EXPR: @@ -1600,6 +1592,7 @@ dump_expr (tree t, int flags) break; case NOP_EXPR: + case CONVERT_EXPR: { tree op = TREE_OPERAND (t, 0); |