Daily bump.
[official-gcc.git] / gcc / cp / ChangeLog
blob79cb9f9a7cf607de314cd557f7a77f31fa14d92f
1 2021-11-23  Martin Sebor  <msebor@redhat.com>
3         PR c++/96507
4         * typeck.c (warn_for_null_address): Handle reference members.
6 2021-11-23  Marek Polacek  <polacek@redhat.com>
8         PR c++/19808
9         * init.c (emit_mem_initializers): Don't add is_really_empty_class
10         members into uninitialized.
12 2021-11-23  Jakub Jelinek  <jakub@redhat.com>
14         * semantics.c (clone_omp_udr): Don't initialize
15         id.transform_lang_insert_block.
16         * optimize.c (clone_body): Likewise.
18 2021-11-22  Jason Merrill  <jason@redhat.com>
20         * typeck.c (build_x_unary_op): Set address location.
21         (convert_member_func_to_ptr): Handle location wrapper.
22         * pt.c (convert_nontype_argument): Likewise.
24 2021-11-22  Jason Merrill  <jason@redhat.com>
26         * typeck.c (check_return_expr): Only strip location wrapper during
27         NRV handling.
29 2021-11-22  Jakub Jelinek  <jakub@redhat.com>
31         PR c++/101731
32         * parser.c (cp_parser_late_parsing_oacc_routine): Set
33         parser->oacc_routine->fndecl_seen here, rather than ...
34         (cp_finalize_oacc_routine): ... here.  Don't error if
35         parser->oacc_routine->fndecl_seen is set for FUNCTION_DECLs.
37 2021-11-22  Jakub Jelinek  <jakub@redhat.com>
39         PR c++/103349
40         * constexpr.c (potential_constant_expression_1): Punt on OMP_MASKED.
42 2021-11-19  Jakub Jelinek  <jakub@redhat.com>
44         PR c++/101180
45         * pt.c (apply_late_template_attributes): Temporarily override
46         current_optimize_pragma, optimization_current_node,
47         current_target_pragma and scope_chain->omp_declare_target_attribute,
48         so that cplus_decl_attributes doesn't add implicit attributes.
50 2021-11-19  Martin Sebor  <msebor@redhat.com>
52         PR c++/33925
53         PR c/102867
54         * typeck.c (warn_for_null_address): Suppress warnings for code
55         resulting from macro expansion.
57 2021-11-19  Martin Liska  <mliska@suse.cz>
59         Revert:
60         2021-11-19  Martin Liska  <mliska@suse.cz>
62         * parser.c (add_debug_begin_stmt): Use option directly.
64 2021-11-19  Patrick Palka  <ppalka@redhat.com>
66         * tree.c (cp_walk_subtrees) <case *_CAST_EXPR>: Don't explicitly
67         walk the operands.
69 2021-11-19  Patrick Palka  <ppalka@redhat.com>
71         PR c++/94376
72         * lambda.c (lambda_capture_field_type): Simplify by handling the
73         is_this case first.  When capturing by-value a capture proxy,
74         consider the type of the corresponding field instead.
76 2021-11-19  Richard Biener  <rguenther@suse.de>
78         PR c++/103326
79         * pt.c (tsubst_copy): Handle VECTOR_CST.
81 2021-11-19  Jakub Jelinek  <jakub@redhat.com>
83         PR c++/70796
84         * cp-gimplify.c (cp_gimplify_arg): New function.
85         (cp_gimplify_expr): Use cp_gimplify_arg instead of gimplify_arg,
86         pass true as last argument to it if there are any following
87         arguments in strong evaluation order with side-effects.
89 2021-11-19  Marek Polacek  <polacek@redhat.com>
91         PR c++/19808
92         PR c++/96121
93         * init.c (perform_member_init): Remove a forward declaration.
94         Walk the initializer using find_uninit_fields_r.  New parameter
95         to track uninitialized fields.  If a member is initialized,
96         remove it from the hash set.
97         (perform_target_ctor): Return the initializer.
98         (struct find_uninit_data): New class.
99         (find_uninit_fields_r): New function.
100         (find_uninit_fields): New function.
101         (emit_mem_initializers): Keep and initialize a set holding fields
102         that are not initialized.  When handling delegating constructors,
103         walk the constructor tree using find_uninit_fields_r.  Also when
104         initializing base clases.  Pass uninitialized down to
105         perform_member_init.
107 2021-11-19  Patrick Palka  <ppalka@redhat.com>
109         PR c++/103198
110         * pt.c (any_template_parm_r): Walk the TREE_TYPE of a dummy
111         object.
113 2021-11-18  Marek Polacek  <polacek@redhat.com>
115         PR c++/103049
116         * semantics.c (finish_compound_literal): Accept C++23 auto{x}.
117         * typeck2.c (build_functional_cast_1): Accept C++23 auto(x).
119 2021-11-18  Patrick Palka  <ppalka@redhat.com>
121         * pt.c (tsubst_copy_and_build) <case CALL_EXPR>: Disable the
122         -fpermissive fallback for C++20 template-id ADL, but keep the
123         diagnostic.
125 2021-11-18  Jan Hubicka  <hubicka@ucw.cz>
127         * decl.c (finish_function): Update use of decl_replaceable_p.
129 2021-11-18  Patrick Palka  <ppalka@redhat.com>
131         PR c++/99911
132         * pt.c (tsubst_copy_and_build) <case CALL_EXPR>: Don't diagnose
133         name lookup failure if the arguments to an unresolved template
134         name are still dependent.
136 2021-11-18  Patrick Palka  <ppalka@redhat.com>
138         PR c++/102670
139         * pt.c (tsubst_copy_and_build) <case CALL_EXPR>: When looking
140         for an identifier callee in the koenig_p case, also look through
141         TEMPLATE_ID_EXPR.  Use tsubst_copy to substitute through the
142         template arguments of the template-id.
144 2021-11-18  Matthias Kretz  <m.kretz@gsi.de>
146         * constexpr.c (cxx_eval_constant_expression): Handle PAREN_EXPR
147         via cxx_eval_constant_expression.
148         * cp-objcp-common.c (names_builtin_p): Handle
149         RID_BUILTIN_ASSOC_BARRIER.
150         * cp-tree.h: Adjust TREE_LANG_FLAG documentation to include
151         PAREN_EXPR in REF_PARENTHESIZED_P.
152         (REF_PARENTHESIZED_P): Add PAREN_EXPR.
153         * parser.c (cp_parser_postfix_expression): Handle
154         RID_BUILTIN_ASSOC_BARRIER.
155         * pt.c (tsubst_copy_and_build): If the PAREN_EXPR is not a
156         parenthesized initializer, build a new PAREN_EXPR.
157         * semantics.c (force_paren_expr): Simplify conditionals. Set
158         REF_PARENTHESIZED_P on PAREN_EXPR.
159         (maybe_undo_parenthesized_ref): Test PAREN_EXPR for
160         REF_PARENTHESIZED_P.
162 2021-11-18  Martin Liska  <mliska@suse.cz>
164         * parser.c (add_debug_begin_stmt): Use option directly.
166 2021-11-16  Jason Merrill  <jason@redhat.com>
168         * ptree.c (cxx_print_xnode): Handle PTRMEM_CST.
170 2021-11-15  Jason Merrill  <jason@redhat.com>
172         * cp-tree.h (struct lang_decl_fn): Add implicit_constexpr.
173         (decl_implicit_constexpr_p): New.
174         * class.c (type_maybe_constexpr_destructor): Use
175         TYPE_HAS_TRIVIAL_DESTRUCTOR and maybe_constexpr_fn.
176         (finalize_literal_type_property): Simplify.
177         * constexpr.c (is_valid_constexpr_fn): Check for dtor.
178         (maybe_save_constexpr_fundef): Try to set DECL_DECLARED_CONSTEXPR_P
179         on inlines.
180         (cxx_eval_call_expression): Use maybe_constexpr_fn.
181         (maybe_constexpr_fn): Handle flag_implicit_constexpr.
182         (var_in_maybe_constexpr_fn): Use maybe_constexpr_fn.
183         (potential_constant_expression_1): Likewise.
184         (decl_implicit_constexpr_p): New.
185         * decl.c (validate_constexpr_redeclaration): Allow change with
186         -fimplicit-constexpr.
187         (grok_special_member_properties): Use maybe_constexpr_fn.
188         * error.c (dump_function_decl): Don't print 'constexpr'
189         if it's implicit.
190         * Make-lang.in (check-c++-all): Update.
192 2021-11-15  Jason Merrill  <jason@redhat.com>
194         * typeck2.c (split_nonconstant_init_1): Handle flexarrays better.
196 2021-11-15  Jakub Jelinek  <jakub@redhat.com>
198         * parser.c (OMP_TARGET_CLAUSE_MASK): Add
199         PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
201 2021-11-15  Jason Merrill  <jason@redhat.com>
203         * call.c (perform_implicit_conversion_flags): Use the location of
204         the argument.
205         * lambda.c (build_lambda_object): Set location on the TARGET_EXPR.
207 2021-11-15  Jason Merrill  <jason@redhat.com>
209         * constexpr.c (maybe_save_constexpr_fundef): Also check whether the
210         body of a constructor is potentially constant.
212 2021-11-15  Jason Merrill  <jason@redhat.com>
214         * semantics.c (is_this_parameter): Check DECL_HAS_VALUE_EXPR_P
215         instead of is_capture_proxy.
217 2021-11-15  Jason Merrill  <jason@redhat.com>
219         PR c++/70690
220         * init.c (build_vec_init): Check default_init_uninitialized_part in
221         C++20.
223 2021-11-15  Jason Merrill  <jason@redhat.com>
225         * constexpr.c (maybe_constant_value): Don't evaluate
226         in an unevaluated operand unless manifestly const-evaluated.
227         (fold_non_dependent_expr_template): Likewise.
228         * decl.c (compute_array_index_type_loc): This context is
229         manifestly constant-evaluated.
231 2021-11-15  Jason Merrill  <jason@redhat.com>
233         * constexpr.c (cxx_eval_thunk_call): Error instead of ICE
234         on vbase thunk to constexpr function.
236 2021-11-11  Patrick Palka  <ppalka@redhat.com>
238         * parser.c (cp_parser_template_argument_list): Use auto_vec
239         instead of manual memory management.
241 2021-11-11  Jakub Jelinek  <jakub@redhat.com>
243         * parser.c (cp_parser_omp_clause_num_teams): Parse optional
244         lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
245         Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
246         OMP_CLAUSE_NUM_TEAMS_EXPR.
247         (cp_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
248         combined target teams even lower-bound expression.
249         * semantics.c (finish_omp_clauses): Handle
250         OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR of OMP_CLAUSE_NUM_TEAMS clause.
251         * pt.c (tsubst_omp_clauses): Likewise.
252         (tsubst_expr): For OMP_CLAUSE_NUM_TEAMS evaluate before
253         combined target teams even lower-bound expression.
255 2021-11-09  Marek Polacek  <polacek@redhat.com>
257         * class.c (default_init_uninitialized_part): Use
258         next_initializable_field.
259         * method.c (walk_field_subobs): Skip unnamed bit-fields.
261 2021-11-09  Jakub Jelinek  <jakub@redhat.com>
263         PR c++/103114
264         * parser.c (cp_parser_userdef_numeric_literal): Use fold_build2
265         with COMPLEX_EXPR arg instead of build_complex, use build_zero_cst
266         instead of fold_convert from integer_zero_node.
268 2021-11-09  Patrick Palka  <ppalka@redhat.com>
270         PR c++/98394
271         PR c++/85846
272         * parser.c (cp_parser_placeholder_type_specifier): Declare
273         static.  Don't override tentative to false when tmpl is a
274         concept-id with empty argument list.  Don't emit a "does not
275         constrain a type" error when tentative.
277 2021-11-09  Patrick Palka  <ppalka@redhat.com>
279         PR c++/100652
280         * pt.c (push_template_decl): Check for bare parameter packs in
281         the argument list of a variable template partial specialization.
283 2021-11-09  Aldy Hernandez  <aldyh@redhat.com>
285         * ptree.c (cxx_print_xnode): Add more space to pfx array.
287 2021-11-04  Jason Merrill  <jason@redhat.com>
289         * call.c (build_array_conv): Use range-for.
290         (build_complex_conv): Likewise.
291         * constexpr.c (clear_no_implicit_zero)
292         (reduced_constant_expression_p): Likewise.
293         * decl.c (cp_complete_array_type): Likewise.
294         * decl2.c (mark_vtable_entries): Likewise.
295         * pt.c (iterative_hash_template_arg):
296         (invalid_tparm_referent_p, unify)
297         (type_dependent_expression_p): Likewise.
298         * typeck.c (build_ptrmemfunc_access_expr): Likewise.
300 2021-11-03  Joseph Myers  <joseph@codesourcery.com>
302         PR c/103031
303         * cvt.c (convert_init): New function.
305 2021-11-02  Richard Sandiford  <richard.sandiford@arm.com>
307         * decl.c: Include langhooks-def.h.
308         (cxx_simulate_record_decl): New function.
309         * cp-objcp-common.h (cxx_simulate_record_decl): Declare.
310         (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
312 2021-10-29  Jakub Jelinek  <jakub@redhat.com>
314         PR c++/102820
315         * semantics.c (maybe_zero_constructor_nelts): New function.
316         (finish_compound_literal): Implement DR2351 - void{}.
317         If type is cv void and compound_literal has no elements, return
318         void_node.  If type is cv void and compound_literal might have no
319         elements after expansion, handle it like other dependent compound
320         literals.
322 2021-10-28  Patrick Palka  <ppalka@redhat.com>
324         PR c++/102933
325         * parser.c (cp_parser_simple_type_specifier): Adjust diagnostic
326         for using auto in parameter declaration.
327         * pt.c (extract_autos_r): Ignore CTAD placeholders.
328         (extract_autos): Use range-based for.
329         (do_auto_deduction): Use extract_autos only for the concepts TS
330         and not also for standard concepts.
331         (type_uses_auto): Likewise with for_each_template_parm.
332         (check_auto_in_tmpl_args): Just return false outside of the
333         concepts TS.  Simplify.
335 2021-10-28  Patrick Palka  <ppalka@redhat.com>
337         PR c++/102780
338         * constexpr.c (potential_constant_expression_1) <case TRUTH_*_EXPR>:
339         When tf_error isn't set, preemptively check potentiality of the
340         second operand before performing trial evaluation of the first
341         operand.
342         (potential_constant_expression_1): When tf_error is set, first check
343         potentiality quietly and return true if successful, otherwise
344         proceed noisily to give errors.
346 2021-10-27  Jakub Jelinek  <jakub@redhat.com>
348         PR c++/102854
349         * semantics.c (handle_omp_for_class_iterator,
350         finish_omp_for): Adjust c_omp_check_loop_iv_exprs caller.
352 2021-10-27  Jakub Jelinek  <jakub@redhat.com>
354         PR c++/102753
355         * constexpr.c (cxx_eval_outermost_constant_expr): Perform
356         find_immediate_fndecl discovery if is_consteval or
357         in_immediate_context () rather than if is_consteval, t != r
358         and not in immediate function's body.
360 2021-10-27  Jakub Jelinek  <jakub@redhat.com>
362         PR c++/102753
363         * cp-tree.h (saved_scope): Document that consteval_if_p member
364         is also set while processing immediate invocation.
365         (in_immediate_context): Declare.
366         * call.c (in_immediate_context): New function.
367         (immediate_invocation_p): Use it.
368         (struct in_consteval_if_p_temp_override): New class.
369         (build_over_call): Temporarily set in_consteval_if_p for processing
370         immediate invocation arguments.
371         * typeck.c (cp_build_addr_expr_1): Diagnose taking address of
372         an immediate method.  Use t instead of TREE_OPERAND (arg, 1).
373         Use in_immediate_context function.
374         * constexpr.c (find_immediate_fndecl): Handle PTRMEM_CST
375         which refers to immediate function decl.
377 2021-10-26  Marek Polacek  <polacek@redhat.com>
379         PR c++/102617
380         * parser.c (cp_parser_for): Maybe call cp_parser_init_statement
381         twice.  Warn about range-based for loops with initializer here.
382         (cp_parser_init_statement): Don't duplicate code.  Allow
383         alias-declaration in init-statement.
385 2021-10-22  Eric Gallager  <egallager@gcc.gnu.org>
387         PR other/102663
388         * Make-lang.in: Add dummy c++.install-dvi target.
390 2021-10-20  Jason Merrill  <jason@redhat.com>
392         * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
393         Pass true for declarator_p.
394         (cp_parser_nested_name_specifier_opt): Only look through
395         TYPENAME_TYPE if check_dependency_p is false.
397 2021-10-20  Jakub Jelinek  <jakub@redhat.com>
399         PR c++/102642
400         * name-lookup.c (push_local_extern_decl_alias): Don't call
401         set_decl_tls_model on error_mark_node.
402         * decl.c (make_rtl_for_nonlocal_decl): Don't call
403         set_user_assembler_name on error_mark_node.
404         * parser.c (cp_parser_oacc_declare): Ignore DECL_LOCAL_DECL_ALIAS
405         if it is error_mark_node.
406         (cp_parser_omp_declare_target): Likewise.
408 2021-10-19  Jakub Jelinek  <jakub@redhat.com>
410         PR c++/102786
411         * constexpr.c (cxx_eval_constant_expression): Don't reject
412         INTEGER_CSTs with type POINTER_TYPE to METHOD_TYPE.
414 2021-10-15  Jason Merrill  <jason@redhat.com>
416         PR c++/51851
417         PR c++/101402
418         PR c++/102033
419         PR c++/102034
420         PR c++/102039
421         PR c++/102044
422         * pt.c (determine_specialization): Remove redundant code.
423         (fn_type_unification): Check for mismatched length.
424         (type_unification_real): Ignore terminal void.
425         (get_bindings): Don't stop at void_list_node.
426         * class.c (resolve_address_of_overloaded_function): Likewise.
428 2021-10-15  Jason Merrill  <jason@redhat.com>
430         * constexpr.c (cxx_bind_parameters_in_call): Replace
431         new_call parameter with fun.
432         (cxx_eval_call_expression): Call it before instantiation.
433         (cxx_eval_outermost_constant_expr): Only instantiate fns
434         when manifestly_const_eval.
435         * typeck2.c (check_narrowing): This context is manifestly
436         constant-evaluated.
438 2021-10-14  Kwok Cheung Yeung  <kcy@codesourcery.com>
440         * decl.c (omp_declare_variant_finalize_one): Change call from
441         c_omp_mark_declare_variant to omp_mark_declare_variant.
442         * parser.c (cp_finish_omp_declare_variant): Change call from
443         c_omp_check_context_selector to omp_check_context_selector.
445 2021-10-09  Jakub Jelinek  <jakub@redhat.com>
447         * parser.c (cp_parser_omp_structured_block): Remove disallow_omp_attrs
448         argument.
449         (cp_parser_omp_structured_block_sequence): New function.
450         (cp_parser_omp_scan_loop_body): Use it.
451         (cp_parser_omp_sections_scope): Likewise.
453 2021-10-08  Martin Liska  <mliska@suse.cz>
455         * constexpr.c (maybe_warn_about_constant_value): Use new macro
456         OPTION_SET_P.
457         * decl.c (redeclaration_error_message): Likewise.
458         (cxx_init_decl_processing): Likewise.
460 2021-10-08  Jakub Jelinek  <jakub@redhat.com>
462         PR c++/102640
463         * parser.c (handle_omp_declare_target_clause): New function.
464         (cp_parser_omp_declare_target): Use it.
466 2021-10-07  Patrick Palka  <ppalka@redhat.com>
468         PR c++/61355
469         * pt.c (convert_template_argument): Perform array/function to
470         pointer conversion on the substituted type of an NTTP.
472 2021-10-07  Patrick Palka  <ppalka@redhat.com>
474         PR c++/99904
475         * pt.c (is_compatible_template_arg): Set processing_template_decl
476         around tsubst_constraint_info.
478 2021-10-07  Jonathan Wakely  <jwakely@redhat.com>
480         PR c++/102482
481         * init.c (maybe_warn_list_ctor): Do not warn for a reference to
482         a non-const std::initializer_list.
484 2021-10-06  Jakub Jelinek  <jakub@redhat.com>
486         PR c++/102612
487         * parser.c (cp_parser_jump_statement): Implement C++23 P2242R3.
488         Allow goto expressions in constexpr function bodies for C++23.
489         Adjust error message for older standards to mention it.
490         * decl.c (start_decl): Allow static and thread_local declarations
491         in constexpr function bodies for C++23.  Adjust error message for
492         older standards to mention it.
493         * constexpr.c (ensure_literal_type_for_constexpr_object): Allow
494         declarations of variables with non-literal type in constexpr function
495         bodies for C++23.  Adjust error message for older standards to mention
496         it.
497         (cxx_eval_constant_expression) <case DECL_EXPR>: Diagnose declarations
498         of initialization of static or thread_local vars.
499         (cxx_eval_constant_expression) <case GOTO_EXPR>: Diagnose goto
500         statements for C++23.
501         (potential_constant_expression_1) <case DECL_EXPR>: Swap the
502         CP_DECL_THREAD_LOCAL_P and TREE_STATIC checks.
503         (potential_constant_expression_1) <case LABEL_EXPR>: Allow labels for
504         C++23.  Adjust error message for older standards to mention it.
506 2021-10-06  Jakub Jelinek  <jakub@redhat.com>
507             Jason Merrill  <jason@redhat.com>
509         PR c++/98712
510         PR c++/102490
511         * cp-tree.h (maybe_synthesize_method): Declare.
512         * method.c (genericize_spaceship): Use
513         LOOKUP_NORMAL | LOOKUP_NONVIRTUAL | LOOKUP_DEFAULTED instead of
514         LOOKUP_NORMAL for flags.
515         (comp_info): Remove defining member.  Add complain, code, retcat.
516         (comp_info::comp_info): Adjust.
517         (do_one_comp): Split out from build_comparison_op.   Use
518         LOOKUP_NORMAL | LOOKUP_NONVIRTUAL | LOOKUP_DEFAULTED instead of
519         LOOKUP_NORMAL for flags.
520         (build_comparison_op): Add defining argument. Adjust comp_info
521         construction.  Use defining instead of info.defining.  Assert that
522         if defining, ctype is a complete type.  Walk base binfos.
523         (synthesize_method, maybe_explain_implicit_delete,
524         explain_implicit_non_constexpr): Adjust build_comparison_op callers.
525         (maybe_synthesize_method): New function.
526         * class.c (check_bases_and_members): Don't call defaulted_late_check
527         for sfk_comparison.
528         (finish_struct_1): Call it here instead after class has been
529         completed.
530         * pt.c (maybe_instantiate_noexcept): Call maybe_synthesize_method
531         instead of synthesize_method.
533 2021-10-05  Jakub Jelinek  <jakub@redhat.com>
535         PR c++/102548
536         * tree.c (apply_identity_attributes): Fix handling of the
537         case where an attribute in the list doesn't affect type
538         identity but some attribute before it does.
540 2021-10-05  Patrick Palka  <ppalka@redhat.com>
542         PR c++/102547
543         * constexpr.c (potential_constant_expression_1): Handle
544         NONTYPE_ARGUMENT_PACK.
546 2021-10-05  Patrick Palka  <ppalka@redhat.com>
548         PR c++/98930
549         * pt.c (has_value_dependent_address): Return true for a static
550         local variable from a function template.
552 2021-10-04  Marek Polacek  <polacek@redhat.com>
554         PR c++/97573
555         * typeck.c (cp_build_binary_op): Call do_warn_array_compare.
557 2021-10-03  Iain Sandoe  <iain@sandoe.co.uk>
559         PR c++/101765
560         * coroutines.cc (register_local_var_uses): Emit a sorry if
561         we encounter a VLA in the coroutine local variables.
563 2021-10-03  Iain Sandoe  <iain@sandoe.co.uk>
565         PR c++/99710
566         * coroutines.cc (await_statement_walker): Report an error if
567         an await expression is found in a handler body.
569 2021-10-03  John Eivind Helset  <jehelset@gmail.com>
571         PR c++/100673
572         * coroutines.cc (build_co_await): Guard against NULL
573         await_suspend types.
575 2021-10-03  Iain Sandoe  <iain@sandoe.co.uk>
577         PR c++/101133
578         * coroutines.cc (build_co_await): Mark co_await_expr trees
579         with TREE_SIDE_EFFECTS, also mark any containing expression.
580         (finish_co_await_expr): Mark type-dependent co_await_expr
581         trees with TREE_SIDE_EFFECTS.
583 2021-10-03  Iain Sandoe  <iain@sandoe.co.uk>
585         PR c++/99575
586         * coroutines.cc (build_co_await): Strip NOPs from
587         candidate awaiter expressions before testing to see
588         if they need a temporary.
590 2021-10-01  Martin Sebor  <msebor@redhat.com>
592         PR c/102103
593         * typeck.c (warn_for_null_address): Enhance.
594         (cp_build_binary_op): Call it also for member pointers.
596 2021-10-01  qingzhe huang  <nickhuang99@hotmail.com>
598         PR c++/101783
599         * tree.c (cp_build_qualified_type_real): Exclude typedef from
600         error.
602 2021-10-01  Jakub Jelinek  <jakub@redhat.com>
603             Richard Biener  <rguenther@suse.de>
605         PR sanitizer/102515
606         * typeck.c (cp_build_binary_op): Call ubsan_instrument_division
607         for division even for SANITIZE_SI_OVERFLOW.
609 2021-10-01  Jakub Jelinek  <jakub@redhat.com>
611         * parser.c (cp_parser_omp_clause_order): Set
612         OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
614 2021-10-01  Jakub Jelinek  <jakub@redhat.com>
616         PR c++/102496
617         * name-lookup.c (push_local_extern_decl_alias): Return early even for
618         tls vars with non-dependent type when processing_template_decl.  For
619         CP_DECL_THREAD_LOCAL_P vars call set_decl_tls_model on alias.
621 2021-09-30  Patrick Palka  <ppalka@redhat.com>
623         PR c++/102535
624         * method.c (is_xible_helper): Don't exit early for multi-arg
625         ctors in C++20.
627 2021-09-30  Patrick Palka  <ppalka@redhat.com>
629         * parser.c (cp_parser_trait_expr): Call nreverse on the reversed
630         list of trailing arguments.
632 2021-09-30  Patrick Palka  <ppalka@redhat.com>
634         PR c++/95567
635         * method.c (build_comparison_op): Skip DECL_VIRTUAL_P fields.
637 2021-09-28  Patrick Palka  <ppalka@redhat.com>
639         PR c++/99909
640         * pt.c (coerce_template_template_parms): Keep
641         processing_template_decl set around the call to unify as well.
643 2021-09-28  Iain Sandoe  <iain@sandoe.co.uk>
645         PR c++/102454
646         * coroutines.cc (analyze_fn_parms): Clean up synthetic names for
647         unnamed function params.
648         (morph_fn_to_coro): Do not try to set a guard variable for param
649         DTORs in the ramp, unless we have exceptions active.
651 2021-09-27  Patrick Palka  <ppalka@redhat.com>
653         PR c++/102479
654         * pt.c (rewrite_template_parm): Handle single-level tsubst_args.
655         Avoid a tree cycle when assigning the DECL_TEMPLATE_PARMS for a
656         rewritten ttp.
657         (alias_ctad_tweaks): Set current_template_parms accordingly.
659 2021-09-23  Michel Morin  <mimomorin@gmail.com>
661         * parser.c (cp_keyword_starts_decl_specifier_p): Do not
662         handle RID_ATTRIBUTE.
663         (cp_parser_constructor_declarator_p): Remove now-redundant
664         checks.
665         (cp_parser_lambda_declarator_opt): Likewise.
667 2021-09-23  Michel Morin  <mimomorin@gmail.com>
669         PR c++/77565
670         * parser.c (cp_keyword_starts_decl_specifier_p): Handle more
671         decl-specifiers (typedef/inline/cv/explicit/virtual/friend).
673 2021-09-23  Patrick Palka  <ppalka@redhat.com>
675         * ptree.c (cxx_print_decl): Dump the DECL_TEMPLATE_RESULT of
676         a TEMPLATE_DECL.  Dump the DECL_TEMPLATE_INFO rather than just
677         printing its pointer value.
679 2021-09-23  Jakub Jelinek  <jakub@redhat.com>
681         PR c++/102413
682         * parser.c (cp_parser_omp_directive_args): Diagnose if omp::directive
683         is not followed by a balanced token sequence starting with open paren.
685 2021-09-22  Patrick Palka  <ppalka@redhat.com>
687         DR 2446
688         PR c++/102412
689         * constexpr.c (cxx_eval_constant_expression)
690         <case TEMPLATE_ID_EXPR>: Check value_dependent_expression_p
691         instead of processing_template_decl.
692         * pt.c (value_dependent_expression_p) <case TEMPLATE_ID_EXPR>:
693         Return true only if any_dependent_template_arguments_p.
694         (instantiation_dependent_r) <case CALL_EXPR>: Remove this case.
695         <case TEMPLATE_ID_EXPR>: Likewise.
697 2021-09-22  Jakub Jelinek  <jakub@redhat.com>
699         * parser.c (cp_parser_omp_clause_allocate): Parse allocate clause
700         modifiers.
701         * semantics.c (finish_omp_clauses) <OMP_CLAUSE_ALLOCATE>: Perform
702         semantic analysis of OMP_CLAUSE_ALLOCATE_ALIGN.
703         * pt.c (tsubst_omp_clauses) <case OMP_CLAUSE_ALLOCATE>: Handle
704         also OMP_CLAUSE_ALLOCATE_ALIGN.
706 2021-09-22  Barrett Adair  <barrettellisadair@gmail.com>
708         * pt.c (find_parm_usage_r): New walk_tree callback to find func
709         parms.
710         (any_template_arguments_need_structural_equality_p): New special
711         case.
713 2021-09-21  wangpc  <pc.wang@linux.alibaba.com>
715         * decl.c (start_decl_1): Move verify_type_context to ...
716         (cp_finish_decl): ... to here.
718 2021-09-18  Jakub Jelinek  <jakub@redhat.com>
720         * parser.c (cp_parser_omp_clause_order): Parse unconstrained
721         and reproducible modifiers.
722         (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
724 2021-09-18  Jakub Jelinek  <jakub@redhat.com>
726         * parser.c (cp_parser_omp_clause_default): Handle private and
727         firstprivate arguments, adjust diagnostics on unknown argument.
728         * cp-gimplify.c (cxx_omp_finish_clause): Handle OMP_CLAUSE_PRIVATE.
730 2021-09-18  Jason Merrill  <jason@redhat.com>
732         * cp-tree.h (dependentish_scope_p): Declare.
733         * pt.c (dependentish_scope_p): New.
734         * parser.c (cp_parser_lookup_name): Return a TYPENAME_TYPE
735         for lookup of a type in a dependent object.
736         (cp_parser_template_id): Handle TYPENAME_TYPE.
737         (cp_parser_template_name): If we're looking for a type,
738         a name followed by < names a template.
740 2021-09-18  Jason Merrill  <jason@redhat.com>
742         * cp-tree.h: Fix typo in LANG_FLAG list.
744 2021-09-17  Jakub Jelinek  <jakub@redhat.com>
746         * cp-tree.h (finish_omp_atomic): Add r and weak arguments.
747         * parser.c (cp_parser_omp_atomic): Update function comment for
748         OpenMP 5.1 atomics, parse OpenMP 5.1 atomics and fail, compare and
749         weak clauses.
750         * semantics.c (finish_omp_atomic): Add r and weak arguments, handle
751         them, handle COND_EXPRs.
752         * pt.c (tsubst_expr): Adjust for COND_EXPR forms that
753         finish_omp_atomic can now produce.
755 2021-09-16  Patrick Palka  <ppalka@redhat.com>
757         PR c++/98486
758         * constraint.cc (get_normalized_constraints_from_decl): Always
759         look up constraints using the most general template.
760         * decl.c (grokdeclarator): Set constraints on a static data
761         member template.
762         * pt.c (determine_specialization): Check constraints on a
763         variable template.
765 2021-09-16  Iain Sandoe  <iain@sandoe.co.uk>
767         * coroutines.cc (await_statement_walker): Code cleanups.
769 2021-09-16  Jason Merrill  <jason@redhat.com>
771         * constexpr.c (cxx_eval_outermost_constant_expr): Use
772         protected_set_expr_location.
774 2021-09-15  Patrick Palka  <ppalka@redhat.com>
776         PR c++/101904
777         * call.c (build_user_type_conversion_1): Add tf_conv to complain.
778         (add_candidates): When in a SFINAE context, instead of adding a
779         candidate to bad_fns just mark it unviable.
781 2021-09-15  Jason Merrill  <jason@redhat.com>
783         * cp-tree.h (parsing_function_declarator): Declare.
784         * name-lookup.c (set_decl_context_in_fn): Use it.
785         * parser.c (cp_parser_direct_declarator): Use it.
786         (parsing_function_declarator): New.
788 2021-09-15  Jakub Jelinek  <jakub@redhat.com>
790         PR c++/88578
791         PR c++/102295
792         * typeck2.c (split_nonconstant_init_1): Don't throw away empty
793         initializers of flexible array members if they have non-zero type
794         size.
796 2021-09-15  Patrick Palka  <ppalka@redhat.com>
798         PR c++/102050
799         * decl.c (grok_special_member_properties): Set
800         TYPE_HAS_COPY_CTOR, TYPE_HAS_DEFAULT_CONSTRUCTOR
801         and TYPE_HAS_LIST_CTOR independently from each other.
803 2021-09-15  Jason Merrill  <jason@redhat.com>
805         * decl.c (cxx_init_decl_processing): Only warn about odd
806         interference sizes if they were specified with --param.
808 2021-09-15  Jason Merrill  <jason@redhat.com>
810         PR c++/48396
811         * cp-tree.h (enum cp_tree_index): Remove CPTI_TYPE_INFO_PTR_TYPE.
812         (type_info_ptr_type): Remove.
813         * rtti.c (init_rtti_processing): Don't predeclare std::type_info.
814         (typeid_ok_p): Check for null const_type_info_type_node.
815         (type_info_ptr_type, get_void_tinfo_ptr): New fns.
816         (get_tinfo_decl_dynamic, get_tinfo_ptr): Use them.
817         (ptr_initializer, ptm_initializer, get_pseudo_ti_init): Use them.
818         (get_tinfo_desc): Use const_ptr_type_node.
820 2021-09-15  Jason Merrill  <jason@redhat.com>
822         * parser.c (cp_parser_template_name): Move object type.
823         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
825 2021-09-15  Jason Merrill  <jason@redhat.com>
827         * parser.c (cp_parser_unqualified_id): Only complain about ~A<T> in
828         a declarator.
830 2021-09-14  Iain Sandoe  <iain@sandoe.co.uk>
832         * coroutines.cc (struct param_info): Add copy_var.
833         (build_actor_fn): Use simplified param references.
834         (register_param_uses): Likewise.
835         (rewrite_param_uses): Likewise.
836         (analyze_fn_parms): New function.
837         (coro_rewrite_function_body): Add proxies for the fn
838         parameters to the outer bind scope of the rewritten code.
839         (morph_fn_to_coro): Use simplified version of param ref.
841 2021-09-14  Iain Sandoe  <iain@sandoe.co.uk>
843         * coroutines.cc (coro_resume_fn_id, coro_destroy_fn_id,
844         coro_promise_id, coro_frame_needs_free_id, coro_resume_index_id,
845         coro_self_handle_id, coro_actor_continue_id,
846         coro_frame_i_a_r_c_id): New.
847         (coro_init_identifiers): Initialize new name identifiers.
848         (coro_promise_type_found_p): Use pre-built identifiers.
849         (struct await_xform_data): Remove unused fields.
850         (transform_await_expr): Delete code that is now unused.
851         (build_actor_fn): Simplify interface, use pre-built identifiers and
852         remove transforms that are no longer needed.
853         (build_destroy_fn): Use revised field names.
854         (register_local_var_uses): Use pre-built identifiers.
855         (coro_rewrite_function_body): Simplify interface, use pre-built
856         identifiers.  Generate proxy vars in the outer bind expr scope for the
857         implementation state that we wish to expose.
858         (morph_fn_to_coro): Adjust comments for new variable names, use pre-
859         built identifiers.  Remove unused code to generate frame entries for
860         the implementation state.  Adjust call for build_actor_fn.
862 2021-09-14  Patrick Palka  <ppalka@redhat.com>
864         PR c++/102163
865         * constexpr.c (cxx_eval_call_expression): After evaluating a
866         subobject constructor call for an empty union member, produce a
867         side effect that makes sure the member gets activated.
869 2021-09-14  Jakub Jelinek  <jakub@redhat.com>
871         PR c++/102295
872         * decl.c (layout_var_decl): For aggregates ending with a flexible
873         array member, add the size of the initializer for that member to
874         DECL_SIZE and DECL_SIZE_UNIT.
876 2021-09-14  Jakub Jelinek  <jakub@redhat.com>
878         PR c++/102305
879         * method.c (is_xible_helper): Call complete_type on to.
881 2021-09-14  Jason Merrill  <jason@redhat.com>
883         * decl.c (cxx_init_decl_processing): Don't warn if L1 cache line
884         size is smaller than maxalign.
886 2021-09-13  Jason Merrill  <jason@redhat.com>
888         * constexpr.c (maybe_warn_about_constant_value):
889         Complain about std::hardware_destructive_interference_size.
890         (cxx_eval_constant_expression): Call it.
891         * decl.c (cxx_init_decl_processing): Check
892         --param *-interference-size values.
894 2021-09-13  Patrick Palka  <ppalka@redhat.com>
896         PR c++/101764
897         * cp-tree.h (PACK_EXPANSION_FORCE_EXTRA_ARGS_P): New accessor
898         macro.
899         * pt.c (has_extra_args_mechanism_p): New function.
900         (find_parameter_pack_data::found_extra_args_tree_p): New data
901         member.
902         (find_parameter_packs_r): Set ppd->found_extra_args_tree_p
903         appropriately.
904         (make_pack_expansion): Set PACK_EXPANSION_FORCE_EXTRA_ARGS_P if
905         ppd.found_extra_args_tree_p.
906         (use_pack_expansion_extra_args_p): Return true if there were
907         unsubstituted packs and PACK_EXPANSION_FORCE_EXTRA_ARGS_P.
908         (tsubst_pack_expansion): Pass the pack expansion to
909         use_pack_expansion_extra_args_p.
911 2021-09-10  Jakub Jelinek  <jakub@redhat.com>
913         * parser.c (cp_parser_omp_atomic): Allow acq_rel on atomic read/write
914         and acq_rel/acquire clauses on update.
915         * semantics.c (finish_omp_atomic): Adjust c_finish_omp_atomic caller.
917 2021-09-08  Richard Biener  <rguenther@suse.de>
919         PR c++/102228
920         * cp-tree.h (ANON_AGGR_TYPE_FIELD): New define.
921         * decl.c (fixup_anonymous_aggr): Wipe RTTI info put in
922         place on invalid code.
923         * decl2.c (reset_type_linkage): Guard CLASSTYPE_TYPEINFO_VAR
924         access.
925         * module.cc (trees_in::read_class_def): Likewise.  Reconstruct
926         ANON_AGGR_TYPE_FIELD.
927         * semantics.c (finish_member_declaration): Populate
928         ANON_AGGR_TYPE_FIELD for anon aggregate typed members.
929         * typeck.c (lookup_anon_field): Remove DFS search and return
930         ANON_AGGR_TYPE_FIELD directly.
932 2021-09-07  Jakub Jelinek  <jakub@redhat.com>
934         PR c++/100495
935         * constexpr.c (maybe_save_constexpr_fundef): Save body even for
936         constexpr deleting dtors.
937         (cxx_eval_call_expression): Don't use DECL_CLONED_FUNCTION for
938         deleting dtors.
940 2021-09-07  Marcel Vollweiler  <marcel@codesourcery.com>
942         * parser.c (cp_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
943         directive.
944         * semantics.c (finish_omp_flush): Handle MEMMODEL_SEQ_CST.
946 2021-09-03  Iain Sandoe  <iain@sandoe.co.uk>
948         * coroutines.cc (register_local_var_uses): Do not mangle
949         frame entries for the outermost scope.  Record the outer
950         scope as nesting depth 0.
952 2021-09-03  Iain Sandoe  <iain@sandoe.co.uk>
954         * coroutines.cc (coro_build_artificial_var): New.
955         (build_actor_fn): Use var builder, rename vars to use
956         implementation namespace.
957         (coro_rewrite_function_body): Likewise.
958         (morph_fn_to_coro): Likewise.
960 2021-09-03  Iain Sandoe  <iain@sandoe.co.uk>
962         * coroutines.cc (transform_local_var_uses): Record
963         frame offset expressions as DECL_VALUE_EXPRs instead of
964         rewriting them.
966 2021-09-03  Patrick Palka  <ppalka@redhat.com>
968         PR c++/101904
969         * call.c (build_this_conversion): New function, split out from
970         add_function_candidate.
971         (add_function_candidate): New parameter shortcut_bad_convs.
972         Document it.  Use build_this_conversion.  Stop at the first bad
973         argument conversion when shortcut_bad_convs is true.
974         (add_template_candidate_real): New parameter shortcut_bad_convs.
975         Use build_this_conversion to check the 'this' conversion before
976         attempting deduction.  When the rejection reason code is
977         rr_bad_arg_conversion, pass -1 instead of 0 as the viable
978         parameter to add_candidate.  Pass 'convs' to add_candidate.
979         (add_template_candidate): New parameter shortcut_bad_convs.
980         (add_template_conv_candidate): Pass false as shortcut_bad_convs
981         to add_template_candidate_real.
982         (add_candidates): Prefer to shortcut bad conversions during
983         overload resolution under the assumption that we'll eventually
984         see a strictly viable candidate.  If this assumption turns out
985         to be false, re-process the non-strictly viable candidates
986         without shortcutting those bad conversions.
988 2021-09-03  Jason Merrill  <jason@redhat.com>
990         * pt.c (limit_bad_template_recursion): Suppress -Wunused for decls
991         we decide not to instantiate.
993 2021-09-03  Jakub Jelinek  <jakub@redhat.com>
995         PR target/102024
996         * class.c (build_base_field): Use SET_DECL_FIELD_ABI_IGNORED
997         instead of writing to DECL_FIELD_ABI_IGNORED.
998         (layout_class_type): Likewise.  In the place where zero-width
999         bitfields used to be removed, use
1000         SET_DECL_FIELD_CXX_ZERO_WIDTH_BIT_FIELD on those fields instead.
1002 2021-09-01  Iain Sandoe  <iain@sandoe.co.uk>
1004         * call.c (build_over_call): Handle unavailable state in addition to
1005         deprecation.
1006         * class.c (type_build_ctor_call): Likewise.
1007         (type_build_dtor_call): Likewise.
1008         * cp-tree.h: Rename cp_warn_deprecated_use to
1009         cp_handle_deprecated_or_unavailable.
1010         * decl.c (duplicate_decls): Merge unavailability.
1011         (grokdeclarator): Handle unavailability in addition to deprecation.
1012         (type_is_unavailable): New.
1013         (grokparms): Handle unavailability in addition to deprecation.
1014         * decl.h (enum deprecated_states): Add
1015         UNAVAILABLE_DEPRECATED_SUPPRESS.
1016         * decl2.c (cplus_decl_attributes): Propagate unavailability to
1017         templates.
1018         (cp_warn_deprecated_use): Rename to ...
1019         (cp_handle_deprecated_or_unavailable): ... this and amend to handle
1020         the unavailable case. It remains a warning in the case of deprecation
1021         but becomes an error in the case of unavailability.
1022         (cp_warn_deprecated_use_scopes): Handle unavailability.
1023         (mark_used): Likewise.
1024         * parser.c (cp_parser_template_name): Likewise.
1025         (cp_parser_template_argument): Likewise.
1026         (cp_parser_parameter_declaration_list): Likewise.
1027         * typeck.c (build_class_member_access_expr): Likewise.
1028         (finish_class_member_access_expr): Likewise.
1029         * typeck2.c (build_functional_cast_1): Likewise.
1031 2021-09-01  Iain Sandoe  <iain@sandoe.co.uk>
1033         * coroutines.cc (build_actor_fn): Add begin/finish clauses
1034         to the initial test in the actor function.
1036 2021-09-01  Iain Sandoe  <iain@sandoe.co.uk>
1038         * coroutines.cc (await_statement_walker): Use build_stmt and
1039         add_stmt instead of build1 and finish_expr_stmt.
1041 2021-08-31  Jason Merrill  <jason@redhat.com>
1043         * coroutines.cc (flatten_await_stmt): Fix copyo.
1044         * decl.c (reshape_init_class): Simplify.
1045         * module.cc (module_state::read_language): Add null check.
1046         * parser.c (build_range_temp): Avoid type_uses_auto.
1047         (cp_parser_class_specifier_1): Add null check.
1049 2021-08-31  Patrick Palka  <ppalka@redhat.com>
1051         PR c++/12672
1052         * call.c (rejection_reason::call_varargs_p): Rename this
1053         previously unused member to ...
1054         (rejection_reason::least_p): ... this.
1055         (arity_rejection): Add least_p parameter.
1056         (add_template_candidate_real): When there are explicit
1057         template arguments, check that the arity of the call agrees with
1058         the arity of the function before attempting deduction.
1059         (print_arity_information): Add least_p parameter.
1060         (print_z_candidate): Adjust call to print_arity_information.
1062 2021-08-31  Martin Sebor  <msebor@redhat.com>
1064         * parser.c (cp_parser_selection_statement): Use direct initialization
1065         instead of copy.
1067 2021-08-31  Jason Merrill  <jason@redhat.com>
1069         * constexpr.c (explain_invalid_constexpr_fn): Use iloc_sentinel.
1071 2021-08-31  Jason Merrill  <jason@redhat.com>
1073         PR c++/92193
1074         * cp-tree.h (FNDECL_MANIFESTLY_CONST_EVALUATED): New.
1075         * constexpr.c (cxx_eval_call_expression): Set it.
1076         * pt.c (neglectable_inst_p): Check it.
1078 2021-08-31  Marcel Vollweiler  <marcel@codesourcery.com>
1080         * parser.c (cp_parser_omp_clause_device): Parse device-modifiers 'device_num'
1081         and 'ancestor' in 'target device' clauses.
1082         * semantics.c (finish_omp_clauses): Error handling. Constant device ids must
1083         evaluate to '1' if 'ancestor' is used.
1085 2021-08-30  Jason Merrill  <jason@redhat.com>
1087         PR c++/96286
1088         * cp-tree.h (struct lang_type): Add erroneous bit-field.
1089         (CLASSTYPE_ERRONEOUS): New.
1090         * pt.c (limit_bad_template_recursion): Check it.
1091         (instantiate_class_template_1): Set it.
1093 2021-08-30  Jason Merrill  <jason@redhat.com>
1095         * constexpr.c (cxx_eval_outermost_constant_expr): Copy
1096         expr location to result.
1098 2021-08-30  Jason Merrill  <jason@redhat.com>
1100         PR c++/101460
1101         * cp-tree.h (cxx_constant_value_sfinae): Declare.
1102         * constexpr.c (cxx_constant_value_sfinae): New.
1103         * pt.c (fold_targs_r, maybe_fold_fn_template_args): New.
1104         (tsubst_copy_and_build) [CALL_EXPR]: Call
1105         maybe_fold_fn_template_args.
1107 2021-08-30  Jason Merrill  <jason@redhat.com>
1109         * parser.c (cp_parser_simple_requirement): Warn about missing
1110         requires.
1112 2021-08-27  Jason Merrill  <jason@redhat.com>
1114         * typeck2.c (build_x_arrow): Do set TREE_TYPE when operand is
1115         a dependent pointer.
1117 2021-08-25  Andrew Pinski  <apinski@marvell.com>
1119         PR c++/66590
1120         * cp-objcp-common.c (cxx_block_may_fallthru): Handle
1121         CLEANUP_STMT for the case which will be try/finally.
1123 2021-08-25  Jakub Jelinek  <jakub@redhat.com>
1125         PR c++/102019
1126         * init.c (build_value_init_noctor): Ignore unnamed zero-width
1127         bitfields.
1129 2021-08-23  Jakub Jelinek  <jakub@redhat.com>
1131         * parser.c (cp_parser_omp_clause_num_tasks,
1132         cp_parser_omp_clause_grainsize): Parse the optional strict: modifier.
1134 2021-08-20  Jakub Jelinek  <jakub@redhat.com>
1136         * parser.c (cp_parser_handle_statement_omp_attributes): Determine if
1137         PRAGMA_OMP_ERROR directive is C_OMP_DIR_STANDALONE.
1138         (cp_parser_omp_error): New function.
1139         (cp_parser_pragma): Handle PRAGMA_OMP_ERROR.
1141 2021-08-20  Jakub Jelinek  <jakub@redhat.com>
1143         * parser.c (cp_parser_omp_clause_depend_sink): Reject spurious
1144         comma at the end of list.  Don't parse closing paren here...
1145         (cp_parser_omp_clause_depend): ... but here instead.
1147 2021-08-19  Patrick Palka  <ppalka@redhat.com>
1149         PR c++/101803
1150         * cp-tree.h (CONSTRUCTOR_IS_PAREN_INIT): Clarify comment.
1152 2021-08-19  Jakub Jelinek  <jakub@redhat.com>
1154         * parser.c (cp_parser_omp_requires): Don't call cp_lexer_nth_token_is
1155         and optionally consume token if current token is CPP_EOF,
1156         CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
1158 2021-08-19  Jakub Jelinek  <jakub@redhat.com>
1160         * parser.c (cp_parser_omp_nothing): Use cp_parser_require_pragma_eol
1161         instead of cp_parser_skip_to_pragma_eol.
1163 2021-08-18  Patrick Palka  <ppalka@redhat.com>
1165         PR c++/101344
1166         PR c++/101803
1167         * cp-tree.h (CONSTRUCTOR_BRACES_ELIDED_P): Define.
1168         * decl.c (reshape_init_r): Set it.
1169         * pt.c (collect_ctor_idx_types): Recurse into a sub-CONSTRUCTOR
1170         iff CONSTRUCTOR_BRACES_ELIDED_P.
1172 2021-08-18  Patrick Palka  <ppalka@redhat.com>
1174         PR c++/101883
1175         * pt.c (convert_template_argument): Pass LOOKUP_IMPLICIT to
1176         do_auto_deduction.
1178 2021-08-18  Jakub Jelinek  <jakub@redhat.com>
1180         * parser.c (cp_parser_omp_nothing): New function.
1181         (cp_parser_pragma): Handle PRAGMA_OMP_NOTHING.
1183 2021-08-18  Jakub Jelinek  <jakub@redhat.com>
1185         * parser.c (cp_parser_omp_ordered): Return true instead of
1186         false after emitting errors that the directive is not allowed in
1187         pragma_stmt context.
1188         (cp_parser_omp_target_update): Likewise.
1189         (cp_parser_omp_cancellation_point): Change return type from void to
1190         bool, return false if the directive should be ignored in pragma_stmt
1191         contexts.
1192         (cp_parser_omp_target_enter_data, cp_parser_omp_target_exit_data):
1193         Change return type from tree to bool, return false if the
1194         directive should be ignored in pragma_stmt contexts.
1195         (cp_parser_omp_target): Adjust callers of cp_parser_omp_target_*_data,
1196         return their result directly.
1197         (cp_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
1198         cp_parser_omp_cancellation_point returned.  Return true instead of
1199         false after emitting errors that the directive is not allowed in
1200         pragma_stmt context.
1202 2021-08-17  Jakub Jelinek  <jakub@redhat.com>
1204         PR c++/101539
1205         * cp-tree.h (enum cp_trait_kind): Add CPTK_IS_LAYOUT_COMPATIBLE.
1206         (enum cp_built_in_function): Add CP_BUILT_IN_IS_CORRESPONDING_MEMBER.
1207         (fold_builtin_is_corresponding_member, next_common_initial_seqence,
1208         layout_compatible_type_p): Declare.
1209         * parser.c (cp_parser_primary_expression): Handle
1210         RID_IS_LAYOUT_COMPATIBLE.
1211         (cp_parser_trait_expr): Likewise.
1212         * cp-objcp-common.c (names_builtin_p): Likewise.
1213         * constraint.cc (diagnose_trait_expr): Handle
1214         CPTK_IS_LAYOUT_COMPATIBLE.
1215         * decl.c (cxx_init_decl_processing): Register
1216         __builtin_is_corresponding_member builtin.
1217         * constexpr.c (cxx_eval_builtin_function_call): Handle
1218         CP_BUILT_IN_IS_CORRESPONDING_MEMBER builtin.
1219         * semantics.c (is_corresponding_member_union,
1220         is_corresponding_member_aggr, fold_builtin_is_corresponding_member):
1221         New functions.
1222         (trait_expr_value): Handle CPTK_IS_LAYOUT_COMPATIBLE.
1223         (finish_trait_expr): Likewise.
1224         * typeck.c (next_common_initial_seqence, layout_compatible_type_p):
1225         New functions.
1226         * cp-gimplify.c (cp_gimplify_expr): Fold
1227         CP_BUILT_IN_IS_CORRESPONDING_MEMBER.
1228         (cp_fold): Likewise.
1229         * tree.c (builtin_valid_in_constant_expr_p): Handle
1230         CP_BUILT_IN_IS_CORRESPONDING_MEMBER.
1231         * cxx-pretty-print.c (pp_cxx_trait_expression): Handle
1232         CPTK_IS_LAYOUT_COMPATIBLE.
1233         * class.c (remove_zero_width_bit_fields): Remove.
1234         (layout_class_type): Don't call it.
1236 2021-08-17  Jakub Jelinek  <jakub@redhat.com>
1238         * parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
1239         (cp_parser_omp_scope): New function.
1240         (cp_parser_omp_construct, cp_parser_pragma): Handle PRAGMA_OMP_SCOPE.
1241         * pt.c (tsubst_expr): Handle OMP_SCOPE.
1243 2021-08-12  Jakub Jelinek  <jakub@redhat.com>
1245         * parser.c (cp_parser_omp_clause_name): Parse filter clause name.
1246         (cp_parser_omp_clause_filter): New function.
1247         (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
1248         (OMP_MASKED_CLAUSE_MASK): Define.
1249         (cp_parser_omp_masked): New function.
1250         (cp_parser_omp_parallel): Handle parallel masked.
1251         (cp_parser_omp_construct, cp_parser_pragma): Handle PRAGMA_OMP_MASKED.
1252         * semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
1253         * pt.c (tsubst_omp_clauses): Likewise.
1254         (tsubst_expr): Handle OMP_MASKED.
1256 2021-08-12  Sergei Trofimovich  <siarheit@google.com>
1258         PR c++/101219
1259         * pt.c (tsubst_copy_and_build): Use build_ptrmemfunc_access_expr
1260         to construct ptrmemfunc expression instantiation.
1262 2021-08-12  Tobias Burnus  <tobias@codesourcery.com>
1264         * parser.c (cp_parser_omp_clause_proc_bind): Accept
1265         'primary' as alias for 'master'.
1267 2021-08-12  Jakub Jelinek  <jakub@redhat.com>
1269         * cp-tree.h (omp_declare_target_attr): New type.
1270         (struct saved_scope): Change type of omp_declare_target_attribute
1271         from int to vec<omp_declare_target_attr, va_gc> * and move it.
1272         * parser.c (cp_parser_omp_declare_target): Instead of
1273         incrementing scope_chain->omp_declare_target_attribute, push
1274         a struct containing parser->lexer->in_omp_attribute_pragma to
1275         the vector.
1276         (cp_parser_omp_end_declare_target): Instead of decrementing
1277         scope_chain->omp_declare_target_attribute, pop a structure
1278         from it.  Diagnose mismatching declare target vs.
1279         end declare target syntax.
1280         * semantics.c (finish_translation_unit): Use vec_safe_length
1281         and vec_safe_truncate on scope_chain->omp_declare_target_attributes.
1282         * decl2.c (cplus_decl_attributes): Use vec_safe_length
1283         on scope_chain->omp_declare_target_attributes.
1285 2021-08-12  Jakub Jelinek  <jakub@redhat.com>
1287         * parser.c (cp_parser_lambda_body): Add temp overrides
1288         for parser->{omp_declare_simd,oacc_routine,omp_attrs_forbidden_p}.
1289         (cp_parser_statement): Restore parser->omp_attrs_forbidden_p for
1290         cp_parser_declaration_statement.
1291         (cp_parser_default_argument): Add temp override for
1292         parser->omp_attrs_forbidden_p.
1293         (cp_parser_late_parsing_omp_declare_simd): Diagnose declare simd
1294         or declare variant in attribute syntax on a declaration immediately
1295         following an OpenMP construct in pragma syntax.
1297 2021-08-12  Jakub Jelinek  <jakub@redhat.com>
1299         PR c++/94162
1300         * method.c (cat_tag_for): Return cc_last for !CLASS_TYPE_P
1301         or for classes not in std namespace.
1303 2021-08-12  Jakub Jelinek  <jakub@redhat.com>
1305         * name-lookup.c (finish_using_directive): Diagnose omp::directive
1306         or omp::sequence attributes on using-directive.
1308 2021-08-12  Jakub Jelinek  <jakub@redhat.com>
1310         * parser.c (cp_parser_block_declaration): Call
1311         cp_parser_using_directive for C++11 attributes followed by
1312         using namespace tokens.
1313         (cp_parser_using_directive): Parse C++11 attributes at the start
1314         of the directive rather than at the end, only parse GNU attributes
1315         at the end.
1317 2021-08-12  Patrick Palka  <ppalka@redhat.com>
1319         PR c++/101663
1320         * constexpr.c (cxx_eval_store_expression): Handle the lval=true
1321         case in the early exit code path for empty stores with mismatched
1322         types.
1324 2021-08-11  Patrick Palka  <ppalka@redhat.com>
1326         PR c++/101725
1327         DR 2082
1328         * cp-tree.h (unevaluated_p): Return true for REQUIRES_EXPR.
1329         * decl.c (local_variable_p_walkfn): Don't walk into unevaluated
1330         operands.
1331         * parser.c (cp_parser_primary_expression) <case CPP_NAME>: Never
1332         reject uses of local variables in unevaluated contexts.
1333         * tree.c (cp_walk_subtrees) <case REQUIRES_EXPR>: Increment
1334         cp_unevaluated_operand.  Use cp_walk_tree directly instead of
1335         WALK_SUBTREE to avoid the goto.  Use REQUIRES_EXPR_REQS instead
1336         of TREE_OPERAND directly.
1338 2021-08-11  Jakub Jelinek  <jakub@redhat.com>
1340         PR c++/101786
1341         * decl2.c (var_defined_without_dynamic_init): Return true for
1342         DECL_DECLARED_CONSTINIT_P with complete type and trivial destructor.
1344 2021-08-11  Patrick Palka  <ppalka@redhat.com>
1346         PR c++/79501
1347         * parser.c (maybe_adjust_declarator_for_dguide): New, split
1348         out from ...
1349         (cp_parser_init_declarator): ... here.
1350         (cp_parser_member_declaration): Use it.
1352 2021-08-11  Patrick Palka  <ppalka@redhat.com>
1354         PR c++/89062
1355         * parser.c (cp_parser_parameter_declaration_list): Don't call
1356         grokdeclarator if cp_parser_error_occurred.
1357         (cp_parser_parameter_declaration): Simulate an error if we see
1358         the beginning of a CTAD form, i.e. if we see an opening brace
1359         after the decl-specifier-seq and the type is a CTAD placeholder.
1361 2021-08-10  Jakub Jelinek  <jakub@redhat.com>
1363         * parser.c (cp_parser_member_declaration): Move odsd declaration
1364         before cp_parser_using_declaration call to avoid errors with
1365         GCC 4.8 to 6.
1367 2021-08-10  Jakub Jelinek  <jakub@redhat.com>
1369         * parser.h (struct cp_omp_declare_simd_data): Remove
1370         in_omp_attribute_pragma and clauses members, add loc and attribs.
1371         (struct cp_oacc_routine_data): Remove loc member, add clauses
1372         member.
1373         * parser.c (cp_finalize_omp_declare_simd): New function.
1374         (cp_parser_handle_statement_omp_attributes): Mention in
1375         function comment the function is used also for
1376         attribute-declaration.
1377         (cp_parser_handle_directive_omp_attributes): New function.
1378         (cp_parser_statement): Don't call
1379         cp_parser_handle_statement_omp_attributes if statement doesn't
1380         have attribute-specifier-seq at the beginning at all or if
1381         if those attributes don't appertain to the statement.
1382         (cp_parser_simple_declaration): Call
1383         cp_parser_handle_directive_omp_attributes and
1384         cp_finalize_omp_declare_simd.
1385         (cp_parser_explicit_instantiation): Likewise.
1386         (cp_parser_init_declarator): Initialize prefix_attributes
1387         only after parsing declarators.
1388         (cp_parser_direct_declarator): Call
1389         cp_parser_handle_directive_omp_attributes and
1390         cp_finalize_omp_declare_simd.
1391         (cp_parser_member_declaration): Likewise.
1392         (cp_parser_single_declaration): Likewise.
1393         (cp_parser_omp_declare_simd): Don't initialize
1394         data.in_omp_attribute_pragma, instead initialize
1395         data.attribs[0] and data.attribs[1].
1396         (cp_finish_omp_declare_variant): Remove
1397         in_omp_attribute_pragma argument, instead use
1398         parser->lexer->in_omp_attribute_pragma.
1399         (cp_parser_late_parsing_omp_declare_simd): Adjust
1400         cp_finish_omp_declare_variant caller.  Handle attribute-syntax
1401         declare simd/variant.
1403 2021-08-06  Tamar Christina  <tamar.christina@arm.com>
1405         * cp-objcp-common.h (cxx_simulate_enum_decl): Pass vec<> by pointer.
1406         * decl.c (cxx_simulate_enum_decl): Likewise.
1408 2021-08-04  Jakub Jelinek  <jakub@redhat.com>
1410         PR c++/101759
1411         * parser.c (cp_parser_default_argument): Temporarily override
1412         parser->omp_declare_simd and parser->oacc_routine to NULL.
1414 2021-08-02  Patrick Palka  <ppalka@redhat.com>
1416         PR c++/100828
1417         * logic.cc (formula::formula): Use emplace_back instead of
1418         push_back.
1419         (formula::branch): Insert a copy of m_current directly after
1420         m_current instead of at the end of the list.
1421         (formula::erase): Define.
1422         (decompose_formula): Remove.
1423         (decompose_antecedents): Remove.
1424         (decompose_consequents): Remove.
1425         (derive_proofs): Remove.
1426         (max_problem_size): Remove.
1427         (diagnose_constraint_size): Remove.
1428         (subsumes_constraints_nonnull): Rewrite directly in terms of
1429         decompose_clause and derive_proof, interleaving decomposition
1430         with implication checking.  Remove limit on constraint complexity.
1431         Use formula::erase to free the current clause before moving on to
1432         the next one.
1434 2021-07-31  Jason Merrill  <jason@redhat.com>
1436         PR c++/96636
1437         * decl.c (fixup_anonymous_aggr): Clear TYPE_NEEDS_CONSTRUCTING
1438         after error.
1440 2021-07-31  Jason Merrill  <jason@redhat.com>
1442         * ptree.c (cxx_print_type) [TYPE_PACK_EXPANSION]: Also print
1443         PACK_EXPANSION_PATTERN.
1445 2021-07-31  Jakub Jelinek  <jakub@redhat.com>
1447         * parser.c (cp_parser_declaration): Handle OpenMP directives
1448         in attribute-declaration.
1450 2021-07-30  Jakub Jelinek  <jakub@redhat.com>
1452         PR c++/101539
1453         * cp-tree.h (enum cp_trait_kind): Add
1454         CPTK_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
1455         (enum cp_built_in_function): Add
1456         CP_BUILT_IN_IS_POINTER_INTERCONVERTIBLE_WITH_CLASS.
1457         (fold_builtin_is_pointer_inverconvertible_with_class): Declare.
1458         * parser.c (cp_parser_primary_expression): Handle
1459         RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
1460         (cp_parser_trait_expr): Likewise.
1461         * cp-objcp-common.c (names_builtin_p): Likewise.
1462         * constraint.cc (diagnose_trait_expr): Handle
1463         CPTK_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
1464         * decl.c (cxx_init_decl_processing): Register
1465         __builtin_is_pointer_interconvertible_with_class builtin.
1466         * constexpr.c (cxx_eval_builtin_function_call): Handle
1467         CP_BUILT_IN_IS_POINTER_INTERCONVERTIBLE_WITH_CLASS builtin.
1468         * semantics.c (pointer_interconvertible_base_of_p,
1469         first_nonstatic_data_member_p,
1470         fold_builtin_is_pointer_inverconvertible_with_class): New functions.
1471         (trait_expr_value): Handle CPTK_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
1472         (finish_trait_expr): Likewise.  Formatting fix.
1473         * cp-gimplify.c (cp_gimplify_expr): Fold
1474         CP_BUILT_IN_IS_POINTER_INTERCONVERTIBLE_WITH_CLASS.  Call
1475         fndecl_built_in_p just once.
1476         (cp_fold): Likewise.
1477         * tree.c (builtin_valid_in_constant_expr_p): Handle
1478         CP_BUILT_IN_IS_POINTER_INTERCONVERTIBLE_WITH_CLASS.  Call
1479         fndecl_built_in_p just once.
1480         * cxx-pretty-print.c (pp_cxx_trait_expression): Handle
1481         CPTK_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
1483 2021-07-30  Jason Merrill  <jason@redhat.com>
1485         * class.c (finish_struct_anon): Improve comment.
1486         * decl.c (fixup_anonymous_aggr): Reject anonymous struct
1487         with bases.
1489 2021-07-30  Jakub Jelinek  <jakub@redhat.com>
1491         * parser.c (cp_parser_statement): Rollback attributes not just
1492         when std_attrs is non-NULL, but whenever
1493         cp_parser_std_attribute_spec_seq parsed any tokens.
1495 2021-07-30  Jakub Jelinek  <jakub@redhat.com>
1497         PR c++/101582
1498         * parser.c (cp_parser_skip_std_attribute_spec_seq): Add a forward
1499         declaration.
1500         (cp_parser_declaration): Parse empty-declaration and
1501         attribute-declaration.
1502         (cp_parser_toplevel_declaration): Don't parse empty-declaration here.
1504 2021-07-28  Martin Sebor  <msebor@redhat.com>
1506         * init.c: Include new header.
1508 2021-07-27  Marek Polacek  <polacek@redhat.com>
1510         DR 1512
1511         PR c++/99701
1512         * cp-gimplify.c (cp_fold): Remove {LE,LT,GE,GT_EXPR} from
1513         a switch.
1514         * typeck.c (cp_build_binary_op): Reject ordered comparison
1515         of two null pointers.
1517 2021-07-26  Jakub Jelinek  <jakub@redhat.com>
1519         * parser.h (struct cp_lexer): Add orphan_p member.
1520         * parser.c (cp_parser_statement): Don't change in_omp_attribute_pragma
1521         upon restart from CPP_PRAGMA handling.  Fix up condition when a lexer
1522         should be destroyed and adjust saved_tokens if it records tokens from
1523         the to be destroyed lexer.
1524         (cp_parser_omp_section_scan): New function.
1525         (cp_parser_omp_scan_loop_body): Use it.  If
1526         parser->lexer->in_omp_attribute_pragma, allow optional comma
1527         after scan.
1528         (cp_parser_omp_sections_scope): Use cp_parser_omp_section_scan.
1530 2021-07-23  Jakub Jelinek  <jakub@redhat.com>
1532         * parser.h (struct cp_parser): Add omp_attrs_forbidden_p member.
1533         * parser.c (cp_parser_handle_statement_omp_attributes): Diagnose
1534         mixing of attribute and pragma syntax directives when seeing
1535         omp::directive if parser->omp_attrs_forbidden_p or if attribute syntax
1536         directives are followed by OpenMP pragma.
1537         (cp_parser_statement): Clear parser->omp_attrs_forbidden_p after
1538         the cp_parser_handle_statement_omp_attributes call.
1539         (cp_parser_omp_structured_block): Add disallow_omp_attrs argument,
1540         if true, set parser->omp_attrs_forbidden_p.
1541         (cp_parser_omp_scan_loop_body, cp_parser_omp_sections_scope): Pass
1542         false as disallow_omp_attrs to cp_parser_omp_structured_block.
1543         (cp_parser_omp_parallel, cp_parser_omp_task): Set
1544         parser->omp_attrs_forbidden_p.
1546 2021-07-21  Thomas Schwinge  <thomas@codesourcery.com>
1547             Joseph Myers  <joseph@codesourcery.com>
1548             Cesar Philippidis  <cesar@codesourcery.com>
1550         * parser.c (cp_parser_omp_clause_name): Handle 'nohost'.
1551         (cp_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
1552         (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1553         * pt.c (tsubst_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
1554         * semantics.c (finish_omp_clauses): Likewise.
1556 2021-07-21  Jakub Jelinek  <jakub@redhat.com>
1558         PR c++/101516
1559         * semantics.c (finish_omp_reduction_clause): Also call
1560         complete_type_or_else and return true if it fails.
1562 2021-07-19  Iain Sandoe  <iain@sandoe.co.uk>
1564         PR c++/95520
1565         * coroutines.cc (struct coroutine_info): Add fields for
1566         actor and destroy function decls.
1567         (to_ramp): New.
1568         (coro_get_ramp_function): New.
1569         (coro_get_actor_function): New.
1570         (coro_get_destroy_function): New.
1571         (act_des_fn): Set up mapping between ramp, actor and
1572         destroy functions.
1573         (morph_fn_to_coro): Adjust interface to the builder for
1574         helper function decls.
1575         * cp-tree.h (DECL_ACTOR_FN, DECL_DESTROY_FN, DECL_RAMP_FN,
1576         JOIN_STR): New.
1577         * mangle.c (write_encoding): Handle coroutine helpers.
1578         (write_unqualified_name): Handle lambda coroutine helpers.
1580 2021-07-16  Patrick Palka  <ppalka@redhat.com>
1582         PR c++/101233
1583         * pt.c (alias_ctad_tweaks): Clear cp_unevaluated_operand for
1584         substituting DECL_ARGUMENTS.
1586 2021-07-16  Patrick Palka  <ppalka@redhat.com>
1588         DR 960
1589         PR c++/99664
1590         * search.c (check_final_overrider): Compare TYPE_REF_IS_RVALUE
1591         when the return types are references.
1593 2021-07-16  Marek Polacek  <polacek@redhat.com>
1595         * typeck2.c (check_narrowing): Don't suppress the pedantic error
1596         in system headers.
1598 2021-07-15  Jakub Jelinek  <jakub@redhat.com>
1600         PR c++/101443
1601         * cp-gimplify.c (cp_fold): For comparisons with NULLPTR_TYPE
1602         operands, fold them right away to true or false.
1604 2021-07-15  Jason Merrill  <jason@redhat.com>
1606         PR c++/101095
1607         * cp-objcp-common.c (cp_common_init_ts): Mark types as types.
1608         (cp_tree_size): Remove redundant entries.
1610 2021-07-14  Patrick Palka  <ppalka@redhat.com>
1612         PR c++/88252
1613         * cp-tree.h (TEMPLATE_TYPE_PARM_FOR_CLASS): Remove.
1614         * pt.c (push_template_decl): Remove TEMPLATE_TYPE_PARM_FOR_CLASS
1615         handling.
1616         (redeclare_class_template): Likewise.
1617         (forwarding_reference_p): Define.
1618         (maybe_adjust_types_for_deduction): Use it instead.  Add 'tparms'
1619         parameter.
1620         (unify_one_argument): Pass tparms to
1621         maybe_adjust_types_for_deduction.
1622         (try_one_overload): Likewise.
1623         (unify): Likewise.
1624         (rewrite_template_parm): Remove TEMPLATE_TYPE_PARM_FOR_CLASS
1625         handling.
1627 2021-07-14  Jason Merrill  <jason@redhat.com>
1629         * class.c (struct find_final_overrider_data): Use auto_vec.
1630         (find_final_overrider): Remove explicit release.
1631         * coroutines.cc (process_conditional): Use auto_vec.
1632         * cp-gimplify.c (struct cp_genericize_data): Use auto_vec.
1633         (cp_genericize_tree): Remove explicit release.
1634         * parser.c (cp_parser_objc_at_property_declaration): Use
1635         auto_delete_vec.
1636         * semantics.c (omp_reduction_lookup): Use auto_vec.
1638 2021-07-14  Marek Polacek  <polacek@redhat.com>
1640         PR c++/101371
1641         * constexpr.c (cxx_eval_array_reference): Create a new .object
1642         and .ctor for the non-aggregate non-scalar case too when
1643         value-initializing.
1645 2021-07-12  Patrick Palka  <ppalka@redhat.com>
1647         PR c++/79501
1648         PR c++/100983
1649         * decl.c (grokfndecl): Don't require that deduction guides are
1650         declared at namespace scope.  Check that class-scope deduction
1651         guides have the same access as the member class template.
1652         (grokdeclarator): Pretend class-scope deduction guides are static.
1653         * search.c (lookup_member): Don't use a BASELINK for (class-scope)
1654         deduction guides.
1656 2021-07-10  Patrick Palka  <ppalka@redhat.com>
1658         PR c++/82110
1659         * init.c (build_aggr_init): Return error_mark_node if
1660         expand_aggr_init_1 returns false.
1661         (expand_default_init): Change return type to bool.  Return false
1662         on error, true on success.
1663         (expand_aggr_init_1): Likewise.
1665 2021-07-09  Jason Merrill  <jason@redhat.com>
1667         PR c++/101098
1668         * decl.c (function_requirements_equivalent_p): Only compare
1669         trailing requirements on a specialization.
1671 2021-07-09  Iain Sandoe  <iain@sandoe.co.uk>
1673         * coroutines.cc (build_actor_fn): Move common code to
1674         act_des_fn.
1675         (build_destroy_fn): Likewise.
1676         (act_des_fn): Build the void return here.  Ensure that the
1677         source location matches the original function.
1679 2021-07-09  Iain Sandoe  <iain@sandoe.co.uk>
1681         * coroutines.cc
1682         (coro_rewrite_function_body): Connect the replacement
1683         function block to the block nest correctly.
1685 2021-07-09  Patrick Palka  <ppalka@redhat.com>
1687         PR c++/101181
1688         * constraint.cc (tsubst_requires_expr): Pass complain/in_decl to
1689         add_extra_args.
1690         * cp-tree.h (add_extra_args): Add complain/in_decl parameters.
1691         * pt.c (build_extra_args): Make a copy of args.
1692         (add_extra_args): Add complain/in_decl parameters.  Enable the
1693         code for handling the case where the extra arguments are
1694         dependent.
1695         (tsubst_pack_expansion): Pass complain/in_decl to
1696         add_extra_args.
1697         (tsubst_template_args): Handle missing template arguments.
1698         (tsubst_expr) <case IF_STMT>: Pass complain/in_decl to
1699         add_extra_args.
1701 2021-07-09  Patrick Palka  <ppalka@redhat.com>
1703         PR c++/101247
1704         * pt.c (any_template_parm_r) <case TEMPLATE_DECL>: Just walk the
1705         DECL_CONTEXT.
1707 2021-07-08  Martin Sebor  <msebor@redhat.com>
1709         PR bootstrap/101372
1710         * module.cc (identifier): Suppress warning.
1711         (module_state::read_macro_maps): Remove warning suppression.
1712         (module_state::install_macros): Ditto.
1714 2021-07-08  Marek Polacek  <polacek@redhat.com>
1716         PR c++/101087
1717         * cp-tree.h (unevaluated_p): New.
1718         * except.c (check_noexcept_r): Use it.  Don't walk into
1719         unevaluated operands.
1721 2021-07-08  Martin Sebor  <msebor@redhat.com>
1723         PR bootstrap/101374
1724         * module.cc (module_state::read_macro_maps): Temporarily disable
1725         -Warray-bounds.
1726         (module_state::install_macros): Same.
1728 2021-07-06  Martin Sebor  <msebor@redhat.com>
1730         * error.c (cp_printer):  Remove support for %G and %K.
1732 2021-07-02  Jakub Jelinek  <jakub@redhat.com>
1734         * parser.h (struct cp_lexer): Add in_omp_attribute_pragma member.
1735         (struct cp_omp_declare_simd_data): Likewise.
1736         * cp-tree.h (enum cp_tree_index): Add CPTI_OMP_IDENTIFIER.
1737         (omp_identifier): Define.
1738         * parser.c (cp_parser_skip_to_pragma_eol): Handle
1739         in_omp_attribute_pragma CPP_PRAGMA_EOL followed by CPP_EOF.
1740         (cp_parser_require_pragma_eol): Likewise.
1741         (struct cp_omp_attribute_data): New type.
1742         (cp_parser_handle_statement_omp_attributes): New function.
1743         (cp_parser_statement): Handle OpenMP directives in statement's
1744         attribute-specifier-seq.
1745         (cp_parser_omp_directive_args, cp_parser_omp_sequence_args): New
1746         functions.
1747         (cp_parser_std_attribute): Handle omp::directive and omp::sequence
1748         attributes.
1749         (cp_parser_omp_all_clauses): If in_omp_attribute_pragma, allow
1750         a comma also before the first clause.
1751         (cp_parser_omp_allocate): Likewise.
1752         (cp_parser_omp_atomic): Likewise.
1753         (cp_parser_omp_depobj): Likewise.
1754         (cp_parser_omp_flush): Likewise.
1755         (cp_parser_omp_ordered): Likewise.
1756         (cp_parser_omp_declare_simd): Save in_omp_attribute_pragma
1757         into struct cp_omp_declare_simd_data.
1758         (cp_finish_omp_declare_variant): Add in_omp_attribute_pragma
1759         argument.  If set, allow a comma also before match clause.
1760         (cp_parser_late_parsing_omp_declare_simd): If in_omp_attribute_pragma,
1761         allow a comma also before the first clause.  Adjust
1762         cp_finish_omp_declare_variant caller.
1763         (cp_parser_omp_declare_target): If in_omp_attribute_pragma, allow
1764         a comma also before the first clause.
1765         (cp_parser_omp_declare_reduction_exprs): Likewise.
1766         (cp_parser_omp_requires): Likewise.
1767         * decl.c (initialize_predefined_identifiers): Initialize
1768         omp_identifier.
1769         * decl2.c (cplus_decl_attributes): Reject omp::directive and
1770         omp::sequence attributes.
1772 2021-07-02  Jakub Jelinek  <jakub@redhat.com>
1774         PR c/101297
1775         * parser.c (cp_parser_omp_atomic): Consume comma only if it
1776         appears before a CPP_NAME.
1778 2021-07-02  Patrick Palka  <ppalka@redhat.com>
1780         PR c++/101247
1781         * pt.c (any_template_parm_r) <case TEMPLATE_DECL>: Rewrite to
1782         use common_enclosing_class and to not depend on the TREE_TYPE
1783         of outer levels pointing to the corresponding primary template.
1785 2021-07-01  Patrick Palka  <ppalka@redhat.com>
1787         PR c++/101194
1788         * constexpr.c (cxx_eval_array_reference): When the element type
1789         is an empty type and the corresponding element is omitted, just
1790         return an empty CONSTRUCTOR instead of attempting value
1791         initialization.
1793 2021-07-01  Patrick Palka  <ppalka@redhat.com>
1795         PR c++/96204
1796         * pt.c (finish_template_variable): Pass the partially
1797         instantiated template and its args to instantiate_template.
1798         (instantiate_class_template_1): No need to call
1799         push_nested_class and pop_nested_class around the call to
1800         most_specialized_partial_spec.
1801         (instantiate_template_1): Pass the partially instantiated
1802         template to lookup_template_variable.
1803         (most_specialized_partial_spec):  Use push_access_scope_guard
1804         to set the access scope appropriately.  Use
1805         deferring_access_check_sentinel to force access to get checked
1806         immediately.
1807         (instantiate_decl): Just pass the VAR_DECL to
1808         most_specialized_partial_spec.
1810 2021-06-30  Patrick Palka  <ppalka@redhat.com>
1812         * constraint.cc (get_normalized_constraints_from_decl): Use
1813         push_access_scope_guard instead of push_nested_class_guard.
1814         * cp-tree.h (struct push_nested_class_guard): Replace with ...
1815         (struct push_access_scope_guard): ... this.
1816         * pt.c (push_access_scope): When the argument corresponds to
1817         a class type, push the class instead of its context.
1818         (pop_access_scope): Adjust accordingly.
1820 2021-06-30  Marek Polacek  <polacek@redhat.com>
1822         PR c++/100975
1823         DR 2397
1824         * decl.c (create_array_type_for_decl): Allow array of auto.
1826 2021-06-29  Jason Merrill  <jason@redhat.com>
1828         * pt.c (instantiate_decl): Only consider partial specializations of
1829         actual variable templates.
1831 2021-06-26  Patrick Palka  <ppalka@redhat.com>
1833         PR c++/96204
1834         * pt.c (instantiate_class_template_1): Enter the scope of the
1835         type when calling most_specialized_partial_spec.
1837 2021-06-26  Jason Merrill  <jason@redhat.com>
1839         PR c++/101040
1840         PR c++/97566
1841         * class.c (is_empty_field): Handle null argument.
1842         * constexpr.c (cxx_eval_bare_aggregate): Discard initializer
1843         for empty field.
1845 2021-06-26  Marek Polacek  <polacek@redhat.com>
1847         PR c++/100752
1848         * parser.c (cp_parser_declarator): Pass flags down to
1849         cp_parser_declarator.  Also pass static_p/member_p.
1851 2021-06-25  Martin Sebor  <msebor@redhat.com>
1853         * call.c (build_over_call): Replace direct uses of TREE_NO_WARNING
1854         with warning_suppressed_p, suppress_warning, and copy_no_warning, or
1855         nothing if not necessary.
1856         (set_up_extended_ref_temp): Same.
1857         * class.c (layout_class_type): Same.
1858         * constraint.cc (constraint_satisfaction_value): Same.
1859         * coroutines.cc (finish_co_await_expr): Same.
1860         (finish_co_yield_expr): Same.
1861         (finish_co_return_stmt): Same.
1862         (build_actor_fn): Same.
1863         (coro_rewrite_function_body): Same.
1864         (morph_fn_to_coro): Same.
1865         * cp-gimplify.c (genericize_eh_spec_block): Same.
1866         (gimplify_expr_stmt): Same.
1867         (cp_genericize_r): Same.
1868         (cp_fold): Same.
1869         * cp-ubsan.c (cp_ubsan_instrument_vptr): Same.
1870         * cvt.c (cp_fold_convert): Same.
1871         (convert_to_void): Same.
1872         * decl.c (wrapup_namespace_globals): Same.
1873         (grokdeclarator): Same.
1874         (finish_function): Same.
1875         (require_deduced_type): Same.
1876         * decl2.c (no_linkage_error): Same.
1877         (c_parse_final_cleanups): Same.
1878         * except.c (expand_end_catch_block): Same.
1879         * init.c (build_new_1): Same.
1880         (build_new): Same.
1881         (build_vec_delete_1): Same.
1882         (build_vec_init): Same.
1883         (build_delete): Same.
1884         * method.c (defaultable_fn_check): Same.
1885         * parser.c (cp_parser_fold_expression): Same.
1886         (cp_parser_primary_expression): Same.
1887         * pt.c (push_tinst_level_loc): Same.
1888         (tsubst_copy): Same.
1889         (tsubst_omp_udr): Same.
1890         (tsubst_copy_and_build): Same.
1891         * rtti.c (build_if_nonnull): Same.
1892         * semantics.c (maybe_convert_cond): Same.
1893         (finish_return_stmt): Same.
1894         (finish_parenthesized_expr): Same.
1895         (cp_check_omp_declare_reduction): Same.
1896         * tree.c (build_cplus_array_type): Same.
1897         * typeck.c (build_ptrmemfunc_access_expr): Same.
1898         (cp_build_indirect_ref_1): Same.
1899         (cp_build_function_call_vec): Same.
1900         (warn_for_null_address): Same.
1901         (cp_build_binary_op): Same.
1902         (unary_complex_lvalue): Same.
1903         (cp_build_modify_expr): Same.
1904         (build_x_modify_expr): Same.
1905         (convert_for_assignment): Same.
1907 2021-06-24  Patrick Palka  <ppalka@redhat.com>
1909         PR c++/98832
1910         * pt.c (maybe_aggr_guide): Handle alias templates appropriately.
1912 2021-06-24  Patrick Palka  <ppalka@redhat.com>
1914         PR c++/101182
1915         * constraint.cc (evaluate_requires_expr): Adjust function comment.
1916         * cp-gimplify.c (cp_genericize_r) <case REQUIRES_EXPR>: Move to ...
1917         (cp_fold) <case REQUIRES_EXPR>: ... here.
1919 2021-06-24  Jakub Jelinek  <jakub@redhat.com>
1921         * parser.c (cp_omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
1922         C_ORT_OMP for clauses on target construct.
1923         (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
1924         (cp_parser_omp_target): For non-combined target add
1925         map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION.  Pass
1926         C_ORT_OMP_TARGET to finish_omp_clauses.
1927         * semantics.c (handle_omp_array_sections_1): Adjust ort handling
1928         for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
1929         never present on C_ORT_*DECLARE_SIMD.
1930         (handle_omp_array_sections): Likewise.
1931         (finish_omp_clauses): Likewise.  Handle OMP_CLAUSE_IN_REDUCTION
1932         on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
1933         corresponding map clauses.
1934         * pt.c (tsubst_expr): Pass C_ORT_OMP_TARGET instead of C_ORT_OMP for
1935         clauses on target construct.
1937 2021-06-23  Patrick Palka  <ppalka@redhat.com>
1939         PR c++/101174
1940         * pt.c (push_access_scope): For artificial deduction guides,
1941         set the access scope to that of the constructor.
1942         (pop_access_scope): Likewise.
1943         (build_deduction_guide): Don't set DECL_CONTEXT on the guide.
1945 2021-06-23  Patrick Palka  <ppalka@redhat.com>
1947         PR c++/86439
1948         * call.c (print_error_for_call_failure): Constify 'args' parameter.
1949         (perform_dguide_overload_resolution): Define.
1950         * cp-tree.h: (perform_dguide_overload_resolution): Declare.
1951         * pt.c (do_class_deduction): Use perform_dguide_overload_resolution
1952         instead of build_new_function_call.  Don't use tf_decltype or
1953         set cp_unevaluated_operand.  Remove unnecessary NULL_TREE tests.
1955 2021-06-21  Patrick Palka  <ppalka@redhat.com>
1957         PR c++/67302
1958         * typeck.c (check_return_expr): Call maybe_undo_parenthesized_ref
1959         sooner, before the NRVO handling.
1961 2021-06-21  Patrick Palka  <ppalka@redhat.com>
1963         PR c++/80431
1964         * tree.c (bot_replace): Use convert_to_base to build the
1965         conversion to the (morally) virtual base.
1967 2021-06-21  Jakub Jelinek  <jakub@redhat.com>
1969         PR inline-asm/100785
1970         * typeck.c (cxx_mark_addressable): Diagnose trying to make
1971         bit-fields addressable.
1973 2021-06-17  Jason Merrill  <jason@redhat.com>
1975         PR c++/101106
1976         * decl.c (duplicate_decls): Make 'deleted after first declaration'
1977         pedwarn on by default.
1979 2021-06-17  Jason Merrill  <jason@redhat.com>
1981         PR c++/101029
1982         * init.c (build_vec_init): Preserve the type of base.
1984 2021-06-16  Jason Merrill  <jason@redhat.com>
1986         PR c++/101078
1987         PR c++/91706
1988         * pt.c (tsubst_baselink): Update binfos in non-dependent case.
1990 2021-06-15  Robin Dapp  <rdapp@linux.ibm.com>
1992         * decl.c (duplicate_decls): Likewise.
1994 2021-06-14  Tobias Burnus  <tobias@codesourcery.com>
1996         PR c/100913
1997         * parser.c (cp_parser_omp_clause_affinity): No need to set iterator
1998         var in the error case.
2000 2021-06-13  Trevor Saunders  <tbsaunde@tbsaunde.org>
2002         * constexpr.c (cxx_eval_call_expression): Iterate over vec<>
2003         with range based for.
2004         (cxx_eval_store_expression): Likewise.
2005         (cxx_eval_loop_expr): Likewise.
2006         * decl.c (wrapup_namespace_globals): Likewise.
2007         (cp_finish_decl): Likewise.
2008         (cxx_simulate_enum_decl): Likewise.
2009         * parser.c (cp_parser_postfix_expression): Likewise.
2011 2021-06-12  Jason Merrill  <jason@redhat.com>
2013         PR c++/101029
2014         * init.c (build_vec_init): Shortcut [0] case.
2016 2021-06-12  Jason Merrill  <jason@redhat.com>
2018         * pt.c (lookup_template_class_1): Shortcut current_class_type.
2020 2021-06-11  Patrick Palka  <ppalka@redhat.com>
2022         DR 1227
2023         PR c++/96560
2024         * pt.c (tsubst_arg_types): Rearrange so that we substitute into
2025         TYPE_ARG_TYPES in forward order while short circuiting
2026         appropriately.  Adjust formatting.
2028 2021-06-11  Jakub Jelinek  <jakub@redhat.com>
2030         PR c++/100974
2031         * cp-tree.h (struct saved_scope): Add consteval_if_p
2032         member.  Formatting fix for the discarded_stmt comment.
2033         (in_consteval_if_p, IF_STMT_CONSTEVAL_P): Define.
2034         * parser.c (cp_parser_lambda_expression): Temporarily disable
2035         in_consteval_if_p when parsing lambda body.
2036         (cp_parser_selection_statement): Parse consteval if.
2037         * decl.c (struct named_label_entry): Add in_consteval_if member.
2038         (level_for_consteval_if): New function.
2039         (poplevel_named_label_1, check_previous_goto_1, check_goto): Handle
2040         consteval if.
2041         * constexpr.c (cxx_eval_builtin_function_call): Clarify in comment
2042         why CP_BUILT_IN_IS_CONSTANT_EVALUATED needs to *non_constant_p
2043         for !ctx->manifestly_const_eval.
2044         (cxx_eval_conditional_expression): For IF_STMT_CONSTEVAL_P evaluate
2045         condition as if it was __builtin_is_constant_evaluated call.
2046         (potential_constant_expression_1): For IF_STMT_CONSTEVAL_P always
2047         recurse on both branches.
2048         * cp-gimplify.c (genericize_if_stmt): Genericize IF_STMT_CONSTEVAL_P
2049         as the else branch.
2050         * pt.c (tsubst_expr) <case IF_STMT>: Copy IF_STMT_CONSTEVAL_P.
2051         Temporarily set in_consteval_if_p when recursing on
2052         IF_STMT_CONSTEVAL_P then branch.
2053         (tsubst_lambda_expr): Temporarily disable
2054         in_consteval_if_p when instantiating lambda body.
2055         * call.c (immediate_invocation_p): Return false when
2056         in_consteval_if_p.
2058 2021-06-11  Marek Polacek  <polacek@redhat.com>
2060         PR c++/100995
2061         * constexpr.c (maybe_constexpr_fn): New.
2062         * cp-tree.h (maybe_constexpr_fn): Declare.
2063         * semantics.c (find_std_constant_evaluated_r): New.
2064         (maybe_warn_for_constant_evaluated): New.
2065         (finish_if_stmt_cond): Call it.
2067 2021-06-10  Patrick Palka  <ppalka@redhat.com>
2069         PR c++/67829
2070         * pt.c (unify) <case BOUND_TEMPLATE_TEMPLATE_PARM>: When
2071         the TEMPLATE_DECL of a BOUND_TEMPLATE_TEMPLATE_PARM argument is
2072         a template template parameter, adjust to the
2073         TEMPLATE_TEMPLATE_PARAMETER before falling through.
2075 2021-06-10  Patrick Palka  <ppalka@redhat.com>
2077         PR c++/100946
2078         * constraint.cc (normalize_placeholder_type_constraints): When
2079         normalizing a non-templated return-type-requirement, add a dummy
2080         level to initial_parms.
2082 2021-06-08  Marek Polacek  <polacek@redhat.com>
2084         PR c++/100065
2085         * decl.c (grokdeclarator): Store a value-dependent
2086         explicit-specifier even for deduction guides.
2088 2021-06-08  Jason Merrill  <jason@redhat.com>
2090         * parser.c (cp_parser_string_literal): Adjust diagnostic.
2092 2021-06-08  Jason Merrill  <jason@redhat.com>
2094         PR c++/100963
2095         * call.c (perfect_conversion_p): Check check_narrowing.
2097 2021-06-08  Jason Merrill  <jason@redhat.com>
2099         PR c++/91706
2100         * name-lookup.c (get_class_binding): Keep a BASELINK.
2101         (set_inherited_value_binding_p): Adjust.
2102         * lambda.c (is_lambda_ignored_entity): Adjust.
2103         * pt.c (lookup_template_function): Copy a BASELINK before
2104         modifying it.
2106 2021-06-08  Jason Merrill  <jason@redhat.com>
2108         PR c++/91706
2109         * semantics.c (baselink_for_fns): Fix BASELINK_BINFO.
2111 2021-06-08  Jason Merrill  <jason@redhat.com>
2113         * module.cc (duplicate_hash::hash): Comment out.
2114         (trees_in::tree_value): Adjust loop counter.
2116 2021-06-08  Jason Merrill  <jason@redhat.com>
2118         PR c++/100102
2119         * init.c (build_offset_ref): Return the BASELINK for a static
2120         member function.
2122 2021-06-07  Patrick Palka  <ppalka@redhat.com>
2124         PR c++/100918
2125         * parser.c (cp_parser_lookup_name): Check access of the lookup
2126         result before we potentially adjust an injected-class-name to
2127         its TEMPLATE_DECL.
2129 2021-06-06  Jakub Jelinek  <jakub@redhat.com>
2131         PR c/100902
2132         * parser.c (cp_parser_omp_target): Call c_omp_adjust_map_clauses
2133         even when target is combined with other constructs.
2135 2021-06-04  Patrick Palka  <ppalka@redhat.com>
2137         PR c++/100893
2138         * pt.c (convert_template_argument): Strip top-level cv-quals
2139         on the substituted type of a non-type template parameter.
2141 2021-06-04  Patrick Palka  <ppalka@redhat.com>
2143         PR c++/100102
2144         * pt.c (tsubst_function_decl): Remove old code for reducing
2145         args when it has excess levels.
2147 2021-06-04  Jakub Jelinek  <jakub@redhat.com>
2149         PR c++/100872
2150         * name-lookup.c (maybe_save_operator_binding): Add op_attr after all
2151         ATTR_IS_DEPENDENT attributes in the DECL_ATTRIBUTES list rather than
2152         to the start.
2154 2021-06-03  Patrick Palka  <ppalka@redhat.com>
2156         PR c++/100592
2157         * decl.c (make_typename_type): After calling
2158         lookup_template_class, adjust the result to its TYPE_NAME and
2159         then consider the tf_keep_type_decl flag.
2161 2021-06-03  Patrick Palka  <ppalka@redhat.com>
2163         PR c++/100862
2164         * pt.c (set_current_access_from_decl): Move to ...
2165         * class.c (set_current_access_from_decl): ... here.
2166         (handle_using_decl): Use it to propagate the access of the
2167         using-enum decl to the copy of the imported enumerator.
2168         * cp-tree.h (set_current_access_from_decl): Declare.
2169         * decl.c (build_enumerator): Simplify using make_temp_override
2170         and set_current_access_from_decl.
2172 2021-06-03  Jakub Jelinek  <jakub@redhat.com>
2174         PR c++/100859
2175         * semantics.c (handle_omp_array_sections_1): For
2176         OMP_CLAUSE_{AFFINITY,DEPEND} handle FIELD_DECL base using
2177         finish_non_static_data_member and allow this as base.
2178         (finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
2179         after depend only cases.  Let this be diagnosed by !lvalue_p
2180         case for OMP_CLAUSE_{AFFINITY,DEPEND} and remove useless
2181         assert.
2182         * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_AFFINITY.
2184 2021-06-02  Jason Merrill  <jason@redhat.com>
2186         PR c++/100838
2187         * call.c (convert_like_internal): Clear tf_no_cleanup when
2188         recursing.
2189         (build_user_type_conversion_1): Only add ck_rvalue if
2190         LOOKUP_ONLYCONVERTING.
2192 2021-06-01  Patrick Palka  <ppalka@redhat.com>
2194         PR c++/65816
2195         * init.c (expand_aggr_init_1): Check
2196         type_has_non_user_provided_default_constructor instead of
2197         type_has_user_provided_constructor.
2199 2021-06-01  Jason Merrill  <jason@redhat.com>
2201         PR c++/91859
2202         * call.c (build_op_delete_call): Don't set CALL_FROM_NEW_OR_DELETE_P
2203         for destroying delete.
2204         * init.c (build_delete): Don't clobber before destroying delete.
2206 2021-06-01  Jason Merrill  <jason@redhat.com>
2208         PR c++/94492
2209         * decl2.c (cp_warn_deprecated_use): Check warning_enabled_at.
2211 2021-05-31  Richard Biener  <rguenther@suse.de>
2213         PR c++/88601
2214         * cp-objcp-common.c (names_builtin_p): Handle
2215         RID_BUILTIN_SHUFFLEVECTOR.
2216         * cp-tree.h (build_x_shufflevector): Declare.
2217         * parser.c (cp_parser_postfix_expression): Handle
2218         RID_BUILTIN_SHUFFLEVECTOR.
2219         * pt.c (tsubst_copy_and_build): Handle IFN_SHUFFLEVECTOR.
2220         * typeck.c (build_x_shufflevector): Build either a lowered
2221         VEC_PERM_EXPR or an unlowered shufflevector via a temporary
2222         internal function IFN_SHUFFLEVECTOR.
2224 2021-05-28  Jason Merrill  <jason@redhat.com>
2226         * constexpr.c (build_data_member_initialization): Use tsi_range.
2227         (build_constexpr_constructor_member_initializers): Likewise.
2228         (constexpr_fn_retval, cxx_eval_statement_list): Likewise.
2229         (potential_constant_expression_1): Likewise.
2230         * coroutines.cc (await_statement_expander): Likewise.
2231         (await_statement_walker): Likewise.
2232         * module.cc (trees_out::core_vals): Likewise.
2233         * pt.c (tsubst_expr): Likewise.
2234         * semantics.c (set_cleanup_locs): Likewise.
2236 2021-05-28  Jason Merrill  <jason@redhat.com>
2238         PR c++/100797
2239         PR c++/95719
2240         * call.c (build_over_call): Adjust base_binfo in
2241         resolves_to_fixed_type_p case.
2243 2021-05-28  Jakub Jelinek  <jakub@redhat.com>
2245         PR middle-end/99928
2246         * semantics.c (handle_omp_array_sections): Copy
2247         OMP_CLAUSE_MAP_IMPLICIT.
2248         (finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
2249         marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT.  Add
2250         map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
2251         maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
2252         present too.  For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
2253         if present in map_head, map_field_head or map_firstprivate_head
2254         bitmaps.
2256 2021-05-28  Tobias Burnus  <tobias@codesourcery.com>
2258         * parser.c (cp_parser_omp_clause_affinity): New.
2259         (cp_parser_omp_clause_name, cp_parser_omp_var_list_no_open,
2260         cp_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity
2261         clause.
2262         * semantics.c (handle_omp_array_sections_1, handle_omp_array_sections,
2263         finish_omp_clauses): Likewise.
2265 2021-05-27  Matthias Kretz  <kretz@kde.org>
2267         PR c++/100716
2268         * error.c (dump_template_bindings): Include code to print
2269         "[with" and ']', conditional on whether anything is printed at
2270         all. This is tied to whether a semicolon is needed to separate
2271         multiple template parameters. If the template argument repeats
2272         the template parameter (T = T), then skip the parameter.
2273         (dump_substitution): Moved code to print "[with" and ']' to
2274         dump_template_bindings.
2275         (dump_function_decl): Partial revert of PR50828, which masked
2276         TFF_TEMPLATE_NAME for all of dump_function_decl. Now
2277         TFF_TEMPLATE_NAME is masked for the scope of the function and
2278         only carries through to dump_function_name.
2279         (dump_function_name): Avoid calling dump_template_parms if
2280         TFF_TEMPLATE_NAME is set.
2282 2021-05-27  Matthias Kretz  <kretz@kde.org>
2284         PR c++/100763
2285         * error.c: Call dump_scope when printing a typedef.
2287 2021-05-27  Patrick Palka  <ppalka@redhat.com>
2289         PR c++/99893
2290         * tree.c (cp_walk_subtrees) <case STATIC_ASSERT>: New case.
2292 2021-05-27  Jason Merrill  <jason@redhat.com>
2294         PR c++/86355
2295         * pt.c (use_pack_expansion_extra_args_p): Don't compare
2296         args from the same argument pack.
2298 2021-05-27  Patrick Palka  <ppalka@redhat.com>
2300         DR 1315
2301         PR c++/67593
2302         PR c++/96555
2303         * pt.c (process_partial_specialization): Don't error on a
2304         non-simple non-type template argument that involves template
2305         parameters.
2306         (for_each_template_parm_r): Don't walk TRAIT_EXPR, PLUS_EXPR,
2307         MULT_EXPR, or SCOPE_REF when include_nondeduced_p is false.
2309 2021-05-26  Patrick Palka  <ppalka@redhat.com>
2311         PR c++/100502
2312         * typeck.c (finish_class_member_access_expr): Disable ahead
2313         of time access checking during the member lookup.
2315 2021-05-26  Patrick Palka  <ppalka@redhat.com>
2317         PR c++/100368
2318         * tree.c (build_target_expr_with_type): Don't call force_rvalue
2319         on CALL_EXPR initializer.  Simplify now that bot_manip is no
2320         longer a caller.
2321         (bot_manip): Use force_target_expr instead of
2322         build_target_expr_with_type.
2324 2021-05-26  Patrick Palka  <ppalka@redhat.com>
2326         PR c++/97420
2327         * cvt.c (noexcept_conv_p): Remove redundant checks and simplify.
2328         (fnptr_conv_p): Don't call non_reference.  Use INDIRECT_TYPE_P
2329         instead of TYPE_PTR_P.
2330         * pt.c (convert_nontype_argument_function): Look through
2331         implicit INDIRECT_REFs before calling strip_fnptr_conv.
2333 2021-05-25  Jakub Jelinek  <jakub@redhat.com>
2335         PR c++/100666
2336         * call.c (convert_arg_to_ellipsis): For expressions with NULLPTR_TYPE
2337         and side-effects, temporarily disable -Wunused-result warning when
2338         building COMPOUND_EXPR.
2340 2021-05-21  Jakub Jelinek  <jakub@redhat.com>
2342         PR middle-end/99928
2343         * semantics.c (finish_omp_clauses): Move firstprivate clauses with
2344         OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain.  Don't error
2345         if a decl is mentioned both in map clause and in such firstprivate
2346         clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
2348 2021-05-20  Jason Merrill  <jason@redhat.com>
2350         * call.c (reference_binding): Check for designator.
2351         (implicit_conversion_1, build_special_member_call): Likewise.
2352         * decl.c (reshape_init_r): Likewise.
2353         * pt.c (do_class_deduction): Likewise.
2354         * typeck2.c (digest_init_r): Likewise.
2356 2021-05-20  Jason Merrill  <jason@redhat.com>
2358         PR c++/100489
2359         * decl.c (reshape_init_class): Handle designator for
2360         member of anonymous aggregate here.
2361         * typeck2.c (process_init_constructor_record): Not here.
2363 2021-05-20  Jonathan Wakely  <jwakely@redhat.com>
2365         * call.c (maybe_warn_array_conv): Use new warning option.
2366         * decl.c (mark_inline_variable, grokdeclarator): Likewise.
2367         * error.c (maybe_warn_cpp0x): Likewise.
2368         * parser.c (cp_parser_primary_expression)
2369         (cp_parser_unqualified_id)
2370         (cp_parser_pseudo_destructor_name)
2371         (cp_parser_lambda_introducer)
2372         (cp_parser_lambda_declarator_opt)
2373         (cp_parser_selection_statement)
2374         (cp_parser_init_statement)
2375         (cp_parser_decomposition_declaration)
2376         (cp_parser_function_specifier_opt)
2377         (cp_parser_static_assert)
2378         (cp_parser_namespace_definition)
2379         (cp_parser_using_declaration)
2380         (cp_parser_asm_definition)
2381         (cp_parser_ctor_initializer_opt_and_function_body)
2382         (cp_parser_initializer_list)
2383         (cp_parser_type_parameter_key)
2384         (cp_parser_member_declaration)
2385         (cp_parser_try_block)
2386         (cp_parser_std_attribute_spec): Likewise.
2387         * pt.c (check_template_variable): Likewise.
2389 2021-05-20  Jason Merrill  <jason@redhat.com>
2391         PR c++/100634
2392         * pt.c (invalid_nontype_parm_type_p): Return true for COMPLEX_TYPE.
2394 2021-05-20  Jason Merrill  <jason@redhat.com>
2396         PR c++/100659
2397         * cp-tree.h (CONST_DECL_USING_P): Check for null TREE_TYPE.
2399 2021-05-19  Jason Merrill  <jason@redhat.com>
2401         PR c++/100367
2402         PR c++/96299
2403         * method.c (genericize_spaceship): Use fold_build2 for scalar
2404         operands.
2406 2021-05-19  Jason Merrill  <jason@redhat.com>
2408         * pt.c (build_deduction_guide): Treat the implicit deduction guide
2409         as a member of the class.
2411 2021-05-19  Marek Polacek  <polacek@redhat.com>
2413         PR c++/100596
2414         * cp-tree.h (any_non_type_attribute_p): Remove.
2415         * decl.c (grokdeclarator): Turn an error into a warning and only
2416         warn for standard attributes.
2417         * decl2.c (any_non_type_attribute_p): Remove.
2418         * parser.c (cp_parser_elaborated_type_specifier): Turn an error
2419         into a warning and only warn for standard attributes.
2420         (cp_parser_member_declaration): Likewise.
2422 2021-05-19  Martin Liska  <mliska@suse.cz>
2424         PR testsuite/100658
2425         * mangle.c (write_encoding): Fix typos.
2427 2021-05-19  Jakub Jelinek  <jakub@redhat.com>
2429         PR middle-end/99928
2430         * parser.c (cp_parser_omp_master): Set OMP_MASTER_COMBINED on
2431         master when combined with taskloop.
2432         (cp_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
2433         parallel master when not combined with taskloop.
2435 2021-05-19  Jason Merrill  <jason@redhat.com>
2437         PR c++/100261
2438         * rtti.c (get_tinfo_decl_direct): Check TYPE_TRANSPARENT_AGGR.
2440 2021-05-19  Jason Merrill  <jason@redhat.com>
2442         PR c++/100372
2443         * tree.c (strip_typedefs): Only look at the pattern of a
2444         TYPE_PACK_EXPANSION if it's a type.
2446 2021-05-18  Marek Polacek  <polacek@redhat.com>
2448         * class.c (classtype_has_non_deleted_copy_ctor): Remove.
2449         * constraint.cc (contains_wildcard_p): Likewise.
2450         (get_template_head_requirements): Likewise.
2451         (check_constrained_friend): Likewise.
2452         (subsumes_constraints): Likewise.
2453         * cp-tree.h (classtype_has_non_deleted_copy_ctor): Likewise.
2454         (push_void_library_fn): Likewise.
2455         (get_pattern_parm): Likewise.
2456         (get_template_parms_at_level): Likewise.
2457         (lambda_return_type): Likewise.
2458         (get_template_head_requirements): Likewise.
2459         (check_constrained_friend): Likewise.
2460         (subsumes_constraints): Likewise.
2461         * decl.c (push_void_library_fn): Likewise.
2462         * lambda.c (lambda_return_type): Likewise.
2463         * pt.c (get_template_parms_at_level): Likewise.
2464         (get_pattern_parm): Likewise.
2466 2021-05-18  Jason Merrill  <jason@redhat.com>
2468         PR c++/100644
2469         * call.c (perfect_candidate_p): An implicitly deleted move
2470         is not perfect.
2472 2021-05-18  Andreas Krebbel  <krebbel@linux.ibm.com>
2474         PR c++/100281
2475         * cvt.c (cp_convert_to_pointer): Use the size of the target
2476         pointer type.
2477         * tree.c (cp_build_reference_type): Call
2478         cp_build_reference_type_for_mode with VOIDmode.
2479         (cp_build_reference_type_for_mode): Rename from
2480         cp_build_reference_type.  Add MODE argument and invoke
2481         build_reference_type_for_mode.
2482         (strip_typedefs): Use build_pointer_type_for_mode and
2483         cp_build_reference_type_for_mode for pointers and references.
2485 2021-05-17  Jonathan Wakely  <jwakely@redhat.com>
2487         PR c++/100635
2488         * call.c (convert_like_internal): Print different diagnostic if
2489         the lvalue reference is const.
2491 2021-05-14  Jason Merrill  <jason@redhat.com>
2493         PR c++/95870
2494         * pt.c (enclosing_instantiation_of): Just compare
2495         DECL_SOURCE_LOCATION.
2496         (regenerate_decl_from_template): Copy DECL_SOURCE_LOCATION.
2498 2021-05-14  Marek Polacek  <polacek@redhat.com>
2499             Jason Merrill  <jason@redhat.com>
2501         PR c++/99032
2502         * cp-tree.h (any_non_type_attribute_p): Declare.
2503         * decl.c (grokdeclarator): Diagnose when an attribute appertains to
2504         a friend declaration that is not a definition.
2505         * decl2.c (any_non_type_attribute_p): New.
2506         * parser.c (cp_parser_decl_specifier_seq): Diagnose standard attributes
2507         in the middle of decl-specifiers.
2508         (cp_parser_elaborated_type_specifier): Diagnose when an attribute
2509         appertains to a friend declaration that is not a definition.
2510         (cp_parser_member_declaration): Likewise.
2512 2021-05-12  Marek Polacek  <polacek@redhat.com>
2514         * pt.c (tsubst_copy_and_build): Add warn_int_in_bool_context
2515         sentinel.
2517 2021-05-12  Marcel Vollweiler  <marcel@codesourcery.com>
2519         * parser.c (cp_parser_omp_clause_map): Support map-type-modifier
2520         'close'.
2522 2021-05-11  Jason Merrill  <jason@redhat.com>
2524         PR c++/100517
2525         * typeck.c (build_reinterpret_cast_1): Check intype on
2526         cast to vector.
2528 2021-05-11  Patrick Palka  <ppalka@redhat.com>
2530         PR c++/51577
2531         * name-lookup.c (maybe_save_operator_binding): Unconditionally
2532         enable for all function templates, not just generic lambdas.
2533         Handle compound-assignment operator expressions.
2534         * typeck.c (build_x_compound_expr): Call maybe_save_operator_binding
2535         in the type-dependent case.
2536         (build_x_modify_expr): Likewise.  Move declaration of 'op' closer
2537         to its first use.
2539 2021-05-11  Patrick Palka  <ppalka@redhat.com>
2541         PR c++/100138
2542         * constraint.cc (tsubst_constraint): Set up cp_unevaluated.
2543         (satisfy_atom): Set up iloc_sentinel before calling
2544         cxx_constant_value.
2545         * pt.c (tsubst_pack_expansion): When returning a rebuilt pack
2546         expansion, carry over PACK_EXPANSION_LOCAL_P and
2547         PACK_EXPANSION_SIZEOF_P from the original pack expansion.
2549 2021-05-10  Richard Biener  <rguenther@suse.de>
2551         PR middle-end/100464
2552         PR c++/100468
2553         * call.c (set_up_extended_ref_temp): Mark the temporary
2554         addressable if the TARGET_EXPR was.
2556 2021-05-10  Martin Liska  <mliska@suse.cz>
2558         * decl.c (duplicate_decls): Use startswith
2559         function instead of strncmp.
2560         (cxx_builtin_function): Likewise.
2561         (omp_declare_variant_finalize_one): Likewise.
2562         (grokfndecl): Likewise.
2563         * error.c (dump_decl_name): Likewise.
2564         * mangle.c (find_decomp_unqualified_name): Likewise.
2565         (write_guarded_var_name): Likewise.
2566         (decl_tls_wrapper_p): Likewise.
2567         * parser.c (cp_parser_simple_type_specifier): Likewise.
2568         (cp_parser_tx_qualifier_opt): Likewise.
2569         * pt.c (template_parm_object_p): Likewise.
2570         (dguide_name_p): Likewise.
2572 2021-05-10  Martin Liska  <mliska@suse.cz>
2574         PR c++/99616
2575         * decl.c (grokdeclarator): Remove redundant NULL check.
2577 2021-05-07  Jason Merrill  <jason@redhat.com>
2579         * tree.c (rvalue): Assert expr is not a class lvalue.
2581 2021-05-07  Jason Merrill  <jason@redhat.com>
2583         * cp-tree.h (build_stub_object): Declare.
2584         * method.c (build_stub_object): No longer static.
2585         * call.c (can_convert): Use it.
2586         * tree.c (build_dummy_object): Adjust comment.
2587         * typeck.c (cp_build_binary_op): Wrap SPACESHIP_EXPR in a
2588         TARGET_EXPR.
2590 2021-05-07  Jason Merrill  <jason@redhat.com>
2592         * coroutines.cc (build_co_await): Don't call 'rvalue'.
2593         (flatten_await_stmt): Simplify initialization.
2594         (morph_fn_to_coro): Change 'rvalue' to 'move'.  Simplify.
2596 2021-05-04  Tobias Burnus  <tobias@codesourcery.com>
2598         * semantics.c (finish_omp_reduction_clause): Accept float + complex
2599         for || and && reductions.
2601 2021-05-03  Patrick Palka  <ppalka@redhat.com>
2603         PR c++/100362
2604         * parser.c (cp_parser_class_head): Reinstate calls to pushclass
2605         and popclass when parsing the base-clause that were removed in
2606         r11-6815.
2608 2021-05-03  Patrick Palka  <ppalka@redhat.com>
2610         PR c++/68942
2611         PR c++/100344
2612         * pt.c (tsubst_copy_and_build) <case CALL_EXPR>: Set tf_conv
2613         only when the callee is a FUNCTION_DECL.
2615 2021-05-03  Marek Polacek  <polacek@redhat.com>
2617         PR c++/100055
2618         * decl.c (grokfndecl): Check current_template_parms.
2620 2021-05-03  Marek Polacek  <polacek@redhat.com>
2622         DR 1312
2623         * constexpr.c (cxx_eval_constant_expression): Don't check
2624         integer_zerop.
2626 2021-05-01  Jason Merrill  <jason@redhat.com>
2628         * cp-tree.h (class ovl_iterator): Allow copying.  Add op==.
2629         (class ovl_range, class lkp_range): New.
2630         * call.c (build_op_call_1, add_candidates): Use them.
2631         (build_op_delete_call, has_trivial_copy_assign_p): Likewise.
2632         (has_trivial_copy_p): Likewise.
2633         * class.c (handle_using_decl, get_basefndecls): Likewise.
2634         (maybe_warn_about_overly_private_class): Likewise.
2635         (warn_hidden, add_implicitly_declared_members): Likewise.
2636         (check_methods, clone_constructors_and_destructors): Likewise.
2637         (type_has_user_nondefault_constructor): Likewise.
2639 2021-04-29  Jason Merrill  <jason@redhat.com>
2641         * constexpr.c (cxx_fold_indirect_ref_1): Only set *empty_base if we
2642         don't find a field.
2644 2021-04-29  Jason Merrill  <jason@redhat.com>
2646         PR c++/51344
2647         * decl2.c (grokfield): Call cplus_decl_attributes for friend.
2648         (save_template_attributes): Use chainon.
2649         * friend.c (do_friend): Remove attrlist parm.
2650         * cp-tree.h (do_friend): Adjust.
2651         * class.c (add_implicitly_declared_members): Adjust.
2652         * decl.c (grokdeclarator): Adjust.
2653         * pt.c (apply_late_template_attributes): Optimize.
2655 2021-04-29  Jason Merrill  <jason@redhat.com>
2657         PR c++/97974
2658         * class.c (finish_struct_anon_r): Drop complain parm.
2659         Remove non-field diagnostic.
2660         (finish_struct_anon): Adjust.
2661         * decl.c (fixup_anonymous_aggr): Move non-field diagnostic here.
2663 2021-04-29  Jason Merrill  <jason@redhat.com>
2665         * cp-tree.h (cp_evaluated): Add reset parm to constructor.
2666         * parser.c (cp_parser_constant_expression): Change
2667         allow_non_constant_p to int.  Use cp_evaluated.
2668         (cp_parser_initializer_clause): Pass 2 to allow_non_constant_p.
2669         * semantics.c (finish_id_expression_1): Don't mess with
2670         cp_unevaluated_operand here.
2672 2021-04-29  Jason Merrill  <jason@redhat.com>
2674         * cp-tree.h: Clarify comments.
2675         * pt.c (get_template_parm_object): Add assert.
2676         * semantics.c (finish_compound_literal): Clear TREE_HAS_CONSTRUCTOR.
2677         * tree.c (zero_init_expr_p): Check TREE_HAS_CONSTRUCTOR.
2678         * typeck2.c (store_init_value): Likewise.
2680 2021-04-29  Patrick Palka  <ppalka@redhat.com>
2682         PR c++/68942
2683         * pt.c (tsubst_copy_and_build) <case CALL_EXPR>: When KOENIG_P,
2684         set tf_conv during the initial substitution into the function.
2686 2021-04-29  Jakub Jelinek  <jakub@redhat.com>
2688         PR c++/100319
2689         * semantics.c (finish_omp_clauses): Fix up check that variable
2690         mentioned in detach clause doesn't appear in data-sharing clauses.
2692 2021-04-28  Jakub Jelinek  <jakub@redhat.com>
2694         * module.cc: Remove #error that triggers if DEV-PHASE is empty.
2696 2021-04-27  Jason Merrill  <jason@redhat.com>
2698         PR c++/92145
2699         * class.c (classtype_has_depr_implicit_copy): Check DECL_CONTEXT
2700         of operator=.
2702 2021-04-27  Patrick Palka  <ppalka@redhat.com>
2704         PR c++/88580
2705         * pt.c (tsubst_initializer_list): Correctly handle the case
2706         where an argument inside a base initializer pack expansion is
2707         itself a pack expansion.
2709 2021-04-26  Patrick Palka  <ppalka@redhat.com>
2711         PR c++/100209
2712         * constexpr.c (cxx_fold_indirect_ref): Try to canonicalize the
2713         object/offset pair for a POINTER_PLUS_EXPR of a COMPONENT_REF
2714         with a negative offset into one whose offset is nonnegative
2715         before calling cxx_fold_indirect_ref_1.
2717 2021-04-24  Patrick Palka  <ppalka@redhat.com>
2719         PR c++/89565
2720         PR c++/93383
2721         PR c++/95291
2722         PR c++/99200
2723         PR c++/99683
2724         * pt.c (do_class_deduction): Punt if the initializer is
2725         type-dependent.
2727 2021-04-24  Patrick Palka  <ppalka@redhat.com>
2729         PR c++/87709
2730         * parser.c (cp_parser_type_id_1): If we see a template
2731         placeholder, first try simulating an error before issuing
2732         a real error.
2734 2021-04-23  Patrick Palka  <ppalka@redhat.com>
2736         PR c++/98767
2737         * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause):
2738         Adjust parameter list loop to iterate over 'types' instead of
2739         'args'.  Output the trailing '...' for a variadic function.
2740         Remove PARM_DECL support.
2741         (pp_cxx_requires_expr): Pretty print the parameter list directly
2742         instead of going through pp_cxx_parameter_declaration_clause.
2744 2021-04-23  Patrick Palka  <ppalka@redhat.com>
2746         DR 2374
2747         * decl.c (is_direct_enum_init): Check the implicit
2748         convertibility requirement added by CWG 2374.
2750 2021-04-23  Martin Liska  <mliska@suse.cz>
2752         * cp-tree.h (STATIC_ASSERT): Prefer static assert.
2753         * lex.c (init_operators): Remove run-time check.
2755 2021-04-22  Marek Polacek  <polacek@redhat.com>
2757         PR c++/100161
2758         * pt.c (tsubst_copy_and_build) <case PLUS_EXPR>: Test op0 and
2759         op1 separately for value- or type-dependence.
2761 2021-04-21  Marek Polacek  <polacek@redhat.com>
2763         PR c++/96380
2764         * parser.c (cp_parser_enum_specifier): Don't allow defining
2765         types in enum-base.
2767 2021-04-21  Martin Liska  <mliska@suse.cz>
2769         Revert:
2770         2021-04-21  Martin Liska  <mliska@suse.cz>
2772         * error.c (dump_decl): Use flags in dump_generic_node call.
2774 2021-04-21  Martin Liska  <mliska@suse.cz>
2776         * error.c (dump_decl): Use flags in dump_generic_node call.
2778 2021-04-21  Martin Liska  <mliska@suse.cz>
2780         * error.c (dump_decl): Support anonymous labels.
2782 2021-04-20  Jason Merrill  <jason@redhat.com>
2784         PR c++/100109
2785         * pt.c (find_parameter_packs_r): Look into enum initializers.
2787 2021-04-19  Marek Polacek  <polacek@redhat.com>
2789         PR c++/97536
2790         * decl.c (grokvardecl): Given an error when a concept is not defined
2791         at namespace scope.
2793 2021-04-16  Jakub Jelinek  <jakub@redhat.com>
2795         PR c++/100111
2796         * constexpr.c (cxx_eval_store_expression): Don't add CONSTRUCTORs
2797         for empty classes into *valp when types don't match even when *valp
2798         is NULL.
2800 2021-04-16  Marek Polacek  <polacek@redhat.com>
2802         PR c++/99803
2803         * decl.c (make_typename_type): Give an error and return when
2804         name is is_overloaded_fn.
2805         * parser.c (cp_parser_class_name): Don't check is_overloaded_fn
2806         before calling make_typename_type.
2808 2021-04-16  Patrick Palka  <ppalka@redhat.com>
2810         PR c++/99700
2811         * constexpr.c (reduced_constant_expression_p): For array
2812         CONSTRUCTORs, use a dedicated loop that additionally verifies
2813         the CONSTRUCTOR spans the entire array.
2815 2021-04-16  Jakub Jelinek  <jakub@redhat.com>
2817         PR c++/99850
2818         * parser.c (cp_parser_constraint_requires_parens) <case CPP_DEREF>:
2819         If lambda_p, return pce_ok instead of pce_maybe_postfix.
2821 2021-04-16  Jakub Jelinek  <jakub@redhat.com>
2823         PR c++/99833
2824         * pt.c (extract_locals_r): When handling DECL_EXPR of a structured
2825         binding, add to data.internal also all corresponding structured
2826         binding decls.
2828 2021-04-16  Jason Merrill  <jason@redhat.com>
2830         PR c++/100079
2831         * cp-tree.h (first_field): Declare.
2832         * mangle.c (range_expr_nelts): New.
2833         (write_expression): Improve class NTTP mangling.
2834         * pt.c (get_template_parm_object): Clear TREE_HAS_CONSTRUCTOR.
2835         * tree.c (zero_init_expr_p): Improve class NTTP handling.
2836         * decl.c: Adjust comment.
2838 2021-04-15  Jason Merrill  <jason@redhat.com>
2840         PR c++/80456
2841         * call.c (build_new_method_call_1): Check again for side-effects
2842         with a volatile object.
2844 2021-04-15  Jason Merrill  <jason@redhat.com>
2846         PR c++/100101
2847         PR c++/99583
2848         * pt.c (find_parameter_packs_r) [FUNCTION_TYPE]: Walk into
2849         TYPE_RAISES_EXCEPTIONS here.
2850         * tree.c (cp_walk_subtrees): Not here.
2852 2021-04-15  Jason Merrill  <jason@redhat.com>
2854         PR c++/100091
2855         PR c++/99478
2856         * parser.c (cp_parser_default_type_template_argument): Set
2857         parser->local_variables_forbidden_p.
2859 2021-04-15  Richard Sandiford  <richard.sandiford@arm.com>
2861         PR c++/98852
2862         * typeck.c (merge_type_attributes_from): New function.
2863         (cp_common_type): Use it for vector types.
2865 2021-04-14  Jason Merrill  <jason@redhat.com>
2867         PR c++/100078
2868         PR c++/93085
2869         * pt.c (uses_outer_template_parms): Also look at default
2870         template argument.
2872 2021-04-14  Jason Merrill  <jason@redhat.com>
2874         PR c++/93314
2875         * semantics.c (finish_id_expression_1): Clear cp_unevaluated_operand
2876         for a non-static data member in a constant-expression.
2878 2021-04-14  Patrick Palka  <ppalka@redhat.com>
2880         PR c++/83476
2881         PR c++/99885
2882         * pt.c (deducible_expression): Look through implicit
2883         INDIRECT_REFs as well.
2885 2021-04-14  Jason Merrill  <jason@redhat.com>
2887         PR c++/99478
2888         * parser.c (cp_parser_lambda_expression): Reject lambda
2889         in template parameter type.
2891 2021-04-14  Jason Merrill  <jason@redhat.com>
2893         PR c++/90674
2894         * decl.c (duplicate_decls): Don't propagate
2895         DECL_INITIALIZED_IN_CLASS_P to a specialization.
2897 2021-04-14  Jason Merrill  <jason@redhat.com>
2899         PR c++/88742
2900         PR c++/49951
2901         PR c++/58123
2902         * semantics.c (set_cleanup_locs): New.
2903         (do_poplevel): Call it.
2904         * parser.c (cp_parser_compound_statement): Consume the }
2905         before finish_compound_stmt.
2907 2021-04-13  Jason Merrill  <jason@redhat.com>
2909         PR c++/100032
2910         * pt.c (get_underlying_template): Compare TYPE_QUALS.
2912 2021-04-13  Jason Merrill  <jason@redhat.com>
2914         PR c++/100054
2915         PR c++/90479
2916         * init.c (get_nsdmi): Do more context adjustment for local classes.
2918 2021-04-13  Patrick Palka  <ppalka@redhat.com>
2920         PR c++/99008
2921         * pt.c (do_class_deduction): Reject alias CTAD in C++17 mode
2922         rather than issuing a pedwarn.
2923         * typeck2.c (build_functional_cast_1): Handle CTAD uniformly
2924         for consistent diagnostics.
2926 2021-04-13  Jason Merrill  <jason@redhat.com>
2928         PR c++/91933
2929         * class.c (build_base_path): Shortcut simple non-pointer case.
2931 2021-04-13  Eric Botcazou  <ebotcazou@adacore.com>
2933         * module.cc (ordinary_loc_of): Test LINEMAPS_MACRO_LOWEST_LOCATION
2934         of the linemap.
2935         (module_state::write_location): Likewise.
2937 2021-04-13  Patrick Palka  <ppalka@redhat.com>
2939         PR c++/97134
2940         * pt.c (do_class_deduction): Look through EXPR_PACK_EXPANSION
2941         when checking if the initializer is an equivalent class
2942         placeholder template parameter.
2944 2021-04-13  Patrick Palka  <ppalka@redhat.com>
2946         PR c++/99961
2947         PR c++/99994
2948         * constraint.cc (satisfy_normalized_constraints): Set
2949         cp_unevaluated.
2950         * parser.c (cp_parser_concept_definition): Likewise.
2951         (cp_parser_requires_clause_opt): Likewise.
2953 2021-04-12  Jason Merrill  <jason@redhat.com>
2955         PR c++/93085
2956         * pt.c (uses_outer_template_parms): Handle non-type and template
2957         template parameters specifically.
2959 2021-04-11  Jason Merrill  <jason@redhat.com>
2961         PR c++/97974
2962         * decl.c (fixup_anonymous_aggr): Prune all functions from
2963         CLASSTYPE_MEMBER_VEC.
2965 2021-04-10  Jason Merrill  <jason@redhat.com>
2967         PR c++/98800
2968         PR c++/97399
2969         * parser.c (cp_parser_direct_declarator): Don't
2970         inject_this_parameter if static_p.
2971         (cp_parser_omp_var_list_no_open): Parse 'this' even if
2972         current_class_ptr isn't set for a better diagnostic.
2974 2021-04-10  Jason Merrill  <jason@redhat.com>
2976         PR c++/99180
2977         PR c++/93295
2978         PR c++/93867
2979         PR c++/99118
2980         PR c++/96873
2981         * pt.c (alias_ctad_tweaks): Handle failure better.
2983 2021-04-10  Jason Merrill  <jason@redhat.com>
2985         PR c++/100006
2986         * pt.c (find_parameter_packs_r) [TAG_DEFN]: Look into bases.
2988 2021-04-09  Patrick Palka  <ppalka@redhat.com>
2990         * cp-tree.h (LAMBDA_EXPR_REGENERATED_FROM)
2991         (LAMBDA_EXPR_REGENERATING_TARGS): Replace these with ...
2992         (LAMBDA_EXPR_REGEN_INFO): ... this.
2993         (tree_lambda_expr::regenerated_from)
2994         (tree_lambda_expr::regenerating_targs): Replace these with ...
2995         (tree_lambda_expr::regen_info): ... this.
2996         * constraint.cc (satisfy_declaration_constraints): Adjust
2997         accordingly.
2998         * lambda.c (build_lambda_expr): Likewise.
2999         * pt.c (regenerated_lambda_fn_p): Likewise.
3000         (most_general_lambda): Likewise.
3001         (tsubst_lambda_expr): Likewise.
3003 2021-04-09  Marek Polacek  <polacek@redhat.com>
3005         PR c++/99806
3006         * parser.c (cp_parser_member_declaration): Call
3007         cp_parser_save_default_args even for function templates.  Use
3008         STRIP_TEMPLATE on the declaration we're passing.
3010 2021-04-08  Patrick Palka  <ppalka@redhat.com>
3012         PR c++/99874
3013         * constraint.cc (get_normalized_constraints_from_decl): Handle
3014         regenerated lambdas.
3015         (satisfy_declaration_constraints): Likewise.  Check for
3016         dependent args later.
3017         * cp-tree.h (LAMBDA_EXPR_INSTANTIATED): Replace with ...
3018         (LAMBDA_EXPR_REGENERATED_FROM): ... this.
3019         (LAMBDA_EXPR_REGENERATING_TARGS): New.
3020         (tree_lambda_expr::regenerated_from): New data member.
3021         (tree_lambda_expr::regenerating_targs): New data member.
3022         (add_to_template_args): Declare.
3023         (regenerated_lambda_fn_p): Likewise.
3024         (most_general_lambda): Likewise.
3025         * lambda.c (build_lambda_expr): Set LAMBDA_EXPR_REGENERATED_FROM
3026         and LAMBDA_EXPR_REGENERATING_TARGS.
3027         * pt.c (add_to_template_args): No longer static.
3028         (tsubst_function_decl): Unconditionally propagate constraints on
3029         the substituted function decl.
3030         (instantiated_lambda_fn_p): Rename to ...
3031         (regenerated_lambda_fn_p): ... this.  Check
3032         LAMBDA_EXPR_REGENERATED_FROM instead of
3033         LAMBDA_EXPR_INSTANTIATED.
3034         (most_general_lambda): Define.
3035         (enclosing_instantiation_of): Adjust after renaming
3036         instantiated_lambda_fn_p.
3037         (tsubst_lambda_expr): Don't set LAMBDA_EXPR_INSTANTIATED.  Set
3038         LAMBDA_EXPR_REGENERATED_FROM and LAMBDA_EXPR_REGENERATING_TARGS.
3039         Don't substitute or set constraints on the regenerated lambda.
3041 2021-04-08  Patrick Palka  <ppalka@redhat.com>
3043         PR c++/97679
3044         * pt.c (build_deduction_guide): Document OUTER_ARGS.  Substitute
3045         them into the propagated constraints.
3047 2021-04-08  Jason Merrill  <jason@redhat.com>
3049         PR c++/91849
3050         * call.c (convert_like_internal): Improve reference diagnostic.
3052 2021-04-08  Jakub Jelinek  <jakub@redhat.com>
3054         PR c++/99859
3055         * constexpr.c (addr_of_non_const_var): New function.
3056         (cxx_bind_parameters_in_call): Set *non_constant_args to true
3057         even if cp_walk_tree on arg with addr_of_non_const_var callback
3058         returns true.
3060 2021-04-08  Jason Merrill  <jason@redhat.com>
3062         PR c++/94529
3063         * pt.c (determine_specialization): Improve diagnostic.
3065 2021-04-08  Marek Polacek  <polacek@redhat.com>
3067         PR c++/99844
3068         * decl.c (build_explicit_specifier): Call
3069         check_for_bare_parameter_packs.
3070         * except.c (build_noexcept_spec): Likewise.
3072 2021-04-07  Jason Merrill  <jason@redhat.com>
3074         PR c++/41723
3075         * parser.c (cp_parser_class_name): Check dependent_scope_p.
3077 2021-04-07  Jason Merrill  <jason@redhat.com>
3079         PR c++/52625
3080         * pt.c (maybe_process_partial_specialization): Check
3081         DECL_SELF_REFERENCE_P.
3083 2021-04-07  Jason Merrill  <jason@redhat.com>
3085         PR c++/92918
3086         * name-lookup.c (push_class_level_binding_1): Do overload a new
3087         function with a previous using-declaration.
3089 2021-04-06  Jason Merrill  <jason@redhat.com>
3091         PR c++/96673
3092         * init.c (get_nsdmi): Don't defer access checking.
3094 2021-04-06  Jason Merrill  <jason@redhat.com>
3096         PR c++/99901
3097         * decl.c (cp_finish_decl): mark_needed an implicitly inline
3098         static data member with an out-of-class redeclaration.
3100 2021-04-06  Jason Merrill  <jason@redhat.com>
3102         PR c++/91241
3103         * mangle.c (write_compact_number): Add sanity check.
3104         (write_local_name): Use list_length for parm number.
3106 2021-04-06  Patrick Palka  <ppalka@redhat.com>
3108         PR c++/99899
3109         * pt.c (do_auto_deduction): Don't exit early when deducing the
3110         array type of a structured binding.  Also handle adc_decomp_type
3111         during constraint checking.
3113 2021-04-05  Jason Merrill  <jason@redhat.com>
3115         PR c++/96311
3116         * typeck.c (check_return_expr): Call mark_exp_read in dependent
3117         case.
3119 2021-04-05  Jason Merrill  <jason@redhat.com>
3121         PR c++/98440
3122         * typeck.c (build_reinterpret_cast_1): Don't perform
3123         temporary materialization.
3125 2021-04-05  Jason Merrill  <jason@redhat.com>
3127         PR c++/95317
3128         * pt.c (lookup_template_class_1): Do tsubst_enum when
3129         tsubsting a generic lambda.
3131 2021-04-05  Jason Merrill  <jason@redhat.com>
3133         PR c++/95870
3134         * pt.c (enclosing_instantiation_of): Compare DECL_SOURCE_LOCATION if
3135         there is no enclosing non-lambda function.
3137 2021-04-05  Nathan Sidwell  <nathan@acm.org>
3139         PR c++/99380
3140         * module.cc (name_pending_imports): Drop 'atend' parm.  Don't
3141         query export when not needed.
3142         (preprocess_module, preprocessed_module): Adjust.
3144 2021-04-05  Jason Merrill  <jason@redhat.com>
3146         PR c++/99066
3147         * pt.c (mark_decl_instantiated): Set DECL_EXTERNAL.
3149 2021-04-05  Jason Merrill  <jason@redhat.com>
3151         PR c++/99201
3152         * pt.c (class el_data): Add visited field.
3153         (extract_local_specs): Pass it to cp_walk_tree.
3154         (extract_locals_r): Walk into the body of a lambda.
3156 2021-04-05  Jason Merrill  <jason@redhat.com>
3158         * ptree.c (cxx_print_decl): Check DECL_MODULE_IMPORT_P on
3159         template result.
3161 2021-04-04  Jason Merrill  <jason@redhat.com>
3163         PR c++/99643
3164         * typeck2.c (massage_init_elt): Don't strip TARGET_EXPR.
3166 2021-04-03  Marek Polacek  <polacek@redhat.com>
3168         PR c++/91416
3169         * parser.c: Create a GC root for attributes in a decl specifier.
3170         (cp_parser_type_specifier): Push/pop ->attributes onto/from it.
3172 2021-04-03  Jason Merrill  <jason@redhat.com>
3174         PR c++/91217
3175         * pt.c (tsubst_lambda_expr): Skip the body block from
3176         DECL_SAVED_TREE.
3178 2021-04-03  Jason Merrill  <jason@redhat.com>
3180         PR c++/90664
3181         * cvt.c (can_convert_qual): Check fnptr_conv_p.
3183 2021-04-03  Jason Merrill  <jason@redhat.com>
3185         PR c++/97900
3186         * pt.c (regenerate_decl_from_template): tsubst_decl
3187         the parms.
3189 2021-04-02  Patrick Palka  <ppalka@redhat.com>
3191         PR c++/99869
3192         * parser.c (do_range_for_auto_deduction): Pass adc_variable_type
3193         to do_auto_deduction.
3195 2021-04-02  Patrick Palka  <ppalka@redhat.com>
3197         PR c++/99586
3198         * semantics.c (finish_compound_literal): Check
3199         template_placeholder_p instead of type_uses_auto.
3201 2021-04-02  Jason Merrill  <jason@redhat.com>
3203         PR c++/97938
3204         * cp-tree.h (PACK_EXPANSION_AUTO_P): New.
3205         * lambda.c (add_capture): Set it.
3206         * pt.c (tsubst_pack_expansion): Handle it.
3208 2021-04-02  Nathan Sidwell  <nathan@acm.org>
3210         * cp-tree.h (lang_decl_base): Correct module flag comment.
3211         * module.cc (trees_in::assert_definition): Break out
3212         not_tmpl var.
3213         (trees_out::lang_decl_bools): Do not write purview for header units.
3215 2021-04-01  Marek Polacek  <polacek@redhat.com>
3217         PR c++/99831
3218         * method.c (defaulted_late_check): ++ and -- function_depth around
3219         the call to synthesize_method.
3220         * pt.c: Remove the saved_trees global.
3222 2021-04-01  Jason Merrill  <jason@redhat.com>
3224         PR c++/99583
3225         PR c++/99584
3226         * tree.c (cp_walk_subtrees) [FUNCTION_TYPE]: Walk into
3227         TYPE_RAISES_EXCEPTIONS.
3229 2021-04-01  Iain Sandoe  <iain@sandoe.co.uk>
3231         * mapper-client.cc (INCLUDE_MAP): New; require map to be
3232         included from system.h.
3233         * mapper-resolver.cc (INCLUDE_MAP): Likewise.
3235 2021-04-01  Jason Merrill  <jason@redhat.com>
3237         PR c++/98481
3238         * mangle.c (write_expression): Adjust.
3239         * class.c (find_abi_tags_r): Disable PR98481 fix for ABI v14.
3240         (mark_abi_tags_r): Likewise.
3242 2021-04-01  Nathan Sidwell  <nathan@acm.org>
3244         PR c++/99283
3245         * module.cc (trees_out::decl_node): Adjust importedness reference
3246         assert.
3247         (module_state::intercluster_seed): New.  Seed both imports and
3248         inter-cluster references.  Broken out of ...
3249         (module_state::write_cluster): ... here.  Call it.
3251 2021-03-31  Jason Merrill  <jason@redhat.com>
3253         PR c++/99445
3254         * tree.c (strip_typedefs): Handle TYPE_PACK_EXPANSION.
3256 2021-03-31  Patrick Palka  <ppalka@redhat.com>
3258         PR c++/88115
3259         * mangle.c (write_expression): Adjust the mangling of
3260         __alignof__.
3262 2021-03-31  Patrick Palka  <ppalka@redhat.com>
3264         PR c++/99815
3265         * pt.c (placeholder_type_constraint_dependent_p): Expand
3266         argument packs to separate the first non-pack argument
3267         from the rest.
3269 2021-03-30  Nathan Sidwell  <nathan@acm.org>
3271         PR c++/99283
3272         * module.cc (dumper::operator): Make less brittle.
3273         (trees_out::core_bools): VAR_DECLs always have a context.
3274         (trees_out::key_mergeable): Use same_type_p for asserting.
3275         (trees_in::read_var_def): Propagate
3276         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
3278 2021-03-30  Jakub Jelinek  <jakub@redhat.com>
3280         PR c++/99790
3281         * cp-gimplify.c (cp_gimplify_expr): Handle PTRMEM_CST.
3283 2021-03-26  Marek Polacek  <polacek@redhat.com>
3285         PR c++/98352
3286         * method.c (implicitly_declare_fn): Pass &raises to
3287         synthesized_method_walk.
3289 2021-03-26  Nathan Sidwell  <nathan@acm.org>
3291         PR c++/99283
3292         * cp-tree.h (DECL_MODULE_CHECK): Ban TEMPLATE_DECL.
3293         (SET_TYPE_TEMPLATE_INFO): Restore Alias template setting.
3294         * decl.c (duplicate_decls): Remove template_decl module flag
3295         propagation.
3296         * module.cc (merge_kind_name): Add alias tmpl spec as a thing.
3297         (dumper::impl::nested_name): Adjust for template-decl module flag
3298         change.
3299         (trees_in::assert_definition): Likewise.
3300         (trees_in::install_entity): Likewise.
3301         (trees_out::decl_value): Likewise.  Remove alias template
3302         separation of template and type_decl.
3303         (trees_in::decl_value): Likewise.
3304         (trees_out::key_mergeable): Likewise,
3305         (trees_in::key_mergeable): Likewise.
3306         (trees_out::decl_node): Adjust for template-decl module flag
3307         change.
3308         (depset::hash::make_dependency): Likewise.
3309         (get_originating_module, module_may_redeclare): Likewise.
3310         (set_instantiating_module, set_defining_module): Likewise.
3311         * name-lookup.c (name_lookup::search_adl): Likewise.
3312         (do_pushdecl): Likewise.
3313         * pt.c (build_template_decl): Likewise.
3314         (lookup_template_class_1): Remove special alias_template handling
3315         of DECL_TI_TEMPLATE.
3316         (tsubst_template_decl): Likewise.
3318 2021-03-26  Jakub Jelinek  <jakub@redhat.com>
3320         PR c++/99705
3321         * tree.c (bot_manip): Remap artificial automatic temporaries mentioned
3322         in DECL_EXPR or in BIND_EXPR_VARS.
3324 2021-03-25  Jakub Jelinek  <jakub@redhat.com>
3326         PR c++/99672
3327         * parser.c (cp_parser_postfix_expression): For calls, create
3328         combined_loc and temporarily set input_location to it before
3329         calling finish_call_expr.
3331 2021-03-25  Marek Polacek  <polacek@redhat.com>
3333         PR c++/94751
3334         * call.c (build_over_call): Maybe call mark_used in case
3335         deduce_inheriting_ctor fails and return error_mark_node.
3336         * cp-tree.h (deduce_inheriting_ctor): Adjust declaration.
3337         * method.c (deduce_inheriting_ctor): Return bool if the deduction
3338         fails.
3339         (implicitly_declare_fn): If raises is error_mark_node, call
3340         synthesized_method_walk with diag being true.
3342 2021-03-25  Jakub Jelinek  <jakub@redhat.com>
3344         PR c++/99745
3345         * decl2.c (grokbitfield): Diagnose bitfields containing bare parameter
3346         packs and don't set DECL_BIT_FIELD_REPRESENTATIVE in that case.
3348 2021-03-25  Marek Polacek  <polacek@redhat.com>
3350         PR c++/99331
3351         * call.c (build_converted_constant_expr_internal): Don't emit
3352         -Wconversion warnings.
3354 2021-03-25  Jakub Jelinek  <jakub@redhat.com>
3356         PR c++/99565
3357         * call.c (build_conditional_expr_1): Pass OEP_ADDRESS_OF_SAME_FIELD
3358         to operand_equal_p.
3359         * cvt.c (convert_to_void): Preserve location_t on COND_EXPR or
3360         or COMPOUND_EXPR.
3362 2021-03-23  Nathan Sidwell  <nathan@acm.org>
3364         PR c++/99283
3365         * name-lookup.c (check_module_override): Set global or partition
3366         DUP on the binding vector.
3368 2021-03-23  Marek Polacek  <polacek@redhat.com>
3370         PR c++/99318
3371         * decl2.c (cp_warn_deprecated_use_scopes): Only call
3372         cp_warn_deprecated_use when decl is a namespace, class, or enum.
3374 2021-03-23  Nathan Sidwell  <nathan@acm.org>
3376         PR c++/99239
3377         * decl.c (duplicate_decls): Remove assert about maybe-imported
3378         artificial decls.
3380 2021-03-23  Jakub Jelinek  <jakub@redhat.com>
3382         PR c++/99650
3383         * decl.c (cp_finish_decomp): Diagnose void initializers when
3384         using tuple_element and get.
3386 2021-03-22  Nathan Sidwell  <nathan@acm.org>
3388         PR c++/99480
3389         * module.cc (depset::hash::make_dependency): Propagate flags for
3390         partial specialization.
3391         (module_may_redeclare): Handle partial specialization.
3393 2021-03-22  Nathan Sidwell  <nathan@acm.org>
3395         PR c++/99425
3396         * cp-tree.h (map_context_from, map_context_to): Delete.
3397         (add_mergeable_specialization): Add is_alias parm.
3398         * pt.c (add_mergeable_specialization): Add is_alias parm, add them.
3399         * module.cc (map_context_from, map_context_to): Delete.
3400         (trees_in::decl_value): Add specializations later, adjust call.
3401         Drop useless alias lookup. Set duplicate fn parm context.
3402         (check_mergeable_decl): Drop context mapping.
3403         (trees_in::is_matching_decl): Likewise.
3404         (trees_in::read_function_def): Drop parameter context adjustment
3405         here.
3407 2021-03-22  Martin Liska  <mliska@suse.cz>
3409         PR c++/99687
3410         * module.cc (fini_modules): Call vec_free instead of delete.
3412 2021-03-20  Jakub Jelinek  <jakub@redhat.com>
3414         PR debug/99230
3415         * cp-gimplify.c (cp_genericize_r) <case STATEMENT_LIST>: Remove
3416         special code, instead call c_genericize_control_stmt.
3418 2021-03-19  Jakub Jelinek  <jakub@redhat.com>
3420         PR c++/99456
3421         * constexpr.c (cxx_eval_constant_expression): For CONVERT_EXPR from
3422         INDIRECT_TYPE_P to ARITHMETIC_TYPE_P, when !ctx->manifestly_const_eval
3423         don't diagnose it, set *non_constant_p nor return t.
3425 2021-03-19  Marek Polacek  <polacek@redhat.com>
3427         PR c++/99500
3428         * parser.c (cp_parser_requirement_parameter_list): Handle
3429         error_mark_node.
3431 2021-03-18  Marek Polacek  <polacek@redhat.com>
3433         * pt.c (tsubst_copy_and_build) <case FLOAT_EXPR>: Remove.
3435 2021-03-18  Marek Polacek  <polacek@redhat.com>
3437         * pt.c (tsubst_copy_and_build): Add assert.
3439 2021-03-18  Iain Sandoe  <iain@sandoe.co.uk>
3441         PR objc++/49070
3442         * parser.c (cp_debug_parser): Add Objective-C++ message
3443         state flag.
3444         (cp_parser_nested_name_specifier_opt): Allow colon to
3445         terminate an assignment-expression when parsing Objective-
3446         C++ messages.
3447         (cp_parser_objc_message_expression): Set and clear message
3448         parsing state on entry and exit.
3449         * parser.h (struct cp_parser): Add a context flag for
3450         Objective-C++ message state.
3452 2021-03-18  Martin Liska  <mliska@suse.cz>
3454         PR c++/99617
3455         * coroutines.cc (struct var_nest_node): Init then_cl and else_cl
3456         to NULL.
3458 2021-03-17  Marek Polacek  <polacek@redhat.com>
3460         PR c++/97973
3461         * call.c (conv_unsafe_in_template_p): New.
3462         (convert_like): Use it.
3464 2021-03-17  Anthony Sharp  <anthonysharp15@gmail.com>
3465             Jason Merrill  <jason@redhat.com>
3467         * semantics.c (get_class_access_diagnostic_decl): New
3468         function that examines special cases when a parent
3469         class causes a private access failure.
3470         (enforce_access): Slightly modified to call function
3471         above.
3473 2021-03-16  Jason Merrill  <jason@redhat.com>
3475         * tree.c (cp_tree_equal): Use real_identical.
3477 2021-03-16  Jakub Jelinek  <jakub@redhat.com>
3479         PR c++/99613
3480         * decl.c (expand_static_init): For thread guards, call __cxa_atexit
3481         before calling __cxa_guard_release rather than after it.  Formatting
3482         fixes.
3484 2021-03-16  Martin Liska  <mliska@suse.cz>
3485             Jason Merrill  <jason@redhat.com>
3487         PR c++/99108
3488         * call.c (get_function_version_dispatcher): Handle
3489         DECL_LOCAL_DECL_P.
3490         * decl.c (maybe_version_functions): Likewise.
3491         (maybe_mark_function_versioned): New.
3492         * name-lookup.c (push_local_extern_decl_alias): No longer static.
3493         * name-lookup.h (push_local_extern_decl_alias): Adjust.
3495 2021-03-16  Nathan Sidwell  <nathan@acm.org>
3497         PR c++/99496
3498         * module.cc (trees_out::decl_value): Adjust typedef streaming,
3499         indicate whether it is a dependent alias.
3500         (trees_in::decl_value): Likewise.  Set as dependent alias, if it
3501         is one.
3503 2021-03-15  Iain Sandoe  <iain@sandoe.co.uk>
3505         PR c++/99047
3506         * coroutines.cc (expand_one_await_expression): If the
3507         await_ready() expression is not a boolean then convert it
3508         as required.
3510 2021-03-15  Iain Sandoe  <iain@sandoe.co.uk>
3512         PR c++/98704
3513         * coroutines.cc (build_actor_fn): Make destroy index 1
3514         correspond to the abnormal unhandled_exception() exit.
3515         Substitute the proxy for the resume index.
3516         (coro_rewrite_function_body): Arrange to reset the resume
3517         index and make done = true for a rethrown exception from
3518         unhandled_exception ().
3519         (morph_fn_to_coro): Adjust calls to build_actor_fn and
3520         coro_rewrite_function_body.
3522 2021-03-15  Iain Sandoe  <iain@sandoe.co.uk>
3524         PR c++/98480
3525         * coroutines.cc (replace_continue): Rewrite continue into
3526         'goto label'.
3527         (await_statement_walker): Handle await expressions in the
3528         initializer, condition and iteration expressions of for
3529         loops.
3531 2021-03-15  Iain Sandoe  <iain@sandoe.co.uk>
3533         PR c++/96749
3534         * coroutines.cc (flatten_await_stmt): Allow for the case
3535         where a target expression variable only has uses in the
3536         second part of a compound expression.
3537         (maybe_promote_temps): Avoid emiting empty statements.
3539 2021-03-15  Tobias Burnus  <tobias@codesourcery.com>
3541         PR c++/99509
3542         * decl.c (cp_finish_decl): For 'omp declare target implicit' vars,
3543         ensure that the varpool node is marked as offloadable.
3545 2021-03-12  Nathan Sidwell  <nathan@acm.org>
3547         PR c++/99238
3548         * module.cc (depset::hash::add_binding_entity): Assert not
3549         visited.
3550         (depset::add::add_specializations): Likewise.
3551         * name-lookup.c (name_lookup::dedup): New.
3552         (name_lookup::~name_lookup): Assert not deduping.
3553         (name_lookup::restore_state): Likewise.
3554         (name_lookup::add_overload): Replace outlined code with dedup
3555         call.
3556         (name_lookup::add_value): Likewise.
3557         (name_lookup::search_namespace_only): Likewise.
3558         (name_lookup::adl_namespace_fns): Likewise.
3559         (name_lookup::adl_class_fns): Likewise.
3560         (name_lookup::search_adl): Likewise.  Add clearing dedup call.
3561         (name_lookup::search_qualified): Likewise.
3562         (name_lookup::search_unqualified): Likewise.
3564 2021-03-12  Jakub Jelinek  <jakub@redhat.com>
3566         PR c++/99507
3567         * call.c (build_over_call): For immediate evaluation of functions
3568         that return references, undo convert_from_reference effects before
3569         calling cxx_constant_value and call convert_from_reference
3570         afterwards.
3572 2021-03-11  Nathan Sidwell  <nathan@acm.org>
3574         PR c++/99248
3575         * name-lookup.c (lookup_elaborated_type_1): Access slot not bind
3576         when there's a binding vector.
3577         * ptree.c (cxx_print_xnode): Lazy flags are no longer a thing.
3579 2021-03-11  Nathan Sidwell  <nathan@acm.org>
3581         PR c++/99528
3582         * module.cc (enum merge_kind): Delete MK_type_tmpl_spec,
3583         MK_decl_tmpl_spec.
3584         (trees_in::decl_value): Adjust add_mergeable_specialization call.
3585         (trees_out::get_merge_kind): Adjust detecting a partial template
3586         instantiation.
3587         (trees_out::key_mergeable): Adjust handling same.
3588         (trees_in::key_mergeabvle): Likewise.
3590 2021-03-10  Nathan Sidwell  <nathan@acm.org>
3592         PR c++/99423
3593         * module.cc (post_load_processing): Assert not gcable.
3594         (laxy_load_pendings): Extend no-gc region around
3595         post_load_processing.
3597 2021-03-10  Nathan Sidwell  <nathan@acm.org>
3599         PR c++/99508
3600         * decl.c (make_rtl_for_nonlocal_decl): Propagate local-extern's
3601         assembler name to the ns alias.
3603 2021-03-09  Jakub Jelinek  <jakub@redhat.com>
3605         PR c++/99459
3606         * coroutines.cc (build_co_await): Look through NOP_EXPRs in
3607         build_special_member_call return value to find the CALL_EXPR.
3608         Simplify.
3610 2021-03-09  Nathan Sidwell  <nathan@acm.org>
3612         PR c++/99472
3613         * parser.c (cp_parser_diagnose_invalid_type_name): Clarify
3614         that C++20 does not yet imply modules.
3616 2021-03-08  Nathan Sidwell  <nathan@acm.org>
3618         PR c++/99436
3619         * name-lookup.c (get_cxx_dialect_name): Add cxx23.
3621 2021-03-08  Nathan Sidwell  <nathan@acm.org>
3623         * lex.c (module_token_filter::resume): Ignore module-decls inside
3624         header-unit.
3625         * parser.c (cp_parser_module_declaration): Reject in header-unit.
3627 2021-03-08  Nathan Sidwell  <nathan@acm.org>
3629         PR c++/99285
3630         * cp-tree.h (match_mergeable_specialization)
3631         (add_mergeable_specialization): Adjust parms.
3632         * module.cc (trees_in::decl_value): Adjust
3633         add_mergeable_specialization calls.
3634         (trees_out::key_mergeable): Adjust match_mergeable_specialization
3635         calls.
3636         (specialization_add): Likewise.
3637         * pt.c (match_mergeable_specialization): Do not insert.
3638         (add_mergeable_specialization): Add to hash table here.
3640 2021-03-06  Patrick Palka  <ppalka@redhat.com>
3641             Jakub Jelinek  <jakub@redhat.com>
3643         PR c++/99287
3644         * constexpr.c (cxx_eval_increment_expression): Pass lval when
3645         evaluating the MODIFY_EXPR, and update 'mod' with the result of
3646         this evaluation.  Check *non_constant_p afterwards.  For prefix
3647         ops, just return 'mod'.
3649 2021-03-06  Patrick Palka  <ppalka@redhat.com>
3650             Jakub Jelinek  <jakub@redhat.com>
3652         PR c++/96330
3653         * pt.c (tsubst_copy) <case TEMPLATE_ID_EXPR>: Rename local
3654         variable 'fn' to 'tmpl'.  Handle a variable template-id by
3655         calling lookup_template_variable.
3657 2021-03-06  Patrick Palka  <ppalka@redhat.com>
3659         PR c++/99365
3660         * pt.c (unify) <case TEMPLATE_TYPE_PARM>: Pass targs as
3661         outer_targs to do_auto_deduction.
3662         (placeholder_type_constraint_dependent_p): Define.
3663         (do_auto_deduction): When processing_template_decl != 0
3664         and context is adc_unify and we have constraints, pretend the
3665         constraints are satisfied instead of punting.  Otherwise don't
3666         punt unless placeholder_type_constraint_dependent_p holds.
3667         Add some clarifying sanity checks.  Add a hack to add missing
3668         outermost template levels to outer_args before checking
3669         satisfaction.  Don't substitute outer_targs into type if it's
3670         already been done.
3672 2021-03-05  Marek Polacek  <polacek@redhat.com>
3674         PR c++/99374
3675         * call.c (standard_conversion): When converting pointers to
3676         member, don't return NULL when the bases are equivalent but
3677         incomplete.
3679 2021-03-05  Marek Polacek  <polacek@redhat.com>
3681         PR c++/99120
3682         * name-lookup.c (check_local_shadow): Check if the type of decl
3683         is non-null before checking TYPE_PTR*.
3685 2021-03-05  Nathan Sidwell  <nathan@acm.org>
3687         PR c++/99245
3688         * module.cc (module_state::write_cluster): Relax binding assert.
3690 2021-03-05  Nathan Sidwell  <nathan@acm.org>
3692         PR c++/99377
3693         * pt.c (instantiate_decl): Call set_instantiating_module.
3695 2021-03-05  Iain Sandoe  <iain@sandoe.co.uk>
3697         PR c++/98118
3698         * coroutines.cc (build_co_await): Use type_build_ctor_call()
3699         to determine cases when a CTOR needs to be built.
3700         (flatten_await_stmt): Likewise.
3701         (morph_fn_to_coro): Likewise.
3703 2021-03-05  Iain Sandoe  <iain@sandoe.co.uk>
3705         PR c++/95616
3706         * coroutines.cc (coro_diagnose_throwing_fn): New helper.
3707         (coro_diagnose_throwing_final_aw_expr): New helper.
3708         (build_co_await): Diagnose throwing final await expression
3709         components.
3710         (build_init_or_final_await): Diagnose a throwing promise
3711         final_suspend() call.
3713 2021-03-05  Iain Sandoe  <iain@sandoe.co.uk>
3715         PR c++/95615
3716         * coroutines.cc (struct param_info): Track parameter copies that need
3717         a DTOR.
3718         (coro_get_frame_dtor): New helper function factored from build_actor().
3719         (build_actor_fn): Use coro_get_frame_dtor().
3720         (morph_fn_to_coro): Track parameters that need DTORs on exception,
3721         likewise the frame promise and the return object.  On exception, run the
3722         DTORs for these, destroy the frame and then rethrow the exception.
3724 2021-03-05  Nathan Sidwell  <nathan@acm.org>
3726         PR c++/99389
3727         * pt.c (instantiate_class_template_1): Set instantiating module
3728         here.
3730 2021-03-05  Tobias Burnus  <tobias@codesourcery.com>
3732         PR c/99137
3733         * parser.c (cp_parser_oacc_clause_async): Reject comma expressions.
3735 2021-03-04  Jakub Jelinek  <jakub@redhat.com>
3737         PR c++/88146
3738         PR c++/99362
3739         * cvt.c (convert_to_void): Revert 2019-10-17 changes.  Clarify
3740         comment.
3742 2021-03-04  Nathan Sidwell  <nathan@acm.org>
3744         PR c++/99170
3745         * module.cc (class uintset): Delete.
3746         (typedef attached_map_t): A hash map.
3747         (attached_table): Use attached_map_t.  Adjust uses ...
3748         (trees_out::decl_value, trees_in::decl_value): ... here ...
3749         (trees_out::key_mergeable): ... here ...
3750         (trees_in::key_mergeable): ... here ...
3751         (maybe_attach_decl): ... here ...
3752         (direct_import): ... and here.
3754 2021-03-04  Nathan Sidwell  <nathan@acm.org>
3756         PR c++/99170
3757         * cp-tree.h
3758         * lex.c (cxx_dup_lang_specific_decl): Adjust for module_attached_p
3759         rename.
3760         * module.cc (class pending_key): New.
3761         (default_hash_traits<pending_key>): New specialization.
3762         (pending_map_t): New typedef.
3763         (pending_table): Replace old table.
3764         (trees_out::lang_decl_bools): Adjust.
3765         (trees_in::lang_decl_bools): Adjust.
3766         (trees_in::install_entity): Drop pending member and specialization
3767         handling.
3768         (find_pending_key): New.
3769         (depset::hash::fiund_dependencies): Use it.
3770         (pendset_lazy_load): Delete.
3771         (module_state::write_cluster): Don't count pendings here.  Bye
3772         Duff's device-like thing.
3773         (module_state::write_pendings): Reimplement.
3774         (module_state::read_pendings): Reimplement.
3775         (lazy_specializations_p): Delete.
3776         (module_state::write): Adjust write_pendings call.
3777         (lazy_load_pendings): New.
3778         (lazy_load_specializations): Delete.
3779         (lazy_load_members): Delete.
3780         (init_modules): Adjust.
3781         * name-lookup.c (maybe_lazily_declare): Call lazy_load_pendings
3782         not lazy_load_members.
3783         (note_pending_specializations): Delete.
3784         (load_pending_specializations): Delete.
3785         * name-lookup.h (BINDING_VECTR_PENDING_SPECIALIZATIONS_P): Delete.
3786         (BINDING_VECTOR_PENDING_MEMBERS_P): Delete.
3787         (BINDING_VECTR_PENDING_MEMBERS_P): Delete.
3788         (note_pending_specializations): Delete.
3789         (load_pending_specializations): Delete.
3790         * pt.c (lookup_template_class_1): Call lazy_load_pendings not
3791         lazy_load_specializations.
3792         (instantiate_template_class_1): Likewise.
3793         (instantiate_decl): Call lazy_load_pendings.
3794         * typeck.c (complete_type): Likewise.
3796 2021-03-03  Nathan Sidwell  <nathan@acm.org>
3798         PR c++/99170
3799         * module.cc (post_load_decls): New.
3800         (lazy_snum, recursive_lazy): Move earlier.
3801         (module_state::read_cluster): Push cloning onto post_load_decls.
3802         (post_load_processing): New.  Do the cloning here.
3803         (module_state::read_inits): Call post_load_processing.
3804         (module_state::read_language): Likewise.
3805         (lazy_load_binding, lazy_load_specializations): Likewise
3806         (lazy_load_members): Likewise
3808 2021-03-03  Nathan Sidwell  <nathan@acm.org>
3810         PR c++/99170
3811         * module.cc (trees_out::decl_value): Stream specialization keys
3812         after decl.
3813         (trees_in::decl_value): Stream them back and insert after
3814         completing the decl.
3815         (trees_out::key_mergeable): Drop some streaming here ...
3816         (trees_in::key_mergeable): ... and here.  Don't insert into
3817         specialization tables.
3819 2021-03-03  Patrick Palka  <ppalka@redhat.com>
3821         * constraint.cc (struct sat_info): Document the different
3822         meanings of noisy() and diagnose_unsatisfaction_p() during
3823         satisfaction and requires-expression evaluation.
3824         (tsubst_valid_expression_requirement): Take a sat_info instead
3825         of a subst_info.  Perform the substitution quietly first.  Fold
3826         in error-replaying code from diagnose_valid_expression.
3827         (tsubst_simple_requirement): Take a sat_info instead of a
3828         subst_info.
3829         (tsubst_type_requirement_1): New.  Fold in error-replaying code
3830         from diagnose_valid_type.
3831         (tsubst_type_requirement): Use the above.  Take a sat_info
3832         instead of a subst_info.
3833         (tsubst_compound_requirement): Likewise.  Fold in
3834         error-replaying code from diagnose_compound_requirement.
3835         (tsubst_nested_requirement): Take a sat_info instead of a
3836         subst_info.  Fold in error-replaying code from
3837         diagnose_nested_requirement.
3838         (tsubst_requirement): Take a sat_info instead of a subst_info.
3839         (tsubst_requires_expr): Split into two versions, one that takes
3840         a sat_info argument and another that takes a complain and
3841         in_decl argument.  Remove outdated documentation.  Document the
3842         effects of the sat_info argument.  Don't short-circuit
3843         processing of requirements when diagnosing unsatisfaction,
3844         mirroring diagnose_requires_expr.
3845         (satisfy_nondeclaration_constraint) <case REQUIRES_EXPR>: Remove
3846         assert, and se the three-parameter version of tsubst_requires_expr.
3847         (diagnose_trait_expr): Make static.  Take a template argument
3848         vector instead of a parameter mapping.
3849         (diagnose_valid_expression): Remove.
3850         (diagnose_valid_type): Remove.
3851         (diagnose_simple_requirement): Remove.
3852         (diagnose_compound_requirement): Remove.
3853         (diagnose_type_requirement): Remove.
3854         (diagnose_nested_requirement): Remove.
3855         (diagnose_requirement): Remove.
3856         (diagnose_requires_expr): Remove.
3857         (diagnose_atomic_constraint): Take a sat_info instead of a
3858         subst_info.  Adjust call to diagnose_trait_expr.  Call
3859         tsubst_requires_expr instead of diagnose_requires_expr.
3860         (diagnose_constraints): Remove special casing of REQUIRES_EXPR
3861         and just always call constraint_satisfaction_value.
3863 2021-03-03  Patrick Palka  <ppalka@redhat.com>
3865         * constexpr.c (cxx_eval_call_expression): Adjust call to
3866         evaluate_concept_check.
3867         (cxx_eval_constant_expression) <case REQUIRES_EXPR>: Use
3868         evaluate_requires_expression instead of
3869         satisfy_constraint_expression.
3870         <case TEMPLATE_ID_EXPR>: Adjust call to evaluate_concept_check.
3871         * constraint.cc (struct sat_info): Adjust comment about which
3872         satisfaction entrypoints use noisy-unsat.
3873         (normalize_template_requirements): Remove (and adjust callers
3874         appropriately).
3875         (normalize_nontemplate_requirements): Likewise.
3876         (tsubst_nested_requirement): Use constraint_satisfaction_value
3877         instead of satisfy_constraint_expression, which'll do the
3878         noisy replaying of ill-formed quiet satisfaction for us.
3879         (decl_satisfied_cache): Adjust comment.
3880         (satisfy_constraint): Rename to ...
3881         (satisfy_normalized_constraints): ... this.
3882         (satisfy_associated_constraints): Remove (and make its
3883         callers check for dependent arguments).
3884         (satisfy_constraint_expression): Rename to ...
3885         (satisfy_nondeclaration_constraints): ... this.  Assert that
3886         'args' is empty when 't' is a concept-id.  Removing handling
3887         bare constraint-expressions, and handle REQUIRES_EXPRs
3888         specially.  Adjust comment accordingly.
3889         (satisfy_declaration_constraints): Assert in the two-parameter
3890         version that 't' is not a TEMPLATE_DECL.  Adjust following
3891         removal of normalize_(non)?template_requirements and
3892         satisfy_asociated_constraints.
3893         (constraint_satisfaction_value): Combine the two- and
3894         three-parameter versions in the natural way.
3895         (constraints_satisfied_p): Combine the one- and two-parameter
3896         versions in the natural way.  Improve documentation.
3897         (evaluate_requires_expr): Define.
3898         (evaluate_concept_check): Remove 'complain' parameter.  Use
3899         constraint_satisfaction_value instead of
3900         satisfy_constraint_expression.
3901         (diagnose_nested_requirement): Adjust following renaming of
3902         satisfy_constraint_expression.
3903         (diagnose_constraints): Handle REQUIRES_EXPR by going through
3904         diagnose_requires_expr directly instead of treating it as a
3905         constraint-expression.  Improve documentation.
3906         * cp-gimplify.c (cp_genericize_r) <case CALL_EXPR>: Adjust call
3907         to evaluate_concept_check.
3908         <case REQUIRES_EXPR>: Use evaluate_requires_expr instead of
3909         constraints_satisfied_p.
3910         <case TEMPLATE_ID_EXPR>: Adjust call to evaluate_concept_check.
3911         * cp-tree.h (evaluate_requires_expr): Declare.
3912         (evaluate_concept_check): Remove tsubst_flag_t parameter.
3913         (satisfy_constraint_expression): Remove declaration.
3914         (constraints_satisfied_p): Remove one-parameter declaration.
3915         Add a default argument to the two-parameter declaration.
3916         * cvt.c (convert_to_void): Adjust call to
3917         evaluate_concept_check.
3919 2021-03-03  Jakub Jelinek  <jakub@redhat.com>
3921         PR c++/82959
3922         * call.c (op_is_ordered): Handle TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR
3923         and COMPOUND_EXPR.
3925 2021-03-03  Marek Polacek  <polacek@redhat.com>
3927         PR c++/97034
3928         PR c++/99009
3929         * pt.c (build_deduction_guide): Use INNERMOST_TEMPLATE_ARGS.
3930         (maybe_aggr_guide): Use the original template type where needed.  In
3931         a class member template, partially instantiate the result of
3932         collect_ctor_idx_types.
3933         (do_class_deduction): Defer the deduction until the enclosing
3934         scope is non-dependent.
3936 2021-03-03  Jason Merrill  <jason@redhat.com>
3938         PR c++/95675
3939         * call.c (build_temp): Wrap a CALL_EXPR in a TARGET_EXPR
3940         if it didn't get one before.
3942 2021-03-03  Nathan Sidwell  <nathan@acm.org>
3944         PR c++/99344
3945         * module.cc (trees_out::decl_node): Small refactor.
3946         (depset::hash::add_binding_entity): Return true on meeting an
3947         import.  Set namespace's import here.
3948         (module_state:write_namespaces): Inform of purview too.
3949         (module_state:read_namespaces): Adjust.
3950         * name-lookup.c (implicitly_export_namespace): Delete.
3951         (do_pushdecl): Don't call it.
3952         (push_namespace): Likewise, set purview.
3953         (add_imported_namespace): Reorder parms.
3954         * name-lookup.h (add_imported_namespace): Alter param ordering.
3956 2021-03-02  Martin Sebor  <msebor@redhat.com>
3958         PR c++/99251
3959         * class.c (build_base_path): Call build_if_nonnull.
3960         * cp-tree.h (build_if_nonnull): Declare.
3961         * rtti.c (ifnonnull): Rename...
3962         (build_if_nonnull): ...to this.  Set no-warning bit on COND_EXPR.
3963         (build_dynamic_cast_1): Adjust to name change.
3965 2021-03-02  Patrick Palka  <ppalka@redhat.com>
3967         PR c++/96443
3968         PR c++/96960
3969         * constraint.cc (type_deducible_p): Don't substitute into the
3970         constraints, and instead just pass 'args' to do_auto_deduction
3971         as the outer template arguments.
3972         (tsubst_parameter_mapping): Remove confused code for handling
3973         placeholder type arguments.
3974         (normalize_placeholder_type_constraint): Define.
3975         (satisfy_constraint_expression): Use it to handle placeholder
3976         'auto' types.
3977         * cp-tree.h (PLACEHOLDER_TYPE_CONSTRAINTS_INFO): Define.
3978         (PLACEHOLDER_TYPE_CONSTRAINTS): Redefine in terms of the above.
3979         * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: Use
3980         PLACEHOLDER_TYPE_CONSTRAINTS_INFO instead.
3981         (make_constrained_placeholder_type): Set
3982         PLACEHOLDER_TYPE_CONSTRAINTS_INFO instead.
3983         (do_auto_deduction): Clarify comments about the outer_targs
3984         parameter.  Rework satisfaction of a placeholder type constraint
3985         to pass in the complete set of template arguments directly to
3986         constraints_satisfied_p.
3987         (splice_late_return_type): Use PLACEHOLDER_TYPE_CONSTRAINTS_INFO
3988         instead.  Also rebuild the the constraint info on the new auto.
3990 2021-03-02  Patrick Palka  <ppalka@redhat.com>
3992         * constraint.cc (build_parameter_mapping): Rely on the caller to
3993         determine the in-scope template parameters.
3994         (norm_info::norm_info): Delegate the tsubst_flags_t constructor
3995         to the two-parameter constructor.  In the two-parameter
3996         constructor, fold in the definition of make_context, set
3997         initial_parms appropriately, and don't set the now-removed
3998         orig_decl member.
3999         (norm_info::make_context): Remove, now that its only use is
4000         inlined into the caller.
4001         (norm_info::update_context): Adjust call to
4002         build_parameter_mapping to pass in the relevant set of in-scope
4003         template parameters.
4004         (norm_info::ctx_parms): Define this member function.
4005         (norm_info::context): Initialize to NULL_TREE.
4006         (norm_info::orig_decl): Remove this data member.
4007         (norm_info::initial_parms): Define this data member.
4008         (normalize_atom): Adjust call to build_parameter_mapping to pass
4009         in the relevant set of in-scope template parameters.  Use
4010         info.initial_parms instead of info.orig_decl.
4011         (normalize_constraint_expression): Take a norm_info object
4012         instead of a bool.  Cache the result of normalization.
4013         (tsubst_nested_requirement): Call satisfy_constraint_expression
4014         instead of satisfy_constraint, so that we normalize on demand.
4015         (satisfy_constraint_expression): Handle a NESTED_REQ argument.
4016         Adjust call to normalize_constraint_expression.
4017         (finish_nested_requirement): Set the TREE_TYPE of the NESTED_REQ
4018         to current_template_parms.
4019         (diagnose_nested_requirements): Go through
4020         satisfy_constraint_expression, as with tsubst_nested_requirement.
4022 2021-03-02  Patrick Palka  <ppalka@redhat.com>
4024         * constraint.cc (tsubst_parameter_mapping): Canonicalize the
4025         arguments of a substituted TYPE_ARGUMENT_PACK even if we've
4026         started with a TYPE_ARGUMENT_PACK.
4027         (finish_requires_expr): Don't set DECL_CONTEXT and
4028         CONSTRAINT_VAR_P on each of the introduced parameters here.
4029         * parser.c (cp_parser_requirement_parameter_list): Instead set
4030         these fields earlier, here.
4031         * pt.c (do_auto_deduction): Canonicalize the result of
4032         do_auto_deduction.  Pass 'complain' to finish_decltype_type.
4034 2021-03-02  Patrick Palka  <ppalka@redhat.com>
4036         * constraint.cc (tsubst_simple_requirement): Just return
4037         boolean_true_node on success.
4038         (tsubst_type_requirement): Likewise.
4039         (tsubst_compound_requirement): Likewise.
4040         (tsubst_nested_requirement): Likewise.
4041         (tsubst_requirement_body): Remove.
4042         (check_constaint_variables): Rename to ...
4043         (check_constraint_variables): ... this.
4044         (tsubst_constraint_variables): Adjust.
4045         (tsubst_requires_expr): Fold tsubst_requirement_body into here.
4047 2021-03-01  Nathan Sidwell  <nathan@acm.org>
4049         PR c++/99294
4050         * class.c (fixup_type_variants): Propagate mode, precision,
4051         alignment & emptiness.
4052         * module.cc (trees_out::type_node): Use TYPE_ALIGN_RAW.
4053         (trees_in::tree_node): Rematerialize alignment here.
4055 2021-02-27  Jason Merrill  <jason@redhat.com>
4057         PR c++/90333
4058         * parser.c (cp_parser_lambda_declarator_opt): Accept GNU attributes
4059         between () and ->.
4061 2021-02-26  Jakub Jelinek  <jakub@redhat.com>
4063         * parser.c (cp_parser_lambda_declarator_opt): Implement
4064         P1102R2 - Down with ()! Make ()s optional before lambda specifiers
4065         for -std={c,gnu}++2b or with pedwarn in earlier versions.
4067 2021-02-26  Jakub Jelinek  <jakub@redhat.com>
4069         PR c++/95451
4070         * lambda.c (is_lambda_ignored_entity): Before checking for
4071         LAMBDA_FUNCTION_P, use OVL_FIRST.  Drop FUNCTION_DECL check.
4073 2021-02-26  Jason Merrill  <jason@redhat.com>
4075         PR c++/98810
4076         * pt.c (tsubst_copy) [VIEW_CONVERT_EXPR]: Add const
4077         to a class non-type template argument that needs it.
4079 2021-02-26  Patrick Palka  <ppalka@redhat.com>
4081         PR c++/98990
4082         * pt.c (splice_late_return_type): Rebuild the entire return type
4083         if we have to adjust the level of an auto within.
4084         (type_uses_auto): Adjust call to find_type_usage.
4085         * type-utils.h (find_type_usage): Revert r10-6571 change that
4086         made this function return a pointer to the auto node.
4088 2021-02-25  Patrick Palka  <ppalka@redhat.com>
4090         PR c++/99213
4091         PR c++/94521
4092         * error.c (dump_scope): Pass TFF_NO_TEMPLATE_BINDINGS instead of
4093         TFF_NO_FUNCTION_ARGUMENTS when dumping a function scope.
4095 2021-02-25  Patrick Palka  <ppalka@redhat.com>
4097         PR c++/99103
4098         * pt.c (is_spec_or_derived): Drop cv-qualifiers from 'etype'.
4099         (maybe_aggr_guide): Fix order of arguments to is_spec_or_derived.
4101 2021-02-25  Marek Polacek  <polacek@redhat.com>
4103         DR 1312
4104         PR c++/99176
4105         * constexpr.c (is_std_construct_at): New overload.
4106         (is_std_allocator_allocate): New overload.
4107         (cxx_eval_call_expression): Use the new overloads.
4108         (cxx_eval_constant_expression): Reject casting
4109         from void * as per DR 1312.  Don't check can_convert.
4111 2021-02-25  Iain Sandoe  <iain@sandoe.co.uk>
4113         PR c++/97587
4114         * coroutines.cc (struct param_info): Track rvalue refs.
4115         (morph_fn_to_coro): Track rvalue refs, and call the promise
4116         CTOR with the frame copy of passed parms.
4118 2021-02-25  Iain Sandoe  <iain@sandoe.co.uk>
4120         PR c++/95822
4121         * coroutines.cc (morph_fn_to_coro): Unconditionally remove any
4122         set throwing_cleanup marker.
4124 2021-02-25  Nathan Sidwell  <nathan@acm.org>
4126         PR c++/99166
4127         * module.cc (module_state::inform_cmi_p): Renamed field.
4128         (module_state::do_import): Adjust.
4129         (init_modules, finish_module_processing): Likewise.
4130         (handle_module_option): Likewise.
4132 2021-02-25  Nathan Sidwell  <nathan@acm.org>
4134         PR c++/98318
4135         * mapper-client.cc (module_client::open_module_client): Fix typo
4136         of fd init.
4138 2021-02-24  Nathan Sidwell  <nathan@acm.org>
4140         PR c++/98718
4141         * module.cc (ool): New indirection vector.
4142         (loc_spans::maybe_propagate): Location is not optional.
4143         (loc_spans::open): Likewise.  Assert monotonically advancing.
4144         (module_for_ordinary_loc): Use ool indirection vector.
4145         (module_state::write_prepare_maps): Do not count empty macro
4146         expansions.  Elide empty spans.
4147         (module_state::write_macro_maps): Skip empty expansions.
4148         (ool_cmp): New qsort comparator.
4149         (module_state::write): Create and destroy ool vector.
4150         (name_pending_imports): Fix dump push/pop.
4151         (preprocess_module): Likewise.  Add more dumping.
4152         (preprocessed_module): Likewise.
4154 2021-02-24  Iain Sandoe  <iain@sandoe.co.uk>
4156         PR c++/96251
4157         * coroutines.cc (coro_common_keyword_context_valid_p): Suppress
4158         error reporting when instantiating for a constexpr.
4160 2021-02-23  Nathan Sidwell  <nathan@acm.org>
4162         PR c++/99208
4163         * decl.c (name_unnamed_type): Check DECL identity, not IDENTIFIER
4164         identity.
4166 2021-02-23  Patrick Palka  <ppalka@redhat.com>
4168         PR c++/95468
4169         * pt.c (tsubst_copy_and_build) <case BASELINK>: New case, copied
4170         over from tsubst_copy.
4172 2021-02-23  Patrick Palka  <ppalka@redhat.com>
4174         * pt.c (instantiation_dependent_expression_p): Check
4175         processing_template_decl before calling
4176         potential_constant_expression.
4178 2021-02-22  Nathan Sidwell  <nathan@acm.org>
4180         PR c++/99174
4181         * module.cc (struct module_state): Add visited_p flag.
4182         (name_pending_imports): Use it to avoid duplicate requests.
4183         (preprocess_module): Don't read preprocessor state if we failed to
4184         load a module's config.
4186 2021-02-22  Nathan Sidwell  <nathan@acm.org>
4188         PR c++/99153
4189         * decl.c (duplicate_decls): Move DECL_MODULE_IMPORT_P propagation
4190         to common-path.
4191         * module.cc (set_defining_module): Add assert.
4193 2021-02-19  Nathan Sidwell  <nathan@acm.org>
4195         PR c++/98741
4196         * module.cc (pending_imports): New.
4197         (declare_module): Adjust test condition.
4198         (name_pending_imports): New.
4199         (preprocess_module): Reimplement using pending_imports.
4200         (preprocessed_module): Move name-getting to name_pending_imports.
4201         * name-lookup.c (append_imported_binding_slot): Assert module
4202         ordering is increasing.
4204 2021-02-19  Nathan Sidwell  <nathan@acm.org>
4206         * module.cc (note_cmis): New.
4207         (struct module_state): Add inform_read_p bit.
4208         (module_state::do_import): Inform of CMI location, if enabled.
4209         (init_modules): Canonicalize note_cmis entries.
4210         (handle_module_option): Handle -flang-info-module-read=FOO.
4212 2021-02-19  Jason Merrill  <jason@redhat.com>
4214         PR c++/96926
4215         * call.c (perfect_conversion_p): Limit rvalueness
4216         test to reference bindings.
4218 2021-02-19  Jason Merrill  <jason@redhat.com>
4220         PR c++/96926
4221         * call.c (perfect_conversion_p): New.
4222         (perfect_candidate_p): New.
4223         (add_candidates): Ignore templates after a perfect non-template.
4225 2021-02-18  Nathan Sidwell  <nathan@acm.org>
4227         PR c++/99023
4228         * module.cc (canonicalize_header_name): Use
4229         cpp_probe_header_unit.
4230         (maybe_translate_include): Fix note_includes comparison.
4231         (init_modules): Fix note_includes string termination.
4233 2021-02-18  Jakub Jelinek  <jakub@redhat.com>
4235         PR c++/99132
4236         * cp-gimplify.c (cp_genericize_r) <case CALL_EXPR>: Use
4237         cp_get_callee_fndecl_nofold instead of cp_get_callee_fndecl to check
4238         for immediate function calls.
4240 2021-02-17  Nathan Sidwell  <nathan@acm.org>
4242         PR c++/99023
4243         * module.cc (struct macro_export): Add GTY markers.
4244         (macro_exports): Likewise, us a va_gc Vector.
4246 2021-02-17  Jakub Jelinek  <jakub@redhat.com>
4248         PR sanitizer/99106
4249         * init.c (build_zero_init_1): For flexible array members just return
4250         NULL_TREE instead of returning empty CONSTRUCTOR with non-complete
4251         ARRAY_TYPE.
4253 2021-02-17  Nathan Sidwell  <nathan@acm.org>
4255         PR c++/99116
4256         * name-lookup.c (do_pushdecl): Don't peek under template_parm
4257         bindings here ...
4258         (set_identifier_type_value_with_scope): ... or here.
4259         (do_pushtag): Only set_identifier_type_value_with_scope at
4260         non-class template parm scope, and use parent scope.
4262 2021-02-17  Nathan Sidwell  <nathan@acm.org>
4264         PR c++/99071
4265         * name-lookup.c (maybe_record_mergeable_decl): Deref the correct
4266         pointer.
4268 2021-02-17  Patrick Palka  <ppalka@redhat.com>
4270         PR debug/96997
4271         PR c++/94034
4272         * tree.c (build_aggr_init_expr): Revert r10-7718 change.
4274 2021-02-12  Nathan Sidwell  <nathan@acm.org>
4276         * module.cc (module_state::write_cluster): Check bindings for
4277         imported using-decls.
4279 2021-02-12  Nathan Sidwell  <nathan@acm.org>
4281         PR c++/99040
4282         * module.cc (trees_in::decl_value): Call add_module_namespace_decl
4283         for new namespace-scope entities.
4284         (module_state::read_cluster): Don't call add_module_decl here.
4285         * name-lookup.h (add_module_decl): Rename to ...
4286         (add_module_namespace_decl): ... this.
4287         * name-lookup.c (newbinding_bookkeeping): Move into ...
4288         (do_pushdecl): ... here.  Its only remaining caller.
4289         (add_module_decl): Rename to ...
4290         (add_module_namespace_decl): ... here.  Add checking-assert for
4291         circularity. Don't call newbinding_bookkeeping, just extern_c
4292         checking and incomplete var checking.
4294 2021-02-12  Nathan Sidwell  <nathan@acm.org>
4296         PR c++/99039
4297         PR c++/99040
4298         * cp-tree.h (CPTI_GLOBAL_TYPE): Delete.
4299         (global_type_node): Delete.
4300         (IDENTIFIER_TYPE_VALUE): Delete.
4301         (IDENTIFIER_HAS_TYPE_VALUE): Delete.
4302         (get_type_value): Delete.
4303         * name-lookup.h (identifier_type_value): Delete.
4304         * name-lookup.c (check_module_override): Don't
4305         SET_IDENTIFIER_TYPE_VALUE here.
4306         (do_pushdecl): Nor here.
4307         (identifier_type_value_1, identifier_type_value): Delete.
4308         (set_identifier_type_value_with_scope): Only
4309         SET_IDENTIFIER_TYPE_VALUE for local and class scopes.
4310         (pushdecl_nanmespace_level): Remove shadow stack nadgering.
4311         (do_pushtag): Use REAL_IDENTIFIER_TYPE_VALUE.
4312         * call.c (check_dtor_name): Use lookup_name.
4313         * decl.c (cxx_init_decl_processing): Drop global_type_node.
4314         * decl2.c (cplus_decl_attributes): Don't SET_IDENTIFIER_TYPE_VALUE
4315         here.
4316         * init.c (get_type_value): Delete.
4317         * pt.c (instantiate_class_template_1): Don't call pushtag or
4318         SET_IDENTIFIER_TYPE_VALUE here.
4319         (tsubst): Assert never an identifier.
4320         (dependent_type_p): Drop global_type_node assert.
4321         * typeck.c (error_args_num): Don't use IDENTIFIER_HAS_TYPE_VALUE
4322         to determine ctorness.
4324 2021-02-12  Jakub Jelinek  <jakub@redhat.com>
4326         PR c++/97742
4327         * parser.c (cp_parser_requirement_seq): Stop iterating after reaching
4328         CPP_EOF.
4330 2021-02-12  Jason Merrill  <jason@redhat.com>
4332         PR c++/97246
4333         PR c++/94546
4334         * pt.c (extract_fnparm_pack): Check DECL_PACK_P here.
4335         (register_parameter_specializations): Not here.
4337 2021-02-11  Marek Polacek  <polacek@redhat.com>
4339         PR c++/95888
4340         * pt.c (lookup_template_class_1): Pass tf_none to tsubst when looking
4341         for the partial instantiation.
4343 2021-02-11  Jakub Jelinek  <jakub@redhat.com>
4345         PR c++/99033
4346         * init.c (build_zero_init_1): Handle zero initialiation of
4347         flexible array members like initialization of [0] arrays.
4348         Use integer_minus_onep instead of comparison to integer_minus_one_node
4349         and integer_zerop instead of comparison against size_zero_node.
4350         Formatting fixes.
4352 2021-02-11  Marek Polacek  <polacek@redhat.com>
4354         PR c++/99063
4355         * semantics.c (finish_do_stmt): Check for unexpanded parameter packs.
4357 2021-02-11  Patrick Palka  <ppalka@redhat.com>
4359         PR c++/97582
4360         * name-lookup.c (op_unqualified_lookup): Handle an ambiguous
4361         lookup result by discarding it if the first element is a
4362         class-scope declaration, otherwise return it.
4363         (push_operator_bindings): Handle an ambiguous lookup result by
4364         doing push_local_binding on each element in the list.
4366 2021-02-11  Marek Polacek  <polacek@redhat.com>
4368         * parser.c (cp_parser_selection_statement): Use vec_free.
4370 2021-02-10  Jakub Jelinek  <jakub@redhat.com>
4372         PR c++/98988
4373         PR c++/99031
4374         * constexpr.c: Include cgraph.h.
4375         (cxx_eval_call_expression): Call varpool_node::finalize_decl on
4376         heap artificial vars.
4377         (cxx_eval_outermost_constant_expr): Remove varpool nodes for
4378         heap artificial vars.
4380 2021-02-10  Nathan Sidwell  <nathan@acm.org>
4382         PR c++/99030
4383         * pt.c (tsubst_copy) [VAR_DECL]: For a DECL_LOCAL_DECL_P T is the
4384         answer if there's no local specialization.
4386 2021-02-09  Nathan Sidwell  <nathan@acm.org>
4388         PR c++/98944
4389         * module.cc (module_state::is_rooted): Rename to ...
4390         (module_state::has_location): ... here.  Adjust callers.
4391         (module_state::read_partitions): Adjust validity check.
4392         Don't overwrite a known location.
4394 2021-02-09  Jason Merrill  <jason@redhat.com>
4396         PR c++/96905
4397         * pt.c (mark_decl_instantiated): Exit early if consteval.
4399 2021-02-09  Jason Merrill  <jason@redhat.com>
4401         PR c++/98326
4402         PR c++/20408
4403         * cp-gimplify.c (simple_empty_class_p): Don't touch an invisiref
4404         parm.
4406 2021-02-09  Jason Merrill  <jason@redhat.com>
4408         PR c++/98994
4409         PR c++/97566
4410         * constexpr.c (cxx_eval_store_expression): Only skip empty fields in
4411         RECORD_TYPE.
4413 2021-02-08  Nathan Sidwell  <nathan@acm.org>
4415         * decl.c (start_cleanup_fn): Push function into
4416         namespace.
4418 2021-02-08  Nathan Sidwell  <nathan@acm.org>
4420         PR c++/98531
4421         * cp-tree.h (push_abi_namespace, pop_abi_namespace): Declare.
4422         * decl.c (push_abi_namespace, pop_abi_namespace): Moved
4423         from rtti.c, add default namespace arg.
4424         (check_redeclaration_exception_specification): Allow a lazy
4425         builtin's eh spec to differ from an lready-declared user
4426         declaration.
4427         (declare_global_var): Use push/pop_abi_namespace.
4428         (get_atexit_node): Push the fndecl into a namespace.
4429         * rtti.c (push_abi_namespace, pop_abi_namespace): Moved to
4430         decl.c.
4432 2021-02-08  Marek Polacek  <polacek@redhat.com>
4434         * cp-tree.h (CLASSTYPE_TI_TEMPLATE): Fix typo.
4436 2021-02-05  Marek Polacek  <polacek@redhat.com>
4438         PR c++/98947
4439         * call.c (build_conditional_expr_1): Don't call mark_lvalue_use
4440         on arg2/arg3.
4441         * expr.c (mark_use) <case MODIFY_EXPR>: Don't check read_p when
4442         issuing the -Wvolatile warning.  Only set TREE_THIS_VOLATILE if
4443         a warning was emitted.
4445 2021-02-05  Marek Polacek  <polacek@redhat.com>
4447         PR c++/96462
4448         * name-lookup.c (lookup_using_decl): Hoist the destructor check.
4450 2021-02-05  Jakub Jelinek  <jakub@redhat.com>
4452         PR c++/97878
4453         * decl.c (check_array_initializer): For structured bindings, require
4454         the array type to be complete.
4456 2021-02-04  Jason Merrill  <jason@redhat.com>
4458         PR c++/98717
4459         * constraint.cc (build_concept_check_arguments): Remove assert.
4460         (build_concept_check): Allow empty args.
4462 2021-02-04  Tom Greenslade (thomgree)  <thomgree@cisco.com>
4464         PR c++/90926
4465         * call.c (can_convert_array): Extend to handle all valid aggregate
4466         initializers of an array; including by string literals, not just by
4467         brace-init-list.
4468         (build_aggr_conv): Call can_convert_array more often, not just in
4469         brace-init-list case.
4470         * typeck2.c (array_string_literal_compatible_p): New function.
4471         (digest_init_r): call array_string_literal_compatible_p
4472         * cp-tree.h: (array_string_literal_compatible_p): Declare.
4474 2021-02-04  Jason Merrill  <jason@redhat.com>
4476         PR c++/98802
4477         * pt.c (do_class_deduction): No aggregate guide if any_dguides_p.
4479 2021-02-04  Jason Merrill  <jason@redhat.com>
4481         PR c++/95192
4482         * pt.c (tsubst_attribute): Handle error.
4483         (apply_late_template_attributes): Return false on error.
4484         (tsubst_function_decl): Check its return value.
4485         (tsubst_decl): Likewise.
4486         (push_template_decl): Assert current_template_parms.
4487         (tsubst_template_decl): Set current_template_parms.
4489 2021-02-03  Marek Polacek  <polacek@redhat.com>
4491         PR c++/98951
4492         * call.c (struct z_candidate): Mark rewritten and reversed as const.
4493         (struct NonPublicField): Mark operator() as const.
4494         (struct NonTrivialField): Likewise.
4496 2021-02-03  Jason Merrill  <jason@redhat.com>
4498         PR c++/98926
4499         PR c++/98570
4500         * pt.c (spec_hasher::equal): Set processing_template_decl.
4501         * Make-lang.in (check-g++-strict-gc): Add --param
4502         hash-table-verification-limit=10000.
4504 2021-02-03  Marek Polacek  <polacek@redhat.com>
4506         PR c++/98899
4507         * parser.c (cp_parser_class_specifier_1): Use any possible
4508         DEFPARSE_INSTANTIATIONS to update DEFERRED_NOEXCEPT_PATTERN.
4509         (cp_parser_save_noexcept): Initialize DEFPARSE_INSTANTIATIONS.
4510         * pt.c (tsubst_exception_specification): Stash new_specs into
4511         DEFPARSE_INSTANTIATIONS.
4512         * tree.c (fixup_deferred_exception_variants): Use
4513         UNPARSED_NOEXCEPT_SPEC_P.
4515 2021-02-02  Jason Merrill  <jason@redhat.com>
4517         PR c++/98929
4518         PR c++/96199
4519         * error.c (dump_expr): Ignore dummy object.
4520         * pt.c (tsubst_baselink): Handle dependent scope.
4522 2021-02-01  Patrick Palka  <ppalka@redhat.com>
4524         PR c++/98295
4525         * constexpr.c (cxx_eval_array_reference): Also set
4526         new_ctx.object when setting new_ctx.ctor.
4528 2021-02-01  Marek Polacek  <polacek@redhat.com>
4530         PR c++/98355
4531         * parser.c (cp_parser_has_attribute_expression): Use
4532         uses_template_parms instead of type_dependent_expression_p.
4534 2021-02-01  Jason Merrill  <jason@redhat.com>
4536         PR c++/98570
4537         * cp-tree.h: Declare it.
4538         * pt.c (comparing_dependent_aliases): New flag.
4539         (template_args_equal, spec_hasher::equal): Set it.
4540         (dependent_alias_template_spec_p): Assert that we don't
4541         get non-types other than error_mark_node.
4542         (instantiate_alias_template): SET_TYPE_STRUCTURAL_EQUALITY
4543         on complex alias specializations.  Set TYPE_DEPENDENT_P here.
4544         (tsubst_decl): Not here.
4545         * module.cc (module_state::read_cluster): Set
4546         comparing_dependent_aliases instead of
4547         comparing_specializations.
4548         * tree.c (cp_tree_equal): Remove comparing_specializations
4549         module handling.
4550         * typeck.c (structural_comptypes): Adjust.
4551         (comptypes): Remove comparing_specializations handling.
4553 2021-01-29  Nathan Sidwell  <nathan@acm.org>
4555         PR c++/98843
4556         * module.cc (module_state_config): Add num_entities field.
4557         (module_state::read_entities): The entity_ary span is
4558         already allocated.
4559         (module_state::write_config): Write num_entities.
4560         (module_state::read_config): Read num_entities.
4561         (module_state::write): Set config's num_entities.
4562         (module_state::read_initial): Allocate the entity ary
4563         span here.
4564         (module_state::read_language): Do not set entity_lwm
4565         here.
4567 2021-01-29  Marek Polacek  <polacek@redhat.com>
4569         PR c++/96137
4570         * parser.c (cp_parser_class_name): If parser->scope is
4571         error_mark_node, return it, otherwise continue.
4573 2021-01-28  Jakub Jelinek  <jakub@redhat.com>
4575         PR c++/98841
4576         * typeck.c (build_x_indirect_ref): For *this, return current_class_ref.
4578 2021-01-28  Jakub Jelinek  <jakub@redhat.com>
4580         PR c++/33661
4581         PR c++/98847
4582         * decl.c (cp_finish_decl): For register vars with asmspec in templates
4583         call set_user_assembler_name and set DECL_HARD_REGISTER.
4584         * pt.c (tsubst_expr): When instantiating DECL_HARD_REGISTER vars,
4585         pass asmspec_tree to cp_finish_decl.
4587 2021-01-28  Nathan Sidwell  <nathan@acm.org>
4589         PR c++/98770
4590         * module.cc (trees_out::decl_value): Swap is_typedef & TYPE_NAME
4591         check order.
4592         (trees_in::decl_value): Do typedef frobbing only when installing
4593         a new typedef, adjust is_matching_decl call.  Swap is_typedef
4594         & TYPE_NAME check.
4595         (trees_in::is_matching_decl): Add is_typedef parm. Adjust variable
4596         names and deal with typedef checking.
4598 2021-01-27  Jason Merrill  <jason@redhat.com>
4600         PR c++/97874
4601         * name-lookup.c (lookup_using_decl): Clean up handling
4602         of dependency and inherited constructors.
4603         (finish_nonmember_using_decl): Handle DECL_DEPENDENT_P.
4604         * pt.c (tsubst_expr): Handle DECL_DEPENDENT_P.
4606 2021-01-26  Jason Merrill  <jason@redhat.com>
4608         PR c++/97474
4609         * call.c (type_passed_as): Don't mark invisiref restrict.
4611 2021-01-26  Jason Merrill  <jason@redhat.com>
4613         PR c++/97566
4614         PR c++/98463
4615         * class.c (layout_class_type): An empty field gets size 0.
4616         (is_empty_field): New.
4617         (check_bases): Check it.
4618         * cp-tree.h (is_empty_field): Declare it.
4619         * constexpr.c (cxx_eval_store_expression): Check it.
4620         (cx_check_missing_mem_inits): Likewise.
4621         * init.c (perform_member_init): Likewise.
4622         * typeck2.c (process_init_constructor_record): Likewise.
4624 2021-01-25  Martin Sebor  <msebor@redhat.com>
4626         PR c++/98646
4627         * cvt.c (cp_fold_convert): Propagate TREE_NO_WARNING.
4629 2021-01-25  Jason Merrill  <jason@redhat.com>
4631         PR c++/98463
4632         * constexpr.c (get_or_insert_ctor_field): Add check.
4633         (cxx_eval_store_expression): Handle discontinuity of refs.
4635 2021-01-23  Anthony Sharp  <anthonysharp15@gmail.com>
4637         * call.c (complain_about_access): Altered function.
4638         * cp-tree.h (complain_about_access): Changed parameters of function.
4639         (get_parent_with_private_access): Declared new function.
4640         * search.c (get_parent_with_private_access): Defined new function.
4641         * semantics.c (enforce_access): Modified function.
4642         * typeck.c (complain_about_unrecognized_member): Updated function
4643         arguments in complain_about_access.
4645 2021-01-23  Patrick Palka  <ppalka@redhat.com>
4647         PR c++/97399
4648         * cp-tree.h (shared_member_p): Adjust declaration.
4649         * parser.c (cp_parser_init_declarator): If the storage class
4650         specifier is sc_static, pass true for static_p to
4651         cp_parser_declarator.
4652         (cp_parser_direct_declarator): Don't do inject_this_parm when
4653         the declarator is a friend.
4654         * search.c (shared_member_p): Change return type to bool and
4655         adjust function body accordingly.  Return false for a dependent
4656         USING_DECL instead of aborting.
4657         * semantics.c (finish_qualified_id_expr): Rely on shared_member_p
4658         even when type-dependent.
4660 2021-01-22  Marek Polacek  <polacek@redhat.com>
4662         PR c++/96623
4663         * parser.c (inject_parm_decls): Remove a redundant assignment.
4664         (cp_parser_class_specifier_1): Clear current_class_{ptr,ref}
4665         before calling inject_parm_decls.
4667 2021-01-22  Jason Merrill  <jason@redhat.com>
4669         PR c++/98744
4670         * call.c (make_base_init_ok): Use DECL_HAS_VTT_PARM_P.
4672 2021-01-22  Jakub Jelinek  <jakub@redhat.com>
4674         PR sanitizer/95693
4675         * init.c (build_zero_init_1): Revert the 2018-03-06 change to
4676         return build_zero_cst for reference types.
4677         * typeck2.c (process_init_constructor_record): Instead call
4678         build_zero_cst here during error recovery instead of build_zero_init.
4680 2021-01-22  Marek Polacek  <polacek@redhat.com>
4682         PR c++/98545
4683         * mangle.c (write_member_name): Emit abi_warn_or_compat_version_crosses
4684         warnings regardless of abi_version_at_least.
4685         (write_expression): When the expression is a dependent name
4686         and an operator name, write "on" before writing its name.
4688 2021-01-22  Marek Polacek  <polacek@redhat.com>
4690         PR c++/97966
4691         * pt.c (instantiate_class_template_1): Instantiate members
4692         marked with attribute used only after we're done instantiating
4693         the class.
4695 2021-01-21  Patrick Palka  <ppalka@redhat.com>
4697         PR c++/71879
4698         * semantics.c (finish_decltype_type): Set up a cp_unevaluated
4699         sentinel at the start of the function.  Remove a now-redundant
4700         manual adjustment of cp_unevaluated_operand.
4702 2021-01-21  Nathan Sidwell  <nathan@acm.org>
4704         PR c++/98624
4705         * module.cc (depset::hash::find_dependencies): Add
4706         module arg.
4707         (trees_out::core_vals): Check state before calling
4708         write_location.
4709         (sort_cluster, module_state::write): Adjust
4710         find_dependencies call.
4712 2021-01-21  Jakub Jelinek  <jakub@redhat.com>
4714         PR c++/98672
4715         * constexpr.c (check_for_return_continue_data): Add break_stmt member.
4716         (check_for_return_continue): Also look for BREAK_STMT.  Handle
4717         SWITCH_STMT by ignoring break_stmt from its body.
4718         (potential_constant_expression_1) <case FOR_STMT>,
4719         <case WHILE_STMT>: If the condition isn't constant true, check if
4720         the loop body can contain a return stmt.
4721         <case SWITCH_STMT>: Adjust check_for_return_continue_data initializer.
4722         <case IF_STMT>: If recursion with tf_none is successful,
4723         merge *jump_target from the branches - returns with highest priority,
4724         breaks or continues lower.  If then branch is potentially constant and
4725         doesn't return, check the else branch if it could return, break or
4726         continue.
4728 2021-01-21  Nathan Sidwell  <nathan@acm.org>
4730         PR c++/98530
4731         * name-lookup.c (lookup_class_binding): Rearrange a stat-hack.
4733 2021-01-20  Nathan Sidwell  <nathan@acm.org>
4735         * module.cc (bytes_in::i, bytes_in::wi): Avoid left shift of
4736         signed type.
4738 2021-01-20  Patrick Palka  <ppalka@redhat.com>
4740         PR c++/95434
4741         * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: If tsubsting
4742         CLASS_PLACEHOLDER_TEMPLATE yields a TEMPLATE_TEMPLATE_PARM,
4743         adjust to its TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
4745 2021-01-20  Patrick Palka  <ppalka@redhat.com>
4747         PR c++/82613
4748         * parser.c (cp_parser_class_head): Defer access checking when
4749         parsing the base-clause until all bases are seen and attached
4750         to the class type.
4751         * pt.c (instantiate_class_template): Likewise when substituting
4752         into dependent bases.
4754 2021-01-20  Jakub Jelinek  <jakub@redhat.com>
4756         PR c++/98742
4757         * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_DETACH>: If
4758         error_operand_p, remove clause without further checking.  Check
4759         for non-NULL TYPE_NAME.
4761 2021-01-19  Marek Polacek  <polacek@redhat.com>
4763         PR c++/98659
4764         * pt.c (maybe_instantiate_noexcept): Return false if FN is
4765         error_mark_node.
4767 2021-01-19  Marek Polacek  <polacek@redhat.com>
4769         PR c++/98687
4770         * name-lookup.c (push_using_decl_bindings): New, broken out of...
4771         (finish_nonmember_using_decl): ...here.
4772         * name-lookup.h (push_using_decl_bindings): Update declaration.
4773         * pt.c (tsubst_expr): Update the call to push_using_decl_bindings.
4775 2021-01-19  Patrick Palka  <ppalka@redhat.com>
4777         PR c++/41437
4778         PR c++/58993
4779         * search.c (friend_accessible_p): If scope is a hidden friend
4780         defined inside a dependent class, consider access from the
4781         class.
4782         * parser.c (cp_parser_late_parsing_for_member): Don't push a
4783         dk_no_check access state.
4785 2021-01-19  Marek Polacek  <polacek@redhat.com>
4787         PR c++/98333
4788         * parser.c (cp_parser_class_specifier_1): Perform late-parsing
4789         of NSDMIs before late-parsing of noexcept-specifiers.
4791 2021-01-19  Nathan Sidwell  <nathan@acm.org>
4793         * module.cc (identifier): Merge overloads.
4795 2021-01-19  Nathan Sidwell  <nathan@acm.org>
4797         PR c++/98624
4798         * module.cc (trees_out::write_location): Make static.
4800 2021-01-16  Kwok Cheung Yeung  <kcy@codesourcery.com>
4802         * parser.c (cp_parser_omp_clause_detach): New.
4803         (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH.
4804         (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
4805         * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
4806         * semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
4807         Prevent use of detach with mergeable and overriding the data sharing
4808         mode of the event handle.
4810 2021-01-15  Nathan Sidwell  <nathan@acm.org>
4812         PR c++/98538
4813         * tree.c (cp_build_qualified_type_real): Propagate an array's
4814         dependentness to the copy, if known.
4816 2021-01-15  Jason Merrill  <jason@redhat.com>
4818         PR c++/98642
4819         * call.c (unsafe_return_slot_p): Return int.
4820         (init_by_return_slot_p): Split out from...
4821         (unsafe_copy_elision_p): ...here.
4822         (unsafe_copy_elision_p_opt): New name for old meaning.
4823         (build_over_call): Adjust.
4824         (make_safe_copy_elision): New.
4825         * typeck2.c (split_nonconstant_init_1): Elide copy from safe
4826         list-initialization.
4827         * cp-tree.h: Adjust.
4829 2021-01-15  Jason Merrill  <jason@redhat.com>
4831         * call.c (base_ctor_for, make_base_init_ok): New.
4832         (build_over_call): Use make_base_init_ok.
4834 2021-01-15  Jason Merrill  <jason@redhat.com>
4836         PR c++/63707
4837         * tree.c (build_vec_init_expr): Don't call build_vec_init_elt
4838         if we got a CONSTRUCTOR.
4840 2021-01-15  Nathan Sidwell  <nathan@acm.org>
4842         PR c++/98591
4843         * lang-specs.h: Fix handling of -fmodule-only with -fsyntax-only.
4845 2021-01-14  Jason Merrill  <jason@redhat.com>
4847         * typeck2.c (process_init_constructor_record): Use fldtype
4848         variable consistently.
4850 2021-01-14  Nathan Sidwell  <nathan@acm.org>
4852         PR c++/98372
4853         * tree.c (cp_tree_equal): Correct map_context logic.
4855 2021-01-13  Marek Polacek  <polacek@redhat.com>
4857         PR c++/98231
4858         * name-lookup.c (push_using_decl_bindings): New.
4859         * name-lookup.h (push_using_decl_bindings): Declare.
4860         * pt.c (tsubst_expr): Call push_using_decl_bindings.
4862 2021-01-13  Nathan Sidwell  <nathan@acm.org>
4864         PR c++/98626
4865         * module.cc (module_add_import_initializers):  Pass a
4866         zero-element argument vector.
4868 2021-01-12  Patrick Palka  <ppalka@redhat.com>
4870         PR c++/98611
4871         * tree.c (cp_walk_subtrees) <case TEMPLATE_TYPE_PARM>: Visit
4872         the template of a CTAD placeholder.
4874 2021-01-12  Marek Polacek  <polacek@redhat.com>
4876         PR c++/98620
4877         * typeck2.c (process_init_constructor_record): Don't emit
4878         -Wmissing-field-initializers warnings in unevaluated contexts.
4880 2021-01-11  Jakub Jelinek  <jakub@redhat.com>
4882         PR c++/98481
4883         * class.c (find_abi_tags_r): Set *walk_subtrees to 2 instead of 1
4884         for types.
4885         (mark_abi_tags_r): Likewise.
4886         * decl2.c (min_vis_r): Likewise.
4887         * tree.c (cp_walk_subtrees): If *walk_subtrees_p is 2, look through
4888         typedefs.
4890 2021-01-08  Patrick Palka  <ppalka@redhat.com>
4892         PR c++/98551
4893         * constexpr.c (cxx_eval_call_expression): Check CLASS_TYPE_P
4894         instead of AGGREGATE_TYPE_P before calling replace_result_decl.
4896 2021-01-08  Patrick Palka  <ppalka@redhat.com>
4898         PR c++/98515
4899         * semantics.c (check_accessibility_of_qualified_id): Punt if
4900         we're checking access of a scoped non-static member inside a
4901         class template.
4903 2021-01-07  Jakub Jelinek  <jakub@redhat.com>
4905         PR c++/98329
4906         * pt.c (tsubst_copy) <case BIT_CAST_EXPR>: Don't call
4907         cp_build_bit_cast here, instead just build_min a BIT_CAST_EXPR and set
4908         its location.
4909         (tsubst_copy_and_build): Handle BIT_CAST_EXPR.
4911 2021-01-07  Marek Polacek  <polacek@redhat.com>
4913         PR c++/98441
4914         * decl.c (grokdeclarator): Move the !funcdecl_p check inside the
4915         !late_return_type block.
4917 2021-01-07  Jason Merrill  <jason@redhat.com>
4919         * constexpr.c (cxx_bind_parameters_in_call): Add comment.
4920         (cxx_eval_store_expression): Add comment.
4922 2021-01-07  Jason Merrill  <jason@redhat.com>
4924         * call.c (has_next): Factor out from...
4925         (next_conversion): ...here.
4926         (strip_standard_conversion): And here.
4927         (is_subseq): And here.
4928         (build_conv): Check it.
4929         (standard_conversion): Don't call build_conv
4930         for ck_identity.
4932 2021-01-06  Martin Sebor  <msebor@redhat.com>
4934         PR c++/95768
4935         * error.c (dump_expr): Call c_pretty_printer::unary_expression.
4937 2021-01-05  Patrick Palka  <ppalka@redhat.com>
4939         * pt.c (unify) <case TEMPLATE_PARM_INDEX>: After walking into
4940         the type of the NTTP, substitute into the type again.  If the
4941         type is still dependent, don't unify the NTTP.
4943 2021-01-05  Jakub Jelinek  <jakub@redhat.com>
4945         * Make-lang.in (cc1plus-checksum, cc1plus$(exeext): Add
4946         $(CODYLIB) after $(BACKEND).
4948 2021-01-05  Jakub Jelinek  <jakub@redhat.com>
4950         PR c++/98469
4951         * constexpr.c (cxx_eval_constant_expression) <case BIT_CAST_EXPR>:
4952         Punt if lval is true.
4953         * semantics.c (cp_build_bit_cast): Call get_target_expr_sfinae on
4954         the result if it has a class type.
4956 2021-01-05  Marek Polacek  <polacek@redhat.com>
4958         PR c++/82099
4959         * pt.c (resolve_overloaded_unification): Call
4960         maybe_instantiate_noexcept after instantiating the function
4961         decl.
4963 2021-01-05  Nathan Sidwell  <nathan@acm.org>
4965         * parser.c (cp_parser_module_declaration): Alter diagnostic
4966         text to say where is permissable.
4968 2021-01-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4970         PR c++/98316
4971         * Make-lang.in (cc1plus$(exeext)): Add $(CODYLIB), $(NETLIBS).
4973 2021-01-02  Jan Hubicka  <jh@suse.cz>
4975         * cp-tree.h (cp_tree_c_finish_parsing): Declare.
4976         * decl2.c (c_parse_final_cleanups): Call cp_tree_c_finish_parsing.
4977         * tree.c (cp_tree_c_finish_parsing): New function.
4979 2021-01-01  Jakub Jelinek  <jakub@redhat.com>
4981         * ChangeLog-2020: Rotate ChangeLog.  New file.
4984 Copyright (C) 2021 Free Software Foundation, Inc.
4986 Copying and distribution of this file, with or without modification,
4987 are permitted in any medium without royalty provided the copyright
4988 notice and this notice are preserved.