Daily bump.
[official-gcc.git] / gcc / cp / ChangeLog
blobffdb6906fd8395c3766f310670155ff2c6dd18a5
1 2021-10-15  Jason Merrill  <jason@redhat.com>
3         PR c++/51851
4         PR c++/101402
5         PR c++/102033
6         PR c++/102034
7         PR c++/102039
8         PR c++/102044
9         * pt.c (determine_specialization): Remove redundant code.
10         (fn_type_unification): Check for mismatched length.
11         (type_unification_real): Ignore terminal void.
12         (get_bindings): Don't stop at void_list_node.
13         * class.c (resolve_address_of_overloaded_function): Likewise.
15 2021-10-15  Jason Merrill  <jason@redhat.com>
17         * constexpr.c (cxx_bind_parameters_in_call): Replace
18         new_call parameter with fun.
19         (cxx_eval_call_expression): Call it before instantiation.
20         (cxx_eval_outermost_constant_expr): Only instantiate fns
21         when manifestly_const_eval.
22         * typeck2.c (check_narrowing): This context is manifestly
23         constant-evaluated.
25 2021-10-14  Kwok Cheung Yeung  <kcy@codesourcery.com>
27         * decl.c (omp_declare_variant_finalize_one): Change call from
28         c_omp_mark_declare_variant to omp_mark_declare_variant.
29         * parser.c (cp_finish_omp_declare_variant): Change call from
30         c_omp_check_context_selector to omp_check_context_selector.
32 2021-10-09  Jakub Jelinek  <jakub@redhat.com>
34         * parser.c (cp_parser_omp_structured_block): Remove disallow_omp_attrs
35         argument.
36         (cp_parser_omp_structured_block_sequence): New function.
37         (cp_parser_omp_scan_loop_body): Use it.
38         (cp_parser_omp_sections_scope): Likewise.
40 2021-10-08  Martin Liska  <mliska@suse.cz>
42         * constexpr.c (maybe_warn_about_constant_value): Use new macro
43         OPTION_SET_P.
44         * decl.c (redeclaration_error_message): Likewise.
45         (cxx_init_decl_processing): Likewise.
47 2021-10-08  Jakub Jelinek  <jakub@redhat.com>
49         PR c++/102640
50         * parser.c (handle_omp_declare_target_clause): New function.
51         (cp_parser_omp_declare_target): Use it.
53 2021-10-07  Patrick Palka  <ppalka@redhat.com>
55         PR c++/61355
56         * pt.c (convert_template_argument): Perform array/function to
57         pointer conversion on the substituted type of an NTTP.
59 2021-10-07  Patrick Palka  <ppalka@redhat.com>
61         PR c++/99904
62         * pt.c (is_compatible_template_arg): Set processing_template_decl
63         around tsubst_constraint_info.
65 2021-10-07  Jonathan Wakely  <jwakely@redhat.com>
67         PR c++/102482
68         * init.c (maybe_warn_list_ctor): Do not warn for a reference to
69         a non-const std::initializer_list.
71 2021-10-06  Jakub Jelinek  <jakub@redhat.com>
73         PR c++/102612
74         * parser.c (cp_parser_jump_statement): Implement C++23 P2242R3.
75         Allow goto expressions in constexpr function bodies for C++23.
76         Adjust error message for older standards to mention it.
77         * decl.c (start_decl): Allow static and thread_local declarations
78         in constexpr function bodies for C++23.  Adjust error message for
79         older standards to mention it.
80         * constexpr.c (ensure_literal_type_for_constexpr_object): Allow
81         declarations of variables with non-literal type in constexpr function
82         bodies for C++23.  Adjust error message for older standards to mention
83         it.
84         (cxx_eval_constant_expression) <case DECL_EXPR>: Diagnose declarations
85         of initialization of static or thread_local vars.
86         (cxx_eval_constant_expression) <case GOTO_EXPR>: Diagnose goto
87         statements for C++23.
88         (potential_constant_expression_1) <case DECL_EXPR>: Swap the
89         CP_DECL_THREAD_LOCAL_P and TREE_STATIC checks.
90         (potential_constant_expression_1) <case LABEL_EXPR>: Allow labels for
91         C++23.  Adjust error message for older standards to mention it.
93 2021-10-06  Jakub Jelinek  <jakub@redhat.com>
94             Jason Merrill  <jason@redhat.com>
96         PR c++/98712
97         PR c++/102490
98         * cp-tree.h (maybe_synthesize_method): Declare.
99         * method.c (genericize_spaceship): Use
100         LOOKUP_NORMAL | LOOKUP_NONVIRTUAL | LOOKUP_DEFAULTED instead of
101         LOOKUP_NORMAL for flags.
102         (comp_info): Remove defining member.  Add complain, code, retcat.
103         (comp_info::comp_info): Adjust.
104         (do_one_comp): Split out from build_comparison_op.   Use
105         LOOKUP_NORMAL | LOOKUP_NONVIRTUAL | LOOKUP_DEFAULTED instead of
106         LOOKUP_NORMAL for flags.
107         (build_comparison_op): Add defining argument. Adjust comp_info
108         construction.  Use defining instead of info.defining.  Assert that
109         if defining, ctype is a complete type.  Walk base binfos.
110         (synthesize_method, maybe_explain_implicit_delete,
111         explain_implicit_non_constexpr): Adjust build_comparison_op callers.
112         (maybe_synthesize_method): New function.
113         * class.c (check_bases_and_members): Don't call defaulted_late_check
114         for sfk_comparison.
115         (finish_struct_1): Call it here instead after class has been
116         completed.
117         * pt.c (maybe_instantiate_noexcept): Call maybe_synthesize_method
118         instead of synthesize_method.
120 2021-10-05  Jakub Jelinek  <jakub@redhat.com>
122         PR c++/102548
123         * tree.c (apply_identity_attributes): Fix handling of the
124         case where an attribute in the list doesn't affect type
125         identity but some attribute before it does.
127 2021-10-05  Patrick Palka  <ppalka@redhat.com>
129         PR c++/102547
130         * constexpr.c (potential_constant_expression_1): Handle
131         NONTYPE_ARGUMENT_PACK.
133 2021-10-05  Patrick Palka  <ppalka@redhat.com>
135         PR c++/98930
136         * pt.c (has_value_dependent_address): Return true for a static
137         local variable from a function template.
139 2021-10-04  Marek Polacek  <polacek@redhat.com>
141         PR c++/97573
142         * typeck.c (cp_build_binary_op): Call do_warn_array_compare.
144 2021-10-03  Iain Sandoe  <iain@sandoe.co.uk>
146         PR c++/101765
147         * coroutines.cc (register_local_var_uses): Emit a sorry if
148         we encounter a VLA in the coroutine local variables.
150 2021-10-03  Iain Sandoe  <iain@sandoe.co.uk>
152         PR c++/99710
153         * coroutines.cc (await_statement_walker): Report an error if
154         an await expression is found in a handler body.
156 2021-10-03  John Eivind Helset  <jehelset@gmail.com>
158         PR c++/100673
159         * coroutines.cc (build_co_await): Guard against NULL
160         await_suspend types.
162 2021-10-03  Iain Sandoe  <iain@sandoe.co.uk>
164         PR c++/101133
165         * coroutines.cc (build_co_await): Mark co_await_expr trees
166         with TREE_SIDE_EFFECTS, also mark any containing expression.
167         (finish_co_await_expr): Mark type-dependent co_await_expr
168         trees with TREE_SIDE_EFFECTS.
170 2021-10-03  Iain Sandoe  <iain@sandoe.co.uk>
172         PR c++/99575
173         * coroutines.cc (build_co_await): Strip NOPs from
174         candidate awaiter expressions before testing to see
175         if they need a temporary.
177 2021-10-01  Martin Sebor  <msebor@redhat.com>
179         PR c/102103
180         * typeck.c (warn_for_null_address): Enhance.
181         (cp_build_binary_op): Call it also for member pointers.
183 2021-10-01  qingzhe huang  <nickhuang99@hotmail.com>
185         PR c++/101783
186         * tree.c (cp_build_qualified_type_real): Exclude typedef from
187         error.
189 2021-10-01  Jakub Jelinek  <jakub@redhat.com>
190             Richard Biener  <rguenther@suse.de>
192         PR sanitizer/102515
193         * typeck.c (cp_build_binary_op): Call ubsan_instrument_division
194         for division even for SANITIZE_SI_OVERFLOW.
196 2021-10-01  Jakub Jelinek  <jakub@redhat.com>
198         * parser.c (cp_parser_omp_clause_order): Set
199         OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
201 2021-10-01  Jakub Jelinek  <jakub@redhat.com>
203         PR c++/102496
204         * name-lookup.c (push_local_extern_decl_alias): Return early even for
205         tls vars with non-dependent type when processing_template_decl.  For
206         CP_DECL_THREAD_LOCAL_P vars call set_decl_tls_model on alias.
208 2021-09-30  Patrick Palka  <ppalka@redhat.com>
210         PR c++/102535
211         * method.c (is_xible_helper): Don't exit early for multi-arg
212         ctors in C++20.
214 2021-09-30  Patrick Palka  <ppalka@redhat.com>
216         * parser.c (cp_parser_trait_expr): Call nreverse on the reversed
217         list of trailing arguments.
219 2021-09-30  Patrick Palka  <ppalka@redhat.com>
221         PR c++/95567
222         * method.c (build_comparison_op): Skip DECL_VIRTUAL_P fields.
224 2021-09-28  Patrick Palka  <ppalka@redhat.com>
226         PR c++/99909
227         * pt.c (coerce_template_template_parms): Keep
228         processing_template_decl set around the call to unify as well.
230 2021-09-28  Iain Sandoe  <iain@sandoe.co.uk>
232         PR c++/102454
233         * coroutines.cc (analyze_fn_parms): Clean up synthetic names for
234         unnamed function params.
235         (morph_fn_to_coro): Do not try to set a guard variable for param
236         DTORs in the ramp, unless we have exceptions active.
238 2021-09-27  Patrick Palka  <ppalka@redhat.com>
240         PR c++/102479
241         * pt.c (rewrite_template_parm): Handle single-level tsubst_args.
242         Avoid a tree cycle when assigning the DECL_TEMPLATE_PARMS for a
243         rewritten ttp.
244         (alias_ctad_tweaks): Set current_template_parms accordingly.
246 2021-09-23  Michel Morin  <mimomorin@gmail.com>
248         * parser.c (cp_keyword_starts_decl_specifier_p): Do not
249         handle RID_ATTRIBUTE.
250         (cp_parser_constructor_declarator_p): Remove now-redundant
251         checks.
252         (cp_parser_lambda_declarator_opt): Likewise.
254 2021-09-23  Michel Morin  <mimomorin@gmail.com>
256         PR c++/77565
257         * parser.c (cp_keyword_starts_decl_specifier_p): Handle more
258         decl-specifiers (typedef/inline/cv/explicit/virtual/friend).
260 2021-09-23  Patrick Palka  <ppalka@redhat.com>
262         * ptree.c (cxx_print_decl): Dump the DECL_TEMPLATE_RESULT of
263         a TEMPLATE_DECL.  Dump the DECL_TEMPLATE_INFO rather than just
264         printing its pointer value.
266 2021-09-23  Jakub Jelinek  <jakub@redhat.com>
268         PR c++/102413
269         * parser.c (cp_parser_omp_directive_args): Diagnose if omp::directive
270         is not followed by a balanced token sequence starting with open paren.
272 2021-09-22  Patrick Palka  <ppalka@redhat.com>
274         DR 2446
275         PR c++/102412
276         * constexpr.c (cxx_eval_constant_expression)
277         <case TEMPLATE_ID_EXPR>: Check value_dependent_expression_p
278         instead of processing_template_decl.
279         * pt.c (value_dependent_expression_p) <case TEMPLATE_ID_EXPR>:
280         Return true only if any_dependent_template_arguments_p.
281         (instantiation_dependent_r) <case CALL_EXPR>: Remove this case.
282         <case TEMPLATE_ID_EXPR>: Likewise.
284 2021-09-22  Jakub Jelinek  <jakub@redhat.com>
286         * parser.c (cp_parser_omp_clause_allocate): Parse allocate clause
287         modifiers.
288         * semantics.c (finish_omp_clauses) <OMP_CLAUSE_ALLOCATE>: Perform
289         semantic analysis of OMP_CLAUSE_ALLOCATE_ALIGN.
290         * pt.c (tsubst_omp_clauses) <case OMP_CLAUSE_ALLOCATE>: Handle
291         also OMP_CLAUSE_ALLOCATE_ALIGN.
293 2021-09-22  Barrett Adair  <barrettellisadair@gmail.com>
295         * pt.c (find_parm_usage_r): New walk_tree callback to find func
296         parms.
297         (any_template_arguments_need_structural_equality_p): New special
298         case.
300 2021-09-21  wangpc  <pc.wang@linux.alibaba.com>
302         * decl.c (start_decl_1): Move verify_type_context to ...
303         (cp_finish_decl): ... to here.
305 2021-09-18  Jakub Jelinek  <jakub@redhat.com>
307         * parser.c (cp_parser_omp_clause_order): Parse unconstrained
308         and reproducible modifiers.
309         (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
311 2021-09-18  Jakub Jelinek  <jakub@redhat.com>
313         * parser.c (cp_parser_omp_clause_default): Handle private and
314         firstprivate arguments, adjust diagnostics on unknown argument.
315         * cp-gimplify.c (cxx_omp_finish_clause): Handle OMP_CLAUSE_PRIVATE.
317 2021-09-18  Jason Merrill  <jason@redhat.com>
319         * cp-tree.h (dependentish_scope_p): Declare.
320         * pt.c (dependentish_scope_p): New.
321         * parser.c (cp_parser_lookup_name): Return a TYPENAME_TYPE
322         for lookup of a type in a dependent object.
323         (cp_parser_template_id): Handle TYPENAME_TYPE.
324         (cp_parser_template_name): If we're looking for a type,
325         a name followed by < names a template.
327 2021-09-18  Jason Merrill  <jason@redhat.com>
329         * cp-tree.h: Fix typo in LANG_FLAG list.
331 2021-09-17  Jakub Jelinek  <jakub@redhat.com>
333         * cp-tree.h (finish_omp_atomic): Add r and weak arguments.
334         * parser.c (cp_parser_omp_atomic): Update function comment for
335         OpenMP 5.1 atomics, parse OpenMP 5.1 atomics and fail, compare and
336         weak clauses.
337         * semantics.c (finish_omp_atomic): Add r and weak arguments, handle
338         them, handle COND_EXPRs.
339         * pt.c (tsubst_expr): Adjust for COND_EXPR forms that
340         finish_omp_atomic can now produce.
342 2021-09-16  Patrick Palka  <ppalka@redhat.com>
344         PR c++/98486
345         * constraint.cc (get_normalized_constraints_from_decl): Always
346         look up constraints using the most general template.
347         * decl.c (grokdeclarator): Set constraints on a static data
348         member template.
349         * pt.c (determine_specialization): Check constraints on a
350         variable template.
352 2021-09-16  Iain Sandoe  <iain@sandoe.co.uk>
354         * coroutines.cc (await_statement_walker): Code cleanups.
356 2021-09-16  Jason Merrill  <jason@redhat.com>
358         * constexpr.c (cxx_eval_outermost_constant_expr): Use
359         protected_set_expr_location.
361 2021-09-15  Patrick Palka  <ppalka@redhat.com>
363         PR c++/101904
364         * call.c (build_user_type_conversion_1): Add tf_conv to complain.
365         (add_candidates): When in a SFINAE context, instead of adding a
366         candidate to bad_fns just mark it unviable.
368 2021-09-15  Jason Merrill  <jason@redhat.com>
370         * cp-tree.h (parsing_function_declarator): Declare.
371         * name-lookup.c (set_decl_context_in_fn): Use it.
372         * parser.c (cp_parser_direct_declarator): Use it.
373         (parsing_function_declarator): New.
375 2021-09-15  Jakub Jelinek  <jakub@redhat.com>
377         PR c++/88578
378         PR c++/102295
379         * typeck2.c (split_nonconstant_init_1): Don't throw away empty
380         initializers of flexible array members if they have non-zero type
381         size.
383 2021-09-15  Patrick Palka  <ppalka@redhat.com>
385         PR c++/102050
386         * decl.c (grok_special_member_properties): Set
387         TYPE_HAS_COPY_CTOR, TYPE_HAS_DEFAULT_CONSTRUCTOR
388         and TYPE_HAS_LIST_CTOR independently from each other.
390 2021-09-15  Jason Merrill  <jason@redhat.com>
392         * decl.c (cxx_init_decl_processing): Only warn about odd
393         interference sizes if they were specified with --param.
395 2021-09-15  Jason Merrill  <jason@redhat.com>
397         PR c++/48396
398         * cp-tree.h (enum cp_tree_index): Remove CPTI_TYPE_INFO_PTR_TYPE.
399         (type_info_ptr_type): Remove.
400         * rtti.c (init_rtti_processing): Don't predeclare std::type_info.
401         (typeid_ok_p): Check for null const_type_info_type_node.
402         (type_info_ptr_type, get_void_tinfo_ptr): New fns.
403         (get_tinfo_decl_dynamic, get_tinfo_ptr): Use them.
404         (ptr_initializer, ptm_initializer, get_pseudo_ti_init): Use them.
405         (get_tinfo_desc): Use const_ptr_type_node.
407 2021-09-15  Jason Merrill  <jason@redhat.com>
409         * parser.c (cp_parser_template_name): Move object type.
410         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
412 2021-09-15  Jason Merrill  <jason@redhat.com>
414         * parser.c (cp_parser_unqualified_id): Only complain about ~A<T> in
415         a declarator.
417 2021-09-14  Iain Sandoe  <iain@sandoe.co.uk>
419         * coroutines.cc (struct param_info): Add copy_var.
420         (build_actor_fn): Use simplified param references.
421         (register_param_uses): Likewise.
422         (rewrite_param_uses): Likewise.
423         (analyze_fn_parms): New function.
424         (coro_rewrite_function_body): Add proxies for the fn
425         parameters to the outer bind scope of the rewritten code.
426         (morph_fn_to_coro): Use simplified version of param ref.
428 2021-09-14  Iain Sandoe  <iain@sandoe.co.uk>
430         * coroutines.cc (coro_resume_fn_id, coro_destroy_fn_id,
431         coro_promise_id, coro_frame_needs_free_id, coro_resume_index_id,
432         coro_self_handle_id, coro_actor_continue_id,
433         coro_frame_i_a_r_c_id): New.
434         (coro_init_identifiers): Initialize new name identifiers.
435         (coro_promise_type_found_p): Use pre-built identifiers.
436         (struct await_xform_data): Remove unused fields.
437         (transform_await_expr): Delete code that is now unused.
438         (build_actor_fn): Simplify interface, use pre-built identifiers and
439         remove transforms that are no longer needed.
440         (build_destroy_fn): Use revised field names.
441         (register_local_var_uses): Use pre-built identifiers.
442         (coro_rewrite_function_body): Simplify interface, use pre-built
443         identifiers.  Generate proxy vars in the outer bind expr scope for the
444         implementation state that we wish to expose.
445         (morph_fn_to_coro): Adjust comments for new variable names, use pre-
446         built identifiers.  Remove unused code to generate frame entries for
447         the implementation state.  Adjust call for build_actor_fn.
449 2021-09-14  Patrick Palka  <ppalka@redhat.com>
451         PR c++/102163
452         * constexpr.c (cxx_eval_call_expression): After evaluating a
453         subobject constructor call for an empty union member, produce a
454         side effect that makes sure the member gets activated.
456 2021-09-14  Jakub Jelinek  <jakub@redhat.com>
458         PR c++/102295
459         * decl.c (layout_var_decl): For aggregates ending with a flexible
460         array member, add the size of the initializer for that member to
461         DECL_SIZE and DECL_SIZE_UNIT.
463 2021-09-14  Jakub Jelinek  <jakub@redhat.com>
465         PR c++/102305
466         * method.c (is_xible_helper): Call complete_type on to.
468 2021-09-14  Jason Merrill  <jason@redhat.com>
470         * decl.c (cxx_init_decl_processing): Don't warn if L1 cache line
471         size is smaller than maxalign.
473 2021-09-13  Jason Merrill  <jason@redhat.com>
475         * constexpr.c (maybe_warn_about_constant_value):
476         Complain about std::hardware_destructive_interference_size.
477         (cxx_eval_constant_expression): Call it.
478         * decl.c (cxx_init_decl_processing): Check
479         --param *-interference-size values.
481 2021-09-13  Patrick Palka  <ppalka@redhat.com>
483         PR c++/101764
484         * cp-tree.h (PACK_EXPANSION_FORCE_EXTRA_ARGS_P): New accessor
485         macro.
486         * pt.c (has_extra_args_mechanism_p): New function.
487         (find_parameter_pack_data::found_extra_args_tree_p): New data
488         member.
489         (find_parameter_packs_r): Set ppd->found_extra_args_tree_p
490         appropriately.
491         (make_pack_expansion): Set PACK_EXPANSION_FORCE_EXTRA_ARGS_P if
492         ppd.found_extra_args_tree_p.
493         (use_pack_expansion_extra_args_p): Return true if there were
494         unsubstituted packs and PACK_EXPANSION_FORCE_EXTRA_ARGS_P.
495         (tsubst_pack_expansion): Pass the pack expansion to
496         use_pack_expansion_extra_args_p.
498 2021-09-10  Jakub Jelinek  <jakub@redhat.com>
500         * parser.c (cp_parser_omp_atomic): Allow acq_rel on atomic read/write
501         and acq_rel/acquire clauses on update.
502         * semantics.c (finish_omp_atomic): Adjust c_finish_omp_atomic caller.
504 2021-09-08  Richard Biener  <rguenther@suse.de>
506         PR c++/102228
507         * cp-tree.h (ANON_AGGR_TYPE_FIELD): New define.
508         * decl.c (fixup_anonymous_aggr): Wipe RTTI info put in
509         place on invalid code.
510         * decl2.c (reset_type_linkage): Guard CLASSTYPE_TYPEINFO_VAR
511         access.
512         * module.cc (trees_in::read_class_def): Likewise.  Reconstruct
513         ANON_AGGR_TYPE_FIELD.
514         * semantics.c (finish_member_declaration): Populate
515         ANON_AGGR_TYPE_FIELD for anon aggregate typed members.
516         * typeck.c (lookup_anon_field): Remove DFS search and return
517         ANON_AGGR_TYPE_FIELD directly.
519 2021-09-07  Jakub Jelinek  <jakub@redhat.com>
521         PR c++/100495
522         * constexpr.c (maybe_save_constexpr_fundef): Save body even for
523         constexpr deleting dtors.
524         (cxx_eval_call_expression): Don't use DECL_CLONED_FUNCTION for
525         deleting dtors.
527 2021-09-07  Marcel Vollweiler  <marcel@codesourcery.com>
529         * parser.c (cp_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
530         directive.
531         * semantics.c (finish_omp_flush): Handle MEMMODEL_SEQ_CST.
533 2021-09-03  Iain Sandoe  <iain@sandoe.co.uk>
535         * coroutines.cc (register_local_var_uses): Do not mangle
536         frame entries for the outermost scope.  Record the outer
537         scope as nesting depth 0.
539 2021-09-03  Iain Sandoe  <iain@sandoe.co.uk>
541         * coroutines.cc (coro_build_artificial_var): New.
542         (build_actor_fn): Use var builder, rename vars to use
543         implementation namespace.
544         (coro_rewrite_function_body): Likewise.
545         (morph_fn_to_coro): Likewise.
547 2021-09-03  Iain Sandoe  <iain@sandoe.co.uk>
549         * coroutines.cc (transform_local_var_uses): Record
550         frame offset expressions as DECL_VALUE_EXPRs instead of
551         rewriting them.
553 2021-09-03  Patrick Palka  <ppalka@redhat.com>
555         PR c++/101904
556         * call.c (build_this_conversion): New function, split out from
557         add_function_candidate.
558         (add_function_candidate): New parameter shortcut_bad_convs.
559         Document it.  Use build_this_conversion.  Stop at the first bad
560         argument conversion when shortcut_bad_convs is true.
561         (add_template_candidate_real): New parameter shortcut_bad_convs.
562         Use build_this_conversion to check the 'this' conversion before
563         attempting deduction.  When the rejection reason code is
564         rr_bad_arg_conversion, pass -1 instead of 0 as the viable
565         parameter to add_candidate.  Pass 'convs' to add_candidate.
566         (add_template_candidate): New parameter shortcut_bad_convs.
567         (add_template_conv_candidate): Pass false as shortcut_bad_convs
568         to add_template_candidate_real.
569         (add_candidates): Prefer to shortcut bad conversions during
570         overload resolution under the assumption that we'll eventually
571         see a strictly viable candidate.  If this assumption turns out
572         to be false, re-process the non-strictly viable candidates
573         without shortcutting those bad conversions.
575 2021-09-03  Jason Merrill  <jason@redhat.com>
577         * pt.c (limit_bad_template_recursion): Suppress -Wunused for decls
578         we decide not to instantiate.
580 2021-09-03  Jakub Jelinek  <jakub@redhat.com>
582         PR target/102024
583         * class.c (build_base_field): Use SET_DECL_FIELD_ABI_IGNORED
584         instead of writing to DECL_FIELD_ABI_IGNORED.
585         (layout_class_type): Likewise.  In the place where zero-width
586         bitfields used to be removed, use
587         SET_DECL_FIELD_CXX_ZERO_WIDTH_BIT_FIELD on those fields instead.
589 2021-09-01  Iain Sandoe  <iain@sandoe.co.uk>
591         * call.c (build_over_call): Handle unavailable state in addition to
592         deprecation.
593         * class.c (type_build_ctor_call): Likewise.
594         (type_build_dtor_call): Likewise.
595         * cp-tree.h: Rename cp_warn_deprecated_use to
596         cp_handle_deprecated_or_unavailable.
597         * decl.c (duplicate_decls): Merge unavailability.
598         (grokdeclarator): Handle unavailability in addition to deprecation.
599         (type_is_unavailable): New.
600         (grokparms): Handle unavailability in addition to deprecation.
601         * decl.h (enum deprecated_states): Add
602         UNAVAILABLE_DEPRECATED_SUPPRESS.
603         * decl2.c (cplus_decl_attributes): Propagate unavailability to
604         templates.
605         (cp_warn_deprecated_use): Rename to ...
606         (cp_handle_deprecated_or_unavailable): ... this and amend to handle
607         the unavailable case. It remains a warning in the case of deprecation
608         but becomes an error in the case of unavailability.
609         (cp_warn_deprecated_use_scopes): Handle unavailability.
610         (mark_used): Likewise.
611         * parser.c (cp_parser_template_name): Likewise.
612         (cp_parser_template_argument): Likewise.
613         (cp_parser_parameter_declaration_list): Likewise.
614         * typeck.c (build_class_member_access_expr): Likewise.
615         (finish_class_member_access_expr): Likewise.
616         * typeck2.c (build_functional_cast_1): Likewise.
618 2021-09-01  Iain Sandoe  <iain@sandoe.co.uk>
620         * coroutines.cc (build_actor_fn): Add begin/finish clauses
621         to the initial test in the actor function.
623 2021-09-01  Iain Sandoe  <iain@sandoe.co.uk>
625         * coroutines.cc (await_statement_walker): Use build_stmt and
626         add_stmt instead of build1 and finish_expr_stmt.
628 2021-08-31  Jason Merrill  <jason@redhat.com>
630         * coroutines.cc (flatten_await_stmt): Fix copyo.
631         * decl.c (reshape_init_class): Simplify.
632         * module.cc (module_state::read_language): Add null check.
633         * parser.c (build_range_temp): Avoid type_uses_auto.
634         (cp_parser_class_specifier_1): Add null check.
636 2021-08-31  Patrick Palka  <ppalka@redhat.com>
638         PR c++/12672
639         * call.c (rejection_reason::call_varargs_p): Rename this
640         previously unused member to ...
641         (rejection_reason::least_p): ... this.
642         (arity_rejection): Add least_p parameter.
643         (add_template_candidate_real): When there are explicit
644         template arguments, check that the arity of the call agrees with
645         the arity of the function before attempting deduction.
646         (print_arity_information): Add least_p parameter.
647         (print_z_candidate): Adjust call to print_arity_information.
649 2021-08-31  Martin Sebor  <msebor@redhat.com>
651         * parser.c (cp_parser_selection_statement): Use direct initialization
652         instead of copy.
654 2021-08-31  Jason Merrill  <jason@redhat.com>
656         * constexpr.c (explain_invalid_constexpr_fn): Use iloc_sentinel.
658 2021-08-31  Jason Merrill  <jason@redhat.com>
660         PR c++/92193
661         * cp-tree.h (FNDECL_MANIFESTLY_CONST_EVALUATED): New.
662         * constexpr.c (cxx_eval_call_expression): Set it.
663         * pt.c (neglectable_inst_p): Check it.
665 2021-08-31  Marcel Vollweiler  <marcel@codesourcery.com>
667         * parser.c (cp_parser_omp_clause_device): Parse device-modifiers 'device_num'
668         and 'ancestor' in 'target device' clauses.
669         * semantics.c (finish_omp_clauses): Error handling. Constant device ids must
670         evaluate to '1' if 'ancestor' is used.
672 2021-08-30  Jason Merrill  <jason@redhat.com>
674         PR c++/96286
675         * cp-tree.h (struct lang_type): Add erroneous bit-field.
676         (CLASSTYPE_ERRONEOUS): New.
677         * pt.c (limit_bad_template_recursion): Check it.
678         (instantiate_class_template_1): Set it.
680 2021-08-30  Jason Merrill  <jason@redhat.com>
682         * constexpr.c (cxx_eval_outermost_constant_expr): Copy
683         expr location to result.
685 2021-08-30  Jason Merrill  <jason@redhat.com>
687         PR c++/101460
688         * cp-tree.h (cxx_constant_value_sfinae): Declare.
689         * constexpr.c (cxx_constant_value_sfinae): New.
690         * pt.c (fold_targs_r, maybe_fold_fn_template_args): New.
691         (tsubst_copy_and_build) [CALL_EXPR]: Call
692         maybe_fold_fn_template_args.
694 2021-08-30  Jason Merrill  <jason@redhat.com>
696         * parser.c (cp_parser_simple_requirement): Warn about missing
697         requires.
699 2021-08-27  Jason Merrill  <jason@redhat.com>
701         * typeck2.c (build_x_arrow): Do set TREE_TYPE when operand is
702         a dependent pointer.
704 2021-08-25  Andrew Pinski  <apinski@marvell.com>
706         PR c++/66590
707         * cp-objcp-common.c (cxx_block_may_fallthru): Handle
708         CLEANUP_STMT for the case which will be try/finally.
710 2021-08-25  Jakub Jelinek  <jakub@redhat.com>
712         PR c++/102019
713         * init.c (build_value_init_noctor): Ignore unnamed zero-width
714         bitfields.
716 2021-08-23  Jakub Jelinek  <jakub@redhat.com>
718         * parser.c (cp_parser_omp_clause_num_tasks,
719         cp_parser_omp_clause_grainsize): Parse the optional strict: modifier.
721 2021-08-20  Jakub Jelinek  <jakub@redhat.com>
723         * parser.c (cp_parser_handle_statement_omp_attributes): Determine if
724         PRAGMA_OMP_ERROR directive is C_OMP_DIR_STANDALONE.
725         (cp_parser_omp_error): New function.
726         (cp_parser_pragma): Handle PRAGMA_OMP_ERROR.
728 2021-08-20  Jakub Jelinek  <jakub@redhat.com>
730         * parser.c (cp_parser_omp_clause_depend_sink): Reject spurious
731         comma at the end of list.  Don't parse closing paren here...
732         (cp_parser_omp_clause_depend): ... but here instead.
734 2021-08-19  Patrick Palka  <ppalka@redhat.com>
736         PR c++/101803
737         * cp-tree.h (CONSTRUCTOR_IS_PAREN_INIT): Clarify comment.
739 2021-08-19  Jakub Jelinek  <jakub@redhat.com>
741         * parser.c (cp_parser_omp_requires): Don't call cp_lexer_nth_token_is
742         and optionally consume token if current token is CPP_EOF,
743         CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
745 2021-08-19  Jakub Jelinek  <jakub@redhat.com>
747         * parser.c (cp_parser_omp_nothing): Use cp_parser_require_pragma_eol
748         instead of cp_parser_skip_to_pragma_eol.
750 2021-08-18  Patrick Palka  <ppalka@redhat.com>
752         PR c++/101344
753         PR c++/101803
754         * cp-tree.h (CONSTRUCTOR_BRACES_ELIDED_P): Define.
755         * decl.c (reshape_init_r): Set it.
756         * pt.c (collect_ctor_idx_types): Recurse into a sub-CONSTRUCTOR
757         iff CONSTRUCTOR_BRACES_ELIDED_P.
759 2021-08-18  Patrick Palka  <ppalka@redhat.com>
761         PR c++/101883
762         * pt.c (convert_template_argument): Pass LOOKUP_IMPLICIT to
763         do_auto_deduction.
765 2021-08-18  Jakub Jelinek  <jakub@redhat.com>
767         * parser.c (cp_parser_omp_nothing): New function.
768         (cp_parser_pragma): Handle PRAGMA_OMP_NOTHING.
770 2021-08-18  Jakub Jelinek  <jakub@redhat.com>
772         * parser.c (cp_parser_omp_ordered): Return true instead of
773         false after emitting errors that the directive is not allowed in
774         pragma_stmt context.
775         (cp_parser_omp_target_update): Likewise.
776         (cp_parser_omp_cancellation_point): Change return type from void to
777         bool, return false if the directive should be ignored in pragma_stmt
778         contexts.
779         (cp_parser_omp_target_enter_data, cp_parser_omp_target_exit_data):
780         Change return type from tree to bool, return false if the
781         directive should be ignored in pragma_stmt contexts.
782         (cp_parser_omp_target): Adjust callers of cp_parser_omp_target_*_data,
783         return their result directly.
784         (cp_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
785         cp_parser_omp_cancellation_point returned.  Return true instead of
786         false after emitting errors that the directive is not allowed in
787         pragma_stmt context.
789 2021-08-17  Jakub Jelinek  <jakub@redhat.com>
791         PR c++/101539
792         * cp-tree.h (enum cp_trait_kind): Add CPTK_IS_LAYOUT_COMPATIBLE.
793         (enum cp_built_in_function): Add CP_BUILT_IN_IS_CORRESPONDING_MEMBER.
794         (fold_builtin_is_corresponding_member, next_common_initial_seqence,
795         layout_compatible_type_p): Declare.
796         * parser.c (cp_parser_primary_expression): Handle
797         RID_IS_LAYOUT_COMPATIBLE.
798         (cp_parser_trait_expr): Likewise.
799         * cp-objcp-common.c (names_builtin_p): Likewise.
800         * constraint.cc (diagnose_trait_expr): Handle
801         CPTK_IS_LAYOUT_COMPATIBLE.
802         * decl.c (cxx_init_decl_processing): Register
803         __builtin_is_corresponding_member builtin.
804         * constexpr.c (cxx_eval_builtin_function_call): Handle
805         CP_BUILT_IN_IS_CORRESPONDING_MEMBER builtin.
806         * semantics.c (is_corresponding_member_union,
807         is_corresponding_member_aggr, fold_builtin_is_corresponding_member):
808         New functions.
809         (trait_expr_value): Handle CPTK_IS_LAYOUT_COMPATIBLE.
810         (finish_trait_expr): Likewise.
811         * typeck.c (next_common_initial_seqence, layout_compatible_type_p):
812         New functions.
813         * cp-gimplify.c (cp_gimplify_expr): Fold
814         CP_BUILT_IN_IS_CORRESPONDING_MEMBER.
815         (cp_fold): Likewise.
816         * tree.c (builtin_valid_in_constant_expr_p): Handle
817         CP_BUILT_IN_IS_CORRESPONDING_MEMBER.
818         * cxx-pretty-print.c (pp_cxx_trait_expression): Handle
819         CPTK_IS_LAYOUT_COMPATIBLE.
820         * class.c (remove_zero_width_bit_fields): Remove.
821         (layout_class_type): Don't call it.
823 2021-08-17  Jakub Jelinek  <jakub@redhat.com>
825         * parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
826         (cp_parser_omp_scope): New function.
827         (cp_parser_omp_construct, cp_parser_pragma): Handle PRAGMA_OMP_SCOPE.
828         * pt.c (tsubst_expr): Handle OMP_SCOPE.
830 2021-08-12  Jakub Jelinek  <jakub@redhat.com>
832         * parser.c (cp_parser_omp_clause_name): Parse filter clause name.
833         (cp_parser_omp_clause_filter): New function.
834         (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
835         (OMP_MASKED_CLAUSE_MASK): Define.
836         (cp_parser_omp_masked): New function.
837         (cp_parser_omp_parallel): Handle parallel masked.
838         (cp_parser_omp_construct, cp_parser_pragma): Handle PRAGMA_OMP_MASKED.
839         * semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
840         * pt.c (tsubst_omp_clauses): Likewise.
841         (tsubst_expr): Handle OMP_MASKED.
843 2021-08-12  Sergei Trofimovich  <siarheit@google.com>
845         PR c++/101219
846         * pt.c (tsubst_copy_and_build): Use build_ptrmemfunc_access_expr
847         to construct ptrmemfunc expression instantiation.
849 2021-08-12  Tobias Burnus  <tobias@codesourcery.com>
851         * parser.c (cp_parser_omp_clause_proc_bind): Accept
852         'primary' as alias for 'master'.
854 2021-08-12  Jakub Jelinek  <jakub@redhat.com>
856         * cp-tree.h (omp_declare_target_attr): New type.
857         (struct saved_scope): Change type of omp_declare_target_attribute
858         from int to vec<omp_declare_target_attr, va_gc> * and move it.
859         * parser.c (cp_parser_omp_declare_target): Instead of
860         incrementing scope_chain->omp_declare_target_attribute, push
861         a struct containing parser->lexer->in_omp_attribute_pragma to
862         the vector.
863         (cp_parser_omp_end_declare_target): Instead of decrementing
864         scope_chain->omp_declare_target_attribute, pop a structure
865         from it.  Diagnose mismatching declare target vs.
866         end declare target syntax.
867         * semantics.c (finish_translation_unit): Use vec_safe_length
868         and vec_safe_truncate on scope_chain->omp_declare_target_attributes.
869         * decl2.c (cplus_decl_attributes): Use vec_safe_length
870         on scope_chain->omp_declare_target_attributes.
872 2021-08-12  Jakub Jelinek  <jakub@redhat.com>
874         * parser.c (cp_parser_lambda_body): Add temp overrides
875         for parser->{omp_declare_simd,oacc_routine,omp_attrs_forbidden_p}.
876         (cp_parser_statement): Restore parser->omp_attrs_forbidden_p for
877         cp_parser_declaration_statement.
878         (cp_parser_default_argument): Add temp override for
879         parser->omp_attrs_forbidden_p.
880         (cp_parser_late_parsing_omp_declare_simd): Diagnose declare simd
881         or declare variant in attribute syntax on a declaration immediately
882         following an OpenMP construct in pragma syntax.
884 2021-08-12  Jakub Jelinek  <jakub@redhat.com>
886         PR c++/94162
887         * method.c (cat_tag_for): Return cc_last for !CLASS_TYPE_P
888         or for classes not in std namespace.
890 2021-08-12  Jakub Jelinek  <jakub@redhat.com>
892         * name-lookup.c (finish_using_directive): Diagnose omp::directive
893         or omp::sequence attributes on using-directive.
895 2021-08-12  Jakub Jelinek  <jakub@redhat.com>
897         * parser.c (cp_parser_block_declaration): Call
898         cp_parser_using_directive for C++11 attributes followed by
899         using namespace tokens.
900         (cp_parser_using_directive): Parse C++11 attributes at the start
901         of the directive rather than at the end, only parse GNU attributes
902         at the end.
904 2021-08-12  Patrick Palka  <ppalka@redhat.com>
906         PR c++/101663
907         * constexpr.c (cxx_eval_store_expression): Handle the lval=true
908         case in the early exit code path for empty stores with mismatched
909         types.
911 2021-08-11  Patrick Palka  <ppalka@redhat.com>
913         PR c++/101725
914         DR 2082
915         * cp-tree.h (unevaluated_p): Return true for REQUIRES_EXPR.
916         * decl.c (local_variable_p_walkfn): Don't walk into unevaluated
917         operands.
918         * parser.c (cp_parser_primary_expression) <case CPP_NAME>: Never
919         reject uses of local variables in unevaluated contexts.
920         * tree.c (cp_walk_subtrees) <case REQUIRES_EXPR>: Increment
921         cp_unevaluated_operand.  Use cp_walk_tree directly instead of
922         WALK_SUBTREE to avoid the goto.  Use REQUIRES_EXPR_REQS instead
923         of TREE_OPERAND directly.
925 2021-08-11  Jakub Jelinek  <jakub@redhat.com>
927         PR c++/101786
928         * decl2.c (var_defined_without_dynamic_init): Return true for
929         DECL_DECLARED_CONSTINIT_P with complete type and trivial destructor.
931 2021-08-11  Patrick Palka  <ppalka@redhat.com>
933         PR c++/79501
934         * parser.c (maybe_adjust_declarator_for_dguide): New, split
935         out from ...
936         (cp_parser_init_declarator): ... here.
937         (cp_parser_member_declaration): Use it.
939 2021-08-11  Patrick Palka  <ppalka@redhat.com>
941         PR c++/89062
942         * parser.c (cp_parser_parameter_declaration_list): Don't call
943         grokdeclarator if cp_parser_error_occurred.
944         (cp_parser_parameter_declaration): Simulate an error if we see
945         the beginning of a CTAD form, i.e. if we see an opening brace
946         after the decl-specifier-seq and the type is a CTAD placeholder.
948 2021-08-10  Jakub Jelinek  <jakub@redhat.com>
950         * parser.c (cp_parser_member_declaration): Move odsd declaration
951         before cp_parser_using_declaration call to avoid errors with
952         GCC 4.8 to 6.
954 2021-08-10  Jakub Jelinek  <jakub@redhat.com>
956         * parser.h (struct cp_omp_declare_simd_data): Remove
957         in_omp_attribute_pragma and clauses members, add loc and attribs.
958         (struct cp_oacc_routine_data): Remove loc member, add clauses
959         member.
960         * parser.c (cp_finalize_omp_declare_simd): New function.
961         (cp_parser_handle_statement_omp_attributes): Mention in
962         function comment the function is used also for
963         attribute-declaration.
964         (cp_parser_handle_directive_omp_attributes): New function.
965         (cp_parser_statement): Don't call
966         cp_parser_handle_statement_omp_attributes if statement doesn't
967         have attribute-specifier-seq at the beginning at all or if
968         if those attributes don't appertain to the statement.
969         (cp_parser_simple_declaration): Call
970         cp_parser_handle_directive_omp_attributes and
971         cp_finalize_omp_declare_simd.
972         (cp_parser_explicit_instantiation): Likewise.
973         (cp_parser_init_declarator): Initialize prefix_attributes
974         only after parsing declarators.
975         (cp_parser_direct_declarator): Call
976         cp_parser_handle_directive_omp_attributes and
977         cp_finalize_omp_declare_simd.
978         (cp_parser_member_declaration): Likewise.
979         (cp_parser_single_declaration): Likewise.
980         (cp_parser_omp_declare_simd): Don't initialize
981         data.in_omp_attribute_pragma, instead initialize
982         data.attribs[0] and data.attribs[1].
983         (cp_finish_omp_declare_variant): Remove
984         in_omp_attribute_pragma argument, instead use
985         parser->lexer->in_omp_attribute_pragma.
986         (cp_parser_late_parsing_omp_declare_simd): Adjust
987         cp_finish_omp_declare_variant caller.  Handle attribute-syntax
988         declare simd/variant.
990 2021-08-06  Tamar Christina  <tamar.christina@arm.com>
992         * cp-objcp-common.h (cxx_simulate_enum_decl): Pass vec<> by pointer.
993         * decl.c (cxx_simulate_enum_decl): Likewise.
995 2021-08-04  Jakub Jelinek  <jakub@redhat.com>
997         PR c++/101759
998         * parser.c (cp_parser_default_argument): Temporarily override
999         parser->omp_declare_simd and parser->oacc_routine to NULL.
1001 2021-08-02  Patrick Palka  <ppalka@redhat.com>
1003         PR c++/100828
1004         * logic.cc (formula::formula): Use emplace_back instead of
1005         push_back.
1006         (formula::branch): Insert a copy of m_current directly after
1007         m_current instead of at the end of the list.
1008         (formula::erase): Define.
1009         (decompose_formula): Remove.
1010         (decompose_antecedents): Remove.
1011         (decompose_consequents): Remove.
1012         (derive_proofs): Remove.
1013         (max_problem_size): Remove.
1014         (diagnose_constraint_size): Remove.
1015         (subsumes_constraints_nonnull): Rewrite directly in terms of
1016         decompose_clause and derive_proof, interleaving decomposition
1017         with implication checking.  Remove limit on constraint complexity.
1018         Use formula::erase to free the current clause before moving on to
1019         the next one.
1021 2021-07-31  Jason Merrill  <jason@redhat.com>
1023         PR c++/96636
1024         * decl.c (fixup_anonymous_aggr): Clear TYPE_NEEDS_CONSTRUCTING
1025         after error.
1027 2021-07-31  Jason Merrill  <jason@redhat.com>
1029         * ptree.c (cxx_print_type) [TYPE_PACK_EXPANSION]: Also print
1030         PACK_EXPANSION_PATTERN.
1032 2021-07-31  Jakub Jelinek  <jakub@redhat.com>
1034         * parser.c (cp_parser_declaration): Handle OpenMP directives
1035         in attribute-declaration.
1037 2021-07-30  Jakub Jelinek  <jakub@redhat.com>
1039         PR c++/101539
1040         * cp-tree.h (enum cp_trait_kind): Add
1041         CPTK_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
1042         (enum cp_built_in_function): Add
1043         CP_BUILT_IN_IS_POINTER_INTERCONVERTIBLE_WITH_CLASS.
1044         (fold_builtin_is_pointer_inverconvertible_with_class): Declare.
1045         * parser.c (cp_parser_primary_expression): Handle
1046         RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
1047         (cp_parser_trait_expr): Likewise.
1048         * cp-objcp-common.c (names_builtin_p): Likewise.
1049         * constraint.cc (diagnose_trait_expr): Handle
1050         CPTK_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
1051         * decl.c (cxx_init_decl_processing): Register
1052         __builtin_is_pointer_interconvertible_with_class builtin.
1053         * constexpr.c (cxx_eval_builtin_function_call): Handle
1054         CP_BUILT_IN_IS_POINTER_INTERCONVERTIBLE_WITH_CLASS builtin.
1055         * semantics.c (pointer_interconvertible_base_of_p,
1056         first_nonstatic_data_member_p,
1057         fold_builtin_is_pointer_inverconvertible_with_class): New functions.
1058         (trait_expr_value): Handle CPTK_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
1059         (finish_trait_expr): Likewise.  Formatting fix.
1060         * cp-gimplify.c (cp_gimplify_expr): Fold
1061         CP_BUILT_IN_IS_POINTER_INTERCONVERTIBLE_WITH_CLASS.  Call
1062         fndecl_built_in_p just once.
1063         (cp_fold): Likewise.
1064         * tree.c (builtin_valid_in_constant_expr_p): Handle
1065         CP_BUILT_IN_IS_POINTER_INTERCONVERTIBLE_WITH_CLASS.  Call
1066         fndecl_built_in_p just once.
1067         * cxx-pretty-print.c (pp_cxx_trait_expression): Handle
1068         CPTK_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
1070 2021-07-30  Jason Merrill  <jason@redhat.com>
1072         * class.c (finish_struct_anon): Improve comment.
1073         * decl.c (fixup_anonymous_aggr): Reject anonymous struct
1074         with bases.
1076 2021-07-30  Jakub Jelinek  <jakub@redhat.com>
1078         * parser.c (cp_parser_statement): Rollback attributes not just
1079         when std_attrs is non-NULL, but whenever
1080         cp_parser_std_attribute_spec_seq parsed any tokens.
1082 2021-07-30  Jakub Jelinek  <jakub@redhat.com>
1084         PR c++/101582
1085         * parser.c (cp_parser_skip_std_attribute_spec_seq): Add a forward
1086         declaration.
1087         (cp_parser_declaration): Parse empty-declaration and
1088         attribute-declaration.
1089         (cp_parser_toplevel_declaration): Don't parse empty-declaration here.
1091 2021-07-28  Martin Sebor  <msebor@redhat.com>
1093         * init.c: Include new header.
1095 2021-07-27  Marek Polacek  <polacek@redhat.com>
1097         DR 1512
1098         PR c++/99701
1099         * cp-gimplify.c (cp_fold): Remove {LE,LT,GE,GT_EXPR} from
1100         a switch.
1101         * typeck.c (cp_build_binary_op): Reject ordered comparison
1102         of two null pointers.
1104 2021-07-26  Jakub Jelinek  <jakub@redhat.com>
1106         * parser.h (struct cp_lexer): Add orphan_p member.
1107         * parser.c (cp_parser_statement): Don't change in_omp_attribute_pragma
1108         upon restart from CPP_PRAGMA handling.  Fix up condition when a lexer
1109         should be destroyed and adjust saved_tokens if it records tokens from
1110         the to be destroyed lexer.
1111         (cp_parser_omp_section_scan): New function.
1112         (cp_parser_omp_scan_loop_body): Use it.  If
1113         parser->lexer->in_omp_attribute_pragma, allow optional comma
1114         after scan.
1115         (cp_parser_omp_sections_scope): Use cp_parser_omp_section_scan.
1117 2021-07-23  Jakub Jelinek  <jakub@redhat.com>
1119         * parser.h (struct cp_parser): Add omp_attrs_forbidden_p member.
1120         * parser.c (cp_parser_handle_statement_omp_attributes): Diagnose
1121         mixing of attribute and pragma syntax directives when seeing
1122         omp::directive if parser->omp_attrs_forbidden_p or if attribute syntax
1123         directives are followed by OpenMP pragma.
1124         (cp_parser_statement): Clear parser->omp_attrs_forbidden_p after
1125         the cp_parser_handle_statement_omp_attributes call.
1126         (cp_parser_omp_structured_block): Add disallow_omp_attrs argument,
1127         if true, set parser->omp_attrs_forbidden_p.
1128         (cp_parser_omp_scan_loop_body, cp_parser_omp_sections_scope): Pass
1129         false as disallow_omp_attrs to cp_parser_omp_structured_block.
1130         (cp_parser_omp_parallel, cp_parser_omp_task): Set
1131         parser->omp_attrs_forbidden_p.
1133 2021-07-21  Thomas Schwinge  <thomas@codesourcery.com>
1134             Joseph Myers  <joseph@codesourcery.com>
1135             Cesar Philippidis  <cesar@codesourcery.com>
1137         * parser.c (cp_parser_omp_clause_name): Handle 'nohost'.
1138         (cp_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
1139         (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1140         * pt.c (tsubst_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
1141         * semantics.c (finish_omp_clauses): Likewise.
1143 2021-07-21  Jakub Jelinek  <jakub@redhat.com>
1145         PR c++/101516
1146         * semantics.c (finish_omp_reduction_clause): Also call
1147         complete_type_or_else and return true if it fails.
1149 2021-07-19  Iain Sandoe  <iain@sandoe.co.uk>
1151         PR c++/95520
1152         * coroutines.cc (struct coroutine_info): Add fields for
1153         actor and destroy function decls.
1154         (to_ramp): New.
1155         (coro_get_ramp_function): New.
1156         (coro_get_actor_function): New.
1157         (coro_get_destroy_function): New.
1158         (act_des_fn): Set up mapping between ramp, actor and
1159         destroy functions.
1160         (morph_fn_to_coro): Adjust interface to the builder for
1161         helper function decls.
1162         * cp-tree.h (DECL_ACTOR_FN, DECL_DESTROY_FN, DECL_RAMP_FN,
1163         JOIN_STR): New.
1164         * mangle.c (write_encoding): Handle coroutine helpers.
1165         (write_unqualified_name): Handle lambda coroutine helpers.
1167 2021-07-16  Patrick Palka  <ppalka@redhat.com>
1169         PR c++/101233
1170         * pt.c (alias_ctad_tweaks): Clear cp_unevaluated_operand for
1171         substituting DECL_ARGUMENTS.
1173 2021-07-16  Patrick Palka  <ppalka@redhat.com>
1175         DR 960
1176         PR c++/99664
1177         * search.c (check_final_overrider): Compare TYPE_REF_IS_RVALUE
1178         when the return types are references.
1180 2021-07-16  Marek Polacek  <polacek@redhat.com>
1182         * typeck2.c (check_narrowing): Don't suppress the pedantic error
1183         in system headers.
1185 2021-07-15  Jakub Jelinek  <jakub@redhat.com>
1187         PR c++/101443
1188         * cp-gimplify.c (cp_fold): For comparisons with NULLPTR_TYPE
1189         operands, fold them right away to true or false.
1191 2021-07-15  Jason Merrill  <jason@redhat.com>
1193         PR c++/101095
1194         * cp-objcp-common.c (cp_common_init_ts): Mark types as types.
1195         (cp_tree_size): Remove redundant entries.
1197 2021-07-14  Patrick Palka  <ppalka@redhat.com>
1199         PR c++/88252
1200         * cp-tree.h (TEMPLATE_TYPE_PARM_FOR_CLASS): Remove.
1201         * pt.c (push_template_decl): Remove TEMPLATE_TYPE_PARM_FOR_CLASS
1202         handling.
1203         (redeclare_class_template): Likewise.
1204         (forwarding_reference_p): Define.
1205         (maybe_adjust_types_for_deduction): Use it instead.  Add 'tparms'
1206         parameter.
1207         (unify_one_argument): Pass tparms to
1208         maybe_adjust_types_for_deduction.
1209         (try_one_overload): Likewise.
1210         (unify): Likewise.
1211         (rewrite_template_parm): Remove TEMPLATE_TYPE_PARM_FOR_CLASS
1212         handling.
1214 2021-07-14  Jason Merrill  <jason@redhat.com>
1216         * class.c (struct find_final_overrider_data): Use auto_vec.
1217         (find_final_overrider): Remove explicit release.
1218         * coroutines.cc (process_conditional): Use auto_vec.
1219         * cp-gimplify.c (struct cp_genericize_data): Use auto_vec.
1220         (cp_genericize_tree): Remove explicit release.
1221         * parser.c (cp_parser_objc_at_property_declaration): Use
1222         auto_delete_vec.
1223         * semantics.c (omp_reduction_lookup): Use auto_vec.
1225 2021-07-14  Marek Polacek  <polacek@redhat.com>
1227         PR c++/101371
1228         * constexpr.c (cxx_eval_array_reference): Create a new .object
1229         and .ctor for the non-aggregate non-scalar case too when
1230         value-initializing.
1232 2021-07-12  Patrick Palka  <ppalka@redhat.com>
1234         PR c++/79501
1235         PR c++/100983
1236         * decl.c (grokfndecl): Don't require that deduction guides are
1237         declared at namespace scope.  Check that class-scope deduction
1238         guides have the same access as the member class template.
1239         (grokdeclarator): Pretend class-scope deduction guides are static.
1240         * search.c (lookup_member): Don't use a BASELINK for (class-scope)
1241         deduction guides.
1243 2021-07-10  Patrick Palka  <ppalka@redhat.com>
1245         PR c++/82110
1246         * init.c (build_aggr_init): Return error_mark_node if
1247         expand_aggr_init_1 returns false.
1248         (expand_default_init): Change return type to bool.  Return false
1249         on error, true on success.
1250         (expand_aggr_init_1): Likewise.
1252 2021-07-09  Jason Merrill  <jason@redhat.com>
1254         PR c++/101098
1255         * decl.c (function_requirements_equivalent_p): Only compare
1256         trailing requirements on a specialization.
1258 2021-07-09  Iain Sandoe  <iain@sandoe.co.uk>
1260         * coroutines.cc (build_actor_fn): Move common code to
1261         act_des_fn.
1262         (build_destroy_fn): Likewise.
1263         (act_des_fn): Build the void return here.  Ensure that the
1264         source location matches the original function.
1266 2021-07-09  Iain Sandoe  <iain@sandoe.co.uk>
1268         * coroutines.cc
1269         (coro_rewrite_function_body): Connect the replacement
1270         function block to the block nest correctly.
1272 2021-07-09  Patrick Palka  <ppalka@redhat.com>
1274         PR c++/101181
1275         * constraint.cc (tsubst_requires_expr): Pass complain/in_decl to
1276         add_extra_args.
1277         * cp-tree.h (add_extra_args): Add complain/in_decl parameters.
1278         * pt.c (build_extra_args): Make a copy of args.
1279         (add_extra_args): Add complain/in_decl parameters.  Enable the
1280         code for handling the case where the extra arguments are
1281         dependent.
1282         (tsubst_pack_expansion): Pass complain/in_decl to
1283         add_extra_args.
1284         (tsubst_template_args): Handle missing template arguments.
1285         (tsubst_expr) <case IF_STMT>: Pass complain/in_decl to
1286         add_extra_args.
1288 2021-07-09  Patrick Palka  <ppalka@redhat.com>
1290         PR c++/101247
1291         * pt.c (any_template_parm_r) <case TEMPLATE_DECL>: Just walk the
1292         DECL_CONTEXT.
1294 2021-07-08  Martin Sebor  <msebor@redhat.com>
1296         PR bootstrap/101372
1297         * module.cc (identifier): Suppress warning.
1298         (module_state::read_macro_maps): Remove warning suppression.
1299         (module_state::install_macros): Ditto.
1301 2021-07-08  Marek Polacek  <polacek@redhat.com>
1303         PR c++/101087
1304         * cp-tree.h (unevaluated_p): New.
1305         * except.c (check_noexcept_r): Use it.  Don't walk into
1306         unevaluated operands.
1308 2021-07-08  Martin Sebor  <msebor@redhat.com>
1310         PR bootstrap/101374
1311         * module.cc (module_state::read_macro_maps): Temporarily disable
1312         -Warray-bounds.
1313         (module_state::install_macros): Same.
1315 2021-07-06  Martin Sebor  <msebor@redhat.com>
1317         * error.c (cp_printer):  Remove support for %G and %K.
1319 2021-07-02  Jakub Jelinek  <jakub@redhat.com>
1321         * parser.h (struct cp_lexer): Add in_omp_attribute_pragma member.
1322         (struct cp_omp_declare_simd_data): Likewise.
1323         * cp-tree.h (enum cp_tree_index): Add CPTI_OMP_IDENTIFIER.
1324         (omp_identifier): Define.
1325         * parser.c (cp_parser_skip_to_pragma_eol): Handle
1326         in_omp_attribute_pragma CPP_PRAGMA_EOL followed by CPP_EOF.
1327         (cp_parser_require_pragma_eol): Likewise.
1328         (struct cp_omp_attribute_data): New type.
1329         (cp_parser_handle_statement_omp_attributes): New function.
1330         (cp_parser_statement): Handle OpenMP directives in statement's
1331         attribute-specifier-seq.
1332         (cp_parser_omp_directive_args, cp_parser_omp_sequence_args): New
1333         functions.
1334         (cp_parser_std_attribute): Handle omp::directive and omp::sequence
1335         attributes.
1336         (cp_parser_omp_all_clauses): If in_omp_attribute_pragma, allow
1337         a comma also before the first clause.
1338         (cp_parser_omp_allocate): Likewise.
1339         (cp_parser_omp_atomic): Likewise.
1340         (cp_parser_omp_depobj): Likewise.
1341         (cp_parser_omp_flush): Likewise.
1342         (cp_parser_omp_ordered): Likewise.
1343         (cp_parser_omp_declare_simd): Save in_omp_attribute_pragma
1344         into struct cp_omp_declare_simd_data.
1345         (cp_finish_omp_declare_variant): Add in_omp_attribute_pragma
1346         argument.  If set, allow a comma also before match clause.
1347         (cp_parser_late_parsing_omp_declare_simd): If in_omp_attribute_pragma,
1348         allow a comma also before the first clause.  Adjust
1349         cp_finish_omp_declare_variant caller.
1350         (cp_parser_omp_declare_target): If in_omp_attribute_pragma, allow
1351         a comma also before the first clause.
1352         (cp_parser_omp_declare_reduction_exprs): Likewise.
1353         (cp_parser_omp_requires): Likewise.
1354         * decl.c (initialize_predefined_identifiers): Initialize
1355         omp_identifier.
1356         * decl2.c (cplus_decl_attributes): Reject omp::directive and
1357         omp::sequence attributes.
1359 2021-07-02  Jakub Jelinek  <jakub@redhat.com>
1361         PR c/101297
1362         * parser.c (cp_parser_omp_atomic): Consume comma only if it
1363         appears before a CPP_NAME.
1365 2021-07-02  Patrick Palka  <ppalka@redhat.com>
1367         PR c++/101247
1368         * pt.c (any_template_parm_r) <case TEMPLATE_DECL>: Rewrite to
1369         use common_enclosing_class and to not depend on the TREE_TYPE
1370         of outer levels pointing to the corresponding primary template.
1372 2021-07-01  Patrick Palka  <ppalka@redhat.com>
1374         PR c++/101194
1375         * constexpr.c (cxx_eval_array_reference): When the element type
1376         is an empty type and the corresponding element is omitted, just
1377         return an empty CONSTRUCTOR instead of attempting value
1378         initialization.
1380 2021-07-01  Patrick Palka  <ppalka@redhat.com>
1382         PR c++/96204
1383         * pt.c (finish_template_variable): Pass the partially
1384         instantiated template and its args to instantiate_template.
1385         (instantiate_class_template_1): No need to call
1386         push_nested_class and pop_nested_class around the call to
1387         most_specialized_partial_spec.
1388         (instantiate_template_1): Pass the partially instantiated
1389         template to lookup_template_variable.
1390         (most_specialized_partial_spec):  Use push_access_scope_guard
1391         to set the access scope appropriately.  Use
1392         deferring_access_check_sentinel to force access to get checked
1393         immediately.
1394         (instantiate_decl): Just pass the VAR_DECL to
1395         most_specialized_partial_spec.
1397 2021-06-30  Patrick Palka  <ppalka@redhat.com>
1399         * constraint.cc (get_normalized_constraints_from_decl): Use
1400         push_access_scope_guard instead of push_nested_class_guard.
1401         * cp-tree.h (struct push_nested_class_guard): Replace with ...
1402         (struct push_access_scope_guard): ... this.
1403         * pt.c (push_access_scope): When the argument corresponds to
1404         a class type, push the class instead of its context.
1405         (pop_access_scope): Adjust accordingly.
1407 2021-06-30  Marek Polacek  <polacek@redhat.com>
1409         PR c++/100975
1410         DR 2397
1411         * decl.c (create_array_type_for_decl): Allow array of auto.
1413 2021-06-29  Jason Merrill  <jason@redhat.com>
1415         * pt.c (instantiate_decl): Only consider partial specializations of
1416         actual variable templates.
1418 2021-06-26  Patrick Palka  <ppalka@redhat.com>
1420         PR c++/96204
1421         * pt.c (instantiate_class_template_1): Enter the scope of the
1422         type when calling most_specialized_partial_spec.
1424 2021-06-26  Jason Merrill  <jason@redhat.com>
1426         PR c++/101040
1427         PR c++/97566
1428         * class.c (is_empty_field): Handle null argument.
1429         * constexpr.c (cxx_eval_bare_aggregate): Discard initializer
1430         for empty field.
1432 2021-06-26  Marek Polacek  <polacek@redhat.com>
1434         PR c++/100752
1435         * parser.c (cp_parser_declarator): Pass flags down to
1436         cp_parser_declarator.  Also pass static_p/member_p.
1438 2021-06-25  Martin Sebor  <msebor@redhat.com>
1440         * call.c (build_over_call): Replace direct uses of TREE_NO_WARNING
1441         with warning_suppressed_p, suppress_warning, and copy_no_warning, or
1442         nothing if not necessary.
1443         (set_up_extended_ref_temp): Same.
1444         * class.c (layout_class_type): Same.
1445         * constraint.cc (constraint_satisfaction_value): Same.
1446         * coroutines.cc (finish_co_await_expr): Same.
1447         (finish_co_yield_expr): Same.
1448         (finish_co_return_stmt): Same.
1449         (build_actor_fn): Same.
1450         (coro_rewrite_function_body): Same.
1451         (morph_fn_to_coro): Same.
1452         * cp-gimplify.c (genericize_eh_spec_block): Same.
1453         (gimplify_expr_stmt): Same.
1454         (cp_genericize_r): Same.
1455         (cp_fold): Same.
1456         * cp-ubsan.c (cp_ubsan_instrument_vptr): Same.
1457         * cvt.c (cp_fold_convert): Same.
1458         (convert_to_void): Same.
1459         * decl.c (wrapup_namespace_globals): Same.
1460         (grokdeclarator): Same.
1461         (finish_function): Same.
1462         (require_deduced_type): Same.
1463         * decl2.c (no_linkage_error): Same.
1464         (c_parse_final_cleanups): Same.
1465         * except.c (expand_end_catch_block): Same.
1466         * init.c (build_new_1): Same.
1467         (build_new): Same.
1468         (build_vec_delete_1): Same.
1469         (build_vec_init): Same.
1470         (build_delete): Same.
1471         * method.c (defaultable_fn_check): Same.
1472         * parser.c (cp_parser_fold_expression): Same.
1473         (cp_parser_primary_expression): Same.
1474         * pt.c (push_tinst_level_loc): Same.
1475         (tsubst_copy): Same.
1476         (tsubst_omp_udr): Same.
1477         (tsubst_copy_and_build): Same.
1478         * rtti.c (build_if_nonnull): Same.
1479         * semantics.c (maybe_convert_cond): Same.
1480         (finish_return_stmt): Same.
1481         (finish_parenthesized_expr): Same.
1482         (cp_check_omp_declare_reduction): Same.
1483         * tree.c (build_cplus_array_type): Same.
1484         * typeck.c (build_ptrmemfunc_access_expr): Same.
1485         (cp_build_indirect_ref_1): Same.
1486         (cp_build_function_call_vec): Same.
1487         (warn_for_null_address): Same.
1488         (cp_build_binary_op): Same.
1489         (unary_complex_lvalue): Same.
1490         (cp_build_modify_expr): Same.
1491         (build_x_modify_expr): Same.
1492         (convert_for_assignment): Same.
1494 2021-06-24  Patrick Palka  <ppalka@redhat.com>
1496         PR c++/98832
1497         * pt.c (maybe_aggr_guide): Handle alias templates appropriately.
1499 2021-06-24  Patrick Palka  <ppalka@redhat.com>
1501         PR c++/101182
1502         * constraint.cc (evaluate_requires_expr): Adjust function comment.
1503         * cp-gimplify.c (cp_genericize_r) <case REQUIRES_EXPR>: Move to ...
1504         (cp_fold) <case REQUIRES_EXPR>: ... here.
1506 2021-06-24  Jakub Jelinek  <jakub@redhat.com>
1508         * parser.c (cp_omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
1509         C_ORT_OMP for clauses on target construct.
1510         (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
1511         (cp_parser_omp_target): For non-combined target add
1512         map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION.  Pass
1513         C_ORT_OMP_TARGET to finish_omp_clauses.
1514         * semantics.c (handle_omp_array_sections_1): Adjust ort handling
1515         for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
1516         never present on C_ORT_*DECLARE_SIMD.
1517         (handle_omp_array_sections): Likewise.
1518         (finish_omp_clauses): Likewise.  Handle OMP_CLAUSE_IN_REDUCTION
1519         on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
1520         corresponding map clauses.
1521         * pt.c (tsubst_expr): Pass C_ORT_OMP_TARGET instead of C_ORT_OMP for
1522         clauses on target construct.
1524 2021-06-23  Patrick Palka  <ppalka@redhat.com>
1526         PR c++/101174
1527         * pt.c (push_access_scope): For artificial deduction guides,
1528         set the access scope to that of the constructor.
1529         (pop_access_scope): Likewise.
1530         (build_deduction_guide): Don't set DECL_CONTEXT on the guide.
1532 2021-06-23  Patrick Palka  <ppalka@redhat.com>
1534         PR c++/86439
1535         * call.c (print_error_for_call_failure): Constify 'args' parameter.
1536         (perform_dguide_overload_resolution): Define.
1537         * cp-tree.h: (perform_dguide_overload_resolution): Declare.
1538         * pt.c (do_class_deduction): Use perform_dguide_overload_resolution
1539         instead of build_new_function_call.  Don't use tf_decltype or
1540         set cp_unevaluated_operand.  Remove unnecessary NULL_TREE tests.
1542 2021-06-21  Patrick Palka  <ppalka@redhat.com>
1544         PR c++/67302
1545         * typeck.c (check_return_expr): Call maybe_undo_parenthesized_ref
1546         sooner, before the NRVO handling.
1548 2021-06-21  Patrick Palka  <ppalka@redhat.com>
1550         PR c++/80431
1551         * tree.c (bot_replace): Use convert_to_base to build the
1552         conversion to the (morally) virtual base.
1554 2021-06-21  Jakub Jelinek  <jakub@redhat.com>
1556         PR inline-asm/100785
1557         * typeck.c (cxx_mark_addressable): Diagnose trying to make
1558         bit-fields addressable.
1560 2021-06-17  Jason Merrill  <jason@redhat.com>
1562         PR c++/101106
1563         * decl.c (duplicate_decls): Make 'deleted after first declaration'
1564         pedwarn on by default.
1566 2021-06-17  Jason Merrill  <jason@redhat.com>
1568         PR c++/101029
1569         * init.c (build_vec_init): Preserve the type of base.
1571 2021-06-16  Jason Merrill  <jason@redhat.com>
1573         PR c++/101078
1574         PR c++/91706
1575         * pt.c (tsubst_baselink): Update binfos in non-dependent case.
1577 2021-06-15  Robin Dapp  <rdapp@linux.ibm.com>
1579         * decl.c (duplicate_decls): Likewise.
1581 2021-06-14  Tobias Burnus  <tobias@codesourcery.com>
1583         PR c/100913
1584         * parser.c (cp_parser_omp_clause_affinity): No need to set iterator
1585         var in the error case.
1587 2021-06-13  Trevor Saunders  <tbsaunde@tbsaunde.org>
1589         * constexpr.c (cxx_eval_call_expression): Iterate over vec<>
1590         with range based for.
1591         (cxx_eval_store_expression): Likewise.
1592         (cxx_eval_loop_expr): Likewise.
1593         * decl.c (wrapup_namespace_globals): Likewise.
1594         (cp_finish_decl): Likewise.
1595         (cxx_simulate_enum_decl): Likewise.
1596         * parser.c (cp_parser_postfix_expression): Likewise.
1598 2021-06-12  Jason Merrill  <jason@redhat.com>
1600         PR c++/101029
1601         * init.c (build_vec_init): Shortcut [0] case.
1603 2021-06-12  Jason Merrill  <jason@redhat.com>
1605         * pt.c (lookup_template_class_1): Shortcut current_class_type.
1607 2021-06-11  Patrick Palka  <ppalka@redhat.com>
1609         DR 1227
1610         PR c++/96560
1611         * pt.c (tsubst_arg_types): Rearrange so that we substitute into
1612         TYPE_ARG_TYPES in forward order while short circuiting
1613         appropriately.  Adjust formatting.
1615 2021-06-11  Jakub Jelinek  <jakub@redhat.com>
1617         PR c++/100974
1618         * cp-tree.h (struct saved_scope): Add consteval_if_p
1619         member.  Formatting fix for the discarded_stmt comment.
1620         (in_consteval_if_p, IF_STMT_CONSTEVAL_P): Define.
1621         * parser.c (cp_parser_lambda_expression): Temporarily disable
1622         in_consteval_if_p when parsing lambda body.
1623         (cp_parser_selection_statement): Parse consteval if.
1624         * decl.c (struct named_label_entry): Add in_consteval_if member.
1625         (level_for_consteval_if): New function.
1626         (poplevel_named_label_1, check_previous_goto_1, check_goto): Handle
1627         consteval if.
1628         * constexpr.c (cxx_eval_builtin_function_call): Clarify in comment
1629         why CP_BUILT_IN_IS_CONSTANT_EVALUATED needs to *non_constant_p
1630         for !ctx->manifestly_const_eval.
1631         (cxx_eval_conditional_expression): For IF_STMT_CONSTEVAL_P evaluate
1632         condition as if it was __builtin_is_constant_evaluated call.
1633         (potential_constant_expression_1): For IF_STMT_CONSTEVAL_P always
1634         recurse on both branches.
1635         * cp-gimplify.c (genericize_if_stmt): Genericize IF_STMT_CONSTEVAL_P
1636         as the else branch.
1637         * pt.c (tsubst_expr) <case IF_STMT>: Copy IF_STMT_CONSTEVAL_P.
1638         Temporarily set in_consteval_if_p when recursing on
1639         IF_STMT_CONSTEVAL_P then branch.
1640         (tsubst_lambda_expr): Temporarily disable
1641         in_consteval_if_p when instantiating lambda body.
1642         * call.c (immediate_invocation_p): Return false when
1643         in_consteval_if_p.
1645 2021-06-11  Marek Polacek  <polacek@redhat.com>
1647         PR c++/100995
1648         * constexpr.c (maybe_constexpr_fn): New.
1649         * cp-tree.h (maybe_constexpr_fn): Declare.
1650         * semantics.c (find_std_constant_evaluated_r): New.
1651         (maybe_warn_for_constant_evaluated): New.
1652         (finish_if_stmt_cond): Call it.
1654 2021-06-10  Patrick Palka  <ppalka@redhat.com>
1656         PR c++/67829
1657         * pt.c (unify) <case BOUND_TEMPLATE_TEMPLATE_PARM>: When
1658         the TEMPLATE_DECL of a BOUND_TEMPLATE_TEMPLATE_PARM argument is
1659         a template template parameter, adjust to the
1660         TEMPLATE_TEMPLATE_PARAMETER before falling through.
1662 2021-06-10  Patrick Palka  <ppalka@redhat.com>
1664         PR c++/100946
1665         * constraint.cc (normalize_placeholder_type_constraints): When
1666         normalizing a non-templated return-type-requirement, add a dummy
1667         level to initial_parms.
1669 2021-06-08  Marek Polacek  <polacek@redhat.com>
1671         PR c++/100065
1672         * decl.c (grokdeclarator): Store a value-dependent
1673         explicit-specifier even for deduction guides.
1675 2021-06-08  Jason Merrill  <jason@redhat.com>
1677         * parser.c (cp_parser_string_literal): Adjust diagnostic.
1679 2021-06-08  Jason Merrill  <jason@redhat.com>
1681         PR c++/100963
1682         * call.c (perfect_conversion_p): Check check_narrowing.
1684 2021-06-08  Jason Merrill  <jason@redhat.com>
1686         PR c++/91706
1687         * name-lookup.c (get_class_binding): Keep a BASELINK.
1688         (set_inherited_value_binding_p): Adjust.
1689         * lambda.c (is_lambda_ignored_entity): Adjust.
1690         * pt.c (lookup_template_function): Copy a BASELINK before
1691         modifying it.
1693 2021-06-08  Jason Merrill  <jason@redhat.com>
1695         PR c++/91706
1696         * semantics.c (baselink_for_fns): Fix BASELINK_BINFO.
1698 2021-06-08  Jason Merrill  <jason@redhat.com>
1700         * module.cc (duplicate_hash::hash): Comment out.
1701         (trees_in::tree_value): Adjust loop counter.
1703 2021-06-08  Jason Merrill  <jason@redhat.com>
1705         PR c++/100102
1706         * init.c (build_offset_ref): Return the BASELINK for a static
1707         member function.
1709 2021-06-07  Patrick Palka  <ppalka@redhat.com>
1711         PR c++/100918
1712         * parser.c (cp_parser_lookup_name): Check access of the lookup
1713         result before we potentially adjust an injected-class-name to
1714         its TEMPLATE_DECL.
1716 2021-06-06  Jakub Jelinek  <jakub@redhat.com>
1718         PR c/100902
1719         * parser.c (cp_parser_omp_target): Call c_omp_adjust_map_clauses
1720         even when target is combined with other constructs.
1722 2021-06-04  Patrick Palka  <ppalka@redhat.com>
1724         PR c++/100893
1725         * pt.c (convert_template_argument): Strip top-level cv-quals
1726         on the substituted type of a non-type template parameter.
1728 2021-06-04  Patrick Palka  <ppalka@redhat.com>
1730         PR c++/100102
1731         * pt.c (tsubst_function_decl): Remove old code for reducing
1732         args when it has excess levels.
1734 2021-06-04  Jakub Jelinek  <jakub@redhat.com>
1736         PR c++/100872
1737         * name-lookup.c (maybe_save_operator_binding): Add op_attr after all
1738         ATTR_IS_DEPENDENT attributes in the DECL_ATTRIBUTES list rather than
1739         to the start.
1741 2021-06-03  Patrick Palka  <ppalka@redhat.com>
1743         PR c++/100592
1744         * decl.c (make_typename_type): After calling
1745         lookup_template_class, adjust the result to its TYPE_NAME and
1746         then consider the tf_keep_type_decl flag.
1748 2021-06-03  Patrick Palka  <ppalka@redhat.com>
1750         PR c++/100862
1751         * pt.c (set_current_access_from_decl): Move to ...
1752         * class.c (set_current_access_from_decl): ... here.
1753         (handle_using_decl): Use it to propagate the access of the
1754         using-enum decl to the copy of the imported enumerator.
1755         * cp-tree.h (set_current_access_from_decl): Declare.
1756         * decl.c (build_enumerator): Simplify using make_temp_override
1757         and set_current_access_from_decl.
1759 2021-06-03  Jakub Jelinek  <jakub@redhat.com>
1761         PR c++/100859
1762         * semantics.c (handle_omp_array_sections_1): For
1763         OMP_CLAUSE_{AFFINITY,DEPEND} handle FIELD_DECL base using
1764         finish_non_static_data_member and allow this as base.
1765         (finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
1766         after depend only cases.  Let this be diagnosed by !lvalue_p
1767         case for OMP_CLAUSE_{AFFINITY,DEPEND} and remove useless
1768         assert.
1769         * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_AFFINITY.
1771 2021-06-02  Jason Merrill  <jason@redhat.com>
1773         PR c++/100838
1774         * call.c (convert_like_internal): Clear tf_no_cleanup when
1775         recursing.
1776         (build_user_type_conversion_1): Only add ck_rvalue if
1777         LOOKUP_ONLYCONVERTING.
1779 2021-06-01  Patrick Palka  <ppalka@redhat.com>
1781         PR c++/65816
1782         * init.c (expand_aggr_init_1): Check
1783         type_has_non_user_provided_default_constructor instead of
1784         type_has_user_provided_constructor.
1786 2021-06-01  Jason Merrill  <jason@redhat.com>
1788         PR c++/91859
1789         * call.c (build_op_delete_call): Don't set CALL_FROM_NEW_OR_DELETE_P
1790         for destroying delete.
1791         * init.c (build_delete): Don't clobber before destroying delete.
1793 2021-06-01  Jason Merrill  <jason@redhat.com>
1795         PR c++/94492
1796         * decl2.c (cp_warn_deprecated_use): Check warning_enabled_at.
1798 2021-05-31  Richard Biener  <rguenther@suse.de>
1800         PR c++/88601
1801         * cp-objcp-common.c (names_builtin_p): Handle
1802         RID_BUILTIN_SHUFFLEVECTOR.
1803         * cp-tree.h (build_x_shufflevector): Declare.
1804         * parser.c (cp_parser_postfix_expression): Handle
1805         RID_BUILTIN_SHUFFLEVECTOR.
1806         * pt.c (tsubst_copy_and_build): Handle IFN_SHUFFLEVECTOR.
1807         * typeck.c (build_x_shufflevector): Build either a lowered
1808         VEC_PERM_EXPR or an unlowered shufflevector via a temporary
1809         internal function IFN_SHUFFLEVECTOR.
1811 2021-05-28  Jason Merrill  <jason@redhat.com>
1813         * constexpr.c (build_data_member_initialization): Use tsi_range.
1814         (build_constexpr_constructor_member_initializers): Likewise.
1815         (constexpr_fn_retval, cxx_eval_statement_list): Likewise.
1816         (potential_constant_expression_1): Likewise.
1817         * coroutines.cc (await_statement_expander): Likewise.
1818         (await_statement_walker): Likewise.
1819         * module.cc (trees_out::core_vals): Likewise.
1820         * pt.c (tsubst_expr): Likewise.
1821         * semantics.c (set_cleanup_locs): Likewise.
1823 2021-05-28  Jason Merrill  <jason@redhat.com>
1825         PR c++/100797
1826         PR c++/95719
1827         * call.c (build_over_call): Adjust base_binfo in
1828         resolves_to_fixed_type_p case.
1830 2021-05-28  Jakub Jelinek  <jakub@redhat.com>
1832         PR middle-end/99928
1833         * semantics.c (handle_omp_array_sections): Copy
1834         OMP_CLAUSE_MAP_IMPLICIT.
1835         (finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1836         marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT.  Add
1837         map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
1838         maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
1839         present too.  For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
1840         if present in map_head, map_field_head or map_firstprivate_head
1841         bitmaps.
1843 2021-05-28  Tobias Burnus  <tobias@codesourcery.com>
1845         * parser.c (cp_parser_omp_clause_affinity): New.
1846         (cp_parser_omp_clause_name, cp_parser_omp_var_list_no_open,
1847         cp_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity
1848         clause.
1849         * semantics.c (handle_omp_array_sections_1, handle_omp_array_sections,
1850         finish_omp_clauses): Likewise.
1852 2021-05-27  Matthias Kretz  <kretz@kde.org>
1854         PR c++/100716
1855         * error.c (dump_template_bindings): Include code to print
1856         "[with" and ']', conditional on whether anything is printed at
1857         all. This is tied to whether a semicolon is needed to separate
1858         multiple template parameters. If the template argument repeats
1859         the template parameter (T = T), then skip the parameter.
1860         (dump_substitution): Moved code to print "[with" and ']' to
1861         dump_template_bindings.
1862         (dump_function_decl): Partial revert of PR50828, which masked
1863         TFF_TEMPLATE_NAME for all of dump_function_decl. Now
1864         TFF_TEMPLATE_NAME is masked for the scope of the function and
1865         only carries through to dump_function_name.
1866         (dump_function_name): Avoid calling dump_template_parms if
1867         TFF_TEMPLATE_NAME is set.
1869 2021-05-27  Matthias Kretz  <kretz@kde.org>
1871         PR c++/100763
1872         * error.c: Call dump_scope when printing a typedef.
1874 2021-05-27  Patrick Palka  <ppalka@redhat.com>
1876         PR c++/99893
1877         * tree.c (cp_walk_subtrees) <case STATIC_ASSERT>: New case.
1879 2021-05-27  Jason Merrill  <jason@redhat.com>
1881         PR c++/86355
1882         * pt.c (use_pack_expansion_extra_args_p): Don't compare
1883         args from the same argument pack.
1885 2021-05-27  Patrick Palka  <ppalka@redhat.com>
1887         DR 1315
1888         PR c++/67593
1889         PR c++/96555
1890         * pt.c (process_partial_specialization): Don't error on a
1891         non-simple non-type template argument that involves template
1892         parameters.
1893         (for_each_template_parm_r): Don't walk TRAIT_EXPR, PLUS_EXPR,
1894         MULT_EXPR, or SCOPE_REF when include_nondeduced_p is false.
1896 2021-05-26  Patrick Palka  <ppalka@redhat.com>
1898         PR c++/100502
1899         * typeck.c (finish_class_member_access_expr): Disable ahead
1900         of time access checking during the member lookup.
1902 2021-05-26  Patrick Palka  <ppalka@redhat.com>
1904         PR c++/100368
1905         * tree.c (build_target_expr_with_type): Don't call force_rvalue
1906         on CALL_EXPR initializer.  Simplify now that bot_manip is no
1907         longer a caller.
1908         (bot_manip): Use force_target_expr instead of
1909         build_target_expr_with_type.
1911 2021-05-26  Patrick Palka  <ppalka@redhat.com>
1913         PR c++/97420
1914         * cvt.c (noexcept_conv_p): Remove redundant checks and simplify.
1915         (fnptr_conv_p): Don't call non_reference.  Use INDIRECT_TYPE_P
1916         instead of TYPE_PTR_P.
1917         * pt.c (convert_nontype_argument_function): Look through
1918         implicit INDIRECT_REFs before calling strip_fnptr_conv.
1920 2021-05-25  Jakub Jelinek  <jakub@redhat.com>
1922         PR c++/100666
1923         * call.c (convert_arg_to_ellipsis): For expressions with NULLPTR_TYPE
1924         and side-effects, temporarily disable -Wunused-result warning when
1925         building COMPOUND_EXPR.
1927 2021-05-21  Jakub Jelinek  <jakub@redhat.com>
1929         PR middle-end/99928
1930         * semantics.c (finish_omp_clauses): Move firstprivate clauses with
1931         OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain.  Don't error
1932         if a decl is mentioned both in map clause and in such firstprivate
1933         clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
1935 2021-05-20  Jason Merrill  <jason@redhat.com>
1937         * call.c (reference_binding): Check for designator.
1938         (implicit_conversion_1, build_special_member_call): Likewise.
1939         * decl.c (reshape_init_r): Likewise.
1940         * pt.c (do_class_deduction): Likewise.
1941         * typeck2.c (digest_init_r): Likewise.
1943 2021-05-20  Jason Merrill  <jason@redhat.com>
1945         PR c++/100489
1946         * decl.c (reshape_init_class): Handle designator for
1947         member of anonymous aggregate here.
1948         * typeck2.c (process_init_constructor_record): Not here.
1950 2021-05-20  Jonathan Wakely  <jwakely@redhat.com>
1952         * call.c (maybe_warn_array_conv): Use new warning option.
1953         * decl.c (mark_inline_variable, grokdeclarator): Likewise.
1954         * error.c (maybe_warn_cpp0x): Likewise.
1955         * parser.c (cp_parser_primary_expression)
1956         (cp_parser_unqualified_id)
1957         (cp_parser_pseudo_destructor_name)
1958         (cp_parser_lambda_introducer)
1959         (cp_parser_lambda_declarator_opt)
1960         (cp_parser_selection_statement)
1961         (cp_parser_init_statement)
1962         (cp_parser_decomposition_declaration)
1963         (cp_parser_function_specifier_opt)
1964         (cp_parser_static_assert)
1965         (cp_parser_namespace_definition)
1966         (cp_parser_using_declaration)
1967         (cp_parser_asm_definition)
1968         (cp_parser_ctor_initializer_opt_and_function_body)
1969         (cp_parser_initializer_list)
1970         (cp_parser_type_parameter_key)
1971         (cp_parser_member_declaration)
1972         (cp_parser_try_block)
1973         (cp_parser_std_attribute_spec): Likewise.
1974         * pt.c (check_template_variable): Likewise.
1976 2021-05-20  Jason Merrill  <jason@redhat.com>
1978         PR c++/100634
1979         * pt.c (invalid_nontype_parm_type_p): Return true for COMPLEX_TYPE.
1981 2021-05-20  Jason Merrill  <jason@redhat.com>
1983         PR c++/100659
1984         * cp-tree.h (CONST_DECL_USING_P): Check for null TREE_TYPE.
1986 2021-05-19  Jason Merrill  <jason@redhat.com>
1988         PR c++/100367
1989         PR c++/96299
1990         * method.c (genericize_spaceship): Use fold_build2 for scalar
1991         operands.
1993 2021-05-19  Jason Merrill  <jason@redhat.com>
1995         * pt.c (build_deduction_guide): Treat the implicit deduction guide
1996         as a member of the class.
1998 2021-05-19  Marek Polacek  <polacek@redhat.com>
2000         PR c++/100596
2001         * cp-tree.h (any_non_type_attribute_p): Remove.
2002         * decl.c (grokdeclarator): Turn an error into a warning and only
2003         warn for standard attributes.
2004         * decl2.c (any_non_type_attribute_p): Remove.
2005         * parser.c (cp_parser_elaborated_type_specifier): Turn an error
2006         into a warning and only warn for standard attributes.
2007         (cp_parser_member_declaration): Likewise.
2009 2021-05-19  Martin Liska  <mliska@suse.cz>
2011         PR testsuite/100658
2012         * mangle.c (write_encoding): Fix typos.
2014 2021-05-19  Jakub Jelinek  <jakub@redhat.com>
2016         PR middle-end/99928
2017         * parser.c (cp_parser_omp_master): Set OMP_MASTER_COMBINED on
2018         master when combined with taskloop.
2019         (cp_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
2020         parallel master when not combined with taskloop.
2022 2021-05-19  Jason Merrill  <jason@redhat.com>
2024         PR c++/100261
2025         * rtti.c (get_tinfo_decl_direct): Check TYPE_TRANSPARENT_AGGR.
2027 2021-05-19  Jason Merrill  <jason@redhat.com>
2029         PR c++/100372
2030         * tree.c (strip_typedefs): Only look at the pattern of a
2031         TYPE_PACK_EXPANSION if it's a type.
2033 2021-05-18  Marek Polacek  <polacek@redhat.com>
2035         * class.c (classtype_has_non_deleted_copy_ctor): Remove.
2036         * constraint.cc (contains_wildcard_p): Likewise.
2037         (get_template_head_requirements): Likewise.
2038         (check_constrained_friend): Likewise.
2039         (subsumes_constraints): Likewise.
2040         * cp-tree.h (classtype_has_non_deleted_copy_ctor): Likewise.
2041         (push_void_library_fn): Likewise.
2042         (get_pattern_parm): Likewise.
2043         (get_template_parms_at_level): Likewise.
2044         (lambda_return_type): Likewise.
2045         (get_template_head_requirements): Likewise.
2046         (check_constrained_friend): Likewise.
2047         (subsumes_constraints): Likewise.
2048         * decl.c (push_void_library_fn): Likewise.
2049         * lambda.c (lambda_return_type): Likewise.
2050         * pt.c (get_template_parms_at_level): Likewise.
2051         (get_pattern_parm): Likewise.
2053 2021-05-18  Jason Merrill  <jason@redhat.com>
2055         PR c++/100644
2056         * call.c (perfect_candidate_p): An implicitly deleted move
2057         is not perfect.
2059 2021-05-18  Andreas Krebbel  <krebbel@linux.ibm.com>
2061         PR c++/100281
2062         * cvt.c (cp_convert_to_pointer): Use the size of the target
2063         pointer type.
2064         * tree.c (cp_build_reference_type): Call
2065         cp_build_reference_type_for_mode with VOIDmode.
2066         (cp_build_reference_type_for_mode): Rename from
2067         cp_build_reference_type.  Add MODE argument and invoke
2068         build_reference_type_for_mode.
2069         (strip_typedefs): Use build_pointer_type_for_mode and
2070         cp_build_reference_type_for_mode for pointers and references.
2072 2021-05-17  Jonathan Wakely  <jwakely@redhat.com>
2074         PR c++/100635
2075         * call.c (convert_like_internal): Print different diagnostic if
2076         the lvalue reference is const.
2078 2021-05-14  Jason Merrill  <jason@redhat.com>
2080         PR c++/95870
2081         * pt.c (enclosing_instantiation_of): Just compare
2082         DECL_SOURCE_LOCATION.
2083         (regenerate_decl_from_template): Copy DECL_SOURCE_LOCATION.
2085 2021-05-14  Marek Polacek  <polacek@redhat.com>
2086             Jason Merrill  <jason@redhat.com>
2088         PR c++/99032
2089         * cp-tree.h (any_non_type_attribute_p): Declare.
2090         * decl.c (grokdeclarator): Diagnose when an attribute appertains to
2091         a friend declaration that is not a definition.
2092         * decl2.c (any_non_type_attribute_p): New.
2093         * parser.c (cp_parser_decl_specifier_seq): Diagnose standard attributes
2094         in the middle of decl-specifiers.
2095         (cp_parser_elaborated_type_specifier): Diagnose when an attribute
2096         appertains to a friend declaration that is not a definition.
2097         (cp_parser_member_declaration): Likewise.
2099 2021-05-12  Marek Polacek  <polacek@redhat.com>
2101         * pt.c (tsubst_copy_and_build): Add warn_int_in_bool_context
2102         sentinel.
2104 2021-05-12  Marcel Vollweiler  <marcel@codesourcery.com>
2106         * parser.c (cp_parser_omp_clause_map): Support map-type-modifier
2107         'close'.
2109 2021-05-11  Jason Merrill  <jason@redhat.com>
2111         PR c++/100517
2112         * typeck.c (build_reinterpret_cast_1): Check intype on
2113         cast to vector.
2115 2021-05-11  Patrick Palka  <ppalka@redhat.com>
2117         PR c++/51577
2118         * name-lookup.c (maybe_save_operator_binding): Unconditionally
2119         enable for all function templates, not just generic lambdas.
2120         Handle compound-assignment operator expressions.
2121         * typeck.c (build_x_compound_expr): Call maybe_save_operator_binding
2122         in the type-dependent case.
2123         (build_x_modify_expr): Likewise.  Move declaration of 'op' closer
2124         to its first use.
2126 2021-05-11  Patrick Palka  <ppalka@redhat.com>
2128         PR c++/100138
2129         * constraint.cc (tsubst_constraint): Set up cp_unevaluated.
2130         (satisfy_atom): Set up iloc_sentinel before calling
2131         cxx_constant_value.
2132         * pt.c (tsubst_pack_expansion): When returning a rebuilt pack
2133         expansion, carry over PACK_EXPANSION_LOCAL_P and
2134         PACK_EXPANSION_SIZEOF_P from the original pack expansion.
2136 2021-05-10  Richard Biener  <rguenther@suse.de>
2138         PR middle-end/100464
2139         PR c++/100468
2140         * call.c (set_up_extended_ref_temp): Mark the temporary
2141         addressable if the TARGET_EXPR was.
2143 2021-05-10  Martin Liska  <mliska@suse.cz>
2145         * decl.c (duplicate_decls): Use startswith
2146         function instead of strncmp.
2147         (cxx_builtin_function): Likewise.
2148         (omp_declare_variant_finalize_one): Likewise.
2149         (grokfndecl): Likewise.
2150         * error.c (dump_decl_name): Likewise.
2151         * mangle.c (find_decomp_unqualified_name): Likewise.
2152         (write_guarded_var_name): Likewise.
2153         (decl_tls_wrapper_p): Likewise.
2154         * parser.c (cp_parser_simple_type_specifier): Likewise.
2155         (cp_parser_tx_qualifier_opt): Likewise.
2156         * pt.c (template_parm_object_p): Likewise.
2157         (dguide_name_p): Likewise.
2159 2021-05-10  Martin Liska  <mliska@suse.cz>
2161         PR c++/99616
2162         * decl.c (grokdeclarator): Remove redundant NULL check.
2164 2021-05-07  Jason Merrill  <jason@redhat.com>
2166         * tree.c (rvalue): Assert expr is not a class lvalue.
2168 2021-05-07  Jason Merrill  <jason@redhat.com>
2170         * cp-tree.h (build_stub_object): Declare.
2171         * method.c (build_stub_object): No longer static.
2172         * call.c (can_convert): Use it.
2173         * tree.c (build_dummy_object): Adjust comment.
2174         * typeck.c (cp_build_binary_op): Wrap SPACESHIP_EXPR in a
2175         TARGET_EXPR.
2177 2021-05-07  Jason Merrill  <jason@redhat.com>
2179         * coroutines.cc (build_co_await): Don't call 'rvalue'.
2180         (flatten_await_stmt): Simplify initialization.
2181         (morph_fn_to_coro): Change 'rvalue' to 'move'.  Simplify.
2183 2021-05-04  Tobias Burnus  <tobias@codesourcery.com>
2185         * semantics.c (finish_omp_reduction_clause): Accept float + complex
2186         for || and && reductions.
2188 2021-05-03  Patrick Palka  <ppalka@redhat.com>
2190         PR c++/100362
2191         * parser.c (cp_parser_class_head): Reinstate calls to pushclass
2192         and popclass when parsing the base-clause that were removed in
2193         r11-6815.
2195 2021-05-03  Patrick Palka  <ppalka@redhat.com>
2197         PR c++/68942
2198         PR c++/100344
2199         * pt.c (tsubst_copy_and_build) <case CALL_EXPR>: Set tf_conv
2200         only when the callee is a FUNCTION_DECL.
2202 2021-05-03  Marek Polacek  <polacek@redhat.com>
2204         PR c++/100055
2205         * decl.c (grokfndecl): Check current_template_parms.
2207 2021-05-03  Marek Polacek  <polacek@redhat.com>
2209         DR 1312
2210         * constexpr.c (cxx_eval_constant_expression): Don't check
2211         integer_zerop.
2213 2021-05-01  Jason Merrill  <jason@redhat.com>
2215         * cp-tree.h (class ovl_iterator): Allow copying.  Add op==.
2216         (class ovl_range, class lkp_range): New.
2217         * call.c (build_op_call_1, add_candidates): Use them.
2218         (build_op_delete_call, has_trivial_copy_assign_p): Likewise.
2219         (has_trivial_copy_p): Likewise.
2220         * class.c (handle_using_decl, get_basefndecls): Likewise.
2221         (maybe_warn_about_overly_private_class): Likewise.
2222         (warn_hidden, add_implicitly_declared_members): Likewise.
2223         (check_methods, clone_constructors_and_destructors): Likewise.
2224         (type_has_user_nondefault_constructor): Likewise.
2226 2021-04-29  Jason Merrill  <jason@redhat.com>
2228         * constexpr.c (cxx_fold_indirect_ref_1): Only set *empty_base if we
2229         don't find a field.
2231 2021-04-29  Jason Merrill  <jason@redhat.com>
2233         PR c++/51344
2234         * decl2.c (grokfield): Call cplus_decl_attributes for friend.
2235         (save_template_attributes): Use chainon.
2236         * friend.c (do_friend): Remove attrlist parm.
2237         * cp-tree.h (do_friend): Adjust.
2238         * class.c (add_implicitly_declared_members): Adjust.
2239         * decl.c (grokdeclarator): Adjust.
2240         * pt.c (apply_late_template_attributes): Optimize.
2242 2021-04-29  Jason Merrill  <jason@redhat.com>
2244         PR c++/97974
2245         * class.c (finish_struct_anon_r): Drop complain parm.
2246         Remove non-field diagnostic.
2247         (finish_struct_anon): Adjust.
2248         * decl.c (fixup_anonymous_aggr): Move non-field diagnostic here.
2250 2021-04-29  Jason Merrill  <jason@redhat.com>
2252         * cp-tree.h (cp_evaluated): Add reset parm to constructor.
2253         * parser.c (cp_parser_constant_expression): Change
2254         allow_non_constant_p to int.  Use cp_evaluated.
2255         (cp_parser_initializer_clause): Pass 2 to allow_non_constant_p.
2256         * semantics.c (finish_id_expression_1): Don't mess with
2257         cp_unevaluated_operand here.
2259 2021-04-29  Jason Merrill  <jason@redhat.com>
2261         * cp-tree.h: Clarify comments.
2262         * pt.c (get_template_parm_object): Add assert.
2263         * semantics.c (finish_compound_literal): Clear TREE_HAS_CONSTRUCTOR.
2264         * tree.c (zero_init_expr_p): Check TREE_HAS_CONSTRUCTOR.
2265         * typeck2.c (store_init_value): Likewise.
2267 2021-04-29  Patrick Palka  <ppalka@redhat.com>
2269         PR c++/68942
2270         * pt.c (tsubst_copy_and_build) <case CALL_EXPR>: When KOENIG_P,
2271         set tf_conv during the initial substitution into the function.
2273 2021-04-29  Jakub Jelinek  <jakub@redhat.com>
2275         PR c++/100319
2276         * semantics.c (finish_omp_clauses): Fix up check that variable
2277         mentioned in detach clause doesn't appear in data-sharing clauses.
2279 2021-04-28  Jakub Jelinek  <jakub@redhat.com>
2281         * module.cc: Remove #error that triggers if DEV-PHASE is empty.
2283 2021-04-27  Jason Merrill  <jason@redhat.com>
2285         PR c++/92145
2286         * class.c (classtype_has_depr_implicit_copy): Check DECL_CONTEXT
2287         of operator=.
2289 2021-04-27  Patrick Palka  <ppalka@redhat.com>
2291         PR c++/88580
2292         * pt.c (tsubst_initializer_list): Correctly handle the case
2293         where an argument inside a base initializer pack expansion is
2294         itself a pack expansion.
2296 2021-04-26  Patrick Palka  <ppalka@redhat.com>
2298         PR c++/100209
2299         * constexpr.c (cxx_fold_indirect_ref): Try to canonicalize the
2300         object/offset pair for a POINTER_PLUS_EXPR of a COMPONENT_REF
2301         with a negative offset into one whose offset is nonnegative
2302         before calling cxx_fold_indirect_ref_1.
2304 2021-04-24  Patrick Palka  <ppalka@redhat.com>
2306         PR c++/89565
2307         PR c++/93383
2308         PR c++/95291
2309         PR c++/99200
2310         PR c++/99683
2311         * pt.c (do_class_deduction): Punt if the initializer is
2312         type-dependent.
2314 2021-04-24  Patrick Palka  <ppalka@redhat.com>
2316         PR c++/87709
2317         * parser.c (cp_parser_type_id_1): If we see a template
2318         placeholder, first try simulating an error before issuing
2319         a real error.
2321 2021-04-23  Patrick Palka  <ppalka@redhat.com>
2323         PR c++/98767
2324         * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause):
2325         Adjust parameter list loop to iterate over 'types' instead of
2326         'args'.  Output the trailing '...' for a variadic function.
2327         Remove PARM_DECL support.
2328         (pp_cxx_requires_expr): Pretty print the parameter list directly
2329         instead of going through pp_cxx_parameter_declaration_clause.
2331 2021-04-23  Patrick Palka  <ppalka@redhat.com>
2333         DR 2374
2334         * decl.c (is_direct_enum_init): Check the implicit
2335         convertibility requirement added by CWG 2374.
2337 2021-04-23  Martin Liska  <mliska@suse.cz>
2339         * cp-tree.h (STATIC_ASSERT): Prefer static assert.
2340         * lex.c (init_operators): Remove run-time check.
2342 2021-04-22  Marek Polacek  <polacek@redhat.com>
2344         PR c++/100161
2345         * pt.c (tsubst_copy_and_build) <case PLUS_EXPR>: Test op0 and
2346         op1 separately for value- or type-dependence.
2348 2021-04-21  Marek Polacek  <polacek@redhat.com>
2350         PR c++/96380
2351         * parser.c (cp_parser_enum_specifier): Don't allow defining
2352         types in enum-base.
2354 2021-04-21  Martin Liska  <mliska@suse.cz>
2356         Revert:
2357         2021-04-21  Martin Liska  <mliska@suse.cz>
2359         * error.c (dump_decl): Use flags in dump_generic_node call.
2361 2021-04-21  Martin Liska  <mliska@suse.cz>
2363         * error.c (dump_decl): Use flags in dump_generic_node call.
2365 2021-04-21  Martin Liska  <mliska@suse.cz>
2367         * error.c (dump_decl): Support anonymous labels.
2369 2021-04-20  Jason Merrill  <jason@redhat.com>
2371         PR c++/100109
2372         * pt.c (find_parameter_packs_r): Look into enum initializers.
2374 2021-04-19  Marek Polacek  <polacek@redhat.com>
2376         PR c++/97536
2377         * decl.c (grokvardecl): Given an error when a concept is not defined
2378         at namespace scope.
2380 2021-04-16  Jakub Jelinek  <jakub@redhat.com>
2382         PR c++/100111
2383         * constexpr.c (cxx_eval_store_expression): Don't add CONSTRUCTORs
2384         for empty classes into *valp when types don't match even when *valp
2385         is NULL.
2387 2021-04-16  Marek Polacek  <polacek@redhat.com>
2389         PR c++/99803
2390         * decl.c (make_typename_type): Give an error and return when
2391         name is is_overloaded_fn.
2392         * parser.c (cp_parser_class_name): Don't check is_overloaded_fn
2393         before calling make_typename_type.
2395 2021-04-16  Patrick Palka  <ppalka@redhat.com>
2397         PR c++/99700
2398         * constexpr.c (reduced_constant_expression_p): For array
2399         CONSTRUCTORs, use a dedicated loop that additionally verifies
2400         the CONSTRUCTOR spans the entire array.
2402 2021-04-16  Jakub Jelinek  <jakub@redhat.com>
2404         PR c++/99850
2405         * parser.c (cp_parser_constraint_requires_parens) <case CPP_DEREF>:
2406         If lambda_p, return pce_ok instead of pce_maybe_postfix.
2408 2021-04-16  Jakub Jelinek  <jakub@redhat.com>
2410         PR c++/99833
2411         * pt.c (extract_locals_r): When handling DECL_EXPR of a structured
2412         binding, add to data.internal also all corresponding structured
2413         binding decls.
2415 2021-04-16  Jason Merrill  <jason@redhat.com>
2417         PR c++/100079
2418         * cp-tree.h (first_field): Declare.
2419         * mangle.c (range_expr_nelts): New.
2420         (write_expression): Improve class NTTP mangling.
2421         * pt.c (get_template_parm_object): Clear TREE_HAS_CONSTRUCTOR.
2422         * tree.c (zero_init_expr_p): Improve class NTTP handling.
2423         * decl.c: Adjust comment.
2425 2021-04-15  Jason Merrill  <jason@redhat.com>
2427         PR c++/80456
2428         * call.c (build_new_method_call_1): Check again for side-effects
2429         with a volatile object.
2431 2021-04-15  Jason Merrill  <jason@redhat.com>
2433         PR c++/100101
2434         PR c++/99583
2435         * pt.c (find_parameter_packs_r) [FUNCTION_TYPE]: Walk into
2436         TYPE_RAISES_EXCEPTIONS here.
2437         * tree.c (cp_walk_subtrees): Not here.
2439 2021-04-15  Jason Merrill  <jason@redhat.com>
2441         PR c++/100091
2442         PR c++/99478
2443         * parser.c (cp_parser_default_type_template_argument): Set
2444         parser->local_variables_forbidden_p.
2446 2021-04-15  Richard Sandiford  <richard.sandiford@arm.com>
2448         PR c++/98852
2449         * typeck.c (merge_type_attributes_from): New function.
2450         (cp_common_type): Use it for vector types.
2452 2021-04-14  Jason Merrill  <jason@redhat.com>
2454         PR c++/100078
2455         PR c++/93085
2456         * pt.c (uses_outer_template_parms): Also look at default
2457         template argument.
2459 2021-04-14  Jason Merrill  <jason@redhat.com>
2461         PR c++/93314
2462         * semantics.c (finish_id_expression_1): Clear cp_unevaluated_operand
2463         for a non-static data member in a constant-expression.
2465 2021-04-14  Patrick Palka  <ppalka@redhat.com>
2467         PR c++/83476
2468         PR c++/99885
2469         * pt.c (deducible_expression): Look through implicit
2470         INDIRECT_REFs as well.
2472 2021-04-14  Jason Merrill  <jason@redhat.com>
2474         PR c++/99478
2475         * parser.c (cp_parser_lambda_expression): Reject lambda
2476         in template parameter type.
2478 2021-04-14  Jason Merrill  <jason@redhat.com>
2480         PR c++/90674
2481         * decl.c (duplicate_decls): Don't propagate
2482         DECL_INITIALIZED_IN_CLASS_P to a specialization.
2484 2021-04-14  Jason Merrill  <jason@redhat.com>
2486         PR c++/88742
2487         PR c++/49951
2488         PR c++/58123
2489         * semantics.c (set_cleanup_locs): New.
2490         (do_poplevel): Call it.
2491         * parser.c (cp_parser_compound_statement): Consume the }
2492         before finish_compound_stmt.
2494 2021-04-13  Jason Merrill  <jason@redhat.com>
2496         PR c++/100032
2497         * pt.c (get_underlying_template): Compare TYPE_QUALS.
2499 2021-04-13  Jason Merrill  <jason@redhat.com>
2501         PR c++/100054
2502         PR c++/90479
2503         * init.c (get_nsdmi): Do more context adjustment for local classes.
2505 2021-04-13  Patrick Palka  <ppalka@redhat.com>
2507         PR c++/99008
2508         * pt.c (do_class_deduction): Reject alias CTAD in C++17 mode
2509         rather than issuing a pedwarn.
2510         * typeck2.c (build_functional_cast_1): Handle CTAD uniformly
2511         for consistent diagnostics.
2513 2021-04-13  Jason Merrill  <jason@redhat.com>
2515         PR c++/91933
2516         * class.c (build_base_path): Shortcut simple non-pointer case.
2518 2021-04-13  Eric Botcazou  <ebotcazou@adacore.com>
2520         * module.cc (ordinary_loc_of): Test LINEMAPS_MACRO_LOWEST_LOCATION
2521         of the linemap.
2522         (module_state::write_location): Likewise.
2524 2021-04-13  Patrick Palka  <ppalka@redhat.com>
2526         PR c++/97134
2527         * pt.c (do_class_deduction): Look through EXPR_PACK_EXPANSION
2528         when checking if the initializer is an equivalent class
2529         placeholder template parameter.
2531 2021-04-13  Patrick Palka  <ppalka@redhat.com>
2533         PR c++/99961
2534         PR c++/99994
2535         * constraint.cc (satisfy_normalized_constraints): Set
2536         cp_unevaluated.
2537         * parser.c (cp_parser_concept_definition): Likewise.
2538         (cp_parser_requires_clause_opt): Likewise.
2540 2021-04-12  Jason Merrill  <jason@redhat.com>
2542         PR c++/93085
2543         * pt.c (uses_outer_template_parms): Handle non-type and template
2544         template parameters specifically.
2546 2021-04-11  Jason Merrill  <jason@redhat.com>
2548         PR c++/97974
2549         * decl.c (fixup_anonymous_aggr): Prune all functions from
2550         CLASSTYPE_MEMBER_VEC.
2552 2021-04-10  Jason Merrill  <jason@redhat.com>
2554         PR c++/98800
2555         PR c++/97399
2556         * parser.c (cp_parser_direct_declarator): Don't
2557         inject_this_parameter if static_p.
2558         (cp_parser_omp_var_list_no_open): Parse 'this' even if
2559         current_class_ptr isn't set for a better diagnostic.
2561 2021-04-10  Jason Merrill  <jason@redhat.com>
2563         PR c++/99180
2564         PR c++/93295
2565         PR c++/93867
2566         PR c++/99118
2567         PR c++/96873
2568         * pt.c (alias_ctad_tweaks): Handle failure better.
2570 2021-04-10  Jason Merrill  <jason@redhat.com>
2572         PR c++/100006
2573         * pt.c (find_parameter_packs_r) [TAG_DEFN]: Look into bases.
2575 2021-04-09  Patrick Palka  <ppalka@redhat.com>
2577         * cp-tree.h (LAMBDA_EXPR_REGENERATED_FROM)
2578         (LAMBDA_EXPR_REGENERATING_TARGS): Replace these with ...
2579         (LAMBDA_EXPR_REGEN_INFO): ... this.
2580         (tree_lambda_expr::regenerated_from)
2581         (tree_lambda_expr::regenerating_targs): Replace these with ...
2582         (tree_lambda_expr::regen_info): ... this.
2583         * constraint.cc (satisfy_declaration_constraints): Adjust
2584         accordingly.
2585         * lambda.c (build_lambda_expr): Likewise.
2586         * pt.c (regenerated_lambda_fn_p): Likewise.
2587         (most_general_lambda): Likewise.
2588         (tsubst_lambda_expr): Likewise.
2590 2021-04-09  Marek Polacek  <polacek@redhat.com>
2592         PR c++/99806
2593         * parser.c (cp_parser_member_declaration): Call
2594         cp_parser_save_default_args even for function templates.  Use
2595         STRIP_TEMPLATE on the declaration we're passing.
2597 2021-04-08  Patrick Palka  <ppalka@redhat.com>
2599         PR c++/99874
2600         * constraint.cc (get_normalized_constraints_from_decl): Handle
2601         regenerated lambdas.
2602         (satisfy_declaration_constraints): Likewise.  Check for
2603         dependent args later.
2604         * cp-tree.h (LAMBDA_EXPR_INSTANTIATED): Replace with ...
2605         (LAMBDA_EXPR_REGENERATED_FROM): ... this.
2606         (LAMBDA_EXPR_REGENERATING_TARGS): New.
2607         (tree_lambda_expr::regenerated_from): New data member.
2608         (tree_lambda_expr::regenerating_targs): New data member.
2609         (add_to_template_args): Declare.
2610         (regenerated_lambda_fn_p): Likewise.
2611         (most_general_lambda): Likewise.
2612         * lambda.c (build_lambda_expr): Set LAMBDA_EXPR_REGENERATED_FROM
2613         and LAMBDA_EXPR_REGENERATING_TARGS.
2614         * pt.c (add_to_template_args): No longer static.
2615         (tsubst_function_decl): Unconditionally propagate constraints on
2616         the substituted function decl.
2617         (instantiated_lambda_fn_p): Rename to ...
2618         (regenerated_lambda_fn_p): ... this.  Check
2619         LAMBDA_EXPR_REGENERATED_FROM instead of
2620         LAMBDA_EXPR_INSTANTIATED.
2621         (most_general_lambda): Define.
2622         (enclosing_instantiation_of): Adjust after renaming
2623         instantiated_lambda_fn_p.
2624         (tsubst_lambda_expr): Don't set LAMBDA_EXPR_INSTANTIATED.  Set
2625         LAMBDA_EXPR_REGENERATED_FROM and LAMBDA_EXPR_REGENERATING_TARGS.
2626         Don't substitute or set constraints on the regenerated lambda.
2628 2021-04-08  Patrick Palka  <ppalka@redhat.com>
2630         PR c++/97679
2631         * pt.c (build_deduction_guide): Document OUTER_ARGS.  Substitute
2632         them into the propagated constraints.
2634 2021-04-08  Jason Merrill  <jason@redhat.com>
2636         PR c++/91849
2637         * call.c (convert_like_internal): Improve reference diagnostic.
2639 2021-04-08  Jakub Jelinek  <jakub@redhat.com>
2641         PR c++/99859
2642         * constexpr.c (addr_of_non_const_var): New function.
2643         (cxx_bind_parameters_in_call): Set *non_constant_args to true
2644         even if cp_walk_tree on arg with addr_of_non_const_var callback
2645         returns true.
2647 2021-04-08  Jason Merrill  <jason@redhat.com>
2649         PR c++/94529
2650         * pt.c (determine_specialization): Improve diagnostic.
2652 2021-04-08  Marek Polacek  <polacek@redhat.com>
2654         PR c++/99844
2655         * decl.c (build_explicit_specifier): Call
2656         check_for_bare_parameter_packs.
2657         * except.c (build_noexcept_spec): Likewise.
2659 2021-04-07  Jason Merrill  <jason@redhat.com>
2661         PR c++/41723
2662         * parser.c (cp_parser_class_name): Check dependent_scope_p.
2664 2021-04-07  Jason Merrill  <jason@redhat.com>
2666         PR c++/52625
2667         * pt.c (maybe_process_partial_specialization): Check
2668         DECL_SELF_REFERENCE_P.
2670 2021-04-07  Jason Merrill  <jason@redhat.com>
2672         PR c++/92918
2673         * name-lookup.c (push_class_level_binding_1): Do overload a new
2674         function with a previous using-declaration.
2676 2021-04-06  Jason Merrill  <jason@redhat.com>
2678         PR c++/96673
2679         * init.c (get_nsdmi): Don't defer access checking.
2681 2021-04-06  Jason Merrill  <jason@redhat.com>
2683         PR c++/99901
2684         * decl.c (cp_finish_decl): mark_needed an implicitly inline
2685         static data member with an out-of-class redeclaration.
2687 2021-04-06  Jason Merrill  <jason@redhat.com>
2689         PR c++/91241
2690         * mangle.c (write_compact_number): Add sanity check.
2691         (write_local_name): Use list_length for parm number.
2693 2021-04-06  Patrick Palka  <ppalka@redhat.com>
2695         PR c++/99899
2696         * pt.c (do_auto_deduction): Don't exit early when deducing the
2697         array type of a structured binding.  Also handle adc_decomp_type
2698         during constraint checking.
2700 2021-04-05  Jason Merrill  <jason@redhat.com>
2702         PR c++/96311
2703         * typeck.c (check_return_expr): Call mark_exp_read in dependent
2704         case.
2706 2021-04-05  Jason Merrill  <jason@redhat.com>
2708         PR c++/98440
2709         * typeck.c (build_reinterpret_cast_1): Don't perform
2710         temporary materialization.
2712 2021-04-05  Jason Merrill  <jason@redhat.com>
2714         PR c++/95317
2715         * pt.c (lookup_template_class_1): Do tsubst_enum when
2716         tsubsting a generic lambda.
2718 2021-04-05  Jason Merrill  <jason@redhat.com>
2720         PR c++/95870
2721         * pt.c (enclosing_instantiation_of): Compare DECL_SOURCE_LOCATION if
2722         there is no enclosing non-lambda function.
2724 2021-04-05  Nathan Sidwell  <nathan@acm.org>
2726         PR c++/99380
2727         * module.cc (name_pending_imports): Drop 'atend' parm.  Don't
2728         query export when not needed.
2729         (preprocess_module, preprocessed_module): Adjust.
2731 2021-04-05  Jason Merrill  <jason@redhat.com>
2733         PR c++/99066
2734         * pt.c (mark_decl_instantiated): Set DECL_EXTERNAL.
2736 2021-04-05  Jason Merrill  <jason@redhat.com>
2738         PR c++/99201
2739         * pt.c (class el_data): Add visited field.
2740         (extract_local_specs): Pass it to cp_walk_tree.
2741         (extract_locals_r): Walk into the body of a lambda.
2743 2021-04-05  Jason Merrill  <jason@redhat.com>
2745         * ptree.c (cxx_print_decl): Check DECL_MODULE_IMPORT_P on
2746         template result.
2748 2021-04-04  Jason Merrill  <jason@redhat.com>
2750         PR c++/99643
2751         * typeck2.c (massage_init_elt): Don't strip TARGET_EXPR.
2753 2021-04-03  Marek Polacek  <polacek@redhat.com>
2755         PR c++/91416
2756         * parser.c: Create a GC root for attributes in a decl specifier.
2757         (cp_parser_type_specifier): Push/pop ->attributes onto/from it.
2759 2021-04-03  Jason Merrill  <jason@redhat.com>
2761         PR c++/91217
2762         * pt.c (tsubst_lambda_expr): Skip the body block from
2763         DECL_SAVED_TREE.
2765 2021-04-03  Jason Merrill  <jason@redhat.com>
2767         PR c++/90664
2768         * cvt.c (can_convert_qual): Check fnptr_conv_p.
2770 2021-04-03  Jason Merrill  <jason@redhat.com>
2772         PR c++/97900
2773         * pt.c (regenerate_decl_from_template): tsubst_decl
2774         the parms.
2776 2021-04-02  Patrick Palka  <ppalka@redhat.com>
2778         PR c++/99869
2779         * parser.c (do_range_for_auto_deduction): Pass adc_variable_type
2780         to do_auto_deduction.
2782 2021-04-02  Patrick Palka  <ppalka@redhat.com>
2784         PR c++/99586
2785         * semantics.c (finish_compound_literal): Check
2786         template_placeholder_p instead of type_uses_auto.
2788 2021-04-02  Jason Merrill  <jason@redhat.com>
2790         PR c++/97938
2791         * cp-tree.h (PACK_EXPANSION_AUTO_P): New.
2792         * lambda.c (add_capture): Set it.
2793         * pt.c (tsubst_pack_expansion): Handle it.
2795 2021-04-02  Nathan Sidwell  <nathan@acm.org>
2797         * cp-tree.h (lang_decl_base): Correct module flag comment.
2798         * module.cc (trees_in::assert_definition): Break out
2799         not_tmpl var.
2800         (trees_out::lang_decl_bools): Do not write purview for header units.
2802 2021-04-01  Marek Polacek  <polacek@redhat.com>
2804         PR c++/99831
2805         * method.c (defaulted_late_check): ++ and -- function_depth around
2806         the call to synthesize_method.
2807         * pt.c: Remove the saved_trees global.
2809 2021-04-01  Jason Merrill  <jason@redhat.com>
2811         PR c++/99583
2812         PR c++/99584
2813         * tree.c (cp_walk_subtrees) [FUNCTION_TYPE]: Walk into
2814         TYPE_RAISES_EXCEPTIONS.
2816 2021-04-01  Iain Sandoe  <iain@sandoe.co.uk>
2818         * mapper-client.cc (INCLUDE_MAP): New; require map to be
2819         included from system.h.
2820         * mapper-resolver.cc (INCLUDE_MAP): Likewise.
2822 2021-04-01  Jason Merrill  <jason@redhat.com>
2824         PR c++/98481
2825         * mangle.c (write_expression): Adjust.
2826         * class.c (find_abi_tags_r): Disable PR98481 fix for ABI v14.
2827         (mark_abi_tags_r): Likewise.
2829 2021-04-01  Nathan Sidwell  <nathan@acm.org>
2831         PR c++/99283
2832         * module.cc (trees_out::decl_node): Adjust importedness reference
2833         assert.
2834         (module_state::intercluster_seed): New.  Seed both imports and
2835         inter-cluster references.  Broken out of ...
2836         (module_state::write_cluster): ... here.  Call it.
2838 2021-03-31  Jason Merrill  <jason@redhat.com>
2840         PR c++/99445
2841         * tree.c (strip_typedefs): Handle TYPE_PACK_EXPANSION.
2843 2021-03-31  Patrick Palka  <ppalka@redhat.com>
2845         PR c++/88115
2846         * mangle.c (write_expression): Adjust the mangling of
2847         __alignof__.
2849 2021-03-31  Patrick Palka  <ppalka@redhat.com>
2851         PR c++/99815
2852         * pt.c (placeholder_type_constraint_dependent_p): Expand
2853         argument packs to separate the first non-pack argument
2854         from the rest.
2856 2021-03-30  Nathan Sidwell  <nathan@acm.org>
2858         PR c++/99283
2859         * module.cc (dumper::operator): Make less brittle.
2860         (trees_out::core_bools): VAR_DECLs always have a context.
2861         (trees_out::key_mergeable): Use same_type_p for asserting.
2862         (trees_in::read_var_def): Propagate
2863         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2865 2021-03-30  Jakub Jelinek  <jakub@redhat.com>
2867         PR c++/99790
2868         * cp-gimplify.c (cp_gimplify_expr): Handle PTRMEM_CST.
2870 2021-03-26  Marek Polacek  <polacek@redhat.com>
2872         PR c++/98352
2873         * method.c (implicitly_declare_fn): Pass &raises to
2874         synthesized_method_walk.
2876 2021-03-26  Nathan Sidwell  <nathan@acm.org>
2878         PR c++/99283
2879         * cp-tree.h (DECL_MODULE_CHECK): Ban TEMPLATE_DECL.
2880         (SET_TYPE_TEMPLATE_INFO): Restore Alias template setting.
2881         * decl.c (duplicate_decls): Remove template_decl module flag
2882         propagation.
2883         * module.cc (merge_kind_name): Add alias tmpl spec as a thing.
2884         (dumper::impl::nested_name): Adjust for template-decl module flag
2885         change.
2886         (trees_in::assert_definition): Likewise.
2887         (trees_in::install_entity): Likewise.
2888         (trees_out::decl_value): Likewise.  Remove alias template
2889         separation of template and type_decl.
2890         (trees_in::decl_value): Likewise.
2891         (trees_out::key_mergeable): Likewise,
2892         (trees_in::key_mergeable): Likewise.
2893         (trees_out::decl_node): Adjust for template-decl module flag
2894         change.
2895         (depset::hash::make_dependency): Likewise.
2896         (get_originating_module, module_may_redeclare): Likewise.
2897         (set_instantiating_module, set_defining_module): Likewise.
2898         * name-lookup.c (name_lookup::search_adl): Likewise.
2899         (do_pushdecl): Likewise.
2900         * pt.c (build_template_decl): Likewise.
2901         (lookup_template_class_1): Remove special alias_template handling
2902         of DECL_TI_TEMPLATE.
2903         (tsubst_template_decl): Likewise.
2905 2021-03-26  Jakub Jelinek  <jakub@redhat.com>
2907         PR c++/99705
2908         * tree.c (bot_manip): Remap artificial automatic temporaries mentioned
2909         in DECL_EXPR or in BIND_EXPR_VARS.
2911 2021-03-25  Jakub Jelinek  <jakub@redhat.com>
2913         PR c++/99672
2914         * parser.c (cp_parser_postfix_expression): For calls, create
2915         combined_loc and temporarily set input_location to it before
2916         calling finish_call_expr.
2918 2021-03-25  Marek Polacek  <polacek@redhat.com>
2920         PR c++/94751
2921         * call.c (build_over_call): Maybe call mark_used in case
2922         deduce_inheriting_ctor fails and return error_mark_node.
2923         * cp-tree.h (deduce_inheriting_ctor): Adjust declaration.
2924         * method.c (deduce_inheriting_ctor): Return bool if the deduction
2925         fails.
2926         (implicitly_declare_fn): If raises is error_mark_node, call
2927         synthesized_method_walk with diag being true.
2929 2021-03-25  Jakub Jelinek  <jakub@redhat.com>
2931         PR c++/99745
2932         * decl2.c (grokbitfield): Diagnose bitfields containing bare parameter
2933         packs and don't set DECL_BIT_FIELD_REPRESENTATIVE in that case.
2935 2021-03-25  Marek Polacek  <polacek@redhat.com>
2937         PR c++/99331
2938         * call.c (build_converted_constant_expr_internal): Don't emit
2939         -Wconversion warnings.
2941 2021-03-25  Jakub Jelinek  <jakub@redhat.com>
2943         PR c++/99565
2944         * call.c (build_conditional_expr_1): Pass OEP_ADDRESS_OF_SAME_FIELD
2945         to operand_equal_p.
2946         * cvt.c (convert_to_void): Preserve location_t on COND_EXPR or
2947         or COMPOUND_EXPR.
2949 2021-03-23  Nathan Sidwell  <nathan@acm.org>
2951         PR c++/99283
2952         * name-lookup.c (check_module_override): Set global or partition
2953         DUP on the binding vector.
2955 2021-03-23  Marek Polacek  <polacek@redhat.com>
2957         PR c++/99318
2958         * decl2.c (cp_warn_deprecated_use_scopes): Only call
2959         cp_warn_deprecated_use when decl is a namespace, class, or enum.
2961 2021-03-23  Nathan Sidwell  <nathan@acm.org>
2963         PR c++/99239
2964         * decl.c (duplicate_decls): Remove assert about maybe-imported
2965         artificial decls.
2967 2021-03-23  Jakub Jelinek  <jakub@redhat.com>
2969         PR c++/99650
2970         * decl.c (cp_finish_decomp): Diagnose void initializers when
2971         using tuple_element and get.
2973 2021-03-22  Nathan Sidwell  <nathan@acm.org>
2975         PR c++/99480
2976         * module.cc (depset::hash::make_dependency): Propagate flags for
2977         partial specialization.
2978         (module_may_redeclare): Handle partial specialization.
2980 2021-03-22  Nathan Sidwell  <nathan@acm.org>
2982         PR c++/99425
2983         * cp-tree.h (map_context_from, map_context_to): Delete.
2984         (add_mergeable_specialization): Add is_alias parm.
2985         * pt.c (add_mergeable_specialization): Add is_alias parm, add them.
2986         * module.cc (map_context_from, map_context_to): Delete.
2987         (trees_in::decl_value): Add specializations later, adjust call.
2988         Drop useless alias lookup. Set duplicate fn parm context.
2989         (check_mergeable_decl): Drop context mapping.
2990         (trees_in::is_matching_decl): Likewise.
2991         (trees_in::read_function_def): Drop parameter context adjustment
2992         here.
2994 2021-03-22  Martin Liska  <mliska@suse.cz>
2996         PR c++/99687
2997         * module.cc (fini_modules): Call vec_free instead of delete.
2999 2021-03-20  Jakub Jelinek  <jakub@redhat.com>
3001         PR debug/99230
3002         * cp-gimplify.c (cp_genericize_r) <case STATEMENT_LIST>: Remove
3003         special code, instead call c_genericize_control_stmt.
3005 2021-03-19  Jakub Jelinek  <jakub@redhat.com>
3007         PR c++/99456
3008         * constexpr.c (cxx_eval_constant_expression): For CONVERT_EXPR from
3009         INDIRECT_TYPE_P to ARITHMETIC_TYPE_P, when !ctx->manifestly_const_eval
3010         don't diagnose it, set *non_constant_p nor return t.
3012 2021-03-19  Marek Polacek  <polacek@redhat.com>
3014         PR c++/99500
3015         * parser.c (cp_parser_requirement_parameter_list): Handle
3016         error_mark_node.
3018 2021-03-18  Marek Polacek  <polacek@redhat.com>
3020         * pt.c (tsubst_copy_and_build) <case FLOAT_EXPR>: Remove.
3022 2021-03-18  Marek Polacek  <polacek@redhat.com>
3024         * pt.c (tsubst_copy_and_build): Add assert.
3026 2021-03-18  Iain Sandoe  <iain@sandoe.co.uk>
3028         PR objc++/49070
3029         * parser.c (cp_debug_parser): Add Objective-C++ message
3030         state flag.
3031         (cp_parser_nested_name_specifier_opt): Allow colon to
3032         terminate an assignment-expression when parsing Objective-
3033         C++ messages.
3034         (cp_parser_objc_message_expression): Set and clear message
3035         parsing state on entry and exit.
3036         * parser.h (struct cp_parser): Add a context flag for
3037         Objective-C++ message state.
3039 2021-03-18  Martin Liska  <mliska@suse.cz>
3041         PR c++/99617
3042         * coroutines.cc (struct var_nest_node): Init then_cl and else_cl
3043         to NULL.
3045 2021-03-17  Marek Polacek  <polacek@redhat.com>
3047         PR c++/97973
3048         * call.c (conv_unsafe_in_template_p): New.
3049         (convert_like): Use it.
3051 2021-03-17  Anthony Sharp  <anthonysharp15@gmail.com>
3052             Jason Merrill  <jason@redhat.com>
3054         * semantics.c (get_class_access_diagnostic_decl): New
3055         function that examines special cases when a parent
3056         class causes a private access failure.
3057         (enforce_access): Slightly modified to call function
3058         above.
3060 2021-03-16  Jason Merrill  <jason@redhat.com>
3062         * tree.c (cp_tree_equal): Use real_identical.
3064 2021-03-16  Jakub Jelinek  <jakub@redhat.com>
3066         PR c++/99613
3067         * decl.c (expand_static_init): For thread guards, call __cxa_atexit
3068         before calling __cxa_guard_release rather than after it.  Formatting
3069         fixes.
3071 2021-03-16  Martin Liska  <mliska@suse.cz>
3072             Jason Merrill  <jason@redhat.com>
3074         PR c++/99108
3075         * call.c (get_function_version_dispatcher): Handle
3076         DECL_LOCAL_DECL_P.
3077         * decl.c (maybe_version_functions): Likewise.
3078         (maybe_mark_function_versioned): New.
3079         * name-lookup.c (push_local_extern_decl_alias): No longer static.
3080         * name-lookup.h (push_local_extern_decl_alias): Adjust.
3082 2021-03-16  Nathan Sidwell  <nathan@acm.org>
3084         PR c++/99496
3085         * module.cc (trees_out::decl_value): Adjust typedef streaming,
3086         indicate whether it is a dependent alias.
3087         (trees_in::decl_value): Likewise.  Set as dependent alias, if it
3088         is one.
3090 2021-03-15  Iain Sandoe  <iain@sandoe.co.uk>
3092         PR c++/99047
3093         * coroutines.cc (expand_one_await_expression): If the
3094         await_ready() expression is not a boolean then convert it
3095         as required.
3097 2021-03-15  Iain Sandoe  <iain@sandoe.co.uk>
3099         PR c++/98704
3100         * coroutines.cc (build_actor_fn): Make destroy index 1
3101         correspond to the abnormal unhandled_exception() exit.
3102         Substitute the proxy for the resume index.
3103         (coro_rewrite_function_body): Arrange to reset the resume
3104         index and make done = true for a rethrown exception from
3105         unhandled_exception ().
3106         (morph_fn_to_coro): Adjust calls to build_actor_fn and
3107         coro_rewrite_function_body.
3109 2021-03-15  Iain Sandoe  <iain@sandoe.co.uk>
3111         PR c++/98480
3112         * coroutines.cc (replace_continue): Rewrite continue into
3113         'goto label'.
3114         (await_statement_walker): Handle await expressions in the
3115         initializer, condition and iteration expressions of for
3116         loops.
3118 2021-03-15  Iain Sandoe  <iain@sandoe.co.uk>
3120         PR c++/96749
3121         * coroutines.cc (flatten_await_stmt): Allow for the case
3122         where a target expression variable only has uses in the
3123         second part of a compound expression.
3124         (maybe_promote_temps): Avoid emiting empty statements.
3126 2021-03-15  Tobias Burnus  <tobias@codesourcery.com>
3128         PR c++/99509
3129         * decl.c (cp_finish_decl): For 'omp declare target implicit' vars,
3130         ensure that the varpool node is marked as offloadable.
3132 2021-03-12  Nathan Sidwell  <nathan@acm.org>
3134         PR c++/99238
3135         * module.cc (depset::hash::add_binding_entity): Assert not
3136         visited.
3137         (depset::add::add_specializations): Likewise.
3138         * name-lookup.c (name_lookup::dedup): New.
3139         (name_lookup::~name_lookup): Assert not deduping.
3140         (name_lookup::restore_state): Likewise.
3141         (name_lookup::add_overload): Replace outlined code with dedup
3142         call.
3143         (name_lookup::add_value): Likewise.
3144         (name_lookup::search_namespace_only): Likewise.
3145         (name_lookup::adl_namespace_fns): Likewise.
3146         (name_lookup::adl_class_fns): Likewise.
3147         (name_lookup::search_adl): Likewise.  Add clearing dedup call.
3148         (name_lookup::search_qualified): Likewise.
3149         (name_lookup::search_unqualified): Likewise.
3151 2021-03-12  Jakub Jelinek  <jakub@redhat.com>
3153         PR c++/99507
3154         * call.c (build_over_call): For immediate evaluation of functions
3155         that return references, undo convert_from_reference effects before
3156         calling cxx_constant_value and call convert_from_reference
3157         afterwards.
3159 2021-03-11  Nathan Sidwell  <nathan@acm.org>
3161         PR c++/99248
3162         * name-lookup.c (lookup_elaborated_type_1): Access slot not bind
3163         when there's a binding vector.
3164         * ptree.c (cxx_print_xnode): Lazy flags are no longer a thing.
3166 2021-03-11  Nathan Sidwell  <nathan@acm.org>
3168         PR c++/99528
3169         * module.cc (enum merge_kind): Delete MK_type_tmpl_spec,
3170         MK_decl_tmpl_spec.
3171         (trees_in::decl_value): Adjust add_mergeable_specialization call.
3172         (trees_out::get_merge_kind): Adjust detecting a partial template
3173         instantiation.
3174         (trees_out::key_mergeable): Adjust handling same.
3175         (trees_in::key_mergeabvle): Likewise.
3177 2021-03-10  Nathan Sidwell  <nathan@acm.org>
3179         PR c++/99423
3180         * module.cc (post_load_processing): Assert not gcable.
3181         (laxy_load_pendings): Extend no-gc region around
3182         post_load_processing.
3184 2021-03-10  Nathan Sidwell  <nathan@acm.org>
3186         PR c++/99508
3187         * decl.c (make_rtl_for_nonlocal_decl): Propagate local-extern's
3188         assembler name to the ns alias.
3190 2021-03-09  Jakub Jelinek  <jakub@redhat.com>
3192         PR c++/99459
3193         * coroutines.cc (build_co_await): Look through NOP_EXPRs in
3194         build_special_member_call return value to find the CALL_EXPR.
3195         Simplify.
3197 2021-03-09  Nathan Sidwell  <nathan@acm.org>
3199         PR c++/99472
3200         * parser.c (cp_parser_diagnose_invalid_type_name): Clarify
3201         that C++20 does not yet imply modules.
3203 2021-03-08  Nathan Sidwell  <nathan@acm.org>
3205         PR c++/99436
3206         * name-lookup.c (get_cxx_dialect_name): Add cxx23.
3208 2021-03-08  Nathan Sidwell  <nathan@acm.org>
3210         * lex.c (module_token_filter::resume): Ignore module-decls inside
3211         header-unit.
3212         * parser.c (cp_parser_module_declaration): Reject in header-unit.
3214 2021-03-08  Nathan Sidwell  <nathan@acm.org>
3216         PR c++/99285
3217         * cp-tree.h (match_mergeable_specialization)
3218         (add_mergeable_specialization): Adjust parms.
3219         * module.cc (trees_in::decl_value): Adjust
3220         add_mergeable_specialization calls.
3221         (trees_out::key_mergeable): Adjust match_mergeable_specialization
3222         calls.
3223         (specialization_add): Likewise.
3224         * pt.c (match_mergeable_specialization): Do not insert.
3225         (add_mergeable_specialization): Add to hash table here.
3227 2021-03-06  Patrick Palka  <ppalka@redhat.com>
3228             Jakub Jelinek  <jakub@redhat.com>
3230         PR c++/99287
3231         * constexpr.c (cxx_eval_increment_expression): Pass lval when
3232         evaluating the MODIFY_EXPR, and update 'mod' with the result of
3233         this evaluation.  Check *non_constant_p afterwards.  For prefix
3234         ops, just return 'mod'.
3236 2021-03-06  Patrick Palka  <ppalka@redhat.com>
3237             Jakub Jelinek  <jakub@redhat.com>
3239         PR c++/96330
3240         * pt.c (tsubst_copy) <case TEMPLATE_ID_EXPR>: Rename local
3241         variable 'fn' to 'tmpl'.  Handle a variable template-id by
3242         calling lookup_template_variable.
3244 2021-03-06  Patrick Palka  <ppalka@redhat.com>
3246         PR c++/99365
3247         * pt.c (unify) <case TEMPLATE_TYPE_PARM>: Pass targs as
3248         outer_targs to do_auto_deduction.
3249         (placeholder_type_constraint_dependent_p): Define.
3250         (do_auto_deduction): When processing_template_decl != 0
3251         and context is adc_unify and we have constraints, pretend the
3252         constraints are satisfied instead of punting.  Otherwise don't
3253         punt unless placeholder_type_constraint_dependent_p holds.
3254         Add some clarifying sanity checks.  Add a hack to add missing
3255         outermost template levels to outer_args before checking
3256         satisfaction.  Don't substitute outer_targs into type if it's
3257         already been done.
3259 2021-03-05  Marek Polacek  <polacek@redhat.com>
3261         PR c++/99374
3262         * call.c (standard_conversion): When converting pointers to
3263         member, don't return NULL when the bases are equivalent but
3264         incomplete.
3266 2021-03-05  Marek Polacek  <polacek@redhat.com>
3268         PR c++/99120
3269         * name-lookup.c (check_local_shadow): Check if the type of decl
3270         is non-null before checking TYPE_PTR*.
3272 2021-03-05  Nathan Sidwell  <nathan@acm.org>
3274         PR c++/99245
3275         * module.cc (module_state::write_cluster): Relax binding assert.
3277 2021-03-05  Nathan Sidwell  <nathan@acm.org>
3279         PR c++/99377
3280         * pt.c (instantiate_decl): Call set_instantiating_module.
3282 2021-03-05  Iain Sandoe  <iain@sandoe.co.uk>
3284         PR c++/98118
3285         * coroutines.cc (build_co_await): Use type_build_ctor_call()
3286         to determine cases when a CTOR needs to be built.
3287         (flatten_await_stmt): Likewise.
3288         (morph_fn_to_coro): Likewise.
3290 2021-03-05  Iain Sandoe  <iain@sandoe.co.uk>
3292         PR c++/95616
3293         * coroutines.cc (coro_diagnose_throwing_fn): New helper.
3294         (coro_diagnose_throwing_final_aw_expr): New helper.
3295         (build_co_await): Diagnose throwing final await expression
3296         components.
3297         (build_init_or_final_await): Diagnose a throwing promise
3298         final_suspend() call.
3300 2021-03-05  Iain Sandoe  <iain@sandoe.co.uk>
3302         PR c++/95615
3303         * coroutines.cc (struct param_info): Track parameter copies that need
3304         a DTOR.
3305         (coro_get_frame_dtor): New helper function factored from build_actor().
3306         (build_actor_fn): Use coro_get_frame_dtor().
3307         (morph_fn_to_coro): Track parameters that need DTORs on exception,
3308         likewise the frame promise and the return object.  On exception, run the
3309         DTORs for these, destroy the frame and then rethrow the exception.
3311 2021-03-05  Nathan Sidwell  <nathan@acm.org>
3313         PR c++/99389
3314         * pt.c (instantiate_class_template_1): Set instantiating module
3315         here.
3317 2021-03-05  Tobias Burnus  <tobias@codesourcery.com>
3319         PR c/99137
3320         * parser.c (cp_parser_oacc_clause_async): Reject comma expressions.
3322 2021-03-04  Jakub Jelinek  <jakub@redhat.com>
3324         PR c++/88146
3325         PR c++/99362
3326         * cvt.c (convert_to_void): Revert 2019-10-17 changes.  Clarify
3327         comment.
3329 2021-03-04  Nathan Sidwell  <nathan@acm.org>
3331         PR c++/99170
3332         * module.cc (class uintset): Delete.
3333         (typedef attached_map_t): A hash map.
3334         (attached_table): Use attached_map_t.  Adjust uses ...
3335         (trees_out::decl_value, trees_in::decl_value): ... here ...
3336         (trees_out::key_mergeable): ... here ...
3337         (trees_in::key_mergeable): ... here ...
3338         (maybe_attach_decl): ... here ...
3339         (direct_import): ... and here.
3341 2021-03-04  Nathan Sidwell  <nathan@acm.org>
3343         PR c++/99170
3344         * cp-tree.h
3345         * lex.c (cxx_dup_lang_specific_decl): Adjust for module_attached_p
3346         rename.
3347         * module.cc (class pending_key): New.
3348         (default_hash_traits<pending_key>): New specialization.
3349         (pending_map_t): New typedef.
3350         (pending_table): Replace old table.
3351         (trees_out::lang_decl_bools): Adjust.
3352         (trees_in::lang_decl_bools): Adjust.
3353         (trees_in::install_entity): Drop pending member and specialization
3354         handling.
3355         (find_pending_key): New.
3356         (depset::hash::fiund_dependencies): Use it.
3357         (pendset_lazy_load): Delete.
3358         (module_state::write_cluster): Don't count pendings here.  Bye
3359         Duff's device-like thing.
3360         (module_state::write_pendings): Reimplement.
3361         (module_state::read_pendings): Reimplement.
3362         (lazy_specializations_p): Delete.
3363         (module_state::write): Adjust write_pendings call.
3364         (lazy_load_pendings): New.
3365         (lazy_load_specializations): Delete.
3366         (lazy_load_members): Delete.
3367         (init_modules): Adjust.
3368         * name-lookup.c (maybe_lazily_declare): Call lazy_load_pendings
3369         not lazy_load_members.
3370         (note_pending_specializations): Delete.
3371         (load_pending_specializations): Delete.
3372         * name-lookup.h (BINDING_VECTR_PENDING_SPECIALIZATIONS_P): Delete.
3373         (BINDING_VECTOR_PENDING_MEMBERS_P): Delete.
3374         (BINDING_VECTR_PENDING_MEMBERS_P): Delete.
3375         (note_pending_specializations): Delete.
3376         (load_pending_specializations): Delete.
3377         * pt.c (lookup_template_class_1): Call lazy_load_pendings not
3378         lazy_load_specializations.
3379         (instantiate_template_class_1): Likewise.
3380         (instantiate_decl): Call lazy_load_pendings.
3381         * typeck.c (complete_type): Likewise.
3383 2021-03-03  Nathan Sidwell  <nathan@acm.org>
3385         PR c++/99170
3386         * module.cc (post_load_decls): New.
3387         (lazy_snum, recursive_lazy): Move earlier.
3388         (module_state::read_cluster): Push cloning onto post_load_decls.
3389         (post_load_processing): New.  Do the cloning here.
3390         (module_state::read_inits): Call post_load_processing.
3391         (module_state::read_language): Likewise.
3392         (lazy_load_binding, lazy_load_specializations): Likewise
3393         (lazy_load_members): Likewise
3395 2021-03-03  Nathan Sidwell  <nathan@acm.org>
3397         PR c++/99170
3398         * module.cc (trees_out::decl_value): Stream specialization keys
3399         after decl.
3400         (trees_in::decl_value): Stream them back and insert after
3401         completing the decl.
3402         (trees_out::key_mergeable): Drop some streaming here ...
3403         (trees_in::key_mergeable): ... and here.  Don't insert into
3404         specialization tables.
3406 2021-03-03  Patrick Palka  <ppalka@redhat.com>
3408         * constraint.cc (struct sat_info): Document the different
3409         meanings of noisy() and diagnose_unsatisfaction_p() during
3410         satisfaction and requires-expression evaluation.
3411         (tsubst_valid_expression_requirement): Take a sat_info instead
3412         of a subst_info.  Perform the substitution quietly first.  Fold
3413         in error-replaying code from diagnose_valid_expression.
3414         (tsubst_simple_requirement): Take a sat_info instead of a
3415         subst_info.
3416         (tsubst_type_requirement_1): New.  Fold in error-replaying code
3417         from diagnose_valid_type.
3418         (tsubst_type_requirement): Use the above.  Take a sat_info
3419         instead of a subst_info.
3420         (tsubst_compound_requirement): Likewise.  Fold in
3421         error-replaying code from diagnose_compound_requirement.
3422         (tsubst_nested_requirement): Take a sat_info instead of a
3423         subst_info.  Fold in error-replaying code from
3424         diagnose_nested_requirement.
3425         (tsubst_requirement): Take a sat_info instead of a subst_info.
3426         (tsubst_requires_expr): Split into two versions, one that takes
3427         a sat_info argument and another that takes a complain and
3428         in_decl argument.  Remove outdated documentation.  Document the
3429         effects of the sat_info argument.  Don't short-circuit
3430         processing of requirements when diagnosing unsatisfaction,
3431         mirroring diagnose_requires_expr.
3432         (satisfy_nondeclaration_constraint) <case REQUIRES_EXPR>: Remove
3433         assert, and se the three-parameter version of tsubst_requires_expr.
3434         (diagnose_trait_expr): Make static.  Take a template argument
3435         vector instead of a parameter mapping.
3436         (diagnose_valid_expression): Remove.
3437         (diagnose_valid_type): Remove.
3438         (diagnose_simple_requirement): Remove.
3439         (diagnose_compound_requirement): Remove.
3440         (diagnose_type_requirement): Remove.
3441         (diagnose_nested_requirement): Remove.
3442         (diagnose_requirement): Remove.
3443         (diagnose_requires_expr): Remove.
3444         (diagnose_atomic_constraint): Take a sat_info instead of a
3445         subst_info.  Adjust call to diagnose_trait_expr.  Call
3446         tsubst_requires_expr instead of diagnose_requires_expr.
3447         (diagnose_constraints): Remove special casing of REQUIRES_EXPR
3448         and just always call constraint_satisfaction_value.
3450 2021-03-03  Patrick Palka  <ppalka@redhat.com>
3452         * constexpr.c (cxx_eval_call_expression): Adjust call to
3453         evaluate_concept_check.
3454         (cxx_eval_constant_expression) <case REQUIRES_EXPR>: Use
3455         evaluate_requires_expression instead of
3456         satisfy_constraint_expression.
3457         <case TEMPLATE_ID_EXPR>: Adjust call to evaluate_concept_check.
3458         * constraint.cc (struct sat_info): Adjust comment about which
3459         satisfaction entrypoints use noisy-unsat.
3460         (normalize_template_requirements): Remove (and adjust callers
3461         appropriately).
3462         (normalize_nontemplate_requirements): Likewise.
3463         (tsubst_nested_requirement): Use constraint_satisfaction_value
3464         instead of satisfy_constraint_expression, which'll do the
3465         noisy replaying of ill-formed quiet satisfaction for us.
3466         (decl_satisfied_cache): Adjust comment.
3467         (satisfy_constraint): Rename to ...
3468         (satisfy_normalized_constraints): ... this.
3469         (satisfy_associated_constraints): Remove (and make its
3470         callers check for dependent arguments).
3471         (satisfy_constraint_expression): Rename to ...
3472         (satisfy_nondeclaration_constraints): ... this.  Assert that
3473         'args' is empty when 't' is a concept-id.  Removing handling
3474         bare constraint-expressions, and handle REQUIRES_EXPRs
3475         specially.  Adjust comment accordingly.
3476         (satisfy_declaration_constraints): Assert in the two-parameter
3477         version that 't' is not a TEMPLATE_DECL.  Adjust following
3478         removal of normalize_(non)?template_requirements and
3479         satisfy_asociated_constraints.
3480         (constraint_satisfaction_value): Combine the two- and
3481         three-parameter versions in the natural way.
3482         (constraints_satisfied_p): Combine the one- and two-parameter
3483         versions in the natural way.  Improve documentation.
3484         (evaluate_requires_expr): Define.
3485         (evaluate_concept_check): Remove 'complain' parameter.  Use
3486         constraint_satisfaction_value instead of
3487         satisfy_constraint_expression.
3488         (diagnose_nested_requirement): Adjust following renaming of
3489         satisfy_constraint_expression.
3490         (diagnose_constraints): Handle REQUIRES_EXPR by going through
3491         diagnose_requires_expr directly instead of treating it as a
3492         constraint-expression.  Improve documentation.
3493         * cp-gimplify.c (cp_genericize_r) <case CALL_EXPR>: Adjust call
3494         to evaluate_concept_check.
3495         <case REQUIRES_EXPR>: Use evaluate_requires_expr instead of
3496         constraints_satisfied_p.
3497         <case TEMPLATE_ID_EXPR>: Adjust call to evaluate_concept_check.
3498         * cp-tree.h (evaluate_requires_expr): Declare.
3499         (evaluate_concept_check): Remove tsubst_flag_t parameter.
3500         (satisfy_constraint_expression): Remove declaration.
3501         (constraints_satisfied_p): Remove one-parameter declaration.
3502         Add a default argument to the two-parameter declaration.
3503         * cvt.c (convert_to_void): Adjust call to
3504         evaluate_concept_check.
3506 2021-03-03  Jakub Jelinek  <jakub@redhat.com>
3508         PR c++/82959
3509         * call.c (op_is_ordered): Handle TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR
3510         and COMPOUND_EXPR.
3512 2021-03-03  Marek Polacek  <polacek@redhat.com>
3514         PR c++/97034
3515         PR c++/99009
3516         * pt.c (build_deduction_guide): Use INNERMOST_TEMPLATE_ARGS.
3517         (maybe_aggr_guide): Use the original template type where needed.  In
3518         a class member template, partially instantiate the result of
3519         collect_ctor_idx_types.
3520         (do_class_deduction): Defer the deduction until the enclosing
3521         scope is non-dependent.
3523 2021-03-03  Jason Merrill  <jason@redhat.com>
3525         PR c++/95675
3526         * call.c (build_temp): Wrap a CALL_EXPR in a TARGET_EXPR
3527         if it didn't get one before.
3529 2021-03-03  Nathan Sidwell  <nathan@acm.org>
3531         PR c++/99344
3532         * module.cc (trees_out::decl_node): Small refactor.
3533         (depset::hash::add_binding_entity): Return true on meeting an
3534         import.  Set namespace's import here.
3535         (module_state:write_namespaces): Inform of purview too.
3536         (module_state:read_namespaces): Adjust.
3537         * name-lookup.c (implicitly_export_namespace): Delete.
3538         (do_pushdecl): Don't call it.
3539         (push_namespace): Likewise, set purview.
3540         (add_imported_namespace): Reorder parms.
3541         * name-lookup.h (add_imported_namespace): Alter param ordering.
3543 2021-03-02  Martin Sebor  <msebor@redhat.com>
3545         PR c++/99251
3546         * class.c (build_base_path): Call build_if_nonnull.
3547         * cp-tree.h (build_if_nonnull): Declare.
3548         * rtti.c (ifnonnull): Rename...
3549         (build_if_nonnull): ...to this.  Set no-warning bit on COND_EXPR.
3550         (build_dynamic_cast_1): Adjust to name change.
3552 2021-03-02  Patrick Palka  <ppalka@redhat.com>
3554         PR c++/96443
3555         PR c++/96960
3556         * constraint.cc (type_deducible_p): Don't substitute into the
3557         constraints, and instead just pass 'args' to do_auto_deduction
3558         as the outer template arguments.
3559         (tsubst_parameter_mapping): Remove confused code for handling
3560         placeholder type arguments.
3561         (normalize_placeholder_type_constraint): Define.
3562         (satisfy_constraint_expression): Use it to handle placeholder
3563         'auto' types.
3564         * cp-tree.h (PLACEHOLDER_TYPE_CONSTRAINTS_INFO): Define.
3565         (PLACEHOLDER_TYPE_CONSTRAINTS): Redefine in terms of the above.
3566         * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: Use
3567         PLACEHOLDER_TYPE_CONSTRAINTS_INFO instead.
3568         (make_constrained_placeholder_type): Set
3569         PLACEHOLDER_TYPE_CONSTRAINTS_INFO instead.
3570         (do_auto_deduction): Clarify comments about the outer_targs
3571         parameter.  Rework satisfaction of a placeholder type constraint
3572         to pass in the complete set of template arguments directly to
3573         constraints_satisfied_p.
3574         (splice_late_return_type): Use PLACEHOLDER_TYPE_CONSTRAINTS_INFO
3575         instead.  Also rebuild the the constraint info on the new auto.
3577 2021-03-02  Patrick Palka  <ppalka@redhat.com>
3579         * constraint.cc (build_parameter_mapping): Rely on the caller to
3580         determine the in-scope template parameters.
3581         (norm_info::norm_info): Delegate the tsubst_flags_t constructor
3582         to the two-parameter constructor.  In the two-parameter
3583         constructor, fold in the definition of make_context, set
3584         initial_parms appropriately, and don't set the now-removed
3585         orig_decl member.
3586         (norm_info::make_context): Remove, now that its only use is
3587         inlined into the caller.
3588         (norm_info::update_context): Adjust call to
3589         build_parameter_mapping to pass in the relevant set of in-scope
3590         template parameters.
3591         (norm_info::ctx_parms): Define this member function.
3592         (norm_info::context): Initialize to NULL_TREE.
3593         (norm_info::orig_decl): Remove this data member.
3594         (norm_info::initial_parms): Define this data member.
3595         (normalize_atom): Adjust call to build_parameter_mapping to pass
3596         in the relevant set of in-scope template parameters.  Use
3597         info.initial_parms instead of info.orig_decl.
3598         (normalize_constraint_expression): Take a norm_info object
3599         instead of a bool.  Cache the result of normalization.
3600         (tsubst_nested_requirement): Call satisfy_constraint_expression
3601         instead of satisfy_constraint, so that we normalize on demand.
3602         (satisfy_constraint_expression): Handle a NESTED_REQ argument.
3603         Adjust call to normalize_constraint_expression.
3604         (finish_nested_requirement): Set the TREE_TYPE of the NESTED_REQ
3605         to current_template_parms.
3606         (diagnose_nested_requirements): Go through
3607         satisfy_constraint_expression, as with tsubst_nested_requirement.
3609 2021-03-02  Patrick Palka  <ppalka@redhat.com>
3611         * constraint.cc (tsubst_parameter_mapping): Canonicalize the
3612         arguments of a substituted TYPE_ARGUMENT_PACK even if we've
3613         started with a TYPE_ARGUMENT_PACK.
3614         (finish_requires_expr): Don't set DECL_CONTEXT and
3615         CONSTRAINT_VAR_P on each of the introduced parameters here.
3616         * parser.c (cp_parser_requirement_parameter_list): Instead set
3617         these fields earlier, here.
3618         * pt.c (do_auto_deduction): Canonicalize the result of
3619         do_auto_deduction.  Pass 'complain' to finish_decltype_type.
3621 2021-03-02  Patrick Palka  <ppalka@redhat.com>
3623         * constraint.cc (tsubst_simple_requirement): Just return
3624         boolean_true_node on success.
3625         (tsubst_type_requirement): Likewise.
3626         (tsubst_compound_requirement): Likewise.
3627         (tsubst_nested_requirement): Likewise.
3628         (tsubst_requirement_body): Remove.
3629         (check_constaint_variables): Rename to ...
3630         (check_constraint_variables): ... this.
3631         (tsubst_constraint_variables): Adjust.
3632         (tsubst_requires_expr): Fold tsubst_requirement_body into here.
3634 2021-03-01  Nathan Sidwell  <nathan@acm.org>
3636         PR c++/99294
3637         * class.c (fixup_type_variants): Propagate mode, precision,
3638         alignment & emptiness.
3639         * module.cc (trees_out::type_node): Use TYPE_ALIGN_RAW.
3640         (trees_in::tree_node): Rematerialize alignment here.
3642 2021-02-27  Jason Merrill  <jason@redhat.com>
3644         PR c++/90333
3645         * parser.c (cp_parser_lambda_declarator_opt): Accept GNU attributes
3646         between () and ->.
3648 2021-02-26  Jakub Jelinek  <jakub@redhat.com>
3650         * parser.c (cp_parser_lambda_declarator_opt): Implement
3651         P1102R2 - Down with ()! Make ()s optional before lambda specifiers
3652         for -std={c,gnu}++2b or with pedwarn in earlier versions.
3654 2021-02-26  Jakub Jelinek  <jakub@redhat.com>
3656         PR c++/95451
3657         * lambda.c (is_lambda_ignored_entity): Before checking for
3658         LAMBDA_FUNCTION_P, use OVL_FIRST.  Drop FUNCTION_DECL check.
3660 2021-02-26  Jason Merrill  <jason@redhat.com>
3662         PR c++/98810
3663         * pt.c (tsubst_copy) [VIEW_CONVERT_EXPR]: Add const
3664         to a class non-type template argument that needs it.
3666 2021-02-26  Patrick Palka  <ppalka@redhat.com>
3668         PR c++/98990
3669         * pt.c (splice_late_return_type): Rebuild the entire return type
3670         if we have to adjust the level of an auto within.
3671         (type_uses_auto): Adjust call to find_type_usage.
3672         * type-utils.h (find_type_usage): Revert r10-6571 change that
3673         made this function return a pointer to the auto node.
3675 2021-02-25  Patrick Palka  <ppalka@redhat.com>
3677         PR c++/99213
3678         PR c++/94521
3679         * error.c (dump_scope): Pass TFF_NO_TEMPLATE_BINDINGS instead of
3680         TFF_NO_FUNCTION_ARGUMENTS when dumping a function scope.
3682 2021-02-25  Patrick Palka  <ppalka@redhat.com>
3684         PR c++/99103
3685         * pt.c (is_spec_or_derived): Drop cv-qualifiers from 'etype'.
3686         (maybe_aggr_guide): Fix order of arguments to is_spec_or_derived.
3688 2021-02-25  Marek Polacek  <polacek@redhat.com>
3690         DR 1312
3691         PR c++/99176
3692         * constexpr.c (is_std_construct_at): New overload.
3693         (is_std_allocator_allocate): New overload.
3694         (cxx_eval_call_expression): Use the new overloads.
3695         (cxx_eval_constant_expression): Reject casting
3696         from void * as per DR 1312.  Don't check can_convert.
3698 2021-02-25  Iain Sandoe  <iain@sandoe.co.uk>
3700         PR c++/97587
3701         * coroutines.cc (struct param_info): Track rvalue refs.
3702         (morph_fn_to_coro): Track rvalue refs, and call the promise
3703         CTOR with the frame copy of passed parms.
3705 2021-02-25  Iain Sandoe  <iain@sandoe.co.uk>
3707         PR c++/95822
3708         * coroutines.cc (morph_fn_to_coro): Unconditionally remove any
3709         set throwing_cleanup marker.
3711 2021-02-25  Nathan Sidwell  <nathan@acm.org>
3713         PR c++/99166
3714         * module.cc (module_state::inform_cmi_p): Renamed field.
3715         (module_state::do_import): Adjust.
3716         (init_modules, finish_module_processing): Likewise.
3717         (handle_module_option): Likewise.
3719 2021-02-25  Nathan Sidwell  <nathan@acm.org>
3721         PR c++/98318
3722         * mapper-client.cc (module_client::open_module_client): Fix typo
3723         of fd init.
3725 2021-02-24  Nathan Sidwell  <nathan@acm.org>
3727         PR c++/98718
3728         * module.cc (ool): New indirection vector.
3729         (loc_spans::maybe_propagate): Location is not optional.
3730         (loc_spans::open): Likewise.  Assert monotonically advancing.
3731         (module_for_ordinary_loc): Use ool indirection vector.
3732         (module_state::write_prepare_maps): Do not count empty macro
3733         expansions.  Elide empty spans.
3734         (module_state::write_macro_maps): Skip empty expansions.
3735         (ool_cmp): New qsort comparator.
3736         (module_state::write): Create and destroy ool vector.
3737         (name_pending_imports): Fix dump push/pop.
3738         (preprocess_module): Likewise.  Add more dumping.
3739         (preprocessed_module): Likewise.
3741 2021-02-24  Iain Sandoe  <iain@sandoe.co.uk>
3743         PR c++/96251
3744         * coroutines.cc (coro_common_keyword_context_valid_p): Suppress
3745         error reporting when instantiating for a constexpr.
3747 2021-02-23  Nathan Sidwell  <nathan@acm.org>
3749         PR c++/99208
3750         * decl.c (name_unnamed_type): Check DECL identity, not IDENTIFIER
3751         identity.
3753 2021-02-23  Patrick Palka  <ppalka@redhat.com>
3755         PR c++/95468
3756         * pt.c (tsubst_copy_and_build) <case BASELINK>: New case, copied
3757         over from tsubst_copy.
3759 2021-02-23  Patrick Palka  <ppalka@redhat.com>
3761         * pt.c (instantiation_dependent_expression_p): Check
3762         processing_template_decl before calling
3763         potential_constant_expression.
3765 2021-02-22  Nathan Sidwell  <nathan@acm.org>
3767         PR c++/99174
3768         * module.cc (struct module_state): Add visited_p flag.
3769         (name_pending_imports): Use it to avoid duplicate requests.
3770         (preprocess_module): Don't read preprocessor state if we failed to
3771         load a module's config.
3773 2021-02-22  Nathan Sidwell  <nathan@acm.org>
3775         PR c++/99153
3776         * decl.c (duplicate_decls): Move DECL_MODULE_IMPORT_P propagation
3777         to common-path.
3778         * module.cc (set_defining_module): Add assert.
3780 2021-02-19  Nathan Sidwell  <nathan@acm.org>
3782         PR c++/98741
3783         * module.cc (pending_imports): New.
3784         (declare_module): Adjust test condition.
3785         (name_pending_imports): New.
3786         (preprocess_module): Reimplement using pending_imports.
3787         (preprocessed_module): Move name-getting to name_pending_imports.
3788         * name-lookup.c (append_imported_binding_slot): Assert module
3789         ordering is increasing.
3791 2021-02-19  Nathan Sidwell  <nathan@acm.org>
3793         * module.cc (note_cmis): New.
3794         (struct module_state): Add inform_read_p bit.
3795         (module_state::do_import): Inform of CMI location, if enabled.
3796         (init_modules): Canonicalize note_cmis entries.
3797         (handle_module_option): Handle -flang-info-module-read=FOO.
3799 2021-02-19  Jason Merrill  <jason@redhat.com>
3801         PR c++/96926
3802         * call.c (perfect_conversion_p): Limit rvalueness
3803         test to reference bindings.
3805 2021-02-19  Jason Merrill  <jason@redhat.com>
3807         PR c++/96926
3808         * call.c (perfect_conversion_p): New.
3809         (perfect_candidate_p): New.
3810         (add_candidates): Ignore templates after a perfect non-template.
3812 2021-02-18  Nathan Sidwell  <nathan@acm.org>
3814         PR c++/99023
3815         * module.cc (canonicalize_header_name): Use
3816         cpp_probe_header_unit.
3817         (maybe_translate_include): Fix note_includes comparison.
3818         (init_modules): Fix note_includes string termination.
3820 2021-02-18  Jakub Jelinek  <jakub@redhat.com>
3822         PR c++/99132
3823         * cp-gimplify.c (cp_genericize_r) <case CALL_EXPR>: Use
3824         cp_get_callee_fndecl_nofold instead of cp_get_callee_fndecl to check
3825         for immediate function calls.
3827 2021-02-17  Nathan Sidwell  <nathan@acm.org>
3829         PR c++/99023
3830         * module.cc (struct macro_export): Add GTY markers.
3831         (macro_exports): Likewise, us a va_gc Vector.
3833 2021-02-17  Jakub Jelinek  <jakub@redhat.com>
3835         PR sanitizer/99106
3836         * init.c (build_zero_init_1): For flexible array members just return
3837         NULL_TREE instead of returning empty CONSTRUCTOR with non-complete
3838         ARRAY_TYPE.
3840 2021-02-17  Nathan Sidwell  <nathan@acm.org>
3842         PR c++/99116
3843         * name-lookup.c (do_pushdecl): Don't peek under template_parm
3844         bindings here ...
3845         (set_identifier_type_value_with_scope): ... or here.
3846         (do_pushtag): Only set_identifier_type_value_with_scope at
3847         non-class template parm scope, and use parent scope.
3849 2021-02-17  Nathan Sidwell  <nathan@acm.org>
3851         PR c++/99071
3852         * name-lookup.c (maybe_record_mergeable_decl): Deref the correct
3853         pointer.
3855 2021-02-17  Patrick Palka  <ppalka@redhat.com>
3857         PR debug/96997
3858         PR c++/94034
3859         * tree.c (build_aggr_init_expr): Revert r10-7718 change.
3861 2021-02-12  Nathan Sidwell  <nathan@acm.org>
3863         * module.cc (module_state::write_cluster): Check bindings for
3864         imported using-decls.
3866 2021-02-12  Nathan Sidwell  <nathan@acm.org>
3868         PR c++/99040
3869         * module.cc (trees_in::decl_value): Call add_module_namespace_decl
3870         for new namespace-scope entities.
3871         (module_state::read_cluster): Don't call add_module_decl here.
3872         * name-lookup.h (add_module_decl): Rename to ...
3873         (add_module_namespace_decl): ... this.
3874         * name-lookup.c (newbinding_bookkeeping): Move into ...
3875         (do_pushdecl): ... here.  Its only remaining caller.
3876         (add_module_decl): Rename to ...
3877         (add_module_namespace_decl): ... here.  Add checking-assert for
3878         circularity. Don't call newbinding_bookkeeping, just extern_c
3879         checking and incomplete var checking.
3881 2021-02-12  Nathan Sidwell  <nathan@acm.org>
3883         PR c++/99039
3884         PR c++/99040
3885         * cp-tree.h (CPTI_GLOBAL_TYPE): Delete.
3886         (global_type_node): Delete.
3887         (IDENTIFIER_TYPE_VALUE): Delete.
3888         (IDENTIFIER_HAS_TYPE_VALUE): Delete.
3889         (get_type_value): Delete.
3890         * name-lookup.h (identifier_type_value): Delete.
3891         * name-lookup.c (check_module_override): Don't
3892         SET_IDENTIFIER_TYPE_VALUE here.
3893         (do_pushdecl): Nor here.
3894         (identifier_type_value_1, identifier_type_value): Delete.
3895         (set_identifier_type_value_with_scope): Only
3896         SET_IDENTIFIER_TYPE_VALUE for local and class scopes.
3897         (pushdecl_nanmespace_level): Remove shadow stack nadgering.
3898         (do_pushtag): Use REAL_IDENTIFIER_TYPE_VALUE.
3899         * call.c (check_dtor_name): Use lookup_name.
3900         * decl.c (cxx_init_decl_processing): Drop global_type_node.
3901         * decl2.c (cplus_decl_attributes): Don't SET_IDENTIFIER_TYPE_VALUE
3902         here.
3903         * init.c (get_type_value): Delete.
3904         * pt.c (instantiate_class_template_1): Don't call pushtag or
3905         SET_IDENTIFIER_TYPE_VALUE here.
3906         (tsubst): Assert never an identifier.
3907         (dependent_type_p): Drop global_type_node assert.
3908         * typeck.c (error_args_num): Don't use IDENTIFIER_HAS_TYPE_VALUE
3909         to determine ctorness.
3911 2021-02-12  Jakub Jelinek  <jakub@redhat.com>
3913         PR c++/97742
3914         * parser.c (cp_parser_requirement_seq): Stop iterating after reaching
3915         CPP_EOF.
3917 2021-02-12  Jason Merrill  <jason@redhat.com>
3919         PR c++/97246
3920         PR c++/94546
3921         * pt.c (extract_fnparm_pack): Check DECL_PACK_P here.
3922         (register_parameter_specializations): Not here.
3924 2021-02-11  Marek Polacek  <polacek@redhat.com>
3926         PR c++/95888
3927         * pt.c (lookup_template_class_1): Pass tf_none to tsubst when looking
3928         for the partial instantiation.
3930 2021-02-11  Jakub Jelinek  <jakub@redhat.com>
3932         PR c++/99033
3933         * init.c (build_zero_init_1): Handle zero initialiation of
3934         flexible array members like initialization of [0] arrays.
3935         Use integer_minus_onep instead of comparison to integer_minus_one_node
3936         and integer_zerop instead of comparison against size_zero_node.
3937         Formatting fixes.
3939 2021-02-11  Marek Polacek  <polacek@redhat.com>
3941         PR c++/99063
3942         * semantics.c (finish_do_stmt): Check for unexpanded parameter packs.
3944 2021-02-11  Patrick Palka  <ppalka@redhat.com>
3946         PR c++/97582
3947         * name-lookup.c (op_unqualified_lookup): Handle an ambiguous
3948         lookup result by discarding it if the first element is a
3949         class-scope declaration, otherwise return it.
3950         (push_operator_bindings): Handle an ambiguous lookup result by
3951         doing push_local_binding on each element in the list.
3953 2021-02-11  Marek Polacek  <polacek@redhat.com>
3955         * parser.c (cp_parser_selection_statement): Use vec_free.
3957 2021-02-10  Jakub Jelinek  <jakub@redhat.com>
3959         PR c++/98988
3960         PR c++/99031
3961         * constexpr.c: Include cgraph.h.
3962         (cxx_eval_call_expression): Call varpool_node::finalize_decl on
3963         heap artificial vars.
3964         (cxx_eval_outermost_constant_expr): Remove varpool nodes for
3965         heap artificial vars.
3967 2021-02-10  Nathan Sidwell  <nathan@acm.org>
3969         PR c++/99030
3970         * pt.c (tsubst_copy) [VAR_DECL]: For a DECL_LOCAL_DECL_P T is the
3971         answer if there's no local specialization.
3973 2021-02-09  Nathan Sidwell  <nathan@acm.org>
3975         PR c++/98944
3976         * module.cc (module_state::is_rooted): Rename to ...
3977         (module_state::has_location): ... here.  Adjust callers.
3978         (module_state::read_partitions): Adjust validity check.
3979         Don't overwrite a known location.
3981 2021-02-09  Jason Merrill  <jason@redhat.com>
3983         PR c++/96905
3984         * pt.c (mark_decl_instantiated): Exit early if consteval.
3986 2021-02-09  Jason Merrill  <jason@redhat.com>
3988         PR c++/98326
3989         PR c++/20408
3990         * cp-gimplify.c (simple_empty_class_p): Don't touch an invisiref
3991         parm.
3993 2021-02-09  Jason Merrill  <jason@redhat.com>
3995         PR c++/98994
3996         PR c++/97566
3997         * constexpr.c (cxx_eval_store_expression): Only skip empty fields in
3998         RECORD_TYPE.
4000 2021-02-08  Nathan Sidwell  <nathan@acm.org>
4002         * decl.c (start_cleanup_fn): Push function into
4003         namespace.
4005 2021-02-08  Nathan Sidwell  <nathan@acm.org>
4007         PR c++/98531
4008         * cp-tree.h (push_abi_namespace, pop_abi_namespace): Declare.
4009         * decl.c (push_abi_namespace, pop_abi_namespace): Moved
4010         from rtti.c, add default namespace arg.
4011         (check_redeclaration_exception_specification): Allow a lazy
4012         builtin's eh spec to differ from an lready-declared user
4013         declaration.
4014         (declare_global_var): Use push/pop_abi_namespace.
4015         (get_atexit_node): Push the fndecl into a namespace.
4016         * rtti.c (push_abi_namespace, pop_abi_namespace): Moved to
4017         decl.c.
4019 2021-02-08  Marek Polacek  <polacek@redhat.com>
4021         * cp-tree.h (CLASSTYPE_TI_TEMPLATE): Fix typo.
4023 2021-02-05  Marek Polacek  <polacek@redhat.com>
4025         PR c++/98947
4026         * call.c (build_conditional_expr_1): Don't call mark_lvalue_use
4027         on arg2/arg3.
4028         * expr.c (mark_use) <case MODIFY_EXPR>: Don't check read_p when
4029         issuing the -Wvolatile warning.  Only set TREE_THIS_VOLATILE if
4030         a warning was emitted.
4032 2021-02-05  Marek Polacek  <polacek@redhat.com>
4034         PR c++/96462
4035         * name-lookup.c (lookup_using_decl): Hoist the destructor check.
4037 2021-02-05  Jakub Jelinek  <jakub@redhat.com>
4039         PR c++/97878
4040         * decl.c (check_array_initializer): For structured bindings, require
4041         the array type to be complete.
4043 2021-02-04  Jason Merrill  <jason@redhat.com>
4045         PR c++/98717
4046         * constraint.cc (build_concept_check_arguments): Remove assert.
4047         (build_concept_check): Allow empty args.
4049 2021-02-04  Tom Greenslade (thomgree)  <thomgree@cisco.com>
4051         PR c++/90926
4052         * call.c (can_convert_array): Extend to handle all valid aggregate
4053         initializers of an array; including by string literals, not just by
4054         brace-init-list.
4055         (build_aggr_conv): Call can_convert_array more often, not just in
4056         brace-init-list case.
4057         * typeck2.c (array_string_literal_compatible_p): New function.
4058         (digest_init_r): call array_string_literal_compatible_p
4059         * cp-tree.h: (array_string_literal_compatible_p): Declare.
4061 2021-02-04  Jason Merrill  <jason@redhat.com>
4063         PR c++/98802
4064         * pt.c (do_class_deduction): No aggregate guide if any_dguides_p.
4066 2021-02-04  Jason Merrill  <jason@redhat.com>
4068         PR c++/95192
4069         * pt.c (tsubst_attribute): Handle error.
4070         (apply_late_template_attributes): Return false on error.
4071         (tsubst_function_decl): Check its return value.
4072         (tsubst_decl): Likewise.
4073         (push_template_decl): Assert current_template_parms.
4074         (tsubst_template_decl): Set current_template_parms.
4076 2021-02-03  Marek Polacek  <polacek@redhat.com>
4078         PR c++/98951
4079         * call.c (struct z_candidate): Mark rewritten and reversed as const.
4080         (struct NonPublicField): Mark operator() as const.
4081         (struct NonTrivialField): Likewise.
4083 2021-02-03  Jason Merrill  <jason@redhat.com>
4085         PR c++/98926
4086         PR c++/98570
4087         * pt.c (spec_hasher::equal): Set processing_template_decl.
4088         * Make-lang.in (check-g++-strict-gc): Add --param
4089         hash-table-verification-limit=10000.
4091 2021-02-03  Marek Polacek  <polacek@redhat.com>
4093         PR c++/98899
4094         * parser.c (cp_parser_class_specifier_1): Use any possible
4095         DEFPARSE_INSTANTIATIONS to update DEFERRED_NOEXCEPT_PATTERN.
4096         (cp_parser_save_noexcept): Initialize DEFPARSE_INSTANTIATIONS.
4097         * pt.c (tsubst_exception_specification): Stash new_specs into
4098         DEFPARSE_INSTANTIATIONS.
4099         * tree.c (fixup_deferred_exception_variants): Use
4100         UNPARSED_NOEXCEPT_SPEC_P.
4102 2021-02-02  Jason Merrill  <jason@redhat.com>
4104         PR c++/98929
4105         PR c++/96199
4106         * error.c (dump_expr): Ignore dummy object.
4107         * pt.c (tsubst_baselink): Handle dependent scope.
4109 2021-02-01  Patrick Palka  <ppalka@redhat.com>
4111         PR c++/98295
4112         * constexpr.c (cxx_eval_array_reference): Also set
4113         new_ctx.object when setting new_ctx.ctor.
4115 2021-02-01  Marek Polacek  <polacek@redhat.com>
4117         PR c++/98355
4118         * parser.c (cp_parser_has_attribute_expression): Use
4119         uses_template_parms instead of type_dependent_expression_p.
4121 2021-02-01  Jason Merrill  <jason@redhat.com>
4123         PR c++/98570
4124         * cp-tree.h: Declare it.
4125         * pt.c (comparing_dependent_aliases): New flag.
4126         (template_args_equal, spec_hasher::equal): Set it.
4127         (dependent_alias_template_spec_p): Assert that we don't
4128         get non-types other than error_mark_node.
4129         (instantiate_alias_template): SET_TYPE_STRUCTURAL_EQUALITY
4130         on complex alias specializations.  Set TYPE_DEPENDENT_P here.
4131         (tsubst_decl): Not here.
4132         * module.cc (module_state::read_cluster): Set
4133         comparing_dependent_aliases instead of
4134         comparing_specializations.
4135         * tree.c (cp_tree_equal): Remove comparing_specializations
4136         module handling.
4137         * typeck.c (structural_comptypes): Adjust.
4138         (comptypes): Remove comparing_specializations handling.
4140 2021-01-29  Nathan Sidwell  <nathan@acm.org>
4142         PR c++/98843
4143         * module.cc (module_state_config): Add num_entities field.
4144         (module_state::read_entities): The entity_ary span is
4145         already allocated.
4146         (module_state::write_config): Write num_entities.
4147         (module_state::read_config): Read num_entities.
4148         (module_state::write): Set config's num_entities.
4149         (module_state::read_initial): Allocate the entity ary
4150         span here.
4151         (module_state::read_language): Do not set entity_lwm
4152         here.
4154 2021-01-29  Marek Polacek  <polacek@redhat.com>
4156         PR c++/96137
4157         * parser.c (cp_parser_class_name): If parser->scope is
4158         error_mark_node, return it, otherwise continue.
4160 2021-01-28  Jakub Jelinek  <jakub@redhat.com>
4162         PR c++/98841
4163         * typeck.c (build_x_indirect_ref): For *this, return current_class_ref.
4165 2021-01-28  Jakub Jelinek  <jakub@redhat.com>
4167         PR c++/33661
4168         PR c++/98847
4169         * decl.c (cp_finish_decl): For register vars with asmspec in templates
4170         call set_user_assembler_name and set DECL_HARD_REGISTER.
4171         * pt.c (tsubst_expr): When instantiating DECL_HARD_REGISTER vars,
4172         pass asmspec_tree to cp_finish_decl.
4174 2021-01-28  Nathan Sidwell  <nathan@acm.org>
4176         PR c++/98770
4177         * module.cc (trees_out::decl_value): Swap is_typedef & TYPE_NAME
4178         check order.
4179         (trees_in::decl_value): Do typedef frobbing only when installing
4180         a new typedef, adjust is_matching_decl call.  Swap is_typedef
4181         & TYPE_NAME check.
4182         (trees_in::is_matching_decl): Add is_typedef parm. Adjust variable
4183         names and deal with typedef checking.
4185 2021-01-27  Jason Merrill  <jason@redhat.com>
4187         PR c++/97874
4188         * name-lookup.c (lookup_using_decl): Clean up handling
4189         of dependency and inherited constructors.
4190         (finish_nonmember_using_decl): Handle DECL_DEPENDENT_P.
4191         * pt.c (tsubst_expr): Handle DECL_DEPENDENT_P.
4193 2021-01-26  Jason Merrill  <jason@redhat.com>
4195         PR c++/97474
4196         * call.c (type_passed_as): Don't mark invisiref restrict.
4198 2021-01-26  Jason Merrill  <jason@redhat.com>
4200         PR c++/97566
4201         PR c++/98463
4202         * class.c (layout_class_type): An empty field gets size 0.
4203         (is_empty_field): New.
4204         (check_bases): Check it.
4205         * cp-tree.h (is_empty_field): Declare it.
4206         * constexpr.c (cxx_eval_store_expression): Check it.
4207         (cx_check_missing_mem_inits): Likewise.
4208         * init.c (perform_member_init): Likewise.
4209         * typeck2.c (process_init_constructor_record): Likewise.
4211 2021-01-25  Martin Sebor  <msebor@redhat.com>
4213         PR c++/98646
4214         * cvt.c (cp_fold_convert): Propagate TREE_NO_WARNING.
4216 2021-01-25  Jason Merrill  <jason@redhat.com>
4218         PR c++/98463
4219         * constexpr.c (get_or_insert_ctor_field): Add check.
4220         (cxx_eval_store_expression): Handle discontinuity of refs.
4222 2021-01-23  Anthony Sharp  <anthonysharp15@gmail.com>
4224         * call.c (complain_about_access): Altered function.
4225         * cp-tree.h (complain_about_access): Changed parameters of function.
4226         (get_parent_with_private_access): Declared new function.
4227         * search.c (get_parent_with_private_access): Defined new function.
4228         * semantics.c (enforce_access): Modified function.
4229         * typeck.c (complain_about_unrecognized_member): Updated function
4230         arguments in complain_about_access.
4232 2021-01-23  Patrick Palka  <ppalka@redhat.com>
4234         PR c++/97399
4235         * cp-tree.h (shared_member_p): Adjust declaration.
4236         * parser.c (cp_parser_init_declarator): If the storage class
4237         specifier is sc_static, pass true for static_p to
4238         cp_parser_declarator.
4239         (cp_parser_direct_declarator): Don't do inject_this_parm when
4240         the declarator is a friend.
4241         * search.c (shared_member_p): Change return type to bool and
4242         adjust function body accordingly.  Return false for a dependent
4243         USING_DECL instead of aborting.
4244         * semantics.c (finish_qualified_id_expr): Rely on shared_member_p
4245         even when type-dependent.
4247 2021-01-22  Marek Polacek  <polacek@redhat.com>
4249         PR c++/96623
4250         * parser.c (inject_parm_decls): Remove a redundant assignment.
4251         (cp_parser_class_specifier_1): Clear current_class_{ptr,ref}
4252         before calling inject_parm_decls.
4254 2021-01-22  Jason Merrill  <jason@redhat.com>
4256         PR c++/98744
4257         * call.c (make_base_init_ok): Use DECL_HAS_VTT_PARM_P.
4259 2021-01-22  Jakub Jelinek  <jakub@redhat.com>
4261         PR sanitizer/95693
4262         * init.c (build_zero_init_1): Revert the 2018-03-06 change to
4263         return build_zero_cst for reference types.
4264         * typeck2.c (process_init_constructor_record): Instead call
4265         build_zero_cst here during error recovery instead of build_zero_init.
4267 2021-01-22  Marek Polacek  <polacek@redhat.com>
4269         PR c++/98545
4270         * mangle.c (write_member_name): Emit abi_warn_or_compat_version_crosses
4271         warnings regardless of abi_version_at_least.
4272         (write_expression): When the expression is a dependent name
4273         and an operator name, write "on" before writing its name.
4275 2021-01-22  Marek Polacek  <polacek@redhat.com>
4277         PR c++/97966
4278         * pt.c (instantiate_class_template_1): Instantiate members
4279         marked with attribute used only after we're done instantiating
4280         the class.
4282 2021-01-21  Patrick Palka  <ppalka@redhat.com>
4284         PR c++/71879
4285         * semantics.c (finish_decltype_type): Set up a cp_unevaluated
4286         sentinel at the start of the function.  Remove a now-redundant
4287         manual adjustment of cp_unevaluated_operand.
4289 2021-01-21  Nathan Sidwell  <nathan@acm.org>
4291         PR c++/98624
4292         * module.cc (depset::hash::find_dependencies): Add
4293         module arg.
4294         (trees_out::core_vals): Check state before calling
4295         write_location.
4296         (sort_cluster, module_state::write): Adjust
4297         find_dependencies call.
4299 2021-01-21  Jakub Jelinek  <jakub@redhat.com>
4301         PR c++/98672
4302         * constexpr.c (check_for_return_continue_data): Add break_stmt member.
4303         (check_for_return_continue): Also look for BREAK_STMT.  Handle
4304         SWITCH_STMT by ignoring break_stmt from its body.
4305         (potential_constant_expression_1) <case FOR_STMT>,
4306         <case WHILE_STMT>: If the condition isn't constant true, check if
4307         the loop body can contain a return stmt.
4308         <case SWITCH_STMT>: Adjust check_for_return_continue_data initializer.
4309         <case IF_STMT>: If recursion with tf_none is successful,
4310         merge *jump_target from the branches - returns with highest priority,
4311         breaks or continues lower.  If then branch is potentially constant and
4312         doesn't return, check the else branch if it could return, break or
4313         continue.
4315 2021-01-21  Nathan Sidwell  <nathan@acm.org>
4317         PR c++/98530
4318         * name-lookup.c (lookup_class_binding): Rearrange a stat-hack.
4320 2021-01-20  Nathan Sidwell  <nathan@acm.org>
4322         * module.cc (bytes_in::i, bytes_in::wi): Avoid left shift of
4323         signed type.
4325 2021-01-20  Patrick Palka  <ppalka@redhat.com>
4327         PR c++/95434
4328         * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: If tsubsting
4329         CLASS_PLACEHOLDER_TEMPLATE yields a TEMPLATE_TEMPLATE_PARM,
4330         adjust to its TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
4332 2021-01-20  Patrick Palka  <ppalka@redhat.com>
4334         PR c++/82613
4335         * parser.c (cp_parser_class_head): Defer access checking when
4336         parsing the base-clause until all bases are seen and attached
4337         to the class type.
4338         * pt.c (instantiate_class_template): Likewise when substituting
4339         into dependent bases.
4341 2021-01-20  Jakub Jelinek  <jakub@redhat.com>
4343         PR c++/98742
4344         * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_DETACH>: If
4345         error_operand_p, remove clause without further checking.  Check
4346         for non-NULL TYPE_NAME.
4348 2021-01-19  Marek Polacek  <polacek@redhat.com>
4350         PR c++/98659
4351         * pt.c (maybe_instantiate_noexcept): Return false if FN is
4352         error_mark_node.
4354 2021-01-19  Marek Polacek  <polacek@redhat.com>
4356         PR c++/98687
4357         * name-lookup.c (push_using_decl_bindings): New, broken out of...
4358         (finish_nonmember_using_decl): ...here.
4359         * name-lookup.h (push_using_decl_bindings): Update declaration.
4360         * pt.c (tsubst_expr): Update the call to push_using_decl_bindings.
4362 2021-01-19  Patrick Palka  <ppalka@redhat.com>
4364         PR c++/41437
4365         PR c++/58993
4366         * search.c (friend_accessible_p): If scope is a hidden friend
4367         defined inside a dependent class, consider access from the
4368         class.
4369         * parser.c (cp_parser_late_parsing_for_member): Don't push a
4370         dk_no_check access state.
4372 2021-01-19  Marek Polacek  <polacek@redhat.com>
4374         PR c++/98333
4375         * parser.c (cp_parser_class_specifier_1): Perform late-parsing
4376         of NSDMIs before late-parsing of noexcept-specifiers.
4378 2021-01-19  Nathan Sidwell  <nathan@acm.org>
4380         * module.cc (identifier): Merge overloads.
4382 2021-01-19  Nathan Sidwell  <nathan@acm.org>
4384         PR c++/98624
4385         * module.cc (trees_out::write_location): Make static.
4387 2021-01-16  Kwok Cheung Yeung  <kcy@codesourcery.com>
4389         * parser.c (cp_parser_omp_clause_detach): New.
4390         (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH.
4391         (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
4392         * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
4393         * semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
4394         Prevent use of detach with mergeable and overriding the data sharing
4395         mode of the event handle.
4397 2021-01-15  Nathan Sidwell  <nathan@acm.org>
4399         PR c++/98538
4400         * tree.c (cp_build_qualified_type_real): Propagate an array's
4401         dependentness to the copy, if known.
4403 2021-01-15  Jason Merrill  <jason@redhat.com>
4405         PR c++/98642
4406         * call.c (unsafe_return_slot_p): Return int.
4407         (init_by_return_slot_p): Split out from...
4408         (unsafe_copy_elision_p): ...here.
4409         (unsafe_copy_elision_p_opt): New name for old meaning.
4410         (build_over_call): Adjust.
4411         (make_safe_copy_elision): New.
4412         * typeck2.c (split_nonconstant_init_1): Elide copy from safe
4413         list-initialization.
4414         * cp-tree.h: Adjust.
4416 2021-01-15  Jason Merrill  <jason@redhat.com>
4418         * call.c (base_ctor_for, make_base_init_ok): New.
4419         (build_over_call): Use make_base_init_ok.
4421 2021-01-15  Jason Merrill  <jason@redhat.com>
4423         PR c++/63707
4424         * tree.c (build_vec_init_expr): Don't call build_vec_init_elt
4425         if we got a CONSTRUCTOR.
4427 2021-01-15  Nathan Sidwell  <nathan@acm.org>
4429         PR c++/98591
4430         * lang-specs.h: Fix handling of -fmodule-only with -fsyntax-only.
4432 2021-01-14  Jason Merrill  <jason@redhat.com>
4434         * typeck2.c (process_init_constructor_record): Use fldtype
4435         variable consistently.
4437 2021-01-14  Nathan Sidwell  <nathan@acm.org>
4439         PR c++/98372
4440         * tree.c (cp_tree_equal): Correct map_context logic.
4442 2021-01-13  Marek Polacek  <polacek@redhat.com>
4444         PR c++/98231
4445         * name-lookup.c (push_using_decl_bindings): New.
4446         * name-lookup.h (push_using_decl_bindings): Declare.
4447         * pt.c (tsubst_expr): Call push_using_decl_bindings.
4449 2021-01-13  Nathan Sidwell  <nathan@acm.org>
4451         PR c++/98626
4452         * module.cc (module_add_import_initializers):  Pass a
4453         zero-element argument vector.
4455 2021-01-12  Patrick Palka  <ppalka@redhat.com>
4457         PR c++/98611
4458         * tree.c (cp_walk_subtrees) <case TEMPLATE_TYPE_PARM>: Visit
4459         the template of a CTAD placeholder.
4461 2021-01-12  Marek Polacek  <polacek@redhat.com>
4463         PR c++/98620
4464         * typeck2.c (process_init_constructor_record): Don't emit
4465         -Wmissing-field-initializers warnings in unevaluated contexts.
4467 2021-01-11  Jakub Jelinek  <jakub@redhat.com>
4469         PR c++/98481
4470         * class.c (find_abi_tags_r): Set *walk_subtrees to 2 instead of 1
4471         for types.
4472         (mark_abi_tags_r): Likewise.
4473         * decl2.c (min_vis_r): Likewise.
4474         * tree.c (cp_walk_subtrees): If *walk_subtrees_p is 2, look through
4475         typedefs.
4477 2021-01-08  Patrick Palka  <ppalka@redhat.com>
4479         PR c++/98551
4480         * constexpr.c (cxx_eval_call_expression): Check CLASS_TYPE_P
4481         instead of AGGREGATE_TYPE_P before calling replace_result_decl.
4483 2021-01-08  Patrick Palka  <ppalka@redhat.com>
4485         PR c++/98515
4486         * semantics.c (check_accessibility_of_qualified_id): Punt if
4487         we're checking access of a scoped non-static member inside a
4488         class template.
4490 2021-01-07  Jakub Jelinek  <jakub@redhat.com>
4492         PR c++/98329
4493         * pt.c (tsubst_copy) <case BIT_CAST_EXPR>: Don't call
4494         cp_build_bit_cast here, instead just build_min a BIT_CAST_EXPR and set
4495         its location.
4496         (tsubst_copy_and_build): Handle BIT_CAST_EXPR.
4498 2021-01-07  Marek Polacek  <polacek@redhat.com>
4500         PR c++/98441
4501         * decl.c (grokdeclarator): Move the !funcdecl_p check inside the
4502         !late_return_type block.
4504 2021-01-07  Jason Merrill  <jason@redhat.com>
4506         * constexpr.c (cxx_bind_parameters_in_call): Add comment.
4507         (cxx_eval_store_expression): Add comment.
4509 2021-01-07  Jason Merrill  <jason@redhat.com>
4511         * call.c (has_next): Factor out from...
4512         (next_conversion): ...here.
4513         (strip_standard_conversion): And here.
4514         (is_subseq): And here.
4515         (build_conv): Check it.
4516         (standard_conversion): Don't call build_conv
4517         for ck_identity.
4519 2021-01-06  Martin Sebor  <msebor@redhat.com>
4521         PR c++/95768
4522         * error.c (dump_expr): Call c_pretty_printer::unary_expression.
4524 2021-01-05  Patrick Palka  <ppalka@redhat.com>
4526         * pt.c (unify) <case TEMPLATE_PARM_INDEX>: After walking into
4527         the type of the NTTP, substitute into the type again.  If the
4528         type is still dependent, don't unify the NTTP.
4530 2021-01-05  Jakub Jelinek  <jakub@redhat.com>
4532         * Make-lang.in (cc1plus-checksum, cc1plus$(exeext): Add
4533         $(CODYLIB) after $(BACKEND).
4535 2021-01-05  Jakub Jelinek  <jakub@redhat.com>
4537         PR c++/98469
4538         * constexpr.c (cxx_eval_constant_expression) <case BIT_CAST_EXPR>:
4539         Punt if lval is true.
4540         * semantics.c (cp_build_bit_cast): Call get_target_expr_sfinae on
4541         the result if it has a class type.
4543 2021-01-05  Marek Polacek  <polacek@redhat.com>
4545         PR c++/82099
4546         * pt.c (resolve_overloaded_unification): Call
4547         maybe_instantiate_noexcept after instantiating the function
4548         decl.
4550 2021-01-05  Nathan Sidwell  <nathan@acm.org>
4552         * parser.c (cp_parser_module_declaration): Alter diagnostic
4553         text to say where is permissable.
4555 2021-01-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4557         PR c++/98316
4558         * Make-lang.in (cc1plus$(exeext)): Add $(CODYLIB), $(NETLIBS).
4560 2021-01-02  Jan Hubicka  <jh@suse.cz>
4562         * cp-tree.h (cp_tree_c_finish_parsing): Declare.
4563         * decl2.c (c_parse_final_cleanups): Call cp_tree_c_finish_parsing.
4564         * tree.c (cp_tree_c_finish_parsing): New function.
4566 2021-01-01  Jakub Jelinek  <jakub@redhat.com>
4568         * ChangeLog-2020: Rotate ChangeLog.  New file.
4571 Copyright (C) 2021 Free Software Foundation, Inc.
4573 Copying and distribution of this file, with or without modification,
4574 are permitted in any medium without royalty provided the copyright
4575 notice and this notice are preserved.