gcc/gcc/cp
Jason Merrill ac1774315c Machinery to support implicit delete/move.
* cp-tree.h: (struct lang_type_class): Add lazy_move_assign,
	has_complex_move_ctor, has_complex_move_assign bitfields.
	(CLASSTYPE_LAZY_MOVE_ASSIGN): New.
	(TYPE_HAS_COMPLEX_MOVE_ASSIGN): New.
	(TYPE_HAS_COMPLEX_MOVE_CTOR): New.
	(enum special_function_kind): Add sfk_move_assignment.
	(LOOKUP_SPECULATIVE): New.
	* call.c (build_over_call): Return early if it's set.
	(build_over_call): Use trivial_fn_p.
	* class.c (check_bases): If the base has no default constructor,
	the derived one is non-trivial.  Handle move ctor/op=.
	(check_field_decl): Likewise.
	(check_bases_and_members): Handle move ctor/op=.
	(add_implicitly_declared_members): Handle CLASSTYPE_LAZY_MOVE_ASSIGN.
	(type_has_move_constructor, type_has_move_assign): New.
	* decl.c (grok_special_member_properties): Handle move ctor/op=.
	* method.c (type_has_trivial_fn, type_set_nontrivial_flag): New.
	(trivial_fn_p): New.
	(do_build_copy_constructor): Use it.
	(do_build_assign_ref): Likewise.  Handle move assignment.
	(build_stub_type, build_stub_object, locate_fn_flags): New.
	(locate_ctor): Use locate_fn_flags.
	(locate_copy, locate_dtor): Remove.
	(get_dtor, get_default_ctor, get_copy_ctor, get_copy_assign): New.
	(process_subob_fn, synthesized_method_walk): New.
	(maybe_explain_implicit_delete): New.
	(implicitly_declare_fn): Use synthesized_method_walk,
	type_has_trivial_fn, and type_set_nontrivial_flag.
	(defaulted_late_check): Set DECL_DELETED_FN.
	(defaultable_fn_check): Handle sfk_move_assignment.
	(lazily_declare_fn): Clear CLASSTYPE_LAZY_* early.  Don't declare
	implicitly deleted move ctor/op=.
	* search.c (lookup_fnfields_1): Handle sfk_move_assignment.
	(lookup_fnfields_slot): New.
	* semantics.c (omp_clause_info_fndecl): Remove.
	(cxx_omp_create_clause_info): Use get_default_ctor, get_copy_ctor,
	get_copy_assign, trivial_fn_p.
	(trait_expr_value): Adjust call to locate_ctor.
	* tree.c (special_function_p): Handle sfk_move_assignment.

