This is the mail archive of the gcc-cvs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

r241765 - in /trunk: gcc/ChangeLog gcc/c-family...


Author: jason
Date: Wed Nov  2 01:50:29 2016
New Revision: 241765

URL: https://gcc.gnu.org/viewcvs?rev=241765&root=gcc&view=rev
Log:
	Implement P0136R1, Rewording inheriting constructors.

gcc/c-family/
	* c.opt (-fnew-inheriting-ctors): New.
	* c-opts.c: Default to on for ABI 11+.
gcc/cp/
	* call.c (enum rejection_reason_code): Add rr_inherited_ctor.
	(inherited_ctor_rejection): New.
	(add_function_candidate): Reject inherited ctors for copying.
	(enforce_access): Use strip_inheriting_ctors.
	(print_z_candidate): Likewise.  Handle rr_inherited_ctor.
	(convert_like_real): Avoid copying inheriting ctor parameters.
	(build_over_call): Likewise.  A base ctor inheriting from vbase
	has no parms.  Sorry about varargs.
	(joust): A local constructor beats inherited with the same convs.
	* class.c (add_method): Handle hiding inheriting ctors.
	(one_inherited_ctor): Handle new semantics.
	(add_implicitly_declared_members): Pass using_decl down.
	(build_clone): A base ctor inheriting from vbase has no parms.
	* cp-tree.h (DECL_INHERITED_CTOR): Store this instead of the base.
	(SET_DECL_INHERITED_CTOR): Likewise.
	(DECL_INHERITED_CTOR_BASE): Adjust.
	* constexpr.c: Adjust.
	* error.c (dump_function_decl): Decorate inheriting ctors.
	* init.c (emit_mem_initializers): Suppress access control in
	inheriting ctor.
	* mangle.c (write_special_name_constructor): Handle new inheriting
	ctor mangling.
	* method.c (strip_inheriting_ctors, inherited_ctor_binfo)
	(ctor_omit_inherited_parms, binfo_inherited_from): New.
	(synthesized_method_walk): Use binfo_inherited_from.  Suppress
	access control in inheriting ctor.
	(deduce_inheriting_ctor): Deleted if ambiguous ctor inheritance.
	(maybe_explain_implicit_delete): Explain ambigous ctor inheritance.
	(add_one_base_init, do_build_copy_constructor): Adjust.
	(locate_fn_flags, explain_implicit_non_constexpr): Adjust.
	(implicitly_declare_fn): Adjust.
	(get_inherited_ctor): Remove.
	* name-lookup.c (do_class_using_decl): Check for indirect ctor
	inheritance.
	* optimize.c (cdtor_comdat_group): Adjust for new mangling.
	(maybe_clone_body): Handle omitted parms in base clone.
	(maybe_thunk_body): Don't thunk if base clone omits parms.
	* pt.c (tsubst_decl): Adjust.
	(instantiate_template_1): Suppress access control in inheriting
	ctor.
	(fn_type_unification): Do deduction with inherited ctor.
	* tree.c (special_function_p): Adjust.
gcc/
	* tree-inline.c (copy_tree_body_r): Only copy the taken branch of
	a COND_EXPR with constant condition.
libiberty/
	* cp-demangle.c (d_ctor_dtor_name): Handle inheriting constructor.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/inh-ctor11a.C
    trunk/gcc/testsuite/g++.dg/cpp0x/inh-ctor15a.C
    trunk/gcc/testsuite/g++.dg/cpp0x/inh-ctor3a.C
      - copied, changed from r241764, trunk/gcc/testsuite/g++.dg/cpp0x/inh-ctor3.C
    trunk/gcc/testsuite/g++.dg/cpp1z/inh-ctor1.C
    trunk/gcc/testsuite/g++.dg/cpp1z/inh-ctor22.C
    trunk/gcc/testsuite/g++.dg/cpp1z/inh-ctor23.C
    trunk/gcc/testsuite/g++.dg/cpp1z/inh-ctor24.C
    trunk/gcc/testsuite/g++.dg/cpp1z/inh-ctor25.C
    trunk/gcc/testsuite/g++.dg/cpp1z/inh-ctor26.C
    trunk/gcc/testsuite/g++.dg/cpp1z/inh-ctor27.C
    trunk/gcc/testsuite/g++.dg/cpp1z/inh-ctor28.C
    trunk/gcc/testsuite/g++.dg/cpp1z/inh-ctor29.C
    trunk/gcc/testsuite/g++.dg/cpp1z/inh-ctor30.C
    trunk/gcc/testsuite/g++.dg/cpp1z/inh-ctor31.C
    trunk/gcc/testsuite/g++.dg/cpp1z/inh-ctor32.C
    trunk/gcc/testsuite/g++.dg/cpp1z/inh-ctor33.C
    trunk/gcc/testsuite/g++.dg/cpp1z/inh-ctor34.C
    trunk/gcc/testsuite/g++.dg/cpp1z/inh-ctor35.C
    trunk/gcc/testsuite/g++.dg/cpp1z/inh-ctor35a.C
    trunk/gcc/testsuite/g++.dg/cpp1z/using1.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c-opts.c
    trunk/gcc/c-family/c.opt
    trunk/gcc/common.opt
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/call.c
    trunk/gcc/cp/class.c
    trunk/gcc/cp/constexpr.c
    trunk/gcc/cp/cp-tree.h
    trunk/gcc/cp/error.c
    trunk/gcc/cp/init.c
    trunk/gcc/cp/mangle.c
    trunk/gcc/cp/method.c
    trunk/gcc/cp/name-lookup.c
    trunk/gcc/cp/optimize.c
    trunk/gcc/cp/pt.c
    trunk/gcc/cp/tree.c
    trunk/gcc/doc/invoke.texi
    trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-inhctor1.C
    trunk/gcc/testsuite/g++.dg/cpp0x/inh-ctor11.C
    trunk/gcc/testsuite/g++.dg/cpp0x/inh-ctor15.C
    trunk/gcc/testsuite/g++.dg/cpp0x/inh-ctor3.C
    trunk/gcc/testsuite/g++.dg/cpp0x/inh-ctor5.C
    trunk/gcc/testsuite/g++.dg/cpp0x/inh-ctor9.C
    trunk/gcc/tree-inline.c
    trunk/libiberty/ChangeLog
    trunk/libiberty/cp-demangle.c
    trunk/libiberty/testsuite/demangle-expected


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]