2013-12-23  Jason Merrill  <jason@redhat.com>

	PR c++/59271
	* lambda.c (build_capture_proxy): Use build_cplus_array_type.

	PR c++/59349
	* parser.c (cp_parser_lambda_introducer): Handle empty init.

2013-12-23  Stuart Hastings <stuart@apple.com>
	    Bill Maddox  <maddox@google.com>
	    Jason Merrill  <jason@redhat.com>

	PR c++/41090
	* optimize.c (can_alias_cdtor, populate_clone_array): Split out
	from maybe_clone_body.
	(maybe_thunk_body): New function.
	(maybe_clone_body): Call it.
	* mangle.c (write_mangled_name): Remove code to suppress
	writing of mangled name for cloned constructor or destructor.
	(write_special_name_constructor): Handle decloned constructor.
	(write_special_name_destructor): Handle decloned destructor.
	* method.c (trivial_fn_p): Handle decloning.
	* semantics.c (expand_or_defer_fn_1): Clone after setting linkage.

2013-12-23  Marek Polacek  <polacek@redhat.com>

	PR c++/59111
	* search.c (lookup_conversions): Return NULL_TREE if !CLASS_TYPE_P.

2013-12-20  Trevor saunders  <tsaunders@mozilla.com>

	* semantics.c (build_anon_member_initialization): Replace
	stack_vec<T, N> with auto_vec<T, N>.

2013-12-18  Balaji V. Iyer  <balaji.v.iyer@intel.com>

	* parser.c (cp_parser_cilk_simd_clause_name): Changed cilk_clause_name
	to omp_clause_name.

2013-12-17  Thomas Schwinge  <thomas@codesourcery.com>

	* parser.c (cp_parser_omp_parallel): Fix description.

2013-12-12  Jason Merrill  <jason@redhat.com>

	PR c++/58954
	* pt.c (resolve_overloaded_unification): Use instantiate_template.

2013-12-12  Jakub Jelinek  <jakub@redhat.com>

	PR c++/58627
	* class.c (resolve_address_of_overloaded_function): Don't call ggc_free
	on targs.

2013-12-11  Balaji V. Iyer  <balaji.v.iyer@intel.com>

	* cp-tree.h (cilk_valid_spawn): New prototype.
	(gimplify_cilk_spawn): Likewise.
	(create_try_catch_expr): Likewise.
	* decl.c (finish_function): Insert Cilk function-calls when a
	_Cilk_spawn is used in a function.
	* parser.c (cp_parser_postfix_expression): Added RID_CILK_SPAWN and
	RID_CILK_SYNC cases.
	* cp-cilkplus.c (set_cilk_except_flag): New function.
	(set_cilk_except_data): Likewise.
	(cilk_install_body_with_frame_cleanup): Likewise.
	* except.c (create_try_catch_expr): Likewise.
	* parser.h (IN_CILK_SPAWN): New #define.
	* pt.c (tsubst_expr): Added CILK_SPAWN_STMT and CILK_SYNC_STMT cases.
	* semantics.c (potential_constant_expression_1): Likewise.
	* typeck.c (cp_build_compound_expr): Reject a spawned function in a
	compound expression.
	(check_return_expr): Reject a spawned function in a return expression.
	* cp-gimplify.c (cp_gimplify_expr): Added a CILK_SPAWN_STMT and
	CALL_EXPR case.  Added handling of spawned function in MODIFY_EXPR
	and INIT_EXPR.

2013-12-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/59435
	* parser.c (cp_parser_cache_defarg): sizeof ... ( p ) can
	occur in a default argument too.

2013-12-06  Caroline Tice  <cmtice@google.com>

	Submitting patch from Stephen Checkoway, s@cs.jhu.edu
	* vtable-class-hierarchy.c (init_functions): Make the libvtv
	function decls externally visible.

2013-12-06  Oleg Endo  <olegendo@gcc.gnu.org>

	* decl2.c: Remove struct tags when referring to class varpool_node.

2013-12-05  Jason Merrill  <jason@redhat.com>

	PR c++/59044
	PR c++/59052
	* pt.c (most_specialized_class): Use the partially instantiated
	template for deduction.  Drop the TMPL parameter.

2013-12-05  Paolo Carlini  <paolo.carlini@oracle.com>

	* decl.c (duplicate_decls): Replace pairs of errors and permerrors
	with error + inform (permerror + inform, respectively).

2013-12-04  Joseph Myers  <joseph@codesourcery.com>

	PR c/52023
	* typeck.c (cxx_sizeof_or_alignof_type): Update call to
	c_sizeof_or_alignof_type.

2013-12-04  Jakub Jelinek  <jakub@redhat.com>

	PR c++/59268
	* pt.c (tsubst_copy_and_build): Handle POINTER_PLUS_EXPR.

2013-11-29  Marek Polacek  <polacek@redhat.com>

	PR sanitizer/59331
	* decl.c (compute_array_index_type): Don't build COMPOUND_EXPR for
	instrumentation.

2013-11-28  Jakub Jelinek  <jakub@redhat.com>

	PR c++/59297
	* semantics.c (finish_omp_atomic): Call finish_expr_stmt
	rather than add_stmt.

2013-11-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* g++spec.c (TIMELIB): Define.
	(WITHLIBC, SKIPOPT): Adjust values.
	(lang_specific_driver): Add TIME_LIBRARY if not passed explicitly.

2013-11-28  Jakub Jelinek  <jakub@redhat.com>

	PR c/59310
	* parser.c (cp_parser_omp_target): Call keep_next_level only
	if flag_openmp.

2013-11-27  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58647
	* semantics.c (cxx_eval_constant_expression, [COMPONENT_REF]):
	Handle function COMPONENT_REFs.

2013-11-27  Aldy Hernandez  <aldyh@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>

	* semantics.c (finish_omp_clauses): For #pragma omp declare simd
	linear clause step call maybe_constant_value.

2013-11-27  Tom de Vries  <tom@codesourcery.com>
	    Marc Glisse  <marc.glisse@inria.fr>

	PR c++/59032
	* typeck.c (cp_build_unary_op): Allow vector increment and decrement.

2013-11-27  Tom de Vries  <tom@codesourcery.com>
	    Marc Glisse  <marc.glisse@inria.fr>

	PR middle-end/59037
	* semantics.c (cxx_fold_indirect_ref): Don't create out-of-bounds
	BIT_FIELD_REF.

2013-11-26  Jakub Jelinek  <jakub@redhat.com>

	PR c++/58874
	* parser.c (cp_parser_late_parsing_for_member): For OpenMP UDRs
	pass 2 instead of 0 to finish_function.

2013-11-26  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58700
	* decl.c (grokdeclarator): Don't try to pass declarator->id_loc
	to build_lang_decl_loc when declarator is null.

2013-11-26  Paolo Carlini  <paolo.carlini@oracle.com>

	* cvt.c (cp_convert_and_check): Avoid calling cp_convert
	unnecessarily.

2013-11-25  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/54485
	* decl.c (duplicate_decls): Enforce 8.3.6/6 about default arguments
	for member functions of class templates.

2013-11-25  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58607
	* semantics.c (check_constexpr_ctor_body): Check for BIND_EXPR_VARS.

2013-11-25  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58810
	* decl.c (grokdeclarator): Don't handle qualified free functions here,
	leave the diagnostic to grokfndecl.

2013-11-25  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/59080
	* pt.c (unify): Don't call unify_array_domain with a NULL_TREE
	third argument.

	PR c++/59096
	* pt.c (apply_late_template_attributes): Check that TREE_VALUE
	isn't NULL_TREE in the attribute_takes_identifier_p case.

2013-11-25  Adam Butcher  <adam@jessamine.co.uk>

	PR c++/59112
	PR c++/59113
	* parser.c (cp_parser_parameter_declaration_clause): Disallow implicit
	function templates in local functions unless defining a lambda.

2013-11-23  Easwaran Raman  <eraman@google.com>

	PR c++/59031
	* call.c (build_new_method_call_1): Comnpare function context
	with BASELINK_BINFO type rather than instance type before
	marking the call with LOOKUP_NONVIRTUAL.

2013-11-23  Jason Merrill  <jason@redhat.com>

	PR c++/58868
	* init.c (build_aggr_init): Don't clobber the type of init
	if we got an INIT_EXPR back from build_vec_init.
	(build_vec_init): Do digest_init on trivial initialization.

2013-11-23  Alexander Ivchenko  <alexander.ivchenko@intel.com>

	PR c++/58525
	* call.c (build_operator_new_call): Add flag_exceptions check.
	* decl.c (compute_array_index_type): Ditto.
	* init.c (build_new_1): Ditto.
	(build_vec_init): Ditto.

2013-11-22  Jakub Jelinek  <jakub@redhat.com>

	* cp-gimplify.c: Include target.h and c-family/c-ubsan.h.
	(cp_ubsan_maybe_instrument_return): New function.
	(cp_genericize): Call it if -fsanitize=return.

	* decl2.c: Include asan.h.
	(one_static_initialization_or_destruction): If -fsanitize=address,
	init is non-NULL and guard is NULL, set
	vnode->dynamically_initialized.
	(do_static_initialization_or_destruction): Call
	__asan_{before,after}_dynamic_init around the static initialization.

2013-11-22  Andrew MacLeod  <amacleod@redhat.com>

	* class.c: Add required include files from gimple.h.
	* cp-gimplify.c: Likewise
	* decl2.c: Likewise
	* init.c: Likewise
	* optimize.c: Likewise
	* pt.c: Likewise
	* semantics.c: Likewise
	* tree.c: Likewise
	* typeck.c: Likewise
	* vtable-class-hierarchy.c: Likewise

2013-11-22  David Malcolm  <dmalcolm@redhat.com>

	* call.c (build_integral_nontype_arg_conv): Remove use of
	EXPR_LOC_OR_HERE macro.
	(convert_like_real): Likewise.
	(convert_arg_to_ellipsis): Likewise.
	(build_cxx_call): Likewise.
	(perform_implicit_conversion_flags): Likewise.
	(initialize_reference): Likewise.
	* cvt.c (cp_convert_to_pointer): Likewise.
	(convert_to_reference): Likewise.
	(ocp_convert): Likewise.
	(convert_to_void): Likewise.
	* decl.c (pop_label): Update comment.
	(pop_switch): Remove use of EXPR_LOC_OR_HERE macro.
	(check_tag_decl): Remove use of in_system_header macro.
	(make_rtl_for_nonlocal_decl): Remove use of input_filename
	macro.
	(compute_array_index_type): Remove use of in_system_header
	macro.
	(grokdeclarator): Likewise.
	* error.c (dump_global_iord): Remove use of input_filename
	macro.
	(location_of): Remove use of EXPR_LOC_OR_HERE macro.
	(maybe_warn_cpp0x): Remove use of in_system_header macro.
	* init.c (build_new_1): Remove use of EXPR_LOC_OR_HERE macro.
	* lex.c (handle_pragma_interface): Remove use of input_filename
	macro.
	(handle_pragma_implementation): Likewise.
	(cxx_make_type): Likewise.
	(in_main_input_context): Likewise.
	* name-lookup.c (push_binding_level): Remove use of
	input_line macro.
	(leave_scope): Likewise.
	(resume_scope): Likewise.
	* parser.c (cp_parser_unqualified_id): Remove use of
	in_system_header macro.
	(cp_parser_cast_expression): Likewise.
	(cp_parser_declaration_seq_opt): Likewise.
	(cp_parser_enumerator_list): Likewise.
	(cp_parser_parameter_declaration_clause): Likewise.
	(cp_parser_exception_specification_opt): Likewise.
	* pt.c (unify_arg_conversion): Remove use of EXPR_LOC_OR_HERE
	macro.
	(convert_nontype_argument): Likewise.
	(push_tinst_level): Remove use of in_system_header macro.
	(tsubst_copy_and_build): Remove use of EXPR_LOC_OR_HERE
	macros.
	(do_decl_instantiation): Remove use of in_system_header macro.
	(do_type_instantiation): Likewise.
	* semantics.c (finish_call_expr): Remove use of EXPR_LOC_OR_HERE
	macro.
	(begin_class_definition): Remove use of input_filename macro.
	(cxx_eval_call_expression): Remove use of EXPR_LOC_OR_HERE
	macro.
	(cxx_eval_constant_expression): Likewise.
	(potential_constant_expression_1): Likewise.
	* typeck.c (decay_conversion): Likewise.
	(rationalize_conditional_expr): Likewise.
	(build_x_compound_expr_from_list): Likewise.
	(convert_for_assignment): Likewise.
	* typeck2.c (check_narrowing): Likewise.

2013-11-22  Trevor Saunders  <tsaunders@mozilla.com>

	* parser.c, semantics.c: Change some local variables from vec to
	auto_vec or stack_vec.

2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>

	* decl.c (reshape_init_array_1): Use tree_to_uhwi rather than
	tree_low_cst.
	(grokdeclarator): Update comment to refer to tree_to_[su]hwi rather
	than tree_low_cst.

2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>

	* call.c, class.c, decl.c, error.c: Replace tree_low_cst (..., 1) with
	tree_to_uhwi throughout.

2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>

	* class.c, dump.c, error.c, init.c, method.c, parser.c, semantics.c:
	Replace tree_low_cst (..., 0) with tree_to_shwi throughout.

2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>

	* decl.c: Replace host_integerp (..., 1) with tree_fits_uhwi_p
	throughout.

2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>

	* error.c, init.c, parser.c, semantics.c: Replace
	host_integerp (..., 0) with tree_fits_shwi_p throughout.

2013-11-17  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/59123
	* decl.c (validate_constexpr_redeclaration): Redeclarations of
	variables can differ in constexpr.

2013-11-16  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/29143
	* semantics.c (finish_call_expr): Ensure that for OVERLOADs too
	'(&f)(...)' is the same as '(f)(...)', per 13.3.1.1.

2013-11-15  Aldy Hernandez  <aldyh@redhat.com>

	* Make-lang.in (CXX_AND_OBJCXX_OBJS): Depend on cp/cp-cilkplus.o.
	* cp-cilkplus.c: New file.
	* cp-tree.h (cpp_validate_cilk_plus_loop): Protoize.
	* parser.c (cp_parser_cilk_simd): New.
	(cp_debug_parser): Add case for IN_CILK_SIMD_FOR.
	(cp_parser_jump_statement): Same.
	(cp_parser_omp_for_cond): Add new argument.
	Add case for NE_EXPR.
	(cp_parser_omp_for_loop): Pass new argument to
	cp_parser_omp_for_cond.
	Handle CILK_SIMD nodes.
	Abstract initilization code to..
	(cp_parser_omp_for_loop_init): ...here.
	(cp_parser_pragma): Add case for PRAGMA_CILK_SIMD.
	(cp_parser_cilk_simd_vectorlength): New.
	(cp_parser_cilk_simd_linear): New.
	(cp_parser_cilk_simd_clause_name): New.
	(cp_parser_cilk_simd_all_clauses): New.
	(cp_parser_cilk_simd): New.
	* parser.h (IN_CILK_SIMD_FOR): New macro.
	* pt.c (tsubst_expr): Add case for CILK_SIMD.
	* typeck2.c (cxx_readonly_error): Pass location argument to
	readonly_error.

2013-11-14  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57887
	* parser.c (cp_parser_late_parsing_nsdmi): Call
	maybe_begin_member_template_processing.
	* pt.c (maybe_begin_member_template_processing): Handle NSDMIs.
	(inline_needs_template_parms): Adjust.

2013-11-14  Andrew MacLeod  <amacleod@redhat.com>

	* class.c: Include only gimplify.h and gimple.h as needed.
	* cp-gimplify.c: Likewise.
	* error.c: Likewise.
	* init.c: Likewise.
	* optimize.c: Likewise.
	* pt.c: Likewise.
	* semantics.c: Likewise.
	* tree.c: Likewise.
	* vtable-class-hierarchy.c: Likewise.

2013-11-14  Diego Novillo  <dnovillo@google.com>

	* call.c: Include stor-layout.h.
	Include trans-mem.h.
	Include stringpool.h.
	* class.c: Include stringpool.h.
	Include stor-layout.h.
	Include attribs.h.
	* cp-gimplify.c: Include stor-layout.h.
	* cvt.c: Include stor-layout.h.
	* decl.c: Include stringpool.h.
	Include stor-layout.h.
	Include varasm.h.
	Include attribs.h.
	Include calls.h.
	* decl2.c: Include stringpool.h.
	Include varasm.h.
	Include attribs.h.
	Include stor-layout.h.
	Include calls.h.
	* error.c: Include stringpool.h.
	* except.c: Include stringpool.h.
	Include trans-mem.h.
	Include attribs.h.
	* init.c: Include stringpool.h.
	Include varasm.h.
	* lambda.c: Include stringpool.h.
	* lex.c: Include stringpool.h.
	* mangle.c: Include stor-layout.h.
	Include stringpool.h.
	* method.c: Include stringpool.h.
	Include varasm.h.
	* name-lookup.c: Include stringpool.h.
	Include print-tree.h.
	Include attribs.h.
	* optimize.c: Include stringpool.h.
	* parser.c: Include print-tree.h.
	Include stringpool.h.
	Include attribs.h.
	Include trans-mem.h.
	* pt.c: Include stringpool.h.
	Include varasm.h.
	Include attribs.h.
	Include stor-layout.h.
	* ptree.c: Include print-tree.h.
	* repo.c: Include stringpool.h.
	* rtti.c: Include stringpool.h.
	Include stor-layout.h.
	* semantics.c: Include stmt.h.
	Include varasm.h.
	Include stor-layout.h.
	Include stringpool.h.
	* tree.c: Include stor-layout.h.
	Include print-tree.h.
	Include tree-iterator.h.
	* typeck.c: Include stor-layout.h.
	Include varasm.h.
	* typeck2.c: Include stor-layout.h.
	Include varasm.h.
	* vtable-class-hierarchy.c: Include stringpool.h.
	Include stor-layout.h.

