aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/ChangeLog
blob: 9131726620e965d369d062698cfbb4e0918e4b21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
2022-02-01  Jason Merrill  <jason@redhat.com>

	PR c++/103186
	* pt.cc (defarg_inst): Use tree_vec_map_cache_hasher.
	(defarg_insts_for): New.
	(tsubst_default_argument): Adjust.

2022-01-31  Marek Polacek  <polacek@redhat.com>

	PR c++/102414
	PR c++/101874
	* decl.cc (create_array_type_for_decl): Use template_placeholder_p.
	Sorry on a variable-length array of auto.

2022-01-31  Marek Polacek  <polacek@redhat.com>

	PR c++/102434
	* class.cc (finish_struct): Don't allow union initializer_list.

2022-01-31  Patrick Palka  <ppalka@redhat.com>

	PR c++/104294
	* pt.cc (ctor_deduction_guides_for): Correct computation of
	outer_args.

2022-01-31  Patrick Palka  <ppalka@redhat.com>

	PR c++/104291
	* pt.cc (for_each_template_parm_r) <case CONSTRUCTOR>: Clear
	walk_subtrees if !include_nondeduced_p.  Simplify given that
	cp_walk_subtrees already walks TYPE_PTRMEMFUNC_FN_TYPE_RAW.

2022-01-28  Patrick Palka  <ppalka@redhat.com>
	    Jason Merrill  <jason@redhat.com>

	PR c++/92752
	* typeck.cc (build_ptrmemfunc): Cast a nullptr constant to the
	unqualified pointer type not the qualified one.

2022-01-28  Patrick Palka  <ppalka@redhat.com>

	PR c++/103341
	* decl.cc (cp_finish_decl): Pass the template arguments of a
	variable template specialization or a templated static data
	member to do_auto_deduction when the auto is constrained.

2022-01-28  Jason Merrill  <jason@redhat.com>

	PR c++/100198
	PR c++/100030
	PR c++/100282
	* parser.cc (cp_parser_enumerator_definition): Sorry on parameter
	pack in lambda.
	(cp_parser_class_head): And in class attributes.
	* pt.cc (check_for_bare_parameter_packs): Sorry instead of error
	in lambda.

2022-01-27  Jason Merrill  <jason@redhat.com>

	PR c++/104245
	PR c++/51344
	* decl2.cc (save_template_attributes): Take late attrs as parm.
	(cplus_decl_attributes): Call it after decl_attributes,
	splice_template_attributes before.

2022-01-27  Patrick Palka  <ppalka@redhat.com>

	PR c++/99895
	* call.cc (build_over_call): For a non-dependent member call,
	build up a CALL_EXPR using a COMPONENT_REF callee, as in
	build_new_method_call.
	* pt.cc (build_non_dependent_expr): Don't wrap PARM_DECL either.
	* tree.cc (build_min_non_dep_op_overload): Adjust accordingly
	after the build_over_call change.

2022-01-27  Patrick Palka  <ppalka@redhat.com>

	PR c++/92944
	PR c++/103678
	* parser.cc (cp_parser_class_head): Update 'type' with the result
	of maybe_process_partial_specialization in the
	nested_name_specifier branch.  Refactor nearby code to accomodate
	that maybe_process_partial_specialization returns a _TYPE, not a
	TYPE_DECL, and eliminate local variable 'class_type' in passing.

2022-01-27  Marek Polacek  <polacek@redhat.com>

	PR c++/101988
	* decl.cc (create_array_type_for_decl): Reject forming an array of
	placeholder for a deduced class type.

2022-01-26  Jason Merrill  <jason@redhat.com>

	PR c++/104206
	PR c++/101072
	* semantics.cc (finish_compound_literal): Restore VECTOR_TYPE check.

2022-01-26  Jakub Jelinek  <jakub@redhat.com>

	PR c++/104226
	* constexpr.cc (init_subob_ctx): For vector ctors containing
	vector elements, ensure appending to the same ctor instead of
	creating another one.

