From 183e687af1dd8ca311712b5061c205a43ce1252c Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Wed, 1 Nov 2017 18:30:42 +0000 Subject: [C++ PATCH] overloaded operator fns [8/N] https://gcc.gnu.org/ml/gcc-patches/2017-11/msg00031.html * cp-tree.h (enum cp_identifier_kind): Delete cik_newdel_op. Renumber and reserve udlit value. (IDENTIFIER_NEWDEL_OP): Delete. (IDENTIFIER_OVL_OP): New. (IDENTIFIER_ASSIGN_OP): Adjust. (IDENTIFIER_CONV_OP): Adjust. (IDENTIFIER_OVL_OP_INFO): Adjust. (IDENTIFIER_OVL_OP_FLAGS): New. * decl.c (grokdeclarator): Use IDENTIFIER_OVL_OP_FLAGS. * lex.c (get_identifier_kind_name): Adjust. (init_operators): Don't special case new/delete ops. * mangle.c (write_unqualified_id): Use IDENTIFIER_OVL_OP. * pt.c (push_template_decl_real): Use IDENTIFIER_OVL_OP_FLAGS. * typeck.c (check_return_expr): Likewise. From-SVN: r254322 --- gcc/cp/lex.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'gcc/cp/lex.c') diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index 7754145..c097f4b 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -100,7 +100,8 @@ get_identifier_kind_name (tree id) /* Keep in sync with cp_id_kind enumeration. */ static const char *const names[cik_max] = { "normal", "keyword", "constructor", "destructor", - "assign-op", "op-assign-op", "simple-op", "conv-op", }; + "simple-op", "assign-op", "conv-op", "udlit-op" + }; unsigned kind = 0; kind |= IDENTIFIER_KIND_BIT_2 (id) << 2; @@ -176,9 +177,7 @@ init_operators (void) else { IDENTIFIER_CP_INDEX (ident) = ix; - set_identifier_kind (ident, - op_ptr->flags & OVL_OP_FLAG_ALLOC - ? cik_newdel_op : cik_simple_op); + set_identifier_kind (ident, cik_simple_op); } } if (op_ptr->tree_code) -- cgit v1.1