2013-11-12  Andrew MacLeod <amacleod@redhat.com>

	* class.c: Include gimplify.h.
	* cp-gimplify.c: Likewise.
	* error.c: Likewise.
	* init.c: Likewise.
	* optimize.c: Likewise.
	* pt.c: Likewise.
	* semantics.c: Likewise.
	* tree.c: Likewise.
	* vtable-class-hierarchy.c: Likewise.
	* decl2.c: Don't include gimple.h.
	* except.c: Likewise.
	* method.c: Include pointer-set.h instead of gimple.h.

2013-11-12  Adam Butcher  <adam@jessamine.co.uk>

	* pt.c (convert_generic_types_to_packs): New function to transform
	a range of implicitly introduced non-pack template parms to be parameter
	packs.
	* cp-tree.h (convert_generic_types_to_packs): Declare.
	* parser.c (cp_parser_parameter_declaration_list): If a function
	parameter pack contains generic types, convert them to packs prior to
	grokdeclarator.

2013-11-12  Adam Butcher  <adam@jessamine.co.uk>

	PR c++/58534
	PR c++/58536
	PR c++/58548
	PR c++/58549
	PR c++/58637
	* parser.h (struct cp_parser): New members implicit_template_parms,
	implicit_template_scope and auto_is_implicit_function_template_parm_p.
	* parser.c (add_implicit_template_parms): Refactor as ...
	(synthesize_implicit_template_parm): ... this to append a new template
	type parm to the current template parameter list (introducing a new list
	if necessary).  Removed push_deferring_access_checks.
	(finish_fully_implicit_template): Removed pop_deferring_access_checks.
	(cp_parser_new): Initialize new cp_parser members.
	(cp_parser_parameter_declaration_clause): Consider auto as implicit
	template parm when parsing a parameter declaration (unless parsing an
	explicit specialization).
	(cp_parser_parameter_declaration_list): Remove local
	implicit_template_parms counter and reset cp_parser implicit template
	state when complete.
	(cp_parser_lambda_expression): Reset implicit template cp_parser members
	whilst generating lambda class.
	(cp_parser_function_definition_after_declarator): Reset implicit
	template cp_parser members whilst parsing function definition.
	(make_generic_type_name): Respell '<autoN>' as 'auto:N' which works
	better with template diagnostics.
	(cp_parser_simple_type_specifier): Synthesize implicit template parm on
	parsing 'auto' if auto_is_implicit_function_template_parm_p and provide
	diagnostics ...
	* decl.c (grokdeclarator): ... that were previously done here.

2013-11-12  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57734
	* pt.c (lookup_template_class_1): Handle alias template declarations
	of enumeration types.

2013-11-10  Paolo Carlini  <paolo.carlini@oracle.com>

	* cvt.c (cp_convert_to_pointer): Call build_ptrmemfunc before
	maybe_warn_zero_as_null_pointer_constant to avoid duplicate
	-Wzero-as-null-pointer-constant diagnostics.

	* typeck.c (build_ptrmemfunc): Use cp_build_c_cast.

2013-11-06  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/11006
	* init.c (build_new_1): Don't call build_java_class_ref on non-class
	types.

2013-11-05  Jason Merrill  <jason@redhat.com>

	PR c++/58868
	* decl.c (check_initializer): Don't use build_vec_init for arrays
	of trivial type.

2013-11-05  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58724
	* name-lookup.c (handle_namespace_attrs): Use get_attribute_name.

2013-11-05  Tobias Burnus  <burnus@net-b.de>

	* parser.c (cp_parser_omp_for, cp_parser_omp_parallel,
	cp_parser_omp_distribute, cp_parser_omp_teams, cp_parser_omp_target,
	cp_parser_omp_declare): Handle -fopenmp-simd.

2013-11-04  Eric Botcazou  <ebotcazou@adacore.com>

	* decl2.c (cpp_check): Change type of first parameter and deal with
	IS_TRIVIAL.

2013-11-03  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/38313
	* parser.c (cp_parser_constructor_declarator_p): Check that the
	class-name matches current_class_type.

2013-11-03  Marek Polacek  <polacek@redhat.com>

	* decl.c (cp_finish_decl): Move C++1y bounds checking...
	(compute_array_index_type): ...here.  Add VLA instrumentation.
	Call stabilize_vla_size.
	(grokdeclarator): Don't call stabilize_vla_size here.

2013-11-02  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/29234
	PR c++/56037
	* parser.c (cp_parser_cast_expression): If we aren't looking at
	a cast-expression don't call cp_parser_type_id.
	(cp_parser_postfix_expression): Likewise for compound-literal.
	(cp_parser_tokens_start_cast_expression): Adjust.

2013-11-01  Edward Smith-Rowland  <3dw4rd@verizon.net>

	PR c++/58708
	* parser.c (make_string_pack): Discover non-const type and size
	of character and build parm pack with correct type and chars.

2013-11-01  Trevor Saunders  <tsaunders@mozilla.com>

	* semantics.c (build_anon_member_initialization): Convert fields to be
        a stack_vec.

2013-11-01  Marc Glisse  <marc.glisse@inria.fr>

	PR c++/58834
	* pt.c (type_dependent_expression_p): Handle null argument.