2022-01-26  Marek Polacek  <polacek@redhat.com>

	PR target/104213
	* decl.cc (finish_constructor_body): Suppress -Wuse-after-free.
	(finish_destructor_body): Likewise.
	* optimize.cc (build_delete_destructor_body): Likewise.

2022-01-26  Jason Merrill  <jason@redhat.com>

	PR c++/104235
	* parser.cc (cp_parser_template_name): Repeat lookup of USING_DECL.

2022-01-26  Jason Merrill  <jason@redhat.com>

	PR c++/103057
	* pt.cc (tsubst_aggr_type): Call tsubst for alias template
	specialization.

2022-01-25  Patrick Palka  <ppalka@redhat.com>

	PR c++/101532
	PR c++/104225
	* decl2.cc (mark_used): Don't consider maybe_instantiate_noexcept
	on a deleted function.

2022-01-25  Jason Merrill  <jason@redhat.com>

	PR c++/59950
	* call.cc (build_over_call): Use cp_build_indirect_ref.

2022-01-24  Patrick Palka  <ppalka@redhat.com>

	PR c++/104197
	* pt.cc (make_auto_1): Use -1 as a placeholder default argument
	for level.

2022-01-24  Patrick Palka  <ppalka@redhat.com>

	PR c++/104173
	* typeck.cc (build_class_member_access_expr): Extend
	unary_complex_lvalue result adjustment to preserve all
	rvalues, not just xvalues.

2022-01-23  Will Wray  <wjwray@gmail.com>

	PR c++/55227
	* decl.cc (reshape_init_r): Only call has_designator_check when
	first_initializer_p or for the inner constructor element.
	(cp_complete_array_type): Call reshape_init on braced-init-list.

2022-01-23  Jason Merrill  <jason@redhat.com>

	PR c++/104182
	* cp-gimplify.cc (cp_genericize_target_expr): Make sure nothing
	has set DECL_INITIAL on a TARGET_EXPR slot.
	* tree.cc (is_local_temp): Don't check DECL_CONTEXT.

2022-01-23  Jason Merrill  <jason@redhat.com>

	PR c++/101072
	* cp-tree.h (build_implicit_conv_flags): Declare.
	* call.cc (build_implicit_conv_flags): Split out from...
	(perform_implicit_conversion_flags): ...here.
	* decl.cc (check_initializer): Use it.
	* pt.cc (tsubst_copy_and_build): Remove TARGET_EXPR handling.
	* semantics.cc (finish_compound_literal): Don't treat
	scalar values like CONSTRUCTORs.

2022-01-21  Jason Merrill  <jason@redhat.com>

	* semantics.cc (find_failing_clause): Return expr if not
	decomposable.
	(finish_static_assert): Show constant values in failing
	comparison.

2022-01-21  Jason Merrill  <jason@redhat.com>

	PR c++/104084
	PR c++/20040
	* init.cc (build_new_1): Only pull out TARGET_EXPR_INITIAL if
	alloc_expr is a TARGET_EXPR.

2022-01-21  Marek Polacek  <polacek@redhat.com>

	PR c++/101715
	* tree.cc (fixup_deferred_exception_variants): Remove duplicate
	variants after parsing the exception specifications.

2022-01-21  Jason Merrill  <jason@redhat.com>

	PR c++/104139
	PR c++/103681
	* class.cc (end_of_class): Use base_binfo.

2022-01-20  Jason Merrill  <jason@redhat.com>

	PR c++/101405
	* decl.cc (reshape_init_class): Reject designator for a member of
	another class.

2022-01-20  Patrick Palka  <ppalka@redhat.com>

	PR c++/91911
	PR c++/103672
	* pt.cc (keep_template_parm): Punt on a level 0 template parm.
	(tsubst_decl) <case VAR_DECL>: Remove !CHECKING_P safeguard.
	(tsubst) <case TEMPLATE_TYPE_PARM>: Handle CTAD placeholders
	specially.
	(make_auto_1): Add defaulted 'level' parameter.
	(make_template_placeholder): Pass 0 as 'level' to make_auto_1.

