aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 0e49e2b..a983adf 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -1921,9 +1921,9 @@ next_arg:;
DECL_FINAL_P (newdecl) |= DECL_FINAL_P (olddecl);
DECL_OVERRIDE_P (newdecl) |= DECL_OVERRIDE_P (olddecl);
DECL_THIS_STATIC (newdecl) |= DECL_THIS_STATIC (olddecl);
- if (DECL_OVERLOADED_OPERATOR_P (olddecl) != ERROR_MARK)
+ if (DECL_OVERLOADED_OPERATOR_P (olddecl))
SET_OVERLOADED_OPERATOR_CODE
- (newdecl, DECL_OVERLOADED_OPERATOR_P (olddecl));
+ (newdecl, DECL_OVERLOADED_OPERATOR_CODE (olddecl));
new_defines_function = DECL_INITIAL (newdecl) != NULL_TREE;
/* Optionally warn about more than one declaration for the same
@@ -12816,7 +12816,7 @@ grok_special_member_properties (tree decl)
&& !ctor && !move_fn_p (decl))
TYPE_HAS_CONSTEXPR_CTOR (class_type) = 1;
}
- else if (DECL_NAME (decl) == cp_assignment_operator_id (NOP_EXPR))
+ else if (DECL_NAME (decl) == assign_op_identifier)
{
/* [class.copy]
@@ -14769,9 +14769,11 @@ start_preparsed_function (tree decl1, tree attrs, int flags)
/* Effective C++ rule 15. */
if (warn_ecpp
- && DECL_OVERLOADED_OPERATOR_P (decl1) == NOP_EXPR
+ && DECL_ASSIGNMENT_OPERATOR_P (decl1)
+ && DECL_OVERLOADED_OPERATOR_IS (decl1, NOP_EXPR)
&& VOID_TYPE_P (TREE_TYPE (fntype)))
- warning (OPT_Weffc__, "%<operator=%> should return a reference to %<*this%>");
+ warning (OPT_Weffc__,
+ "%<operator=%> should return a reference to %<*this%>");
/* Make the init_value nonzero so pushdecl knows this is not tentative.
error_mark_node is replaced below (in poplevel) with the BLOCK. */