aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/init.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2017-06-26 16:38:40 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2017-06-26 16:38:40 +0000
commitd6ef53f2413b5fde30a6d9516c4ebf087e6a4363 (patch)
treef5118cecea9bdf4e8f1e7e2cf9925022e8215fa4 /gcc/cp/init.c
parent0ffdc300784ca80b28639f6d276b48a3dc6138b1 (diff)
downloadgcc-d6ef53f2413b5fde30a6d9516c4ebf087e6a4363.zip
gcc-d6ef53f2413b5fde30a6d9516c4ebf087e6a4363.tar.gz
gcc-d6ef53f2413b5fde30a6d9516c4ebf087e6a4363.tar.bz2
cp-tree.h (lang_decl_fn): Remove assignment_operator_p field.
gcc/cp/ * cp-tree.h (lang_decl_fn): Remove assignment_operator_p field. (DECL_COMPLETE_CONSTRUCTOR_P): Directly compare identifier. (DECL_BASE_CONSTRUCTOR_P, DECL_COMPLETE_DESTRUCTOR_P) DECL_BASE_DESTRUCTOR_P, DECL_DELETING_DESTRUCTOR_P): Likewise. (DECL_ASSIGNMENT_OPERATOR_P): Use IDENTIFIER_ASSIGN_OP_P. * decl.c (grok_op_properties): Adjust identifier checking. * init.c (expand_default_init): Adjust identifier descision. * method.c (implicitly_declare_fn): Don't use DECL_ASSIGNMENT_OPERATOR_P. * search.c (lookup_fnfields_1): Use IDENTIFIER_CTOR_P, IDENTIFIER_DTOR_P. * call.c (in_charge_arg_for_name): Reimplement. (build_special_member_call): Use IDENTIFIER_CDTOR_P, IDENTIFIER_DTOR_P. libcc1/ * libcp1plugin.cc (plugin_build_decl): Don't set DECL_ASSIGNMENT_OPERATOR_P. (--This line, and those below, will be ignored-- M gcc/cp/init.c M gcc/cp/decl.c M gcc/cp/method.c M gcc/cp/cp-tree.h M gcc/cp/call.c M gcc/cp/search.c M gcc/cp/ChangeLog M libcc1/ChangeLog M libcc1/libcp1plugin.cc From-SVN: r249657
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r--gcc/cp/init.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index 90abd23..b6f6b4f 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -1718,7 +1718,6 @@ expand_default_init (tree binfo, tree true_exp, tree exp, tree init, int flags,
tsubst_flags_t complain)
{
tree type = TREE_TYPE (exp);
- tree ctor_name;
/* It fails because there may not be a constructor which takes
its own type as the first (or only parameter), but which does
@@ -1846,10 +1845,9 @@ expand_default_init (tree binfo, tree true_exp, tree exp, tree init, int flags,
}
else
{
- if (true_exp == exp)
- ctor_name = complete_ctor_identifier;
- else
- ctor_name = base_ctor_identifier;
+ tree ctor_name = (true_exp == exp
+ ? complete_ctor_identifier : base_ctor_identifier);
+
rval = build_special_member_call (exp, ctor_name, &parms, binfo, flags,
complain);
}