2022-01-20  Patrick Palka  <ppalka@redhat.com>

	* decl.cc (grokdeclarator): Diagnose a CTAD placeholder as
	function return type even when !funcdecl_p.

2022-01-20  Martin Liska  <mliska@suse.cz>

	PR c++/104134
	* error.cc (dump_aggr_type): Partially disable the warning.

2022-01-20  Jason Merrill  <jason@redhat.com>

	PR c++/102300
	* parser.cc (cp_parser_template_name): Use dependent_scope_p.

2022-01-19  David Malcolm  <dmalcolm@redhat.com>

	* cp-lang.cc (selftest::run_cp_tests): Update calls for .c to .cc
	renaming.
	* cp-tree.h (cp_pt_c_tests): Rename to...
	(cp_pt_cc_tests): ...this.
	(cp_tree_c_tests): Rename to...
	(cp_tree_cc_tests): ...this.
	* pt.cc (cp_pt_c_tests): Rename to...
	(cp_pt_cc_tests): ...this.
	* tree.cc (cp_tree_c_tests): Rename to...
	(cp_tree_cc_tests): ...this.

2022-01-19  Jason Merrill  <jason@redhat.com>

	* parser.cc (saved_token_sentinel::rollback): Use
	cp_lexer_previous_token.

2022-01-18  Jakub Jelinek  <jakub@redhat.com>

	PR c++/104055
	* constexpr.cc (cxx_eval_outermost_constant_expr): If t is a
	TARGET_EXPR with TARGET_EXPR_CLEANUP, use get_target_expr rather
	than get_target_expr_sfinae with tf_no_cleanup, and don't set
	TREE_CONSTANT.

2022-01-18  Jason Merrill  <jason@redhat.com>
	    Jakub Jelinek   <jakub@redhat.com>

	PR c++/104025
	* parser.cc (saved_token_sentinel::rollback): Call
	cp_lexer_set_source_position.
	(~saved_token_sentinel): Call rollback.

2022-01-18  Patrick Palka  <ppalka@redhat.com>

	PR c++/104074
	* pt.cc (invalid_nontype_parm_type_p): Use WILDCARD_TYPE_P so
	that we return false for DEPENDENT_OPERATOR_TYPE too.

