1 2021-05-25 Jakub Jelinek <jakub@redhat.com>
4 * call.c (convert_arg_to_ellipsis): For expressions with NULLPTR_TYPE
5 and side-effects, temporarily disable -Wunused-result warning when
6 building COMPOUND_EXPR.
8 2021-05-21 Jakub Jelinek <jakub@redhat.com>
11 * semantics.c (finish_omp_clauses): Move firstprivate clauses with
12 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
13 if a decl is mentioned both in map clause and in such firstprivate
14 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
16 2021-05-20 Jason Merrill <jason@redhat.com>
18 * call.c (reference_binding): Check for designator.
19 (implicit_conversion_1, build_special_member_call): Likewise.
20 * decl.c (reshape_init_r): Likewise.
21 * pt.c (do_class_deduction): Likewise.
22 * typeck2.c (digest_init_r): Likewise.
24 2021-05-20 Jason Merrill <jason@redhat.com>
27 * decl.c (reshape_init_class): Handle designator for
28 member of anonymous aggregate here.
29 * typeck2.c (process_init_constructor_record): Not here.
31 2021-05-20 Jonathan Wakely <jwakely@redhat.com>
33 * call.c (maybe_warn_array_conv): Use new warning option.
34 * decl.c (mark_inline_variable, grokdeclarator): Likewise.
35 * error.c (maybe_warn_cpp0x): Likewise.
36 * parser.c (cp_parser_primary_expression)
37 (cp_parser_unqualified_id)
38 (cp_parser_pseudo_destructor_name)
39 (cp_parser_lambda_introducer)
40 (cp_parser_lambda_declarator_opt)
41 (cp_parser_selection_statement)
42 (cp_parser_init_statement)
43 (cp_parser_decomposition_declaration)
44 (cp_parser_function_specifier_opt)
45 (cp_parser_static_assert)
46 (cp_parser_namespace_definition)
47 (cp_parser_using_declaration)
48 (cp_parser_asm_definition)
49 (cp_parser_ctor_initializer_opt_and_function_body)
50 (cp_parser_initializer_list)
51 (cp_parser_type_parameter_key)
52 (cp_parser_member_declaration)
54 (cp_parser_std_attribute_spec): Likewise.
55 * pt.c (check_template_variable): Likewise.
57 2021-05-20 Jason Merrill <jason@redhat.com>
60 * pt.c (invalid_nontype_parm_type_p): Return true for COMPLEX_TYPE.
62 2021-05-20 Jason Merrill <jason@redhat.com>
65 * cp-tree.h (CONST_DECL_USING_P): Check for null TREE_TYPE.
67 2021-05-19 Jason Merrill <jason@redhat.com>
71 * method.c (genericize_spaceship): Use fold_build2 for scalar
74 2021-05-19 Jason Merrill <jason@redhat.com>
76 * pt.c (build_deduction_guide): Treat the implicit deduction guide
77 as a member of the class.
79 2021-05-19 Marek Polacek <polacek@redhat.com>
82 * cp-tree.h (any_non_type_attribute_p): Remove.
83 * decl.c (grokdeclarator): Turn an error into a warning and only
84 warn for standard attributes.
85 * decl2.c (any_non_type_attribute_p): Remove.
86 * parser.c (cp_parser_elaborated_type_specifier): Turn an error
87 into a warning and only warn for standard attributes.
88 (cp_parser_member_declaration): Likewise.
90 2021-05-19 Martin Liska <mliska@suse.cz>
93 * mangle.c (write_encoding): Fix typos.
95 2021-05-19 Jakub Jelinek <jakub@redhat.com>
98 * parser.c (cp_parser_omp_master): Set OMP_MASTER_COMBINED on
99 master when combined with taskloop.
100 (cp_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
101 parallel master when not combined with taskloop.
103 2021-05-19 Jason Merrill <jason@redhat.com>
106 * rtti.c (get_tinfo_decl_direct): Check TYPE_TRANSPARENT_AGGR.
108 2021-05-19 Jason Merrill <jason@redhat.com>
111 * tree.c (strip_typedefs): Only look at the pattern of a
112 TYPE_PACK_EXPANSION if it's a type.
114 2021-05-18 Marek Polacek <polacek@redhat.com>
116 * class.c (classtype_has_non_deleted_copy_ctor): Remove.
117 * constraint.cc (contains_wildcard_p): Likewise.
118 (get_template_head_requirements): Likewise.
119 (check_constrained_friend): Likewise.
120 (subsumes_constraints): Likewise.
121 * cp-tree.h (classtype_has_non_deleted_copy_ctor): Likewise.
122 (push_void_library_fn): Likewise.
123 (get_pattern_parm): Likewise.
124 (get_template_parms_at_level): Likewise.
125 (lambda_return_type): Likewise.
126 (get_template_head_requirements): Likewise.
127 (check_constrained_friend): Likewise.
128 (subsumes_constraints): Likewise.
129 * decl.c (push_void_library_fn): Likewise.
130 * lambda.c (lambda_return_type): Likewise.
131 * pt.c (get_template_parms_at_level): Likewise.
132 (get_pattern_parm): Likewise.
134 2021-05-18 Jason Merrill <jason@redhat.com>
137 * call.c (perfect_candidate_p): An implicitly deleted move
140 2021-05-18 Andreas Krebbel <krebbel@linux.ibm.com>
143 * cvt.c (cp_convert_to_pointer): Use the size of the target
145 * tree.c (cp_build_reference_type): Call
146 cp_build_reference_type_for_mode with VOIDmode.
147 (cp_build_reference_type_for_mode): Rename from
148 cp_build_reference_type. Add MODE argument and invoke
149 build_reference_type_for_mode.
150 (strip_typedefs): Use build_pointer_type_for_mode and
151 cp_build_reference_type_for_mode for pointers and references.
153 2021-05-17 Jonathan Wakely <jwakely@redhat.com>
156 * call.c (convert_like_internal): Print different diagnostic if
157 the lvalue reference is const.
159 2021-05-14 Jason Merrill <jason@redhat.com>
162 * pt.c (enclosing_instantiation_of): Just compare
163 DECL_SOURCE_LOCATION.
164 (regenerate_decl_from_template): Copy DECL_SOURCE_LOCATION.
166 2021-05-14 Marek Polacek <polacek@redhat.com>
167 Jason Merrill <jason@redhat.com>
170 * cp-tree.h (any_non_type_attribute_p): Declare.
171 * decl.c (grokdeclarator): Diagnose when an attribute appertains to
172 a friend declaration that is not a definition.
173 * decl2.c (any_non_type_attribute_p): New.
174 * parser.c (cp_parser_decl_specifier_seq): Diagnose standard attributes
175 in the middle of decl-specifiers.
176 (cp_parser_elaborated_type_specifier): Diagnose when an attribute
177 appertains to a friend declaration that is not a definition.
178 (cp_parser_member_declaration): Likewise.
180 2021-05-12 Marek Polacek <polacek@redhat.com>
182 * pt.c (tsubst_copy_and_build): Add warn_int_in_bool_context
185 2021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
187 * parser.c (cp_parser_omp_clause_map): Support map-type-modifier
190 2021-05-11 Jason Merrill <jason@redhat.com>
193 * typeck.c (build_reinterpret_cast_1): Check intype on
196 2021-05-11 Patrick Palka <ppalka@redhat.com>
199 * name-lookup.c (maybe_save_operator_binding): Unconditionally
200 enable for all function templates, not just generic lambdas.
201 Handle compound-assignment operator expressions.
202 * typeck.c (build_x_compound_expr): Call maybe_save_operator_binding
203 in the type-dependent case.
204 (build_x_modify_expr): Likewise. Move declaration of 'op' closer
207 2021-05-11 Patrick Palka <ppalka@redhat.com>
210 * constraint.cc (tsubst_constraint): Set up cp_unevaluated.
211 (satisfy_atom): Set up iloc_sentinel before calling
213 * pt.c (tsubst_pack_expansion): When returning a rebuilt pack
214 expansion, carry over PACK_EXPANSION_LOCAL_P and
215 PACK_EXPANSION_SIZEOF_P from the original pack expansion.
217 2021-05-10 Richard Biener <rguenther@suse.de>
221 * call.c (set_up_extended_ref_temp): Mark the temporary
222 addressable if the TARGET_EXPR was.
224 2021-05-10 Martin Liska <mliska@suse.cz>
226 * decl.c (duplicate_decls): Use startswith
227 function instead of strncmp.
228 (cxx_builtin_function): Likewise.
229 (omp_declare_variant_finalize_one): Likewise.
230 (grokfndecl): Likewise.
231 * error.c (dump_decl_name): Likewise.
232 * mangle.c (find_decomp_unqualified_name): Likewise.
233 (write_guarded_var_name): Likewise.
234 (decl_tls_wrapper_p): Likewise.
235 * parser.c (cp_parser_simple_type_specifier): Likewise.
236 (cp_parser_tx_qualifier_opt): Likewise.
237 * pt.c (template_parm_object_p): Likewise.
238 (dguide_name_p): Likewise.
240 2021-05-10 Martin Liska <mliska@suse.cz>
243 * decl.c (grokdeclarator): Remove redundant NULL check.
245 2021-05-07 Jason Merrill <jason@redhat.com>
247 * tree.c (rvalue): Assert expr is not a class lvalue.
249 2021-05-07 Jason Merrill <jason@redhat.com>
251 * cp-tree.h (build_stub_object): Declare.
252 * method.c (build_stub_object): No longer static.
253 * call.c (can_convert): Use it.
254 * tree.c (build_dummy_object): Adjust comment.
255 * typeck.c (cp_build_binary_op): Wrap SPACESHIP_EXPR in a
258 2021-05-07 Jason Merrill <jason@redhat.com>
260 * coroutines.cc (build_co_await): Don't call 'rvalue'.
261 (flatten_await_stmt): Simplify initialization.
262 (morph_fn_to_coro): Change 'rvalue' to 'move'. Simplify.
264 2021-05-04 Tobias Burnus <tobias@codesourcery.com>
266 * semantics.c (finish_omp_reduction_clause): Accept float + complex
267 for || and && reductions.
269 2021-05-03 Patrick Palka <ppalka@redhat.com>
272 * parser.c (cp_parser_class_head): Reinstate calls to pushclass
273 and popclass when parsing the base-clause that were removed in
276 2021-05-03 Patrick Palka <ppalka@redhat.com>
280 * pt.c (tsubst_copy_and_build) <case CALL_EXPR>: Set tf_conv
281 only when the callee is a FUNCTION_DECL.
283 2021-05-03 Marek Polacek <polacek@redhat.com>
286 * decl.c (grokfndecl): Check current_template_parms.
288 2021-05-03 Marek Polacek <polacek@redhat.com>
291 * constexpr.c (cxx_eval_constant_expression): Don't check
294 2021-05-01 Jason Merrill <jason@redhat.com>
296 * cp-tree.h (class ovl_iterator): Allow copying. Add op==.
297 (class ovl_range, class lkp_range): New.
298 * call.c (build_op_call_1, add_candidates): Use them.
299 (build_op_delete_call, has_trivial_copy_assign_p): Likewise.
300 (has_trivial_copy_p): Likewise.
301 * class.c (handle_using_decl, get_basefndecls): Likewise.
302 (maybe_warn_about_overly_private_class): Likewise.
303 (warn_hidden, add_implicitly_declared_members): Likewise.
304 (check_methods, clone_constructors_and_destructors): Likewise.
305 (type_has_user_nondefault_constructor): Likewise.
307 2021-04-29 Jason Merrill <jason@redhat.com>
309 * constexpr.c (cxx_fold_indirect_ref_1): Only set *empty_base if we
312 2021-04-29 Jason Merrill <jason@redhat.com>
315 * decl2.c (grokfield): Call cplus_decl_attributes for friend.
316 (save_template_attributes): Use chainon.
317 * friend.c (do_friend): Remove attrlist parm.
318 * cp-tree.h (do_friend): Adjust.
319 * class.c (add_implicitly_declared_members): Adjust.
320 * decl.c (grokdeclarator): Adjust.
321 * pt.c (apply_late_template_attributes): Optimize.
323 2021-04-29 Jason Merrill <jason@redhat.com>
326 * class.c (finish_struct_anon_r): Drop complain parm.
327 Remove non-field diagnostic.
328 (finish_struct_anon): Adjust.
329 * decl.c (fixup_anonymous_aggr): Move non-field diagnostic here.
331 2021-04-29 Jason Merrill <jason@redhat.com>
333 * cp-tree.h (cp_evaluated): Add reset parm to constructor.
334 * parser.c (cp_parser_constant_expression): Change
335 allow_non_constant_p to int. Use cp_evaluated.
336 (cp_parser_initializer_clause): Pass 2 to allow_non_constant_p.
337 * semantics.c (finish_id_expression_1): Don't mess with
338 cp_unevaluated_operand here.
340 2021-04-29 Jason Merrill <jason@redhat.com>
342 * cp-tree.h: Clarify comments.
343 * pt.c (get_template_parm_object): Add assert.
344 * semantics.c (finish_compound_literal): Clear TREE_HAS_CONSTRUCTOR.
345 * tree.c (zero_init_expr_p): Check TREE_HAS_CONSTRUCTOR.
346 * typeck2.c (store_init_value): Likewise.
348 2021-04-29 Patrick Palka <ppalka@redhat.com>
351 * pt.c (tsubst_copy_and_build) <case CALL_EXPR>: When KOENIG_P,
352 set tf_conv during the initial substitution into the function.
354 2021-04-29 Jakub Jelinek <jakub@redhat.com>
357 * semantics.c (finish_omp_clauses): Fix up check that variable
358 mentioned in detach clause doesn't appear in data-sharing clauses.
360 2021-04-28 Jakub Jelinek <jakub@redhat.com>
362 * module.cc: Remove #error that triggers if DEV-PHASE is empty.
364 2021-04-27 Jason Merrill <jason@redhat.com>
367 * class.c (classtype_has_depr_implicit_copy): Check DECL_CONTEXT
370 2021-04-27 Patrick Palka <ppalka@redhat.com>
373 * pt.c (tsubst_initializer_list): Correctly handle the case
374 where an argument inside a base initializer pack expansion is
375 itself a pack expansion.
377 2021-04-26 Patrick Palka <ppalka@redhat.com>
380 * constexpr.c (cxx_fold_indirect_ref): Try to canonicalize the
381 object/offset pair for a POINTER_PLUS_EXPR of a COMPONENT_REF
382 with a negative offset into one whose offset is nonnegative
383 before calling cxx_fold_indirect_ref_1.
385 2021-04-24 Patrick Palka <ppalka@redhat.com>
392 * pt.c (do_class_deduction): Punt if the initializer is
395 2021-04-24 Patrick Palka <ppalka@redhat.com>
398 * parser.c (cp_parser_type_id_1): If we see a template
399 placeholder, first try simulating an error before issuing
402 2021-04-23 Patrick Palka <ppalka@redhat.com>
405 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause):
406 Adjust parameter list loop to iterate over 'types' instead of
407 'args'. Output the trailing '...' for a variadic function.
408 Remove PARM_DECL support.
409 (pp_cxx_requires_expr): Pretty print the parameter list directly
410 instead of going through pp_cxx_parameter_declaration_clause.
412 2021-04-23 Patrick Palka <ppalka@redhat.com>
415 * decl.c (is_direct_enum_init): Check the implicit
416 convertibility requirement added by CWG 2374.
418 2021-04-23 Martin Liska <mliska@suse.cz>
420 * cp-tree.h (STATIC_ASSERT): Prefer static assert.
421 * lex.c (init_operators): Remove run-time check.
423 2021-04-22 Marek Polacek <polacek@redhat.com>
426 * pt.c (tsubst_copy_and_build) <case PLUS_EXPR>: Test op0 and
427 op1 separately for value- or type-dependence.
429 2021-04-21 Marek Polacek <polacek@redhat.com>
432 * parser.c (cp_parser_enum_specifier): Don't allow defining
435 2021-04-21 Martin Liska <mliska@suse.cz>
438 2021-04-21 Martin Liska <mliska@suse.cz>
440 * error.c (dump_decl): Use flags in dump_generic_node call.
442 2021-04-21 Martin Liska <mliska@suse.cz>
444 * error.c (dump_decl): Use flags in dump_generic_node call.
446 2021-04-21 Martin Liska <mliska@suse.cz>
448 * error.c (dump_decl): Support anonymous labels.
450 2021-04-20 Jason Merrill <jason@redhat.com>
453 * pt.c (find_parameter_packs_r): Look into enum initializers.
455 2021-04-19 Marek Polacek <polacek@redhat.com>
458 * decl.c (grokvardecl): Given an error when a concept is not defined
461 2021-04-16 Jakub Jelinek <jakub@redhat.com>
464 * constexpr.c (cxx_eval_store_expression): Don't add CONSTRUCTORs
465 for empty classes into *valp when types don't match even when *valp
468 2021-04-16 Marek Polacek <polacek@redhat.com>
471 * decl.c (make_typename_type): Give an error and return when
472 name is is_overloaded_fn.
473 * parser.c (cp_parser_class_name): Don't check is_overloaded_fn
474 before calling make_typename_type.
476 2021-04-16 Patrick Palka <ppalka@redhat.com>
479 * constexpr.c (reduced_constant_expression_p): For array
480 CONSTRUCTORs, use a dedicated loop that additionally verifies
481 the CONSTRUCTOR spans the entire array.
483 2021-04-16 Jakub Jelinek <jakub@redhat.com>
486 * parser.c (cp_parser_constraint_requires_parens) <case CPP_DEREF>:
487 If lambda_p, return pce_ok instead of pce_maybe_postfix.
489 2021-04-16 Jakub Jelinek <jakub@redhat.com>
492 * pt.c (extract_locals_r): When handling DECL_EXPR of a structured
493 binding, add to data.internal also all corresponding structured
496 2021-04-16 Jason Merrill <jason@redhat.com>
499 * cp-tree.h (first_field): Declare.
500 * mangle.c (range_expr_nelts): New.
501 (write_expression): Improve class NTTP mangling.
502 * pt.c (get_template_parm_object): Clear TREE_HAS_CONSTRUCTOR.
503 * tree.c (zero_init_expr_p): Improve class NTTP handling.
504 * decl.c: Adjust comment.
506 2021-04-15 Jason Merrill <jason@redhat.com>
509 * call.c (build_new_method_call_1): Check again for side-effects
510 with a volatile object.
512 2021-04-15 Jason Merrill <jason@redhat.com>
516 * pt.c (find_parameter_packs_r) [FUNCTION_TYPE]: Walk into
517 TYPE_RAISES_EXCEPTIONS here.
518 * tree.c (cp_walk_subtrees): Not here.
520 2021-04-15 Jason Merrill <jason@redhat.com>
524 * parser.c (cp_parser_default_type_template_argument): Set
525 parser->local_variables_forbidden_p.
527 2021-04-15 Richard Sandiford <richard.sandiford@arm.com>
530 * typeck.c (merge_type_attributes_from): New function.
531 (cp_common_type): Use it for vector types.
533 2021-04-14 Jason Merrill <jason@redhat.com>
537 * pt.c (uses_outer_template_parms): Also look at default
540 2021-04-14 Jason Merrill <jason@redhat.com>
543 * semantics.c (finish_id_expression_1): Clear cp_unevaluated_operand
544 for a non-static data member in a constant-expression.
546 2021-04-14 Patrick Palka <ppalka@redhat.com>
550 * pt.c (deducible_expression): Look through implicit
551 INDIRECT_REFs as well.
553 2021-04-14 Jason Merrill <jason@redhat.com>
556 * parser.c (cp_parser_lambda_expression): Reject lambda
557 in template parameter type.
559 2021-04-14 Jason Merrill <jason@redhat.com>
562 * decl.c (duplicate_decls): Don't propagate
563 DECL_INITIALIZED_IN_CLASS_P to a specialization.
565 2021-04-14 Jason Merrill <jason@redhat.com>
570 * semantics.c (set_cleanup_locs): New.
571 (do_poplevel): Call it.
572 * parser.c (cp_parser_compound_statement): Consume the }
573 before finish_compound_stmt.
575 2021-04-13 Jason Merrill <jason@redhat.com>
578 * pt.c (get_underlying_template): Compare TYPE_QUALS.
580 2021-04-13 Jason Merrill <jason@redhat.com>
584 * init.c (get_nsdmi): Do more context adjustment for local classes.
586 2021-04-13 Patrick Palka <ppalka@redhat.com>
589 * pt.c (do_class_deduction): Reject alias CTAD in C++17 mode
590 rather than issuing a pedwarn.
591 * typeck2.c (build_functional_cast_1): Handle CTAD uniformly
592 for consistent diagnostics.
594 2021-04-13 Jason Merrill <jason@redhat.com>
597 * class.c (build_base_path): Shortcut simple non-pointer case.
599 2021-04-13 Eric Botcazou <ebotcazou@adacore.com>
601 * module.cc (ordinary_loc_of): Test LINEMAPS_MACRO_LOWEST_LOCATION
603 (module_state::write_location): Likewise.
605 2021-04-13 Patrick Palka <ppalka@redhat.com>
608 * pt.c (do_class_deduction): Look through EXPR_PACK_EXPANSION
609 when checking if the initializer is an equivalent class
610 placeholder template parameter.
612 2021-04-13 Patrick Palka <ppalka@redhat.com>
616 * constraint.cc (satisfy_normalized_constraints): Set
618 * parser.c (cp_parser_concept_definition): Likewise.
619 (cp_parser_requires_clause_opt): Likewise.
621 2021-04-12 Jason Merrill <jason@redhat.com>
624 * pt.c (uses_outer_template_parms): Handle non-type and template
625 template parameters specifically.
627 2021-04-11 Jason Merrill <jason@redhat.com>
630 * decl.c (fixup_anonymous_aggr): Prune all functions from
631 CLASSTYPE_MEMBER_VEC.
633 2021-04-10 Jason Merrill <jason@redhat.com>
637 * parser.c (cp_parser_direct_declarator): Don't
638 inject_this_parameter if static_p.
639 (cp_parser_omp_var_list_no_open): Parse 'this' even if
640 current_class_ptr isn't set for a better diagnostic.
642 2021-04-10 Jason Merrill <jason@redhat.com>
649 * pt.c (alias_ctad_tweaks): Handle failure better.
651 2021-04-10 Jason Merrill <jason@redhat.com>
654 * pt.c (find_parameter_packs_r) [TAG_DEFN]: Look into bases.
656 2021-04-09 Patrick Palka <ppalka@redhat.com>
658 * cp-tree.h (LAMBDA_EXPR_REGENERATED_FROM)
659 (LAMBDA_EXPR_REGENERATING_TARGS): Replace these with ...
660 (LAMBDA_EXPR_REGEN_INFO): ... this.
661 (tree_lambda_expr::regenerated_from)
662 (tree_lambda_expr::regenerating_targs): Replace these with ...
663 (tree_lambda_expr::regen_info): ... this.
664 * constraint.cc (satisfy_declaration_constraints): Adjust
666 * lambda.c (build_lambda_expr): Likewise.
667 * pt.c (regenerated_lambda_fn_p): Likewise.
668 (most_general_lambda): Likewise.
669 (tsubst_lambda_expr): Likewise.
671 2021-04-09 Marek Polacek <polacek@redhat.com>
674 * parser.c (cp_parser_member_declaration): Call
675 cp_parser_save_default_args even for function templates. Use
676 STRIP_TEMPLATE on the declaration we're passing.
678 2021-04-08 Patrick Palka <ppalka@redhat.com>
681 * constraint.cc (get_normalized_constraints_from_decl): Handle
683 (satisfy_declaration_constraints): Likewise. Check for
684 dependent args later.
685 * cp-tree.h (LAMBDA_EXPR_INSTANTIATED): Replace with ...
686 (LAMBDA_EXPR_REGENERATED_FROM): ... this.
687 (LAMBDA_EXPR_REGENERATING_TARGS): New.
688 (tree_lambda_expr::regenerated_from): New data member.
689 (tree_lambda_expr::regenerating_targs): New data member.
690 (add_to_template_args): Declare.
691 (regenerated_lambda_fn_p): Likewise.
692 (most_general_lambda): Likewise.
693 * lambda.c (build_lambda_expr): Set LAMBDA_EXPR_REGENERATED_FROM
694 and LAMBDA_EXPR_REGENERATING_TARGS.
695 * pt.c (add_to_template_args): No longer static.
696 (tsubst_function_decl): Unconditionally propagate constraints on
697 the substituted function decl.
698 (instantiated_lambda_fn_p): Rename to ...
699 (regenerated_lambda_fn_p): ... this. Check
700 LAMBDA_EXPR_REGENERATED_FROM instead of
701 LAMBDA_EXPR_INSTANTIATED.
702 (most_general_lambda): Define.
703 (enclosing_instantiation_of): Adjust after renaming
704 instantiated_lambda_fn_p.
705 (tsubst_lambda_expr): Don't set LAMBDA_EXPR_INSTANTIATED. Set
706 LAMBDA_EXPR_REGENERATED_FROM and LAMBDA_EXPR_REGENERATING_TARGS.
707 Don't substitute or set constraints on the regenerated lambda.
709 2021-04-08 Patrick Palka <ppalka@redhat.com>
712 * pt.c (build_deduction_guide): Document OUTER_ARGS. Substitute
713 them into the propagated constraints.
715 2021-04-08 Jason Merrill <jason@redhat.com>
718 * call.c (convert_like_internal): Improve reference diagnostic.
720 2021-04-08 Jakub Jelinek <jakub@redhat.com>
723 * constexpr.c (addr_of_non_const_var): New function.
724 (cxx_bind_parameters_in_call): Set *non_constant_args to true
725 even if cp_walk_tree on arg with addr_of_non_const_var callback
728 2021-04-08 Jason Merrill <jason@redhat.com>
731 * pt.c (determine_specialization): Improve diagnostic.
733 2021-04-08 Marek Polacek <polacek@redhat.com>
736 * decl.c (build_explicit_specifier): Call
737 check_for_bare_parameter_packs.
738 * except.c (build_noexcept_spec): Likewise.
740 2021-04-07 Jason Merrill <jason@redhat.com>
743 * parser.c (cp_parser_class_name): Check dependent_scope_p.
745 2021-04-07 Jason Merrill <jason@redhat.com>
748 * pt.c (maybe_process_partial_specialization): Check
749 DECL_SELF_REFERENCE_P.
751 2021-04-07 Jason Merrill <jason@redhat.com>
754 * name-lookup.c (push_class_level_binding_1): Do overload a new
755 function with a previous using-declaration.
757 2021-04-06 Jason Merrill <jason@redhat.com>
760 * init.c (get_nsdmi): Don't defer access checking.
762 2021-04-06 Jason Merrill <jason@redhat.com>
765 * decl.c (cp_finish_decl): mark_needed an implicitly inline
766 static data member with an out-of-class redeclaration.
768 2021-04-06 Jason Merrill <jason@redhat.com>
771 * mangle.c (write_compact_number): Add sanity check.
772 (write_local_name): Use list_length for parm number.
774 2021-04-06 Patrick Palka <ppalka@redhat.com>
777 * pt.c (do_auto_deduction): Don't exit early when deducing the
778 array type of a structured binding. Also handle adc_decomp_type
779 during constraint checking.
781 2021-04-05 Jason Merrill <jason@redhat.com>
784 * typeck.c (check_return_expr): Call mark_exp_read in dependent
787 2021-04-05 Jason Merrill <jason@redhat.com>
790 * typeck.c (build_reinterpret_cast_1): Don't perform
791 temporary materialization.
793 2021-04-05 Jason Merrill <jason@redhat.com>
796 * pt.c (lookup_template_class_1): Do tsubst_enum when
797 tsubsting a generic lambda.
799 2021-04-05 Jason Merrill <jason@redhat.com>
802 * pt.c (enclosing_instantiation_of): Compare DECL_SOURCE_LOCATION if
803 there is no enclosing non-lambda function.
805 2021-04-05 Nathan Sidwell <nathan@acm.org>
808 * module.cc (name_pending_imports): Drop 'atend' parm. Don't
809 query export when not needed.
810 (preprocess_module, preprocessed_module): Adjust.
812 2021-04-05 Jason Merrill <jason@redhat.com>
815 * pt.c (mark_decl_instantiated): Set DECL_EXTERNAL.
817 2021-04-05 Jason Merrill <jason@redhat.com>
820 * pt.c (class el_data): Add visited field.
821 (extract_local_specs): Pass it to cp_walk_tree.
822 (extract_locals_r): Walk into the body of a lambda.
824 2021-04-05 Jason Merrill <jason@redhat.com>
826 * ptree.c (cxx_print_decl): Check DECL_MODULE_IMPORT_P on
829 2021-04-04 Jason Merrill <jason@redhat.com>
832 * typeck2.c (massage_init_elt): Don't strip TARGET_EXPR.
834 2021-04-03 Marek Polacek <polacek@redhat.com>
837 * parser.c: Create a GC root for attributes in a decl specifier.
838 (cp_parser_type_specifier): Push/pop ->attributes onto/from it.
840 2021-04-03 Jason Merrill <jason@redhat.com>
843 * pt.c (tsubst_lambda_expr): Skip the body block from
846 2021-04-03 Jason Merrill <jason@redhat.com>
849 * cvt.c (can_convert_qual): Check fnptr_conv_p.
851 2021-04-03 Jason Merrill <jason@redhat.com>
854 * pt.c (regenerate_decl_from_template): tsubst_decl
857 2021-04-02 Patrick Palka <ppalka@redhat.com>
860 * parser.c (do_range_for_auto_deduction): Pass adc_variable_type
861 to do_auto_deduction.
863 2021-04-02 Patrick Palka <ppalka@redhat.com>
866 * semantics.c (finish_compound_literal): Check
867 template_placeholder_p instead of type_uses_auto.
869 2021-04-02 Jason Merrill <jason@redhat.com>
872 * cp-tree.h (PACK_EXPANSION_AUTO_P): New.
873 * lambda.c (add_capture): Set it.
874 * pt.c (tsubst_pack_expansion): Handle it.
876 2021-04-02 Nathan Sidwell <nathan@acm.org>
878 * cp-tree.h (lang_decl_base): Correct module flag comment.
879 * module.cc (trees_in::assert_definition): Break out
881 (trees_out::lang_decl_bools): Do not write purview for header units.
883 2021-04-01 Marek Polacek <polacek@redhat.com>
886 * method.c (defaulted_late_check): ++ and -- function_depth around
887 the call to synthesize_method.
888 * pt.c: Remove the saved_trees global.
890 2021-04-01 Jason Merrill <jason@redhat.com>
894 * tree.c (cp_walk_subtrees) [FUNCTION_TYPE]: Walk into
895 TYPE_RAISES_EXCEPTIONS.
897 2021-04-01 Iain Sandoe <iain@sandoe.co.uk>
899 * mapper-client.cc (INCLUDE_MAP): New; require map to be
900 included from system.h.
901 * mapper-resolver.cc (INCLUDE_MAP): Likewise.
903 2021-04-01 Jason Merrill <jason@redhat.com>
906 * mangle.c (write_expression): Adjust.
907 * class.c (find_abi_tags_r): Disable PR98481 fix for ABI v14.
908 (mark_abi_tags_r): Likewise.
910 2021-04-01 Nathan Sidwell <nathan@acm.org>
913 * module.cc (trees_out::decl_node): Adjust importedness reference
915 (module_state::intercluster_seed): New. Seed both imports and
916 inter-cluster references. Broken out of ...
917 (module_state::write_cluster): ... here. Call it.
919 2021-03-31 Jason Merrill <jason@redhat.com>
922 * tree.c (strip_typedefs): Handle TYPE_PACK_EXPANSION.
924 2021-03-31 Patrick Palka <ppalka@redhat.com>
927 * mangle.c (write_expression): Adjust the mangling of
930 2021-03-31 Patrick Palka <ppalka@redhat.com>
933 * pt.c (placeholder_type_constraint_dependent_p): Expand
934 argument packs to separate the first non-pack argument
937 2021-03-30 Nathan Sidwell <nathan@acm.org>
940 * module.cc (dumper::operator): Make less brittle.
941 (trees_out::core_bools): VAR_DECLs always have a context.
942 (trees_out::key_mergeable): Use same_type_p for asserting.
943 (trees_in::read_var_def): Propagate
944 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
946 2021-03-30 Jakub Jelinek <jakub@redhat.com>
949 * cp-gimplify.c (cp_gimplify_expr): Handle PTRMEM_CST.
951 2021-03-26 Marek Polacek <polacek@redhat.com>
954 * method.c (implicitly_declare_fn): Pass &raises to
955 synthesized_method_walk.
957 2021-03-26 Nathan Sidwell <nathan@acm.org>
960 * cp-tree.h (DECL_MODULE_CHECK): Ban TEMPLATE_DECL.
961 (SET_TYPE_TEMPLATE_INFO): Restore Alias template setting.
962 * decl.c (duplicate_decls): Remove template_decl module flag
964 * module.cc (merge_kind_name): Add alias tmpl spec as a thing.
965 (dumper::impl::nested_name): Adjust for template-decl module flag
967 (trees_in::assert_definition): Likewise.
968 (trees_in::install_entity): Likewise.
969 (trees_out::decl_value): Likewise. Remove alias template
970 separation of template and type_decl.
971 (trees_in::decl_value): Likewise.
972 (trees_out::key_mergeable): Likewise,
973 (trees_in::key_mergeable): Likewise.
974 (trees_out::decl_node): Adjust for template-decl module flag
976 (depset::hash::make_dependency): Likewise.
977 (get_originating_module, module_may_redeclare): Likewise.
978 (set_instantiating_module, set_defining_module): Likewise.
979 * name-lookup.c (name_lookup::search_adl): Likewise.
980 (do_pushdecl): Likewise.
981 * pt.c (build_template_decl): Likewise.
982 (lookup_template_class_1): Remove special alias_template handling
984 (tsubst_template_decl): Likewise.
986 2021-03-26 Jakub Jelinek <jakub@redhat.com>
989 * tree.c (bot_manip): Remap artificial automatic temporaries mentioned
990 in DECL_EXPR or in BIND_EXPR_VARS.
992 2021-03-25 Jakub Jelinek <jakub@redhat.com>
995 * parser.c (cp_parser_postfix_expression): For calls, create
996 combined_loc and temporarily set input_location to it before
997 calling finish_call_expr.
999 2021-03-25 Marek Polacek <polacek@redhat.com>
1002 * call.c (build_over_call): Maybe call mark_used in case
1003 deduce_inheriting_ctor fails and return error_mark_node.
1004 * cp-tree.h (deduce_inheriting_ctor): Adjust declaration.
1005 * method.c (deduce_inheriting_ctor): Return bool if the deduction
1007 (implicitly_declare_fn): If raises is error_mark_node, call
1008 synthesized_method_walk with diag being true.
1010 2021-03-25 Jakub Jelinek <jakub@redhat.com>
1013 * decl2.c (grokbitfield): Diagnose bitfields containing bare parameter
1014 packs and don't set DECL_BIT_FIELD_REPRESENTATIVE in that case.
1016 2021-03-25 Marek Polacek <polacek@redhat.com>
1019 * call.c (build_converted_constant_expr_internal): Don't emit
1020 -Wconversion warnings.
1022 2021-03-25 Jakub Jelinek <jakub@redhat.com>
1025 * call.c (build_conditional_expr_1): Pass OEP_ADDRESS_OF_SAME_FIELD
1027 * cvt.c (convert_to_void): Preserve location_t on COND_EXPR or
1030 2021-03-23 Nathan Sidwell <nathan@acm.org>
1033 * name-lookup.c (check_module_override): Set global or partition
1034 DUP on the binding vector.
1036 2021-03-23 Marek Polacek <polacek@redhat.com>
1039 * decl2.c (cp_warn_deprecated_use_scopes): Only call
1040 cp_warn_deprecated_use when decl is a namespace, class, or enum.
1042 2021-03-23 Nathan Sidwell <nathan@acm.org>
1045 * decl.c (duplicate_decls): Remove assert about maybe-imported
1048 2021-03-23 Jakub Jelinek <jakub@redhat.com>
1051 * decl.c (cp_finish_decomp): Diagnose void initializers when
1052 using tuple_element and get.
1054 2021-03-22 Nathan Sidwell <nathan@acm.org>
1057 * module.cc (depset::hash::make_dependency): Propagate flags for
1058 partial specialization.
1059 (module_may_redeclare): Handle partial specialization.
1061 2021-03-22 Nathan Sidwell <nathan@acm.org>
1064 * cp-tree.h (map_context_from, map_context_to): Delete.
1065 (add_mergeable_specialization): Add is_alias parm.
1066 * pt.c (add_mergeable_specialization): Add is_alias parm, add them.
1067 * module.cc (map_context_from, map_context_to): Delete.
1068 (trees_in::decl_value): Add specializations later, adjust call.
1069 Drop useless alias lookup. Set duplicate fn parm context.
1070 (check_mergeable_decl): Drop context mapping.
1071 (trees_in::is_matching_decl): Likewise.
1072 (trees_in::read_function_def): Drop parameter context adjustment
1075 2021-03-22 Martin Liska <mliska@suse.cz>
1078 * module.cc (fini_modules): Call vec_free instead of delete.
1080 2021-03-20 Jakub Jelinek <jakub@redhat.com>
1083 * cp-gimplify.c (cp_genericize_r) <case STATEMENT_LIST>: Remove
1084 special code, instead call c_genericize_control_stmt.
1086 2021-03-19 Jakub Jelinek <jakub@redhat.com>
1089 * constexpr.c (cxx_eval_constant_expression): For CONVERT_EXPR from
1090 INDIRECT_TYPE_P to ARITHMETIC_TYPE_P, when !ctx->manifestly_const_eval
1091 don't diagnose it, set *non_constant_p nor return t.
1093 2021-03-19 Marek Polacek <polacek@redhat.com>
1096 * parser.c (cp_parser_requirement_parameter_list): Handle
1099 2021-03-18 Marek Polacek <polacek@redhat.com>
1101 * pt.c (tsubst_copy_and_build) <case FLOAT_EXPR>: Remove.
1103 2021-03-18 Marek Polacek <polacek@redhat.com>
1105 * pt.c (tsubst_copy_and_build): Add assert.
1107 2021-03-18 Iain Sandoe <iain@sandoe.co.uk>
1110 * parser.c (cp_debug_parser): Add Objective-C++ message
1112 (cp_parser_nested_name_specifier_opt): Allow colon to
1113 terminate an assignment-expression when parsing Objective-
1115 (cp_parser_objc_message_expression): Set and clear message
1116 parsing state on entry and exit.
1117 * parser.h (struct cp_parser): Add a context flag for
1118 Objective-C++ message state.
1120 2021-03-18 Martin Liska <mliska@suse.cz>
1123 * coroutines.cc (struct var_nest_node): Init then_cl and else_cl
1126 2021-03-17 Marek Polacek <polacek@redhat.com>
1129 * call.c (conv_unsafe_in_template_p): New.
1130 (convert_like): Use it.
1132 2021-03-17 Anthony Sharp <anthonysharp15@gmail.com>
1133 Jason Merrill <jason@redhat.com>
1135 * semantics.c (get_class_access_diagnostic_decl): New
1136 function that examines special cases when a parent
1137 class causes a private access failure.
1138 (enforce_access): Slightly modified to call function
1141 2021-03-16 Jason Merrill <jason@redhat.com>
1143 * tree.c (cp_tree_equal): Use real_identical.
1145 2021-03-16 Jakub Jelinek <jakub@redhat.com>
1148 * decl.c (expand_static_init): For thread guards, call __cxa_atexit
1149 before calling __cxa_guard_release rather than after it. Formatting
1152 2021-03-16 Martin Liska <mliska@suse.cz>
1153 Jason Merrill <jason@redhat.com>
1156 * call.c (get_function_version_dispatcher): Handle
1158 * decl.c (maybe_version_functions): Likewise.
1159 (maybe_mark_function_versioned): New.
1160 * name-lookup.c (push_local_extern_decl_alias): No longer static.
1161 * name-lookup.h (push_local_extern_decl_alias): Adjust.
1163 2021-03-16 Nathan Sidwell <nathan@acm.org>
1166 * module.cc (trees_out::decl_value): Adjust typedef streaming,
1167 indicate whether it is a dependent alias.
1168 (trees_in::decl_value): Likewise. Set as dependent alias, if it
1171 2021-03-15 Iain Sandoe <iain@sandoe.co.uk>
1174 * coroutines.cc (expand_one_await_expression): If the
1175 await_ready() expression is not a boolean then convert it
1178 2021-03-15 Iain Sandoe <iain@sandoe.co.uk>
1181 * coroutines.cc (build_actor_fn): Make destroy index 1
1182 correspond to the abnormal unhandled_exception() exit.
1183 Substitute the proxy for the resume index.
1184 (coro_rewrite_function_body): Arrange to reset the resume
1185 index and make done = true for a rethrown exception from
1186 unhandled_exception ().
1187 (morph_fn_to_coro): Adjust calls to build_actor_fn and
1188 coro_rewrite_function_body.
1190 2021-03-15 Iain Sandoe <iain@sandoe.co.uk>
1193 * coroutines.cc (replace_continue): Rewrite continue into
1195 (await_statement_walker): Handle await expressions in the
1196 initializer, condition and iteration expressions of for
1199 2021-03-15 Iain Sandoe <iain@sandoe.co.uk>
1202 * coroutines.cc (flatten_await_stmt): Allow for the case
1203 where a target expression variable only has uses in the
1204 second part of a compound expression.
1205 (maybe_promote_temps): Avoid emiting empty statements.
1207 2021-03-15 Tobias Burnus <tobias@codesourcery.com>
1210 * decl.c (cp_finish_decl): For 'omp declare target implicit' vars,
1211 ensure that the varpool node is marked as offloadable.
1213 2021-03-12 Nathan Sidwell <nathan@acm.org>
1216 * module.cc (depset::hash::add_binding_entity): Assert not
1218 (depset::add::add_specializations): Likewise.
1219 * name-lookup.c (name_lookup::dedup): New.
1220 (name_lookup::~name_lookup): Assert not deduping.
1221 (name_lookup::restore_state): Likewise.
1222 (name_lookup::add_overload): Replace outlined code with dedup
1224 (name_lookup::add_value): Likewise.
1225 (name_lookup::search_namespace_only): Likewise.
1226 (name_lookup::adl_namespace_fns): Likewise.
1227 (name_lookup::adl_class_fns): Likewise.
1228 (name_lookup::search_adl): Likewise. Add clearing dedup call.
1229 (name_lookup::search_qualified): Likewise.
1230 (name_lookup::search_unqualified): Likewise.
1232 2021-03-12 Jakub Jelinek <jakub@redhat.com>
1235 * call.c (build_over_call): For immediate evaluation of functions
1236 that return references, undo convert_from_reference effects before
1237 calling cxx_constant_value and call convert_from_reference
1240 2021-03-11 Nathan Sidwell <nathan@acm.org>
1243 * name-lookup.c (lookup_elaborated_type_1): Access slot not bind
1244 when there's a binding vector.
1245 * ptree.c (cxx_print_xnode): Lazy flags are no longer a thing.
1247 2021-03-11 Nathan Sidwell <nathan@acm.org>
1250 * module.cc (enum merge_kind): Delete MK_type_tmpl_spec,
1252 (trees_in::decl_value): Adjust add_mergeable_specialization call.
1253 (trees_out::get_merge_kind): Adjust detecting a partial template
1255 (trees_out::key_mergeable): Adjust handling same.
1256 (trees_in::key_mergeabvle): Likewise.
1258 2021-03-10 Nathan Sidwell <nathan@acm.org>
1261 * module.cc (post_load_processing): Assert not gcable.
1262 (laxy_load_pendings): Extend no-gc region around
1263 post_load_processing.
1265 2021-03-10 Nathan Sidwell <nathan@acm.org>
1268 * decl.c (make_rtl_for_nonlocal_decl): Propagate local-extern's
1269 assembler name to the ns alias.
1271 2021-03-09 Jakub Jelinek <jakub@redhat.com>
1274 * coroutines.cc (build_co_await): Look through NOP_EXPRs in
1275 build_special_member_call return value to find the CALL_EXPR.
1278 2021-03-09 Nathan Sidwell <nathan@acm.org>
1281 * parser.c (cp_parser_diagnose_invalid_type_name): Clarify
1282 that C++20 does not yet imply modules.
1284 2021-03-08 Nathan Sidwell <nathan@acm.org>
1287 * name-lookup.c (get_cxx_dialect_name): Add cxx23.
1289 2021-03-08 Nathan Sidwell <nathan@acm.org>
1291 * lex.c (module_token_filter::resume): Ignore module-decls inside
1293 * parser.c (cp_parser_module_declaration): Reject in header-unit.
1295 2021-03-08 Nathan Sidwell <nathan@acm.org>
1298 * cp-tree.h (match_mergeable_specialization)
1299 (add_mergeable_specialization): Adjust parms.
1300 * module.cc (trees_in::decl_value): Adjust
1301 add_mergeable_specialization calls.
1302 (trees_out::key_mergeable): Adjust match_mergeable_specialization
1304 (specialization_add): Likewise.
1305 * pt.c (match_mergeable_specialization): Do not insert.
1306 (add_mergeable_specialization): Add to hash table here.
1308 2021-03-06 Patrick Palka <ppalka@redhat.com>
1309 Jakub Jelinek <jakub@redhat.com>
1312 * constexpr.c (cxx_eval_increment_expression): Pass lval when
1313 evaluating the MODIFY_EXPR, and update 'mod' with the result of
1314 this evaluation. Check *non_constant_p afterwards. For prefix
1315 ops, just return 'mod'.
1317 2021-03-06 Patrick Palka <ppalka@redhat.com>
1318 Jakub Jelinek <jakub@redhat.com>
1321 * pt.c (tsubst_copy) <case TEMPLATE_ID_EXPR>: Rename local
1322 variable 'fn' to 'tmpl'. Handle a variable template-id by
1323 calling lookup_template_variable.
1325 2021-03-06 Patrick Palka <ppalka@redhat.com>
1328 * pt.c (unify) <case TEMPLATE_TYPE_PARM>: Pass targs as
1329 outer_targs to do_auto_deduction.
1330 (placeholder_type_constraint_dependent_p): Define.
1331 (do_auto_deduction): When processing_template_decl != 0
1332 and context is adc_unify and we have constraints, pretend the
1333 constraints are satisfied instead of punting. Otherwise don't
1334 punt unless placeholder_type_constraint_dependent_p holds.
1335 Add some clarifying sanity checks. Add a hack to add missing
1336 outermost template levels to outer_args before checking
1337 satisfaction. Don't substitute outer_targs into type if it's
1340 2021-03-05 Marek Polacek <polacek@redhat.com>
1343 * call.c (standard_conversion): When converting pointers to
1344 member, don't return NULL when the bases are equivalent but
1347 2021-03-05 Marek Polacek <polacek@redhat.com>
1350 * name-lookup.c (check_local_shadow): Check if the type of decl
1351 is non-null before checking TYPE_PTR*.
1353 2021-03-05 Nathan Sidwell <nathan@acm.org>
1356 * module.cc (module_state::write_cluster): Relax binding assert.
1358 2021-03-05 Nathan Sidwell <nathan@acm.org>
1361 * pt.c (instantiate_decl): Call set_instantiating_module.
1363 2021-03-05 Iain Sandoe <iain@sandoe.co.uk>
1366 * coroutines.cc (build_co_await): Use type_build_ctor_call()
1367 to determine cases when a CTOR needs to be built.
1368 (flatten_await_stmt): Likewise.
1369 (morph_fn_to_coro): Likewise.
1371 2021-03-05 Iain Sandoe <iain@sandoe.co.uk>
1374 * coroutines.cc (coro_diagnose_throwing_fn): New helper.
1375 (coro_diagnose_throwing_final_aw_expr): New helper.
1376 (build_co_await): Diagnose throwing final await expression
1378 (build_init_or_final_await): Diagnose a throwing promise
1379 final_suspend() call.
1381 2021-03-05 Iain Sandoe <iain@sandoe.co.uk>
1384 * coroutines.cc (struct param_info): Track parameter copies that need
1386 (coro_get_frame_dtor): New helper function factored from build_actor().
1387 (build_actor_fn): Use coro_get_frame_dtor().
1388 (morph_fn_to_coro): Track parameters that need DTORs on exception,
1389 likewise the frame promise and the return object. On exception, run the
1390 DTORs for these, destroy the frame and then rethrow the exception.
1392 2021-03-05 Nathan Sidwell <nathan@acm.org>
1395 * pt.c (instantiate_class_template_1): Set instantiating module
1398 2021-03-05 Tobias Burnus <tobias@codesourcery.com>
1401 * parser.c (cp_parser_oacc_clause_async): Reject comma expressions.
1403 2021-03-04 Jakub Jelinek <jakub@redhat.com>
1407 * cvt.c (convert_to_void): Revert 2019-10-17 changes. Clarify
1410 2021-03-04 Nathan Sidwell <nathan@acm.org>
1413 * module.cc (class uintset): Delete.
1414 (typedef attached_map_t): A hash map.
1415 (attached_table): Use attached_map_t. Adjust uses ...
1416 (trees_out::decl_value, trees_in::decl_value): ... here ...
1417 (trees_out::key_mergeable): ... here ...
1418 (trees_in::key_mergeable): ... here ...
1419 (maybe_attach_decl): ... here ...
1420 (direct_import): ... and here.
1422 2021-03-04 Nathan Sidwell <nathan@acm.org>
1426 * lex.c (cxx_dup_lang_specific_decl): Adjust for module_attached_p
1428 * module.cc (class pending_key): New.
1429 (default_hash_traits<pending_key>): New specialization.
1430 (pending_map_t): New typedef.
1431 (pending_table): Replace old table.
1432 (trees_out::lang_decl_bools): Adjust.
1433 (trees_in::lang_decl_bools): Adjust.
1434 (trees_in::install_entity): Drop pending member and specialization
1436 (find_pending_key): New.
1437 (depset::hash::fiund_dependencies): Use it.
1438 (pendset_lazy_load): Delete.
1439 (module_state::write_cluster): Don't count pendings here. Bye
1440 Duff's device-like thing.
1441 (module_state::write_pendings): Reimplement.
1442 (module_state::read_pendings): Reimplement.
1443 (lazy_specializations_p): Delete.
1444 (module_state::write): Adjust write_pendings call.
1445 (lazy_load_pendings): New.
1446 (lazy_load_specializations): Delete.
1447 (lazy_load_members): Delete.
1448 (init_modules): Adjust.
1449 * name-lookup.c (maybe_lazily_declare): Call lazy_load_pendings
1450 not lazy_load_members.
1451 (note_pending_specializations): Delete.
1452 (load_pending_specializations): Delete.
1453 * name-lookup.h (BINDING_VECTR_PENDING_SPECIALIZATIONS_P): Delete.
1454 (BINDING_VECTOR_PENDING_MEMBERS_P): Delete.
1455 (BINDING_VECTR_PENDING_MEMBERS_P): Delete.
1456 (note_pending_specializations): Delete.
1457 (load_pending_specializations): Delete.
1458 * pt.c (lookup_template_class_1): Call lazy_load_pendings not
1459 lazy_load_specializations.
1460 (instantiate_template_class_1): Likewise.
1461 (instantiate_decl): Call lazy_load_pendings.
1462 * typeck.c (complete_type): Likewise.
1464 2021-03-03 Nathan Sidwell <nathan@acm.org>
1467 * module.cc (post_load_decls): New.
1468 (lazy_snum, recursive_lazy): Move earlier.
1469 (module_state::read_cluster): Push cloning onto post_load_decls.
1470 (post_load_processing): New. Do the cloning here.
1471 (module_state::read_inits): Call post_load_processing.
1472 (module_state::read_language): Likewise.
1473 (lazy_load_binding, lazy_load_specializations): Likewise
1474 (lazy_load_members): Likewise
1476 2021-03-03 Nathan Sidwell <nathan@acm.org>
1479 * module.cc (trees_out::decl_value): Stream specialization keys
1481 (trees_in::decl_value): Stream them back and insert after
1482 completing the decl.
1483 (trees_out::key_mergeable): Drop some streaming here ...
1484 (trees_in::key_mergeable): ... and here. Don't insert into
1485 specialization tables.
1487 2021-03-03 Patrick Palka <ppalka@redhat.com>
1489 * constraint.cc (struct sat_info): Document the different
1490 meanings of noisy() and diagnose_unsatisfaction_p() during
1491 satisfaction and requires-expression evaluation.
1492 (tsubst_valid_expression_requirement): Take a sat_info instead
1493 of a subst_info. Perform the substitution quietly first. Fold
1494 in error-replaying code from diagnose_valid_expression.
1495 (tsubst_simple_requirement): Take a sat_info instead of a
1497 (tsubst_type_requirement_1): New. Fold in error-replaying code
1498 from diagnose_valid_type.
1499 (tsubst_type_requirement): Use the above. Take a sat_info
1500 instead of a subst_info.
1501 (tsubst_compound_requirement): Likewise. Fold in
1502 error-replaying code from diagnose_compound_requirement.
1503 (tsubst_nested_requirement): Take a sat_info instead of a
1504 subst_info. Fold in error-replaying code from
1505 diagnose_nested_requirement.
1506 (tsubst_requirement): Take a sat_info instead of a subst_info.
1507 (tsubst_requires_expr): Split into two versions, one that takes
1508 a sat_info argument and another that takes a complain and
1509 in_decl argument. Remove outdated documentation. Document the
1510 effects of the sat_info argument. Don't short-circuit
1511 processing of requirements when diagnosing unsatisfaction,
1512 mirroring diagnose_requires_expr.
1513 (satisfy_nondeclaration_constraint) <case REQUIRES_EXPR>: Remove
1514 assert, and se the three-parameter version of tsubst_requires_expr.
1515 (diagnose_trait_expr): Make static. Take a template argument
1516 vector instead of a parameter mapping.
1517 (diagnose_valid_expression): Remove.
1518 (diagnose_valid_type): Remove.
1519 (diagnose_simple_requirement): Remove.
1520 (diagnose_compound_requirement): Remove.
1521 (diagnose_type_requirement): Remove.
1522 (diagnose_nested_requirement): Remove.
1523 (diagnose_requirement): Remove.
1524 (diagnose_requires_expr): Remove.
1525 (diagnose_atomic_constraint): Take a sat_info instead of a
1526 subst_info. Adjust call to diagnose_trait_expr. Call
1527 tsubst_requires_expr instead of diagnose_requires_expr.
1528 (diagnose_constraints): Remove special casing of REQUIRES_EXPR
1529 and just always call constraint_satisfaction_value.
1531 2021-03-03 Patrick Palka <ppalka@redhat.com>
1533 * constexpr.c (cxx_eval_call_expression): Adjust call to
1534 evaluate_concept_check.
1535 (cxx_eval_constant_expression) <case REQUIRES_EXPR>: Use
1536 evaluate_requires_expression instead of
1537 satisfy_constraint_expression.
1538 <case TEMPLATE_ID_EXPR>: Adjust call to evaluate_concept_check.
1539 * constraint.cc (struct sat_info): Adjust comment about which
1540 satisfaction entrypoints use noisy-unsat.
1541 (normalize_template_requirements): Remove (and adjust callers
1543 (normalize_nontemplate_requirements): Likewise.
1544 (tsubst_nested_requirement): Use constraint_satisfaction_value
1545 instead of satisfy_constraint_expression, which'll do the
1546 noisy replaying of ill-formed quiet satisfaction for us.
1547 (decl_satisfied_cache): Adjust comment.
1548 (satisfy_constraint): Rename to ...
1549 (satisfy_normalized_constraints): ... this.
1550 (satisfy_associated_constraints): Remove (and make its
1551 callers check for dependent arguments).
1552 (satisfy_constraint_expression): Rename to ...
1553 (satisfy_nondeclaration_constraints): ... this. Assert that
1554 'args' is empty when 't' is a concept-id. Removing handling
1555 bare constraint-expressions, and handle REQUIRES_EXPRs
1556 specially. Adjust comment accordingly.
1557 (satisfy_declaration_constraints): Assert in the two-parameter
1558 version that 't' is not a TEMPLATE_DECL. Adjust following
1559 removal of normalize_(non)?template_requirements and
1560 satisfy_asociated_constraints.
1561 (constraint_satisfaction_value): Combine the two- and
1562 three-parameter versions in the natural way.
1563 (constraints_satisfied_p): Combine the one- and two-parameter
1564 versions in the natural way. Improve documentation.
1565 (evaluate_requires_expr): Define.
1566 (evaluate_concept_check): Remove 'complain' parameter. Use
1567 constraint_satisfaction_value instead of
1568 satisfy_constraint_expression.
1569 (diagnose_nested_requirement): Adjust following renaming of
1570 satisfy_constraint_expression.
1571 (diagnose_constraints): Handle REQUIRES_EXPR by going through
1572 diagnose_requires_expr directly instead of treating it as a
1573 constraint-expression. Improve documentation.
1574 * cp-gimplify.c (cp_genericize_r) <case CALL_EXPR>: Adjust call
1575 to evaluate_concept_check.
1576 <case REQUIRES_EXPR>: Use evaluate_requires_expr instead of
1577 constraints_satisfied_p.
1578 <case TEMPLATE_ID_EXPR>: Adjust call to evaluate_concept_check.
1579 * cp-tree.h (evaluate_requires_expr): Declare.
1580 (evaluate_concept_check): Remove tsubst_flag_t parameter.
1581 (satisfy_constraint_expression): Remove declaration.
1582 (constraints_satisfied_p): Remove one-parameter declaration.
1583 Add a default argument to the two-parameter declaration.
1584 * cvt.c (convert_to_void): Adjust call to
1585 evaluate_concept_check.
1587 2021-03-03 Jakub Jelinek <jakub@redhat.com>
1590 * call.c (op_is_ordered): Handle TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR
1593 2021-03-03 Marek Polacek <polacek@redhat.com>
1597 * pt.c (build_deduction_guide): Use INNERMOST_TEMPLATE_ARGS.
1598 (maybe_aggr_guide): Use the original template type where needed. In
1599 a class member template, partially instantiate the result of
1600 collect_ctor_idx_types.
1601 (do_class_deduction): Defer the deduction until the enclosing
1602 scope is non-dependent.
1604 2021-03-03 Jason Merrill <jason@redhat.com>
1607 * call.c (build_temp): Wrap a CALL_EXPR in a TARGET_EXPR
1608 if it didn't get one before.
1610 2021-03-03 Nathan Sidwell <nathan@acm.org>
1613 * module.cc (trees_out::decl_node): Small refactor.
1614 (depset::hash::add_binding_entity): Return true on meeting an
1615 import. Set namespace's import here.
1616 (module_state:write_namespaces): Inform of purview too.
1617 (module_state:read_namespaces): Adjust.
1618 * name-lookup.c (implicitly_export_namespace): Delete.
1619 (do_pushdecl): Don't call it.
1620 (push_namespace): Likewise, set purview.
1621 (add_imported_namespace): Reorder parms.
1622 * name-lookup.h (add_imported_namespace): Alter param ordering.
1624 2021-03-02 Martin Sebor <msebor@redhat.com>
1627 * class.c (build_base_path): Call build_if_nonnull.
1628 * cp-tree.h (build_if_nonnull): Declare.
1629 * rtti.c (ifnonnull): Rename...
1630 (build_if_nonnull): ...to this. Set no-warning bit on COND_EXPR.
1631 (build_dynamic_cast_1): Adjust to name change.
1633 2021-03-02 Patrick Palka <ppalka@redhat.com>
1637 * constraint.cc (type_deducible_p): Don't substitute into the
1638 constraints, and instead just pass 'args' to do_auto_deduction
1639 as the outer template arguments.
1640 (tsubst_parameter_mapping): Remove confused code for handling
1641 placeholder type arguments.
1642 (normalize_placeholder_type_constraint): Define.
1643 (satisfy_constraint_expression): Use it to handle placeholder
1645 * cp-tree.h (PLACEHOLDER_TYPE_CONSTRAINTS_INFO): Define.
1646 (PLACEHOLDER_TYPE_CONSTRAINTS): Redefine in terms of the above.
1647 * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: Use
1648 PLACEHOLDER_TYPE_CONSTRAINTS_INFO instead.
1649 (make_constrained_placeholder_type): Set
1650 PLACEHOLDER_TYPE_CONSTRAINTS_INFO instead.
1651 (do_auto_deduction): Clarify comments about the outer_targs
1652 parameter. Rework satisfaction of a placeholder type constraint
1653 to pass in the complete set of template arguments directly to
1654 constraints_satisfied_p.
1655 (splice_late_return_type): Use PLACEHOLDER_TYPE_CONSTRAINTS_INFO
1656 instead. Also rebuild the the constraint info on the new auto.
1658 2021-03-02 Patrick Palka <ppalka@redhat.com>
1660 * constraint.cc (build_parameter_mapping): Rely on the caller to
1661 determine the in-scope template parameters.
1662 (norm_info::norm_info): Delegate the tsubst_flags_t constructor
1663 to the two-parameter constructor. In the two-parameter
1664 constructor, fold in the definition of make_context, set
1665 initial_parms appropriately, and don't set the now-removed
1667 (norm_info::make_context): Remove, now that its only use is
1668 inlined into the caller.
1669 (norm_info::update_context): Adjust call to
1670 build_parameter_mapping to pass in the relevant set of in-scope
1671 template parameters.
1672 (norm_info::ctx_parms): Define this member function.
1673 (norm_info::context): Initialize to NULL_TREE.
1674 (norm_info::orig_decl): Remove this data member.
1675 (norm_info::initial_parms): Define this data member.
1676 (normalize_atom): Adjust call to build_parameter_mapping to pass
1677 in the relevant set of in-scope template parameters. Use
1678 info.initial_parms instead of info.orig_decl.
1679 (normalize_constraint_expression): Take a norm_info object
1680 instead of a bool. Cache the result of normalization.
1681 (tsubst_nested_requirement): Call satisfy_constraint_expression
1682 instead of satisfy_constraint, so that we normalize on demand.
1683 (satisfy_constraint_expression): Handle a NESTED_REQ argument.
1684 Adjust call to normalize_constraint_expression.
1685 (finish_nested_requirement): Set the TREE_TYPE of the NESTED_REQ
1686 to current_template_parms.
1687 (diagnose_nested_requirements): Go through
1688 satisfy_constraint_expression, as with tsubst_nested_requirement.
1690 2021-03-02 Patrick Palka <ppalka@redhat.com>
1692 * constraint.cc (tsubst_parameter_mapping): Canonicalize the
1693 arguments of a substituted TYPE_ARGUMENT_PACK even if we've
1694 started with a TYPE_ARGUMENT_PACK.
1695 (finish_requires_expr): Don't set DECL_CONTEXT and
1696 CONSTRAINT_VAR_P on each of the introduced parameters here.
1697 * parser.c (cp_parser_requirement_parameter_list): Instead set
1698 these fields earlier, here.
1699 * pt.c (do_auto_deduction): Canonicalize the result of
1700 do_auto_deduction. Pass 'complain' to finish_decltype_type.
1702 2021-03-02 Patrick Palka <ppalka@redhat.com>
1704 * constraint.cc (tsubst_simple_requirement): Just return
1705 boolean_true_node on success.
1706 (tsubst_type_requirement): Likewise.
1707 (tsubst_compound_requirement): Likewise.
1708 (tsubst_nested_requirement): Likewise.
1709 (tsubst_requirement_body): Remove.
1710 (check_constaint_variables): Rename to ...
1711 (check_constraint_variables): ... this.
1712 (tsubst_constraint_variables): Adjust.
1713 (tsubst_requires_expr): Fold tsubst_requirement_body into here.
1715 2021-03-01 Nathan Sidwell <nathan@acm.org>
1718 * class.c (fixup_type_variants): Propagate mode, precision,
1719 alignment & emptiness.
1720 * module.cc (trees_out::type_node): Use TYPE_ALIGN_RAW.
1721 (trees_in::tree_node): Rematerialize alignment here.
1723 2021-02-27 Jason Merrill <jason@redhat.com>
1726 * parser.c (cp_parser_lambda_declarator_opt): Accept GNU attributes
1729 2021-02-26 Jakub Jelinek <jakub@redhat.com>
1731 * parser.c (cp_parser_lambda_declarator_opt): Implement
1732 P1102R2 - Down with ()! Make ()s optional before lambda specifiers
1733 for -std={c,gnu}++2b or with pedwarn in earlier versions.
1735 2021-02-26 Jakub Jelinek <jakub@redhat.com>
1738 * lambda.c (is_lambda_ignored_entity): Before checking for
1739 LAMBDA_FUNCTION_P, use OVL_FIRST. Drop FUNCTION_DECL check.
1741 2021-02-26 Jason Merrill <jason@redhat.com>
1744 * pt.c (tsubst_copy) [VIEW_CONVERT_EXPR]: Add const
1745 to a class non-type template argument that needs it.
1747 2021-02-26 Patrick Palka <ppalka@redhat.com>
1750 * pt.c (splice_late_return_type): Rebuild the entire return type
1751 if we have to adjust the level of an auto within.
1752 (type_uses_auto): Adjust call to find_type_usage.
1753 * type-utils.h (find_type_usage): Revert r10-6571 change that
1754 made this function return a pointer to the auto node.
1756 2021-02-25 Patrick Palka <ppalka@redhat.com>
1760 * error.c (dump_scope): Pass TFF_NO_TEMPLATE_BINDINGS instead of
1761 TFF_NO_FUNCTION_ARGUMENTS when dumping a function scope.
1763 2021-02-25 Patrick Palka <ppalka@redhat.com>
1766 * pt.c (is_spec_or_derived): Drop cv-qualifiers from 'etype'.
1767 (maybe_aggr_guide): Fix order of arguments to is_spec_or_derived.
1769 2021-02-25 Marek Polacek <polacek@redhat.com>
1773 * constexpr.c (is_std_construct_at): New overload.
1774 (is_std_allocator_allocate): New overload.
1775 (cxx_eval_call_expression): Use the new overloads.
1776 (cxx_eval_constant_expression): Reject casting
1777 from void * as per DR 1312. Don't check can_convert.
1779 2021-02-25 Iain Sandoe <iain@sandoe.co.uk>
1782 * coroutines.cc (struct param_info): Track rvalue refs.
1783 (morph_fn_to_coro): Track rvalue refs, and call the promise
1784 CTOR with the frame copy of passed parms.
1786 2021-02-25 Iain Sandoe <iain@sandoe.co.uk>
1789 * coroutines.cc (morph_fn_to_coro): Unconditionally remove any
1790 set throwing_cleanup marker.
1792 2021-02-25 Nathan Sidwell <nathan@acm.org>
1795 * module.cc (module_state::inform_cmi_p): Renamed field.
1796 (module_state::do_import): Adjust.
1797 (init_modules, finish_module_processing): Likewise.
1798 (handle_module_option): Likewise.
1800 2021-02-25 Nathan Sidwell <nathan@acm.org>
1803 * mapper-client.cc (module_client::open_module_client): Fix typo
1806 2021-02-24 Nathan Sidwell <nathan@acm.org>
1809 * module.cc (ool): New indirection vector.
1810 (loc_spans::maybe_propagate): Location is not optional.
1811 (loc_spans::open): Likewise. Assert monotonically advancing.
1812 (module_for_ordinary_loc): Use ool indirection vector.
1813 (module_state::write_prepare_maps): Do not count empty macro
1814 expansions. Elide empty spans.
1815 (module_state::write_macro_maps): Skip empty expansions.
1816 (ool_cmp): New qsort comparator.
1817 (module_state::write): Create and destroy ool vector.
1818 (name_pending_imports): Fix dump push/pop.
1819 (preprocess_module): Likewise. Add more dumping.
1820 (preprocessed_module): Likewise.
1822 2021-02-24 Iain Sandoe <iain@sandoe.co.uk>
1825 * coroutines.cc (coro_common_keyword_context_valid_p): Suppress
1826 error reporting when instantiating for a constexpr.
1828 2021-02-23 Nathan Sidwell <nathan@acm.org>
1831 * decl.c (name_unnamed_type): Check DECL identity, not IDENTIFIER
1834 2021-02-23 Patrick Palka <ppalka@redhat.com>
1837 * pt.c (tsubst_copy_and_build) <case BASELINK>: New case, copied
1838 over from tsubst_copy.
1840 2021-02-23 Patrick Palka <ppalka@redhat.com>
1842 * pt.c (instantiation_dependent_expression_p): Check
1843 processing_template_decl before calling
1844 potential_constant_expression.
1846 2021-02-22 Nathan Sidwell <nathan@acm.org>
1849 * module.cc (struct module_state): Add visited_p flag.
1850 (name_pending_imports): Use it to avoid duplicate requests.
1851 (preprocess_module): Don't read preprocessor state if we failed to
1852 load a module's config.
1854 2021-02-22 Nathan Sidwell <nathan@acm.org>
1857 * decl.c (duplicate_decls): Move DECL_MODULE_IMPORT_P propagation
1859 * module.cc (set_defining_module): Add assert.
1861 2021-02-19 Nathan Sidwell <nathan@acm.org>
1864 * module.cc (pending_imports): New.
1865 (declare_module): Adjust test condition.
1866 (name_pending_imports): New.
1867 (preprocess_module): Reimplement using pending_imports.
1868 (preprocessed_module): Move name-getting to name_pending_imports.
1869 * name-lookup.c (append_imported_binding_slot): Assert module
1870 ordering is increasing.
1872 2021-02-19 Nathan Sidwell <nathan@acm.org>
1874 * module.cc (note_cmis): New.
1875 (struct module_state): Add inform_read_p bit.
1876 (module_state::do_import): Inform of CMI location, if enabled.
1877 (init_modules): Canonicalize note_cmis entries.
1878 (handle_module_option): Handle -flang-info-module-read=FOO.
1880 2021-02-19 Jason Merrill <jason@redhat.com>
1883 * call.c (perfect_conversion_p): Limit rvalueness
1884 test to reference bindings.
1886 2021-02-19 Jason Merrill <jason@redhat.com>
1889 * call.c (perfect_conversion_p): New.
1890 (perfect_candidate_p): New.
1891 (add_candidates): Ignore templates after a perfect non-template.
1893 2021-02-18 Nathan Sidwell <nathan@acm.org>
1896 * module.cc (canonicalize_header_name): Use
1897 cpp_probe_header_unit.
1898 (maybe_translate_include): Fix note_includes comparison.
1899 (init_modules): Fix note_includes string termination.
1901 2021-02-18 Jakub Jelinek <jakub@redhat.com>
1904 * cp-gimplify.c (cp_genericize_r) <case CALL_EXPR>: Use
1905 cp_get_callee_fndecl_nofold instead of cp_get_callee_fndecl to check
1906 for immediate function calls.
1908 2021-02-17 Nathan Sidwell <nathan@acm.org>
1911 * module.cc (struct macro_export): Add GTY markers.
1912 (macro_exports): Likewise, us a va_gc Vector.
1914 2021-02-17 Jakub Jelinek <jakub@redhat.com>
1917 * init.c (build_zero_init_1): For flexible array members just return
1918 NULL_TREE instead of returning empty CONSTRUCTOR with non-complete
1921 2021-02-17 Nathan Sidwell <nathan@acm.org>
1924 * name-lookup.c (do_pushdecl): Don't peek under template_parm
1926 (set_identifier_type_value_with_scope): ... or here.
1927 (do_pushtag): Only set_identifier_type_value_with_scope at
1928 non-class template parm scope, and use parent scope.
1930 2021-02-17 Nathan Sidwell <nathan@acm.org>
1933 * name-lookup.c (maybe_record_mergeable_decl): Deref the correct
1936 2021-02-17 Patrick Palka <ppalka@redhat.com>
1940 * tree.c (build_aggr_init_expr): Revert r10-7718 change.
1942 2021-02-12 Nathan Sidwell <nathan@acm.org>
1944 * module.cc (module_state::write_cluster): Check bindings for
1945 imported using-decls.
1947 2021-02-12 Nathan Sidwell <nathan@acm.org>
1950 * module.cc (trees_in::decl_value): Call add_module_namespace_decl
1951 for new namespace-scope entities.
1952 (module_state::read_cluster): Don't call add_module_decl here.
1953 * name-lookup.h (add_module_decl): Rename to ...
1954 (add_module_namespace_decl): ... this.
1955 * name-lookup.c (newbinding_bookkeeping): Move into ...
1956 (do_pushdecl): ... here. Its only remaining caller.
1957 (add_module_decl): Rename to ...
1958 (add_module_namespace_decl): ... here. Add checking-assert for
1959 circularity. Don't call newbinding_bookkeeping, just extern_c
1960 checking and incomplete var checking.
1962 2021-02-12 Nathan Sidwell <nathan@acm.org>
1966 * cp-tree.h (CPTI_GLOBAL_TYPE): Delete.
1967 (global_type_node): Delete.
1968 (IDENTIFIER_TYPE_VALUE): Delete.
1969 (IDENTIFIER_HAS_TYPE_VALUE): Delete.
1970 (get_type_value): Delete.
1971 * name-lookup.h (identifier_type_value): Delete.
1972 * name-lookup.c (check_module_override): Don't
1973 SET_IDENTIFIER_TYPE_VALUE here.
1974 (do_pushdecl): Nor here.
1975 (identifier_type_value_1, identifier_type_value): Delete.
1976 (set_identifier_type_value_with_scope): Only
1977 SET_IDENTIFIER_TYPE_VALUE for local and class scopes.
1978 (pushdecl_nanmespace_level): Remove shadow stack nadgering.
1979 (do_pushtag): Use REAL_IDENTIFIER_TYPE_VALUE.
1980 * call.c (check_dtor_name): Use lookup_name.
1981 * decl.c (cxx_init_decl_processing): Drop global_type_node.
1982 * decl2.c (cplus_decl_attributes): Don't SET_IDENTIFIER_TYPE_VALUE
1984 * init.c (get_type_value): Delete.
1985 * pt.c (instantiate_class_template_1): Don't call pushtag or
1986 SET_IDENTIFIER_TYPE_VALUE here.
1987 (tsubst): Assert never an identifier.
1988 (dependent_type_p): Drop global_type_node assert.
1989 * typeck.c (error_args_num): Don't use IDENTIFIER_HAS_TYPE_VALUE
1990 to determine ctorness.
1992 2021-02-12 Jakub Jelinek <jakub@redhat.com>
1995 * parser.c (cp_parser_requirement_seq): Stop iterating after reaching
1998 2021-02-12 Jason Merrill <jason@redhat.com>
2002 * pt.c (extract_fnparm_pack): Check DECL_PACK_P here.
2003 (register_parameter_specializations): Not here.
2005 2021-02-11 Marek Polacek <polacek@redhat.com>
2008 * pt.c (lookup_template_class_1): Pass tf_none to tsubst when looking
2009 for the partial instantiation.
2011 2021-02-11 Jakub Jelinek <jakub@redhat.com>
2014 * init.c (build_zero_init_1): Handle zero initialiation of
2015 flexible array members like initialization of [0] arrays.
2016 Use integer_minus_onep instead of comparison to integer_minus_one_node
2017 and integer_zerop instead of comparison against size_zero_node.
2020 2021-02-11 Marek Polacek <polacek@redhat.com>
2023 * semantics.c (finish_do_stmt): Check for unexpanded parameter packs.
2025 2021-02-11 Patrick Palka <ppalka@redhat.com>
2028 * name-lookup.c (op_unqualified_lookup): Handle an ambiguous
2029 lookup result by discarding it if the first element is a
2030 class-scope declaration, otherwise return it.
2031 (push_operator_bindings): Handle an ambiguous lookup result by
2032 doing push_local_binding on each element in the list.
2034 2021-02-11 Marek Polacek <polacek@redhat.com>
2036 * parser.c (cp_parser_selection_statement): Use vec_free.
2038 2021-02-10 Jakub Jelinek <jakub@redhat.com>
2042 * constexpr.c: Include cgraph.h.
2043 (cxx_eval_call_expression): Call varpool_node::finalize_decl on
2044 heap artificial vars.
2045 (cxx_eval_outermost_constant_expr): Remove varpool nodes for
2046 heap artificial vars.
2048 2021-02-10 Nathan Sidwell <nathan@acm.org>
2051 * pt.c (tsubst_copy) [VAR_DECL]: For a DECL_LOCAL_DECL_P T is the
2052 answer if there's no local specialization.
2054 2021-02-09 Nathan Sidwell <nathan@acm.org>
2057 * module.cc (module_state::is_rooted): Rename to ...
2058 (module_state::has_location): ... here. Adjust callers.
2059 (module_state::read_partitions): Adjust validity check.
2060 Don't overwrite a known location.
2062 2021-02-09 Jason Merrill <jason@redhat.com>
2065 * pt.c (mark_decl_instantiated): Exit early if consteval.
2067 2021-02-09 Jason Merrill <jason@redhat.com>
2071 * cp-gimplify.c (simple_empty_class_p): Don't touch an invisiref
2074 2021-02-09 Jason Merrill <jason@redhat.com>
2078 * constexpr.c (cxx_eval_store_expression): Only skip empty fields in
2081 2021-02-08 Nathan Sidwell <nathan@acm.org>
2083 * decl.c (start_cleanup_fn): Push function into
2086 2021-02-08 Nathan Sidwell <nathan@acm.org>
2089 * cp-tree.h (push_abi_namespace, pop_abi_namespace): Declare.
2090 * decl.c (push_abi_namespace, pop_abi_namespace): Moved
2091 from rtti.c, add default namespace arg.
2092 (check_redeclaration_exception_specification): Allow a lazy
2093 builtin's eh spec to differ from an lready-declared user
2095 (declare_global_var): Use push/pop_abi_namespace.
2096 (get_atexit_node): Push the fndecl into a namespace.
2097 * rtti.c (push_abi_namespace, pop_abi_namespace): Moved to
2100 2021-02-08 Marek Polacek <polacek@redhat.com>
2102 * cp-tree.h (CLASSTYPE_TI_TEMPLATE): Fix typo.
2104 2021-02-05 Marek Polacek <polacek@redhat.com>
2107 * call.c (build_conditional_expr_1): Don't call mark_lvalue_use
2109 * expr.c (mark_use) <case MODIFY_EXPR>: Don't check read_p when
2110 issuing the -Wvolatile warning. Only set TREE_THIS_VOLATILE if
2111 a warning was emitted.
2113 2021-02-05 Marek Polacek <polacek@redhat.com>
2116 * name-lookup.c (lookup_using_decl): Hoist the destructor check.
2118 2021-02-05 Jakub Jelinek <jakub@redhat.com>
2121 * decl.c (check_array_initializer): For structured bindings, require
2122 the array type to be complete.
2124 2021-02-04 Jason Merrill <jason@redhat.com>
2127 * constraint.cc (build_concept_check_arguments): Remove assert.
2128 (build_concept_check): Allow empty args.
2130 2021-02-04 Tom Greenslade (thomgree) <thomgree@cisco.com>
2133 * call.c (can_convert_array): Extend to handle all valid aggregate
2134 initializers of an array; including by string literals, not just by
2136 (build_aggr_conv): Call can_convert_array more often, not just in
2137 brace-init-list case.
2138 * typeck2.c (array_string_literal_compatible_p): New function.
2139 (digest_init_r): call array_string_literal_compatible_p
2140 * cp-tree.h: (array_string_literal_compatible_p): Declare.
2142 2021-02-04 Jason Merrill <jason@redhat.com>
2145 * pt.c (do_class_deduction): No aggregate guide if any_dguides_p.
2147 2021-02-04 Jason Merrill <jason@redhat.com>
2150 * pt.c (tsubst_attribute): Handle error.
2151 (apply_late_template_attributes): Return false on error.
2152 (tsubst_function_decl): Check its return value.
2153 (tsubst_decl): Likewise.
2154 (push_template_decl): Assert current_template_parms.
2155 (tsubst_template_decl): Set current_template_parms.
2157 2021-02-03 Marek Polacek <polacek@redhat.com>
2160 * call.c (struct z_candidate): Mark rewritten and reversed as const.
2161 (struct NonPublicField): Mark operator() as const.
2162 (struct NonTrivialField): Likewise.
2164 2021-02-03 Jason Merrill <jason@redhat.com>
2168 * pt.c (spec_hasher::equal): Set processing_template_decl.
2169 * Make-lang.in (check-g++-strict-gc): Add --param
2170 hash-table-verification-limit=10000.
2172 2021-02-03 Marek Polacek <polacek@redhat.com>
2175 * parser.c (cp_parser_class_specifier_1): Use any possible
2176 DEFPARSE_INSTANTIATIONS to update DEFERRED_NOEXCEPT_PATTERN.
2177 (cp_parser_save_noexcept): Initialize DEFPARSE_INSTANTIATIONS.
2178 * pt.c (tsubst_exception_specification): Stash new_specs into
2179 DEFPARSE_INSTANTIATIONS.
2180 * tree.c (fixup_deferred_exception_variants): Use
2181 UNPARSED_NOEXCEPT_SPEC_P.
2183 2021-02-02 Jason Merrill <jason@redhat.com>
2187 * error.c (dump_expr): Ignore dummy object.
2188 * pt.c (tsubst_baselink): Handle dependent scope.
2190 2021-02-01 Patrick Palka <ppalka@redhat.com>
2193 * constexpr.c (cxx_eval_array_reference): Also set
2194 new_ctx.object when setting new_ctx.ctor.
2196 2021-02-01 Marek Polacek <polacek@redhat.com>
2199 * parser.c (cp_parser_has_attribute_expression): Use
2200 uses_template_parms instead of type_dependent_expression_p.
2202 2021-02-01 Jason Merrill <jason@redhat.com>
2205 * cp-tree.h: Declare it.
2206 * pt.c (comparing_dependent_aliases): New flag.
2207 (template_args_equal, spec_hasher::equal): Set it.
2208 (dependent_alias_template_spec_p): Assert that we don't
2209 get non-types other than error_mark_node.
2210 (instantiate_alias_template): SET_TYPE_STRUCTURAL_EQUALITY
2211 on complex alias specializations. Set TYPE_DEPENDENT_P here.
2212 (tsubst_decl): Not here.
2213 * module.cc (module_state::read_cluster): Set
2214 comparing_dependent_aliases instead of
2215 comparing_specializations.
2216 * tree.c (cp_tree_equal): Remove comparing_specializations
2218 * typeck.c (structural_comptypes): Adjust.
2219 (comptypes): Remove comparing_specializations handling.
2221 2021-01-29 Nathan Sidwell <nathan@acm.org>
2224 * module.cc (module_state_config): Add num_entities field.
2225 (module_state::read_entities): The entity_ary span is
2227 (module_state::write_config): Write num_entities.
2228 (module_state::read_config): Read num_entities.
2229 (module_state::write): Set config's num_entities.
2230 (module_state::read_initial): Allocate the entity ary
2232 (module_state::read_language): Do not set entity_lwm
2235 2021-01-29 Marek Polacek <polacek@redhat.com>
2238 * parser.c (cp_parser_class_name): If parser->scope is
2239 error_mark_node, return it, otherwise continue.
2241 2021-01-28 Jakub Jelinek <jakub@redhat.com>
2244 * typeck.c (build_x_indirect_ref): For *this, return current_class_ref.
2246 2021-01-28 Jakub Jelinek <jakub@redhat.com>
2250 * decl.c (cp_finish_decl): For register vars with asmspec in templates
2251 call set_user_assembler_name and set DECL_HARD_REGISTER.
2252 * pt.c (tsubst_expr): When instantiating DECL_HARD_REGISTER vars,
2253 pass asmspec_tree to cp_finish_decl.
2255 2021-01-28 Nathan Sidwell <nathan@acm.org>
2258 * module.cc (trees_out::decl_value): Swap is_typedef & TYPE_NAME
2260 (trees_in::decl_value): Do typedef frobbing only when installing
2261 a new typedef, adjust is_matching_decl call. Swap is_typedef
2263 (trees_in::is_matching_decl): Add is_typedef parm. Adjust variable
2264 names and deal with typedef checking.
2266 2021-01-27 Jason Merrill <jason@redhat.com>
2269 * name-lookup.c (lookup_using_decl): Clean up handling
2270 of dependency and inherited constructors.
2271 (finish_nonmember_using_decl): Handle DECL_DEPENDENT_P.
2272 * pt.c (tsubst_expr): Handle DECL_DEPENDENT_P.
2274 2021-01-26 Jason Merrill <jason@redhat.com>
2277 * call.c (type_passed_as): Don't mark invisiref restrict.
2279 2021-01-26 Jason Merrill <jason@redhat.com>
2283 * class.c (layout_class_type): An empty field gets size 0.
2284 (is_empty_field): New.
2285 (check_bases): Check it.
2286 * cp-tree.h (is_empty_field): Declare it.
2287 * constexpr.c (cxx_eval_store_expression): Check it.
2288 (cx_check_missing_mem_inits): Likewise.
2289 * init.c (perform_member_init): Likewise.
2290 * typeck2.c (process_init_constructor_record): Likewise.
2292 2021-01-25 Martin Sebor <msebor@redhat.com>
2295 * cvt.c (cp_fold_convert): Propagate TREE_NO_WARNING.
2297 2021-01-25 Jason Merrill <jason@redhat.com>
2300 * constexpr.c (get_or_insert_ctor_field): Add check.
2301 (cxx_eval_store_expression): Handle discontinuity of refs.
2303 2021-01-23 Anthony Sharp <anthonysharp15@gmail.com>
2305 * call.c (complain_about_access): Altered function.
2306 * cp-tree.h (complain_about_access): Changed parameters of function.
2307 (get_parent_with_private_access): Declared new function.
2308 * search.c (get_parent_with_private_access): Defined new function.
2309 * semantics.c (enforce_access): Modified function.
2310 * typeck.c (complain_about_unrecognized_member): Updated function
2311 arguments in complain_about_access.
2313 2021-01-23 Patrick Palka <ppalka@redhat.com>
2316 * cp-tree.h (shared_member_p): Adjust declaration.
2317 * parser.c (cp_parser_init_declarator): If the storage class
2318 specifier is sc_static, pass true for static_p to
2319 cp_parser_declarator.
2320 (cp_parser_direct_declarator): Don't do inject_this_parm when
2321 the declarator is a friend.
2322 * search.c (shared_member_p): Change return type to bool and
2323 adjust function body accordingly. Return false for a dependent
2324 USING_DECL instead of aborting.
2325 * semantics.c (finish_qualified_id_expr): Rely on shared_member_p
2326 even when type-dependent.
2328 2021-01-22 Marek Polacek <polacek@redhat.com>
2331 * parser.c (inject_parm_decls): Remove a redundant assignment.
2332 (cp_parser_class_specifier_1): Clear current_class_{ptr,ref}
2333 before calling inject_parm_decls.
2335 2021-01-22 Jason Merrill <jason@redhat.com>
2338 * call.c (make_base_init_ok): Use DECL_HAS_VTT_PARM_P.
2340 2021-01-22 Jakub Jelinek <jakub@redhat.com>
2343 * init.c (build_zero_init_1): Revert the 2018-03-06 change to
2344 return build_zero_cst for reference types.
2345 * typeck2.c (process_init_constructor_record): Instead call
2346 build_zero_cst here during error recovery instead of build_zero_init.
2348 2021-01-22 Marek Polacek <polacek@redhat.com>
2351 * mangle.c (write_member_name): Emit abi_warn_or_compat_version_crosses
2352 warnings regardless of abi_version_at_least.
2353 (write_expression): When the expression is a dependent name
2354 and an operator name, write "on" before writing its name.
2356 2021-01-22 Marek Polacek <polacek@redhat.com>
2359 * pt.c (instantiate_class_template_1): Instantiate members
2360 marked with attribute used only after we're done instantiating
2363 2021-01-21 Patrick Palka <ppalka@redhat.com>
2366 * semantics.c (finish_decltype_type): Set up a cp_unevaluated
2367 sentinel at the start of the function. Remove a now-redundant
2368 manual adjustment of cp_unevaluated_operand.
2370 2021-01-21 Nathan Sidwell <nathan@acm.org>
2373 * module.cc (depset::hash::find_dependencies): Add
2375 (trees_out::core_vals): Check state before calling
2377 (sort_cluster, module_state::write): Adjust
2378 find_dependencies call.
2380 2021-01-21 Jakub Jelinek <jakub@redhat.com>
2383 * constexpr.c (check_for_return_continue_data): Add break_stmt member.
2384 (check_for_return_continue): Also look for BREAK_STMT. Handle
2385 SWITCH_STMT by ignoring break_stmt from its body.
2386 (potential_constant_expression_1) <case FOR_STMT>,
2387 <case WHILE_STMT>: If the condition isn't constant true, check if
2388 the loop body can contain a return stmt.
2389 <case SWITCH_STMT>: Adjust check_for_return_continue_data initializer.
2390 <case IF_STMT>: If recursion with tf_none is successful,
2391 merge *jump_target from the branches - returns with highest priority,
2392 breaks or continues lower. If then branch is potentially constant and
2393 doesn't return, check the else branch if it could return, break or
2396 2021-01-21 Nathan Sidwell <nathan@acm.org>
2399 * name-lookup.c (lookup_class_binding): Rearrange a stat-hack.
2401 2021-01-20 Nathan Sidwell <nathan@acm.org>
2403 * module.cc (bytes_in::i, bytes_in::wi): Avoid left shift of
2406 2021-01-20 Patrick Palka <ppalka@redhat.com>
2409 * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: If tsubsting
2410 CLASS_PLACEHOLDER_TEMPLATE yields a TEMPLATE_TEMPLATE_PARM,
2411 adjust to its TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
2413 2021-01-20 Patrick Palka <ppalka@redhat.com>
2416 * parser.c (cp_parser_class_head): Defer access checking when
2417 parsing the base-clause until all bases are seen and attached
2419 * pt.c (instantiate_class_template): Likewise when substituting
2420 into dependent bases.
2422 2021-01-20 Jakub Jelinek <jakub@redhat.com>
2425 * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_DETACH>: If
2426 error_operand_p, remove clause without further checking. Check
2427 for non-NULL TYPE_NAME.
2429 2021-01-19 Marek Polacek <polacek@redhat.com>
2432 * pt.c (maybe_instantiate_noexcept): Return false if FN is
2435 2021-01-19 Marek Polacek <polacek@redhat.com>
2438 * name-lookup.c (push_using_decl_bindings): New, broken out of...
2439 (finish_nonmember_using_decl): ...here.
2440 * name-lookup.h (push_using_decl_bindings): Update declaration.
2441 * pt.c (tsubst_expr): Update the call to push_using_decl_bindings.
2443 2021-01-19 Patrick Palka <ppalka@redhat.com>
2447 * search.c (friend_accessible_p): If scope is a hidden friend
2448 defined inside a dependent class, consider access from the
2450 * parser.c (cp_parser_late_parsing_for_member): Don't push a
2451 dk_no_check access state.
2453 2021-01-19 Marek Polacek <polacek@redhat.com>
2456 * parser.c (cp_parser_class_specifier_1): Perform late-parsing
2457 of NSDMIs before late-parsing of noexcept-specifiers.
2459 2021-01-19 Nathan Sidwell <nathan@acm.org>
2461 * module.cc (identifier): Merge overloads.
2463 2021-01-19 Nathan Sidwell <nathan@acm.org>
2466 * module.cc (trees_out::write_location): Make static.
2468 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
2470 * parser.c (cp_parser_omp_clause_detach): New.
2471 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH.
2472 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
2473 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
2474 * semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
2475 Prevent use of detach with mergeable and overriding the data sharing
2476 mode of the event handle.
2478 2021-01-15 Nathan Sidwell <nathan@acm.org>
2481 * tree.c (cp_build_qualified_type_real): Propagate an array's
2482 dependentness to the copy, if known.
2484 2021-01-15 Jason Merrill <jason@redhat.com>
2487 * call.c (unsafe_return_slot_p): Return int.
2488 (init_by_return_slot_p): Split out from...
2489 (unsafe_copy_elision_p): ...here.
2490 (unsafe_copy_elision_p_opt): New name for old meaning.
2491 (build_over_call): Adjust.
2492 (make_safe_copy_elision): New.
2493 * typeck2.c (split_nonconstant_init_1): Elide copy from safe
2494 list-initialization.
2495 * cp-tree.h: Adjust.
2497 2021-01-15 Jason Merrill <jason@redhat.com>
2499 * call.c (base_ctor_for, make_base_init_ok): New.
2500 (build_over_call): Use make_base_init_ok.
2502 2021-01-15 Jason Merrill <jason@redhat.com>
2505 * tree.c (build_vec_init_expr): Don't call build_vec_init_elt
2506 if we got a CONSTRUCTOR.
2508 2021-01-15 Nathan Sidwell <nathan@acm.org>
2511 * lang-specs.h: Fix handling of -fmodule-only with -fsyntax-only.
2513 2021-01-14 Jason Merrill <jason@redhat.com>
2515 * typeck2.c (process_init_constructor_record): Use fldtype
2516 variable consistently.
2518 2021-01-14 Nathan Sidwell <nathan@acm.org>
2521 * tree.c (cp_tree_equal): Correct map_context logic.
2523 2021-01-13 Marek Polacek <polacek@redhat.com>
2526 * name-lookup.c (push_using_decl_bindings): New.
2527 * name-lookup.h (push_using_decl_bindings): Declare.
2528 * pt.c (tsubst_expr): Call push_using_decl_bindings.
2530 2021-01-13 Nathan Sidwell <nathan@acm.org>
2533 * module.cc (module_add_import_initializers): Pass a
2534 zero-element argument vector.
2536 2021-01-12 Patrick Palka <ppalka@redhat.com>
2539 * tree.c (cp_walk_subtrees) <case TEMPLATE_TYPE_PARM>: Visit
2540 the template of a CTAD placeholder.
2542 2021-01-12 Marek Polacek <polacek@redhat.com>
2545 * typeck2.c (process_init_constructor_record): Don't emit
2546 -Wmissing-field-initializers warnings in unevaluated contexts.
2548 2021-01-11 Jakub Jelinek <jakub@redhat.com>
2551 * class.c (find_abi_tags_r): Set *walk_subtrees to 2 instead of 1
2553 (mark_abi_tags_r): Likewise.
2554 * decl2.c (min_vis_r): Likewise.
2555 * tree.c (cp_walk_subtrees): If *walk_subtrees_p is 2, look through
2558 2021-01-08 Patrick Palka <ppalka@redhat.com>
2561 * constexpr.c (cxx_eval_call_expression): Check CLASS_TYPE_P
2562 instead of AGGREGATE_TYPE_P before calling replace_result_decl.
2564 2021-01-08 Patrick Palka <ppalka@redhat.com>
2567 * semantics.c (check_accessibility_of_qualified_id): Punt if
2568 we're checking access of a scoped non-static member inside a
2571 2021-01-07 Jakub Jelinek <jakub@redhat.com>
2574 * pt.c (tsubst_copy) <case BIT_CAST_EXPR>: Don't call
2575 cp_build_bit_cast here, instead just build_min a BIT_CAST_EXPR and set
2577 (tsubst_copy_and_build): Handle BIT_CAST_EXPR.
2579 2021-01-07 Marek Polacek <polacek@redhat.com>
2582 * decl.c (grokdeclarator): Move the !funcdecl_p check inside the
2583 !late_return_type block.
2585 2021-01-07 Jason Merrill <jason@redhat.com>
2587 * constexpr.c (cxx_bind_parameters_in_call): Add comment.
2588 (cxx_eval_store_expression): Add comment.
2590 2021-01-07 Jason Merrill <jason@redhat.com>
2592 * call.c (has_next): Factor out from...
2593 (next_conversion): ...here.
2594 (strip_standard_conversion): And here.
2595 (is_subseq): And here.
2596 (build_conv): Check it.
2597 (standard_conversion): Don't call build_conv
2600 2021-01-06 Martin Sebor <msebor@redhat.com>
2603 * error.c (dump_expr): Call c_pretty_printer::unary_expression.
2605 2021-01-05 Patrick Palka <ppalka@redhat.com>
2607 * pt.c (unify) <case TEMPLATE_PARM_INDEX>: After walking into
2608 the type of the NTTP, substitute into the type again. If the
2609 type is still dependent, don't unify the NTTP.
2611 2021-01-05 Jakub Jelinek <jakub@redhat.com>
2613 * Make-lang.in (cc1plus-checksum, cc1plus$(exeext): Add
2614 $(CODYLIB) after $(BACKEND).
2616 2021-01-05 Jakub Jelinek <jakub@redhat.com>
2619 * constexpr.c (cxx_eval_constant_expression) <case BIT_CAST_EXPR>:
2620 Punt if lval is true.
2621 * semantics.c (cp_build_bit_cast): Call get_target_expr_sfinae on
2622 the result if it has a class type.
2624 2021-01-05 Marek Polacek <polacek@redhat.com>
2627 * pt.c (resolve_overloaded_unification): Call
2628 maybe_instantiate_noexcept after instantiating the function
2631 2021-01-05 Nathan Sidwell <nathan@acm.org>
2633 * parser.c (cp_parser_module_declaration): Alter diagnostic
2634 text to say where is permissable.
2636 2021-01-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2639 * Make-lang.in (cc1plus$(exeext)): Add $(CODYLIB), $(NETLIBS).
2641 2021-01-02 Jan Hubicka <jh@suse.cz>
2643 * cp-tree.h (cp_tree_c_finish_parsing): Declare.
2644 * decl2.c (c_parse_final_cleanups): Call cp_tree_c_finish_parsing.
2645 * tree.c (cp_tree_c_finish_parsing): New function.
2647 2021-01-01 Jakub Jelinek <jakub@redhat.com>
2649 * ChangeLog-2020: Rotate ChangeLog. New file.
2652 Copyright (C) 2021 Free Software Foundation, Inc.
2654 Copying and distribution of this file, with or without modification,
2655 are permitted in any medium without royalty provided the copyright
2656 notice and this notice are preserved.