2013-11-01  Jakub Jelinek  <jakub@redhat.com>

	* semantics.c (finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
	check_dup_generic at the end, unless remove is true.
	(finish_omp_clauses) <case OMP_CLAUSE_LINEAR>: Add break; after
	remove = true;.

2013-10-31  Jakub Jelinek  <jakub@redhat.com>

	* semantics.c (finish_omp_clauses): Diagnose aligned clause
	with decl that is not pointer nor array nor reference to those.

2013-10-31  Jason Merrill  <jason@redhat.com>

	* semantics.c (cxx_eval_call_expression): Handle trivial
	value-initialization.
	* typeck2.c (store_init_value): Call maybe_constant_init after
	cxx_constant_value.

	* decl.c (cxx_maybe_build_cleanup): Always set LOOKUP_NONVIRTUAL.
	* decl2.c (build_cleanup): Just call cxx_maybe_build_cleanup.

	PR c++/58162
	* parser.c (cp_parser_late_parse_one_default_arg): Set
	TARGET_EXPR_DIRECT_INIT_P.

	* class.c (type_build_ctor_call): Return early in C++98 mode.
	(type_build_dtor_call): Likewise.

2013-10-31  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58932
	Revert:
	2013-10-18  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58466
	* pt.c (most_specialized_class): Bump processing_template_decl for
	get_class_bindings.

2013-10-30  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58581
	* call.c (build_over_call): Check return value of mark_used.

2013-10-30  Jason Merrill  <jason@redhat.com>

	* semantics.c (finish_compound_literal): Don't create a static variable
	inside cp_unevaluated_operand.

	* init.c (push_base_cleanups): Check ANON_AGGR_TYPE_P.

2013-10-30  Tobias Burnus  <burnus@net-b.de>

	PR other/33426
	* cp-tree.h (RANGE_FOR_IVDEP): Define.
	(cp_convert_range_for, finish_while_stmt_cond, finish_do_stmt,
	finish_for_cond): Take 'bool ivdep' parameter.
	* cp-array-notation.c (create_an_loop): Update call.
	* init.c (build_vec_init): Ditto.
	* pt.c (tsubst_expr): Ditto.
	* parser.c (cp_parser_iteration_statement, cp_parser_for,
	cp_parser_range_for, cp_convert_range_for): Update calls.
	(cp_parser_pragma): Accept GCC ivdep for 'while' and 'do'.
	* semantics.c (finish_while_stmt_cond, finish_do_stmt,
	finish_for_cond): Optionally build ivdep annotation.

2013-10-30  Jason Merrill  <jason@redhat.com>

	* decl.c (cp_finish_decl): Never throw for VLA bound == 0.

2013-10-29  David Malcolm  <dmalcolm@redhat.com>

	Patch autogenerated by refactor_symtab.py from
	https://github.com/davidmalcolm/gcc-refactoring-scripts
	revision 58bb219cc090b2f4516a9297d868c245495ee622

	* call.c (mark_versions_used): Update for conversion of symtab types
	to a true class hierarchy.
	* decl2.c (cp_write_global_declarations): Likewise.
	(clear_decl_external): Likewise.
	(build_java_method_aliases): Likewise.
	(collect_candidates_for_java_method_aliases): Likewise.
	(mark_needed): Likewise.
	(var_finalized_p): Likewise.
	(maybe_make_one_only): Likewise.
	(maybe_emit_vtables): Likewise.
	* lambda.c (maybe_add_lambda_conv_op): Likewise.
	* method.c (use_thunk): Likewise.
	* optimize.c (maybe_clone_body): Likewise.
	* tree.c (cp_fix_function_decl_p): Likewise.

2013-10-29  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58888
	* decl2.c (grokfield): Handle auto like NSDMI.

2013-10-25  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58878
	* pt.c (check_template_shadow): Don't skip declarations in inline
	member templates.

2013-10-25  Tobias Burnus  <burnus@net-b.de>

	PR other/33426
	* parser.c (cp_parser_iteration_statement,
	cp_parser_for, cp_parser_c_for, cp_parser_pragma): Handle
	IVDEP pragma.

2013-10-24  Marek Polacek  <polacek@redhat.com>

	PR c++/58705
	* typeck2.c (check_narrowing): Don't check narrowing when the scalar
	initializer is empty.

2013-10-23  Jason Merrill  <jason@redhat.com>

	LWG 2165
	* method.c (defaulted_late_check): Delete on eh-spec mismatch.
	(maybe_explain_implicit_delete): Explain it.

	* error.c (eh_spec_to_string): New.
	(cp_printer): Use it for %X.

	In C++11 a trivial [cd]tor might not be callable.
	* class.c (user_provided_p): A function deleted on its declation
	in the class is not user-provided.
	(type_build_ctor_call): Also force a ctor call if we
	might have a deleted or private trivial ctor.
	(type_build_dtor_call): New.
	(deduce_noexcept_on_destructors): Remove obsolete code.
	* cp-tree.h: Declare type_build_dtor_call.
	* decl.c (expand_static_init): Make sure trivial dtors are callable.
	(cxx_maybe_build_cleanup): Likewise.
	* except.c (build_throw): Likewise.
	* init.c (build_value_init): Handle trivial but not callable ctors.
	(perform_target_ctor): Make sure trivial dtor is callable.
	(perform_member_init): Likewise.
	(expand_cleanup_for_base): Likewise.
	(build_vec_delete_1): Likewise.
	(build_delete): Likewise.
	(push_base_cleanups): Likewise.
	(build_new_1): Avoid redundant error.
	* method.c (synthesized_method_walk): Can't ever exit early in C++11.
	Always process the subobject destructor.
	* semantics.c (finish_compound_literal): Make sure trivial dtor is
	callable.
	* typeck2.c (split_nonconstant_init): Likewise.

2013-10-23  Edward Smith-Rowland  <3dw4rd@verizon.net>

	Implement C++14 [[deprecated]] modulo [[gnu::deprecated]] bugs.
	* parser.c (cp_parser_std_attribute): Interpret [[deprecated]]
	as [[gnu::deprecated]].

2013-10-22  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58816
	* pt.c (apply_late_template_attributes): Use get_attribute_name,
	not TREE_PURPOSE.

2013-10-18  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58466
	* pt.c (most_specialized_class): Bump processing_template_decl for
	get_class_bindings.

2013-10-18  Paolo Carlini  <paolo.carlini@oracle.com>

	* parser.c (cp_parser_lookup_name): Tidy.

2013-10-17  Andrew MacLeod  <amacleod@redhat.com>

	* parser.c: Include omp-low.h.
	* semantics.c: Likewise.

2013-10-17  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58596
	* lambda.c (lambda_expr_this_capture): Handle NSDMIs in the
	cp_unevaluated_operand case.

2013-10-16  Jason Merrill  <jason@redhat.com>

	* pt.c (apply_late_template_attributes): Use
	attribute_takes_identifier_p.

	* error.c (dump_exception_spec): Print "noexcept" rather than
	"noexcept (true)".

	Core 1591
	* pt.c (unify_array_domain): Split out from unify.
	(unify): Use it for list deduction, too.

	PR c++/57850
	* decl2.c (dump_tu): Split out from...
	(cp_write_global_declarations): ...here.  Call it in PCH mode.

2013-10-16  Paolo Carlini  <paolo.carlini@oracle.com>

	* pt.c (tsubst): Fix typo in last commit.

2013-10-16  Paulo Matos  <pmatos@broadcom.com>

	* error.c (code_to_string): Use new wrapper get_tree_code_name.
	* cxx-pretty-print.c (pp_cxx_assignment_operator): Likewise.
	* pt.c (tsubst): Likewise.
	* semantics.c (cxx_eval_constant_expression,
	potential_constant_expression_1): Likewise.
	* mangle.c (MANGLE_TRACE_TREE, dump_substitution_candidates,
	add_substitution, find_substitution): Likewise.

2013-10-15  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58707
	* parser.c (cp_parser_postfix_open_square_expression): Set
	parser->greater_than_is_operator_p for the argument.

2013-10-11  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58633
	* parser.c (cp_parser_commit_to_topmost_tentative_parse): New.
	(cp_parser_pseudo_destructor_name): Use it.

2013-10-11  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/31671
	* pt.c (convert_nontype_argument): Set expr_type to
	TREE_TYPE (probe_type).

2013-10-11  Jakub Jelinek  <jakub@redhat.com>

	* decl.c (duplicate_decls): Error out for redeclaration of UDRs.
	(declare_simd_adjust_this): New function.
	(grokfndecl): If "omp declare simd" attribute is present,
	call declare_simd_adjust_this if needed and
	c_omp_declare_simd_clauses_to_numbers.
	* cp-array-notation.c (expand_array_notation_exprs): Handle
	OMP_TASKGROUP.
	* cp-gimplify.c (cp_gimplify_expr): Handle OMP_SIMD and
	OMP_DISTRIBUTE.  Handle is_invisiref_parm decls in
	OMP_CLAUSE_REDUCTION.
	(cp_genericize_r): Handle OMP_SIMD and OMP_DISTRIBUTE like
	OMP_FOR.
	(cxx_omp_privatize_by_reference): Return true for
	is_invisiref_parm decls.
	(cxx_omp_finish_clause): Adjust cxx_omp_create_clause_info
	caller.
	* pt.c (apply_late_template_attributes): For "omp declare simd"
	attribute call tsubst_omp_clauses,
	c_omp_declare_simd_clauses_to_decls, finish_omp_clauses
	and c_omp_declare_simd_clauses_to_numbers.
	(instantiate_class_template_1): Call cp_check_omp_declare_reduction
	for UDRs.
	(tsubst_decl): Handle UDRs.
	(tsubst_omp_clauses): Add declare_simd argument, if true don't
	call finish_omp_clauses.  Handle new OpenMP 4.0 clauses.
	Handle non-NULL OMP_CLAUSE_REDUCTION_PLACEHOLDER on
	OMP_CLAUSE_REDUCTION.
	(tsubst_expr): For UDRs call pushdecl and
	cp_check_omp_declare_reduction.  Adjust tsubst_omp_clauses
	callers.  Handle OMP_SIMD, OMP_DISTRIBUTE, OMP_TEAMS,
	OMP_TARGET_DATA, OMP_TARGET_UPDATE, OMP_TARGET, OMP_TASKGROUP.
	Adjust finish_omp_atomic caller.
	(tsubst_omp_udr): New function.
	(instantiate_decl): For UDRs at block scope, don't call
	start_preparsed_function/finish_function.  Call tsubst_omp_udr.
	* semantics.c (cxx_omp_create_clause_info): Add need_dtor argument,
	use it instead of need_default_ctor || need_copy_ctor.
	(struct cp_check_omp_declare_reduction_data): New type.
	(handle_omp_array_sections_1, handle_omp_array_sections,
	omp_reduction_id, omp_reduction_lookup,
	cp_remove_omp_priv_cleanup_stmt, cp_check_omp_declare_reduction_r,
	cp_check_omp_declare_reduction, clone_omp_udr,
	find_omp_placeholder_r, finish_omp_reduction_clause): New functions.
	(finish_omp_clauses): Handle new OpenMP 4.0 clauses and user defined
	reductions.
	(finish_omp_for): Add CODE argument, use it instead of hardcoded
	OMP_FOR.  Adjust c_finish_omp_for caller.
	(finish_omp_atomic): Add seq_cst argument, adjust
	c_finish_omp_atomic callers, handle seq_cst and new OpenMP 4.0
	atomic variants.
	(finish_omp_cancel, finish_omp_cancellation_point): New functions.
	* decl2.c (mark_used): Force immediate instantiation of
	DECL_OMP_DECLARE_REDUCTION_P decls.
	(is_late_template_attribute): Return true for "omp declare simd"
	attribute.
	(cp_omp_mappable_type): New function.
	(cplus_decl_attributes): Add implicit "omp declare target" attribute
	if requested.
	* parser.c (cp_debug_parser): Print
	parser->colon_doesnt_start_class_def_p.
	(cp_ensure_no_omp_declare_simd, cp_finalize_omp_declare_simd): New
	functions.
	(enum pragma_context): Add pragma_member and pragma_objc_icode.
	(cp_parser_binary_expression): Handle no_toplevel_fold_p
	even for binary operations other than comparison.
	(cp_parser_linkage_specification): Call
	cp_ensure_no_omp_declare_simd if needed.
	(cp_parser_namespace_definition): Likewise.
	(cp_parser_init_declarator): Call cp_finalize_omp_declare_simd.
	(cp_parser_direct_declarator): Pass declarator to
	cp_parser_late_return_type_opt.
	(cp_parser_late_return_type_opt): Add declarator argument,
	call cp_parser_late_parsing_omp_declare_simd for declare simd.
	(cp_parser_class_specifier_1): Call cp_ensure_no_omp_declare_simd.
	Parse UDRs before all other methods.
	(cp_parser_member_specification_opt): Use pragma_member instead of
	pragma_external.
	(cp_parser_member_declaration): Call cp_finalize_omp_declare_simd.
	(cp_parser_function_definition_from_specifiers_and_declarator,
	cp_parser_save_member_function_body): Likewise.
	(cp_parser_late_parsing_for_member): Handle UDRs specially.
	(cp_parser_next_token_starts_class_definition_p): Don't allow
	CPP_COLON if colon_doesnt_start_class_def_p flag is true.
	(cp_parser_objc_interstitial_code): Use pragma_objc_icode
	instead of pragma_external.
	(cp_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
	(cp_parser_omp_var_list_no_open): Parse array sections for
	OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.  Add COLON argument,
	if non-NULL, allow parsing to end with a colon rather than close
	paren.
	(cp_parser_omp_var_list): Adjust cp_parser_omp_var_list_no_open
	caller.
	(cp_parser_omp_clause_reduction): Handle user defined reductions.
	(cp_parser_omp_clause_branch, cp_parser_omp_clause_cancelkind,
	cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
	cp_parser_omp_clause_aligned, cp_parser_omp_clause_linear,
	cp_parser_omp_clause_safelen, cp_parser_omp_clause_simdlen,
	cp_parser_omp_clause_depend, cp_parser_omp_clause_map,
	cp_parser_omp_clause_device, cp_parser_omp_clause_dist_schedule,
	cp_parser_omp_clause_proc_bind, cp_parser_omp_clause_to,
	cp_parser_omp_clause_from, cp_parser_omp_clause_uniform): New
	functions.
	(cp_parser_omp_all_clauses): Add finish_p argument.  Don't call
	finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
	(cp_parser_omp_atomic): Parse seq_cst clause, pass
	true if it is present to finish_omp_atomic.  Handle new OpenMP 4.0
	atomic forms.
	(cp_parser_omp_for_loop): Add CODE argument, pass it through
	to finish_omp_for.  Change last argument to cclauses,
	and adjust uses to grab parallel clauses from the array of all
	the split clauses.
	(cp_omp_split_clauses): New function.
	(cp_parser_omp_simd): New function.
	(cp_parser_omp_for): Add p_name, mask and cclauses arguments.
	Allow the function to be called also when parsing combined constructs,
	and call c_parser_omp_simd when parsing for simd.
	(cp_parser_omp_sections_scope): If section-sequence doesn't start with
	#pragma omp section, require exactly one structured-block instead of
	sequence of statements.
	(cp_parser_omp_sections): Add p_name, mask and cclauses arguments.
	Allow the function to be called also when parsing combined constructs.
	(cp_parser_omp_parallel): Add p_name, mask and cclauses arguments.
	Allow the function to be called also when parsing combined
	constructs.
	(cp_parser_omp_taskgroup, cp_parser_omp_cancel,
	cp_parser_omp_cancellation_point, cp_parser_omp_distribute,
	cp_parser_omp_teams, cp_parser_omp_target_data,
	cp_parser_omp_target_update, cp_parser_omp_target,
	cp_parser_omp_declare_simd, cp_parser_late_parsing_omp_declare_simd,
	cp_parser_omp_declare_target, cp_parser_omp_end_declare_target,
	cp_parser_omp_declare_reduction_exprs, cp_parser_omp_declare_reduction,
	cp_parser_omp_declare): New functions.
	(cp_parser_omp_construct): Add p_name and mask vars.  Handle
	PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
	PRAGMA_OMP_TEAMS.  Adjust cp_parser_omp_for, cp_parser_omp_parallel
	and cp_parser_omp_sections callers.
	(cp_parser_pragma): Handle PRAGMA_OMP_CANCEL,
	PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
	PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
	PRAGMA_OMP_TEAMS, PRAGMA_OMP_TARGET, PRAGMA_OMP_END_DECLARE_TARGET.
	Handle pragma_member and pragma_objc_icode like pragma_external.
	(OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
	OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
	(OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
	(OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
	OMP_CLAUSE_DEPEND.
	(OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
	OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
	OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
	OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
	OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
	* parser.h (struct cp_omp_declare_simd_data): New type.
	(struct cp_parser): Add colon_doesnt_start_class_def_p and
	omp_declare_simd fields.
	* cp-objcp-common.h (LANG_HOOKS_OMP_MAPPABLE_TYPE): Define.
	* cp-tree.h (struct lang_decl_fn): Add omp_declare_reduction_p
	bit.
	(DECL_OMP_DECLARE_REDUCTION_P): Define.
	(OMP_FOR_GIMPLIFYING_P): Use OMP_LOOP_CHECK macro.
	(struct saved_scope): Add omp_declare_target_attribute field.
	(cp_omp_mappable_type, omp_reduction_id,
	cp_remove_omp_priv_cleanup_stmt, cp_check_omp_declare_reduction,
	finish_omp_cancel, finish_omp_cancellation_point): New prototypes.
	(finish_omp_for): Add CODE argument.
	(finish_omp_atomic): Add seq_cst argument.
	(cxx_omp_create_clause_info): Add need_dtor argument.

2013-10-09  Marek Polacek  <polacek@redhat.com>

	PR c++/58635
	* semantics.c (finish_return_stmt): Return error_mark_node
	when error_operand_p of the expr is true.
	(build_transaction_expr): Check for EXPR_P before setting the
	expr location.

2013-10-08  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58568
	* lambda.c (begin_lambda_type): Check return value of xref_tag
	for error_mark_node; tidy.
	* decl.c (grokdeclarator): Tweak error message.

2013-10-08  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58665
	Revert:
	2013-10-04  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58448
	* pt.c (tsubst): Use error_operand_p on parameter t.

2013-10-06  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58126
	* class.c (check_bases): Propagate CLASSTYPE_READONLY_FIELDS_NEED_INIT
	and CLASSTYPE_REF_FIELDS_NEED_INIT from bases to derived.
	* init.c (diagnose_uninitialized_cst_or_ref_member_1): Extend error
	messages about uninitialized const and references members to mention
	the base class.

2013-10-06  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/56060
	* pt.c (type_dependent_expression_p): Handle EXPR_PACK_EXPANSION.

2013-10-04  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58560
	* typeck2.c (build_functional_cast): Use error_operand_p on exp.

2013-10-04  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58503
	* parser.c (cp_parser_perform_range_for_lookup): If eventually
	either *begin or *end is type-dependent, return NULL_TREE.
	(do_range_for_auto_deduction): If cp_parser_perform_range_for_lookup
	returns NULL_TREE, don't actually do_auto_deduction.

2013-10-04  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58448
	* pt.c (tsubst): Use error_operand_p on parameter t.

2013-10-04  Marc Glisse  <marc.glisse@inria.fr>

	PR c++/19476
	* decl.c (cxx_init_decl_processing): Set operator_new_flag.

2013-10-04  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58584
	* decl2.c (save_template_attributes): Handle error_mark_node as
	*attr_p argument.
	(cp_check_const_attributes): Likewise for attributes.
	* parser.c (cp_parser_std_attribute_spec): When alignas_expr is an
	error_mark_node call cp_parser_skip_to_end_of_statement.

2013-10-03  Easwaran Raman  <eraman@google.com>

	PR c++/33911
	* parser.c (cp_parser_init_declarator): Do not drop attributes
	of template member functions.

2013-10-03  Marek Polacek  <polacek@redhat.com>

	PR c++/58510
	* init.c (sort_mem_initializers): Splice when giving an error.

2013-10-02  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58535
	* parser.c (cp_parser_function_specifier_opt): Upon error about
	virtual templates don't set ds_virtual.
	(finish_fully_implicit_template): Reject virtual implicit templates.

2013-10-02  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58565
	* semantics.c (potential_constant_expression_1): Handle LABEL_EXPR.

2013-10-01  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58563
	* parser.c (cp_parser_lookup_name): Check make_typename_type return
	value for error_mark_node.

2013-09-25  Tom Tromey  <tromey@redhat.com>

	* Make-lang.in (CXX_TREE_H, CXX_PARSER_H, CXX_PRETTY_PRINT_H):
	Remove.

2013-09-25  Tom Tromey  <tromey@redhat.com>

	* Make-lang.in (g++spec.o): Remove.
	(CFLAGS-cp/g++spec.o): New variable.
	(GXX_OBJS): Reference cp/g++spec.o.
	(cc1plus-checksum.o, cp/lex.o, cp/cp-array-notation.o)
	(cp/cp-lang.o, cp/decl.o, cp/decl2.o, cp/cp-objcp-common.o)
	(cp/typeck2.o, cp/typeck.o, cp/class.o, cp/call.o)
	(cp/friend.o, cp/init.o, cp/method.o, cp/cvt.o, cp/search.o)
	(cp/tree.o, cp/ptree.o, cp/rtti.o, cp/except.o, cp/expr.o)
	(cp/pt.o, cp/error.o, cp/repo.o, cp/semantics.o, cp/dump.o)
	(cp/optimize.o, cp/mangle.o, cp/parser.o, cp/cp-gimplify.o)
	(cp/name-lookup.o, cp/cxx-pretty-print.o): Remove.

2013-09-25  Tom Tromey  <tromey@redhat.com>

	* Make-lang.in (g++spec.o): Don't use subshell.

2013-09-25  Marek Polacek  <polacek@redhat.com>

	PR c++/58516
	* semantics.c (finish_transaction_stmt): Check for EXPR_P before
	setting the expr location.

2013-09-23  Adam Butcher  <adam@jessamine.co.uk>

	PR c++/58500
	* type-utils.h (find_type_usage): Only traverse one type level into
	member function pointers.

2013-09-23  Adam Butcher  <adam@jessamine.co.uk>

	* parser.c (cp_parser_init_declarator): Defer calling
	finish_fully_implicit_template for forward declarations until after
	other decl processing is complete.  Cleanup for clarity: Extract 'else'
	case after 'if' containing unconditional return.

2013-09-23  Adam Butcher  <adam@jessamine.co.uk>

	* parser.c (make_generic_type_name): Spell generic type names '<autoN>'
	rather than '__GenN'.

2013-09-23  Adam Butcher  <adam@jessamine.co.uk>

	* lambda.c (maybe_add_lambda_conv_op): Don't check for instantiated
	callop in the case of generic lambdas.

2013-09-23  Adam Butcher  <adam@jessamine.co.uk>

	* parser.c (make_generic_type_name): Use global count rather than
	parameter and ...
	(add_implicit_template_parms): ... propagate interface change here.

2013-09-20  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58481
	* pt.c (tsubst_copy): Use current_nonlambda_class_type to
	call tsubst_baselink.

2013-09-18  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58457
	* class.c (instantiate_type): Loosen a bit the gcc_assert.

2013-09-18  Marek Polacek  <polacek@redhat.com>

	PR sanitize/58443
	* typeck.c (cp_build_binary_op): Properly honor -fsanitize options.
	Remove unnecessary check.

2013-09-18  Marek Polacek  <polacek@redhat.com>

	PR sanitizer/58411
	* typeck.c (cp_build_binary_op): Don't sanitize function if it has the
	no_sanitize_undefined attribute.

2013-09-17  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58435
	* pt.c (tsubst, [BOUND_TEMPLATE_TEMPLATE_PARM]): Take into account
	the cp_type_quals (r) too.

2013-09-16  Adam Butcher  <adam@jessamine.co.uk>

	* cp-tree.h (type_uses_auto_or_concept): Declare.
	(is_auto_or_concept): Declare.
	* decl.c (grokdeclarator): Allow 'auto' parameters in lambdas with
	-std=gnu++1y or -std=c++1y or, as a GNU extension, in plain functions.
	* type-utils.h: New header defining ...
	(find_type_usage): ... this new function based on pt.c (type_uses_auto)
	for searching a type tree given a predicate.
	* pt.c (type_uses_auto): Reimplement via type-utils.h (find_type_usage).
	(is_auto_or_concept): New function.
	(type_uses_auto_or_concept): New function.
	* parser.h (struct cp_parser): Add fully_implicit_function_template_p.
	* parser.c (cp_parser_new): Initialize
	fully_implicit_function_template_p.
	(cp_parser_new): Initialize fully_implicit_function_template_p.
	(cp_parser_lambda_expression): Copy and restore value of
	fully_implicit_function_template_p as per other parser fields.
	(cp_parser_parameter_declaration_list): Count generic
	parameters and call ...
	(add_implicit_template_parms): ... this new function to synthesize them
	with help from type-utils.h (find_type_usage), ...
	(tree_type_is_auto_or_concept): ... this new static function and ...
	(make_generic_type_name): ... this new static function.
	(cp_parser_direct_declarator): Account for implicit template parameters.
	(cp_parser_lambda_declarator_opt): Finish fully implicit template if
	necessary by calling ...
	(finish_fully_implicit_template): ... this new function.
	(cp_parser_init_declarator): Likewise.
	(cp_parser_function_definition_after_declarator): Likewise.
	(cp_parser_member_declaration): Likewise.
	* Make-lang.in (cp/pt.o): Add dependency on type-utils.h.
	(cp/parser.o): Likewise.

2013-09-16  Adam Butcher  <adam@jessamine.co.uk>

	* parser.c (cp_parser_lambda_declarator_opt): Accept template parameter
	list with std=c++1y or std=gnu++1y.
	(cp_parser_lambda_body): Don't call 'expand_or_defer_fn' for lambda call
	operator template to avoid adding template result to symbol table.
	* lambda.c (lambda_function): Return template result if call operator is
	a template.
	(maybe_add_lambda_conv_op): Move declarations to point of use.  Refactor
	operator call building in order to support conversion of a non-capturing
	lambda template to a function pointer with help from ...
	(prepare_op_call): ... this new function.
	* decl2.c (check_member_template): Don't reject lambda call operator
	template in local [lambda] class.
	* pt.c (instantiate_class_template_1): Don't instantiate lambda call
	operator template when instantiating lambda class.

2013-09-16  Adam Butcher  <adam@jessamine.co.uk>

	* pt.c (make_auto_1): Use input_location rather than BUILTINS_LOCATION.

2013-09-15  Jason Merrill  <jason@redhat.com>

	Core DR 904
	PR c++/41933
	* parser.c (cp_parser_lambda_introducer): Handle variadic capture.
	* lambda.c (add_capture): Handle variadic capture.
	(add_default_capture, lambda_capture_field_type): Likewise.
	(build_capture_proxy, register_capture_members): Likewise.
	* pt.c (register_specialization): Allow FIELD_DECL.
	(retrieve_specialization): Likewise.
	(find_parameter_packs_r): Handle FIELD_DECL and VAR_DECL.
	(tsubst_pack_expansion): Handle FIELD_DECL packs.
	(gen_elem_of_pack_expansion_instantiation): Likewise.
	(instantiate_class_template_1): Likewise.
	(tsubst_decl, tsubst_copy): Likewise.
	(tsubst_expr) [DECL_EXPR]: Handle capture proxy packs.
	(tsubst_copy_and_build) [VAR_DECL]: Likewise.
	* semantics.c (finish_non_static_data_member): Don't try to represent
	the type of a COMPOUND_REF of a FIELD_DECL pack.

	PR c++/41933
	* cp-tree.h (DECL_PACK_P): Replace FUNCTION_PARAMETER_PACK_P.
	* cxx-pretty-print.c (direct_declarator): Adjust.
	* decl2.c (cp_build_parm_decl): Adjust.
	* pt.c (function_parameter_pack_p): Adjust.
	(find_parameter_packs_r, push_template_decl_real): Adjust.
	(tsubst_pack_expansion, tsubst_decl): Adjust.
	(regenerate_decl_from_template, instantiate_decl): Adjust.

	* lambda.c (add_capture): Don't add DECL_LANG_SPECIFIC.

2013-09-13  Jason Merrill  <jason@redhat.com>

	PR c++/58273
	* pt.c (any_type_dependent_elements_p): Actually check for
	type-dependence, not value-dependence.

2013-09-13  Jacek Caban  <jacek@codeweavers.com>

	* decl.c: Use new cxx_implicit_extern_c hook

2013-09-12  Brooks Moses  <bmoses@google.com>

	PR driver/42955
	* Make-lang.in: Do not install driver binaries in $(target)/bin.

2013-09-12  Adam Butcher  <adam@jessamine.co.uk>

	* pt.c (instantiate_decl): Save/restore cp_unevaluated_operand and
	c_inhibit_evaluation_warnings.  Reset if instantiating within a
	function-local template.

2013-09-12  Paolo Carlini  <paolo.carlini@oracle.com>

	* semantics.c (finish_pseudo_destructor_expr): Add location_t
	parameter.
	* pt.c (unify_arg_conversion): Use EXPR_LOC_OR_HERE.
	(tsubst_copy_and_build): Adjust finish_pseudo_destructor_expr
	calls.
	* parser.c (cp_parser_postfix_dot_deref_expression): Likewise.
	(cp_parser_postfix_expression): Pass the proper location to
	cp_parser_postfix_dot_deref_expression.
	* cp-tree.h (finish_pseudo_destructor_expr): Update declaration.

2013-09-10  Jan Hubicka  <jh@suse.cz>
	    Paolo Carlini  <paolo.carlini@oracle.com>

	* error.c (print_instantiation_partial_context_line): If
	loc == UNKNOWN_LOCATION return immediately.

2013-09-09  Jakub Jelinek  <jakub@redhat.com>

	PR c++/58325
	* init.c (build_vec_delete): Call mark_rvalue_use on base.

2013-09-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/43452
	* init.c (build_vec_delete_1): When the type is incomplete emit a
	warning, enabled by default (not an error).
	(build_delete): Adjust to use OPT_Wdelete_incomplete.

2013-09-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58362
	* error.c (location_of): Don't handle PARM_DECLs specially.

2013-09-09  Paolo Carlini  <paolo.carlini@oracle.com>

	* error.c (dump_expr, [PSEUDO_DTOR_EXPR]): Fix.
	* cxx-pretty-print.c (cxx_pretty_printer::postfix_expression):
	Tweak, TREE_OPERAND (t, 1) may be null.

2013-09-08  Caroline Tice  <cmtice@google.com>

	PR c++/58300
	* vtable-class-hierarchy.c (vtv_generate_init_routine):  In
	preinit case, move call to assemble_vtv_preinit_initializer to
	after call to cgraph_process_new_functions.

2013-09-08  Tom de Vries  <tom@codesourcery.com>

	PR c++/58282
	* except.c (build_must_not_throw_expr): Handle
	flag_exceptions.

2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>

	* typeck.c (cp_build_binary_op): Use vector_types_compatible_elements_p.

2013-09-04  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/24926
	* class.c (finish_struct_anon_r): New.
	(finish_struct_anon): Use it.

2013-09-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>

	* cxx-pretty-print.h (cxx_pretty_printer::simple_type_specifier):
	Declare as overrider.
	* cxx-pretty-print.c (cxx_pretty_printer::simple_type_specifier):
	Rename from pp_cxx_simple_type_specifier.
	(cxx_pretty_printer::cxx_pretty_printer): Do not assign to
	simple_type_specifier.

2013-09-03  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58305
	* typeck2.c (build_functional_cast): Maybe warn_deprecated_use.

2013-09-03  Mike Stump  <mikestump@comcast.net>

	* Make-lang.in (cp/lambda.o): Add dependencies.

2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>

	* cxx-pretty-print.h (cxx_pretty_printer::type_id): Declare as
	overrider.
	* cxx-pretty-print.c (pp_cxx_storage_class_specifier): Remove.
	(pp_cxx_userdef_literal): Tidy.
	(pp_cxx_template_argument_list): Likewise.
	(pp_cxx_typeid_expression): Likewise.
	(pp_cxx_offsetof_expression_1): Likewise.
	(cxx_pretty_printer::postfix_expression): Likewise.
	(cxx_pretty_printer::unary_expression): Likewise.
	(cxx_pretty_printer::statement): Likewise.
	(cxx_pretty_printer::type_id): Rename from pp_cxx_type_id.
	(c_pretty_printer::cxx_pretty_printer): Do not assign to type_id.
	* error.c (dump_decl): Tidy.
	(dump_expr): Likewise.

2013-09-02  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/21682, implement DR 565
	* name-lookup.c (compparms_for_decl_and_using_decl): New.
	(push_overloaded_decl_1, do_nonmember_using_decl): Use it.

2013-08-30  Marek Polacek  <polacek@redhat.com>

	* typeck.c (cp_build_binary_op): Add division by zero and shift
	instrumentation.
	* error.c (dump_expr): Special-case ubsan builtins.

2013-08-30  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/51424
	* cp-tree.h (LOOKUP_DELEGATING_CONS): Add.
	* init.c (perform_target_ctor): Use it.
	* call.c (build_special_member_call): Diagnose self-delegating
	constructors.

2013-08-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>

	* cxx-pretty-print.h (cxx_pretty_printer::declaration): Declare as
	overrider.
	(cxx_pretty_printer::declaration_specifiers): Likewise.
	(cxx_pretty_printer::function_specifier): Likewise.
	(cxx_pretty_printer::declarator): Likewise.
	(cxx_pretty_printer::direct_declarator): Likewise.
	(cxx_pretty_printer::abstract_declarator): Likewise.
	(cxx_pretty_printer::direct_abstract_declarator): Likewise.
	(pp_cxx_declaration): Remove.
	* cxx-pretty-print.c (cxx_pretty_printer::function_specifier):
	Rename from pp_cxx_function_specifier.  Adjust.
	(cxx_pretty_printer::declaration_specifiers): Rename from
	pp_cxx_decl_specifier_seq.  Adjust.
	(cxx_pretty_printer::direct_declarator): Rename from
	pp_cxx_direct_declarator.  Adjust.
	(cxx_pretty_printer::declarator): Rename from pp_cxx_declarator.
	Adjust.
	(cxx_pretty_printer::abstract_declarator): Rename from
	pp_cxx_abstract_declarator.  Adjust.
	(cxx_pretty_printer::direct_abstract_declarator): Rename from
	pp_cxx_direct_abstract_declarator.  Adjust.
	(cxx_pretty_printer::declaration): Rename from
	pp_cxx_declaration.  Adjust.
	(cxx_pretty_printer::cxx_pretty_printer): Do not assign to
	declaration, declaration_specifiers, function_specifier,
	declarator, direct_declarator, abstract_declarator,
	direct_abstract_declarator.
	* error.c (dump_decl): Adjust.

2013-08-29  Jan Hubicka  <jh@suse.cz>

	Correct previous patch to not mark terminate as LEAF.
	* class.c (build_vtbl_initializer): Drop LEAF
	* decl.c (cxx_init_decl_processing): Likewise.
	(push_throw_library_fn): Likewise.
	* except.c (init_exception_processing): Likewise.
	(do_begin_catch): Likewise.
	(do_end_catch): Likewise.
	(do_allocate_exception): Likewise.

2013-08-29  Jan Hubicka  <jh@suse.cz>

	* class.c (build_vtbl_initializer): Make __cxa_deleted_virtual
	ECF_NORETURN | ECF_LEAF
	* cp-tree.h (build_library_fn_ptr, build_cp_library_fn_ptr,
	push_library_fn, push_void_library_fn): Update prototype.
	* decl.c (build_library_fn_1): Remove.
	(push_cp_library_fn, build_cp_library_fn): Update to take ECF flags.
	(cxx_init_decl_processing): Update; global_delete_fndecl is ECF_NOTROW;
	__cxa_pure_virtual is ECF_NORETURN | ECF_NORETURN | ECF_LEAF.
	(build_library_fn_1): Add ecf_flags argument; rename to ...
	(build_library_fn): ... this one.
	(build_cp_library_fn): Take ecf_flags; do not copy NOTHROW flag.
	(build_library_fn_ptr): Take ecf_flags.
	(build_cp_library_fn_ptr): Likewise.
	(push_library_fn): Likewise.
	(push_cp_library_fn): Likewise.
	(push_void_library_fn): Likewise.
	(push_throw_library_fn): All throws are ECF_NORETURN.
	(__cxa_atexit, __cxa_thread_atexit): Add ECF_LEAF | ECF_NOTHROW attributes.
	(expand_static_init): __cxa_guard_acquire, __cxa_guard_release,
	__cxa_guard_abort are ECF_NOTHROW | ECF_LEAF.
	* except.c (init_exception_processing): terminate is
	ECF_NOTHROW | ECF_NORETURN | ECF_LEAF.
	(declare_nothrow_library_fn): Add ecf_flags parameter.
	(__cxa_get_exception_ptr): Is ECF_NOTHROW | ECF_PURE | ECF_LEAF |
	ECF_TM_PURE.
	(do_begin_catch): cxa_begin_catch and _ITM_cxa_begin_catch
	are ECF_NOTHROW | ECF_LEAF.
	(do_end_catch): __cxa_end_catch and _ITM_cxa_end_catch is
	ECF_LEAF.
	(do_allocate_exception): _cxa_allocate_exception
	and _ITM_cxa_allocate_exception are ECF_NOTHROW | ECF_MALLOC
	| ECF_LEAF
	(do_free_exception): __cxa_free_exception is
	ECF_NOTHROW | ECF_LEAF.
	* rtti.c (build_dynamic_cast_1): __dynamic_cast
	is ECF_LEAF | ECF_PURE | ECF_NOTHROW.

2013-08-29  Adam Butcher  <adam@jessamine.co.uk>

	* error.c (dump_lambda_function): New function, dependent on ...
	(dump_substitution): ... this new function, factored out of ...
	(subst_to_string): ... here and ...
	(dump_function_decl): ... here.  Updated to early-out with call to
	dump_lambda_function after determining template bindings.

2013-08-28  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58255
	* init.c (build_aggr_init): When init == void_type_node do not
	set LOOKUP_ONLYCONVERTING.

2013-08-27  Caroline Tice  <cmtice@google.com>

	* vtable-class-hierarchy.c: Remove unnecessary include statements.
	(MAX_SET_SIZE): Remove unnecessary constant.
	(register_construction_vtables):  Make vtable_ptr_array parameter
	into a vector; remove num_args parameter. Change array accesses to
	vector accesses.
	(register_other_binfo_vtables): Ditto.
	(insert_call_to_register_set): Ditto.
	(insert_call_to_register_pair): Ditto.
	(output_set_info):  Ditto.  Also change warning calls to warning_at
	calls, and fix format of warning messages.
	(register_all_pairs): Change vtbl_ptr_array from an array into a
	vector.  Remove num_vtable_args (replace with calls to vector length).
	Change array stores & accesses to vector functions. Change calls to
	register_construction_vtables, register_other_binfo_vtables,
	insert_call_to_register_set, insert_call_to_register_pair and
	output_set_info to match their new signatures.  Change warning to
	warning_at and fix the format of the warning message.

2013-08-27  Jakub Jelinek  <jakub@redhat.com>
	    Aldy Hernandez  <aldyh@redhat.com>

	* cp-tree.h (CP_OMP_CLAUSE_INFO): Adjust range for new clauses.

2013-08-27  Paolo Carlini  <paolo.carlini@oracle.com>

	* decl.c (grokfndecl): Remove old bison hack.

2013-08-26  Jan Hubicka  <jh@suse.cz>

	* cp-tree.h (DECL_CONSTRUCTOR_P, DECL_DESTRUCTOR_P): Use
	middle-end flag.

2013-08-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>

	* cxx-pretty-print.h (cxx_pretty_printer::unary_expression):
	Declare as overrider.
	(cxx_pretty_printer::multiplicative_expression): Likewise.
	(cxx_pretty_printer::conditional_expression): Likewise.
	(cxx_pretty_printer::assignment_expression): Likewise.
	(cxx_pretty_printer::expression): Likewise.
	* cxx-pretty-print.c (cxx_pretty_printer::unary_expression):
	Rename from pp_cxx_unary_expression.  Adjust.
	(cxx_pretty_printer::multiplicative_expression): Rename from
	pp_cxx_multiplicative_expression.  Adjust.
	(cxx_pretty_printer::conditional_expression): Rename from
	pp_cxx_conditional_expression.  Adjust.
	(cxx_pretty_printer::assignment_expression): Rename from
	pp_cxx_assignment_expression.  Adjust.
	(cxx_pretty_printer::expression): Rename from pp_cxx_expression.
	Adjust.
	(cxx_pretty_printer::cxx_pretty_printer): Dot not assign to
	unary_expression, multiplicative_expression,
	conditional_expression, assignment_expression, expression.

2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>

	* cxx-pretty-print.h (cxx_pretty_printer::postfix_expression):
	Declare as overrider.
	* cxx-pretty-print.c (cxx_pretty_printer::postfix_expression):
	Rename from pp_cxx_postfix_expression.  Adjust.
	(pp_cxx_expression): Use pp_postfix_expression.
	(cxx_pretty_printer::cxx_pretty_printer): Do not assign to
	postfix_expression.

2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>

	* cxx-pretty-print.h (cxx_pretty_printer::primary_expression): Now
	an overrider of c_pretty_printer::primary_expression.
	* cxx-pretty-print.c (cxx_pretty_printer::primary_expression):
	Rename from pp_cxx_primary_expression.  Adjust.
	(pp_cxx_postfix_expression): Use pp_primary_expression.
	(pp_cxx_ctor_initializer): Likewise.
	(cxx_pretty_printer::cxx_pretty_printer): Do not assign to
	primary_expression.

2013-08-23  Jan Hubicka  <jh@suse.cz>

	* cp-tree.h (struct lang_type_class): Free is_final bit.
	(CLASSTYPE_FINAL): Define using TYPE_FINAL_P.
	(DECL_FINAL_P): Remove.
	* pt.c (instantiate_class_template_1): Guard that CLASSTYPE_FINAL
	is called on CLASS_TYPE_P.

2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>

	* cxx-pretty-print.c (M_): Remove.
	(pp_cxx_unqualified_id): Use translate_string instead of M_.
	(pp_cxx_canonical_template_parameter): Likewise.

2013-08-24  Gabriel Dos Reis  <gdr@integrable-solutions.net>

	* cxx-pretty-print.h (cxx_pretty_printer::id_expression): Declare.
	* cxx-pretty-print.c (cxx_pretty_printer::id_expression): Rename
	from pp_cxx_id_expression.  Adjust.
	(pp_cxx_userdef_literal): Use pp_id_expression.
	(pp_cxx_primary_expression): Likewise.
	(pp_cxx_direct_declarator): Likewise.
	(cxx_pretty_printer::cxx_pretty_printer): Do not assign to
	id_expression.

2013-08-24  Gabriel Dos Reis  <gdr@integrable-solutions.net>

	* cxx-pretty-print.h (cxx_pretty_printer::constant): Now a member
	function, overriding c_pretty_printer::constant.
	* cxx-pretty-print.c (cxx_pretty_printer::constant): Rename from
	pp_cxx_constant.  Adjust.
	(cxx_pretty_printer::cxx_pretty_printer): Do not assign to constant.

2013-08-23  Gabriel Dos Reis  <gdr@integrable-solutiobs.net>

	* cp-objcp-common.c (cxx_initialize_diagnostics): Call a
	destructor for the early printer.
	* error.c (type_to_string): Use pp_buffer.

2013-08-22  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/56380
	* class.c (check_field_decls): Check for const mutable and const
	reference data members.

2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>

	* error.c (init_error): Remove calls to pp_construct and
	pp_cxx_pretty_printer_init.  Initialize cxx_pp with placement-new.
	* cxx-pretty-print.h (cxx_pretty_printer::cxx_pretty_printer): Declare.
	(cxx_pretty_printer_init): Remove.
	* cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer):
	Rename from cxx_pretty_printer_init.  Adjust.
	* cp-objcp-common.c (cxx_initialize_diagnostics): Simplify
	initialization of C++ diagnostics pretty printer.

2013-08-21  Paolo Carlini  <paolo.carlini@oracle.com>

	* call.c (build_new_method_call_1): Use INDIRECT_REF_P.
	* cp-tree.h (REFERENCE_REF_P): Likewise.
	* semantics.c (finish_offsetof): Likewise.

2013-08-21  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/56130
	* semantics.c (finish_id_expression): Handle deprecated references.

2013-08-20  Jason Merrill  <jason@redhat.com>

	PR c++/58119
	* cvt.c (build_expr_type_conversion): Don't complain about a
	template that can't match the desired type category.

2013-08-20  Gabriel Dos Reis  <gdr@integrable-solutions.net>

	* error.c (pp_ggc_formatted_text): New.
	(type_as_string): Use it in lieu of pp_formatted_text.
	(type_as_string_translate): Likewise.
	(expr_as_string): Likewise.
	(decl_as_string): Likewise.
	(decl_as_string_translate): Likewise.
	(lang_decl_name): Likewise.
	(decl_to_string): Likewise.
	(expr_to_string): Likewise.
	(fndecl_to_string): Likewise.
	(parm_to_string): Likewise.
	(type_to_string): Likewise.
	(args_to_string): Likewise.
	(subst_to_string): Likewise.

2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>

	PR c/57490
	* cp-array-notation.c (cp_expand_cond_array_notations): Added a
	check for truth values.
	(expand_array_notation_exprs): Added truth values case.  Removed an
	unwanted else.  Added for-loop to walk through subtrees in default
	case.
	* call.c (build_cxx_call): Inherited the type of the array notation for
	certain built-in array notation functions.

2013-08-19  Paolo Carlini  <paolo.carlini@oracle.com>

	* parser.c (cp_parser_lambda_introducer, cp_parser_decltype_expr):
	Use cp_parser_lookup_name_simple.

2013-08-19  Paolo Carlini  <paolo.carlini@oracle.com>

	* name-lookup.h (pop_bindings_and_leave_scope): Declare.
	* name-lookup.c (pop_bindings_and_leave_scope): Define.
	* parser.c (cp_parser_lambda_declarator_opt,
	cp_parser_direct_declarator, cp_parser_cache_defarg): Use it.

2013-08-17  Jason Merrill  <jason@redhat.com>

	PR c++/58083
	* name-lookup.c (push_class_level_binding_1): It's OK to push a
	lambda type after the enclosing type is complete.

2013-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>

	* error.c (dump_scope): Add a cxx_pretty_printer parameter.
	Adjust callers.
	(dump_template_argument): Likewise.
	(dump_template_argument_list): Likewise.
	(dump_template_parameter): Likewise.
	(dump_template_bindings): Likewise.
	(dump_alias_template_specialization): Likewise.
	(dump_type): Likewise.
	(dump_typename): Likewise.
	(dump_aggr_type): Likewise.
	(dump_type_prefix): Likewise.
	(dump_type_suffix): Likewise.
	(dump_global_iord): Likewise.
	(dump_simple_decl): Likewise.
	(dump_decl): Likewise.
	(dump_template_decl): Likewise.
	(dump_function_decl): Likewise.
	(dump_parameters): Likewise.
	(dump_ref_qualifier): Likewise.
	(dump_exception_spec): Likewise.
	(dump_function_name): Likewise.
	(dump_template_parms): Likewise.
	(dump_call_expr_args): Likewise.
	(dump_aggr_init_expr_args): Likewise.
	(dump_expr_list): Likewise.
	(dump_expr_init_vec): Likewise.
	(dump_expr): Likewise.
	(dump_binary_op): Likewise.
	(dump_unary_op): Likewise.

2013-08-14  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/51912
	* cp-tree.h (LOOKUP_NO_NON_INTEGRAL): Add.
	* decl.c (case_conversion): Use it.
	* call.c (standard_conversion): Likewise.
	(implicit_conversion): Adjust.

2013-08-13  Adam Butcher  <adam@jessamine.co.uk>

	* pt.c: Grammar fix in comments ("it's" to "its").

2013-08-12  Paolo Carlini  <paolo.carlini@oracle.com>

	* decl.c (warn_extern_redeclared_static, duplicate_decls,
	check_elaborated_type_specifier): Use error + inform.
	* friend.c (make_friend_class): Likewise.
	* semantics.c (finish_id_expression): Likewise.

2013-08-09  Paolo Carlini  <paolo.carlini@oracle.com>

	Revert:
	2013-08-07  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/46206
	* name-lookup.c (lookup_name_real_1): Handle iter->type before
	iter->value.

2013-08-07  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/46206
	* name-lookup.c (lookup_name_real_1): Handle iter->type before
	iter->value.

2013-08-06  Caroline Tice  <cmtice@google.com>

	* Make-lang.in (*CXX_AND_OBJCXX_OBJS):  Add vtable-class-hierarchy.o to
	list.
	(vtable-class-hierarchy.o): Add build rule.
	* cp-tree.h (vtv_start_verification_constructor_init_function): New
	extern function decl.
	(vtv_finish_verification_constructor_init_function): New extern
	function decl.
	(build_vtbl_address): New extern function decl.
	(get_mangled_vtable_map_var_name): New extern function decl.
	(vtv_compute_class_hierarchy_transitive_closure): New extern function
	decl.
	(vtv_generate_init_routine): New extern function decl.
	(vtv_save_class_info): New extern function decl.
	(vtv_recover_class_info): New extern function decl.
	(vtv_build_vtable_verify_fndecl): New extern function decl.
	* class.c (finish_struct_1): Add call to vtv_save_class_info if
	flag_vtable_verify is true.
	* config-lang.in: Add vtable-class-hierarchy.c to gtfiles list.
	* vtable-class-hierarchy.c: New file.
	* mangle.c (get_mangled_vtable_map_var_name):  New function.
	* decl2.c (start_objects): Update function comment.
	(cp_write_global_declarations):  Call vtv_recover_class_info,
	vtv_compute_class_hierarchy_transitive_closure and
	vtv_build_vtable_verify_fndecl, before calling
	finalize_compilation_unit, and call vtv_generate_init_rount after, IFF
	flag_vtable_verify is true.
	(vtv_start_verification_constructor_init_function): New function.
	(vtv_finish_verification_constructor_init_function): New function.
	* init.c (build_vtbl_address): Remove static qualifier from function.

2013-08-06  Jason Merrill  <jason@redhat.com>

	PR c++/57825
	* tree.c (strip_typedefs) [METHOD_TYPE]: Preserve ref-qualifier.

2013-08-05  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58080
	* typeck.c (cp_pointer_int_sum): Add tsubst_flags_t parameter.
	(cp_build_binary_op): Adjust.

2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>

	* cxx-pretty-print.h (pp_c_base): Remove.
	(cxx_pretty_printer): Derive from c_pretty_printer.
	Adjust macros using pp_c_base.
	* cp-objcp-common.c (cxx_initialize_diagnostics): Do not call pp_base.
	* cxx-pretty-print.c (pp_cxx_nonconsecutive_character): Likewise.
	(pp_cxx_colon_colon): Likewise.
	(pp_cxx_separate_with): Likewise.
	(pp_cxx_storage_class_specifier): Do not call pp_c_base.
	(pp_cxx_expression_list): Likewise.
	(pp_cxx_space_for_pointer_operator): Likewise.
	(pp_cxx_init_declarator): Likewise.
	(pp_cxx_call_argument_list): Likewise.
	(pp_cxx_constant): Likewise.
	(pp_cxx_postfix_expression): Likewise.
	(pp_cxx_new_expression): Likewise.
	(pp_cxx_unary_expression): Likewise.
	(pp_cxx_cast_expression): Likewise.
	(pp_cxx_conditional_expression): Likewise.
	(pp_cxx_assignment_expression): Likewise.
	(pp_cxx_expression): Likewise.
	(pp_cxx_function_specifier): Likewise.
	(pp_cxx_decl_specifier_seq): Likewise.
	(pp_cxx_simple_type_specifier): Likewise.
	(pp_cxx_type_specifier_seq): Likewise.
	(pp_cxx_ptr_operator): Likewise.
	(pp_cxx_parameter_declaration_clause): Likewise.
	(pp_cxx_direct_declarator): Likewise.
	(pp_cxx_direct_abstract_declarator): Likewise.
	(pp_cxx_type_id): Likewise.
	(pp_cxx_statement): Likewise.
	(pp_cxx_pretty_printer_init): Tidy.
	* error.c (init_error): Do not use pp_base.
	(dump_aggr_type): Likewise.
	(dump_type_prefix): Likewise.
	(dump_type_suffix): Likewise.
	(dump_global_iord): Likewise.
	(dump_decl): Likewise.
	(dump_function_decl): Likewise.
	(dump_ref_qualifier): Likewise.
	(reinit_cxx_pp): Likewise.
	(decl_as_dwarf_string): Likewise.
	(lang_decl_dwarf_name): Likewise.
	(type_to_string): Likewise.
	(cv_to_string): Likewise.
	(cxx_print_error_function): Likewise.
	(cp_diagnostic_starter): Likewise.
	(cp_diagnostic_finalizer): Likewise.
	(cp_print_error_function): Likewise.
	(print_instantiation_context): Likewise.
	(cp_printer): Likewise.

2013-08-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>

	* error.c (dump_type_prefix): Use specialized pretty printer
	functions instead of pp_string or operators and punctuators.
	(dump_decl): Likewise.
	(dump_expr): Likewise.

2013-08-03  Jason Merrill  <jason@redhat.com>

	DR 1286
	* pt.c (get_underlying_template): New.
	(convert_template_argument, lookup_template_class_1): Use it.

	DR 1430
	PR c++/51239
	* pt.c (pack_expansion_args_count): Rename from
	any_pack_expanson_args_p.
	(coerce_template_parms): Reject pack expansion to
	non-pack template parameter of alias template.

2013-08-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>

	* error.c (dump_aggr_type): Use specialized pretty printer
	functions instead of pp_character.
	(dump_type_prefix): Likewise.
	(dump_simple_decl): Likewise.
	(type_to_string): Likewise.

2013-08-02  Paolo Carlini  <paolo.carlini@oracle.com>

	* cp-tree.h (finish_stmt): Do not declare.
	* decl.c (finish_stmt): Do not define.
	* parser.c (cp_parser_expression_statement,
	cp_parser_declaration_statement,
	cp_parser_transaction_cancel): Don't call finish_stmt.
	* semantics.c (finish_expr_stmt, finish_if_stmt,
	finish_while_stmt, finish_do_stmt, finish_return_stmt,
	finish_for_stmt, finish_switch_stmt, finish_compound_stmt,
	finish_transaction_stmt): Likewise.

2013-08-01  Fabien Chêne  <fabien@gcc.gnu.org>

	PR c++/54537
	* cp-tree.h: Check OVL_USED with OVERLOAD_CHECK.
	* name-lookup.c (do_nonmember_using_decl): Make sure we have an
	OVERLOAD before calling OVL_USED. Call diagnose_name_conflict
	instead of issuing an error without mentioning the conflicting
	declaration.

2013-07-31  Paolo Carlini  <paolo.carlini@oracle.com>

	* parser.c (cp_parser_sizeof_pack): Check cp_parser_identifier
	return value for error_mark_node.

2013-07-30  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57673
	* parser.c (cp_parser_cache_defarg): In an NSDMI don't stop when
	token->type == CPP_ELLIPSIS.

2013-07-30  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57947
	* call.c (is_std_init_list): Return false if cxx_dialect == cxx98.

2013-07-29  Jason Merrill  <jason@redhat.com>

	PR c++/57901
	* semantics.c (build_data_member_initialization, constexpr_fn_retval):
	Use break_out_target_exprs instead of unshare_expr.

2013-07-29  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57948
	* call.c (initialize_reference): Don't crash when reference_binding
	returns a conv with conv->kind == ck_ambig.

2013-07-29  Jason Merrill  <jason@redhat.com>

	* mangle.c (write_name): Check for null context.
	(write_unscoped_name): Allow PARM_DECL context.

2013-07-25  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57981
	* decl.c (check_default_argument): Take a tsubst_flags_t parameter.
	(grokparms): Adjust.
	* parser.c (cp_parser_late_parse_one_default_arg): Likewise.
	* pt.c (tsubst_default_argument, tsubst_default_arguments): Take
	a tsubst_flags_t parameter.
	(tsubst_decl): Adjust.
	* call.c (convert_default_arg): Likewise.
	* cp-tree.h (check_default_argument, tsubst_default_argument):
	Update declarations.

2013-07-25  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57880
	* parser.c (cp_parser_operator, case CPP_WSTRING, CPP_STRING16,
	CPP_STRING32, CPP_UTF8STRING, CPP_WSTRING_USERDEF,
	CPP_STRING16_USERDEF, CPP_STRING32_USERDEF, CPP_UTF8STRING_USERDEF):
	Fix string_len management, tidy.

2013-07-24  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57942
	* typeck.c (ptr_reasonably_similar): Use COMPARE_STRICT if either
	target type is incomplete; return a bool, not an int.
	* cp-tree.h (ptr_reasonably_similar): Adjust declaration.

2013-07-22  Paolo Carlini  <paolo.carlini@oracle.com>

	* cp-tree.h (DERIVED_FROM_P): Pass tf_none to lookup_base, not
	tf_warning_or_error.

2013-07-21   OndÅej BÃ­lka  <neleai@seznam.cz>

	* class.c: Fix typos.
	* cp-array-notation.c: Likewise.
	* cp-objcp-common.c: Likewise.
	* decl.c: Likewise.
	* init.c: Likewise.
	* mangle.c: Likewise.
	* parser.c: Likewise.
	* pt.c: Likewise.
	* semantics.c: Likewise.

2013-07-14  Adam Butcher  <adam@jessamine.co.uk>

	* semantics.c (build_lambda_expr),
	(build_lambda_object), (begin_lambda_type), (lambda_return_type),
	(lambda_function), (lambda_capture_field_type), (is_capture_proxy),
	(is_normal_capture_proxy), (insert_capture_proxy),
	(insert_pending_capture_proxies), (lambda_proxy_type),
	(build_capture_proxy), (vla_capture_type),
	(register_capture_members), (add_default_capture),
	(lambda_expr_this_capture), (maybe_resolve_dummy),
	(nonlambda_method_basetype), (maybe_add_lambda_conv_op) and
	(is_lambda_ignored_entity): Moved definitions into ...
	* lambda.c: ... this new file.

2013-07-14  Marc Glisse  <marc.glisse@inria.fr>

	* call.c (build_conditional_expr_1): Handle the case with 1 vector
	and 2 scalars. Call save_expr before building a vector.
	* typeck.c (cp_build_binary_op): Check complain before complaining.

2013-07-13  Lubos Lunak  <l.lunak@suse.cz>

	PR c++/55203
	* init.c (build_aggr_init): Check for warn_unused attribute.
	* decl.c (poplevel): Likewise.

2013-07-13  Jason Merrill  <jason@redhat.com>

	PR c++/57402
	* init.c (build_vec_init): Use {} for arrays of class type.
	(build_vec_delete): Don't take the address of the array.

	PR c++/57793
	* class.c (layout_class_type): Check for too-large class.

	* call.c (can_convert): Allow user-defined conversions.
	(can_convert_standard): New.
	* cp-tree.h: Declare it.
	* cvt.c (convert_to_reference): Use it.
	* pt.c (convert_nontype_argument): Likewise.
	* search.c (check_final_overrider): Likewise.
	Don't worry about user-defined conversions.

2013-07-10  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57869
	* typeck.c (build_reinterpret_cast_1): With -Wconditionally-supported
	warn about casting between pointer-to-function and pointer-to-object.

2013-07-09  Jason Merrill  <jason@redhat.com>

	PR c++/57402
	* init.c (build_vec_init): Don't take shortcuts when initializing
	a VLA.

	PR c++/57471
	* parser.c (cp_parser_sizeof_pack): Clear parser scopes.

	PR c++/57658
	* semantics.c (finish_id_expression): Return the id for an
	unevaluated outer variable.

	PR c++/57526
	* semantics.c (lambda_capture_field_type): Build a DECLTYPE_TYPE
	if the variable type uses 'auto'.

	PR c++/57437
	* typeck.c (check_return_expr): Lambda proxies aren't eligible
	for nrv or return by move.

	PR c++/57532
	* parser.c (cp_parser_ref_qualifier_opt): Don't tentatively parse
	a ref-qualifier in C++98 mode.

	PR c++/57545
	* pt.c (convert_nontype_argument) [INTEGER_CST]: Force the
	argument to have the exact type of the parameter.

	PR c++/57551
	* semantics.c (cxx_eval_indirect_ref): Don't try to look through
	a POINTER_PLUS_EXPR for type punning diagnostic.

	PR c++/57831
	* pt.c (tsubst_copy): Handle USING_DECL.

2013-07-09  Marc Glisse  <marc.glisse@inria.fr>

	PR c++/53094
	* semantics.c (cxx_eval_bit_field_ref): Handle VECTOR_CST.

2013-07-09  Marc Glisse  <marc.glisse@inria.fr>

	PR c++/53000
	* call.c (build_conditional_expr_1): Preserve xvalues.

2013-07-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/51786
	* parser.c (cp_parser_simple_declaration): Before calling shadow_tag
	also check declares_class_or_enum.

2013-07-08  Jason Merrill  <jason@redhat.com>

	PR c++/57550
	* pt.c (fn_type_unification): Only defer during substitution.
	(type_unification_real): Defer during defarg substitution,
	add checks parm to pass back deferred checks.
	(unify, do_auto_deduction): Adjust.
	* semantics.c (reopen_deferring_access_checks): New.
	* cp-tree.h: Declare it.

2013-07-06  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/28262
	* parser.c (cp_parser_init_declarator): If we are parsing a typedef
	set parser->default_arg_ok_p to false before cp_parser_declarator.

2013-07-05  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/14263
	* class.c (build_base_path): Improve diagnostic.

2013-07-04  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/38634
	* decl.c (start_preparsed_function): Return a bool, false if
	push_template_decl fails.
	(start_function): Adjust.
	* cp-tree.h: Update.

2013-07-03  Jakub Jelinek  <jakub@redhat.com>

	PR c++/57771
	* parser.c (cp_parser_postfix_expression) <case RID_STATCAST>
	Temporarily set parser->greater_than_is_operator_p for
	cp_parser_expression and restore from saved value afterwards.

2013-06-28  Ed Smith-Rowland  <3dw4rd@verizon.net>

	* cp-tree.h (UDLIT_OP_ANSI_PREFIX): Remove space.
	* parser.c (cp_parser_operator()): Parse user-defined string
	literal as literal operator.

2013-06-28  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57645
	* class.c (deduce_noexcept_on_destructors): Save, set, and restore
	TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t) around the main loop over the
	destructors.

2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>

	* parser.c (cp_parser_array_notation): Removed rejection array notation
	of type function pointers. Added handling of array expressions when
	Cilk Plus is enabled.  Took out type-checking.
	(cp_parser_postfix_open_square_expression): Moved normal array expr.
	parsing into cp_parser_array_notation when cilkplus is enabled.
	(cp_parser_compound_statement): Removed expansion of array notations.
	(cp_parser_ctor_initializer_opt_and_function_body): Likewise.
	(cp_parser_function_definition_after_declarator): Likewise.
	(cp_parser_selection_statement): Removed error reporting.
	(cp_parser_iteration_statement): Likewise.
	(cp_parser_direct_declarator): Removed error checking/reporting if
	array notations are used in the declarator.
	* pt.c (instantiate_decl): Likewise.
	(type_unification_real): Removed a check for ARRAY_NOTATION_REF.
	(cxx_eval_constant_expression): Removed ARRAY_NOTATION_REF case.
	(potential_constant_expression_1): Returned false for
	ARRAY_NOTATION_REF case.
	* cp-gimplify.c (cp_genericize): Added expansion of array notation
	expressions here.
	* cp-array-notation.c (make_triplet_val_inv): Removed loc and cry
	parameters.  Replaced build_decls with get_temp_regvar with type as
	ptrdiff.
	(create_array_refs): Made the type-casting to ptrdiff_type.
	(replace_invariant_var): Added a check for void return type before
	creating new var.  Replaced build_decl and build_min_nt_loc with
	get_temp_regvar.
	(expand_an_in_modify_expr): Ditto.  Replaced body of redundant else
	with gcc_unreachable.  Removed few unwanted checks.  Made induction
	variable type as ptrdiff_type.  Removed loc and complain arguments
	passed into make_triplet_val_inv.  Replaced all modify expression's
	code from NOP EXPR to INIT EXPR.  Replaced all forceful appending
	into stmt. list with the non-forceful one.  Replaced some integer
	conversion and equality-checking to using tree_int_cst_equal.
	(expand_sec_reduce_builtin): All changes mentioned in above function
	expand_an_in_modify_expr.  Made the new variable type of
	SEC_REDUCE_ANY/ALL_{NON}ZERO intrinsic functions as bool.
	(expand_array_notation_exprs): Removed SWITCH_EXPR case.  Moved all
	the error reporting from parser to this function.  Removed unwanted
	statements and checks from SWITCH_STMT, WHILE_STMT, and DO_STMT cases.
	(cilkplus_an_triplet_types_ok_p): Removed rejection of array notation
	in function pointers.
	(cp_expand_cond_array_notations): Added a new if statements to check
	if condition has a zero rank.  If so, then just return.
	(expand_return_expr): Added a check for return expressions with a rank.
	Replaced get_tmp_regvar with a create_temporary_var.
	(build_array_notation_ref): Simplified and removed unwanted if-stmts.
	Moved common code outside if-statements.  Moved type-checking from
	parser to here.
	* semantics.c (finish_return_stmt): Removed a check for return exprs.
	with a rank.
	* call.c (convert_like_real): Removed a check for array notation
	expression in a function.
	(build_over_call): Likewise.
	(magic_varargs_p): Added a check for builtin array notation function.
	Made this function non-static and removed its prototype.
	* cp-tree.h (magic_varargs_p): New prototype.
	* typeck.c (cp_build_function_call_vec): Removed automatic setting of
	nargs to the param->length when builtin reduction function is used.
	(convert_arguments): Replaced check for a constant_p function with
	margic_varargs_p function call.
	(cp_build_binary_op): Removed calling of the function
	find_correct_array_notation_type.
	(cp_build_addr_expr_1): Removed an unwanted if-statement.
	(convert_for_assignment): Removed automatic return of rhs when array
	notation builtin function is used.

2013-06-28  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57682
	* parser.c (cp_parser_save_member_function_body): Handle correctly
	curly braces in function-try-block mem-initializers.

2013-06-27  Marc Glisse  <marc.glisse@inria.fr>

	PR c++/57509
	* typeck.c (cp_build_vec_perm_expr): New function.
	* cp-tree.h: Declare it.
	* parser.c (cp_parser_postfix_expression): Call it.
	* pt.c (tsubst_copy): Handle VEC_PERM_EXPR.
	(tsubst_copy_and_build): Likewise.

2013-06-27  Marc Glisse  <marc.glisse@inria.fr>

	PR c++/57172
	* pt.c (more_specialized_fn): If both arguments are references,
	give priority to an lvalue.

2013-06-26  Jason Merrill  <jason@redhat.com>

	* typeck2.c (store_init_value): Diagnose a non-constant
	initializer for in-class static.

	PR c++/57408
	* semantics.c (add_capture): Set type to error_mark_node after
	error.

2013-06-25  Ed Smith-Rowland  <3dw4rd@verizon.net>

	PR c++/57640
	* parser.c (cp_parser_unqualified_id): Add declarator_p to checks
	to trigger warning, (cp_literal_operator_id): Remove bogus TODO comment.

2013-06-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>

	* call.c (null_ptr_cst_p): Use cxx11 in lieu of cxx0x.
	* class.c (add_implicitly_declared_members): Likewise.
	(check_field_decl): Likewise.
	(finalize_literal_type_property): Likewise.
	(check_bases_and_members): Likewise.
	* decl.c (poplevel): Likewise.
	(case_conversion): Likewise.
	(check_initializer): Likewise.
	(grokfndecl): Likewise.
	(check_static_variable_definition): Likewise.
	(compute_array_index_type): Likewise.
	(grokdeclarator): Likewise.
	(build_enumerator): Likewise.
	* friend.c (make_friend_class): Likewise.
	* lex.c (init_reswords): Likewise.
	* method.c (synthesized_method_walk): Likewise.
	(implicitly_declare_fn): Likewise.
	* parser.c (cp_parser_diagnose_invalid_type_name): Likewise.
	(cp_parser_constant_expression): Likewise.
	(cp_parser_for_init_statement): Likewise.
	(cp_parser_block_declaration): Likewise.
	(cp_parser_type_name): Likewise.
	(cp_parser_enum_specifier): Likewise.
	(cp_parser_enumerator_list): Likewise.
	(cp_parser_member_declaration): Likewise.
	(cp_nth_tokens_can_be_std_attribute_p): Likewise.
	(cp_parser_template_declaration_after_export): Likewise.
	* pt.c (convert_nontype_argument_function): Likewise.
	(convert_nontype_argument): Likewise.
	(convert_template_argument): Likewise.
	(tsubst_copy_and_build): Likewise.
	(build_non_dependent_expr): Likewise.
	* semantics.c (non_const_var_error): Likewise.
	(potential_constant_expression_1): Likewise.
	* tree.c (lvalue_kind): Likewise.
	(build_vec_init_expr): Likewise.
	(cast_valid_in_integral_constant_expression_p): Likewise.
	* typeck.c (build_x_conditional_expr): Likewise.
	* typeck2.c (check_narrowing): Likewise.

2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>

	* cp-array-notation.c (cp_length_mismatch_in_expr_p): Remove.
	(expand_an_in_modify_expr): Changed a function call from the above
	removed function to length_mismatch_in_expr_p.

2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>

	* call.c (convert_like_real): Added a check if array notation is present
	in expression.  If so, then no conversion of arguments is necessary.
	(build_over_call): Likewise.
	* typeck.c (cp_build_function_call_vec): Likewise.
	(convert_for_assignment): Likewise.
	(cp_build_array_ref): Reject array notations with a rank greater than 1
	as an array's index.
	(cp_build_binary_op): If array notations are preent in op, then call
	find_correct_array_notation_type.
	(cp_build_addr_expr_1): Handle ARRAY_NOTATION_REF similar to ARRAY_REF.
	* cp-array-notation.c: New file.
	* cp-objcp-common.c (cp_common_init_ts): Marked ARRAY_NOTATION_REF tree
	as typed.
	* cp-tree.h (fix_array_notation_exprs): New prototype.
	* semantics.c (finish_return_stmt): Reject array notations as
	return value.
	(cxx_eval_constant_expression): Added ARRAY_NOTATION_REF case.
	(potential_constant_expression_1): Likewise.
	* tree.c (lvalue_kind): Likewise.
	* error.c (dump_decl): Likewise.
	(dump_expr): Likewise.
	* pt.c (ARRAY_NOTATION_REF): Likewise.
	(type_unification_real): Do not unify any arguments if array notations
	are found in arg.
	(instantiate_decl): Added a check for array notaitons inside the
	function body.  If so, then expand them.
	* parser.c (cp_parser_array_notation): New function.
	(cp_parser_postfix_open_square_expression): Added a check for colons
	inside square braces.  If found, then handle the array access as an
	array notation access.  Also, disable auto-correction from a single
	colon to scope when Cilk Plus is enabled.
	(cp_parser_compound_statement): Added a check for array notations
	inside the statement.  If found, then expand them.
	(cp_parser_ctor_initializer_opt_and_function_body): Likewise.
	(cp_parser_function_definition_after_declarator): Likewise.
	(cp_parser_selection_statement): Searched for array notations inside
	condition.  If so, then emit an error.
	(cp_parser_iteration_statement): Likewise.
	(cp_parser_direct_declarator): Reject array notations inside a
	variable or array declaration.
	* Make-lang.in (CXX_AND_OBJCXX_OBJS): Added cp/cp-array-notation.o.

2013-06-20  Jason Merrill  <jason@redhat.com>

	PR c++/55149
	* decl.c (compute_array_index_type): Don't reject VLAs in SFINAE
	context if we're in C++14 mode.
	* tree.c (array_of_runtime_bound_p): Return true for a dependent
	bound that is not potentually constant.
	* cp-tree.h (DECL_VLA_CAPTURE_P, REFERENCE_VLA_OK): New.
	* pt.c (tsubst) [REFERENCE_TYPE]: Check REFERENCE_VLA_OK.
	* semantics.c (build_lambda_object): Don't rvalue a VLA capture.
	(build_capture_proxy): Set REFERENCE_VLA_OK.
	(vla_capture_type): Make it a proper C++ class.
	(add_capture): Set DECL_VLA_CAPTURE_P.  Don't pre-digest the
	initializer.

	* decl.c (compute_array_index_type): Use size_one_node.

	* pt.c (process_partial_specialization): Build a TEMPLATE_DECL for
	a partial specialization.
	(tsubst_decl): Don't clobber CLASSTYPE_TI_TEMPLATE of a partial
	specialization.
	(most_specialized_class): Adjust.

	* cp-tree.h (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT)
	(DECL_TEMPLATE_INSTANTIATIONS, DECL_TEMPLATE_SPECIALIZATIONS): Use
	TEMPLATE_DECL_CHECK.

2013-06-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	PR c++/57638
	* pt.c (unify, [TEMPLATE_PARM_INDEX]): Pass to unify_type_mismatch
	TREE_TYPE (arg), not arg itself.

2013-06-18  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/53211
	* pt.c (type_dependent_expression_p): Handle an array of unknown
	bound depending on a variadic parameter.
	* parser.c (cp_parser_range_for): Revert PR56794 changes.

2013-06-17  Richard Biener  <rguenther@suse.de>

	* cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h.

2013-06-17  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/16128
	* parser.c (cp_parser_expression_statement): Check whether
	cp_parser_expression returns error_mark_node.

2013-06-14  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/51413
	* semantics.c (finish_offsetof): Handle INDIRECT_REF as expr.

2013-06-14  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57599
	* rtti.c (build_dynamic_cast_1): In case of cast to an unambiguous
	accessible base simply forward to build_static_cast.

2013-06-12  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/38958
	* decl.c (poplevel): For the benefit of -Wunused-variable see
	through references.

2013-06-12  Paolo Carlini  <paolo.carlini@oracle.com>

	* parser.c (cp_parser_nested_name_specifier_opt): Fix typo in comment.

2013-06-12  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/42021
	* parser.c (cp_parser_nested_name_specifier_opt): Avoid emitting
	again diagnostic already emitted by cp_parser_lookup_name.

2013-06-11  Jan Hubicka  <jh@suse.cz>

	PR c++/57551
	* cp/pt.c (mark_decl_instantiated): Do not export explicit
	instantiations of anonymous namespace templates.

2013-06-10  Jason Merrill  <jason@redhat.com>

	* name-lookup.c (add_decl_to_level): Add decls in an anonymous
	namespace to static_decls.

2013-06-07  Sriraman Tallam  <tmsriram@google.com>

	PR c++/57548
	* call.c (build_over_call):  Check if current_function_decl is
	NULL.

2013-06-07  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/53658
	* pt.c (lookup_template_class_1): Consistently use TYPE_MAIN_DECL,
	not TYPE_STUB_DECL, to access the _DECL for a _TYPE.

2013-06-06  Jason Merrill  <jason@redhat.com>

	PR c++/55520
	* semantics.c (add_capture): Diagnose capture of variable-size
	type that is not a C++1y array of runtime bound.

	* decl.c (grokdeclarator): Keep a decl with error type.
	(grokfield, grokbitfield): Likewise.
	* pt.c (instantiate_class_template_1): Likewise.
	(tsubst_decl): Drop redundant error.
	* class.c (walk_subobject_offsets): Handle erroneous fields.
	* typeck2.c (process_init_constructor_record): Likewise.

2013-06-05  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/51908
	* parser.c (cp_parser_postfix_expression [RID_*CAST]): Set
	parser->in_type_id_in_expr_p before calling cp_parser_type_id.

2013-06-03  Jan Hubicka  <jh@suse.cz>

	* decl2.c (maybe_make_one_only): Use forced_by_abi instead of
	mark_decl_referenced.
	(mark_needed): Likewise.

2013-06-03  Jason Merrill  <jason@redhat.com>

	* class.c (mark_type_abi_tags): New.
	(check_abi_tags): Use it.

2013-06-03  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57419
	* decl2.c (mark_used): Add overload taking a tsubst_flags_t too.
	* semantics.c (finish_qualified_id_expr): Use it.
	* cp-tree.h: Update.

2013-06-01  Jan Hubicka  <jh@suse.cz>

	* decl2.c (cp_write_global_declarations): Replace same_body_alias
	by symbol.cpp_implicit_alias.

2013-05-30  Jason Merrill  <jason@redhat.com>

	PR c++/57404
	* cp-lang.c (cp_classify_record): Handle structs without
	TYPE_LANG_SPECIFIC.

	PR c++/52377
	* class.c (common_enclosing_class): New.
	* cp-tree.h: Declare it.
	* init.c (sort_mem_initializers): Don't splice out a union member
	with an NSDMI.

2013-05-29  Jan Hubicka  <jh@suse.cz>

	* tree.c (cp_fix_function_decl_p): Update for new symtab flags.
	* decl2.c )var_finalized_p, cp_write_global_declarations): Likewise.

2013-05-25  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/25666
	* decl2.c (check_classfn): Check for destructors declared as member
	templates.

2013-05-24  Jason Merrill  <jason@redhat.com>

	PR c++/56971
	* pt.c (any_template_arguments_need_structural_equality_p): A
	TEMPLATE_TEMPLATE_PARM can require structural type comparison.

2013-05-24  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/19618
	* class.c (check_bitfield_decl): Warn for bool and enum bitfields
	with width exceeding the type.

2013-05-24  Jason Merrill  <jason@redhat.com>

	PR c++/57391
	* semantics.c (cxx_eval_constant_expression): Handle FMA_EXPR.
	(cxx_eval_trinary_expression): Rename from cxx_eval_vec_perm_expr.

2013-05-23  Jason Merrill  <jason@redhat.com>

	PR c++/57388
	* tree.c (build_ref_qualified_type): Clear
	FUNCTION_RVALUE_QUALIFIED for lvalue ref-qualifier.

2013-05-22  Jason Merrill  <jason@redhat.com>

	PR c++/56930
	* call.c (convert_like_real): Use cp_convert_and_check.
	* cvt.c (cp_convert_and_check): Use maybe_constant_value.
	* semantics.c (cxx_eval_constant_expression): Handle LTGT_EXPR.
	(potential_constant_expression_1): Handle OMP_ATOMIC*.

	PR c++/56915
	* semantics.c (maybe_add_lambda_conv_op): Give up if the call op
	isn't defined.

2013-05-22  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57352
	* parser.c (cp_parser_conversion_type_id): Set up
	parser->type_definition_forbidden_message before calling
	cp_parser_type_specifier_seq.

2013-05-22  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57211
	* method.c (defaultable_fn_check): Avoid do_warn_unused_parameter
	warnings about defaulted functions.

2013-05-21  Paolo Carlini  <paolo.carlini@oracle.com>

	* call.c (build_conditional_expr_1): Add location_t parameter.
	(build_conditional_expr): Likewise.
	* typeck.c (rationalize_conditional_expr, cp_build_array_ref,
	get_member_function_from_ptrfunc, build_x_conditional_expr,
	cp_build_modify_expr): Update.
	* init.c (build_new_1): Likewise.
	* cp-tree.h: Update declaration.

2013-05-20  Jason Merrill  <jason@redhat.com>

	PR c++/57016
	* pt.c (instantiation_dependent_r) [TRAIT_EXPR]: Only check type2
	if there is one.

	PR c++/57102
	* decl.c (fndecl_declared_return_type): Also look in
	DECL_SAVED_FUNCTION_DATA.

2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/12288
	* parser.c (cp_parser_parameter_declaration): Check return value
	of cp_parser_parse_and_diagnose_invalid_type_name.

2013-05-20  Jason Merrill  <jason@redhat.com>

	PR c++/57319
	* class.c (vbase_has_user_provided_move_assign): New.
	* method.c (synthesized_method_walk): Check it.
	* cp-tree.h: Declare it.

	PR c++/57325
	* tree.c (build_cplus_array_type): Copy layout info if element
	type is complete.

2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/23608
	* call.c (build_new_op_1): Propagate loc to cp_build_binary_op.

2013-05-20  Jason Merrill  <jason@redhat.com>

	PR c++/57317
	* decl2.c (determine_visibility): Use PRIMARY_TEMPLATE_P to decide
	whether a template has its own args.

2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57327
	* pt.c (unify_no_common_base): Swap arg and parm arguments to inform.

2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/10207
	* parser.c (cp_parser_postfix_expression): Use cp_parser_braced_list
	instead of cp_parser_initializer_list for compound-literals.

2013-05-20  Marc Glisse  <marc.glisse@inria.fr>

	PR c++/57175
	* typeck.c (check_return_expr): Reverse the alignment comparison.

2013-05-17  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/18126
	* parser.c (cp_parser_sizeof_operand): As a GNU Extension, parse
	correctly sizeof compound-literal; update comments.

2013-05-16  Marc Glisse  <marc.glisse@inria.fr>

	* call.c (build_conditional_expr_1): Use cp_build_binary_op
	instead of directly calling fold_build2.

2013-05-16  Jason Merrill  <jason@redhat.com>

	* Make-lang.in (cc1plus$(exeext)): Use link mutex.

	PR c++/57279
	* decl.c (grokdeclarator): Allow member function qualifiers in
	TYPENAME context in C++11 mode.

2013-05-16  Dodji Seketeli  <dodji@redhat.com>

	PR c++/56782 - Regression with empty pack expansions
	* pt.c (use_pack_expansion_extra_args_p): When at least a
	parameter pack has an empty argument pack, and another parameter
	pack has no argument pack at all, use the PACK_EXPANSION_EXTRA
	mechanism.

2013-05-15  Paolo Carlini  <paolo.carlini@oracle.com>

	* name-lookup.c (pushdecl_maybe_friend_1): Replace pairs of
	warning_at and permerror with warning_at/inform and permerror/
	inform, respectively.

2013-05-15  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/31952
	* name-lookup.c (pushdecl_maybe_friend_1): Diagnose illegal
	redeclarations.

2013-05-14  Jason Merrill  <jason@redhat.com>

	PR c++/57243
	* parser.c (cp_parser_range_for): Call complete_type.

	PR c++/57041
	* pt.c (tsubst_copy_and_build): Don't recur into a designator.

2013-05-14  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/53903
	* method.c (defaulted_late_check): Check for compatible exception
	specification out of class explicitly defaulted functions too.

2013-05-14  Jason Merrill  <jason@redhat.com>

	PR c++/56998
	* semantics.c (potential_constant_expression_1): Make sure the
	called function is potentially constant.
	* call.c (null_ptr_cst_p): Revert earlier change.

2013-05-13  Jason Merrill  <jason@redhat.com>

	PR c++/56998
	* call.c (null_ptr_cst_p): An expression with side-effects can't
	be a C++03 null pointer constant.

	PR c++/57041
	* decl.c (reshape_init_class): Handle error_mark_node.

	PR c++/57254
	* typeck.c (merge_types): Propagate ref-qualifier
	in METHOD_TYPE case.

	PR c++/57253
	* decl.c (grokdeclarator): Apply ref-qualifier
	in the TYPENAME case.

	PR c++/57252
	* decl.c (decls_match): Compare ref-qualifiers.

2013-05-10  Jason Merrill  <jason@redhat.com>

	PR c++/57196
	* pt.c (convert_template_argument): Use dependent_template_arg_p,
	not uses_template_parms.

	PR c++/57047
	* semantics.c (cxx_fold_indirect_ref): Fix thinko.

	PR c++/55149
	* semantics.c (add_capture): Error rather than abort on copy
	capture of VLA.
	* typeck.c (maybe_warn_about_returning_address_of_local): Don't
	warn about capture proxy.

2013-05-09  Jason Merrill  <jason@redhat.com>

	* decl.c (cp_finish_decl): Only check VLA bound in C++1y mode.

	PR c++/57222
	* pt.c (lookup_template_class_1): Handle getting a template
	template parameter as D1.

	N3639 C++1y VLA diagnostics
	* decl.c (grokdeclarator): Complain about reference, pointer, or
	typedef to VLA.
	(create_array_type_for_decl): Complain about array of VLA.
	* pt.c (tsubst): Likewise.
	* rtti.c (get_tinfo_decl): Talk about "array of runtime bound".
	* semantics.c (finish_decltype_type): Complain about decltype of VLA.
	* typeck.c (cp_build_addr_expr_1): Complain about VLA.
	(cxx_sizeof_or_alignof_type): Likewise.

	N3639 C++1y VLA support
	* decl.c (compute_array_index_type): Allow VLAs in C++1y mode.
	(check_array_initializer): Allow VLA init.
	(reshape_init_array_1): Adjust.
	(cp_finish_decl): Check for invalid VLA length.
	* typeck2.c (process_init_constructor_array): Adjust.
	(store_init_value): Use build_vec_init for VLAs.
	* semantics.c (add_capture): Capture VLA as ptr+len.
	(vla_capture_type): New.
	(build_capture_proxy): Rebuild the VLA.
	* typeck.c (build_simple_component_ref): Split out from...
	(build_ptrmemfunc_access_expr): ...here.
	* tree.c (array_of_runtime_bound_p): New.
	* init.c (throw_bad_array_length): New.
	(build_vec_init): Use it.
	* parser.c (cp_convert_range_for): When iterating over a VLA,
	use it directly rather than bind a reference.
	* cp-tree.h: Declare new functions.

2013-05-08  Jason Merrill  <jason@redhat.com>

	* except.c (is_admissible_throw_operand_or_catch_parameter): Check
	variably_modified_type_p.
	(expand_start_catch_block): Mark the typeinfo used here.
	* semantics.c (finish_handler_parms): Not here.

	* error.c (dump_type_suffix): Try harder on VLA length.

	Core 624/N2932
	* init.c (throw_bad_array_new_length): New.
	(build_new_1): Use it.  Don't warn about braced-init-list.
	(build_vec_init): Use it.
	* call.c (build_operator_new_call): Use it.

	PR c++/57068
	* decl.c (grokdeclarator): Warn about ref-qualifiers here.
	* parser.c (cp_parser_ref_qualifier_seq_opt): Not here.
	* error.c (maybe_warn_cpp0x): s/0x/11/.

2013-05-08  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/51226
	* parser.c (cp_parser_enum_specifier): Handle nested_name_specifier
	== error_mark_node.

2013-05-06  Marc Glisse  <marc.glisse@inria.fr>

	* typeck.c (cp_build_binary_op): Call save_expr before
	build_vector_from_val.

2013-05-06  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57183
	* decl.c (cp_finish_decl): After do_auto_deduction copy the
	qualifers with cp_apply_type_quals_to_decl.

2013-05-05  Paolo Carlini  <paolo.carlini@oracle.com>

	* pt.c (convert_nontype_argument): Add missing whitespace in
	error message.

2013-05-04  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/53745
	* decl.c (build_enumerator): Improve error message.

2013-05-03  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/14283
	* parser.c (cp_parser_diagnose_invalid_type_name): Improve error
	messages for template types and fix column numbers.

2013-05-01  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57132
	* pt.c (tsubst_copy_and_build, MODOP_EXPR): Increase / decrease
	c_inhibit_evaluation_warnings around build_x_modify_expr call.

2013-05-01  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57092
	* semantics.c (finish_decltype_type): Handle instantiated template
	non-type arguments.

2013-04-28  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/56450
	* semantics.c (finish_decltype_type): Handle COMPOUND_EXPR.

2013-04-26  Jakub Jelinek  <jakub@redhat.com>

	* error.c (cp_print_error_function): Adjust file_name_as_prefix
	caller.

2013-04-25  Jason Merrill  <jason@redhat.com>

	PR c++/56859
	* typeck.c (cxx_alignas_expr): Handle value-dependence properly.

	PR c++/50261
	* init.c (perform_member_init): Call reshape_init.

2013-04-24  Jason Merrill  <jason@redhat.com>

	PR c++/53721
	* parser.c (cp_parser_postfix_dot_deref_expression): Fix thinko.

2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>

	* typeck.c (cxx_sizeof_or_alignof_type): Change -Wpointer-arith
	pedwarn to simply use OPT_Wpointer_arith.
	(cp_build_unary_op): Likewise.

2013-04-24  Jason Merrill  <jason@redhat.com>

	N3648: init-captures are named.
	* semantics.c (add_capture): Don't prepend "__" to init-captures.
	(build_capture_proxy): Adjust.
	* error.c (dump_simple_decl): Check DECL_NORMAL_CAPTURE_P.

	N3648: Allow braced and parenthesized initializers.
	* parser.c (cp_parser_lambda_introducer): Use cp_parser_initializer.
	* pt.c (tsubst) [DECLTYPE_TYPE]: Handle DECLTYPE_FOR_INIT_CAPTURE.
	* semantics.c (lambda_capture_field_type): Use do_auto_deduction.
	(add_capture): Collapse a parenthesized initializer into a single
	expression.
	* cp-tree.h (DECLTYPE_FOR_INIT_CAPTURE): New.

2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/56970
	* init.c (build_offset_ref): Add tsubst_flags_t parameter.
	* semantics.c (finish_qualified_id_expr): Likewise.
	(finish_id_expression): Update.
	* typeck.c (cp_build_addr_expr_1): Likewise.
	* pt.c (tsubst_qualified_id, resolve_nondeduced_context): Likewise.
	* cp-tree.h: Update declarations.

2013-04-22  Jason Merrill  <jason@redhat.com>

	Core 1586
	* parser.c (cp_parser_unqualified_id): Handle ~auto.
	(cp_parser_pseudo_destructor_name): Likewise.
	(cp_parser_postfix_dot_deref_expression): Adjust.
	(cp_lexer_nth_token_is_keyword): New.
	* semantics.c (finish_pseudo_destructor_expr): Handle ~auto.
	* typeck.c (lookup_destructor): Handle ~auto.

	* pt.c (fn_type_unification): Push tinst level around
	type_unification_real if we aren't explaining.
	* cp-tree.h (TFF_NO_TEMPLATE_BINDINGS): New.
	* error.c (dump_function_decl): Respect it.
	(subst_to_string): Pass it.

	PR c++/48665
	* rtti.c (get_typeid): Diagnose qualified function type.
	* pt.c (tsubst) [POINTER_TYPE]: Likewise.

	* error.c (dump_aggr_type): Fix lambda detection.
	(dump_simple_decl): Pretty-print capture field.

	N3323
	* cvt.c (build_expr_type_conversion): Two conversions that return
	the same type aren't necessarily ambiguous.

	N3648
	* parser.c (cp_parser_lambda_introducer): Make lambda capture init
	pedwarn unconditional except in C++1y mode.

	* semantics.c (potential_constant_expression_1): Don't crash on
	'this' in NSDMI.

	Core 1612
	* semantics.c (finish_id_expression): Reject capture of anonymous
	union member.

	Core 1609
	* decl2.c (check_default_args): Check for pack expansion.

	* mangle.c (write_type): Mangle decltype(auto).

2013-04-19  Jason Merrill  <jason@redhat.com>

	N3638 changes to return type deduction
	* decl.c (undeduced_auto_decl): New.
	(require_deduced_type): New.
	(fndecl_declared_return_type): New.
	(decls_match): Use it.
	(duplicate_decls): Don't check for auto return.
	(grokdeclarator): Reject virtual auto.
	* class.c (resolve_address_of_overloaded_function): Handle
	auto function templates.
	* decl2.c (mark_used): Use undeduced_auto_decl, require_deduced_type.
	* cp-tree.h: Declare new fns.
	* error.c (dump_function_decl): Use fndecl_declared_return_type.
	* search.c (check_final_overrider): Likewise.
	* pt.c (make_decltype_auto): New.
	(do_auto_deduction): Require plain decltype(auto).
	(is_auto): Adjust.

	DR 941
	* decl.c (duplicate_decls): Don't propagate DECL_DELETED_FN to
	template specializations.

2013-04-16  Ed Smith-Rowland  <3dw4rd@verizon.net>

	Implement n3599 - Literal operator templates for strings.
	* parser.c (make_string_pack (tree value)): New function.
	(cp_parser_userdef_string_literal (cp_token *)): Use it
	to construct calls to character string literal operator templates.
	(cp_parser_template_declaration_after_export): Check for new string
	literal operator template parameter form.

2013-04-15  Jason Merrill  <jason@redhat.com>

	* pt.c (tsubst) [DECLTYPE_TYPE]: Use tsubst_copy_and_build.

	PR c++/52748
	* pt.c (tsubst) [DECLTYPE_TYPE]: If ~id is an expression
	rather than a destructor name, it isn't an unqualified-name.
	(tsubst_copy_and_build): Pass down decltype_flag to operator
	handling code, too.

	PR c++/56388
	* semantics.c (insert_capture_proxy): Just use index 1 in the
	stmt_list_stack.

2013-04-12  Jakub Jelinek  <jakub@redhat.com>

	* error.c (cp_print_error_function,
	print_instantiation_partial_context_line,
	maybe_print_constexpr_context): Colorize locus strings.

2013-04-11  Jason Merrill  <jason@redhat.com>

	PR c++/52748
	* parser.c (complain_flags): New.
	(cp_parser_postfix_expression): Use it.
	(cp_parser_unary_expression): Likewise.
	(cp_parser_binary_expression): Likewise.
	(cp_parser_assignment_expression): Likewise.
	(cp_parser_expression): Likewise.
	(cp_parser_postfix_open_square_expression): Take decltype_p.
	(cp_parser_builtin_offsetof): Adjust.
	(cp_convert_range_for): Pass complain to finish_unary_op_expr.
	* decl2.c (grok_array_decl): Add decltype_p parm.
	* cp-tree.h: Adjust prototype.
	* semantics.c (finish_unary_op_expr): Add complain parm.

2013-04-11  Jakub Jelinek  <jakub@redhat.com>

	PR c++/56895
	* call.c (null_ptr_cst_p): Call fold_non_dependent_expr_sfinae before
	calling maybe_constant_value for C++98.

2013-04-11  Jason Merrill  <jason@redhat.com>

	PR c++/56901
	* semantics.c (lambda_capture_field_type, lambda_proxy_type):
	Strip references before checking WILDCARD_TYPE_P.

2013-04-11  Paolo Carlini  <paolo.carlini@oracle.com>

	* call.c (build_conditional_expr_1, build_over_call): Protect
	error calls with complain & tf_error.
	* typeck.c (finish_class_member_access_expr, cp_build_binary_op,
	build_x_unary_op, cp_build_unary_op, cp_build_compound_expr,
	build_ptrmemfunc): Likewise.
	(lookup_destructor): Take tsubst_flags_t parameter, adjust.

	* cvt.c (warn_ref_binding): Rename to diagnose_ref_binding.
	(convert_to_reference): Adjust.

2013-04-11  Jason Merrill  <jason@redhat.com>

	* pt.c (tsubst_copy) [VAR_DECL]: Don't call tsubst for
	local variables, look them up instead.
	(tsubst_decl) [VAR_DECL]: Remove handling for anonymous union
	proxies and substitution in unevaluated context.
	(tsubst_expr) [OMP_FOR]: Instantiate OMP_FOR_PRE_BODY
	before the iterators.

	PR c++/23055
	* pt.c (uses_deducible_template_parms): New.
	(deducible_array_bound, deducible_expression): New.
	(deducible_template_args): New.
	(unify_one_argument): Call uses_deducible_template_parms.

2013-04-11  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/56913
	* typeck2.c (build_m_component_ref): Protect error calls with
	(complain & tf_error).

2013-04-11  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/54216
	* parser.c (cp_parser_enum_specifier): Check for empty
	anonymous enums and anonymous scoped enums.

2013-04-10  Jakub Jelinek  <jakub@redhat.com>

	PR c++/56895
	* typeck.c (cp_build_binary_op): Call fold_non_dependent_expr_sfinae
	first before calling maybe_constant_value for warn_for_div_by_zero
	or invalid shift count warning purposes.

2013-04-09  Jason Merrill  <jason@redhat.com>

	PR c++/25466
	* rtti.c (build_typeid): Check the address of the argument
	rather than looking for an INDIRECT_REF.

2013-04-04  Jason Merrill  <jason@redhat.com>

	PR c++/56838
	PR c++/17232
	* typeck2.c (abstract_virtuals_error_sfinae): Disable
	complete_type again.

2013-04-08  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/56871
	* decl.c (validate_constexpr_redeclaration): Allow an explicit
	specialization to be different wrt the constexpr specifier.

2013-04-06  Jason Merrill  <jason@redhat.com>

	* parser.c (cp_parser_std_attribute): Treat [[noreturn]] like GNU
	noreturn attribute.

2013-04-05  Ed Smith-Rowland  <3dw4rd@verizon.net>

	* parser.c (cp_parser_ref_qualifier_seq_opt): Move to
	cp_parser_ref_qualifier_opt.  Error if more than one ref-qual found.

2013-04-03  Jason Merrill  <jason@redhat.com>

	* cp-tree.h (FUNCTION_OR_METHOD_TYPE_CHECK): Remove.
	(TYPE_RAISES_EXCEPTIONS): Use FUNC_OR_METHOD_CHECK instead.
	(FUNCTION_REF_QUALIFIED, FUNCTION_RVALUE_QUALIFIED): Likewise.

	* mangle.c (write_type): When writing a function type with
	function-cv-quals, don't add the unqualified type as a
	substitution candidate.

2013-04-03  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/56815
	* typeck.c (cp_build_unary_op): Change -Wpointer-arith permerror to
	pedwarn.

2013-04-03  Jakub Jelinek  <jakub@redhat.com>

	PR debug/56819
	* tree.c (strip_typedefs): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT
	from args to new_args.
	(strip_typedefs_expr): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT from t to
	r instead of doing {S,G}ET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.

2013-04-02  Jason Merrill  <jason@redhat.com>

	PR c++/56821
	* mangle.c (write_function_type): Mangle ref-qualifier.
	(write_nested_name): Likewise.
	(canonicalize_for_substitution): Preserve ref-qualifier.
	(write_type): Likewise.

	PR c++/34949
	* decl.c (begin_destructor_body): Clobber the object in a cleanup.

2013-04-02  Paolo Carlini  <paolo.carlini@oracle.com>

	* friend.c (do_friend): Use COMPLETE_OR_OPEN_TYPE_P.
	* pt.c (find_parameter_packs_r): Use TYPE_ALIAS_P and TYPE_TI_ARGS.
	(for_each_template_parm_r): Use TYPE_TI_ARGS.

2013-04-02  Paolo Carlini  <paolo.carlini@oracle.com>

	* cp-tree.h (TAGGED_TYPE_P): Remove.
	(IS_OVERLOAD_TYPE): Rename to OVERLOAD_TYPE_P, adjust.
	(TYPE_ANONYMOUS_P): Adjust.
	* call.c (build_new_op_1): Likewise.
	* class.c (find_abi_tags_r): Likewise.
	* decl.c (warn_misplaced_attr_for_class_type, start_decl,
	type_is_deprecated): Likewise.
	* decl2.c (grokfield, min_vis_r): Likewise.
	* pt.c (get_template_info): Likewise.
	* tree.c (handle_abi_tag_attribute): Likewise.

2013-04-01  Jason Merrill  <jason@redhat.com>

	* semantics.c (maybe_constant_value): Check
	instantiation_dependent_expression_p.
	* pt.c (build_non_dependent_expr): Don't check it here.

	PR c++/56772
	* init.c (build_new): Don't try to process an array initializer
	at template definition time.

	PR c++/56793
	* typeck.c (finish_class_member_access_expr): Handle enum scope.

	PR c++/56794
	* parser.c (cp_parser_range_for): Don't try to do auto deduction
	in a template if the type of the range is incomplete.

	* call.c (add_function_candidate): Take the address of 'this' here.
	(build_over_call): And here.
	(build_new_method_call_1, build_op_call_1): Not here.
	(build_user_type_conversion_1): Or here.
	(add_candidates): Adjust.

	* cxx-pretty-print.h (pp_cxx_cv_qualifiers): New.
	* class.c (same_signature_p): Use type_memfn_quals.
	* cp-tree.h (TYPE_RAISES_EXCEPTIONS): Use
	FUNCTION_OR_METHOD_TYPE_CHECK.
	* error.c (dump_type_suffix): Add padding before cv-qualifiers.
	* pt.c (unify): Use static_fn_type.

2013-04-01  Bronek Kozicki <b.kozicki@gmail.com>
	    Jason Merrill  <jason@redhat.com>

	Implement N2439 (ref-qualifiers for 'this')
	* cp-tree.h (FUNCTION_REF_QUALIFIED): New.
	(FUNCTION_RVALUE_QUALIFIED): New.
	(FUNCTION_OR_METHOD_TYPE_CHECK): New.
	(cpp0x_warn_str): Add CPP0X_REF_QUALIFIER.
	(cp_ref_qualifier): New enum.
	(cp_declarator): Add ref_qualifier.
	* parser.c (cp_parser_ref_qualifier_seq_opt): New.
	(cp_parser_direct_declarator): Use it.
	(make_call_declarator): Adjust.
	(cp_parser_lambda_declarator_opt): Adjust.
	* call.c (add_function_candidate): Handle ref-qualifier overload
	resolution semantics.
	(standard_conversion): Adjust.
	* class.c (add_method, same_signature_p): Compare ref-qualifiers.
	* decl.c (grokdeclarator): Handle ref-qualifiers.
	(grokfndecl): Check for invalid ref-qualifiers.
	(static_fn_type, revert_static_member_fn): Adjust.
	* decl2.c (build_memfn_type): Handle ref-qualifiers.
	(check_classfn): Check them.
	(cp_reconstruct_complex_type): Retain them.
	* error.c (dump_ref_qualifier): New.
	(dump_type_suffix, dump_function_decl): Use it.
	(maybe_warn_cpp0x): Handle CPP0X_REF_QUALIFIER.
	* pt.c (tsubst, tsubst_function_type): Instantiate ref-quals.
	(unify): Retain them.
	* tree.c (cp_check_qualified_type): New.
	(cp_build_qualified_type_real): Keep exception spec and ref-qual.
	(build_ref_qualified_type): New.
	(strip_typedefs, build_exception_variant): Keep ref-qualifier.
	(cp_build_type_attribute_variant): Keep ref-qualifier.
	* typeck.c (merge_types): Keep ref-qualifier.
	(structural_comptypes): Compare ref-qualifier.
	(type_memfn_rqual): New.
	(apply_memfn_quals): Take ref-qual argument.
	* typeck2.c (build_m_component_ref): Check ref-qualifier.

2013-04-01  Paolo Carlini  <paolo.carlini@oracle.com>

	* cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): Remove.
	(DECL_FUNCTION_TEMPLATE_P): Adjust.

	* cxx-pretty-print.c (pp_cxx_nested_name_specifier,
	pp_cxx_qualified_id): Use get_containing_scope.
	* parser.c (cp_parser_class_head): Likewise.
	* pt.c (push_template_decl_real): Likewise.

	* decl2.c (import_export_decl): Use DECL_TEMPLOID_INSTANTIATION.
	* pt.c (unify): Use CP_INTEGRAL_TYPE_P.

2013-03-31  Paolo Carlini  <paolo.carlini@oracle.com>

	* decl2.c (collect_candidates_for_java_method_aliases): Use
	DECL_CLASS_SCOPE_P.
	* name-lookup.c (pushtag_1) Use TYPE_FUNCTION_SCOPE_P.
	(pushdecl_maybe_friend_1): Use DECL_DECLARES_FUNCTION_P.
	* decl.c (duplicate_decls): Likewise.
	* parser.c (cp_parser_template_declaration_after_export): Likewise,
	also DECL_DECLARES_TYPE_P.
	* pt.c (instantiate_class_template_1): Likewise.
	* search.c (lookup_field_1): Use DECL_DECLARES_TYPE_P.
	(lookup_field_r): Likewise.
	(friend_accessible_p): Use DECL_DECLARES_FUNCTION_P.
	(lookup_fnfields_slot_nolazy): Likewise.
	* semantics.c (finish_member_declaration): Likewise.
	* typeck.c (convert_for_initialization): Use TYPE_REFFN_P.

2013-03-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>

	* pt.c (template_parms_to_args): Fix typo in comment.

2013-03-29  Paolo Carlini  <paolo.carlini@oracle.com>

	* call.c (build_op_call_1): Use TYPE_PTRFN_P and TYPE_REFFN_P.

2013-03-29  Paolo Carlini  <paolo.carlini@oracle.com>

	* call.c (add_builtin_candidate): Use TYPE_PTR_P and VOID_TYPE_P.
	(build_op_call_1): Likewise.
	(build_over_call): Likewise.
	(compare_ics): Likewise.
	* class.c (build_base_path): Likewise.
	(resolve_address_of_overloaded_function): Likewise.
	* cp-tree.h: Likewise.
	* cvt.c (cp_convert_to_pointer): Likewise.
	(convert_to_reference): Likewise.
	(ocp_convert): Likewise.
	(convert_force): Likewise, tidy.
	* cxx-pretty-print.c (pp_cxx_postfix_expression): Likewise.
	(pp_cxx_ptr_operator): Likewise.
	* decl.c (duplicate_decls): Likewise.
	(start_decl): Likewise.
	(grok_op_properties): Likewise.
	(start_preparsed_function): Likewise.
	(store_parm_decls): Likewise.
	(finish_function): Likewise.
	* decl2.c (delete_sanity): Likewise.
	(acceptable_java_type): Likewise.
	(grokbitfield): Likewise.
	(cp_reconstruct_complex_type): Likewise.
	* error.c (dump_type_prefix): Likewise.
	(dump_expr): Likewise.
	* except.c (push_eh_cleanup): Likewise.
	(complete_ptr_ref_or_void_ptr_p): Likewise.
	(can_convert_eh): Likewise.
	* init.c (build_new_1): Likewise.
	(build_delete): Likewise.
	(build_vec_delete): Likewise.
	* mangle.c (write_type): Likewise.
	* parser.c (lookup_literal_operator): Likewise.
	* pt.c (convert_nontype_argument_function): Likewise.
	(convert_nontype_argument): Likewise.
	(tsubst): Likewise.
	(unify): Likewise.
	(dependent_type_p_r): Likewise.
	* rtti.c (build_headof): Likewise.
	(build_typeid): Likewise.
	(build_dynamic_cast_1): Likewise.
	(target_incomplete_p): Likewise.
	(typeinfo_in_lib_p): Likewise.
	* semantics.c (finish_omp_for): Likewise.
	(cxx_eval_call_expression): Likewise.
	(maybe_resolve_dummy): Likewise.
	* tree.c (build_target_expr): Likewise.
	(cp_build_qualified_type_real): Likewise.
	* typeck.c (composite_pointer_type_r): Likewise.
	(composite_pointer_type): Likewise.
	(comp_except_types): Likewise.
	(cxx_sizeof_nowarn): Likewise.
	(string_conv_p): Likewise.
	(cp_build_array_ref): Likewise.
	(cp_build_function_call_vec): Likewise, also use TYPE_PTRFN_P.
	(pointer_diff): Likewise.
	(cp_build_addr_expr_1): Likewise.
	(cp_build_unary_op): Likewise.
	(build_static_cast_1): Likewise.
	(cp_build_c_cast): Likewise.
	(comp_ptr_ttypes_real): Likewise.
	(ptr_reasonably_similar): Likewise.
	(comp_ptr_ttypes_const): Likewise.
	(casts_away_constness): Likewise.
	(check_literal_operator_args): Likewise.
	* typeck2.c (build_x_arrow): Likewise.
	(add_exception_specifier): Likewise.

2013-03-29  Jason Merrill  <jason@redhat.com>

	N3582
	* cp-tree.h (AUTO_IS_DECLTYPE): New.
	* parser.c (cp_parser_decltype): Handle decltype(auto).
	(cp_parser_type_id_1): Allow auto without a late-specified
	return in C++1y.
	(cp_parser_primary_expression): Use the return value of
	finish_parenthesized_expr.
	(cp_parser_transaction_expression): Likewise.
	* semantics.c (force_paren_expr): New.
	(finish_parenthesized_expr): Use it.
	* call.c (build_conditional_expr_1): Likewise.
	* pt.c (do_auto_deduction): Handle decltype(auto).
	(tsubst_copy): Handle PAREN_EXPR.
	(tsubst_copy_and_build): Likewise.
	* error.c (dump_expr): Handle PAREN_EXPR.
	* cxx-pretty-print.c (pp_cxx_expression): Likewise.
	* mangle.c (write_expression): Ignore PAREN_EXPR.

	* parser.c (cp_parser_decltype_expr): Split out...
	(cp_parser_decltype): ...from here.

	PR c++/56774
	PR c++/35722
	* pt.c (unify_pack_expansion): Fix indexing.

2013-03-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>

	* call.c (build_java_interface_fn_ref): Likewise.
	(make_temporary_var_for_ref_to_temp): Likewise.
	* class.c (check_field_decls): Likewise.
	(layout_class_type): Likewise.
	(finish_struct_1): Likewise.
	(fixed_type_or_null): Likewise.
	(get_vtbl_decl_for_binfo): Likewise.
	* cp-gimplify.c (omp_var_to_track): Likewise.
	(cp_genericize_r): Likewise.
	* cp-objcp-common.c (cxx_warn_unused_global_decl): Likewise.
	* cp-tree.h (LANG_DECL_HAS_MIN): Likewise.
	(DECL_DISCRIMINATOR_P): Likewise.
	* decl.c (poplevel): Likewise.
	(decls_match): Likewise.
	(duplicate_decls): Likewise.
	(decl_jump_unsafe): Likewise.
	(start_decl): Likewise.
	(check_for_uninitialized_const_var): Likewise.
	(make_rtl_for_nonlocal_decl): Likewise.
	(cp_finish_decl): Likewise.
	(expand_static_init): Likewise.
	(local_variable_p): Likewise.
	(maybe_register_incomplete_var): Likewise.
	* decl2.c (grokfield): Likewise.
	(comdat_linkage): Likewise.
	(determine_visibility): Likewise.
	(import_export_decl): Likewise.
	(prune_vars_needing_no_initialization): Likewise.
	(decl_maybe_constant_var_p): Likewise.
	* error.c (dump_simple_decl): Likewise.
	(dump_template_decl): Likewise.
	(cp_printer): Likewise.
	* except.c (build_throw): Likewise.
	* init.c (build_vtbl_address): Likewise.
	(member_init_ok_or_else): Likewise.
	(build_aggr_init): Likewise.
	(expand_aggr_init_1): Likewise.
	(build_offset_ref): Likewise.
	(constant_value_1): Likewise.
	* mangle.c (write_mangled_name): Likewise.
	(write_prefix): Likewise.
	* name-lookup.c (supplement_binding_1): Likewise.
	(add_decl_to_level): Likewise.
	(pushdecl_maybe_friend_1): Likewise.
	(check_for_out_of_scope_variable): Likewise.
	(validate_nonmember_using_decl): Likewise.
	(lookup_name_innermost_nonclass_level_1): Likewise.
	(lookup_arg_dependent_1): Likewise.
	* parser.c (cp_parser_lambda_introducer): Likewise.
	(cp_parser_template_argument): Likewise.
	(cp_parser_single_declaration): Likewise.
	* pt.c (convert_nontype_argument): Likewise.
	(instantiate_class_template_1): Likewise.
	(tsubst_decl): Likewise.
	(tsubst_expr): Likewise.
	(do_decl_instantiation): Likewise.
	(do_type_instantiation): Likewise.
	(regenerate_decl_from_template): Likewise.
	(always_instantiate_p): Likewise.
	(instantiate_decl): Likewise.
	(type_dependent_expression_p): Likewise.
	(build_non_dependent_expr): Likewise.
	* repo.c (repo_emit_p): Likewise.
	* rtti.c (build_dynamic_cast_1): Likewise.
	* search.c (shared_member_p): Likewise.
	* semantics.c (outer_var_p): Likewise.
	(finish_id_expression): Likewise.
	(finish_omp_clauses): Likewise.
	(finish_decltype_type): Likewise.
	(ensure_literal_type_for_constexpr_object): Likewise.
	* tree.c (lvalue_kind): Likewise.
	(bot_replace): Likewise.
	(cp_tree_equal): Likewise.
	(handle_init_priority_attribute): Likewise.
	(decl_storage_duration): Likewise.
	* typeck.c (cxx_sizeof_expr): Likewise.
	(cxx_alignof_expr): Likewise.
	(decay_conversion): Likewise.
	(build_class_member_access_expr): Likewise.
	(cp_build_array_ref): Likewise.
	(cxx_mark_addressable): Likewise.
	(maybe_warn_about_returning_address_of_local): Likewise.
	(check_return_expr): Likewise.
	* typeck2.c (cxx_readonly_error): Likewise.
	(abstract_virtuals_error_sfinae): Likewise.
	(cxx_incomplete_type_diagnostic): Likewise.

2013-03-28  Lawrence Crowl  <crowl@google.com>

	* Make-lang.in
	(CXX_PARSER_H): Add header dependence.
	* cp-tree.h
	(extern debug (cp_binding_level &)): New.
	(extern debug (cp_binding_level *)): New.
	* name-lookup.h
	(debug (cp_binding_level &)): New.
	(debug (cp_binding_level *)): New.
	* parser.c
	(debug (cp_parser &)): New.
	(debug (cp_parser *)): New.
	(debug (cp_token &)): New.
	(debug (cp_token *)): New.
	(debug (vec<cp_token, va_gc> &)): New.
	(debug (vec<cp_token, va_gc> *)): New.
	* parser.c: Add header dependence.
	(extern debug (cp_parser &)): New.
	(extern debug (cp_parser *)): New.
	(extern debug (cp_token &)): New.
	(extern debug (cp_token *)): New.
	(extern debug (vec<cp_token, va_gc> &)): New.
	(extern debug (vec<cp_token, va_gc> *)): New.

2013-03-28  Jason Merrill  <jason@redhat.com>

	PR c++/17232
	PR c++/52748
	* typeck2.c (abstract_virtuals_error_sfinae): Don't complete
	the type if tf_decltype is set.
	* pt.c (fn_type_unification): Add decltype_p parm.
	(get_bindings): Adjust.
	* cp-tree.h: Adjust.
	* class.c (resolve_address_of_overloaded_function): Adjust.
	* call.c (add_template_candidate_real, print_z_candidate): Adjust.

	PR c++/56679
	* parser.c (cp_parser_sizeof_pack): Split out from...
	(cp_parser_sizeof_operand): ...here.  Require (id).

	PR c++/56701
	* semantics.c (finish_this_expr): 'this' is an rvalue.
	* typeck.c (cp_build_indirect_ref): Handle NOP_EXPR of 'this'.

	PR c++/56710
	* semantics.c (finish_member_declaration): Don't push closure
	members.

	* name-lookup.c (pushdecl_maybe_friend_1): Use
	nonlambda_method_basetype and current_nonlambda_class_type.

	PR c++/56728
	* semantics.c (potential_constant_expression_1) [NOP_EXPR]: Reject
	conversion from integer to pointer.
	(cxx_eval_constant_expression): Likewise.
	(cxx_eval_indirect_ref): Use the folded operand if we still think
	this might be constant.

2013-03-28  Paolo Carlini  <paolo.carlini@oracle.com>
	    Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	PR c++/56725
	* call.c (convert_like_real): Change series of two permerrors
	to permerror + inform (and likewise for two errors).
	(build_new_method_call_1): Likewise.
	* typeck.c (convert_for_initialization): Change additional
	warning or error to inform.

2013-03-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>

	* cp-tree.h (next_aggr_init_expr_arg): Remove static specifier.
	(first_aggr_init_expr): Likewise.
	(more_aggr_init_expr_args_p): Likewise.
	(type_of_this_parm): Likewise.
	(class_of_this_parm): Likewise.
	* name-lookup.h (get_global_value_if_present): Likewise.
	(is_typename_at_global_scope): Likewise.

2013-03-28  Paolo Carlini  <paolo.carlini@oracle.com>

	* call.c (joust): Don't call inform for a permerror returning false.
	* parser.c (cp_parser_check_class_key): Likewise.
	* pt.c (tsubst_copy_and_build): Likewise.

2013-03-27  Jason Merrill  <jason@redhat.com>

	PR c++/56749
	* semantics.c (finish_qualified_id_expr): Return early
	for enum scope.

2013-03-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>

	* call.c (build_new_method_call_1): Use INDIRECT_REF_P.
	* cvt.c (convert_to_void): Likewise.
	* error.c (dump_expr): Likewise.
	* mangle.c (write_expression): Likewise.
	* parser.c (cp_parser_template_argument): Likewise.
	* pt.c (convert_nontype_argument): Likewise.
	(tsubst_copy_and_build): Likewise.
	* rtti.c (build_typeid): Likewise.
	* semantics.c (finish_call_expr): Likewise.
	(finish_decltype_type): Likewise.
	(build_data_member_initialization): Likewise.
	* tree.c (is_dummy_object): Likewise.
	* typeck.c (decay_conversion): Likewise.
	(build_class_member_access_expr): Likewise.
	(cp_build_addr_expr_1): Likewise.
	(unary_complex_lvalue): Likewise.
	(check_return_expr): Likewise.
	* typeck2.c (cxx_readonly_error): Likewise.

2013-03-26  Jason Merrill  <jason@redhat.com>

	PR c++/52597
	* typeck.c (invalid_nonstatic_memfn_p): Use get_first_fn.  Take tree.
	* semantics.c (finish_decltype_type): Check it before type_unknown_p.
	* cp-tree.h: Adjust prototype.

	PR c++/45282
	* typeck2.c (build_m_component_ref): Handle prvalue object.

2013-03-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>

	* cp-gimplify.c (cp_genericize_r): Use VAR_OR_FUNCTION_DECL_P.
	* decl.c (duplicate_decls): Likewise.
	(cp_finish_decl): Likewise.
	(check_class_member_definition_namespace): Likewise.
	* decl2.c (grokfield): Likewise.
	(decl_needed_p): Likewise.
	(import_export_decl): Likewise.
	(mark_used): Likewise.
	* name-lookup.c (pushdecl_maybe_friend_1): Likewise.
	* pt.c (push_access_scope): Likewise.
	(instantiate_decl): Likewise.
	* ptree.c (cxx_print_decl): Likewise.
	* repo.c (repo_emit_p): Likewise.
	* semantics.c (note_decl_for_pch): Likewise.
	* tree.c (decl_linkage): Likewise.

2013-03-26  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/55951
	* decl.c (check_array_designated_initializer): Handle CONST_DECL
	as ce->index.

2013-03-26  Paolo Carlini  <paolo.carlini@oracle.com>

	* decl.c (grokfndecl): Handle separately <inline> and <constexpr>
	error messages.

	* decl.c (grokdeclarator): Declare typedef_p and use it everywhere.

2013-03-25  Jason Merrill  <jason@redhat.com>

	PR c++/56699
	* semantics.c (maybe_resolve_dummy): Make sure that the enclosing
	class is derived from the type of the object.

	PR c++/52014
	* semantics.c (lambda_expr_this_capture): Don't capture 'this' in
	unevaluated context.

2013-03-25  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/56722
	* decl.c (cp_finish_decl): Check DECL_LANG_SPECIFIC before
	DECL_TEMPLATE_INSTANTIATION.

2013-03-22  Jason Merrill  <jason@redhat.com>

	PR c++/56684
	* pt.c (instantiation_dependent_r): Check DECL_INITIAL of VAR_DECL
	and CONST_DECL.

2013-03-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>

	* cp-tree.h (identifier_p): New.
	* call.c: Throughout, call identifier_p insstead of direct
	comparaison of TREE_CODE against IDENTIFIER_NODE.
	* decl.c: Likewisse.
	* decl2.c: Likewise.
	* init.c: Likewise.
	* mangle.c: Likewise.
	* name-lookup.c: Likewise.
	* parser.c: Likewise.
	* pt.c: Likewise.
	* search.c: Likewise.
	* semantics.c: Likewise.
	* tree.c: Likewise.
	* typeck.c: Likewise.
	* typeck2.c: Likewis