2022-01-17  Martin Liska  <mliska@suse.cz>

	* Make-lang.in: Rename .c names to .cc.
	* config-lang.in: Likewise.
	* constexpr.cc (cxx_eval_constant_expression): Likewise.
	* coroutines.cc (morph_fn_to_coro): Likewise.
	* cp-gimplify.cc (cp_gimplify_expr): Likewise.
	* cp-lang.cc (struct lang_hooks): Likewise.
	(get_template_argument_pack_elems_folded): Likewise.
	* cp-objcp-common.cc (cp_tree_size): Likewise.
	(cp_unit_size_without_reusable_padding): Likewise.
	(pop_file_scope): Likewise.
	(cp_pushdecl): Likewise.
	* cp-objcp-common.h (GCC_CP_OBJCP_COMMON): Likewise.
	(cxx_simulate_record_decl): Likewise.
	* cp-tree.h (struct named_label_entry): Likewise.
	(current_function_return_value): Likewise.
	(more_aggr_init_expr_args_p): Likewise.
	(get_function_version_dispatcher): Likewise.
	(common_enclosing_class): Likewise.
	(strip_fnptr_conv): Likewise.
	(current_decl_namespace): Likewise.
	(do_aggregate_paren_init): Likewise.
	(cp_check_const_attributes): Likewise.
	(qualified_name_lookup_error): Likewise.
	(generic_targs_for): Likewise.
	(mark_exp_read): Likewise.
	(is_global_friend): Likewise.
	(maybe_reject_flexarray_init): Likewise.
	(module_token_lang): Likewise.
	(handle_module_option): Likewise.
	(literal_integer_zerop): Likewise.
	(build_extra_args): Likewise.
	(build_if_nonnull): Likewise.
	(maybe_check_overriding_exception_spec): Likewise.
	(finish_omp_target_clauses): Likewise.
	(maybe_warn_zero_as_null_pointer_constant): Likewise.
	(cxx_print_error_function): Likewise.
	(decl_in_std_namespace_p): Likewise.
	(merge_exception_specifiers): Likewise.
	(mangle_module_global_init): Likewise.
	(cxx_block_may_fallthru): Likewise.
	(fold_builtin_source_location): Likewise.
	(enum cp_oracle_request): Likewise.
	(subsumes): Likewise.
	(cp_finish_injected_record_type): Likewise.
	(vtv_build_vtable_verify_fndecl): Likewise.
	(cp_tree_c_finish_parsing): Likewise.
	* cvt.cc (diagnose_ref_binding): Likewise.
	(convert_to_void): Likewise.
	(convert_force): Likewise.
	(type_promotes_to): Likewise.
	* decl.cc (make_unbound_class_template_raw): Likewise.
	(cxx_init_decl_processing): Likewise.
	(check_class_member_definition_namespace): Likewise.
	(cxx_maybe_build_cleanup): Likewise.
	* decl2.cc (maybe_emit_vtables): Likewise.
	* error.cc (dump_function_name): Likewise.
	* init.cc (is_class_type): Likewise.
	(build_new_1): Likewise.
	* lang-specs.h: Likewise.
	* method.cc (make_alias_for_thunk): Likewise.
	* module.cc (specialization_add): Likewise.
	(module_state::read_cluster): Likewise.
	* name-lookup.cc (check_extern_c_conflict): Likewise.
	* name-lookup.h (struct cxx_binding): Likewise.
	* parser.cc (cp_parser_identifier): Likewise.
	* parser.h (struct cp_parser): Likewise.
	* pt.cc (has_value_dependent_address): Likewise.
	(push_tinst_level_loc): Likewise.
	* semantics.cc (finish_omp_clauses): Likewise.
	(finish_omp_atomic): Likewise.
	* tree.cc (cp_save_expr): Likewise.
	(cp_free_lang_data): Likewise.
	* typeck.cc (cp_common_type): Likewise.
	(strip_array_domain): Likewise.
	(rationalize_conditional_expr): Likewise.
	(check_return_expr): Likewise.
	* vtable-class-hierarchy.cc: Likewise.

2022-01-17  Martin Liska  <mliska@suse.cz>

	* call.c: Moved to...
	* call.cc: ...here.
	* class.c: Moved to...
	* class.cc: ...here.
	* constexpr.c: Moved to...
	* constexpr.cc: ...here.
	* cp-gimplify.c: Moved to...
	* cp-gimplify.cc: ...here.
	* cp-lang.c: Moved to...
	* cp-lang.cc: ...here.
	* cp-objcp-common.c: Moved to...
	* cp-objcp-common.cc: ...here.
	* cp-ubsan.c: Moved to...
	* cp-ubsan.cc: ...here.
	* cvt.c: Moved to...
	* cvt.cc: ...here.
	* cxx-pretty-print.c: Moved to...
	* cxx-pretty-print.cc: ...here.
	* decl.c: Moved to...
	* decl.cc: ...here.
	* decl2.c: Moved to...
	* decl2.cc: ...here.
	* dump.c: Moved to...
	* dump.cc: ...here.
	* error.c: Moved to...
	* error.cc: ...here.
	* except.c: Moved to...
	* except.cc: ...here.
	* expr.c: Moved to...
	* expr.cc: ...here.
	* friend.c: Moved to...
	* friend.cc: ...here.
	* g++spec.c: Moved to...
	* g++spec.cc: ...here.
	* init.c: Moved to...
	* init.cc: ...here.
	* lambda.c: Moved to...
	* lambda.cc: ...here.
	* lex.c: Moved to...
	* lex.cc: ...here.
	* mangle.c: Moved to...
	* mangle.cc: ...here.
	* method.c: Moved to...
	* method.cc: ...here.
	* name-lookup.c: Moved to...
	* name-lookup.cc: ...here.
	* optimize.c: Moved to...
	* optimize.cc: ...here.
	* parser.c: Moved to...
	* parser.cc: ...here.
	* pt.c: Moved to...
	* pt.cc: ...here.
	* ptree.c: Moved to...
	* ptree.cc: ...here.
	* rtti.c: Moved to...
	* rtti.cc: ...here.
	* search.c: Moved to...
	* search.cc: ...here.
	* semantics.c: Moved to...
	* semantics.cc: ...here.
	* tree.c: Moved to...
	* tree.cc: ...here.
	* typeck.c: Moved to...
	* typeck.cc: ...here.
	* typeck2.c: Moved to...
	* typeck2.cc: ...here.
	* vtable-class-hierarchy.c: Moved to...
	* vtable-class-hierarchy.cc: ...here.

