diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2017-01-26 19:04:48 -0200 |
---|---|---|
committer | Alexandre Oliva <aoliva@redhat.com> | 2017-01-26 19:04:48 -0200 |
commit | 6e1587c82619f86850b0a36007258023212fcfcd (patch) | |
tree | 6af7c68c84b0babd396ab088dc5b77c069ad43c4 | |
parent | cd1f73e8446d310f09e6cb84f31b5cec5f1d6b80 (diff) | |
download | gcc-6e1587c82619f86850b0a36007258023212fcfcd.tar.gz |
Rename ansi_*opname; export cp_literal_operator_id
for gcc/cp/ChangeLog
* cp-tree.h (ansi_opname): Rename to...
(cp_operator_id): ... this. Adjust all callers.
(ansi_assopname): Rename to...
(cp_assignment_operator_id): ... this. Adjust all callers.
(cp_literal_operator_id): Declare.
* parser.c (cp_literal_operator_id): Drop static.
-rw-r--r-- | gcc/cp/call.c | 14 | ||||
-rw-r--r-- | gcc/cp/class.c | 10 | ||||
-rw-r--r-- | gcc/cp/cp-tree.h | 15 | ||||
-rw-r--r-- | gcc/cp/decl.c | 6 | ||||
-rw-r--r-- | gcc/cp/decl2.c | 2 | ||||
-rw-r--r-- | gcc/cp/init.c | 2 | ||||
-rw-r--r-- | gcc/cp/lambda.c | 2 | ||||
-rw-r--r-- | gcc/cp/lex.c | 2 | ||||
-rw-r--r-- | gcc/cp/method.c | 10 | ||||
-rw-r--r-- | gcc/cp/parser.c | 111 | ||||
-rw-r--r-- | gcc/cp/search.c | 2 | ||||
-rw-r--r-- | gcc/cp/semantics.c | 4 | ||||
-rw-r--r-- | gcc/cp/typeck.c | 2 | ||||
-rw-r--r-- | libcc1/libcp1plugin.cc | 14 |
14 files changed, 93 insertions, 103 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 024519d3601..561b26b94f4 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -4332,7 +4332,7 @@ build_op_call_1 (tree obj, vec<tree, va_gc> **args, tsubst_flags_t complain) if (TYPE_BINFO (type)) { - fns = lookup_fnfields (TYPE_BINFO (type), ansi_opname (CALL_EXPR), 1); + fns = lookup_fnfields (TYPE_BINFO (type), cp_operator_id (CALL_EXPR), 1); if (fns == error_mark_node) return error_mark_node; } @@ -5039,7 +5039,7 @@ build_conditional_expr_1 (location_t loc, tree arg1, tree arg2, tree arg3, add_builtin_candidates (&candidates, COND_EXPR, NOP_EXPR, - ansi_opname (COND_EXPR), + cp_operator_id (COND_EXPR), args, LOOKUP_NORMAL, complain); @@ -5455,10 +5455,10 @@ build_new_op_1 (location_t loc, enum tree_code code, int flags, tree arg1, { code2 = TREE_CODE (arg3); arg3 = NULL_TREE; - fnname = ansi_assopname (code2); + fnname = cp_assignment_operator_id (code2); } else - fnname = ansi_opname (code); + fnname = cp_operator_id (code); arg1 = prep_operand (arg1); @@ -6009,7 +6009,7 @@ build_op_delete_call (enum tree_code code, tree addr, tree size, type = strip_array_types (TREE_TYPE (TREE_TYPE (addr))); - fnname = ansi_opname (code); + fnname = cp_operator_id (code); if (CLASS_TYPE_P (type) && COMPLETE_TYPE_P (complete_type (type)) @@ -8072,7 +8072,7 @@ build_special_member_call (tree instance, tree name, vec<tree, va_gc> **args, || name == complete_dtor_identifier || name == base_dtor_identifier || name == deleting_dtor_identifier - || name == ansi_assopname (NOP_EXPR)); + || name == cp_assignment_operator_id (NOP_EXPR)); if (TYPE_P (binfo)) { /* Resolve the name. */ @@ -8100,7 +8100,7 @@ build_special_member_call (tree instance, tree name, vec<tree, va_gc> **args, if (!same_type_ignoring_top_level_qualifiers_p (TREE_TYPE (instance), BINFO_TYPE (binfo))) { - if (name != ansi_assopname (NOP_EXPR)) + if (name != cp_assignment_operator_id (NOP_EXPR)) /* For constructors and destructors, either the base is non-virtual, or it is virtual but we are doing the conversion from a constructor or destructor for the diff --git a/gcc/cp/class.c b/gcc/cp/class.c index a4f3c6b6aba..7a9e5ddfbf0 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -3217,7 +3217,7 @@ static tree dfs_declare_virt_assop_and_dtor (tree binfo, void *data) { tree bv, fn, t = (tree)data; - tree opname = ansi_assopname (NOP_EXPR); + tree opname = cp_assignment_operator_id (NOP_EXPR); gcc_assert (t && CLASS_TYPE_P (t)); gcc_assert (binfo && TREE_CODE (binfo) == TREE_BINFO); @@ -5288,7 +5288,7 @@ vbase_has_user_provided_move_assign (tree type) { /* Does the type itself have a user-provided move assignment operator? */ for (tree fns - = lookup_fnfields_slot_nolazy (type, ansi_assopname (NOP_EXPR)); + = lookup_fnfields_slot_nolazy (type, cp_assignment_operator_id (NOP_EXPR)); fns; fns = OVL_NEXT (fns)) { tree fn = OVL_CURRENT (fns); @@ -5452,7 +5452,7 @@ type_has_move_assign (tree t) lazily_declare_fn (sfk_move_assignment, t); } - for (fns = lookup_fnfields_slot_nolazy (t, ansi_assopname (NOP_EXPR)); + for (fns = lookup_fnfields_slot_nolazy (t, cp_assignment_operator_id (NOP_EXPR)); fns; fns = OVL_NEXT (fns)) if (move_fn_p (OVL_CURRENT (fns))) return true; @@ -5497,7 +5497,7 @@ type_has_user_declared_move_assign (tree t) if (CLASSTYPE_LAZY_MOVE_ASSIGN (t)) return false; - for (fns = lookup_fnfields_slot_nolazy (t, ansi_assopname (NOP_EXPR)); + for (fns = lookup_fnfields_slot_nolazy (t, cp_assignment_operator_id (NOP_EXPR)); fns; fns = OVL_NEXT (fns)) { tree fn = OVL_CURRENT (fns); @@ -5618,7 +5618,7 @@ type_requires_array_cookie (tree type) the array to the deallocation function, so we will need to store a cookie. */ fns = lookup_fnfields (TYPE_BINFO (type), - ansi_opname (VEC_DELETE_EXPR), + cp_operator_id (VEC_DELETE_EXPR), /*protect=*/0); /* If there are no `operator []' members, or the lookup is ambiguous, then we don't need a cookie. */ diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index ff871b555b9..4f4d57fa1ac 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -1531,16 +1531,17 @@ struct GTY(()) language_function { /* True if NAME is the IDENTIFIER_NODE for an overloaded "operator new" or "operator delete". */ #define NEW_DELETE_OPNAME_P(NAME) \ - ((NAME) == ansi_opname (NEW_EXPR) \ - || (NAME) == ansi_opname (VEC_NEW_EXPR) \ - || (NAME) == ansi_opname (DELETE_EXPR) \ - || (NAME) == ansi_opname (VEC_DELETE_EXPR)) + ((NAME) == cp_operator_id (NEW_EXPR) \ + || (NAME) == cp_operator_id (VEC_NEW_EXPR) \ + || (NAME) == cp_operator_id (DELETE_EXPR) \ + || (NAME) == cp_operator_id (VEC_DELETE_EXPR)) -#define ansi_opname(CODE) \ +#define cp_operator_id(CODE) \ (operator_name_info[(int) (CODE)].identifier) -#define ansi_assopname(CODE) \ +#define cp_assignment_operator_id(CODE) \ (assignment_operator_name_info[(int) (CODE)].identifier) -extern tree ansi_litopname(const char *); +/* In parser.c. */ +extern tree cp_literal_operator_id (const char *); /* TRUE if a tree code represents a statement. */ extern bool statement_code_p[MAX_TREE_CODES]; diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 43cf3df36ba..9cae7470088 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -4476,7 +4476,7 @@ static tree push_cp_library_fn (enum tree_code operator_code, tree type, int ecf_flags) { - tree fn = build_cp_library_fn (ansi_opname (operator_code), + tree fn = build_cp_library_fn (cp_operator_id (operator_code), operator_code, type, ecf_flags); pushdecl (fn); @@ -12158,12 +12158,12 @@ grok_op_properties (tree decl, bool complain) do { #define DEF_OPERATOR(NAME, CODE, MANGLING, ARITY, ASSN_P) \ - if (ansi_opname (CODE) == name) \ + if (cp_operator_id (CODE) == name) \ { \ operator_code = (CODE); \ break; \ } \ - else if (ansi_assopname (CODE) == name) \ + else if (cp_assignment_operator_id (CODE) == name) \ { \ operator_code = (CODE); \ DECL_ASSIGNMENT_OPERATOR_P (decl) = 1; \ diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 2ba5ffb31dc..63383bd6475 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -4483,7 +4483,7 @@ maybe_warn_sized_delete (enum tree_code code) tree sized = NULL_TREE; tree unsized = NULL_TREE; - for (tree ovl = IDENTIFIER_GLOBAL_VALUE (ansi_opname (code)); + for (tree ovl = IDENTIFIER_GLOBAL_VALUE (cp_operator_id (code)); ovl; ovl = OVL_NEXT (ovl)) { tree fn = OVL_CURRENT (ovl); diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 1a5766a42b7..a5f317aaeb6 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -2906,7 +2906,7 @@ build_new_1 (vec<tree, va_gc> **placement, tree type, tree nelts, tree fnname; tree fns; - fnname = ansi_opname (array_p ? VEC_NEW_EXPR : NEW_EXPR); + fnname = cp_operator_id (array_p ? VEC_NEW_EXPR : NEW_EXPR); member_new_p = !globally_qualified_p && CLASS_TYPE_P (elt_type) diff --git a/gcc/cp/lambda.c b/gcc/cp/lambda.c index d51118571bc..9058e816abc 100644 --- a/gcc/cp/lambda.c +++ b/gcc/cp/lambda.c @@ -202,7 +202,7 @@ lambda_function (tree lambda) if (CLASSTYPE_TEMPLATE_INSTANTIATION (type) && !COMPLETE_OR_OPEN_TYPE_P (type)) return NULL_TREE; - lambda = lookup_member (type, ansi_opname (CALL_EXPR), + lambda = lookup_member (type, cp_operator_id (CALL_EXPR), /*protect=*/0, /*want_type=*/false, tf_warning_or_error); if (lambda) diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index 43827e57179..696b4341f79 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -450,7 +450,7 @@ unqualified_name_lookup_error (tree name, location_t loc) if (IDENTIFIER_OPNAME_P (name)) { - if (name != ansi_opname (ERROR_MARK)) + if (name != cp_operator_id (ERROR_MARK)) error_at (loc, "%qD not defined", name); } else diff --git a/gcc/cp/method.c b/gcc/cp/method.c index 01aa249595d..bc9bebe58b6 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -697,7 +697,7 @@ do_build_copy_assign (tree fndecl) parmvec = make_tree_vector_single (converted_parm); finish_expr_stmt (build_special_member_call (current_class_ref, - ansi_assopname (NOP_EXPR), + cp_assignment_operator_id (NOP_EXPR), &parmvec, base_binfo, flags, @@ -990,7 +990,7 @@ get_copy_assign (tree type) int quals = (TYPE_HAS_CONST_COPY_ASSIGN (type) ? TYPE_QUAL_CONST : TYPE_UNQUALIFIED); tree argtype = build_stub_type (type, quals, false); - tree fn = locate_fn_flags (type, ansi_assopname (NOP_EXPR), argtype, + tree fn = locate_fn_flags (type, cp_assignment_operator_id (NOP_EXPR), argtype, LOOKUP_NORMAL, tf_warning_or_error); if (fn == error_mark_node) return NULL_TREE; @@ -1369,7 +1369,7 @@ synthesized_method_walk (tree ctype, special_function_kind sfk, bool const_p, case sfk_move_assignment: case sfk_copy_assignment: assign_p = true; - fnname = ansi_assopname (NOP_EXPR); + fnname = cp_assignment_operator_id (NOP_EXPR); break; case sfk_destructor: @@ -1516,7 +1516,7 @@ synthesized_method_walk (tree ctype, special_function_kind sfk, bool const_p, if (check_vdtor && type_has_virtual_destructor (basetype)) { - rval = locate_fn_flags (ctype, ansi_opname (DELETE_EXPR), + rval = locate_fn_flags (ctype, cp_operator_id (DELETE_EXPR), ptr_type_node, flags, complain); /* Unlike for base ctor/op=/dtor, for operator delete it's fine to have a null rval (no class-specific op delete). */ @@ -1802,7 +1802,7 @@ implicitly_declare_fn (special_function_kind kind, tree type, || kind == sfk_move_assignment) { return_type = build_reference_type (type); - name = ansi_assopname (NOP_EXPR); + name = cp_assignment_operator_id (NOP_EXPR); } else name = constructor_name (type); diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 6b370543ff1..b4894ef3f32 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -248,9 +248,6 @@ static cp_token_cache *cp_token_cache_new static void cp_parser_initial_pragma (cp_token *); -static tree cp_literal_operator_id - (const char *); - static void cp_parser_cilk_simd (cp_parser *, cp_token *, bool *); static tree cp_parser_cilk_for @@ -10171,7 +10168,7 @@ cp_parser_lambda_declarator_opt (cp_parser* parser, tree lambda_expr) p = obstack_alloc (&declarator_obstack, 0); - declarator = make_id_declarator (NULL_TREE, ansi_opname (CALL_EXPR), + declarator = make_id_declarator (NULL_TREE, cp_operator_id (CALL_EXPR), sfk_none); quals = (LAMBDA_EXPR_MUTABLE_P (lambda_expr) @@ -13857,7 +13854,7 @@ cp_parser_operator_function_id (cp_parser* parser) /* Return an identifier node for a user-defined literal operator. The suffix identifier is chained to the operator name identifier. */ -static tree +tree cp_literal_operator_id (const char* name) { tree identifier; @@ -13869,14 +13866,6 @@ cp_literal_operator_id (const char* name) return identifier; } -/* Exported wrapper for cp_literal_operator_id. */ - -tree -ansi_litopname (const char *name) -{ - return cp_literal_operator_id (name); -} - /* Parse an operator. operator: @@ -13934,12 +13923,12 @@ cp_parser_operator (cp_parser* parser) if (cp_token *close_token = cp_parser_require (parser, CPP_CLOSE_SQUARE, RT_CLOSE_SQUARE)) end_loc = close_token->location; - id = ansi_opname (op == NEW_EXPR + id = cp_operator_id (op == NEW_EXPR ? VEC_NEW_EXPR : VEC_DELETE_EXPR); } /* Otherwise, we have the non-array variant. */ else - id = ansi_opname (op); + id = cp_operator_id (op); location_t loc = make_location (start_loc, start_loc, end_loc); @@ -13947,147 +13936,147 @@ cp_parser_operator (cp_parser* parser) } case CPP_PLUS: - id = ansi_opname (PLUS_EXPR); + id = cp_operator_id (PLUS_EXPR); break; case CPP_MINUS: - id = ansi_opname (MINUS_EXPR); + id = cp_operator_id (MINUS_EXPR); break; case CPP_MULT: - id = ansi_opname (MULT_EXPR); + id = cp_operator_id (MULT_EXPR); break; case CPP_DIV: - id = ansi_opname (TRUNC_DIV_EXPR); + id = cp_operator_id (TRUNC_DIV_EXPR); break; case CPP_MOD: - id = ansi_opname (TRUNC_MOD_EXPR); + id = cp_operator_id (TRUNC_MOD_EXPR); break; case CPP_XOR: - id = ansi_opname (BIT_XOR_EXPR); + id = cp_operator_id (BIT_XOR_EXPR); break; case CPP_AND: - id = ansi_opname (BIT_AND_EXPR); + id = cp_operator_id (BIT_AND_EXPR); break; case CPP_OR: - id = ansi_opname (BIT_IOR_EXPR); + id = cp_operator_id (BIT_IOR_EXPR); break; case CPP_COMPL: - id = ansi_opname (BIT_NOT_EXPR); + id = cp_operator_id (BIT_NOT_EXPR); break; case CPP_NOT: - id = ansi_opname (TRUTH_NOT_EXPR); + id = cp_operator_id (TRUTH_NOT_EXPR); break; case CPP_EQ: - id = ansi_assopname (NOP_EXPR); + id = cp_assignment_operator_id (NOP_EXPR); break; case CPP_LESS: - id = ansi_opname (LT_EXPR); + id = cp_operator_id (LT_EXPR); break; case CPP_GREATER: - id = ansi_opname (GT_EXPR); + id = cp_operator_id (GT_EXPR); break; case CPP_PLUS_EQ: - id = ansi_assopname (PLUS_EXPR); + id = cp_assignment_operator_id (PLUS_EXPR); break; case CPP_MINUS_EQ: - id = ansi_assopname (MINUS_EXPR); + id = cp_assignment_operator_id (MINUS_EXPR); break; case CPP_MULT_EQ: - id = ansi_assopname (MULT_EXPR); + id = cp_assignment_operator_id (MULT_EXPR); break; case CPP_DIV_EQ: - id = ansi_assopname (TRUNC_DIV_EXPR); + id = cp_assignment_operator_id (TRUNC_DIV_EXPR); break; case CPP_MOD_EQ: - id = ansi_assopname (TRUNC_MOD_EXPR); + id = cp_assignment_operator_id (TRUNC_MOD_EXPR); break; case CPP_XOR_EQ: - id = ansi_assopname (BIT_XOR_EXPR); + id = cp_assignment_operator_id (BIT_XOR_EXPR); break; case CPP_AND_EQ: - id = ansi_assopname (BIT_AND_EXPR); + id = cp_assignment_operator_id (BIT_AND_EXPR); break; case CPP_OR_EQ: - id = ansi_assopname (BIT_IOR_EXPR); + id = cp_assignment_operator_id (BIT_IOR_EXPR); break; case CPP_LSHIFT: - id = ansi_opname (LSHIFT_EXPR); + id = cp_operator_id (LSHIFT_EXPR); break; case CPP_RSHIFT: - id = ansi_opname (RSHIFT_EXPR); + id = cp_operator_id (RSHIFT_EXPR); break; case CPP_LSHIFT_EQ: - id = ansi_assopname (LSHIFT_EXPR); + id = cp_assignment_operator_id (LSHIFT_EXPR); break; case CPP_RSHIFT_EQ: - id = ansi_assopname (RSHIFT_EXPR); + id = cp_assignment_operator_id (RSHIFT_EXPR); break; case CPP_EQ_EQ: - id = ansi_opname (EQ_EXPR); + id = cp_operator_id (EQ_EXPR); break; case CPP_NOT_EQ: - id = ansi_opname (NE_EXPR); + id = cp_operator_id (NE_EXPR); break; case CPP_LESS_EQ: - id = ansi_opname (LE_EXPR); + id = cp_operator_id (LE_EXPR); break; case CPP_GREATER_EQ: - id = ansi_opname (GE_EXPR); + id = cp_operator_id (GE_EXPR); break; case CPP_AND_AND: - id = ansi_opname (TRUTH_ANDIF_EXPR); + id = cp_operator_id (TRUTH_ANDIF_EXPR); break; case CPP_OR_OR: - id = ansi_opname (TRUTH_ORIF_EXPR); + id = cp_operator_id (TRUTH_ORIF_EXPR); break; case CPP_PLUS_PLUS: - id = ansi_opname (POSTINCREMENT_EXPR); + id = cp_operator_id (POSTINCREMENT_EXPR); break; case CPP_MINUS_MINUS: - id = ansi_opname (PREDECREMENT_EXPR); + id = cp_operator_id (PREDECREMENT_EXPR); break; case CPP_COMMA: - id = ansi_opname (COMPOUND_EXPR); + id = cp_operator_id (COMPOUND_EXPR); break; case CPP_DEREF_STAR: - id = ansi_opname (MEMBER_REF); + id = cp_operator_id (MEMBER_REF); break; case CPP_DEREF: - id = ansi_opname (COMPONENT_REF); + id = cp_operator_id (COMPONENT_REF); break; case CPP_OPEN_PAREN: @@ -14095,14 +14084,14 @@ cp_parser_operator (cp_parser* parser) cp_lexer_consume_token (parser->lexer); /* Look for the matching `)'. */ cp_parser_require (parser, CPP_CLOSE_PAREN, RT_CLOSE_PAREN); - return ansi_opname (CALL_EXPR); + return cp_operator_id (CALL_EXPR); case CPP_OPEN_SQUARE: /* Consume the `['. */ cp_lexer_consume_token (parser->lexer); /* Look for the matching `]'. */ cp_parser_require (parser, CPP_CLOSE_SQUARE, RT_CLOSE_SQUARE); - return ansi_opname (ARRAY_REF); + return cp_operator_id (ARRAY_REF); case CPP_UTF8STRING: case CPP_UTF8STRING_USERDEF: @@ -31327,21 +31316,21 @@ cp_parser_omp_clause_reduction (cp_parser *parser, tree list) code = MIN_EXPR; else if (strcmp (p, "max") == 0) code = MAX_EXPR; - else if (id == ansi_opname (PLUS_EXPR)) + else if (id == cp_operator_id (PLUS_EXPR)) code = PLUS_EXPR; - else if (id == ansi_opname (MULT_EXPR)) + else if (id == cp_operator_id (MULT_EXPR)) code = MULT_EXPR; - else if (id == ansi_opname (MINUS_EXPR)) + else if (id == cp_operator_id (MINUS_EXPR)) code = MINUS_EXPR; - else if (id == ansi_opname (BIT_AND_EXPR)) + else if (id == cp_operator_id (BIT_AND_EXPR)) code = BIT_AND_EXPR; - else if (id == ansi_opname (BIT_IOR_EXPR)) + else if (id == cp_operator_id (BIT_IOR_EXPR)) code = BIT_IOR_EXPR; - else if (id == ansi_opname (BIT_XOR_EXPR)) + else if (id == cp_operator_id (BIT_XOR_EXPR)) code = BIT_XOR_EXPR; - else if (id == ansi_opname (TRUTH_ANDIF_EXPR)) + else if (id == cp_operator_id (TRUTH_ANDIF_EXPR)) code = TRUTH_ANDIF_EXPR; - else if (id == ansi_opname (TRUTH_ORIF_EXPR)) + else if (id == cp_operator_id (TRUTH_ORIF_EXPR)) code = TRUTH_ORIF_EXPR; id = omp_reduction_id (code, id, NULL_TREE); tree scope = parser->scope; diff --git a/gcc/cp/search.c b/gcc/cp/search.c index 2b26df4903e..877015e7b9e 100644 --- a/gcc/cp/search.c +++ b/gcc/cp/search.c @@ -1667,7 +1667,7 @@ lookup_fnfields_1 (tree type, tree name) if (CLASSTYPE_LAZY_MOVE_CTOR (type)) lazily_declare_fn (sfk_move_constructor, type); } - else if (name == ansi_assopname (NOP_EXPR)) + else if (name == cp_assignment_operator_id (NOP_EXPR)) { if (CLASSTYPE_LAZY_COPY_ASSIGN (type)) lazily_declare_fn (sfk_copy_assignment, type); diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 66c41870346..3ea7a568bfd 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -5095,7 +5095,7 @@ omp_reduction_id (enum tree_code reduction_code, tree reduction_id, tree type) case BIT_IOR_EXPR: case TRUTH_ANDIF_EXPR: case TRUTH_ORIF_EXPR: - reduction_id = ansi_opname (reduction_code); + reduction_id = cp_operator_id (reduction_code); break; case MIN_EXPR: p = "min"; @@ -8984,7 +8984,7 @@ classtype_has_nothrow_assign_or_copy_p (tree type, bool assign_p) if (assign_p) { int ix; - ix = lookup_fnfields_1 (type, ansi_assopname (NOP_EXPR)); + ix = lookup_fnfields_1 (type, cp_assignment_operator_id (NOP_EXPR)); if (ix < 0) return false; fns = (*CLASSTYPE_METHOD_VEC (type))[ix]; diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index a591d291602..7524989920d 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -8784,7 +8784,7 @@ check_return_expr (tree retval, bool *no_warning) /* Effective C++ rule 15. See also start_function. */ if (warn_ecpp - && DECL_NAME (current_function_decl) == ansi_assopname(NOP_EXPR)) + && DECL_NAME (current_function_decl) == cp_assignment_operator_id (NOP_EXPR)) { bool warn = true; diff --git a/libcc1/libcp1plugin.cc b/libcc1/libcp1plugin.cc index 0be81908d36..5059e1c94ab 100644 --- a/libcc1/libcp1plugin.cc +++ b/libcc1/libcp1plugin.cc @@ -1,5 +1,5 @@ /* Library interface to C++ front end. - Copyright (C) 2014-2016 Free Software Foundation, Inc. + Copyright (C) 2014-2017 Free Software Foundation, Inc. This file is part of GCC. As it interacts with GDB through libcc1, they all become a single program as regards the GNU GPL's requirements. @@ -1355,7 +1355,7 @@ plugin_new_decl (cc1_plugin::connection *self, id = xstrndup (id, len); freeid = true; } - identifier = ansi_litopname (id); + identifier = cp_literal_operator_id (id); if (freeid) free (id); } @@ -1368,9 +1368,9 @@ plugin_new_decl (cc1_plugin::connection *self, if (opcode != ERROR_MARK) { if (assop) - identifier = ansi_assopname (opcode); + identifier = cp_assignment_operator_id (opcode); else - identifier = ansi_opname (opcode); + identifier = cp_operator_id (opcode); } } decl = build_lang_decl_loc (loc, code, identifier, sym_type); @@ -2645,7 +2645,7 @@ plugin_new_dependent_value_expr (cc1_plugin::connection *self, id = xstrndup (id, len); freeid = true; } - identifier = ansi_litopname (id); + identifier = cp_literal_operator_id (id); if (freeid) free (id); } @@ -2660,9 +2660,9 @@ plugin_new_dependent_value_expr (cc1_plugin::connection *self, if (opcode != ERROR_MARK) { if (assop) - identifier = ansi_assopname (opcode); + identifier = cp_assignment_operator_id (opcode); else - identifier = ansi_opname (opcode); + identifier = cp_operator_id (opcode); } gcc_assert (identifier); |