+2020-07-31 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/96182
+ * decl.c (finish_function): In constexpr functions use for C++14 and
+ later error instead of warning if no return statement is present and
+ diagnose it regardless of warn_return_type. Move the warn_return_type
+ diagnostics earlier in the function.
+
+2020-07-31 Martin Sebor <msebor@redhat.com>
+
+ PR c++/96003
+ * class.c (build_base_path): Set no-warning bit on the synthesized
+ conditional expression in static_cast.
+
+2020-07-31 Richard Biener <rguenther@suse.de>
+
+ PR debug/96383
+ * cp-objcp-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
+ Define to c_common_finalize_early_debug.
+
+2020-07-31 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/96197
+ * constexpr.c (cxx_eval_constant_expression) <case CONST_DECL>:
+ Pass false to decl_constant_value and decl_really_constant_value
+ so that they don't unshare their result.
+ * cp-tree.h (decl_constant_value): New declaration with an added
+ bool parameter.
+ (decl_really_constant_value): Add bool parameter defaulting to
+ true to existing declaration.
+ * init.c (constant_value_1): Add bool parameter which controls
+ whether to unshare the initializer before returning. Call
+ unshare_expr at most once.
+ (scalar_constant_value): Pass true to constant_value_1's new
+ bool parameter.
+ (decl_really_constant_value): Add bool parameter and forward it
+ to constant_value_1.
+ (decl_constant_value): Likewise, but instead define a new
+ overload with an added bool parameter.
+
+2020-07-30 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/64194
+ * pt.c (resolve_overloaded_unification): If the function
+ template specialization has a placeholder return type,
+ then instantiate it before attempting unification.
+
+2020-07-30 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/95486
+ * pt.c (alias_ctad_tweaks): Call remove_constraints before
+ calling set_constraints.
+
+2020-07-30 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/96106
+ * pt.c (reduce_template_parm_level): Propagate DECL_VIRTUAL_P
+ from the original TEMPLATE_PARM_DECL to the new lowered one.
+
+2020-07-30 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/96164
+ * constraint.cc (constraints_satisfied_p): Return true if
+ !flags_concepts.
+ * pt.c (do_type_instantiation): Update a paragraph taken from
+ [temp.explicit] to reflect the latest specification. Don't
+ instantiate a member with unsatisfied constraints.
+
+2020-07-29 Jason Merrill <jason@redhat.com>
+
+ PR c++/91427
+ * cp-tree.h (IMPLICIT_RVALUE_P): New.
+ (enum cp_lvalue_kind_flags): Add clk_implicit_rval.
+ (implicit_rvalue_p, set_implicit_rvalue_p): New.
+ * call.c (reference_binding): Check clk_implicit_rval.
+ (build_over_call): Adjust C++20 implicit move.
+ * coroutines.cc (finish_co_return_stmt): Simplify implicit move.
+ * except.c (build_throw): Adjust C++20 implicit move.
+ * pt.c (tsubst_copy_and_build) [STATIC_CAST_EXPR]: Propagate
+ IMPLICIT_RVALUE_P.
+ * tree.c (lvalue_kind): Set clk_implicit_rval.
+ * typeck.c (treat_lvalue_as_rvalue_p): Overhaul.
+ (maybe_warn_pessimizing_move): Adjust.
+ (check_return_expr): Adjust C++20 implicit move.
+
+2020-07-29 Jason Merrill <jason@redhat.com>
+
+ PR c++/91212
+ * call.c (build_over_call): Don't call a const ref
+ overload for implicit move.
+
+2020-07-28 Nathan Sidwell <nathan@acm.org>
+
+ * cp-gimplify.c (cp_genericize_r): Set IMPORTED_DECL's context.
+ * cp-objcp-common.c (cp_pushdecl): Set decl's context.
+ * decl.c (grokfndecl): Make DECL_CONTEXT setting clearer.
+
+2020-07-28 Nathan Sidwell <nathan@acm.org>
+
+ * class.c (fixup_type_variants): Copy TYPE_SIZE and
+ TYPE_SIZE_UINIT.
+ (finish_struct): Call it.
+
+2020-07-28 Nathan Sidwell <nathan@acm.org>
+
+ * ptree.c (cxx_print_decl): Better indentation.
+
+2020-07-28 Jakub Jelinek <jakub@redhat.com>
+ Mark Wielaard <mark@klomp.org>
+
+ PR c++/96328
+ * parser.c (cp_lexer_safe_previous_token): Don't call
+ cp_lexer_previous_token, instead inline it by hand and return NULL
+ instead of failing assertion if all previous tokens until the first
+ one are purged.
+ (cp_parser_error_1): Optimize - only call cp_lexer_safe_previous_token
+ if token->type is CPP_NAME. Use cp_lexer_safe_previous_token instead
+ of cp_lexer_previous_token for the missing_token_desc != RT_NONE
+ case too.
+
+2020-07-27 Nathan Sidwell <nathan@acm.org>
+
+ * cp-tree.h (enum cp_tree_index): Add CPTI_AS_BASE_IDENTIFIER.
+ (as_base_identifier): Define.
+ * decl.c (initialize_predifined_identifiers): Initialize as_base
+ identifier.
+ * class.c (layout_class_type): Name the as-base type. Zap
+ NSDMI its fields may have.
+
+2020-07-22 Nathan Sidwell <nathan@acm.org>
+
+ * class.c (maybe_add_class_template_decl_list): Don't add CONST_DECLs.
+
+2020-07-22 Nathan Sidwell <nathan@acm.org>
+
+ * typeck.c (structural_comptypes): [DECLTYPE_TYPE] break
+ apart complex if.
+ [UNDERLYING_TYPE]: Use an if.
+ [TYPEOF_TYPE]: New.
+
+2020-07-22 Nathan Sidwell <nathan@acm.org>
+
+ * decl.c (decls_match): Move variables into scopes
+ they're needed in.
+ (duplicate_decls): Use STRIP_TEMPLATE.
+ (build_typename_type): Move var decls to their assignments.
+ (begin_function_body): Likewise.
+ * decl2.c (get_guard): Likewise.
+ (mark_used): Use true for truthiness.
+ * error.c (dump_aggr_type): Hold the decl in a var called
+ 'decl', not 'name'.
+
+2020-07-22 Nathan Sidwell <nathan@acm.org>
+
+ * cp-tree.h (struct tree_lambda_expr): Shrink
+ default_capture_mode & discriminator.
+
+2020-07-22 Nathan Sidwell <nathan@acm.org>
+
+ * mangle.c (decl_is_template_id): Rename to ...
+ (maybe_template_info): ... here. Return the template info,
+ rather than use a pointer. Adjust all callers.
+ (find_substitution): Use template_args_equal, rather than
+ local check.
+
+2020-07-22 Tobias Burnus <tobias@codesourcery.com>
+
+ * parser.c (cp_parser_omp_clause_hint): Require nonnegative hint.
+ (cp_parser_omp_critical): Permit hint(0) clause without named critical.
+ * pt.c (tsubst_expr): Re-check the latter for templates.
+
+2020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
+
+ PR target/95237
+ * decl.c (cp_finish_decl): Call target hook
+ lower_local_decl_alignment to lower local decl alignment.
+
+2020-07-21 Nathan Sidwell <nathan@acm.org>
+
+ * parser.c (cp_lexer_consume_token): Drop PRAGMA_EOL assert.
+ (cp_parser_skip_to_closing_parenthesis_1): Only pass start token
+ to pragma skipper if recovering.
+ (cp_parser_skip_to_pragma_eol): Only purge and change pragma
+ state when recovering.
+
+2020-07-20 Jason Merrill <jason@redhat.com>
+
+ * pt.c (type_dependent_expression_p): A pseudo-dtor can be
+ dependent.
+ * semantics.c (finish_call_expr): Use build_trivial_dtor_call for
+ pseudo-destructor.
+ (finish_pseudo_destructor_expr): Leave type NULL for dependent arg.
+
+2020-07-20 Jason Merrill <jason@redhat.com>
+
+ * mangle.c (write_base_ref): New.
+ (write_expression): Use it for base field COMPONENT_REFs.
+ * pt.c (invalid_tparm_referent_p): Canonicalize the type
+ of array offsets. Allow subobjects.
+
+2020-07-20 Jason Merrill <jason@redhat.com>
+
+ * pt.c (collect_ctor_idx_types): Add 'const' when deducing from
+ a string constant.
+
+2020-07-17 Marek Polacek <polacek@redhat.com>
+
+ PR c++/79815
+ * decl.c (grokdeclarator): Detect cv-qual decltype(auto).
+ * pt.c (do_auto_deduction): Likewise.
+
+2020-07-16 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/95591
+ PR c++/95599
+ PR c++/95823
+ PR c++/95824
+ PR c++/95895
+ * coroutines.cc (struct coro_ret_data): Delete.
+ (coro_maybe_expand_co_return): Delete.
+ (co_return_expander): Delete.
+ (expand_co_returns): Delete.
+ (co_await_find_in_subtree): Remove unused name.
+ (build_actor_fn): Remove unused parm, remove handling
+ for co_return expansion.
+ (register_await_info): Demote duplicate info message to a
+ warning.
+ (coro_make_frame_entry): Move closer to use site.
+ (struct susp_frame_data): Add fields for final suspend label
+ and a flag to indicate await expressions with initializers.
+ (captures_temporary): Delete.
+ (register_awaits): Remove unused code, update comments.
+ (find_any_await): New.
+ (tmp_target_expr_p): New.
+ (struct interesting): New.
+ (find_interesting_subtree): New.
+ (struct var_nest_node): New.
+ (flatten_await_stmt): New.
+ (handle_nested_conditionals): New.
+ (process_conditional): New.
+ (replace_statement_captures): Rename to...
+ (maybe_promote_temps): ... this.
+ (maybe_promote_captured_temps): Delete.
+ (analyze_expression_awaits): Check for await expressions with
+ initializers. Simplify handling for truth-and/or-if.
+ (expand_one_truth_if): Simplify (map cases that need expansion
+ to COND_EXPR).
+ (await_statement_walker): Handle CO_RETURN_EXPR. Simplify the
+ handling for truth-and/or-if expressions.
+ (register_local_var_uses): Ensure that we create names in the
+ implementation namespace.
+ (morph_fn_to_coro): Add final suspend label to suspend frame
+ callback data and remove it from the build_actor_fn call.
+
+2020-07-16 Marek Polacek <polacek@redhat.com>
+
+ * call.c (convert_like): Remove macro and introduce a new
+ wrapper instead.
+ (convert_like_with_context): Likewise.
+ (convert_like_real): Rename to convert_like.
+ (convert_like_real_1): Rename to convert_like_internal. Call
+ convert_like instead of convert_like_real therein.
+ (perform_direct_initialization_if_possible): Call convert_like
+ instead of convert_like_real.
+
+2020-07-16 Iain Sandoe <iain@sandoe.co.uk>
+
+ * coroutines.cc: Correct some spelling errors
+ in comments.
+
+2020-07-15 Nathan Sidwell <nathan@acm.org>
+
+ * parser.c (cp_parser_declaration): Avoid copying tokens.
+ (cp_parser_block_declaration): RAII token pointer.
+
+2020-07-15 Nathan Sidwell <nathan@acm.org>
+
+ * parser.c (cp_parser_skip_to_closing_parenthesis_1): Deal with
+ meeting a deferred pragma.
+ (cp_parser_skip_to_end_of_statement): Likewise.
+ (cp_parser_skip_to_end_of_block_or_statement): Likewise.
+ (cp_parser_skip_to_pragma_eol): We should never meet EOF.
+ (cp_parser_omp_declare_simd): Likewise.
+ (cp_parser_omp_declare_reduction, cp_parser_oacc_routine)
+ (pragma_lex): Likewise.
+
+2020-07-14 Marek Polacek <polacek@redhat.com>
+
+ PR c++/95789
+ PR c++/96104
+ PR c++/96179
+ * call.c (convert_like_real_1): Renamed from convert_like_real.
+ (convert_like_real): New wrapper for convert_like_real_1.
+
+2020-07-14 Nathan Sidwell <nathan@acm.org>
+
+ * parser.c (cp_lexer_alloc): Do not deal with PCH here.
+ (cp_lexer_new_main): Deal with PCH here. Store the tokens directly
+ into the buffer.
+ (cp_lexer_new_from_tokens): Assert last token isn't purged either.
+ (cp_lexer_get_preprocessor_token): Change first arg to flags, adjust.
+ (cp_parser_new): Pass the lexer in, don't create it here.
+ (cp_parser_translation_unit): Initialize access checks here.
+ (cp_parser_initial_pragma): First token is provided by caller,
+ don't deal with PCH stopping here. Adjust error message.
+ (c_parse_file): Adjust, change error message to avoid C++20 module
+ confusion.
+
+2020-07-14 Nathan Sidwell <nathan@acm.org>
+
+ * ptree.c (cxx_print_type): Add TYPEOF_TYPE and BASES.
+
+2020-07-14 Nathan Sidwell <nathan@acm.org>
+
+ * class.c (build_base_field_1): Cache CLASSTYPE_AS_BASE.
+ (build_self_reference): Rename value -> decl.
+ (dump_class_hierarchy_1): Cache CLASSTYPE_AS_BASE.
+
+2020-07-14 Marek Polacek <polacek@redhat.com>
+
+ PR c++/95820
+ * decl.c (grokdeclarator) <case cdk_function>: Check also
+ pointers/references/... to functions.
+
+2020-07-14 Nathan Sidwell <nathan@acm.org>
+
+ * cp-tree.h: Correct some tree lang flag comments,
+ reformat some structure definitions. Note some structure
+ sizes. Clarify some comments.
+ (yyungetc): Delete. Not been a thing for some time.
+ * class.c (copy_fndecl_with_name): Comment.
+ (check_bases_and_members): Unnecessary {}.
+ (layout_class_type): Comment.
+ * cp-tree.def (UNBOUND_CLASS_TEMPLATE): Adjust comment.
+ * decl.c: Fix some formatting & whitespace issues.
+ (function_requirements_equivalent_p): Note why
+ substitutions are needed.
+ * decl2.c (no_linkage_error): Note that heroics about
+ 'typedef struct { ... };' are no longer needed.
+ * method.c: Whitespace.
+ * name-lookup.c: Whitespace.
+ (add_decl_to_level): Reformat a line.
+ (print_binding_stack): Mark as DEBUG_FUNCTION.
+ (has_using_namespace_std_directive_p): Delete comment.
+ * pt.c: Whitespace
+ * ptree.c: Whitespace.
+ * rtti.c: Whitespace & comment.
+ * tree.c: Comment.
+ * typeck.c (structural_comptypes): Add comment.
+
+2020-07-13 Nathan Sidwell <nathan@acm.org>
+
+ * Make-lang.in (c++.disclean): Likewise.
+
+2020-07-13 Marek Polacek <polacek@redhat.com>
+
+ PR c++/96077
+ * parser.c (cp_parser_enum_specifier): Commit to tentative parse
+ after we've seen an opening brace.
+
+2020-07-10 Jason Merrill <jason@redhat.com>
+
+ * tree.c (structural_type_p): Allow unions.
+ * mangle.c (write_expression): Express unions with a designator.
+
+2020-07-10 Jason Merrill <jason@redhat.com>
+
+ * pt.c (convert_nontype_argument): Handle REAL_TYPE.
+ (invalid_nontype_parm_type_p): Allow all structural types.
+ * tree.c (structural_type_p): Use SCALAR_TYPE_P.
+
+2020-07-10 Jason Merrill <jason@redhat.com>
+
+ PR c++/96105
+ PR c++/96052
+ PR c++/95976
+ * class.c (check_field_decls): An array of empty classes is not an
+ empty data member.
+ (layout_empty_base_or_field): Handle explicit alignment.
+ Fix union handling.
+
+2020-07-09 Julian Brown <julian@codesourcery.com>
+ Thomas Schwinge <thomas@codesourcery.com>
+
+ PR middle-end/95270
+ * semantics.c (finish_omp_clauses): Likewise.
+
+2020-07-09 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/96132
+ * constexpr.c (potential_constant_expression_1) <case PARM_DECL>:
+ Restore dependent_type_p check that guarded the call to
+ is_really_empty_class.
+
+2020-07-08 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/95497
+ * constexpr.c (potential_constant_expression_1) <case PARM_DECL>:
+ When processing_template_decl, check COMPLETE_TYPE_P before
+ calling is_really_empty_class. Don't check dependent_type_p.
+
+2020-07-08 Marek Polacek <polacek@redhat.com>
+
+ PR c++/96103
+ * parser.c (cp_parser_decltype): Print error about using decltype(auto)
+ in C++11. Check that the token following "auto" is ")".
+
+2020-07-07 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/95303
+ * cxx-pretty-print.c (pp_cxx_unqualified_id): Check
+ PRIMARY_TEMPLATE_P before printing the innermost template
+ arguments.
+
+2020-07-07 Martin Sebor <msebor@redhat.com>
+
+ PR c++/96063
+ * parser.c (class_decl_loc_t::diag_mismatched_tags): Print notes only
+ if warning_at returns nonzero.
+
+2020-07-06 Martin Sebor <msebor@redhat.com>
+
+ PR c++/95984
+ * call.c (build_over_call): Check calls only when tf_warning is set.
+
+2020-07-06 Nathan Sidwell <nathan@acm.org>
+
+ * decl.c (push_library_fn): Return the decl pushdecl_toplevel returns.
+ * except.c (verify_library_fn): Replace with ...
+ (declare_library_fn_1): ... this fn. Always push the fn.
+ (declare_library_fn): Call it.
+ (build_throw): Call declare_library_fn_1.
+
+2020-07-06 Jonathan Wakely <jwakely@redhat.com>
+
+ PR c++/96068
+ * parser.c (cp_parser_toplevel_declaration): Only do pedwarn for
+ empty-declaration in C++98.
+
+2020-07-02 Jason Merrill <jason@redhat.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ * decl.c (grokfndecl): Allow consteval virtual.
+ * search.c (check_final_overrider): Check consteval mismatch.
+ * constexpr.c (cxx_eval_thunk_call): New.
+ (cxx_eval_call_expression): Call it.
+ * cvt.c (cp_get_fndecl_from_callee): Handle FDESC_EXPR.
+ * decl2.c (mark_vtable_entries): Track vtables with consteval.
+ (maybe_emit_vtables): Pass consteval_vtables through.
+ (clear_consteval_vfns): Replace consteval with nullptr.
+ (c_parse_final_cleanups): Call it.
+
+2020-07-01 Nathan Sidwell <nathan@acm.org>
+
+ * class.c (copy_fndecl_with_name): Add additional predicate args, do
+ not deduce them locally.
+ (copy_operator_fn): Adjust copy_fndecl_with_name call.
+ (build_clone): Add vtt and inherited predicate args. Pass through
+ to copy_fndecl_with_name call.
+ (build_cdtor_clones): Likewise, pass through to build_clone as
+ needed.
+ (build_cdtor): Determine vtt and inherited here.
+ * cp-tree.h (DECL_NEEDS_CTT_PARM_P): Delete.
+
+2020-06-30 Nathan Sidwell <nathan@acm.org>
+
+ * cp-tree.h (copy_fndecl_with_name): Rename to ...
+ (copy_operatorn_fn): ... this. Change arg type.
+ (clone_function_decl): Rename to ...
+ (clone_cdtor): ... this.
+ * class.c (copy_fndecl_with_name): Make static.
+ (copy_operator_fn): New wrapper.
+ (build_clones): Rename to ...
+ (build_cdtor_clones): ... this.
+ (clone_function_decl): Rename to ...
+ (clone_cdtor): ... this. Adjust build_clones calls.
+ (clone_constructors_and_destructors): Adjust clone_function_decl
+ calls.
+ * method.c (implicitly_declare_fn): Adjust copy_fndecl_with_name
+ call.
+ (lazily_declare_fn): Adjust clone_function_decl call.
+ * pt.c (tsubst_function_decl): Likewise.
+ (instantiate_template_1): Likewise.
+
+2020-06-30 Iain Sandoe <iain@sandoe.co.uk>
+
+ * coroutines.cc (morph_fn_to_coro): Remove trailing
+ space in a diagnostic.
+
+2020-06-30 Iain Sandoe <iain@sandoe.co.uk>
+
+ * coroutines.cc (expand_one_await_expression): Remove
+ code dealing with initial suspend.
+ (build_actor_fn): Remove code special-casing initial
+ and final suspend. Handle the final suspend and marking
+ of the coroutine as done.
+ (coro_rewrite_function_body): New.
+ (bind_expr_find_in_subtree): Remove.
+ (coro_body_contains_bind_expr_p): Remove.
+ (morph_fn_to_coro): Split the rewrite of the original
+ function into coro_rewrite_function_body and call it.
+
+2020-06-29 Marek Polacek <polacek@redhat.com>
+
+ PR c++/94553
+ * decl.c (duplicate_decls): Make sure a concept or a variable
+ template is unique in its declarative region.
+
+2020-06-29 Marek Polacek <polacek@redhat.com>
+
+ PR c++/95568
+ * pt.c (collect_ctor_idx_types): Use TREE_TYPE.
+
+2020-06-28 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/95711
+ * coroutines.cc (register_local_var_uses): Skip past
+ namespace decls.
+
+2020-06-27 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/95736
+ * coroutines.cc (get_awaitable_var): New helper.
+ (build_co_await): Check more carefully before
+ copying an awaitable.
+ (expand_one_await_expression): No initializer
+ is required when the awaitable is not a temp.
+ (register_awaits): Remove handling that is now
+ completed when the await expression is built.
+
+2020-06-27 Iain Sandoe <iain@sandoe.co.uk>
+
+ * coroutines.cc (morph_fn_to_coro): Diagnose unavailable
+ get_return_object_on_allocation_failure.
+
+2020-06-26 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/95519
+ * coroutines.cc (struct coroutine_info):Add a field
+ to hold computed p.return_void expressions.
+ (coro_build_promise_expression): New.
+ (get_coroutine_return_void_expr): New.
+ (finish_co_yield_expr): Build the promise expression
+ using coro_build_promise_expression.
+ (finish_co_return_stmt): Likewise.
+ (build_init_or_final_await): Likewise.
+ (morph_fn_to_coro): Likewise, for several cases.
+
+2020-06-26 Iain Sandoe <iain@sandoe.co.uk>
+
+ * coroutines.cc (morph_fn_to_coro): Handle error
+ returns in building g-r-o-o-a-f expressions.
+
+2020-06-24 Nicholas Krause <xerofoify@gmail.com>
+
+ PR c++/95672
+ * typeck2.c (cxx_incomplete_type_diagnostic): Add missing
+ TYPE_EXPANSION_PACK check for diagnosing incomplete types in
+ cxx_incomplete_type_diagnostic.
+
+2020-06-24 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/95518
+ PR c++/95813
+ * coroutines.cc (act_des_fn): Copy function
+ attributes onto the outlined coroutine helpers.
+
+2020-06-24 Jason Merrill <jason@redhat.com>
+
+ * call.c (build_over_call): Only call build_base_path once.
+
+2020-06-24 Jason Merrill <jason@redhat.com>
+
+ PR c++/95719
+ * call.c (build_over_call): Look up the overrider in base_binfo.
+ * class.c (lookup_vfn_in_binfo): Look through BINFO_PRIMARY_P.
+
+2020-06-23 Jason Merrill <jason@redhat.com>
+
+ PR c++/93976
+ Implement C++20 P2082R1, Fixing CTAD for aggregates.
+ * cp-tree.h (TPARMS_PRIMARY_TEMPLATE): Split out from...
+ (DECL_PRIMARY_TEMPLATE): ...here.
+ (builtin_guide_p): Declare.
+ * decl.c (reshape_init_class): Handle bases of a template.
+ (reshape_init_r): An array with dependent bound takes a single
+ initializer.
+ * pt.c (tsubst_default_argument): Shortcut {}.
+ (unify_pack_expansion): Allow omitted arguments to trailing pack.
+ (builtin_guide_p): New.
+ (collect_ctor_idx_types): Give a trailing pack a {} default
+ argument. Handle arrays better.
+
+2020-06-23 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/95477
+ * coroutines.cc (morph_fn_to_coro): Apply a cleanup to
+ the get return object when the DTOR is non-trivial.
+
+2020-06-20 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/95505
+ * coroutines.cc (morph_fn_to_coro): Update handling of
+ get-return-object-on-allocation-fail and diagnose missing
+ std::nothrow.
+
+2020-06-20 Jason Merrill <jason@redhat.com>
+
+ * call.c (joust): Only compare constraints for non-template
+ candidates with matching parameters.
+ * pt.c (tsubst_pack_expansion): Fix getting a type parameter
+ pack.
+ (more_specialized_fn): Only compare constraints for candidates with
+ matching parameters.
+
+2020-06-19 Jason Merrill <jason@redhat.com>
+
+ * method.c (early_check_defaulted_comparison): Allow defaulting
+ comparison outside class. Complain if non-member operator isn't a
+ friend.
+
+2020-06-18 Jason Merrill <jason@redhat.com>
+
+ * method.c (early_check_defaulted_comparison): Check for &&.
+ (build_comparison_op): Allow empty union. Diagnose non-category
+ type.
+ (common_comparison_type): Remove handling for non-category type.
+
+2020-06-18 Marek Polacek <polacek@redhat.com>
+
+ PR c++/95735
+ * pt.c (finish_template_variable): Return if
+ coerce_innermost_template_parms return error_mark_node.
+
+2020-06-18 Marek Polacek <polacek@redhat.com>
+
+ PR c++/95728
+ * pt.c (tsubst_copy_and_build) <case NEW_EXPR>: Return error_mark_node
+ if placement is erroneous.
+
+2020-06-17 Jonathan Wakely <jwakely@redhat.com>
+
+ PR c++/66159
+ * parser.c (cp_parser_elaborated_type_specifier): Do not warn
+ unless in a declaration.
+
+2020-06-17 Jason Merrill <jason@redhat.com>
+
+ * cp-tree.h (copy_fndecl_with_name): Declare.
+ * class.c (copy_fndecl_with_name): Split out from...
+ (build_clone): ...here.
+ (add_implicitly_declared_members): Add op== to TYPE_FIELDS.
+ * method.c (implicitly_declare_fn): Use copy_fndecl_with_name.
+
+2020-06-17 Jason Merrill <jason@redhat.com>
+
+ * call.c (build_new_op_1): Don't look for a CALL_EXPR when
+ calling a consteval function.
+
+2020-06-17 Jason Merrill <jason@redhat.com>
+
+ * decl2.c (grokfield): Pass SD_DEFAULTED and SD_DELETED.
+ * decl.c (duplicate_decls): Reduce error for delete
+ after earlier declaration to pedwarn.
+
+2020-06-17 Marek Polacek <polacek@redhat.com>
+
+ PR c++/95508
+ * constexpr.c (maybe_fold_non_dependent_expr): New.
+ * cp-tree.h (maybe_fold_non_dependent_expr): Declare.
+ * typeck.c (cp_build_array_ref): Call maybe_fold_non_dependent_expr
+ instead of maybe_constant_value.
+
+2020-06-16 Marek Polacek <polacek@redhat.com>
+
+ PR c++/95369
+ * call.c (add_list_candidates): Return if a designated initializer
+ is used with a non-aggregate.
+ (implicit_conversion_error): Give an error for the case above.
+
+2020-06-16 Marek Polacek <polacek@redhat.com>
+
+ PR c++/95560
+ * name-lookup.c (check_local_shadow): Check if types are
+ non-null before calling same_type_p.
+
+2020-06-16 Jakub Jelinek <jakub@redhat.com>
+
+ * semantics.c (handle_omp_for_class_iterator): Adjust
+ c_omp_check_loop_iv_exprs caller.
+ (finish_omp_for): Likewise. Don't call fold_build_cleanup_point_expr
+ before calling c_finish_omp_for and c_omp_check_loop_iv, move it
+ after those calls.
+ * pt.c (tsubst_omp_for_iterator): Handle non-rectangular loops.
+
+2020-06-16 Jakub Jelinek <jakub@redhat.com>
+
+ * parser.c (cp_parser_omp_clause_schedule): Reject modifier separated
+ from kind by comma rather than colon.
+
+2020-06-16 Patrick Palka <ppalka@redhat.com>
+
+ * pt.c (perform_instantiation_time_access_checks): No need to
+ tsubst into decl.
+ * semantics.c (enforce_access): Verify that decl is not
+ dependent.
+
+2020-06-16 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/41437
+ PR c++/47346
+ * cp-tree.h (qualified_typedef_usage_s): Delete.
+ (qualified_typedef_usage_t): Delete.
+ (deferred_access_check): Move up in file.
+ (tree_template_info::typedefs_needing_access_checking): Delete.
+ (tree_template_info::deferred_access_checks): New field.
+ (TI_TYPEDEFS_NEEDING_ACCESS_CHECKING): Rename to ...
+ (TI_DEFERRED_ACCESS_CHECKS): ... this, and adjust accordingly.
+ * pt.c (perform_typedefs_access_check): Rename to ...
+ (perform_instantiation_time_access_checks): ... this, and adjust
+ accordingly. Remove unnecessary tree tests.
+ (instantiate_class_template_1): Adjust accordingly.
+ (instantiate_decl): Likewise.
+ * semantics.c (enforce_access): Likewise.
+
+2020-06-16 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/41437
+ PR c++/47346
+ * call.c (enforce_access): Move to semantics.c.
+ * cp-tree.h (enforce_access): Delete.
+ (get_types_needing_access_check): Delete.
+ (add_typedef_to_current_template_for_access_check): Delete.
+ * decl.c (make_typename_type): Adjust accordingly. Use
+ check_accessibility_of_qualified_id instead of directly using
+ perform_or_defer_access_check.
+ * parser.c (cp_parser_template_declaration_after_parameters):
+ Don't push a dk_no_check access state when parsing a template.
+ * pt.c (get_types_needing_access_check): Delete.
+ (append_type_to_template_for_access_check_1): Delete.
+ (perform_typedefs_access_check): Adjust. If type_decl is a
+ FIELD_DECL, also check its DECL_CONTEXT for dependence. Use
+ tsubst_copy instead of tsubst to substitute into type_decl so
+ that we substitute into the DECL_CONTEXT of a FIELD_DECL.
+ (append_type_to_template_for_access_check): Delete.
+ * search.c (accessible_p): Remove the processing_template_decl
+ early exit.
+ * semantics.c (enforce_access): Moved from call.c. If we're
+ parsing a template and the access check failed, add the check to
+ TI_TYPEDEFS_NEEDING_ACCESS_CHECKING.
+ (perform_or_defer_access_check): Adjust comment.
+ (add_typedef_to_current_template_for_access_check): Delete.
+ (check_accessibility_of_qualified_id): Adjust accordingly.
+ Exit early if the scope is dependent.
+
+2020-06-11 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/93467
+ * constraint.cc (associate_classtype_constraints): If there is a
+ discrepancy between the current template depth and the template
+ depth of the original declaration, then adjust the template
+ parameter depth within the current constraints appropriately.
+ * pt.c (tsubst_friend_class): Substitute into and set the
+ constraints on the injected declaration.
+
+2020-06-11 Iain Sandoe <iain@sandoe.co.uk>
+
+ * coroutines.cc (instantiate_coro_traits): Pass a reference
+ to lambda closure objects to traits instantiation.
+ (morph_fn_to_coro): Likewise for promise parameter
+ preview and allocator lookup.
+
+2020-06-10 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/95440
+ * call.c (add_candidates): Use vec_safe_length() for
+ testing the arguments list.
+ (build_new_method_call_1): Use vec_safe_is_empty() when
+ checking for an empty args list.
+
+2020-06-10 Marek Polacek <polacek@redhat.com>
+
+ PR c++/95562
+ * parser.c (cp_parser_direct_declarator): Clear
+ CP_PARSER_FLAGS_DELAY_NOEXCEPT if the declarator kind is not
+ cdk_id.
+
+2020-06-09 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/95137
+ * coroutines.cc (expand_one_await_expression): Build separate
+ DTOR trees for the awaitable object on the destroy and resume
+ paths.
+
+2020-06-09 Jason Merrill <jason@redhat.com>
+
+ PR c++/95552
+ * cp-gimplify.c (predeclare_vla): Only predeclare a VLA if it's
+ wrapped in a pointer type.
+
+2020-06-05 Marek Polacek <polacek@redhat.com>
+
+ PR c++/95369
+ * call.c (build_converted_constant_expr_internal): Allow
+ list-initialization.
+
+2020-06-05 Iain Sandoe <iain@sandoe.co.uk>
+
+ * cp-tree.def (CO_RETURN_EXPR): Correct the class
+ to use tcc_statement.
+
+2020-06-05 Jason Merrill <jason@redhat.com>
+
+ * error.c (dump_binary_op): Handle negative operand to
+ POINTER_PLUS_EXPR.
+
+2020-06-04 Jason Merrill <jason@redhat.com>
+
+ PR c++/93310
+ * constexpr.c (cxx_eval_constant_expression) [OBJ_TYPE_REF]:
+ Evaluate OBJ_TYPE_REF_EXPR.
+
+2020-06-04 Jason Merrill <jason@redhat.com>
+
+ PR c++/95158
+ * class.c (lookup_vfn_in_binfo): New.
+ * call.c (build_over_call): Use it.
+ * cp-tree.h (resolves_to_fixed_type_p): Add default argument.
+ (lookup_vfn_in_binfo): Declare.
+
+2020-06-04 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/95346
+ * coroutines.cc (morph_fn_to_coro): Ensure that the get-
+ return-object is constructed correctly; When it is not the
+ final return value, pass it to the CTOR of the return type
+ as an rvalue, per the standard comment.
+
+2020-06-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/82304
+ PR c++/95307
+ * constexpr.c (cxx_eval_constant_expression): Diagnose CONVERT_EXPR
+ conversions from pointer types to arithmetic types here...
+ (cxx_eval_outermost_constant_expr): ... instead of here.
+
+2020-06-03 Mark Wielaard <mark@klomp.org>
+
+ * parser.c (cp_lexer_safe_previous_token): New function.
+ (cp_parser_error_1): Add name_hint if the previous token is
+ a string literal and next token is a CPP_NAME and we have a
+ missing header suggestion for the name.
+
+2020-06-03 Patrick Palka <ppalka@redhat.com>
+
+ * pt.c (process_partial_specialization): Pass the full set of
+ generic template arguments to strictly_subsumes.
+
+2020-06-03 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/92103
+ * pt.c (most_specialized_partial_spec): Reorganize the loop over
+ DECL_TEMPLATE_SPECIALIZATIONS. Check constraints_satisfied_p on
+ the original template declaration, not on the tsubsted one.
+
+2020-06-03 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/95345
+ * coroutines.cc (finish_co_await_expr): Revise to allow for
+ parameter packs.
+ (finish_co_yield_expr): Likewise.
+
+2020-06-03 Jason Merrill <jason@redhat.com>
+
+ PR c++/95232
+ * cp-tree.h (predeclare_vla): Declare.
+ * cp-gimplify.c (predeclare_vla): Handle getting a decl.
+ * pt.c (tsubst_expr) [DECL_EXPR]: Use it.
+
+2020-06-03 Tobias Burnus <tobias@codesourcery.com>
+
+ * cp-gimplify.c (cxx_omp_predetermined_mapping): New.
+ * cp-objcp-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redfine.
+ * cp-tree.h (cxx_omp_predetermined_mapping): Declare.
+
+2020-06-02 Jason Merrill <jason@redhat.com>
+
+ PR c++/95193
+ * pt.c (tsubst_decl): Relax assert.
+
+2020-06-02 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/95050
+ * coroutines.cc (build_co_await): Wrap the co_await expression
+ in a TARGET_EXPR, where needed.
+ (finish_co_yield_expr): Likewise.
+
+2020-06-02 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/92633
+ PR c++/92838
+ * pt.c (tsubst_function_decl): Don't do set_constraints when
+ regenerating a lambda.
+ (tsubst_lambda_expr): Substitute into the lambda's constraints
+ and do set_constraints here.
+
+2020-06-01 Jason Merrill <jason@redhat.com>
+
+ PR c++/95466
+ PR c++/95311
+ PR c++/95221
+ * class.c (build_vfn_ref): Revert 95311 change.
+ * cp-ubsan.c (cp_ubsan_maybe_instrument_member_call): Build a
+ COMPOUND_EXPR.
+
+2020-06-01 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/95350
+ * coroutines.cc (struct param_info): Remove rv_ref field.
+ (build_actor_fn): Remove specifial rvalue ref handling.
+ (morph_fn_to_coro): Likewise.
+
+2020-05-31 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c++/95087
+ * coroutines.cc (morph_fn_to_coro): If we see an
+ early fatal error, drop the erroneous function body.
+
+2020-05-31 Iain Sandoe <iain@sandoe.co.uk>
+
+ * coroutines.cc (build_co_await): Remove unused
+ variable.
+ (finish_co_await_expr): Likewise.
+ (finish_co_yield_expr): Likewise; revise comment.
+
+2020-05-30 Iain Sandoe <iain@sandoe.co.uk>
+
+ * coroutines.cc (morph_fn_to_coro): Revise initialization
+ of the frame pointer to avoid an unused value.
+
+2020-05-30 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/95386
+ * constraint.cc (satisfaction_value): Accept INTEGER_CST of any
+ boolean type.
+
+2020-05-29 Patrick Palka <ppalka@redhat.com>
+ Jason Merrill <jason@redhat.com>
+
+ PR c++/95181
+ * class.c (add_method): Let special member function templates
+ coexist if they are not equivalently constrained, or in a class
+ template.
+
+2020-05-29 Jason Merrill <jason@redhat.com>
+
+ PR c++/95371
+ * pt.c (process_template_parm): Set DECL_TEMPLATE_INFO
+ on the DECL_TEMPLATE_RESULT.
+
+2020-05-29 Marek Polacek <polacek@redhat.com>
+
+ PR c++/95344
+ * cp-gimplify.c (cp_fold) <case MODIFY_EXPR>: Don't set
+ TREE_THIS_VOLATILE here.
+ (cp_fold): Set it here along with TREE_NO_WARNING.
+
+2020-05-29 Jason Merrill <jason@redhat.com>
+
+ PR c++/95311
+ PR c++/95221
+ * class.c (build_vfn_ref): Don't fold the INDIRECT_REF.
+
+2020-05-29 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/92652
+ PR c++/93698
+ PR c++/94128
+ * parser.c (cp_parser_requires_clause_expression): Temporarily
+ increment processing_template_decl only if it is 0.
+ (cp_parser_constraint_expression): Likewise.
+ (cp_parser_requires_expression): Likewise.
+
+2020-05-29 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/95241
+ * constexpr.c (get_or_insert_ctor_field): Add limited support
+ for RANGE_EXPR index lookups.
+
+2020-05-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/95328
+ * decl.c (cp_finish_decomp): Call complete_type before checking
+ COMPLETE_TYPE_P.
+
+2020-05-28 Jason Merrill <jason@redhat.com>
+
+ PR c++/94926
+ * decl.c (cp_finish_decl): Revert r9-297 change.
+ (check_static_variable_definition): Likewise.
+ * constexpr.c (ensure_literal_type_for_constexpr_object): Likewise.
+ * pt.c (instantiate_decl): Return early on type error.
+
+2020-05-27 Jason Merrill <jason@redhat.com>
+
+ PR c++/95319
+ * decl.c (reshape_init_array_1): Don't reuse in overload context.
+
+2020-05-27 Jason Merrill <jason@redhat.com>
+
+ PR c++/95242
+ * call.c (build_new_op_1): Suppress
+ warn_zero_as_null_pointer_constant across comparison of <=> result
+ to 0.
+
+2020-05-27 Jason Merrill <jason@redhat.com>
+
+ PR c++/95222
+ * decl.c (grokdeclarator): Don't shift attributes in TYPENAME
+ context.
+
+2020-05-27 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/95263
+ * pt.c (lookup_template_class_1): Restore alias template mutation.
+
+2020-05-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/95197
+ * cp-gimplify.c: Include omp-general.h.
+ (cp_genericize_r) <case OMP_DISTRIBUTE>: For class iteration
+ variables in composite distribute parallel for, instantiate copy
+ ctor of their types.
+
+2020-05-23 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/94038
+ * constexpr.c (cxx_eval_constant_expression)
+ <case TEMPLATE_ID_EXPR>: Don't evaluate the concept when
+ constexpr evaluation is uid-sensitive.
+
+2020-05-22 Jason Merrill <jason@redhat.com>
+
+ * cp-gimplify.c (cp_gimplify_expr) [CALL_EXPR]: Don't preevaluate
+ the function address if the call used operator syntax.
+
+2020-05-21 Jason Merrill <jason@redhat.com>
+
+ PR c++/95221
+ * cp-ubsan.c (cp_ubsan_maybe_instrument_member_call): For a virtual
+ call, instrument the OBJ_TYPE_REF.
+
+ * decl.c (compute_array_index_type_loc): Diagnose expressions
+ in a template that can't be constant.
+ * parser.c (cp_parser_direct_declarator): Don't check
+ non-constant array bounds here.
+
+ * cp-tree.h (is_rvalue_constant_expression): Declare.
+ * constexpr.c (is_rvalue_constant_expression): New.
+ * parser.c (cp_parser_constant_expression): Use it.
+ * decl.c (cp_finish_decl): Try to treat a constexpr initializer in a
+ template as constant.
+
+ * typeck.c (build_x_modify_expr): Handle error_mark_node arguments.
+
+ * decl.c (grokparms): Return NULL_TREE if any parms were erroneous.
+
+2020-05-21 Iain Sandoe <iain@sandoe.co.uk>
+
+ * coroutines.cc (finish_co_return_stmt): Revert change to use
+ finish_expr_stmt.
+
+2020-05-21 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/94038
+ * constexpr.c (constexpr_ctx::uid_sensitive): Remove field.
+ (uid_sensitive_constexpr_evaluation_value): Define.
+ (uid_sensitive_constexpr_evaluation_true_counter): Define.
+ (uid_sensitive_constexpr_evaluation_p): Define.
+ (uid_sensitive_constexpr_evaluation_sentinel): Define its
+ constructor.
+ (uid_sensitive_constexpr_evaluation_checker): Define its
+ constructor and its evaluation_restricted_p method.
+ (get_fundef_copy): Remove 'ctx' parameter. Use u_s_c_e_p
+ instead of constexpr_ctx::uid_sensitive.
+ (cxx_eval_call_expression): Use u_s_c_e_p instead, and test it
+ last. Adjust call to get_fundef_copy.
+ (instantiate_cx_fn_r): Test u_s_c_e_p so that we increment the
+ counter if necessary.
+ (cxx_eval_outermost_constant_expr): Remove 'uid_sensitive'
+ parameter. Adjust function body accordingly.
+ (maybe_constant_value): Remove 'uid_sensitive' parameter and
+ adjust function body accordingly. Set up a
+ uid_sensitive_constexpr_evaluation_checker, and use it to
+ conditionally update the cv_cache.
+ * cp-gimplify.c (cp_fold): Set up a
+ uid_sensitive_constexpr_evaluation_checker, and use it to
+ conditionally update the fold_cache.
+ * cp-tree.h (maybe_constant_value): Update declaration.
+ (struct uid_sensitive_constexpr_evaluation_sentinel): Define.
+ (struct sensitive_constexpr_evaluation_checker): Define.
+ * expr.c (fold_for_warn): Set up a
+ uid_sensitive_constexpr_evaluation_sentinel before calling
+ the folding subroutines. Drop all but the first argument to
+ maybe_constant_value.
+
+2020-05-20 Marek Polacek <polacek@redhat.com>
+
+ DR 2237
+ * parser.c (cp_parser_unqualified_id): Reject simple-template-id as
+ the declarator-id of a destructor.
+ (cp_parser_constructor_declarator_p): Reject simple-template-id as
+ the declarator-id of a constructor.
+
+2020-05-20 Marek Polacek <polacek@redhat.com>
+
+ DR 2289
+ PR c++/94553
+ * cp-tree.h (SD_DECOMPOSITION): New flag.
+ * decl.c (duplicate_decls): Make sure a structured binding is unique
+ in its declarative region.
+ (start_decl): If INITIALIZED is SD_DECOMPOSITION, call
+ fit_decomposition_lang_decl.
+ (grokdeclarator): Compare INITIALIZED directly to SD_* flags.
+ * parser.c (cp_parser_decomposition_declaration): Pass SD_DECOMPOSITION
+ to start_decl.
+
+2020-05-20 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/95223
+ * typeck.c (structural_comptypes): Don't perform
+ context-dependent resolution of TYPENAME_TYPEs when
+ comparing_specializations.
+
+2020-05-19 Nathan Sidwell <nathan@acm.org>
+
+ * pt.c (lookup_template_class_1): Do not reinit template_info of an
+ alias here.
+
+2020-05-18 Martin Sebor <msebor@redhat.com>
+
+ PR c++/94923
+ * call.c ((maybe_warn_class_memaccess): Use is_byte_access_type.
+ * cp-tree.h (is_dummy_object): Return bool.
+ (is_byte_access_type): Declare new function.
+ * tree.c (is_dummy_object): Return bool.
+ (is_byte_access_type): Define new function.
+
+2020-05-19 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/87847
+ * pt.c (init_template_processing): Enable sanitization for
+ decl_specializations and type_specializations.
+
+ PR c++/66439
+ * pt.c (fn_type_unification): Pass 'fn' instead of NULL_TREE as
+ the 'in_decl' parameter to coerce_template_parms.
+
+2020-05-18 Marek Polacek <polacek@redhat.com>
+
+ PR c++/94955
+ * typeck.c (cp_build_binary_op): Use fold_for_warn instead of
+ cp_fold_rvalue.
+
2020-05-18 Marek Polacek <polacek@redhat.com>
PR c++/94937
2020-05-13 Patrick Palka <ppalka@redhat.com>
PR c++/95020
- * constraint.c (tsubst_requires_expr): Produce a new
+ * constraint.cc (tsubst_requires_expr): Produce a new
requires-expression when processing_template_decl, even if
template arguments are not dependent.