2022-01-17  Jakub Jelinek  <jakub@redhat.com>

	PR c++/104031
	* cp-gimplify.c (cp_genericize_target_expr): Set DECL_CONTEXT of
	TARGET_EXPR_SLOT to current_function_decl if it was NULL.

2022-01-17  Andrew Stubbs  <ams@codesourcery.com>

	* parser.c (cp_parser_omp_requires): Don't "sorry" dynamic_allocators.

2022-01-14  Chung-Lin Tang  <cltang@codesourcery.com>

	PR c++/103705
	* semantics.c (finish_omp_clauses): Also continue peeling off of
	outer node for ARRAY_REFs.

2022-01-14  Jakub Jelinek  <jakub@redhat.com>

	PR c++/103991
	* cp-objcp-common.c (cxx_block_may_fallthru) <case IF_STMT>: For
	IF_STMT_CONSTEXPR_P with constant false or true condition only
	check if the taken clause may fall through.
	* cp-gimplify.c (genericize_if_stmt): For consteval if, revert
	to r12-5638^ behavior if then_ block can't fall through.  For
	constexpr if, revert to r12-5638^ behavior.

2022-01-13  Anthony Sharp  <anthonysharp15@gmail.com>
	    Jason Merrill  <jason@redhat.com>

	PR c++/70417
	* parser.c (cp_parser_id_expression): Handle
	-Wmissing-template-keyword.
	(struct saved_token_sentinel): Add modes to control what happens
	on destruction.
	(cp_parser_statement): Adjust.
	(cp_parser_skip_entire_template_parameter_list): New function that
	skips an entire template parameter list.
	(cp_parser_require_end_of_template_parameter_list): Rename old
	cp_parser_skip_to_end_of_template_parameter_list.
	(cp_parser_skip_to_end_of_template_parameter_list): Refactor to be
	called from one of the above two functions.
	(cp_parser_lambda_declarator_opt)
	(cp_parser_explicit_template_declaration)
	(cp_parser_enclosed_template_argument_list): Adjust.

2022-01-12  Jakub Jelinek  <jakub@redhat.com>
	    Jason Merrill  <jason@redhat.com>

	PR c++/103480
	* tree.c (move): If expr is xvalue_p, just return expr without
	build_static_cast.

2022-01-11  Jakub Jelinek  <jakub@redhat.com>

	PR c++/101597
	* class.c (build_vfn_ref): Build OBJ_TYPE_REF with INTEGER_CST
	OBJ_TYPE_REF_TOKEN with type equal to OBJ_TYPE_REF_OBJECT type.
	* error.c (resolve_virtual_fun_from_obj_type_ref): Use type of
	OBJ_TYPE_REF_TOKEN rather than type of OBJ_TYPE_REF_OBJECT as
	obj_type.

