aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2005-05-27 23:17:21 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2005-05-27 23:17:21 +0000
commit392e3d5102fd1583493335fcc3c4406a6d763d8d (patch)
tree2be222dfe287de45827c33a8493952cbc0dfb261 /gcc/cp/decl.c
parent99a3237ac34b2384180f1ebc0c7d46f9c9e22a3e (diff)
downloadgcc-392e3d5102fd1583493335fcc3c4406a6d763d8d.zip
gcc-392e3d5102fd1583493335fcc3c4406a6d763d8d.tar.gz
gcc-392e3d5102fd1583493335fcc3c4406a6d763d8d.tar.bz2
cp-tree.def (UNARY_PLUS_EXPR): New C++ unary tree code.
* cp-tree.def (UNARY_PLUS_EXPR): New C++ unary tree code. * parser.c (cp_parser_unary_expression): Use UNARY_PLUS_EXPR instead of CONVERT_EXPR. (cp_parser_unary_expression): Likewise. * typeck.c (build_unary_op): Likewise. * call.c (add_builtin_candidate, build_new_op): Likewise. * error.c (dump_expr): Likewise. * pt.c (tsubst_copy, tsubst_copy_and_build): Likewise. * decl.c (ambi_op_p, grok_op_properties): Likewise. * dump.c (dump_op): Likewise. * lex.c (init_operators): Likewise. * operators.def ("+"): Likewise. * cp-gimplify.c (cp_gimplify_expr): Handle UNARY_PLUS_EXPR like a conversion, if the result and argument types differ. * tree.c (fold_if_not_in_template): Fold UNARY_PLUS_EXPR much like a NOP_EXPR when !processing_template_decl. * cxx-pretty-print.c (pp_cxx_cast_expression): Prototype. (pp_cxx_unary_expression): Handle new UNARY_PLUS_EXPR tree code. Co-Authored-By: Giovanni Bajo <giovannibajo@gcc.gnu.org> From-SVN: r100285
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index d354417..7f919d5 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -8586,7 +8586,7 @@ ambi_op_p (enum tree_code code)
{
return (code == INDIRECT_REF
|| code == ADDR_EXPR
- || code == CONVERT_EXPR
+ || code == UNARY_PLUS_EXPR
|| code == NEGATE_EXPR
|| code == PREINCREMENT_EXPR
|| code == PREDECREMENT_EXPR);
@@ -8806,7 +8806,7 @@ grok_op_properties (tree decl, int friendp, bool complain)
operator_code = BIT_AND_EXPR;
break;
- case CONVERT_EXPR:
+ case UNARY_PLUS_EXPR:
operator_code = PLUS_EXPR;
break;