12021-07-28  Release Manager
2
3	* GCC 11.2.0 released.
4
52021-07-21  Jakub Jelinek  <jakub@redhat.com>
6
7	Backported from master:
8	2021-07-21  Jakub Jelinek  <jakub@redhat.com>
9
10	PR c++/101516
11	* semantics.c (finish_omp_reduction_clause): Also call
12	complete_type_or_else and return true if it fails.
13
142021-07-20  Iain Sandoe  <iain@sandoe.co.uk>
15
16	Backported from master:
17	2021-07-19  Iain Sandoe  <iain@sandoe.co.uk>
18
19	PR c++/95520
20	* coroutines.cc (struct coroutine_info): Add fields for
21	actor and destroy function decls.
22	(to_ramp): New.
23	(coro_get_ramp_function): New.
24	(coro_get_actor_function): New.
25	(coro_get_destroy_function): New.
26	(act_des_fn): Set up mapping between ramp, actor and
27	destroy functions.
28	(morph_fn_to_coro): Adjust interface to the builder for
29	helper function decls.
30	* cp-tree.h (DECL_ACTOR_FN, DECL_DESTROY_FN, DECL_RAMP_FN,
31	JOIN_STR): New.
32	* mangle.c (write_encoding): Handle coroutine helpers.
33	(write_unqualified_name): Handle lambda coroutine helpers.
34
352021-07-20  Iain Sandoe  <iain@sandoe.co.uk>
36
37	Backported from master:
38	2021-07-09  Iain Sandoe  <iain@sandoe.co.uk>
39
40	* coroutines.cc (build_actor_fn): Move common code to
41	act_des_fn.
42	(build_destroy_fn): Likewise.
43	(act_des_fn): Build the void return here.  Ensure that the
44	source location matches the original function.
45
462021-07-20  Iain Sandoe  <iain@sandoe.co.uk>
47
48	Backported from master:
49	2021-07-09  Iain Sandoe  <iain@sandoe.co.uk>
50
51	* coroutines.cc
52	(coro_rewrite_function_body): Connect the replacement
53	function block to the block nest correctly.
54
552021-07-18  Tobias Burnus  <tobias@codesourcery.com>
56
57	Backported from master:
58	2021-05-04  Tobias Burnus  <tobias@codesourcery.com>
59
60	* semantics.c (finish_omp_reduction_clause): Accept float + complex
61	for || and && reductions.
62
632021-07-18  Jakub Jelinek  <jakub@redhat.com>
64
65	Backported from master:
66	2021-07-15  Jakub Jelinek  <jakub@redhat.com>
67
68	PR c++/101443
69	* cp-gimplify.c (cp_fold): For comparisons with NULLPTR_TYPE
70	operands, fold them right away to true or false.
71
722021-07-16  Patrick Palka  <ppalka@redhat.com>
73
74	Backported from master:
75	2021-07-16  Patrick Palka  <ppalka@redhat.com>
76
77	PR c++/101233
78	* pt.c (alias_ctad_tweaks): Clear cp_unevaluated_operand for
79	substituting DECL_ARGUMENTS.
80
812021-07-16  Patrick Palka  <ppalka@redhat.com>
82
83	Backported from master:
84	2021-05-11  Patrick Palka  <ppalka@redhat.com>
85
86	PR c++/100138
87	* constraint.cc (tsubst_constraint): Set up cp_unevaluated.
88	(satisfy_atom): Set up iloc_sentinel before calling
89	cxx_constant_value.
90	* pt.c (tsubst_pack_expansion): When returning a rebuilt pack
91	expansion, carry over PACK_EXPANSION_LOCAL_P and
92	PACK_EXPANSION_SIZEOF_P from the original pack expansion.
93
942021-07-13  Patrick Palka  <ppalka@redhat.com>
95
96	Backported from master:
97	2021-07-09  Patrick Palka  <ppalka@redhat.com>
98
99	PR c++/101181
100	* constraint.cc (tsubst_requires_expr): Pass complain/in_decl to
101	add_extra_args.
102	* cp-tree.h (add_extra_args): Add complain/in_decl parameters.
103	* pt.c (build_extra_args): Make a copy of args.
104	(add_extra_args): Add complain/in_decl parameters.  Enable the
105	code for handling the case where the extra arguments are
106	dependent.
107	(tsubst_pack_expansion): Pass complain/in_decl to
108	add_extra_args.
109	(tsubst_template_args): Handle missing template arguments.
110	(tsubst_expr) <case IF_STMT>: Pass complain/in_decl to
111	add_extra_args.
112
1132021-07-13  Patrick Palka  <ppalka@redhat.com>
114
115	Backported from master:
116	2021-07-09  Patrick Palka  <ppalka@redhat.com>
117
118	PR c++/101247
119	* pt.c (any_template_parm_r) <case TEMPLATE_DECL>: Just walk the
120	DECL_CONTEXT.
121
1222021-07-13  Patrick Palka  <ppalka@redhat.com>
123
124	Backported from master:
125	2021-07-02  Patrick Palka  <ppalka@redhat.com>
126
127	PR c++/101247
128	* pt.c (any_template_parm_r) <case TEMPLATE_DECL>: Rewrite to
129	use common_enclosing_class and to not depend on the TREE_TYPE
130	of outer levels pointing to the corresponding primary template.
131
1322021-07-13  Patrick Palka  <ppalka@redhat.com>
133
134	Backported from master:
135	2021-07-01  Patrick Palka  <ppalka@redhat.com>
136
137	PR c++/101194
138	* constexpr.c (cxx_eval_array_reference): When the element type
139	is an empty type and the corresponding element is omitted, just
140	return an empty CONSTRUCTOR instead of attempting value
141	initialization.
142
1432021-07-13  Patrick Palka  <ppalka@redhat.com>
144
145	Backported from master:
146	2021-06-24  Patrick Palka  <ppalka@redhat.com>
147
148	PR c++/98832
149	* pt.c (maybe_aggr_guide): Handle alias templates appropriately.
150
1512021-07-13  Patrick Palka  <ppalka@redhat.com>
152
153	Backported from master:
154	2021-06-24  Patrick Palka  <ppalka@redhat.com>
155
156	PR c++/101182
157	* constraint.cc (evaluate_requires_expr): Adjust function comment.
158	* cp-gimplify.c (cp_genericize_r) <case REQUIRES_EXPR>: Move to ...
159	(cp_fold) <case REQUIRES_EXPR>: ... here.
160
1612021-07-13  Patrick Palka  <ppalka@redhat.com>
162
163	Backported from master:
164	2021-06-07  Patrick Palka  <ppalka@redhat.com>
165
166	PR c++/100918
167	* parser.c (cp_parser_lookup_name): Check access of the lookup
168	result before we potentially adjust an injected-class-name to
169	its TEMPLATE_DECL.
170
1712021-07-13  Patrick Palka  <ppalka@redhat.com>
172
173	Backported from master:
174	2021-05-26  Patrick Palka  <ppalka@redhat.com>
175
176	PR c++/97420
177	* cvt.c (noexcept_conv_p): Remove redundant checks and simplify.
178	(fnptr_conv_p): Don't call non_reference.  Use INDIRECT_TYPE_P
179	instead of TYPE_PTR_P.
180	* pt.c (convert_nontype_argument_function): Look through
181	implicit INDIRECT_REFs before calling strip_fnptr_conv.
182
1832021-07-09  Jason Merrill  <jason@redhat.com>
184
185	PR c++/101098
186	* decl.c (function_requirements_equivalent_p): Only compare
187	trailing requirements on a specialization.
188
1892021-07-09  Jason Merrill  <jason@redhat.com>
190
191	PR c++/100838
192	* call.c (convert_like_internal): Clear tf_no_cleanup when
193	recursing.
194	(build_user_type_conversion_1): Only add ck_rvalue if
195	LOOKUP_ONLYCONVERTING.
196
1972021-07-09  Jason Merrill  <jason@redhat.com>
198
199	PR c++/86355
200	* pt.c (use_pack_expansion_extra_args_p): Don't compare
201	args from the same argument pack.
202
2032021-07-08  Marek Polacek  <polacek@redhat.com>
204
205	Backported from master:
206	2021-07-08  Marek Polacek  <polacek@redhat.com>
207
208	PR c++/101087
209	* cp-tree.h (unevaluated_p): New.
210	* except.c (check_noexcept_r): Use it.  Don't walk into
211	unevaluated operands.
212
2132021-07-07  Jason Merrill  <jason@redhat.com>
214
215	Revert:
216	2020-12-02  Jason Merrill  <jason@redhat.com>
217
218	* decl.c (check_initializer): Also look through STMT_EXPR
219	and BIND_EXPR.
220
2212021-07-07  Jason Merrill  <jason@redhat.com>
222
223	PR c++/101040
224	PR c++/97566
225	* class.c (is_empty_field): Handle null argument.
226	* constexpr.c (cxx_eval_bare_aggregate): Discard initializer
227	for empty field.
228
2292021-06-29  Marek Polacek  <polacek@redhat.com>
230
231	Backported from master:
232	2021-06-26  Marek Polacek  <polacek@redhat.com>
233
234	PR c++/100752
235	* parser.c (cp_parser_declarator): Pass flags down to
236	cp_parser_declarator.  Also pass static_p/member_p.
237
2382021-06-23  Jakub Jelinek  <jakub@redhat.com>
239
240	Backported from master:
241	2021-06-21  Jakub Jelinek  <jakub@redhat.com>
242
243	PR inline-asm/100785
244	* typeck.c (cxx_mark_addressable): Diagnose trying to make
245	bit-fields addressable.
246
2472021-06-21  Jason Merrill  <jason@redhat.com>
248
249	PR c++/101106
250	* decl.c (duplicate_decls): Condition note on return value of pedwarn.
251
2522021-06-17  Jakub Jelinek  <jakub@redhat.com>
253
254	Backported from master:
255	2021-06-06  Jakub Jelinek  <jakub@redhat.com>
256
257	PR c/100902
258	* parser.c (cp_parser_omp_target): Call c_omp_adjust_map_clauses
259	even when target is combined with other constructs.
260
2612021-06-17  Jason Merrill  <jason@redhat.com>
262
263	* init.c (build_vec_init): Preserve the type of base.
264
2652021-06-16  Jason Merrill  <jason@redhat.com>
266
267	PR c++/101078
268	* pt.c (tsubst_baselink): Update binfos in non-dependent case.
269
2702021-06-16  Jason Merrill  <jason@redhat.com>
271
272	PR c++/101029
273	* init.c (build_vec_init): Shortcut [0] case.
274
2752021-06-10  Patrick Palka  <ppalka@redhat.com>
276
277	Backported from master:
278	2021-06-10  Patrick Palka  <ppalka@redhat.com>
279
280	PR c++/100946
281	* constraint.cc (normalize_placeholder_type_constraints): When
282	normalizing a non-templated return-type-requirement, add a dummy
283	level to initial_parms.
284
2852021-06-09  Marek Polacek  <polacek@redhat.com>
286
287	Backported from master:
288	2021-06-08  Marek Polacek  <polacek@redhat.com>
289
290	PR c++/100065
291	* decl.c (grokdeclarator): Store a value-dependent
292	explicit-specifier even for deduction guides.
293
2942021-06-08  Jason Merrill  <jason@redhat.com>
295
296	PR c++/100963
297	* call.c (perfect_conversion_p): Check check_narrowing.
298
2992021-06-08  Jason Merrill  <jason@redhat.com>
300
301	PR c++/91706
302	* semantics.c (baselink_for_fns): Fix BASELINK_BINFO.
303
3042021-06-08  Jason Merrill  <jason@redhat.com>
305
306	* module.cc (duplicate_hash::hash): Comment out.
307	(trees_in::tree_value): Adjust loop counter.
308
3092021-06-07  Patrick Palka  <ppalka@redhat.com>
310
311	Backported from master:
312	2021-06-03  Patrick Palka  <ppalka@redhat.com>
313
314	PR c++/100862
315	* pt.c (set_current_access_from_decl): Move to ...
316	* class.c (set_current_access_from_decl): ... here.
317	(handle_using_decl): Use it to propagate the access of the
318	using-enum decl to the copy of the imported enumerator.
319	* cp-tree.h (set_current_access_from_decl): Declare.
320	* decl.c (build_enumerator): Simplify using make_temp_override
321	and set_current_access_from_decl.
322
3232021-06-07  Patrick Palka  <ppalka@redhat.com>
324
325	Backported from master:
326	2021-06-04  Patrick Palka  <ppalka@redhat.com>
327
328	PR c++/100102
329	* pt.c (tsubst_function_decl): Remove old code for reducing
330	args when it has excess levels.
331
3322021-06-01  Jason Merrill  <jason@redhat.com>
333
334	PR c++/91859
335	* call.c (build_op_delete_call): Don't set CALL_FROM_NEW_OR_DELETE_P
336	for destroying delete.
337	* init.c (build_delete): Don't clobber before destroying delete.
338
3392021-06-01  Jason Merrill  <jason@redhat.com>
340
341	PR c++/100797
342	PR c++/95719
343	* call.c (build_over_call): Adjust base_binfo in
344	resolves_to_fixed_type_p case.
345
3462021-05-31  Jakub Jelinek  <jakub@redhat.com>
347
348	Backported from master:
349	2021-05-25  Jakub Jelinek  <jakub@redhat.com>
350
351	PR c++/100666
352	* call.c (convert_arg_to_ellipsis): For expressions with NULLPTR_TYPE
353	and side-effects, temporarily disable -Wunused-result warning when
354	building COMPOUND_EXPR.
355
3562021-05-28  Patrick Palka  <ppalka@redhat.com>
357
358	Backported from master:
359	2021-05-26  Patrick Palka  <ppalka@redhat.com>
360
361	PR c++/100502
362	* typeck.c (finish_class_member_access_expr): Disable ahead
363	of time access checking during the member lookup.
364
3652021-05-20  Jason Merrill  <jason@redhat.com>
366
367	PR c++/100489
368	* decl.c (reshape_init_class): Handle designator for
369	member of anonymous aggregate here.
370	* typeck2.c (process_init_constructor_record): Not here.
371
3722021-05-20  Andreas Krebbel  <krebbel@linux.ibm.com>
373
374	Backported from master:
375	2021-05-18  Andreas Krebbel  <krebbel@linux.ibm.com>
376
377	PR c++/100281
378	* cvt.c (cp_convert_to_pointer): Use the size of the target
379	pointer type.
380	* tree.c (cp_build_reference_type): Call
381	cp_build_reference_type_for_mode with VOIDmode.
382	(cp_build_reference_type_for_mode): Rename from
383	cp_build_reference_type.  Add MODE argument and invoke
384	build_reference_type_for_mode.
385	(strip_typedefs): Use build_pointer_type_for_mode and
386	cp_build_reference_type_for_mode for pointers and references.
387
3882021-05-20  Jason Merrill  <jason@redhat.com>
389
390	PR c++/100634
391	* pt.c (invalid_nontype_parm_type_p): Return true for COMPLEX_TYPE.
392
3932021-05-20  Jason Merrill  <jason@redhat.com>
394
395	PR c++/100659
396	* cp-tree.h (CONST_DECL_USING_P): Check for null TREE_TYPE.
397
3982021-05-19  Jason Merrill  <jason@redhat.com>
399
400	PR c++/100367
401	PR c++/96299
402	* method.c (genericize_spaceship): Use fold_build2 for scalar
403	operands.
404
4052021-05-19  Jason Merrill  <jason@redhat.com>
406
407	PR c++/100261
408	* rtti.c (get_tinfo_decl_direct): Check TYPE_TRANSPARENT_AGGR.
409
4102021-05-19  Jason Merrill  <jason@redhat.com>
411
412	PR c++/100372
413	* tree.c (strip_typedefs): Only look at the pattern of a
414	TYPE_PACK_EXPANSION if it's a type.
415
4162021-05-18  Jason Merrill  <jason@redhat.com>
417
418	PR c++/100644
419	* call.c (perfect_candidate_p): An implicitly deleted move
420	is not perfect.
421
4222021-05-18  Jason Merrill  <jason@redhat.com>
423
424	PR c++/100205
425	PR c++/93314
426	* cp-tree.h (cp_evaluated): Add reset parm to constructor.
427	* parser.c (cp_parser_constant_expression): Change
428	allow_non_constant_p to int.  Use cp_evaluated.
429	(cp_parser_initializer_clause): Pass 2 to allow_non_constant_p.
430	* semantics.c (finish_id_expression_1): Don't mess with
431	cp_unevaluated_operand here.
432
4332021-05-03  Patrick Palka  <ppalka@redhat.com>
434
435	Backported from master:
436	2021-05-03  Patrick Palka  <ppalka@redhat.com>
437
438	PR c++/100362
439	* parser.c (cp_parser_class_head): Reinstate calls to pushclass
440	and popclass when parsing the base-clause that were removed in
441	r11-6815.
442
4432021-04-29  Jakub Jelinek  <jakub@redhat.com>
444
445	Backported from master:
446	2021-04-29  Jakub Jelinek  <jakub@redhat.com>
447
448	PR c++/100319
449	* semantics.c (finish_omp_clauses): Fix up check that variable
450	mentioned in detach clause doesn't appear in data-sharing clauses.
451
4522021-04-27  Patrick Palka  <ppalka@redhat.com>
453
454	Backported from master:
455	2021-04-24  Patrick Palka  <ppalka@redhat.com>
456
457	PR c++/89565
458	PR c++/93383
459	PR c++/95291
460	PR c++/99200
461	PR c++/99683
462	* pt.c (do_class_deduction): Punt if the initializer is
463	type-dependent.
464
4652021-04-27  Marek Polacek  <polacek@redhat.com>
466
467	Backported from master:
468	2021-04-22  Marek Polacek  <polacek@redhat.com>
469
470	PR c++/100161
471	* pt.c (tsubst_copy_and_build) <case PLUS_EXPR>: Test op0 and
472	op1 separately for value- or type-dependence.
473
4742021-04-27  Marek Polacek  <polacek@redhat.com>
475
476	Backported from master:
477	2021-04-21  Marek Polacek  <polacek@redhat.com>
478
479	PR c++/96380
480	* parser.c (cp_parser_enum_specifier): Don't allow defining
481	types in enum-base.
482
4832021-04-27  Jakub Jelinek  <jakub@redhat.com>
484
485	* module.cc: Remove #error that triggers if DEV-PHASE is empty.
486
4872021-04-27  Release Manager
488
489	* GCC 11.1.0 released.
490
4912021-04-19  Marek Polacek  <polacek@redhat.com>
492
493	PR c++/97536
494	* decl.c (grokvardecl): Given an error when a concept is not defined
495	at namespace scope.
496
4972021-04-16  Jakub Jelinek  <jakub@redhat.com>
498
499	PR c++/100111
500	* constexpr.c (cxx_eval_store_expression): Don't add CONSTRUCTORs
501	for empty classes into *valp when types don't match even when *valp
502	is NULL.
503
5042021-04-16  Marek Polacek  <polacek@redhat.com>
505
506	PR c++/99803
507	* decl.c (make_typename_type): Give an error and return when
508	name is is_overloaded_fn.
509	* parser.c (cp_parser_class_name): Don't check is_overloaded_fn
510	before calling make_typename_type.
511
5122021-04-16  Patrick Palka  <ppalka@redhat.com>
513
514	PR c++/99700
515	* constexpr.c (reduced_constant_expression_p): For array
516	CONSTRUCTORs, use a dedicated loop that additionally verifies
517	the CONSTRUCTOR spans the entire array.
518
5192021-04-16  Jakub Jelinek  <jakub@redhat.com>
520
521	PR c++/99850
522	* parser.c (cp_parser_constraint_requires_parens) <case CPP_DEREF>:
523	If lambda_p, return pce_ok instead of pce_maybe_postfix.
524
5252021-04-16  Jakub Jelinek  <jakub@redhat.com>
526
527	PR c++/99833
528	* pt.c (extract_locals_r): When handling DECL_EXPR of a structured
529	binding, add to data.internal also all corresponding structured
530	binding decls.
531
5322021-04-16  Jason Merrill  <jason@redhat.com>
533
534	PR c++/100079
535	* cp-tree.h (first_field): Declare.
536	* mangle.c (range_expr_nelts): New.
537	(write_expression): Improve class NTTP mangling.
538	* pt.c (get_template_parm_object): Clear TREE_HAS_CONSTRUCTOR.
539	* tree.c (zero_init_expr_p): Improve class NTTP handling.
540	* decl.c: Adjust comment.
541
5422021-04-15  Jason Merrill  <jason@redhat.com>
543
544	PR c++/80456
545	* call.c (build_new_method_call_1): Check again for side-effects
546	with a volatile object.
547
5482021-04-15  Jason Merrill  <jason@redhat.com>
549
550	PR c++/100101
551	PR c++/99583
552	* pt.c (find_parameter_packs_r) [FUNCTION_TYPE]: Walk into
553	TYPE_RAISES_EXCEPTIONS here.
554	* tree.c (cp_walk_subtrees): Not here.
555
5562021-04-15  Jason Merrill  <jason@redhat.com>
557
558	PR c++/100091
559	PR c++/99478
560	* parser.c (cp_parser_default_type_template_argument): Set
561	parser->local_variables_forbidden_p.
562
5632021-04-15  Richard Sandiford  <richard.sandiford@arm.com>
564
565	PR c++/98852
566	* typeck.c (merge_type_attributes_from): New function.
567	(cp_common_type): Use it for vector types.
568
5692021-04-14  Jason Merrill  <jason@redhat.com>
570
571	PR c++/100078
572	PR c++/93085
573	* pt.c (uses_outer_template_parms): Also look at default
574	template argument.
575
5762021-04-14  Jason Merrill  <jason@redhat.com>
577
578	PR c++/93314
579	* semantics.c (finish_id_expression_1): Clear cp_unevaluated_operand
580	for a non-static data member in a constant-expression.
581
5822021-04-14  Patrick Palka  <ppalka@redhat.com>
583
584	PR c++/83476
585	PR c++/99885
586	* pt.c (deducible_expression): Look through implicit
587	INDIRECT_REFs as well.
588
5892021-04-14  Jason Merrill  <jason@redhat.com>
590
591	PR c++/99478
592	* parser.c (cp_parser_lambda_expression): Reject lambda
593	in template parameter type.
594
5952021-04-14  Jason Merrill  <jason@redhat.com>
596
597	PR c++/90674
598	* decl.c (duplicate_decls): Don't propagate
599	DECL_INITIALIZED_IN_CLASS_P to a specialization.
600
6012021-04-14  Jason Merrill  <jason@redhat.com>
602
603	PR c++/88742
604	PR c++/49951
605	PR c++/58123
606	* semantics.c (set_cleanup_locs): New.
607	(do_poplevel): Call it.
608	* parser.c (cp_parser_compound_statement): Consume the }
609	before finish_compound_stmt.
610
6112021-04-13  Jason Merrill  <jason@redhat.com>
612
613	PR c++/100032
614	* pt.c (get_underlying_template): Compare TYPE_QUALS.
615
6162021-04-13  Jason Merrill  <jason@redhat.com>
617
618	PR c++/100054
619	PR c++/90479
620	* init.c (get_nsdmi): Do more context adjustment for local classes.
621
6222021-04-13  Patrick Palka  <ppalka@redhat.com>
623
624	PR c++/99008
625	* pt.c (do_class_deduction): Reject alias CTAD in C++17 mode
626	rather than issuing a pedwarn.
627	* typeck2.c (build_functional_cast_1): Handle CTAD uniformly
628	for consistent diagnostics.
629
6302021-04-13  Jason Merrill  <jason@redhat.com>
631
632	PR c++/91933
633	* class.c (build_base_path): Shortcut simple non-pointer case.
634
6352021-04-13  Eric Botcazou  <ebotcazou@adacore.com>
636
637	* module.cc (ordinary_loc_of): Test LINEMAPS_MACRO_LOWEST_LOCATION
638	of the linemap.
639	(module_state::write_location): Likewise.
640
6412021-04-13  Patrick Palka  <ppalka@redhat.com>
642
643	PR c++/97134
644	* pt.c (do_class_deduction): Look through EXPR_PACK_EXPANSION
645	when checking if the initializer is an equivalent class
646	placeholder template parameter.
647
6482021-04-13  Patrick Palka  <ppalka@redhat.com>
649
650	PR c++/99961
651	PR c++/99994
652	* constraint.cc (satisfy_normalized_constraints): Set
653	cp_unevaluated.
654	* parser.c (cp_parser_concept_definition): Likewise.
655	(cp_parser_requires_clause_opt): Likewise.
656
6572021-04-12  Jason Merrill  <jason@redhat.com>
658
659	PR c++/93085
660	* pt.c (uses_outer_template_parms): Handle non-type and template
661	template parameters specifically.
662
6632021-04-11  Jason Merrill  <jason@redhat.com>
664
665	PR c++/97974
666	* decl.c (fixup_anonymous_aggr): Prune all functions from
667	CLASSTYPE_MEMBER_VEC.
668
6692021-04-10  Jason Merrill  <jason@redhat.com>
670
671	PR c++/98800
672	PR c++/97399
673	* parser.c (cp_parser_direct_declarator): Don't
674	inject_this_parameter if static_p.
675	(cp_parser_omp_var_list_no_open): Parse 'this' even if
676	current_class_ptr isn't set for a better diagnostic.
677
6782021-04-10  Jason Merrill  <jason@redhat.com>
679
680	PR c++/99180
681	PR c++/93295
682	PR c++/93867
683	PR c++/99118
684	PR c++/96873
685	* pt.c (alias_ctad_tweaks): Handle failure better.
686
6872021-04-10  Jason Merrill  <jason@redhat.com>
688
689	PR c++/100006
690	* pt.c (find_parameter_packs_r) [TAG_DEFN]: Look into bases.
691
6922021-04-09  Patrick Palka  <ppalka@redhat.com>
693
694	* cp-tree.h (LAMBDA_EXPR_REGENERATED_FROM)
695	(LAMBDA_EXPR_REGENERATING_TARGS): Replace these with ...
696	(LAMBDA_EXPR_REGEN_INFO): ... this.
697	(tree_lambda_expr::regenerated_from)
698	(tree_lambda_expr::regenerating_targs): Replace these with ...
699	(tree_lambda_expr::regen_info): ... this.
700	* constraint.cc (satisfy_declaration_constraints): Adjust
701	accordingly.
702	* lambda.c (build_lambda_expr): Likewise.
703	* pt.c (regenerated_lambda_fn_p): Likewise.
704	(most_general_lambda): Likewise.
705	(tsubst_lambda_expr): Likewise.
706
7072021-04-09  Marek Polacek  <polacek@redhat.com>
708
709	PR c++/99806
710	* parser.c (cp_parser_member_declaration): Call
711	cp_parser_save_default_args even for function templates.  Use
712	STRIP_TEMPLATE on the declaration we're passing.
713
7142021-04-08  Patrick Palka  <ppalka@redhat.com>
715
716	PR c++/99874
717	* constraint.cc (get_normalized_constraints_from_decl): Handle
718	regenerated lambdas.
719	(satisfy_declaration_constraints): Likewise.  Check for
720	dependent args later.
721	* cp-tree.h (LAMBDA_EXPR_INSTANTIATED): Replace with ...
722	(LAMBDA_EXPR_REGENERATED_FROM): ... this.
723	(LAMBDA_EXPR_REGENERATING_TARGS): New.
724	(tree_lambda_expr::regenerated_from): New data member.
725	(tree_lambda_expr::regenerating_targs): New data member.
726	(add_to_template_args): Declare.
727	(regenerated_lambda_fn_p): Likewise.
728	(most_general_lambda): Likewise.
729	* lambda.c (build_lambda_expr): Set LAMBDA_EXPR_REGENERATED_FROM
730	and LAMBDA_EXPR_REGENERATING_TARGS.
731	* pt.c (add_to_template_args): No longer static.
732	(tsubst_function_decl): Unconditionally propagate constraints on
733	the substituted function decl.
734	(instantiated_lambda_fn_p): Rename to ...
735	(regenerated_lambda_fn_p): ... this.  Check
736	LAMBDA_EXPR_REGENERATED_FROM instead of
737	LAMBDA_EXPR_INSTANTIATED.
738	(most_general_lambda): Define.
739	(enclosing_instantiation_of): Adjust after renaming
740	instantiated_lambda_fn_p.
741	(tsubst_lambda_expr): Don't set LAMBDA_EXPR_INSTANTIATED.  Set
742	LAMBDA_EXPR_REGENERATED_FROM and LAMBDA_EXPR_REGENERATING_TARGS.
743	Don't substitute or set constraints on the regenerated lambda.
744
7452021-04-08  Patrick Palka  <ppalka@redhat.com>
746
747	PR c++/97679
748	* pt.c (build_deduction_guide): Document OUTER_ARGS.  Substitute
749	them into the propagated constraints.
750
7512021-04-08  Jason Merrill  <jason@redhat.com>
752
753	PR c++/91849
754	* call.c (convert_like_internal): Improve reference diagnostic.
755
7562021-04-08  Jakub Jelinek  <jakub@redhat.com>
757
758	PR c++/99859
759	* constexpr.c (addr_of_non_const_var): New function.
760	(cxx_bind_parameters_in_call): Set *non_constant_args to true
761	even if cp_walk_tree on arg with addr_of_non_const_var callback
762	returns true.
763
7642021-04-08  Jason Merrill  <jason@redhat.com>
765
766	PR c++/94529
767	* pt.c (determine_specialization): Improve diagnostic.
768
7692021-04-08  Marek Polacek  <polacek@redhat.com>
770
771	PR c++/99844
772	* decl.c (build_explicit_specifier): Call
773	check_for_bare_parameter_packs.
774	* except.c (build_noexcept_spec): Likewise.
775
7762021-04-07  Jason Merrill  <jason@redhat.com>
777
778	PR c++/41723
779	* parser.c (cp_parser_class_name): Check dependent_scope_p.
780
7812021-04-07  Jason Merrill  <jason@redhat.com>
782
783	PR c++/52625
784	* pt.c (maybe_process_partial_specialization): Check
785	DECL_SELF_REFERENCE_P.
786
7872021-04-07  Jason Merrill  <jason@redhat.com>
788
789	PR c++/92918
790	* name-lookup.c (push_class_level_binding_1): Do overload a new
791	function with a previous using-declaration.
792
7932021-04-06  Jason Merrill  <jason@redhat.com>
794
795	PR c++/96673
796	* init.c (get_nsdmi): Don't defer access checking.
797
7982021-04-06  Jason Merrill  <jason@redhat.com>
799
800	PR c++/99901
801	* decl.c (cp_finish_decl): mark_needed an implicitly inline
802	static data member with an out-of-class redeclaration.
803
8042021-04-06  Jason Merrill  <jason@redhat.com>
805
806	PR c++/91241
807	* mangle.c (write_compact_number): Add sanity check.
808	(write_local_name): Use list_length for parm number.
809
8102021-04-06  Patrick Palka  <ppalka@redhat.com>
811
812	PR c++/99899
813	* pt.c (do_auto_deduction): Don't exit early when deducing the
814	array type of a structured binding.  Also handle adc_decomp_type
815	during constraint checking.
816
8172021-04-05  Jason Merrill  <jason@redhat.com>
818
819	PR c++/96311
820	* typeck.c (check_return_expr): Call mark_exp_read in dependent
821	case.
822
8232021-04-05  Jason Merrill  <jason@redhat.com>
824
825	PR c++/98440
826	* typeck.c (build_reinterpret_cast_1): Don't perform
827	temporary materialization.
828
8292021-04-05  Jason Merrill  <jason@redhat.com>
830
831	PR c++/95317
832	* pt.c (lookup_template_class_1): Do tsubst_enum when
833	tsubsting a generic lambda.
834
8352021-04-05  Jason Merrill  <jason@redhat.com>
836
837	PR c++/95870
838	* pt.c (enclosing_instantiation_of): Compare DECL_SOURCE_LOCATION if
839	there is no enclosing non-lambda function.
840
8412021-04-05  Nathan Sidwell  <nathan@acm.org>
842
843	PR c++/99380
844	* module.cc (name_pending_imports): Drop 'atend' parm.  Don't
845	query export when not needed.
846	(preprocess_module, preprocessed_module): Adjust.
847
8482021-04-05  Jason Merrill  <jason@redhat.com>
849
850	PR c++/99066
851	* pt.c (mark_decl_instantiated): Set DECL_EXTERNAL.
852
8532021-04-05  Jason Merrill  <jason@redhat.com>
854
855	PR c++/99201
856	* pt.c (class el_data): Add visited field.
857	(extract_local_specs): Pass it to cp_walk_tree.
858	(extract_locals_r): Walk into the body of a lambda.
859
8602021-04-05  Jason Merrill  <jason@redhat.com>
861
862	* ptree.c (cxx_print_decl): Check DECL_MODULE_IMPORT_P on
863	template result.
864
8652021-04-04  Jason Merrill  <jason@redhat.com>
866
867	PR c++/99643
868	* typeck2.c (massage_init_elt): Don't strip TARGET_EXPR.
869
8702021-04-03  Marek Polacek  <polacek@redhat.com>
871
872	PR c++/91416
873	* parser.c: Create a GC root for attributes in a decl specifier.
874	(cp_parser_type_specifier): Push/pop ->attributes onto/from it.
875
8762021-04-03  Jason Merrill  <jason@redhat.com>
877
878	PR c++/91217
879	* pt.c (tsubst_lambda_expr): Skip the body block from
880	DECL_SAVED_TREE.
881
8822021-04-03  Jason Merrill  <jason@redhat.com>
883
884	PR c++/90664
885	* cvt.c (can_convert_qual): Check fnptr_conv_p.
886
8872021-04-03  Jason Merrill  <jason@redhat.com>
888
889	PR c++/97900
890	* pt.c (regenerate_decl_from_template): tsubst_decl
891	the parms.
892
8932021-04-02  Patrick Palka  <ppalka@redhat.com>
894
895	PR c++/99869
896	* parser.c (do_range_for_auto_deduction): Pass adc_variable_type
897	to do_auto_deduction.
898
8992021-04-02  Patrick Palka  <ppalka@redhat.com>
900
901	PR c++/99586
902	* semantics.c (finish_compound_literal): Check
903	template_placeholder_p instead of type_uses_auto.
904
9052021-04-02  Jason Merrill  <jason@redhat.com>
906
907	PR c++/97938
908	* cp-tree.h (PACK_EXPANSION_AUTO_P): New.
909	* lambda.c (add_capture): Set it.
910	* pt.c (tsubst_pack_expansion): Handle it.
911
9122021-04-02  Nathan Sidwell  <nathan@acm.org>
913
914	* cp-tree.h (lang_decl_base): Correct module flag comment.
915	* module.cc (trees_in::assert_definition): Break out
916	not_tmpl var.
917	(trees_out::lang_decl_bools): Do not write purview for header units.
918
9192021-04-01  Marek Polacek  <polacek@redhat.com>
920
921	PR c++/99831
922	* method.c (defaulted_late_check): ++ and -- function_depth around
923	the call to synthesize_method.
924	* pt.c: Remove the saved_trees global.
925
9262021-04-01  Jason Merrill  <jason@redhat.com>
927
928	PR c++/99583
929	PR c++/99584
930	* tree.c (cp_walk_subtrees) [FUNCTION_TYPE]: Walk into
931	TYPE_RAISES_EXCEPTIONS.
932
9332021-04-01  Iain Sandoe  <iain@sandoe.co.uk>
934
935	* mapper-client.cc (INCLUDE_MAP): New; require map to be
936	included from system.h.
937	* mapper-resolver.cc (INCLUDE_MAP): Likewise.
938
9392021-04-01  Jason Merrill  <jason@redhat.com>
940
941	PR c++/98481
942	* mangle.c (write_expression): Adjust.
943	* class.c (find_abi_tags_r): Disable PR98481 fix for ABI v14.
944	(mark_abi_tags_r): Likewise.
945
9462021-04-01  Nathan Sidwell  <nathan@acm.org>
947
948	PR c++/99283
949	* module.cc (trees_out::decl_node): Adjust importedness reference
950	assert.
951	(module_state::intercluster_seed): New.  Seed both imports and
952	inter-cluster references.  Broken out of ...
953	(module_state::write_cluster): ... here.  Call it.
954
9552021-03-31  Jason Merrill  <jason@redhat.com>
956
957	PR c++/99445
958	* tree.c (strip_typedefs): Handle TYPE_PACK_EXPANSION.
959
9602021-03-31  Patrick Palka  <ppalka@redhat.com>
961
962	PR c++/88115
963	* mangle.c (write_expression): Adjust the mangling of
964	__alignof__.
965
9662021-03-31  Patrick Palka  <ppalka@redhat.com>
967
968	PR c++/99815
969	* pt.c (placeholder_type_constraint_dependent_p): Expand
970	argument packs to separate the first non-pack argument
971	from the rest.
972
9732021-03-30  Nathan Sidwell  <nathan@acm.org>
974
975	PR c++/99283
976	* module.cc (dumper::operator): Make less brittle.
977	(trees_out::core_bools): VAR_DECLs always have a context.
978	(trees_out::key_mergeable): Use same_type_p for asserting.
979	(trees_in::read_var_def): Propagate
980	DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
981
9822021-03-30  Jakub Jelinek  <jakub@redhat.com>
983
984	PR c++/99790
985	* cp-gimplify.c (cp_gimplify_expr): Handle PTRMEM_CST.
986
9872021-03-26  Marek Polacek  <polacek@redhat.com>
988
989	PR c++/98352
990	* method.c (implicitly_declare_fn): Pass &raises to
991	synthesized_method_walk.
992
9932021-03-26  Nathan Sidwell  <nathan@acm.org>
994
995	PR c++/99283
996	* cp-tree.h (DECL_MODULE_CHECK): Ban TEMPLATE_DECL.
997	(SET_TYPE_TEMPLATE_INFO): Restore Alias template setting.
998	* decl.c (duplicate_decls): Remove template_decl module flag
999	propagation.
1000	* module.cc (merge_kind_name): Add alias tmpl spec as a thing.
1001	(dumper::impl::nested_name): Adjust for template-decl module flag
1002	change.
1003	(trees_in::assert_definition): Likewise.
1004	(trees_in::install_entity): Likewise.
1005	(trees_out::decl_value): Likewise.  Remove alias template
1006	separation of template and type_decl.
1007	(trees_in::decl_value): Likewise.
1008	(trees_out::key_mergeable): Likewise,
1009	(trees_in::key_mergeable): Likewise.
1010	(trees_out::decl_node): Adjust for template-decl module flag
1011	change.
1012	(depset::hash::make_dependency): Likewise.
1013	(get_originating_module, module_may_redeclare): Likewise.
1014	(set_instantiating_module, set_defining_module): Likewise.
1015	* name-lookup.c (name_lookup::search_adl): Likewise.
1016	(do_pushdecl): Likewise.
1017	* pt.c (build_template_decl): Likewise.
1018	(lookup_template_class_1): Remove special alias_template handling
1019	of DECL_TI_TEMPLATE.
1020	(tsubst_template_decl): Likewise.
1021
10222021-03-26  Jakub Jelinek  <jakub@redhat.com>
1023
1024	PR c++/99705
1025	* tree.c (bot_manip): Remap artificial automatic temporaries mentioned
1026	in DECL_EXPR or in BIND_EXPR_VARS.
1027
10282021-03-25  Jakub Jelinek  <jakub@redhat.com>
1029
1030	PR c++/99672
1031	* parser.c (cp_parser_postfix_expression): For calls, create
1032	combined_loc and temporarily set input_location to it before
1033	calling finish_call_expr.
1034
10352021-03-25  Marek Polacek  <polacek@redhat.com>
1036
1037	PR c++/94751
1038	* call.c (build_over_call): Maybe call mark_used in case
1039	deduce_inheriting_ctor fails and return error_mark_node.
1040	* cp-tree.h (deduce_inheriting_ctor): Adjust declaration.
1041	* method.c (deduce_inheriting_ctor): Return bool if the deduction
1042	fails.
1043	(implicitly_declare_fn): If raises is error_mark_node, call
1044	synthesized_method_walk with diag being true.
1045
10462021-03-25  Jakub Jelinek  <jakub@redhat.com>
1047
1048	PR c++/99745
1049	* decl2.c (grokbitfield): Diagnose bitfields containing bare parameter
1050	packs and don't set DECL_BIT_FIELD_REPRESENTATIVE in that case.
1051
10522021-03-25  Marek Polacek  <polacek@redhat.com>
1053
1054	PR c++/99331
1055	* call.c (build_converted_constant_expr_internal): Don't emit
1056	-Wconversion warnings.
1057
10582021-03-25  Jakub Jelinek  <jakub@redhat.com>
1059
1060	PR c++/99565
1061	* call.c (build_conditional_expr_1): Pass OEP_ADDRESS_OF_SAME_FIELD
1062	to operand_equal_p.
1063	* cvt.c (convert_to_void): Preserve location_t on COND_EXPR or
1064	or COMPOUND_EXPR.
1065
10662021-03-23  Nathan Sidwell  <nathan@acm.org>
1067
1068	PR c++/99283
1069	* name-lookup.c (check_module_override): Set global or partition
1070	DUP on the binding vector.
1071
10722021-03-23  Marek Polacek  <polacek@redhat.com>
1073
1074	PR c++/99318
1075	* decl2.c (cp_warn_deprecated_use_scopes): Only call
1076	cp_warn_deprecated_use when decl is a namespace, class, or enum.
1077
10782021-03-23  Nathan Sidwell  <nathan@acm.org>
1079
1080	PR c++/99239
1081	* decl.c (duplicate_decls): Remove assert about maybe-imported
1082	artificial decls.
1083
10842021-03-23  Jakub Jelinek  <jakub@redhat.com>
1085
1086	PR c++/99650
1087	* decl.c (cp_finish_decomp): Diagnose void initializers when
1088	using tuple_element and get.
1089
10902021-03-22  Nathan Sidwell  <nathan@acm.org>
1091
1092	PR c++/99480
1093	* module.cc (depset::hash::make_dependency): Propagate flags for
1094	partial specialization.
1095	(module_may_redeclare): Handle partial specialization.
1096
10972021-03-22  Nathan Sidwell  <nathan@acm.org>
1098
1099	PR c++/99425
1100	* cp-tree.h (map_context_from, map_context_to): Delete.
1101	(add_mergeable_specialization): Add is_alias parm.
1102	* pt.c (add_mergeable_specialization): Add is_alias parm, add them.
1103	* module.cc (map_context_from, map_context_to): Delete.
1104	(trees_in::decl_value): Add specializations later, adjust call.
1105	Drop useless alias lookup. Set duplicate fn parm context.
1106	(check_mergeable_decl): Drop context mapping.
1107	(trees_in::is_matching_decl): Likewise.
1108	(trees_in::read_function_def): Drop parameter context adjustment
1109	here.
1110
11112021-03-22  Martin Liska  <mliska@suse.cz>
1112
1113	PR c++/99687
1114	* module.cc (fini_modules): Call vec_free instead of delete.
1115
11162021-03-20  Jakub Jelinek  <jakub@redhat.com>
1117
1118	PR debug/99230
1119	* cp-gimplify.c (cp_genericize_r) <case STATEMENT_LIST>: Remove
1120	special code, instead call c_genericize_control_stmt.
1121
11222021-03-19  Jakub Jelinek  <jakub@redhat.com>
1123
1124	PR c++/99456
1125	* constexpr.c (cxx_eval_constant_expression): For CONVERT_EXPR from
1126	INDIRECT_TYPE_P to ARITHMETIC_TYPE_P, when !ctx->manifestly_const_eval
1127	don't diagnose it, set *non_constant_p nor return t.
1128
11292021-03-19  Marek Polacek  <polacek@redhat.com>
1130
1131	PR c++/99500
1132	* parser.c (cp_parser_requirement_parameter_list): Handle
1133	error_mark_node.
1134
11352021-03-18  Marek Polacek  <polacek@redhat.com>
1136
1137	* pt.c (tsubst_copy_and_build) <case FLOAT_EXPR>: Remove.
1138
11392021-03-18  Marek Polacek  <polacek@redhat.com>
1140
1141	* pt.c (tsubst_copy_and_build): Add assert.
1142
11432021-03-18  Iain Sandoe  <iain@sandoe.co.uk>
1144
1145	PR objc++/49070
1146	* parser.c (cp_debug_parser): Add Objective-C++ message
1147	state flag.
1148	(cp_parser_nested_name_specifier_opt): Allow colon to
1149	terminate an assignment-expression when parsing Objective-
1150	C++ messages.
1151	(cp_parser_objc_message_expression): Set and clear message
1152	parsing state on entry and exit.
1153	* parser.h (struct cp_parser): Add a context flag for
1154	Objective-C++ message state.
1155
11562021-03-18  Martin Liska  <mliska@suse.cz>
1157
1158	PR c++/99617
1159	* coroutines.cc (struct var_nest_node): Init then_cl and else_cl
1160	to NULL.
1161
11622021-03-17  Marek Polacek  <polacek@redhat.com>
1163
1164	PR c++/97973
1165	* call.c (conv_unsafe_in_template_p): New.
1166	(convert_like): Use it.
1167
11682021-03-17  Anthony Sharp  <anthonysharp15@gmail.com>
1169	    Jason Merrill  <jason@redhat.com>
1170
1171	* semantics.c (get_class_access_diagnostic_decl): New
1172	function that examines special cases when a parent
1173	class causes a private access failure.
1174	(enforce_access): Slightly modified to call function
1175	above.
1176
11772021-03-16  Jason Merrill  <jason@redhat.com>
1178
1179	* tree.c (cp_tree_equal): Use real_identical.
1180
11812021-03-16  Jakub Jelinek  <jakub@redhat.com>
1182
1183	PR c++/99613
1184	* decl.c (expand_static_init): For thread guards, call __cxa_atexit
1185	before calling __cxa_guard_release rather than after it.  Formatting
1186	fixes.
1187
11882021-03-16  Martin Liska  <mliska@suse.cz>
1189	    Jason Merrill  <jason@redhat.com>
1190
1191	PR c++/99108
1192	* call.c (get_function_version_dispatcher): Handle
1193	DECL_LOCAL_DECL_P.
1194	* decl.c (maybe_version_functions): Likewise.
1195	(maybe_mark_function_versioned): New.
1196	* name-lookup.c (push_local_extern_decl_alias): No longer static.
1197	* name-lookup.h (push_local_extern_decl_alias): Adjust.
1198
11992021-03-16  Nathan Sidwell  <nathan@acm.org>
1200
1201	PR c++/99496
1202	* module.cc (trees_out::decl_value): Adjust typedef streaming,
1203	indicate whether it is a dependent alias.
1204	(trees_in::decl_value): Likewise.  Set as dependent alias, if it
1205	is one.
1206
12072021-03-15  Iain Sandoe  <iain@sandoe.co.uk>
1208
1209	PR c++/99047
1210	* coroutines.cc (expand_one_await_expression): If the
1211	await_ready() expression is not a boolean then convert it
1212	as required.
1213
12142021-03-15  Iain Sandoe  <iain@sandoe.co.uk>
1215
1216	PR c++/98704
1217	* coroutines.cc (build_actor_fn): Make destroy index 1
1218	correspond to the abnormal unhandled_exception() exit.
1219	Substitute the proxy for the resume index.
1220	(coro_rewrite_function_body): Arrange to reset the resume
1221	index and make done = true for a rethrown exception from
1222	unhandled_exception ().
1223	(morph_fn_to_coro): Adjust calls to build_actor_fn and
1224	coro_rewrite_function_body.
1225
12262021-03-15  Iain Sandoe  <iain@sandoe.co.uk>
1227
1228	PR c++/98480
1229	* coroutines.cc (replace_continue): Rewrite continue into
1230	'goto label'.
1231	(await_statement_walker): Handle await expressions in the
1232	initializer, condition and iteration expressions of for
1233	loops.
1234
12352021-03-15  Iain Sandoe  <iain@sandoe.co.uk>
1236
1237	PR c++/96749
1238	* coroutines.cc (flatten_await_stmt): Allow for the case
1239	where a target expression variable only has uses in the
1240	second part of a compound expression.
1241	(maybe_promote_temps): Avoid emiting empty statements.
1242
12432021-03-15  Tobias Burnus  <tobias@codesourcery.com>
1244
1245	PR c++/99509
1246	* decl.c (cp_finish_decl): For 'omp declare target implicit' vars,
1247	ensure that the varpool node is marked as offloadable.
1248
12492021-03-12  Nathan Sidwell  <nathan@acm.org>
1250
1251	PR c++/99238
1252	* module.cc (depset::hash::add_binding_entity): Assert not
1253	visited.
1254	(depset::add::add_specializations): Likewise.
1255	* name-lookup.c (name_lookup::dedup): New.
1256	(name_lookup::~name_lookup): Assert not deduping.
1257	(name_lookup::restore_state): Likewise.
1258	(name_lookup::add_overload): Replace outlined code with dedup
1259	call.
1260	(name_lookup::add_value): Likewise.
1261	(name_lookup::search_namespace_only): Likewise.
1262	(name_lookup::adl_namespace_fns): Likewise.
1263	(name_lookup::adl_class_fns): Likewise.
1264	(name_lookup::search_adl): Likewise.  Add clearing dedup call.
1265	(name_lookup::search_qualified): Likewise.
1266	(name_lookup::search_unqualified): Likewise.
1267
12682021-03-12  Jakub Jelinek  <jakub@redhat.com>
1269
1270	PR c++/99507
1271	* call.c (build_over_call): For immediate evaluation of functions
1272	that return references, undo convert_from_reference effects before
1273	calling cxx_constant_value and call convert_from_reference
1274	afterwards.
1275
12762021-03-11  Nathan Sidwell  <nathan@acm.org>
1277
1278	PR c++/99248
1279	* name-lookup.c (lookup_elaborated_type_1): Access slot not bind
1280	when there's a binding vector.
1281	* ptree.c (cxx_print_xnode): Lazy flags are no longer a thing.
1282
12832021-03-11  Nathan Sidwell  <nathan@acm.org>
1284
1285	PR c++/99528
1286	* module.cc (enum merge_kind): Delete MK_type_tmpl_spec,
1287	MK_decl_tmpl_spec.
1288	(trees_in::decl_value): Adjust add_mergeable_specialization call.
1289	(trees_out::get_merge_kind): Adjust detecting a partial template
1290	instantiation.
1291	(trees_out::key_mergeable): Adjust handling same.
1292	(trees_in::key_mergeabvle): Likewise.
1293
12942021-03-10  Nathan Sidwell  <nathan@acm.org>
1295
1296	PR c++/99423
1297	* module.cc (post_load_processing): Assert not gcable.
1298	(laxy_load_pendings): Extend no-gc region around
1299	post_load_processing.
1300
13012021-03-10  Nathan Sidwell  <nathan@acm.org>
1302
1303	PR c++/99508
1304	* decl.c (make_rtl_for_nonlocal_decl): Propagate local-extern's
1305	assembler name to the ns alias.
1306
13072021-03-09  Jakub Jelinek  <jakub@redhat.com>
1308
1309	PR c++/99459
1310	* coroutines.cc (build_co_await): Look through NOP_EXPRs in
1311	build_special_member_call return value to find the CALL_EXPR.
1312	Simplify.
1313
13142021-03-09  Nathan Sidwell  <nathan@acm.org>
1315
1316	PR c++/99472
1317	* parser.c (cp_parser_diagnose_invalid_type_name): Clarify
1318	that C++20 does not yet imply modules.
1319
13202021-03-08  Nathan Sidwell  <nathan@acm.org>
1321
1322	PR c++/99436
1323	* name-lookup.c (get_cxx_dialect_name): Add cxx23.
1324
13252021-03-08  Nathan Sidwell  <nathan@acm.org>
1326
1327	* lex.c (module_token_filter::resume): Ignore module-decls inside
1328	header-unit.
1329	* parser.c (cp_parser_module_declaration): Reject in header-unit.
1330
13312021-03-08  Nathan Sidwell  <nathan@acm.org>
1332
1333	PR c++/99285
1334	* cp-tree.h (match_mergeable_specialization)
1335	(add_mergeable_specialization): Adjust parms.
1336	* module.cc (trees_in::decl_value): Adjust
1337	add_mergeable_specialization calls.
1338	(trees_out::key_mergeable): Adjust match_mergeable_specialization
1339	calls.
1340	(specialization_add): Likewise.
1341	* pt.c (match_mergeable_specialization): Do not insert.
1342	(add_mergeable_specialization): Add to hash table here.
1343
13442021-03-06  Patrick Palka  <ppalka@redhat.com>
1345	    Jakub Jelinek  <jakub@redhat.com>
1346
1347	PR c++/99287
1348	* constexpr.c (cxx_eval_increment_expression): Pass lval when
1349	evaluating the MODIFY_EXPR, and update 'mod' with the result of
1350	this evaluation.  Check *non_constant_p afterwards.  For prefix
1351	ops, just return 'mod'.
1352
13532021-03-06  Patrick Palka  <ppalka@redhat.com>
1354	    Jakub Jelinek  <jakub@redhat.com>
1355
1356	PR c++/96330
1357	* pt.c (tsubst_copy) <case TEMPLATE_ID_EXPR>: Rename local
1358	variable 'fn' to 'tmpl'.  Handle a variable template-id by
1359	calling lookup_template_variable.
1360
13612021-03-06  Patrick Palka  <ppalka@redhat.com>
1362
1363	PR c++/99365
1364	* pt.c (unify) <case TEMPLATE_TYPE_PARM>: Pass targs as
1365	outer_targs to do_auto_deduction.
1366	(placeholder_type_constraint_dependent_p): Define.
1367	(do_auto_deduction): When processing_template_decl != 0
1368	and context is adc_unify and we have constraints, pretend the
1369	constraints are satisfied instead of punting.  Otherwise don't
1370	punt unless placeholder_type_constraint_dependent_p holds.
1371	Add some clarifying sanity checks.  Add a hack to add missing
1372	outermost template levels to outer_args before checking
1373	satisfaction.  Don't substitute outer_targs into type if it's
1374	already been done.
1375
13762021-03-05  Marek Polacek  <polacek@redhat.com>
1377
1378	PR c++/99374
1379	* call.c (standard_conversion): When converting pointers to
1380	member, don't return NULL when the bases are equivalent but
1381	incomplete.
1382
13832021-03-05  Marek Polacek  <polacek@redhat.com>
1384
1385	PR c++/99120
1386	* name-lookup.c (check_local_shadow): Check if the type of decl
1387	is non-null before checking TYPE_PTR*.
1388
13892021-03-05  Nathan Sidwell  <nathan@acm.org>
1390
1391	PR c++/99245
1392	* module.cc (module_state::write_cluster): Relax binding assert.
1393
13942021-03-05  Nathan Sidwell  <nathan@acm.org>
1395
1396	PR c++/99377
1397	* pt.c (instantiate_decl): Call set_instantiating_module.
1398
13992021-03-05  Iain Sandoe  <iain@sandoe.co.uk>
1400
1401	PR c++/98118
1402	* coroutines.cc (build_co_await): Use type_build_ctor_call()
1403	to determine cases when a CTOR needs to be built.
1404	(flatten_await_stmt): Likewise.
1405	(morph_fn_to_coro): Likewise.
1406
14072021-03-05  Iain Sandoe  <iain@sandoe.co.uk>
1408
1409	PR c++/95616
1410	* coroutines.cc (coro_diagnose_throwing_fn): New helper.
1411	(coro_diagnose_throwing_final_aw_expr): New helper.
1412	(build_co_await): Diagnose throwing final await expression
1413	components.
1414	(build_init_or_final_await): Diagnose a throwing promise
1415	final_suspend() call.
1416
14172021-03-05  Iain Sandoe  <iain@sandoe.co.uk>
1418
1419	PR c++/95615
1420	* coroutines.cc (struct param_info): Track parameter copies that need
1421	a DTOR.
1422	(coro_get_frame_dtor): New helper function factored from build_actor().
1423	(build_actor_fn): Use coro_get_frame_dtor().
1424	(morph_fn_to_coro): Track parameters that need DTORs on exception,
1425	likewise the frame promise and the return object.  On exception, run the
1426	DTORs for these, destroy the frame and then rethrow the exception.
1427
14282021-03-05  Nathan Sidwell  <nathan@acm.org>
1429
1430	PR c++/99389
1431	* pt.c (instantiate_class_template_1): Set instantiating module
1432	here.
1433
14342021-03-05  Tobias Burnus  <tobias@codesourcery.com>
1435
1436	PR c/99137
1437	* parser.c (cp_parser_oacc_clause_async): Reject comma expressions.
1438
14392021-03-04  Jakub Jelinek  <jakub@redhat.com>
1440
1441	PR c++/88146
1442	PR c++/99362
1443	* cvt.c (convert_to_void): Revert 2019-10-17 changes.  Clarify
1444	comment.
1445
14462021-03-04  Nathan Sidwell  <nathan@acm.org>
1447
1448	PR c++/99170
1449	* module.cc (class uintset): Delete.
1450	(typedef attached_map_t): A hash map.
1451	(attached_table): Use attached_map_t.  Adjust uses ...
1452	(trees_out::decl_value, trees_in::decl_value): ... here ...
1453	(trees_out::key_mergeable): ... here ...
1454	(trees_in::key_mergeable): ... here ...
1455	(maybe_attach_decl): ... here ...
1456	(direct_import): ... and here.
1457
14582021-03-04  Nathan Sidwell  <nathan@acm.org>
1459
1460	PR c++/99170
1461	* cp-tree.h
1462	* lex.c (cxx_dup_lang_specific_decl): Adjust for module_attached_p
1463	rename.
1464	* module.cc (class pending_key): New.
1465	(default_hash_traits<pending_key>): New specialization.
1466	(pending_map_t): New typedef.
1467	(pending_table): Replace old table.
1468	(trees_out::lang_decl_bools): Adjust.
1469	(trees_in::lang_decl_bools): Adjust.
1470	(trees_in::install_entity): Drop pending member and specialization
1471	handling.
1472	(find_pending_key): New.
1473	(depset::hash::fiund_dependencies): Use it.
1474	(pendset_lazy_load): Delete.
1475	(module_state::write_cluster): Don't count pendings here.  Bye
1476	Duff's device-like thing.
1477	(module_state::write_pendings): Reimplement.
1478	(module_state::read_pendings): Reimplement.
1479	(lazy_specializations_p): Delete.
1480	(module_state::write): Adjust write_pendings call.
1481	(lazy_load_pendings): New.
1482	(lazy_load_specializations): Delete.
1483	(lazy_load_members): Delete.
1484	(init_modules):	Adjust.
1485	* name-lookup.c (maybe_lazily_declare):	Call lazy_load_pendings
1486	not lazy_load_members.
1487	(note_pending_specializations): Delete.
1488	(load_pending_specializations): Delete.
1489	* name-lookup.h	(BINDING_VECTR_PENDING_SPECIALIZATIONS_P): Delete.
1490	(BINDING_VECTOR_PENDING_MEMBERS_P): Delete.
1491	(BINDING_VECTR_PENDING_MEMBERS_P): Delete.
1492	(note_pending_specializations): Delete.
1493	(load_pending_specializations): Delete.
1494	* pt.c (lookup_template_class_1): Call lazy_load_pendings not
1495	lazy_load_specializations.
1496	(instantiate_template_class_1): Likewise.
1497	(instantiate_decl): Call lazy_load_pendings.
1498	* typeck.c (complete_type): Likewise.
1499
15002021-03-03  Nathan Sidwell  <nathan@acm.org>
1501
1502	PR c++/99170
1503	* module.cc (post_load_decls): New.
1504	(lazy_snum, recursive_lazy): Move earlier.
1505	(module_state::read_cluster): Push cloning onto post_load_decls.
1506	(post_load_processing): New.  Do the cloning here.
1507	(module_state::read_inits): Call post_load_processing.
1508	(module_state::read_language): Likewise.
1509	(lazy_load_binding, lazy_load_specializations): Likewise
1510	(lazy_load_members): Likewise
1511
15122021-03-03  Nathan Sidwell  <nathan@acm.org>
1513
1514	PR c++/99170
1515	* module.cc (trees_out::decl_value): Stream specialization keys
1516	after decl.
1517	(trees_in::decl_value): Stream them back and insert after
1518	completing the decl.
1519	(trees_out::key_mergeable): Drop some streaming here ...
1520	(trees_in::key_mergeable): ... and here.  Don't insert into
1521	specialization tables.
1522
15232021-03-03  Patrick Palka  <ppalka@redhat.com>
1524
1525	* constraint.cc (struct sat_info): Document the different
1526	meanings of noisy() and diagnose_unsatisfaction_p() during
1527	satisfaction and requires-expression evaluation.
1528	(tsubst_valid_expression_requirement): Take a sat_info instead
1529	of a subst_info.  Perform the substitution quietly first.  Fold
1530	in error-replaying code from diagnose_valid_expression.
1531	(tsubst_simple_requirement): Take a sat_info instead of a
1532	subst_info.
1533	(tsubst_type_requirement_1): New.  Fold in error-replaying code
1534	from diagnose_valid_type.
1535	(tsubst_type_requirement): Use the above.  Take a sat_info
1536	instead of a subst_info.
1537	(tsubst_compound_requirement): Likewise.  Fold in
1538	error-replaying code from diagnose_compound_requirement.
1539	(tsubst_nested_requirement): Take a sat_info instead of a
1540	subst_info.  Fold in error-replaying code from
1541	diagnose_nested_requirement.
1542	(tsubst_requirement): Take a sat_info instead of a subst_info.
1543	(tsubst_requires_expr): Split into two versions, one that takes
1544	a sat_info argument and another that takes a complain and
1545	in_decl argument.  Remove outdated documentation.  Document the
1546	effects of the sat_info argument.  Don't short-circuit
1547	processing of requirements when diagnosing unsatisfaction,
1548	mirroring diagnose_requires_expr.
1549	(satisfy_nondeclaration_constraint) <case REQUIRES_EXPR>: Remove
1550	assert, and se the three-parameter version of tsubst_requires_expr.
1551	(diagnose_trait_expr): Make static.  Take a template argument
1552	vector instead of a parameter mapping.
1553	(diagnose_valid_expression): Remove.
1554	(diagnose_valid_type): Remove.
1555	(diagnose_simple_requirement): Remove.
1556	(diagnose_compound_requirement): Remove.
1557	(diagnose_type_requirement): Remove.
1558	(diagnose_nested_requirement): Remove.
1559	(diagnose_requirement): Remove.
1560	(diagnose_requires_expr): Remove.
1561	(diagnose_atomic_constraint): Take a sat_info instead of a
1562	subst_info.  Adjust call to diagnose_trait_expr.  Call
1563	tsubst_requires_expr instead of diagnose_requires_expr.
1564	(diagnose_constraints): Remove special casing of REQUIRES_EXPR
1565	and just always call constraint_satisfaction_value.
1566
15672021-03-03  Patrick Palka  <ppalka@redhat.com>
1568
1569	* constexpr.c (cxx_eval_call_expression): Adjust call to
1570	evaluate_concept_check.
1571	(cxx_eval_constant_expression) <case REQUIRES_EXPR>: Use
1572	evaluate_requires_expression instead of
1573	satisfy_constraint_expression.
1574	<case TEMPLATE_ID_EXPR>: Adjust call to evaluate_concept_check.
1575	* constraint.cc (struct sat_info): Adjust comment about which
1576	satisfaction entrypoints use noisy-unsat.
1577	(normalize_template_requirements): Remove (and adjust callers
1578	appropriately).
1579	(normalize_nontemplate_requirements): Likewise.
1580	(tsubst_nested_requirement): Use constraint_satisfaction_value
1581	instead of satisfy_constraint_expression, which'll do the
1582	noisy replaying of ill-formed quiet satisfaction for us.
1583	(decl_satisfied_cache): Adjust comment.
1584	(satisfy_constraint): Rename to ...
1585	(satisfy_normalized_constraints): ... this.
1586	(satisfy_associated_constraints): Remove (and make its
1587	callers check for dependent arguments).
1588	(satisfy_constraint_expression): Rename to ...
1589	(satisfy_nondeclaration_constraints): ... this.  Assert that
1590	'args' is empty when 't' is a concept-id.  Removing handling
1591	bare constraint-expressions, and handle REQUIRES_EXPRs
1592	specially.  Adjust comment accordingly.
1593	(satisfy_declaration_constraints): Assert in the two-parameter
1594	version that 't' is not a TEMPLATE_DECL.  Adjust following
1595	removal of normalize_(non)?template_requirements and
1596	satisfy_asociated_constraints.
1597	(constraint_satisfaction_value): Combine the two- and
1598	three-parameter versions in the natural way.
1599	(constraints_satisfied_p): Combine the one- and two-parameter
1600	versions in the natural way.  Improve documentation.
1601	(evaluate_requires_expr): Define.
1602	(evaluate_concept_check): Remove 'complain' parameter.  Use
1603	constraint_satisfaction_value instead of
1604	satisfy_constraint_expression.
1605	(diagnose_nested_requirement): Adjust following renaming of
1606	satisfy_constraint_expression.
1607	(diagnose_constraints): Handle REQUIRES_EXPR by going through
1608	diagnose_requires_expr directly instead of treating it as a
1609	constraint-expression.  Improve documentation.
1610	* cp-gimplify.c (cp_genericize_r) <case CALL_EXPR>: Adjust call
1611	to evaluate_concept_check.
1612	<case REQUIRES_EXPR>: Use evaluate_requires_expr instead of
1613	constraints_satisfied_p.
1614	<case TEMPLATE_ID_EXPR>: Adjust call to evaluate_concept_check.
1615	* cp-tree.h (evaluate_requires_expr): Declare.
1616	(evaluate_concept_check): Remove tsubst_flag_t parameter.
1617	(satisfy_constraint_expression): Remove declaration.
1618	(constraints_satisfied_p): Remove one-parameter declaration.
1619	Add a default argument to the two-parameter declaration.
1620	* cvt.c (convert_to_void): Adjust call to
1621	evaluate_concept_check.
1622
16232021-03-03  Jakub Jelinek  <jakub@redhat.com>
1624
1625	PR c++/82959
1626	* call.c (op_is_ordered): Handle TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR
1627	and COMPOUND_EXPR.
1628
16292021-03-03  Marek Polacek  <polacek@redhat.com>
1630
1631	PR c++/97034
1632	PR c++/99009
1633	* pt.c (build_deduction_guide): Use INNERMOST_TEMPLATE_ARGS.
1634	(maybe_aggr_guide): Use the original template type where needed.  In
1635	a class member template, partially instantiate the result of
1636	collect_ctor_idx_types.
1637	(do_class_deduction): Defer the deduction until the enclosing
1638	scope is non-dependent.
1639
16402021-03-03  Jason Merrill  <jason@redhat.com>
1641
1642	PR c++/95675
1643	* call.c (build_temp): Wrap a CALL_EXPR in a TARGET_EXPR
1644	if it didn't get one before.
1645
16462021-03-03  Nathan Sidwell  <nathan@acm.org>
1647
1648	PR c++/99344
1649	* module.cc (trees_out::decl_node): Small refactor.
1650	(depset::hash::add_binding_entity): Return true on meeting an
1651	import.  Set namespace's import here.
1652	(module_state:write_namespaces): Inform of purview too.
1653	(module_state:read_namespaces): Adjust.
1654	* name-lookup.c (implicitly_export_namespace): Delete.
1655	(do_pushdecl): Don't call it.
1656	(push_namespace): Likewise, set purview.
1657	(add_imported_namespace): Reorder parms.
1658	* name-lookup.h (add_imported_namespace): Alter param ordering.
1659
16602021-03-02  Martin Sebor  <msebor@redhat.com>
1661
1662	PR c++/99251
1663	* class.c (build_base_path): Call build_if_nonnull.
1664	* cp-tree.h (build_if_nonnull): Declare.
1665	* rtti.c (ifnonnull): Rename...
1666	(build_if_nonnull): ...to this.  Set no-warning bit on COND_EXPR.
1667	(build_dynamic_cast_1): Adjust to name change.
1668
16692021-03-02  Patrick Palka  <ppalka@redhat.com>
1670
1671	PR c++/96443
1672	PR c++/96960
1673	* constraint.cc (type_deducible_p): Don't substitute into the
1674	constraints, and instead just pass 'args' to do_auto_deduction
1675	as the outer template arguments.
1676	(tsubst_parameter_mapping): Remove confused code for handling
1677	placeholder type arguments.
1678	(normalize_placeholder_type_constraint): Define.
1679	(satisfy_constraint_expression): Use it to handle placeholder
1680	'auto' types.
1681	* cp-tree.h (PLACEHOLDER_TYPE_CONSTRAINTS_INFO): Define.
1682	(PLACEHOLDER_TYPE_CONSTRAINTS): Redefine in terms of the above.
1683	* pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: Use
1684	PLACEHOLDER_TYPE_CONSTRAINTS_INFO instead.
1685	(make_constrained_placeholder_type): Set
1686	PLACEHOLDER_TYPE_CONSTRAINTS_INFO instead.
1687	(do_auto_deduction): Clarify comments about the outer_targs
1688	parameter.  Rework satisfaction of a placeholder type constraint
1689	to pass in the complete set of template arguments directly to
1690	constraints_satisfied_p.
1691	(splice_late_return_type): Use PLACEHOLDER_TYPE_CONSTRAINTS_INFO
1692	instead.  Also rebuild the the constraint info on the new auto.
1693
16942021-03-02  Patrick Palka  <ppalka@redhat.com>
1695
1696	* constraint.cc (build_parameter_mapping): Rely on the caller to
1697	determine the in-scope template parameters.
1698	(norm_info::norm_info): Delegate the tsubst_flags_t constructor
1699	to the two-parameter constructor.  In the two-parameter
1700	constructor, fold in the definition of make_context, set
1701	initial_parms appropriately, and don't set the now-removed
1702	orig_decl member.
1703	(norm_info::make_context): Remove, now that its only use is
1704	inlined into the caller.
1705	(norm_info::update_context): Adjust call to
1706	build_parameter_mapping to pass in the relevant set of in-scope
1707	template parameters.
1708	(norm_info::ctx_parms): Define this member function.
1709	(norm_info::context): Initialize to NULL_TREE.
1710	(norm_info::orig_decl): Remove this data member.
1711	(norm_info::initial_parms): Define this data member.
1712	(normalize_atom): Adjust call to build_parameter_mapping to pass
1713	in the relevant set of in-scope template parameters.  Use
1714	info.initial_parms instead of info.orig_decl.
1715	(normalize_constraint_expression): Take a norm_info object
1716	instead of a bool.  Cache the result of normalization.
1717	(tsubst_nested_requirement): Call satisfy_constraint_expression
1718	instead of satisfy_constraint, so that we normalize on demand.
1719	(satisfy_constraint_expression): Handle a NESTED_REQ argument.
1720	Adjust call to normalize_constraint_expression.
1721	(finish_nested_requirement): Set the TREE_TYPE of the NESTED_REQ
1722	to current_template_parms.
1723	(diagnose_nested_requirements): Go through
1724	satisfy_constraint_expression, as with tsubst_nested_requirement.
1725
17262021-03-02  Patrick Palka  <ppalka@redhat.com>
1727
1728	* constraint.cc (tsubst_parameter_mapping): Canonicalize the
1729	arguments of a substituted TYPE_ARGUMENT_PACK even if we've
1730	started with a TYPE_ARGUMENT_PACK.
1731	(finish_requires_expr): Don't set DECL_CONTEXT and
1732	CONSTRAINT_VAR_P on each of the introduced parameters here.
1733	* parser.c (cp_parser_requirement_parameter_list): Instead set
1734	these fields earlier, here.
1735	* pt.c (do_auto_deduction): Canonicalize the result of
1736	do_auto_deduction.  Pass 'complain' to finish_decltype_type.
1737
17382021-03-02  Patrick Palka  <ppalka@redhat.com>
1739
1740	* constraint.cc (tsubst_simple_requirement): Just return
1741	boolean_true_node on success.
1742	(tsubst_type_requirement): Likewise.
1743	(tsubst_compound_requirement): Likewise.
1744	(tsubst_nested_requirement): Likewise.
1745	(tsubst_requirement_body): Remove.
1746	(check_constaint_variables): Rename to ...
1747	(check_constraint_variables): ... this.
1748	(tsubst_constraint_variables): Adjust.
1749	(tsubst_requires_expr): Fold tsubst_requirement_body into here.
1750
17512021-03-01  Nathan Sidwell  <nathan@acm.org>
1752
1753	PR c++/99294
1754	* class.c (fixup_type_variants): Propagate mode, precision,
1755	alignment & emptiness.
1756	* module.cc (trees_out::type_node): Use TYPE_ALIGN_RAW.
1757	(trees_in::tree_node): Rematerialize alignment here.
1758
17592021-02-27  Jason Merrill  <jason@redhat.com>
1760
1761	PR c++/90333
1762	* parser.c (cp_parser_lambda_declarator_opt): Accept GNU attributes
1763	between () and ->.
1764
17652021-02-26  Jakub Jelinek  <jakub@redhat.com>
1766
1767	* parser.c (cp_parser_lambda_declarator_opt): Implement
1768	P1102R2 - Down with ()! Make ()s optional before lambda specifiers
1769	for -std={c,gnu}++2b or with pedwarn in earlier versions.
1770
17712021-02-26  Jakub Jelinek  <jakub@redhat.com>
1772
1773	PR c++/95451
1774	* lambda.c (is_lambda_ignored_entity): Before checking for
1775	LAMBDA_FUNCTION_P, use OVL_FIRST.  Drop FUNCTION_DECL check.
1776
17772021-02-26  Jason Merrill  <jason@redhat.com>
1778
1779	PR c++/98810
1780	* pt.c (tsubst_copy) [VIEW_CONVERT_EXPR]: Add const
1781	to a class non-type template argument that needs it.
1782
17832021-02-26  Patrick Palka  <ppalka@redhat.com>
1784
1785	PR c++/98990
1786	* pt.c (splice_late_return_type): Rebuild the entire return type
1787	if we have to adjust the level of an auto within.
1788	(type_uses_auto): Adjust call to find_type_usage.
1789	* type-utils.h (find_type_usage): Revert r10-6571 change that
1790	made this function return a pointer to the auto node.
1791
17922021-02-25  Patrick Palka  <ppalka@redhat.com>
1793
1794	PR c++/99213
1795	PR c++/94521
1796	* error.c (dump_scope): Pass TFF_NO_TEMPLATE_BINDINGS instead of
1797	TFF_NO_FUNCTION_ARGUMENTS when dumping a function scope.
1798
17992021-02-25  Patrick Palka  <ppalka@redhat.com>
1800
1801	PR c++/99103
1802	* pt.c (is_spec_or_derived): Drop cv-qualifiers from 'etype'.
1803	(maybe_aggr_guide): Fix order of arguments to is_spec_or_derived.
1804
18052021-02-25  Marek Polacek  <polacek@redhat.com>
1806
1807	DR 1312
1808	PR c++/99176
1809	* constexpr.c (is_std_construct_at): New overload.
1810	(is_std_allocator_allocate): New overload.
1811	(cxx_eval_call_expression): Use the new overloads.
1812	(cxx_eval_constant_expression): Reject casting
1813	from void * as per DR 1312.  Don't check can_convert.
1814
18152021-02-25  Iain Sandoe  <iain@sandoe.co.uk>
1816
1817	PR c++/97587
1818	* coroutines.cc (struct param_info): Track rvalue refs.
1819	(morph_fn_to_coro): Track rvalue refs, and call the promise
1820	CTOR with the frame copy of passed parms.
1821
18222021-02-25  Iain Sandoe  <iain@sandoe.co.uk>
1823
1824	PR c++/95822
1825	* coroutines.cc (morph_fn_to_coro): Unconditionally remove any
1826	set throwing_cleanup marker.
1827
18282021-02-25  Nathan Sidwell  <nathan@acm.org>
1829
1830	PR c++/99166
1831	* module.cc (module_state::inform_cmi_p): Renamed field.
1832	(module_state::do_import): Adjust.
1833	(init_modules, finish_module_processing): Likewise.
1834	(handle_module_option): Likewise.
1835
18362021-02-25  Nathan Sidwell  <nathan@acm.org>
1837
1838	PR c++/98318
1839	* mapper-client.cc (module_client::open_module_client): Fix typo
1840	of fd init.
1841
18422021-02-24  Nathan Sidwell  <nathan@acm.org>
1843
1844	PR c++/98718
1845	* module.cc (ool): New indirection vector.
1846	(loc_spans::maybe_propagate): Location is not optional.
1847	(loc_spans::open): Likewise.  Assert monotonically advancing.
1848	(module_for_ordinary_loc): Use ool indirection vector.
1849	(module_state::write_prepare_maps): Do not count empty macro
1850	expansions.  Elide empty spans.
1851	(module_state::write_macro_maps): Skip empty expansions.
1852	(ool_cmp): New qsort comparator.
1853	(module_state::write): Create and destroy ool vector.
1854	(name_pending_imports): Fix dump push/pop.
1855	(preprocess_module): Likewise.  Add more dumping.
1856	(preprocessed_module): Likewise.
1857
18582021-02-24  Iain Sandoe  <iain@sandoe.co.uk>
1859
1860	PR c++/96251
1861	* coroutines.cc (coro_common_keyword_context_valid_p): Suppress
1862	error reporting when instantiating for a constexpr.
1863
18642021-02-23  Nathan Sidwell  <nathan@acm.org>
1865
1866	PR c++/99208
1867	* decl.c (name_unnamed_type): Check DECL identity, not IDENTIFIER
1868	identity.
1869
18702021-02-23  Patrick Palka  <ppalka@redhat.com>
1871
1872	PR c++/95468
1873	* pt.c (tsubst_copy_and_build) <case BASELINK>: New case, copied
1874	over from tsubst_copy.
1875
18762021-02-23  Patrick Palka  <ppalka@redhat.com>
1877
1878	* pt.c (instantiation_dependent_expression_p): Check
1879	processing_template_decl before calling
1880	potential_constant_expression.
1881
18822021-02-22  Nathan Sidwell  <nathan@acm.org>
1883
1884	PR c++/99174
1885	* module.cc (struct module_state): Add visited_p flag.
1886	(name_pending_imports): Use it to avoid duplicate requests.
1887	(preprocess_module): Don't read preprocessor state if we failed to
1888	load a module's config.
1889
18902021-02-22  Nathan Sidwell  <nathan@acm.org>
1891
1892	PR c++/99153
1893	* decl.c (duplicate_decls): Move DECL_MODULE_IMPORT_P propagation
1894	to common-path.
1895	* module.cc (set_defining_module): Add assert.
1896
18972021-02-19  Nathan Sidwell  <nathan@acm.org>
1898
1899	PR c++/98741
1900	* module.cc (pending_imports): New.
1901	(declare_module): Adjust test condition.
1902	(name_pending_imports): New.
1903	(preprocess_module): Reimplement using pending_imports.
1904	(preprocessed_module): Move name-getting to name_pending_imports.
1905	* name-lookup.c (append_imported_binding_slot): Assert module
1906	ordering is increasing.
1907
19082021-02-19  Nathan Sidwell  <nathan@acm.org>
1909
1910	* module.cc (note_cmis): New.
1911	(struct module_state): Add inform_read_p bit.
1912	(module_state::do_import): Inform of CMI location, if enabled.
1913	(init_modules): Canonicalize note_cmis entries.
1914	(handle_module_option): Handle -flang-info-module-read=FOO.
1915
19162021-02-19  Jason Merrill  <jason@redhat.com>
1917
1918	PR c++/96926
1919	* call.c (perfect_conversion_p): Limit rvalueness
1920	test to reference bindings.
1921
19222021-02-19  Jason Merrill  <jason@redhat.com>
1923
1924	PR c++/96926
1925	* call.c (perfect_conversion_p): New.
1926	(perfect_candidate_p): New.
1927	(add_candidates): Ignore templates after a perfect non-template.
1928
19292021-02-18  Nathan Sidwell  <nathan@acm.org>
1930
1931	PR c++/99023
1932	* module.cc (canonicalize_header_name): Use
1933	cpp_probe_header_unit.
1934	(maybe_translate_include): Fix note_includes comparison.
1935	(init_modules): Fix note_includes string termination.
1936
19372021-02-18  Jakub Jelinek  <jakub@redhat.com>
1938
1939	PR c++/99132
1940	* cp-gimplify.c (cp_genericize_r) <case CALL_EXPR>: Use
1941	cp_get_callee_fndecl_nofold instead of cp_get_callee_fndecl to check
1942	for immediate function calls.
1943
19442021-02-17  Nathan Sidwell  <nathan@acm.org>
1945
1946	PR c++/99023
1947	* module.cc (struct macro_export): Add GTY markers.
1948	(macro_exports): Likewise, us a va_gc Vector.
1949
19502021-02-17  Jakub Jelinek  <jakub@redhat.com>
1951
1952	PR sanitizer/99106
1953	* init.c (build_zero_init_1): For flexible array members just return
1954	NULL_TREE instead of returning empty CONSTRUCTOR with non-complete
1955	ARRAY_TYPE.
1956
19572021-02-17  Nathan Sidwell  <nathan@acm.org>
1958
1959	PR c++/99116
1960	* name-lookup.c (do_pushdecl): Don't peek under template_parm
1961	bindings here ...
1962	(set_identifier_type_value_with_scope): ... or here.
1963	(do_pushtag): Only set_identifier_type_value_with_scope at
1964	non-class template parm scope, and use parent scope.
1965
19662021-02-17  Nathan Sidwell  <nathan@acm.org>
1967
1968	PR c++/99071
1969	* name-lookup.c (maybe_record_mergeable_decl): Deref the correct
1970	pointer.
1971
19722021-02-17  Patrick Palka  <ppalka@redhat.com>
1973
1974	PR debug/96997
1975	PR c++/94034
1976	* tree.c (build_aggr_init_expr): Revert r10-7718 change.
1977
19782021-02-12  Nathan Sidwell  <nathan@acm.org>
1979
1980	* module.cc (module_state::write_cluster): Check bindings for
1981	imported using-decls.
1982
19832021-02-12  Nathan Sidwell  <nathan@acm.org>
1984
1985	PR c++/99040
1986	* module.cc (trees_in::decl_value): Call add_module_namespace_decl
1987	for new namespace-scope entities.
1988	(module_state::read_cluster): Don't call add_module_decl here.
1989	* name-lookup.h (add_module_decl): Rename to ...
1990	(add_module_namespace_decl): ... this.
1991	* name-lookup.c (newbinding_bookkeeping): Move into ...
1992	(do_pushdecl): ... here.  Its only remaining caller.
1993	(add_module_decl): Rename to ...
1994	(add_module_namespace_decl): ... here.  Add checking-assert for
1995	circularity. Don't call newbinding_bookkeeping, just extern_c
1996	checking and incomplete var checking.
1997
19982021-02-12  Nathan Sidwell  <nathan@acm.org>
1999
2000	PR c++/99039
2001	PR c++/99040
2002	* cp-tree.h (CPTI_GLOBAL_TYPE): Delete.
2003	(global_type_node): Delete.
2004	(IDENTIFIER_TYPE_VALUE): Delete.
2005	(IDENTIFIER_HAS_TYPE_VALUE): Delete.
2006	(get_type_value): Delete.
2007	* name-lookup.h (identifier_type_value): Delete.
2008	* name-lookup.c (check_module_override): Don't
2009	SET_IDENTIFIER_TYPE_VALUE here.
2010	(do_pushdecl): Nor here.
2011	(identifier_type_value_1, identifier_type_value): Delete.
2012	(set_identifier_type_value_with_scope): Only
2013	SET_IDENTIFIER_TYPE_VALUE for local and class scopes.
2014	(pushdecl_nanmespace_level): Remove shadow stack nadgering.
2015	(do_pushtag): Use REAL_IDENTIFIER_TYPE_VALUE.
2016	* call.c (check_dtor_name): Use lookup_name.
2017	* decl.c (cxx_init_decl_processing): Drop global_type_node.
2018	* decl2.c (cplus_decl_attributes): Don't SET_IDENTIFIER_TYPE_VALUE
2019	here.
2020	* init.c (get_type_value): Delete.
2021	* pt.c (instantiate_class_template_1): Don't call pushtag or
2022	SET_IDENTIFIER_TYPE_VALUE here.
2023	(tsubst): Assert never an identifier.
2024	(dependent_type_p): Drop global_type_node assert.
2025	* typeck.c (error_args_num): Don't use IDENTIFIER_HAS_TYPE_VALUE
2026	to determine ctorness.
2027
20282021-02-12  Jakub Jelinek  <jakub@redhat.com>
2029
2030	PR c++/97742
2031	* parser.c (cp_parser_requirement_seq): Stop iterating after reaching
2032	CPP_EOF.
2033
20342021-02-12  Jason Merrill  <jason@redhat.com>
2035
2036	PR c++/97246
2037	PR c++/94546
2038	* pt.c (extract_fnparm_pack): Check DECL_PACK_P here.
2039	(register_parameter_specializations): Not here.
2040
20412021-02-11  Marek Polacek  <polacek@redhat.com>
2042
2043	PR c++/95888
2044	* pt.c (lookup_template_class_1): Pass tf_none to tsubst when looking
2045	for the partial instantiation.
2046
20472021-02-11  Jakub Jelinek  <jakub@redhat.com>
2048
2049	PR c++/99033
2050	* init.c (build_zero_init_1): Handle zero initialiation of
2051	flexible array members like initialization of [0] arrays.
2052	Use integer_minus_onep instead of comparison to integer_minus_one_node
2053	and integer_zerop instead of comparison against size_zero_node.
2054	Formatting fixes.
2055
20562021-02-11  Marek Polacek  <polacek@redhat.com>
2057
2058	PR c++/99063
2059	* semantics.c (finish_do_stmt): Check for unexpanded parameter packs.
2060
20612021-02-11  Patrick Palka  <ppalka@redhat.com>
2062
2063	PR c++/97582
2064	* name-lookup.c (op_unqualified_lookup): Handle an ambiguous
2065	lookup result by discarding it if the first element is a
2066	class-scope declaration, otherwise return it.
2067	(push_operator_bindings): Handle an ambiguous lookup result by
2068	doing push_local_binding on each element in the list.
2069
20702021-02-11  Marek Polacek  <polacek@redhat.com>
2071
2072	* parser.c (cp_parser_selection_statement): Use vec_free.
2073
20742021-02-10  Jakub Jelinek  <jakub@redhat.com>
2075
2076	PR c++/98988
2077	PR c++/99031
2078	* constexpr.c: Include cgraph.h.
2079	(cxx_eval_call_expression): Call varpool_node::finalize_decl on
2080	heap artificial vars.
2081	(cxx_eval_outermost_constant_expr): Remove varpool nodes for
2082	heap artificial vars.
2083
20842021-02-10  Nathan Sidwell  <nathan@acm.org>
2085
2086	PR c++/99030
2087	* pt.c (tsubst_copy) [VAR_DECL]: For a DECL_LOCAL_DECL_P T is the
2088	answer if there's no local specialization.
2089
20902021-02-09  Nathan Sidwell  <nathan@acm.org>
2091
2092	PR c++/98944
2093	* module.cc (module_state::is_rooted): Rename to ...
2094	(module_state::has_location): ... here.  Adjust callers.
2095	(module_state::read_partitions): Adjust validity check.
2096	Don't overwrite a known location.
2097
20982021-02-09  Jason Merrill  <jason@redhat.com>
2099
2100	PR c++/96905
2101	* pt.c (mark_decl_instantiated): Exit early if consteval.
2102
21032021-02-09  Jason Merrill  <jason@redhat.com>
2104
2105	PR c++/98326
2106	PR c++/20408
2107	* cp-gimplify.c (simple_empty_class_p): Don't touch an invisiref
2108	parm.
2109
21102021-02-09  Jason Merrill  <jason@redhat.com>
2111
2112	PR c++/98994
2113	PR c++/97566
2114	* constexpr.c (cxx_eval_store_expression): Only skip empty fields in
2115	RECORD_TYPE.
2116
21172021-02-08  Nathan Sidwell  <nathan@acm.org>
2118
2119	* decl.c (start_cleanup_fn): Push function into
2120	namespace.
2121
21222021-02-08  Nathan Sidwell  <nathan@acm.org>
2123
2124	PR c++/98531
2125	* cp-tree.h (push_abi_namespace, pop_abi_namespace): Declare.
2126	* decl.c (push_abi_namespace, pop_abi_namespace): Moved
2127	from rtti.c, add default namespace arg.
2128	(check_redeclaration_exception_specification): Allow a lazy
2129	builtin's eh spec to differ from an lready-declared user
2130	declaration.
2131	(declare_global_var): Use push/pop_abi_namespace.
2132	(get_atexit_node): Push the fndecl into a namespace.
2133	* rtti.c (push_abi_namespace, pop_abi_namespace): Moved to
2134	decl.c.
2135
21362021-02-08  Marek Polacek  <polacek@redhat.com>
2137
2138	* cp-tree.h (CLASSTYPE_TI_TEMPLATE): Fix typo.
2139
21402021-02-05  Marek Polacek  <polacek@redhat.com>
2141
2142	PR c++/98947
2143	* call.c (build_conditional_expr_1): Don't call mark_lvalue_use
2144	on arg2/arg3.
2145	* expr.c (mark_use) <case MODIFY_EXPR>: Don't check read_p when
2146	issuing the -Wvolatile warning.  Only set TREE_THIS_VOLATILE if
2147	a warning was emitted.
2148
21492021-02-05  Marek Polacek  <polacek@redhat.com>
2150
2151	PR c++/96462
2152	* name-lookup.c (lookup_using_decl): Hoist the destructor check.
2153
21542021-02-05  Jakub Jelinek  <jakub@redhat.com>
2155
2156	PR c++/97878
2157	* decl.c (check_array_initializer): For structured bindings, require
2158	the array type to be complete.
2159
21602021-02-04  Jason Merrill  <jason@redhat.com>
2161
2162	PR c++/98717
2163	* constraint.cc (build_concept_check_arguments): Remove assert.
2164	(build_concept_check): Allow empty args.
2165
21662021-02-04  Tom Greenslade (thomgree)  <thomgree@cisco.com>
2167
2168	PR c++/90926
2169	* call.c (can_convert_array): Extend to handle all valid aggregate
2170	initializers of an array; including by string literals, not just by
2171	brace-init-list.
2172	(build_aggr_conv): Call can_convert_array more often, not just in
2173	brace-init-list case.
2174	* typeck2.c (array_string_literal_compatible_p): New function.
2175	(digest_init_r): call array_string_literal_compatible_p
2176	* cp-tree.h: (array_string_literal_compatible_p): Declare.
2177
21782021-02-04  Jason Merrill  <jason@redhat.com>
2179
2180	PR c++/98802
2181	* pt.c (do_class_deduction): No aggregate guide if any_dguides_p.
2182
21832021-02-04  Jason Merrill  <jason@redhat.com>
2184
2185	PR c++/95192
2186	* pt.c (tsubst_attribute): Handle error.
2187	(apply_late_template_attributes): Return false on error.
2188	(tsubst_function_decl): Check its return value.
2189	(tsubst_decl): Likewise.
2190	(push_template_decl): Assert current_template_parms.
2191	(tsubst_template_decl): Set current_template_parms.
2192
21932021-02-03  Marek Polacek  <polacek@redhat.com>
2194
2195	PR c++/98951
2196	* call.c (struct z_candidate): Mark rewritten and reversed as const.
2197	(struct NonPublicField): Mark operator() as const.
2198	(struct NonTrivialField): Likewise.
2199
22002021-02-03  Jason Merrill  <jason@redhat.com>
2201
2202	PR c++/98926
2203	PR c++/98570
2204	* pt.c (spec_hasher::equal): Set processing_template_decl.
2205	* Make-lang.in (check-g++-strict-gc): Add --param
2206	hash-table-verification-limit=10000.
2207
22082021-02-03  Marek Polacek  <polacek@redhat.com>
2209
2210	PR c++/98899
2211	* parser.c (cp_parser_class_specifier_1): Use any possible
2212	DEFPARSE_INSTANTIATIONS to update DEFERRED_NOEXCEPT_PATTERN.
2213	(cp_parser_save_noexcept): Initialize DEFPARSE_INSTANTIATIONS.
2214	* pt.c (tsubst_exception_specification): Stash new_specs into
2215	DEFPARSE_INSTANTIATIONS.
2216	* tree.c (fixup_deferred_exception_variants): Use
2217	UNPARSED_NOEXCEPT_SPEC_P.
2218
22192021-02-02  Jason Merrill  <jason@redhat.com>
2220
2221	PR c++/98929
2222	PR c++/96199
2223	* error.c (dump_expr): Ignore dummy object.
2224	* pt.c (tsubst_baselink): Handle dependent scope.
2225
22262021-02-01  Patrick Palka  <ppalka@redhat.com>
2227
2228	PR c++/98295
2229	* constexpr.c (cxx_eval_array_reference): Also set
2230	new_ctx.object when setting new_ctx.ctor.
2231
22322021-02-01  Marek Polacek  <polacek@redhat.com>
2233
2234	PR c++/98355
2235	* parser.c (cp_parser_has_attribute_expression): Use
2236	uses_template_parms instead of type_dependent_expression_p.
2237
22382021-02-01  Jason Merrill  <jason@redhat.com>
2239
2240	PR c++/98570
2241	* cp-tree.h: Declare it.
2242	* pt.c (comparing_dependent_aliases): New flag.
2243	(template_args_equal, spec_hasher::equal): Set it.
2244	(dependent_alias_template_spec_p): Assert that we don't
2245	get non-types other than error_mark_node.
2246	(instantiate_alias_template): SET_TYPE_STRUCTURAL_EQUALITY
2247	on complex alias specializations.  Set TYPE_DEPENDENT_P here.
2248	(tsubst_decl): Not here.
2249	* module.cc (module_state::read_cluster): Set
2250	comparing_dependent_aliases instead of
2251	comparing_specializations.
2252	* tree.c (cp_tree_equal): Remove comparing_specializations
2253	module handling.
2254	* typeck.c (structural_comptypes): Adjust.
2255	(comptypes): Remove comparing_specializations handling.
2256
22572021-01-29  Nathan Sidwell  <nathan@acm.org>
2258
2259	PR c++/98843
2260	* module.cc (module_state_config): Add num_entities field.
2261	(module_state::read_entities): The entity_ary span is
2262	already allocated.
2263	(module_state::write_config): Write num_entities.
2264	(module_state::read_config): Read num_entities.
2265	(module_state::write): Set config's num_entities.
2266	(module_state::read_initial): Allocate the entity ary
2267	span here.
2268	(module_state::read_language): Do not set entity_lwm
2269	here.
2270
22712021-01-29  Marek Polacek  <polacek@redhat.com>
2272
2273	PR c++/96137
2274	* parser.c (cp_parser_class_name): If parser->scope is
2275	error_mark_node, return it, otherwise continue.
2276
22772021-01-28  Jakub Jelinek  <jakub@redhat.com>
2278
2279	PR c++/98841
2280	* typeck.c (build_x_indirect_ref): For *this, return current_class_ref.
2281
22822021-01-28  Jakub Jelinek  <jakub@redhat.com>
2283
2284	PR c++/33661
2285	PR c++/98847
2286	* decl.c (cp_finish_decl): For register vars with asmspec in templates
2287	call set_user_assembler_name and set DECL_HARD_REGISTER.
2288	* pt.c (tsubst_expr): When instantiating DECL_HARD_REGISTER vars,
2289	pass asmspec_tree to cp_finish_decl.
2290
22912021-01-28  Nathan Sidwell  <nathan@acm.org>
2292
2293	PR c++/98770
2294	* module.cc (trees_out::decl_value): Swap is_typedef & TYPE_NAME
2295	check order.
2296	(trees_in::decl_value): Do typedef frobbing only when installing
2297	a new typedef, adjust is_matching_decl call.  Swap is_typedef
2298	& TYPE_NAME check.
2299	(trees_in::is_matching_decl): Add is_typedef parm. Adjust variable
2300	names and deal with typedef checking.
2301
23022021-01-27  Jason Merrill  <jason@redhat.com>
2303
2304	PR c++/97874
2305	* name-lookup.c (lookup_using_decl): Clean up handling
2306	of dependency and inherited constructors.
2307	(finish_nonmember_using_decl): Handle DECL_DEPENDENT_P.
2308	* pt.c (tsubst_expr): Handle DECL_DEPENDENT_P.
2309
23102021-01-26  Jason Merrill  <jason@redhat.com>
2311
2312	PR c++/97474
2313	* call.c (type_passed_as): Don't mark invisiref restrict.
2314
23152021-01-26  Jason Merrill  <jason@redhat.com>
2316
2317	PR c++/97566
2318	PR c++/98463
2319	* class.c (layout_class_type): An empty field gets size 0.
2320	(is_empty_field): New.
2321	(check_bases): Check it.
2322	* cp-tree.h (is_empty_field): Declare it.
2323	* constexpr.c (cxx_eval_store_expression): Check it.
2324	(cx_check_missing_mem_inits): Likewise.
2325	* init.c (perform_member_init): Likewise.
2326	* typeck2.c (process_init_constructor_record): Likewise.
2327
23282021-01-25  Martin Sebor  <msebor@redhat.com>
2329
2330	PR c++/98646
2331	* cvt.c (cp_fold_convert): Propagate TREE_NO_WARNING.
2332
23332021-01-25  Jason Merrill  <jason@redhat.com>
2334
2335	PR c++/98463
2336	* constexpr.c (get_or_insert_ctor_field): Add check.
2337	(cxx_eval_store_expression): Handle discontinuity of refs.
2338
23392021-01-23  Anthony Sharp  <anthonysharp15@gmail.com>
2340
2341	* call.c (complain_about_access): Altered function.
2342	* cp-tree.h (complain_about_access): Changed parameters of function.
2343	(get_parent_with_private_access): Declared new function.
2344	* search.c (get_parent_with_private_access): Defined new function.
2345	* semantics.c (enforce_access): Modified function.
2346	* typeck.c (complain_about_unrecognized_member): Updated function
2347	arguments in complain_about_access.
2348
23492021-01-23  Patrick Palka  <ppalka@redhat.com>
2350
2351	PR c++/97399
2352	* cp-tree.h (shared_member_p): Adjust declaration.
2353	* parser.c (cp_parser_init_declarator): If the storage class
2354	specifier is sc_static, pass true for static_p to
2355	cp_parser_declarator.
2356	(cp_parser_direct_declarator): Don't do inject_this_parm when
2357	the declarator is a friend.
2358	* search.c (shared_member_p): Change return type to bool and
2359	adjust function body accordingly.  Return false for a dependent
2360	USING_DECL instead of aborting.
2361	* semantics.c (finish_qualified_id_expr): Rely on shared_member_p
2362	even when type-dependent.
2363
23642021-01-22  Marek Polacek  <polacek@redhat.com>
2365
2366	PR c++/96623
2367	* parser.c (inject_parm_decls): Remove a redundant assignment.
2368	(cp_parser_class_specifier_1): Clear current_class_{ptr,ref}
2369	before calling inject_parm_decls.
2370
23712021-01-22  Jason Merrill  <jason@redhat.com>
2372
2373	PR c++/98744
2374	* call.c (make_base_init_ok): Use DECL_HAS_VTT_PARM_P.
2375
23762021-01-22  Jakub Jelinek  <jakub@redhat.com>
2377
2378	PR sanitizer/95693
2379	* init.c (build_zero_init_1): Revert the 2018-03-06 change to
2380	return build_zero_cst for reference types.
2381	* typeck2.c (process_init_constructor_record): Instead call
2382	build_zero_cst here during error recovery instead of build_zero_init.
2383
23842021-01-22  Marek Polacek  <polacek@redhat.com>
2385
2386	PR c++/98545
2387	* mangle.c (write_member_name): Emit abi_warn_or_compat_version_crosses
2388	warnings regardless of abi_version_at_least.
2389	(write_expression): When the expression is a dependent name
2390	and an operator name, write "on" before writing its name.
2391
23922021-01-22  Marek Polacek  <polacek@redhat.com>
2393
2394	PR c++/97966
2395	* pt.c (instantiate_class_template_1): Instantiate members
2396	marked with attribute used only after we're done instantiating
2397	the class.
2398
23992021-01-21  Patrick Palka  <ppalka@redhat.com>
2400
2401	PR c++/71879
2402	* semantics.c (finish_decltype_type): Set up a cp_unevaluated
2403	sentinel at the start of the function.  Remove a now-redundant
2404	manual adjustment of cp_unevaluated_operand.
2405
24062021-01-21  Nathan Sidwell  <nathan@acm.org>
2407
2408	PR c++/98624
2409	* module.cc (depset::hash::find_dependencies): Add
2410	module arg.
2411	(trees_out::core_vals): Check state before calling
2412	write_location.
2413	(sort_cluster, module_state::write): Adjust
2414	find_dependencies call.
2415
24162021-01-21  Jakub Jelinek  <jakub@redhat.com>
2417
2418	PR c++/98672
2419	* constexpr.c (check_for_return_continue_data): Add break_stmt member.
2420	(check_for_return_continue): Also look for BREAK_STMT.  Handle
2421	SWITCH_STMT by ignoring break_stmt from its body.
2422	(potential_constant_expression_1) <case FOR_STMT>,
2423	<case WHILE_STMT>: If the condition isn't constant true, check if
2424	the loop body can contain a return stmt.
2425	<case SWITCH_STMT>: Adjust check_for_return_continue_data initializer.
2426	<case IF_STMT>: If recursion with tf_none is successful,
2427	merge *jump_target from the branches - returns with highest priority,
2428	breaks or continues lower.  If then branch is potentially constant and
2429	doesn't return, check the else branch if it could return, break or
2430	continue.
2431
24322021-01-21  Nathan Sidwell  <nathan@acm.org>
2433
2434	PR c++/98530
2435	* name-lookup.c (lookup_class_binding): Rearrange a stat-hack.
2436
24372021-01-20  Nathan Sidwell  <nathan@acm.org>
2438
2439	* module.cc (bytes_in::i, bytes_in::wi): Avoid left shift of
2440	signed type.
2441
24422021-01-20  Patrick Palka  <ppalka@redhat.com>
2443
2444	PR c++/95434
2445	* pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: If tsubsting
2446	CLASS_PLACEHOLDER_TEMPLATE yields a TEMPLATE_TEMPLATE_PARM,
2447	adjust to its TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
2448
24492021-01-20  Patrick Palka  <ppalka@redhat.com>
2450
2451	PR c++/82613
2452	* parser.c (cp_parser_class_head): Defer access checking when
2453	parsing the base-clause until all bases are seen and attached
2454	to the class type.
2455	* pt.c (instantiate_class_template): Likewise when substituting
2456	into dependent bases.
2457
24582021-01-20  Jakub Jelinek  <jakub@redhat.com>
2459
2460	PR c++/98742
2461	* semantics.c (finish_omp_clauses) <case OMP_CLAUSE_DETACH>: If
2462	error_operand_p, remove clause without further checking.  Check
2463	for non-NULL TYPE_NAME.
2464
24652021-01-19  Marek Polacek  <polacek@redhat.com>
2466
2467	PR c++/98659
2468	* pt.c (maybe_instantiate_noexcept): Return false if FN is
2469	error_mark_node.
2470
24712021-01-19  Marek Polacek  <polacek@redhat.com>
2472
2473	PR c++/98687
2474	* name-lookup.c (push_using_decl_bindings): New, broken out of...
2475	(finish_nonmember_using_decl): ...here.
2476	* name-lookup.h (push_using_decl_bindings): Update declaration.
2477	* pt.c (tsubst_expr): Update the call to push_using_decl_bindings.
2478
24792021-01-19  Patrick Palka  <ppalka@redhat.com>
2480
2481	PR c++/41437
2482	PR c++/58993
2483	* search.c (friend_accessible_p): If scope is a hidden friend
2484	defined inside a dependent class, consider access from the
2485	class.
2486	* parser.c (cp_parser_late_parsing_for_member): Don't push a
2487	dk_no_check access state.
2488
24892021-01-19  Marek Polacek  <polacek@redhat.com>
2490
2491	PR c++/98333
2492	* parser.c (cp_parser_class_specifier_1): Perform late-parsing
2493	of NSDMIs before late-parsing of noexcept-specifiers.
2494
24952021-01-19  Nathan Sidwell  <nathan@acm.org>
2496
2497	* module.cc (identifier): Merge overloads.
2498
24992021-01-19  Nathan Sidwell  <nathan@acm.org>
2500
2501	PR c++/98624
2502	* module.cc (trees_out::write_location): Make static.
2503
25042021-01-16  Kwok Cheung Yeung  <kcy@codesourcery.com>
2505
2506	* parser.c (cp_parser_omp_clause_detach): New.
2507	(cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH.
2508	(OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
2509	* pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
2510	* semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
2511	Prevent use of detach with mergeable and overriding the	data sharing
2512	mode of the event handle.
2513
25142021-01-15  Nathan Sidwell  <nathan@acm.org>
2515
2516	PR c++/98538
2517	* tree.c (cp_build_qualified_type_real): Propagate an array's
2518	dependentness to the copy, if known.
2519
25202021-01-15  Jason Merrill  <jason@redhat.com>
2521
2522	PR c++/98642
2523	* call.c (unsafe_return_slot_p): Return int.
2524	(init_by_return_slot_p): Split out from...
2525	(unsafe_copy_elision_p): ...here.
2526	(unsafe_copy_elision_p_opt): New name for old meaning.
2527	(build_over_call): Adjust.
2528	(make_safe_copy_elision): New.
2529	* typeck2.c (split_nonconstant_init_1): Elide copy from safe
2530	list-initialization.
2531	* cp-tree.h: Adjust.
2532
25332021-01-15  Jason Merrill  <jason@redhat.com>
2534
2535	* call.c (base_ctor_for, make_base_init_ok): New.
2536	(build_over_call): Use make_base_init_ok.
2537
25382021-01-15  Jason Merrill  <jason@redhat.com>
2539
2540	PR c++/63707
2541	* tree.c (build_vec_init_expr): Don't call build_vec_init_elt
2542	if we got a CONSTRUCTOR.
2543
25442021-01-15  Nathan Sidwell  <nathan@acm.org>
2545
2546	PR c++/98591
2547	* lang-specs.h: Fix handling of -fmodule-only with -fsyntax-only.
2548
25492021-01-14  Jason Merrill  <jason@redhat.com>
2550
2551	* typeck2.c (process_init_constructor_record): Use fldtype
2552	variable consistently.
2553
25542021-01-14  Nathan Sidwell  <nathan@acm.org>
2555
2556	PR c++/98372
2557	* tree.c (cp_tree_equal): Correct map_context logic.
2558
25592021-01-13  Marek Polacek  <polacek@redhat.com>
2560
2561	PR c++/98231
2562	* name-lookup.c (push_using_decl_bindings): New.
2563	* name-lookup.h (push_using_decl_bindings): Declare.
2564	* pt.c (tsubst_expr): Call push_using_decl_bindings.
2565
25662021-01-13  Nathan Sidwell  <nathan@acm.org>
2567
2568	PR c++/98626
2569	* module.cc (module_add_import_initializers):  Pass a
2570	zero-element argument vector.
2571
25722021-01-12  Patrick Palka  <ppalka@redhat.com>
2573
2574	PR c++/98611
2575	* tree.c (cp_walk_subtrees) <case TEMPLATE_TYPE_PARM>: Visit
2576	the template of a CTAD placeholder.
2577
25782021-01-12  Marek Polacek  <polacek@redhat.com>
2579
2580	PR c++/98620
2581	* typeck2.c (process_init_constructor_record): Don't emit
2582	-Wmissing-field-initializers warnings in unevaluated contexts.
2583
25842021-01-11  Jakub Jelinek  <jakub@redhat.com>
2585
2586	PR c++/98481
2587	* class.c (find_abi_tags_r): Set *walk_subtrees to 2 instead of 1
2588	for types.
2589	(mark_abi_tags_r): Likewise.
2590	* decl2.c (min_vis_r): Likewise.
2591	* tree.c (cp_walk_subtrees): If *walk_subtrees_p is 2, look through
2592	typedefs.
2593
25942021-01-08  Patrick Palka  <ppalka@redhat.com>
2595
2596	PR c++/98551
2597	* constexpr.c (cxx_eval_call_expression): Check CLASS_TYPE_P
2598	instead of AGGREGATE_TYPE_P before calling replace_result_decl.
2599
26002021-01-08  Patrick Palka  <ppalka@redhat.com>
2601
2602	PR c++/98515
2603	* semantics.c (check_accessibility_of_qualified_id): Punt if
2604	we're checking access of a scoped non-static member inside a
2605	class template.
2606
26072021-01-07  Jakub Jelinek  <jakub@redhat.com>
2608
2609	PR c++/98329
2610	* pt.c (tsubst_copy) <case BIT_CAST_EXPR>: Don't call
2611	cp_build_bit_cast here, instead just build_min a BIT_CAST_EXPR and set
2612	its location.
2613	(tsubst_copy_and_build): Handle BIT_CAST_EXPR.
2614
26152021-01-07  Marek Polacek  <polacek@redhat.com>
2616
2617	PR c++/98441
2618	* decl.c (grokdeclarator): Move the !funcdecl_p check inside the
2619	!late_return_type block.
2620
26212021-01-07  Jason Merrill  <jason@redhat.com>
2622
2623	* constexpr.c (cxx_bind_parameters_in_call): Add comment.
2624	(cxx_eval_store_expression): Add comment.
2625
26262021-01-07  Jason Merrill  <jason@redhat.com>
2627
2628	* call.c (has_next): Factor out from...
2629	(next_conversion): ...here.
2630	(strip_standard_conversion): And here.
2631	(is_subseq): And here.
2632	(build_conv): Check it.
2633	(standard_conversion): Don't call build_conv
2634	for ck_identity.
2635
26362021-01-06  Martin Sebor  <msebor@redhat.com>
2637
2638	PR c++/95768
2639	* error.c (dump_expr): Call c_pretty_printer::unary_expression.
2640
26412021-01-05  Patrick Palka  <ppalka@redhat.com>
2642
2643	* pt.c (unify) <case TEMPLATE_PARM_INDEX>: After walking into
2644	the type of the NTTP, substitute into the type again.  If the
2645	type is still dependent, don't unify the NTTP.
2646
26472021-01-05  Jakub Jelinek  <jakub@redhat.com>
2648
2649	* Make-lang.in (cc1plus-checksum, cc1plus$(exeext): Add
2650	$(CODYLIB) after $(BACKEND).
2651
26522021-01-05  Jakub Jelinek  <jakub@redhat.com>
2653
2654	PR c++/98469
2655	* constexpr.c (cxx_eval_constant_expression) <case BIT_CAST_EXPR>:
2656	Punt if lval is true.
2657	* semantics.c (cp_build_bit_cast): Call get_target_expr_sfinae on
2658	the result if it has a class type.
2659
26602021-01-05  Marek Polacek  <polacek@redhat.com>
2661
2662	PR c++/82099
2663	* pt.c (resolve_overloaded_unification): Call
2664	maybe_instantiate_noexcept after instantiating the function
2665	decl.
2666
26672021-01-05  Nathan Sidwell  <nathan@acm.org>
2668
2669	* parser.c (cp_parser_module_declaration): Alter diagnostic
2670	text to say where is permissable.
2671
26722021-01-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2673
2674	PR c++/98316
2675	* Make-lang.in (cc1plus$(exeext)): Add $(CODYLIB), $(NETLIBS).
2676
26772021-01-02  Jan Hubicka  <jh@suse.cz>
2678
2679	* cp-tree.h (cp_tree_c_finish_parsing): Declare.
2680	* decl2.c (c_parse_final_cleanups): Call cp_tree_c_finish_parsing.
2681	* tree.c (cp_tree_c_finish_parsing): New function.
2682
26832021-01-01  Jakub Jelinek  <jakub@redhat.com>
2684
2685	* ChangeLog-2020: Rotate ChangeLog.  New file.
2686
2687
2688Copyright (C) 2021 Free Software Foundation, Inc.
2689
2690Copying and distribution of this file, with or without modification,
2691are permitted in any medium without royalty provided the copyright
2692notice and this notice are preserved.
2693