2022-01-11  Patrick Palka  <ppalka@redhat.com>

	PR c++/103831
	* call.c (build_new_method_call): Consider dependent bases only
	if 'this' is available.

2022-01-11  Olivier Hainque  <hainque@adacore.com>

	* decl.c (cxx_init_decl_processing): Move code possibly
	altering flag_weak before code testing it.

2022-01-10  Patrick Palka  <ppalka@redhat.com>

	PR c++/103879
	* constexpr.c (cxx_fold_indirect_ref): Split out object/offset
	canonicalization step into a local lambda.  Strengthen it to
	absorb more components at position 0.  Use it before both calls
	to cxx_fold_indirect_ref_1.

2022-01-10  Patrick Palka  <ppalka@redhat.com>

	PR c++/103783
	* call.c (cand_parms_match): Skip over 'this' when given one
	static and one non-static member function.

2022-01-10  Jakub Jelinek  <jakub@redhat.com>

	PR c++/103912
	* semantics.c (expand_or_defer_fn): For immediate functions, set
	node->body_removed to true and clear analyzed, definition and
	force_output.
	* decl2.c (c_parse_final_cleanups): Ignore immediate functions for
	expand_or_defer_fn.

2022-01-08  Jakub Jelinek  <jakub@redhat.com>

	PR c++/89074
	* constexpr.c (cxx_maybe_fold_addr_pointer_plus): New function.
	(cxx_eval_binary_expression): Use it.

2022-01-08  Jason Merrill  <jason@redhat.com>

	PR c++/103946
	* init.c (build_vec_init): Remove assert.
	* tree.c (build_vec_init_expr): Likewise.

2022-01-08  Jason Merrill  <jason@redhat.com>

	PR c++/100588
	* call.c (build_op_delete_call): Ignore destroying delete
	if alloc_fn.

2022-01-07  Jason Merrill  <jason@redhat.com>

	PR c++/20040
	* init.c (build_new_1): Also build pointer cleanup if
	TYPE_GETS_DELETE.
	* cp-tree.h (TYPE_GETS_VEC_DELETE): New.

2022-01-07  Jason Merrill  <jason@redhat.com>

	PR c++/103936
	PR c++/65591
	* cp-gimplify.c (cp_gimplify_expr): Restore VEC_INIT_EXPR handling.

2022-01-07  Jason Merrill  <jason@redhat.com>

	PR c++/103711
	* init.c (perform_target_ctor): Select destructor by in_chrg.

2022-01-07  Jason Merrill  <jason@redhat.com>

	PR c++/61611
	* except.c (in_nested_catch): New.
	(expand_end_catch_block): Check it.

2022-01-07  Jason Merrill  <jason@redhat.com>

	PR c++/33799
	PR c++/102191
	* except.c (maybe_splice_retval_cleanup): Check
	current_binding_level.
	* semantics.c (do_poplevel): Call it here.
	* parser.c (cp_parser_compound_statement): Not here.

2022-01-07  Jason Merrill  <jason@redhat.com>

	PR c++/53868
	* decl.c (cp_finish_decl): Use wrap_temporary_cleanups for
	cleanups from set_up_extended_ref_temp.
	(wrap_temporary_cleanups): Ignore array cleanups.
	(initialize_local_var): Don't check for array here.
	* cp-tree.h (BIND_EXPR_VEC_DTOR): New.
	* init.c (build_vec_delete_1): Set it.

2022-01-07  Jason Merrill  <jason@redhat.com>

	PR c++/66451
	* init.c (build_vec_delete_1): Handle throwing dtor.
	(build_vec_init): Tell it we're in a cleanup already.

2022-01-07  Jason Merrill  <jason@redhat.com>

	* typeck2.c (split_nonconstant_init_1): Don't cleanup the last elt.
	(split_nonconstant_init): Adjust.