From-SVN: r161579
2010-06-29 20:50:57 -04:00
..
ChangeLog Machinery to support implicit delete/move. 2010-06-29 20:50:57 -04:00
ChangeLog-1993
ChangeLog-1994
ChangeLog-1995
ChangeLog-1996
ChangeLog-1997
ChangeLog-1998
ChangeLog-1999
ChangeLog-2000
ChangeLog-2001
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004 re PR other/42537 ([PATCH] misc spelling fixes) 2009-12-30 10:53:31 +00:00
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009 Move 2009 ChangeLog to ChangeLog-2009. 2010-01-01 09:08:32 -08:00
ChangeLog.ptr
ChangeLog.tree-ssa
Make-lang.in system.h: Poison GCC_EXCEPT_H for front-end files. 2010-06-28 10:52:46 +00:00
NEWS
call.c Machinery to support implicit delete/move. 2010-06-29 20:50:57 -04:00
cfns.gperf
cfns.h
class.c Machinery to support implicit delete/move. 2010-06-29 20:50:57 -04:00
config-lang.in c-common.c: Move to c-family/. 2010-06-05 20:33:22 +00:00
cp-gimplify.c call.c (build_call_n): Call XALLOCAVEC instead of alloca. 2010-06-09 15:16:54 +00:00
cp-lang.c system.h: Poison GCC_EXCEPT_H for front-end files. 2010-06-28 10:52:46 +00:00
cp-objcp-common.c utils.c (init_gnat_to_gnu): Use typed GC allocation. 2010-06-08 07:25:24 +00:00
cp-objcp-common.h system.h: Poison GCC_EXCEPT_H for front-end files. 2010-06-28 10:52:46 +00:00
cp-tree.def Implement noexcept operator (5.3.7) 2010-06-04 17:21:13 -04:00
cp-tree.h Machinery to support implicit delete/move. 2010-06-29 20:50:57 -04:00
cvt.c cp-tree.h (expr_list_kind): New type. 2010-06-11 03:54:28 +00:00
cxx-pretty-print.c cxx-pretty-print.c (pp_cxx_unary_expression): Handle NOEXCEPT_EXPR. 2010-06-04 17:42:41 -04:00
cxx-pretty-print.h c-common.c: Move to c-family/. 2010-06-05 20:33:22 +00:00
decl.c Machinery to support implicit delete/move. 2010-06-29 20:50:57 -04:00
decl.h re PR c++/32056 (Storage classes on template parameters) 2009-11-16 08:31:26 +00:00
decl2.c system.h: Poison GCC_EXCEPT_H for front-end files. 2010-06-28 10:52:46 +00:00
dump.c
error.c re PR c++/44627 (ICE in dump_expr, at cp/error.c:1735) 2010-06-22 22:42:50 +02:00
except.c system.h: Poison GCC_EXCEPT_H for front-end files. 2010-06-28 10:52:46 +00:00
expr.c system.h: Poison GCC_EXCEPT_H for front-end files. 2010-06-28 10:52:46 +00:00
friend.c Makefile.in (EXCEPT_H): Fix typo. 2010-05-25 18:14:23 +00:00
g++spec.c darwin-driver.c (darwin_default_min_version): Use 2010-06-04 19:52:50 +01:00
init.c cp-tree.h (TYPE_HAS_ASSIGN_REF): Rename to TYPE_HAS_COPY_ASSIGN. 2010-06-29 20:50:34 -04:00
lang-specs.h gcc.c (translate_options): Don't mention +e in comment. 2010-06-25 01:26:24 +01:00
lex.c utils.c (init_gnat_to_gnu): Use typed GC allocation. 2010-06-08 07:25:24 +00:00
mangle.c re PR bootstrap/44287 (Failed to bootstrap) 2010-05-27 10:13:58 +02:00
method.c Machinery to support implicit delete/move. 2010-06-29 20:50:57 -04:00
name-lookup.c class.c (type_has_virtual_destructor): New. 2010-06-29 20:50:45 -04:00
name-lookup.h c-common.c: Move to c-family/. 2010-06-05 20:33:22 +00:00
operators.def
optimize.c diagnostic-core.h: New. 2010-05-27 21:16:07 +01:00
parser.c c-parser.c (c_parser_conditional_expression): Call warn_for_omitted_condop. 2010-06-24 12:47:30 +00:00
pt.c cp-tree.h (TYPE_HAS_ASSIGN_REF): Rename to TYPE_HAS_COPY_ASSIGN. 2010-06-29 20:50:34 -04:00
ptree.c cp-tree.h (TYPE_HAS_ASSIGN_REF): Rename to TYPE_HAS_COPY_ASSIGN. 2010-06-29 20:50:34 -04:00
repo.c diagnostic-core.h: New. 2010-05-27 21:16:07 +01:00
rtti.c call.c (build_java_interface_fn_ref): Call build_function_type_list instead of build_function_type. 2010-06-09 15:18:40 +00:00
search.c Machinery to support implicit delete/move. 2010-06-29 20:50:57 -04:00
semantics.c Machinery to support implicit delete/move. 2010-06-29 20:50:57 -04:00
tree.c Machinery to support implicit delete/move. 2010-06-29 20:50:57 -04:00
typeck.c * typeck.c (comp_except_specs): Fix ce_derived with noexcept. 2010-06-22 00:36:55 -04:00
typeck2.c cp-tree.h (TYPE_HAS_ASSIGN_REF): Rename to TYPE_HAS_COPY_ASSIGN. 2010-06-29 20:50:34 -04:00