2022-01-07  Jason Merrill  <jason@redhat.com>

	PR c++/66139
	PR c++/52320
	* constexpr.c (replace_decl): Rename from replace_result_decl.
	* cp-tree.h (replace_decl): Declare it.
	* cp-gimplify.c (cp_gimplify_init_expr): Call it.
	(cp_gimplify_expr): Don't handle VEC_INIT_EXPR.
	(cp_genericize_init, cp_genericize_init_expr)
	(cp_genericize_target_expr): New.
	(cp_fold_r): Call them.
	* tree.c (build_array_copy): Add a TARGET_EXPR.
	* typeck2.c (digest_init_r): Look through a TARGET_EXPR.

2022-01-07  Jason Merrill  <jason@redhat.com>

	PR c++/94041
	* decl.c (initialize_local_var): Fix comment.
	* init.c (build_new_1): Do stabilize array init.
	(build_vec_init): Use TARGET_EXPR for cleanup.  Initialization
	of an element from an explicit initializer is not a
	full-expression.
	* tree.c (expand_vec_init_expr): Pass flags through.
	* typeck2.c (split_nonconstant_init_1): Handle VEC_INIT_EXPR.
	(split_nonconstant_init): Handle array cleanups.
	* cp-tree.h: Adjust.

2022-01-07  Jason Merrill  <jason@redhat.com>

	PR c++/94041
	* decl.c (check_initializer): Remove obsolete comment.
	(wrap_cleanups_r): Don't wrap CLEANUP_EH_ONLY.
	(initialize_local_var): Change assert to test.
	* typeck2.c (maybe_push_temp_cleanup): New.
	(split_nonconstant_init_1): Use it.
	(split_nonconstant_init): Clear cleanup flags.

2022-01-07  Jason Merrill  <jason@redhat.com>

	PR c++/92385
	* typeck2.c (PICFLAG_VEC_INIT): New.
	(process_init_constructor_array): Set it.
	(process_init_constructor): Handle it.
	(split_nonconstant_init_1): Handle VEC_INIT_EXPR.
	* init.c (build_vec_init): Likewise.
	* cp-gimplify.c (cp_gimplify_expr): Factor out...
	* tree.c (expand_vec_init_expr): ...this function.
	(build_vec_init_elt): Handle BRACE_ENCLOSED_INITIALIZER_P.
	(build_vec_init_expr): Likewise.
	* constexpr.c (cxx_eval_vec_init): Likewise.
	(reduced_constant_expression_p): Check arrays before C++20.
	* cp-tree.h (expand_vec_init_expr): Declare.

2022-01-07  Jason Merrill  <jason@redhat.com>

	* init.c (build_new_1): Remove preevaluation code.

2022-01-05  Nathan Sidwell  <nathan@acm.org>

	* pt.c (instantiate_class_template_1): Process attribute((used)) set
	in class's context.

2022-01-05  Nathan Sidwell  <nathan@acm.org>

	* init.c (build_new_1): Check complain before alignment warning.

2022-01-04  Jason Merrill  <jason@redhat.com>

	* cp-tree.h (class releasing_vec): Add begin/end fns.

2022-01-04  Jason Merrill  <jason@redhat.com>

	* init.c: Include -*- C++ -*- on first line.

2022-01-03  Marek Polacek  <polacek@redhat.com>

	PR c++/103758
	* parser.c (cp_parser_decl_specifier_seq): Replace %<decl-specifier%>
	with %qD.

2022-01-03  Marek Polacek  <polacek@redhat.com>

	* parser.c (make_char_string_pack): Add a cast to const unsigned
	char *.

2022-01-03  Jakub Jelinek  <jakub@redhat.com>

	PR c++/103600
	* rtti.c (get_tinfo_decl_direct): Add "non overlapping" attribute
	to DECL_TINFO_P VAR_DECLs.

2022-01-02  Jason Merrill  <jason@redhat.com>

	* init.c (build_vec_init): Append the decrement to elt_init.

2022-01-02  Jason Merrill  <jason@redhat.com>

	* decl.c (wrap_cleanups_r): Don't wrap if noexcept.


Copyright (C) 2022 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.