12024-06-20  Release Manager
2
3          * GCC 12.4.0 released.
4
52024-06-11  Jakub Jelinek  <jakub@redhat.com>
6
7          Backported from master:
8          2024-04-12  Jakub Jelinek  <jakub@redhat.com>
9
10          PR c++/114691
11          * semantics.cc (simplify_loop_decl_cond): Use cp_build_unary_op with
12          TRUTH_NOT_EXPR on ANNOTATE_EXPR argument (if any) rather than
13          ANNOTATE_EXPR itself.
14
152024-06-11  Jakub Jelinek  <jakub@redhat.com>
16
17          Backported from master:
18          2024-04-09  Jakub Jelinek  <jakub@redhat.com>
19
20          PR c++/114580
21          * semantics.cc (finish_if_stmt_cond): Call
22          maybe_warn_for_constant_evaluated with IF_STMT_CONSTEXPR_P (if_stmt)
23          as the second argument, rather than true/false depending on if
24          it is if constexpr with non-dependent constant expression with
25          bool type.
26
272024-06-11  Jakub Jelinek  <jakub@redhat.com>
28
29          Backported from master:
30          2024-04-05  Jakub Jelinek  <jakub@redhat.com>
31
32          PR c++/114572
33          * cp-gimplify.cc (cxx_omp_clause_apply_fn): Call build_cplus_new
34          on build_call_a result if it has class type.
35
362024-05-24  Jason Merrill  <jason@redhat.com>
37
38          Backported from master:
39          2024-03-28  Jason Merrill  <jason@redhat.com>
40
41          PR c++/100667
42          * semantics.cc (same_type_ref_bind_p): New.
43          (finish_trait_expr): Use it.
44
452024-05-24  Jason Merrill  <jason@redhat.com>
46
47          * pt.cc (tsubst_copy_and_build): Move ANNOTATE_EXPR out of
48          fallthrough path.
49
502024-05-24  Jason Merrill  <jason@redhat.com>
51
52          Backported from master:
53          2023-09-22  Jason Merrill  <jason@redhat.com>
54
55          PR c++/111529
56          * parser.cc (cp_parser_lambda_declarator_opt): Don't suggest
57          -std=c++14 for lambda templates.
58          * pt.cc (tsubst_expr): Move ANNOTATE_EXPR handling...
59          (tsubst_copy_and_build): ...here.
60
612024-05-24  Jason Merrill  <jason@redhat.com>
62
63          Backported from master:
64          2024-01-25  Jason Merrill  <jason@redhat.com>
65
66          PR c++/113598
67          * init.cc (build_vec_init): Don't use {} for PMF.
68
692024-05-24  Jason Merrill  <jason@redhat.com>
70
71          Backported from master:
72          2024-04-02  Jason Merrill  <jason@redhat.com>
73
74          PR c++/114561
75          PR c++/114562
76          * call.cc (convert_like_internal): Avoid adding qualification
77          conversion in direct reference binding.
78
792024-05-08  Andrew Pinski  <quic_apinski@quicinc.com>
80
81          Backported from master:
82          2024-05-07  Andrew Pinski  <quic_apinski@quicinc.com>
83
84          PR c++/89224
85          * constexpr.cc (cxx_eval_array_reference): Compare main variants
86          for the vector/array types instead of the types directly.
87
882024-04-12  Iain Sandoe  <iain@sandoe.co.uk>
89
90          Backported from master:
91          2022-12-23  Iain Sandoe  <iain@sandoe.co.uk>
92
93          * g++spec.cc (lang_specific_driver): Preserve -static-libstdc++ in
94          the driver command line for targets without -Bstatic/dynamic support
95          in their static linker.
96
972024-02-06  Jason Merrill  <jason@redhat.com>
98
99          Backported from master:
100          2024-02-06  Jason Merrill  <jason@redhat.com>
101
102          PR c++/107291
103          * method.cc (early_check_defaulted_comparison): Fail if not friend.
104
1052024-02-05  Jason Merrill  <jason@redhat.com>
106
107          Backported from master:
108          2024-02-05  Jason Merrill  <jason@redhat.com>
109
110          PR c++/111286
111          * tree.cc (rvalue): Don't drop cv-quals from an array.
112
1132024-02-02  Jason Merrill  <jason@redhat.com>
114
115          Backported from master:
116          2024-02-02  Jason Merrill  <jason@redhat.com>
117
118          PR c++/110084
119          * pt.cc (tsubst_function_decl): Only check a function defaulted
120          outside the class if the class is complete.
121
1222024-02-01  Marek Polacek  <polacek@redhat.com>
123
124          Backported from master:
125          2024-02-01  Marek Polacek  <polacek@redhat.com>
126
127          PR c++/112437
128          * typeck.cc (treat_lvalue_as_rvalue_p): Bail out on sk_namespace in
129          the move on throw of parms loop.
130
1312024-01-24  Jason Merrill  <jason@redhat.com>
132
133          Backported from master:
134          2024-01-24  Jason Merrill  <jason@redhat.com>
135
136          PR c++/113347
137          * semantics.cc (finalize_nrv_r): Handle null
138          current_retval_sentinel.
139
1402024-01-24  Jason Merrill  <jason@redhat.com>
141
142          Backported from master:
143          2023-12-20  Jason Merrill  <jason@redhat.com>
144
145          PR c++/103185
146          * typeck.cc (cp_build_array_ref): Handle swapped operands.
147
1482024-01-24  Jason Merrill  <jason@redhat.com>
149
150          Backported from master:
151          2023-12-20  Jason Merrill  <jason@redhat.com>
152
153          PR c++/113088
154          PR c++/33799
155          * except.cc (maybe_splice_retval_cleanup): Handle an empty block.
156
1572024-01-24  Jason Merrill  <jason@redhat.com>
158
159          Backported from master:
160          2023-08-31  Jason Merrill  <jason@redhat.com>
161
162          PR c++/92407
163          * cp-tree.h (struct language_function): Add backward_goto.
164          * decl.cc (check_goto): Set it.
165          * typeck.cc (check_return_expr): Prevent NRV if set.
166
1672024-01-15  Patrick Palka  <ppalka@redhat.com>
168
169          Backported from master:
170          2024-01-15  Patrick Palka  <ppalka@redhat.com>
171
172          PR c++/109899
173          * init.cc (build_vec_delete_1): Assume expr_noexcept_p returns
174          false in a template context.
175
1762023-12-24  Patrick Palka  <ppalka@redhat.com>
177
178          Backported from master:
179          2023-09-22  Patrick Palka  <ppalka@redhat.com>
180
181          PR c++/111485
182          * pt.cc (is_compatible_template_arg): New parameter 'args'.
183          Add the outer template arguments 'args' to 'new_args'.
184          (convert_template_argument): Pass 'args' to
185          is_compatible_template_arg.
186
1872023-12-20  Patrick Palka  <ppalka@redhat.com>
188
189          Backported from master:
190          2023-04-25  Patrick Palka  <ppalka@redhat.com>
191
192          PR c++/108975
193          * pt.cc (value_dependent_expression_p) <case VAR_DECL>:
194          Suppress conservative early exit for reference variables
195          when DECL_HAS_VALUE_EXPR_P.
196
1972023-12-16  Jakub Jelinek  <jakub@redhat.com>
198
199          Backported from master:
200          2023-12-08  Jakub Jelinek  <jakub@redhat.com>
201
202          PR sanitizer/112727
203          * cp-gimplify.cc (cp_fold): If SAVE_EXPR has been previously
204          folded, unshare_expr what is returned.
205
2062023-12-16  Jakub Jelinek  <jakub@redhat.com>
207
208          Backported from master:
209          2023-12-04  Jakub Jelinek  <jakub@redhat.com>
210
211          PR c++/112795
212          * parser.cc (cp_parser_pragma_unroll): Use fold_non_dependent_expr
213          instead of maybe_constant_value.
214
2152023-11-27  Patrick Palka  <ppalka@redhat.com>
216
217          Backported from master:
218          2023-11-16  Patrick Palka  <ppalka@redhat.com>
219
220          PR c++/111703
221          PR c++/107939
222          * constexpr.cc (potential_constant_expression_1) <case CALL_EXPR>:
223          Fix FUNCTION_POINTER_TYPE_P test.
224
2252023-11-27  Patrick Palka  <ppalka@redhat.com>
226
227          Backported from master:
228          2023-11-15  Patrick Palka  <ppalka@redhat.com>
229
230          PR c++/111703
231          PR c++/112269
232          * constexpr.cc (potential_constant_expression_1) <case VAR_DECL>:
233          Only consider var_in_maybe_constexpr_fn if 'now' is false.
234          <case INDIRECT_REF>: Likewise.
235
2362023-11-17  Jason Merrill  <jason@redhat.com>
237
238          PR c++/112301
239          PR c++/102191
240          PR c++/33799
241          * except.cc (maybe_splice_retval_cleanup): Clear
242          current_retval_sentinel when destroying retval.
243          * semantics.cc (nrv_data): Add in_nrv_cleanup.
244          (finalize_nrv): Set it.
245          (finalize_nrv_r): Fix handling of throwing cleanups.
246
2472023-11-17  Jason Merrill  <jason@redhat.com>
248
249          * semantics.cc (finalize_nrv_r): [RETURN_EXPR]: Only replace the
250          INIT_EXPR.
251
2522023-11-17  Jason Merrill  <jason@redhat.com>
253
254          PR c++/33799
255          * except.cc (maybe_splice_retval_cleanup): Change
256          recognition of function body and try scopes.
257          * semantics.cc (do_poplevel): Call it after poplevel.
258          (at_try_scope): New.
259          * cp-tree.h (maybe_splice_retval_cleanup): Adjust.
260
2612023-08-11  Jason Merrill  <jason@redhat.com>
262
263          PR c++/106310
264          * parser.cc (cp_parser_template_name): Skip non-member
265          lookup after the template keyword.
266          (cp_parser_lookup_name): Pass down template_keyword_p.
267
2682023-08-11  Jason Merrill  <jason@redhat.com>
269
270          PR c++/106890
271          PR c++/109666
272          * name-lookup.cc (maybe_push_to_top_level)
273          (maybe_pop_from_top_level): Split out...
274          * pt.cc (instantiate_body): ...from here.
275          * init.cc (maybe_instantiate_nsdmi_init): Use them.
276          * name-lookup.h: Declare them..
277
2782023-08-11  Jason Merrill  <jason@redhat.com>
279
280          PR c++/108099
281          * decl.cc (grokdeclarator): Don't clear typedef_decl after 'unsigned
282          typedef' pedwarn.  Use c_common_signed_or_unsigned_type.  Also
283          handle 'signed typedef'.
284
2852023-08-07  Patrick Palka  <ppalka@redhat.com>
286
287          Backported from master:
288          2023-05-09  Patrick Palka  <ppalka@redhat.com>
289
290          PR c++/109761
291          * parser.cc (cp_parser_class_specifier): Don't pass a class
292          context to noexcept_override_late_checks.
293          (noexcept_override_late_checks): Remove 'type' parameter
294          and use DECL_CONTEXT of 'fndecl' instead.
295
2962023-07-12  Patrick Palka  <ppalka@redhat.com>
297
298          Backported from master:
299          2023-06-29  Patrick Palka  <ppalka@redhat.com>
300
301          PR c++/110468
302          * init.cc (maybe_instantiate_nsdmi_init): Mask out all
303          tsubst flags except for tf_warning_or_error.
304
3052023-05-17  Jakub Jelinek  <jakub@redhat.com>
306
307          Backported from master:
308          2023-05-17  Jakub Jelinek  <jakub@redhat.com>
309
310          PR c++/109868
311          * init.cc (build_zero_init_1): Don't initialize zero-width bitfields.
312          For unions only initialize the first FIELD_DECL.
313
3142023-05-15  Jason Merrill  <jason@redhat.com>
315
316          PR c++/109241
317          * pt.cc (find_parameter_packs_r): Handle null TREE_BINFO.
318
3192023-05-09  Patrick Palka  <ppalka@redhat.com>
320
321          Backported from master:
322          2023-04-01  Patrick Palka  <ppalka@redhat.com>
323
324          PR c++/109160
325          * cp-tree.h (do_auto_deduction): Add defaulted tmpl parameter.
326          * pt.cc (convert_template_argument): Pass 'in_decl' as 'tmpl' to
327          do_auto_deduction.
328          (tsubst_decl) <case VAR_/TYPE_DECL>: Pass 'tmpl' instead of 't' as
329          'in_decl' to coerce_template_parms.
330          (unify) <case TEMPLATE_PARM_INDEX>: Pass TPARMS_PRIMARY_TEMPLATE
331          as 'tmpl' to do_auto_deduction.
332          (do_auto_deduction): Document default arguments.  Rename local
333          variable 'tmpl' to 'ctmpl'.  Use 'tmpl' to obtain a full set of
334          template arguments for satisfaction in the adc_unify case.
335
3362023-05-09  Jason Merrill  <jason@redhat.com>
337
338          PR c++/106740
339          PR c++/105852
340          * decl.cc (duplicate_decls): Change non-templated friend
341          check to an assert.
342          * pt.cc   (tsubst_function_decl): Don't set DECL_TEMPLATE_INFO
343          on non-templated friends.
344          (tsubst_friend_function): Adjust.
345
3462023-05-08  Release Manager
347
348          * GCC 12.3.0 released.
349
3502023-05-04  Jason Merrill  <jason@redhat.com>
351
352          Revert:
353          2023-04-18  Jason Merrill  <jason@redhat.com>
354
355          PR c++/106890
356          * init.cc (maybe_instantiate_nsdmi_init): Don't leave
357          current_function_decl set to a constructor.
358
3592023-05-03  Jakub Jelinek  <jakub@redhat.com>
360
361          Backported from master:
362          2023-05-03  Jakub Jelinek  <jakub@redhat.com>
363
364          * cp-gimplify.cc (cp_fold_data): Move definition earlier.
365          (cp_gimplify_expr): Pass address of genericize = true
366          constructed data rather than &pset to cp_walk_tree with cp_fold_r.
367
3682023-04-30  Iain Sandoe  <iain@sandoe.co.uk>
369
370          Backported from master:
371          2023-04-09  Iain Sandoe  <iain@sandoe.co.uk>
372
373          * coroutines.cc (coro_rewrite_function_body): Ensure that added
374          bind expressions have scope blocks.
375
3762023-04-30  Iain Sandoe  <iain@sandoe.co.uk>
377
378          Backported from master:
379          2023-04-01  Iain Sandoe  <iain@sandoe.co.uk>
380
381          PR c++/101118
382          * coroutines.cc (flatten_await_stmt): Use the current count of
383          promoted temporaries to build a unique name for the frame entries.
384
3852023-04-30  Andrew Pinski  <pinskia@gmail.com>
386
387          Backported from master:
388          2022-12-16  Andrew Pinski  <pinskia@gmail.com>
389                        Iain Sandoe  <iain@sandoe.co.uk>
390
391          PR c++/107768
392          * coroutines.cc (coro_rewrite_function_body): Initialize pointers
393          from nullptr_node.  (morph_fn_to_coro): Likewise.
394
3952023-04-28  Patrick Palka  <ppalka@redhat.com>
396
397          Backported from master:
398          2023-03-24  Patrick Palka  <ppalka@redhat.com>
399
400          PR c++/106969
401          * parser.cc (cp_parser_class_specifier): Clear current_class_ptr
402          and current_class_ref sooner, before parsing a class definition.
403
4042023-04-28  Patrick Palka  <ppalka@redhat.com>
405
406          Backported from master:
407          2023-03-01  Patrick Palka  <ppalka@redhat.com>
408                        Jason Merrill  <jason@redhat.com>
409
410          PR c++/108219
411          PR c++/108218
412          * constexpr.cc (fold_to_constant): Define.
413          (maybe_constant_value): Move up early exit test for unevaluated
414          operands.  Try reducing an unevaluated operand to a constant via
415          fold_to_constant.
416          (fold_non_dependent_expr_template): Add early exit test for
417          CONSTANT_CLASS_P nodes.  Try reducing an unevaluated operand
418          to a constant via fold_to_constant.
419          * cp-tree.h (fold_to_constant): Declare.
420
4212023-04-21  Jason Merrill  <jason@redhat.com>
422
423          PR c++/108795
424          * semantics.cc (finish_id_expression_1): Check scope before
425          returning id_expression.
426
4272023-04-20  Jason Merrill  <jason@redhat.com>
428
429          Revert:
430          2023-04-18  Jason Merrill  <jason@redhat.com>
431
432          PR c++/108099
433          * decl.cc (grokdeclarator): Handle non-typedef typedef_decl.
434
4352023-04-19  Jason Merrill  <jason@redhat.com>
436
437          PR c++/108099
438          * decl.cc (grokdeclarator): Keep typedef_decl for __int128_t.
439
4402023-04-18  Jason Merrill  <jason@redhat.com>
441
442          PR c++/109357
443          * constexpr.cc (cxx_eval_constant_expression) [TARGET_EXPR]:
444          Check for complex initializer.
445
4462023-04-18  Jason Merrill  <jason@redhat.com>
447
448          PR c++/105481
449          * pt.cc (type_unification_real): Adjust for partial ordering.
450
4512023-04-18  Jason Merrill  <jason@redhat.com>
452
453          PR c++/105996
454          * typeck.cc (build_ptrmemfunc): Drop 0-offset optimization
455          and location wrappers.
456
4572023-04-18  Jason Merrill  <jason@redhat.com>
458
459          PR c++/106890
460          * init.cc (maybe_instantiate_nsdmi_init): Don't leave
461          current_function_decl set to a constructor.
462
4632023-04-18  Jason Merrill  <jason@redhat.com>
464
465          PR c++/108975
466          * lambda.cc (prune_lambda_captures): Don't bother in a template.
467
4682023-04-18  Jason Merrill  <jason@redhat.com>
469
470          PR c++/69410
471          * friend.cc (do_friend): Handle namespace as scope argument.
472          * decl.cc (grokdeclarator): Pass down in_namespace.
473
4742023-04-18  Jason Merrill  <jason@redhat.com>
475
476          PR c++/105809
477          * init.cc (get_nsdmi): Split out...
478          (maybe_instantiate_nsdmi_init): ...this function.
479          * cp-tree.h: Declare it.
480          * pt.cc (tsubst_expr): Use it.
481
4822023-04-18  Jason Merrill  <jason@redhat.com>
483
484          PR c++/108242
485          * pt.cc (tsubst_expr) [TAG_DEFN]: Handle partial instantiation.
486
4872023-04-18  Jason Merrill  <jason@redhat.com>
488
489          PR c++/101869
490          * semantics.cc (finish_qualified_id_expr): Don't try to build a
491          pointer-to-member if the scope is an enumeration.
492
4932023-04-18  Jason Merrill  <jason@redhat.com>
494
495          PR c++/105406
496          * coroutines.cc (build_co_await): Handle lvalue 'o'.
497
4982023-04-18  Jason Merrill  <jason@redhat.com>
499
500          PR c++/103871
501          PR c++/98056
502          * typeck.cc (cp_build_modify_expr): Allow array initialization of
503          DECL_ARTIFICIAL variable.
504
5052023-04-18  Jason Merrill  <jason@redhat.com>
506
507          PR c++/108468
508          * pt.cc (unify_pack_expansion): Check that TPARMS_PRIMARY_TEMPLATE
509          is non-null.
510
5112023-04-18  Jason Merrill  <jason@redhat.com>
512
513          PR c++/107310
514          * cp-gimplify.cc (genericize_if_stmt): Restore folding
515          of constant conditions.
516
5172023-04-18  Jason Merrill  <jason@redhat.com>
518
519          PR c++/108566
520          * mangle.cc (anon_aggr_naming_decl): New.
521          (write_unqualified_name): Use it.
522
5232023-04-18  Jason Merrill  <jason@redhat.com>
524
525          PR c++/107154
526          * cp-gimplify.cc (cp_genericize_init_expr): Use iloc_sentinel.
527          (cp_genericize_target_expr): Likewise.
528
5292023-04-18  Jason Merrill  <jason@redhat.com>
530
531          PR c++/108099
532          * decl.cc (grokdeclarator): Handle non-typedef typedef_decl.
533
5342023-04-18  Jakub Jelinek  <jakub@redhat.com>
535
536          Backported from master:
537          2023-04-12  Jakub Jelinek  <jakub@redhat.com>
538
539          * Make-lang.in (s-cp-module-version): New target.
540          (cp/module.o): Depend on it.
541          (MODULE_VERSION): Remove variable.
542          (CFLAGS-cp/module.o): For -DMODULE_VERSION= argument just
543          cat s-cp-module-version.
544
5452023-04-18  Jakub Jelinek  <jakub@redhat.com>
546
547          Backported from master:
548          2023-03-30  Jakub Jelinek  <jakub@redhat.com>
549
550          PR c++/109319
551          * decl2.cc (grok_array_decl): After emitting a pedwarn for
552          -Wcomma-subscript, if processing_template_decl set orig_index_exp
553          to compound expr from orig_index_exp_list.
554
5552023-04-18  Jakub Jelinek  <jakub@redhat.com>
556
557          Backported from master:
558          2023-03-20  Jakub Jelinek  <jakub@redhat.com>
559
560          PR c++/109164
561          * cp-tree.h (var_needs_tls_wrapper): Declare.
562          * decl2.cc (var_needs_tls_wrapper): No longer static.
563          * decl.cc (cp_finish_decl): Clear TREE_READONLY on TLS variables
564          for which a TLS wrapper will be needed.
565
5662023-03-19  Jakub Jelinek  <jakub@redhat.com>
567
568          Backported from master:
569          2023-03-14  Jakub Jelinek  <jakub@redhat.com>
570
571          PR c++/109096
572          * tree.cc (record_has_unique_obj_representations): Ignore unnamed
573          bitfields.
574
5752023-03-19  Jakub Jelinek  <jakub@redhat.com>
576
577          Backported from master:
578          2023-03-10  Jakub Jelinek  <jakub@redhat.com>
579
580          PR c++/107558
581          * decl.cc (cp_finish_decl): Don't clear TREE_READONLY on
582          automatic non-aggregate variables just because of
583          -fmerge-all-constants.
584
5852023-03-19  Jakub Jelinek  <jakub@redhat.com>
586
587          Backported from master:
588          2023-03-10  Jakub Jelinek  <jakub@redhat.com>
589
590          PR c++/109039
591          * class.cc (end_of_class): For bit-fields, instead of computing
592          offset as sum of byte_position (field) and DECL_SIZE_UNIT (field),
593          compute it as sum of bit_position (field) and DECL_SIZE (field)
594          divided by BITS_PER_UNIT rounded up.
595
5962023-03-19  Jakub Jelinek  <jakub@redhat.com>
597
598          Backported from master:
599          2023-03-10  Jakub Jelinek  <jakub@redhat.com>
600
601          PR c/108079
602          * decl.cc (poplevel): Suppress OPT_Wunused_variable warning
603          after diagnosing it.
604
6052023-03-19  Jakub Jelinek  <jakub@redhat.com>
606
607          Backported from master:
608          2023-03-02  Jakub Jelinek  <jakub@redhat.com>
609
610          PR debug/108716
611          * cp-gimplify.cc (cp_genericize_r) <case USING_STMT>: Set
612          DECL_SOURCE_LOCATION on IMPORTED_DECL to expression location
613          of USING_STMT or input_location.
614
6152023-03-15  Marek Polacek  <polacek@redhat.com>
616
617          Backported from master:
618          2023-03-15  Marek Polacek  <polacek@redhat.com>
619
620          PR c++/107280
621          * constexpr.cc (cxx_eval_store_expression): Strip location wrappers.
622
6232023-03-13  Arsen Arsenović  <arsen@aarsen.me>
624
625          PR c++/106188
626          PR c++/106713
627          * coroutines.cc (coro_rewrite_function_body): Ensure we have a
628          BIND_EXPR wrapping the function body.
629
6302023-03-07  Marek Polacek  <polacek@redhat.com>
631
632          Backported from master:
633          2023-02-10  Marek Polacek  <polacek@redhat.com>
634
635          PR c++/107079
636          * call.cc (set_up_extended_ref_temp): Pass var to maybe_constant_init.
637
6382023-03-07  Marek Polacek  <polacek@redhat.com>
639
640          Backported from master:
641          2023-03-07  Marek Polacek  <polacek@redhat.com>
642
643          PR c++/107939
644          * constexpr.cc (potential_constant_expression_1) <case CALL_EXPR>: Pass
645          'any' when recursing on a VAR_DECL and not a pointer to function.
646
6472023-03-07  Patrick Palka  <ppalka@redhat.com>
648
649          Backported from master:
650          2023-03-03  Patrick Palka  <ppalka@redhat.com>
651
652          PR c++/108998
653          * pt.cc (el_data::skipped_trees): New data member.
654          (extract_locals_r): Push to skipped_trees any unevaluated
655          contexts that we skipped over.
656          (extract_local_specs): For the second walk, start from each
657          tree in skipped_trees.
658
6592023-03-07  Patrick Palka  <ppalka@redhat.com>
660
661          Backported from master:
662          2022-12-23  Patrick Palka  <ppalka@redhat.com>
663
664          PR c++/108116
665          * constexpr.cc (maybe_constant_value): Clear
666          processing_template_decl before calling break_out_target_exprs.
667          * init.cc (get_nsdmi): Likewise.
668          * tree.cc (break_out_target_exprs): Assert processing_template_decl
669          is cleared.
670
6712023-03-07  Patrick Palka  <ppalka@redhat.com>
672
673          Backported from master:
674          2022-12-23  Patrick Palka  <ppalka@redhat.com>
675
676          PR c++/107853
677          * constraint.cc (maybe_substitute_reqs_for): Substitute into
678          the template-head requirements of a template friend using only
679          its outer arguments via outer_template_args.
680          * cp-tree.h (outer_template_args): Declare.
681          * pt.cc (outer_template_args): Define, factored out and
682          generalized from ...
683          (ctor_deduction_guides_for): ... here.
684
6852023-03-07  Patrick Palka  <ppalka@redhat.com>
686
687          Backported from master:
688          2022-11-29  Patrick Palka  <ppalka@redhat.com>
689
690          PR c++/107864
691          * decl.cc (function_requirements_equivalent_p): Don't check
692          DECL_TEMPLATE_SPECIALIZATION.
693          * pt.cc (determine_specialization): Propagate constraints when
694          specializing a function template too.  Simplify by using
695          add_outermost_template_args.
696
6972023-03-07  Patrick Palka  <ppalka@redhat.com>
698
699          Backported from master:
700          2022-11-03  Patrick Palka  <ppalka@redhat.com>
701
702          PR c++/107179
703          * constraint.cc (tsubst_requires_expr): Make sure we're not
704          deferring access checks.
705
7062023-03-04  Marek Polacek  <polacek@redhat.com>
707
708          PR c++/108550
709          * pt.cc (lookup_and_finish_template_variable): Clear tf_partial.
710
7112023-03-04  Marek Polacek  <polacek@redhat.com>
712
713          Backported from master:
714          2023-03-02  Marek Polacek  <polacek@redhat.com>
715
716          PR c++/106259
717          * parser.cc (class_decl_loc_t::diag_mismatched_tags): If the first
718          lookup of SPEC didn't find anything, try to look for
719          most_general_template.
720
7212023-03-04  Marek Polacek  <polacek@redhat.com>
722
723          Backported from master:
724          2023-03-01  Marek Polacek  <polacek@redhat.com>
725
726          PR c++/107574
727          * constexpr.cc (cxx_eval_constant_expression): Emit an error when
728          a PTRMEM_CST cannot be evaluated.
729
7302023-02-20  Marek Polacek  <polacek@redhat.com>
731
732          Backported from master:
733          2023-02-20  Marek Polacek  <polacek@redhat.com>
734
735          PR c++/108829
736          * pt.cc (prepend_one_capture): Set LAMBDA_CAPTURE_EXPLICIT_P.
737          (tsubst_lambda_expr): Pass LAMBDA_CAPTURE_EXPLICIT_P to
738          prepend_one_capture.
739
7402023-02-15  Marek Polacek  <polacek@redhat.com>
741
742          Backported from master:
743          2023-02-15  Marek Polacek  <polacek@redhat.com>
744
745          PR c++/106675
746          * call.cc (joust_maybe_elide_copy): Return false for ck_ambig.
747
7482023-02-10  Jakub Jelinek  <jakub@redhat.com>
749
750          Backported from master:
751          2023-01-16  Jakub Jelinek  <jakub@redhat.com>
752
753          PR c++/105593
754          * decl.cc (cp_finish_decl): Check warning_enabled_at
755          at the DECL_SOURCE_LOCATION (decl) for OPT_Winit_self instead
756          of warn_init_self.
757
7582023-02-10  Marek Polacek  <polacek@redhat.com>
759
760          Backported from master:
761          2022-08-11  Marek Polacek  <polacek@redhat.com>
762
763          PR middle-end/102633
764          * decl.cc (cp_finish_decl): Call suppress_warning.
765
7662023-02-10  Jakub Jelinek  <jakub@redhat.com>
767
768          Backported from master:
769          2023-01-24  Jakub Jelinek  <jakub@redhat.com>
770
771          PR c++/108474
772          * cp-gimplify.cc (cp_fold_r): Handle structured bindings
773          vars like anon union artificial vars.
774
7752023-02-10  Jakub Jelinek  <jakub@redhat.com>
776
777          Backported from master:
778          2023-01-14  Jakub Jelinek  <jakub@redhat.com>
779
780          PR c++/108365
781          * typeck.cc (cp_build_binary_op): For integral division or modulo,
782          shorten if type0 is unsigned, or op0 is cast from narrower unsigned
783          integral type or stripped_op1 is INTEGER_CST other than -1.
784
7852023-02-10  Jakub Jelinek  <jakub@redhat.com>
786
787          Backported from master:
788          2023-02-01  Jakub Jelinek  <jakub@redhat.com>
789
790          PR c++/108607
791          * constexpr.cc (cxx_eval_constant_expression): Handle OMP_*
792          and OACC_* constructs as non-constant.
793          (potential_constant_expression_1): Handle OMP_SCAN and OMP_SCOPE.
794
7952023-02-10  Jakub Jelinek  <jakub@redhat.com>
796
797          Backported from master:
798          2023-01-19  Jakub Jelinek  <jakub@redhat.com>
799
800          PR c++/53932
801          * cp-gimplify.cc (cp_fold_r): During cp_fully_fold_init replace
802          DECL_ANON_UNION_VAR_P VAR_DECLs with their corresponding
803          DECL_VALUE_EXPR.
804
8052023-02-10  Jakub Jelinek  <jakub@redhat.com>
806
807          Backported from master:
808          2023-01-05  Jakub Jelinek  <jakub@redhat.com>
809
810          PR c++/108286
811          * semantics.cc (finish_omp_target_clauses): Ignore clauses other than
812          OMP_CLAUSE_MAP.
813
8142023-02-10  Jakub Jelinek  <jakub@redhat.com>
815
816          Backported from master:
817          2023-01-04  Jakub Jelinek  <jakub@redhat.com>
818
819          PR c++/108206
820          * decl.cc (merge_default_template_args): Return false if either
821          new_parm or old_parm are erroneous.
822
8232023-02-10  Jakub Jelinek  <jakub@redhat.com>
824
825          Backported from master:
826          2022-12-21  Jakub Jelinek  <jakub@redhat.com>
827
828          PR c++/108180
829          * pt.cc (tsubst_expr): Don't call cp_finish_decl on
830          DECL_OMP_PRIVATIZED_MEMBER vars.
831
8322023-02-10  Jakub Jelinek  <jakub@redhat.com>
833
834          Backported from master:
835          2022-12-15  Jakub Jelinek  <jakub@redhat.com>
836
837          PR c++/107065
838          * typeck.cc (cp_build_unary_op) <case TRUTH_NOT_EXPR>: If
839          invert_truthvalue_loc returns obvalue_p, wrap it into NON_LVALUE_EXPR.
840          * parser.cc (cp_parser_binary_expression): Don't call
841          warn_logical_not_parentheses if current.lhs is a NON_LVALUE_EXPR
842          of a decl with boolean type.
843
8442023-02-06  Patrick Palka  <ppalka@redhat.com>
845
846          Backported from master:
847          2023-02-06  Patrick Palka  <ppalka@redhat.com>
848
849          PR c++/107461
850          * cp-tree.h (call_expr_dependent_name): Declare.
851          * pt.cc (iterative_hash_template_arg) <case CALL_EXPR>: Use
852          call_expr_dependent_name instead of dependent_name.
853          * tree.cc (call_expr_dependent_name): Define.
854          (called_fns_equal): Adjust to take two CALL_EXPRs instead of
855          CALL_EXPR_FNs thereof.  Use call_expr_dependent_name instead
856          of dependent_name.
857          (cp_tree_equal) <case CALL_EXPR>: Adjust call to called_fns_equal.
858
8592023-02-03  Patrick Palka  <ppalka@redhat.com>
860
861          Backported from master:
862          2023-02-03  Patrick Palka  <ppalka@redhat.com>
863
864          PR c++/107461
865          * semantics.cc (finish_call_expr): Strip ADDR_EXPR from
866          the selected callee during overload set pruning.
867
8682023-02-01  Marek Polacek  <polacek@redhat.com>
869
870          Backported from master:
871          2023-02-01  Marek Polacek  <polacek@redhat.com>
872
873          PR c++/107755
874          * call.cc (build_new_op): Don't call warn_logical_operator when
875          processing a template.
876
8772023-01-31  Marek Polacek  <polacek@redhat.com>
878
879          PR c++/107593
880          PR c++/108597
881          * cp-tree.h (instantiation_dependent_expression_p): Don't
882          declare here.
883
8842023-01-04  Patrick Palka  <ppalka@redhat.com>
885
886          Backported from master:
887          2023-01-04  Patrick Palka  <ppalka@redhat.com>
888
889          PR c++/108282
890          * decl2.cc (mark_single_function): Ignore mark_used failure
891          only in a non-SFINAE context rather than in a SFINAE one.
892
8932022-12-19  Patrick Palka  <ppalka@redhat.com>
894
895          Backported from master:
896          2022-12-15  Patrick Palka  <ppalka@redhat.com>
897
898          PR c++/100295
899          PR c++/107579
900          * pt.cc (el_data::skip_unevaluated_operands): New data member.
901          (extract_locals_r): If skip_unevaluated_operands is true,
902          don't walk into unevaluated contexts.
903          (extract_local_specs): Walk the pattern twice, first with
904          skip_unevaluated_operands true followed by it set to false.
905
9062022-12-19  Patrick Palka  <ppalka@redhat.com>
907
908          Backported from master:
909          2022-12-15  Patrick Palka  <ppalka@redhat.com>
910
911          PR c++/108104
912          * pt.cc (unify) <default>: Relax assert to accept any
913          CONSTRUCTOR parm, not just COMPOUND_LITERAL_P one.
914
9152022-12-19  Patrick Palka  <ppalka@redhat.com>
916
917          Backported from master:
918          2022-12-04  Patrick Palka  <ppalka@redhat.com>
919
920          PR c++/107417
921          * pt.cc (for_each_template_parm_r) <case REQUIRES_EXPR>: Move
922          walking of the TREE_TYPE of each parameter to ...
923          * tree.cc (cp_walk_subtrees) <case REQUIRES_EXPR>: ... here.
924
9252022-12-19  Patrick Palka  <ppalka@redhat.com>
926
927          Backported from master:
928          2022-12-03  Patrick Palka  <ppalka@redhat.com>
929
930          PR c++/103081
931          * pt.cc (tsubst_copy) <case CONST_DECL>: Generalize
932          early exit test for namespace-scope decls to check dependence of
933          the enclosing scope instead.  Remove dead early exit test.
934
9352022-12-19  Patrick Palka  <ppalka@redhat.com>
936
937          Backported from master:
938          2022-11-30  Patrick Palka  <ppalka@redhat.com>
939
940          PR c++/107542
941          * typeck.cc (cp_build_binary_op): In the SPACESHIP_EXPR case,
942          handle an error_mark_node result type.
943
9442022-11-20  Jakub Jelinek  <jakub@redhat.com>
945
946          Backported from master:
947          2022-11-15  Jakub Jelinek  <jakub@redhat.com>
948
949          * cp-tree.h (next_common_initial_seqence): Rename to ...
950          (next_common_initial_sequence): ... this.
951          * typeck.cc (next_common_initial_seqence): Rename to ...
952          (next_common_initial_sequence): ... this.
953          (layout_compatible_type_p): Call next_common_initial_sequence
954          rather than next_common_initial_seqence.
955          * semantics.cc (is_corresponding_member_aggr): Likewise.
956
9572022-11-18  Marek Polacek  <polacek@redhat.com>
958
959          Backported from master:
960          2022-11-18  Marek Polacek  <polacek@redhat.com>
961
962          PR c++/104066
963          * decl.cc (grokdeclarator): Check funcdecl_p before complaining
964          about constinit.
965
9662022-11-03  Jakub Jelinek  <jakub@redhat.com>
967
968          Backported from master:
969          2022-10-24  Jakub Jelinek  <jakub@redhat.com>
970
971          PR c++/105774
972          * constexpr.cc (cxx_eval_increment_expression): For signed types
973          that promote to int, evaluate PLUS_EXPR or MINUS_EXPR in int type.
974
9752022-11-03  Jakub Jelinek  <jakub@redhat.com>
976
977          Backported from master:
978          2022-09-07  Jakub Jelinek  <jakub@redhat.com>
979
980          PR c++/106829
981          * semantics.cc (finish_omp_target_clauses): If current_function_decl
982          isn't a nonstatic member function, don't set data.current_object to
983          non-NULL.
984
9852022-10-13  Marek Polacek  <polacek@redhat.com>
986
987          Backported from master:
988          2022-10-13  Marek Polacek  <polacek@redhat.com>
989
990          PR c++/106925
991          * except.cc (maybe_splice_retval_cleanup): Check current_function_decl.
992          Make the bool const.
993
9942022-09-29  Jason Merrill  <jason@redhat.com>
995
996          * class.cc (check_methods): Call constraints_satisfied_p.
997
9982022-09-12  Jason Merrill  <jason@redhat.com>
999
1000          PR c++/93259
1001          * pt.cc (type_dependent_expression_p): Treat a compound
1002          literal of array-of-unknown-bound type like a variable.
1003
10042022-09-12  Jason Merrill  <jason@redhat.com>
1005
1006          PR c++/106893
1007          PR c++/90451
1008          * decl.cc (cp_finish_decl): Call mark_single_function.
1009
10102022-08-30  Marek Polacek  <polacek@redhat.com>
1011
1012          Backported from master:
1013          2022-08-30  Marek Polacek  <polacek@redhat.com>
1014
1015          PR c++/106759
1016          * cp-objcp-common.cc (names_builtin_p): Handle RID_IS_NOTHROW_ASSIGNABLE
1017          and RID_IS_NOTHROW_CONSTRUCTIBLE.
1018
10192022-08-29  Jakub Jelinek  <jakub@redhat.com>
1020
1021          Backported from master:
1022          2022-08-16  Jakub Jelinek  <jakub@redhat.com>
1023
1024          * typeck.cc (cp_build_modify_expr): Implement
1025          P2327R1 - De-deprecating volatile compound operations.  Don't warn
1026          for |=, &= or ^= with volatile lhs.
1027          * expr.cc (mark_use) <case MODIFY_EXPR>: Adjust warning wording,
1028          leave out simple.
1029
10302022-08-19  Release Manager
1031
1032          * GCC 12.2.0 released.
1033
10342022-08-12  Jason Merrill  <jason@redhat.com>
1035
1036          Backported from master:
1037          2022-07-31  Jason Merrill  <jason@redhat.com>
1038
1039          PR c++/106369
1040          * constexpr.cc (reduced_constant_expression_p): Return false
1041          if a CONSTRUCTOR initializes an empty field.
1042
10432022-08-12  Marek Polacek  <polacek@redhat.com>
1044
1045          Backported from master:
1046          2022-04-29  Marek Polacek  <polacek@redhat.com>
1047
1048          PR c++/67048
1049          * parser.cc (cp_parser_enum_specifier): Warn about empty unnamed enum
1050          only when it's followed by a semicolon.
1051
10522022-07-26  Marek Polacek  <polacek@redhat.com>
1053
1054          Backported from master:
1055          2022-07-26  Marek Polacek  <polacek@redhat.com>
1056
1057          PR c++/106311
1058          * pt.cc (redeclare_class_template): Check DECL_P before accessing
1059          DECL_SOURCE_LOCATION.
1060
10612022-07-26  Jason Merrill  <jason@redhat.com>
1062
1063          PR c++/106230
1064          * semantics.cc (finish_for_stmt): Check stmts_are_full_exprs_p.
1065
10662022-07-21  Jason Merrill  <jason@redhat.com>
1067
1068          PR c++/106361
1069          * decl.cc (move_fn_p): Remove assert.
1070
10712022-07-21  Patrick Palka  <ppalka@redhat.com>
1072
1073          Backported from master:
1074          2022-07-13  Patrick Palka  <ppalka@redhat.com>
1075
1076          PR c++/105912
1077          * call.cc (extract_call_expr): Return a NULL_TREE on failure
1078          instead of asserting.
1079          * pt.cc (tsubst_copy_and_build) <case CALL_EXPR>: Guard against
1080          NULL_TREE extract_call_expr result.
1081
10822022-07-21  Patrick Palka  <ppalka@redhat.com>
1083
1084          Backported from master:
1085          2022-07-13  Patrick Palka  <ppalka@redhat.com>
1086
1087          PR c++/105842
1088          * constraint.cc (satisfy_declaration_constraints): Refine early
1089          exit test for argument dependence.
1090          * cp-tree.h (uses_outer_template_parms_in_constraints): Declare.
1091          * pt.cc (template_class_depth): Handle TI_TEMPLATE being a
1092          FIELD_DECL.
1093          (usse_outer_template_parms): Factor out constraint dependence
1094          test into ...
1095          (uses_outer_template_parms_in_constraints): ... here.
1096          (type_dependent_expression_p): Use it for FUNCTION_DECL.
1097
10982022-07-21  Patrick Palka  <ppalka@redhat.com>
1099
1100          Backported from master:
1101          2022-06-06  Patrick Palka  <ppalka@redhat.com>
1102
1103          PR c++/53164
1104          PR c++/105848
1105          * pt.cc (tsubst_copy_and_build) <case CALL_EXPR>: Look through an
1106          ADDR_EXPR callee when calling mark_used.
1107
11082022-07-21  Patrick Palka  <ppalka@redhat.com>
1109
1110          Backported from master:
1111          2022-06-03  Patrick Palka  <ppalka@redhat.com>
1112
1113          PR c++/105637
1114          * tree.cc (maybe_dummy_object): When returning a dummy
1115          object, respect the cv-quals of 'this' if available.
1116
11172022-07-21  Patrick Palka  <ppalka@redhat.com>
1118
1119          Backported from master:
1120          2022-06-03  Patrick Palka  <ppalka@redhat.com>
1121
1122          PR c++/100374
1123          * pt.cc (determine_specialization): Compare overall constraints
1124          not just the trailing constraints.
1125          (tsubst_each_template_parm_constraints): Define.
1126          (tsubst_friend_function): Use it.
1127          (tsubst_friend_class): Use it.
1128          (tsubst_template_parm): Don't substitute TEMPLATE_PARM_CONSTRAINTS.
1129
11302022-07-21  Patrick Palka  <ppalka@redhat.com>
1131
1132          Backported from master:
1133          2022-05-31  Patrick Palka  <ppalka@redhat.com>
1134
1135          PR c++/105758
1136          * call.cc (build_over_call): Use z_candidate::conversion_path
1137          and ::access_path instead of TYPE_BINFO when building the
1138          BASELINK for the templated form.
1139
11402022-07-21  Patrick Palka  <ppalka@redhat.com>
1141
1142          Backported from master:
1143          2022-05-26  Patrick Palka  <ppalka@redhat.com>
1144
1145          PR c++/96363
1146          * decl.cc (shadow_tag): Use the return value of
1147          maybe_process_partial_specialization.
1148          * parser.cc (cp_parser_single_declaration): Call shadow_tag
1149          before associate_classtype_constraints.
1150          * pt.cc (maybe_new_partial_specialization): Change return type
1151          to bool.  Take 'type' argument by mutable reference.  Set 'type'
1152          to point to the correct constrained specialization when
1153          appropriate.
1154          (maybe_process_partial_specialization): Adjust accordingly.
1155
11562022-07-19  Marek Polacek  <polacek@redhat.com>
1157
1158          PR c++/105634
1159          * call.cc (maybe_warn_class_memaccess): Avoid % by zero.
1160
11612022-07-02  Sergei Trofimovich  <siarheit@google.com>
1162
1163          Backported from master:
1164          2022-06-27  Sergei Trofimovich  <siarheit@google.com>
1165
1166          PR c++/106102
1167          * mapper-client.cc: Include <memory> via "system.h".
1168          * mapper-resolver.cc: Ditto.
1169          * module.cc: Ditto.
1170
11712022-07-01  Jason Merrill  <jason@redhat.com>
1172
1173          PR c++/106024
1174          * parser.cc (cp_parser_lookup_name): Limit previous change to
1175          lambdas.
1176
11772022-07-01  Jason Merrill  <jason@redhat.com>
1178
1179          PR c++/105541
1180          * cp-tree.h (TMPL_ARGS_DEPTH): 0 for null args.
1181          * parser.cc (cp_parser_enclosed_template_argument_list):
1182          Use 0-length TREE_VEC for <>.
1183
11842022-07-01  Jason Merrill  <jason@redhat.com>
1185
1186          PR c++/105779
1187          * call.cc (resolve_args): Use complain.
1188
11892022-07-01  Jason Merrill  <jason@redhat.com>
1190
1191          PR c++/106024
1192          * parser.cc (missing_template_diag): Factor out...
1193          (cp_parser_id_expression): ...from here.
1194          (cp_parser_lookup_name): Don't look in dependent object_type.
1195
11962022-06-24  Patrick Palka  <ppalka@redhat.com>
1197
1198          Backported from master:
1199          2022-06-23  Patrick Palka  <ppalka@redhat.com>
1200
1201          PR c++/105931
1202          * expr.cc (fold_for_warn): Don't fold when in an unevaluated
1203          context.
1204
12052022-06-23  Jason Merrill  <jason@redhat.com>
1206
1207          PR c++/105925
1208          * decl.cc (reshape_init_array_1): Set
1209          CONSTRUCTOR_IS_DESIGNATED_INIT here.
1210          (reshape_init_class): And here.
1211
12122022-06-23  Jason Merrill  <jason@redhat.com>
1213
1214          PR c++/105885
1215          * pt.cc (tsubst_copy_and_build): Also suppress -Waddress for
1216          comparison of dependent operands.
1217
12182022-06-23  Jason Merrill  <jason@redhat.com>
1219
1220          PR c++/105964
1221          * pt.cc (type_dependent_expression_p): Look through BASELINK.
1222
12232022-06-23  Jason Merrill  <jason@redhat.com>
1224
1225          PR c++/105908
1226          * name-lookup.cc (outer_binding): Strip BASELINK.
1227
12282022-06-19  Jakub Jelinek  <jakub@redhat.com>
1229
1230          Backported from master:
1231          2022-06-17  Jakub Jelinek  <jakub@redhat.com>
1232
1233          PR c++/106001
1234          * typeck.cc (build_x_shufflevector): Use fold_non_dependent_expr
1235          instead of maybe_constant_value.
1236
12372022-06-19  Jakub Jelinek  <jakub@redhat.com>
1238
1239          Backported from master:
1240          2022-06-09  Jakub Jelinek  <jakub@redhat.com>
1241
1242          PR c++/105871
1243          * constexpr.cc (cxx_eval_bit_field_ref): For BIT_FIELD_REF with
1244          non-integral result type use fold_ternary too like for BIT_FIELD_REFs
1245          from VECTOR_CST.  If fold_ternary returns NULL, diagnose non-constant
1246          expression, set *non_constant_p and return t, instead of returning
1247          NULL.
1248
12492022-06-11  Patrick Palka  <ppalka@redhat.com>
1250
1251          Backported from master:
1252          2022-06-03  Patrick Palka  <ppalka@redhat.com>
1253
1254          PR c++/105756
1255          * typeck.cc (cp_build_binary_op): Don't fold operands
1256          when c_inhibit_evaluation_warnings.
1257
12582022-06-08  Jason Merrill  <jason@redhat.com>
1259
1260          PR c++/105852
1261          PR c++/105761
1262          * decl.cc (duplicate_decls): Avoid copying template info
1263          from non-templated friend even if newdecl isn't a definition.
1264          Correct handling of DECL_UNIQUE_FRIEND_P on templates.
1265          * pt.cc (non_templated_friend_p): New.
1266          * cp-tree.h (non_templated_friend_p): Declare it.
1267
12682022-06-03  Jason Merrill  <jason@redhat.com>
1269
1270          PR c++/105761
1271          * decl.cc (duplicate_decls): Don't copy DECL_TEMPLATE_INFO
1272          from a hidden friend.
1273
12742022-06-02  Jason Merrill  <jason@redhat.com>
1275
1276          PR c++/105795
1277          * constexpr.cc (cxx_eval_bare_aggregate): Always call
1278          init_subob_ctx.
1279
12802022-06-01  Jason Merrill  <jason@redhat.com>
1281
1282          PR c++/105734
1283          * parser.cc (cp_parser_postfix_dot_deref_expression): Use typeof
1284          if the expression has auto type.
1285
12862022-06-01  Jason Merrill  <jason@redhat.com>
1287
1288          PR c++/105779
1289          * call.cc (resolve_args): Call mark_single_function here.
1290          * pt.cc (unify_one_argument): Not here.
1291
12922022-06-01  Patrick Palka  <ppalka@redhat.com>
1293
1294          Backported from master:
1295          2022-05-09  Patrick Palka  <ppalka@redhat.com>
1296
1297          PR c++/105491
1298          * constexpr.cc (reduced_constant_expression_p): Use
1299          next_subobject_field instead.
1300          * cp-tree.h (next_subobject_field): Declare.
1301          * decl.cc (next_subobject_field): Define.
1302
13032022-05-31  Jason Merrill  <jason@redhat.com>
1304
1305          PR c++/105652
1306          * pt.cc (tsubst_lambda_expr): Don't let a namespace-scope lambda
1307          instantiate into a class-scope lambda.
1308
13092022-05-31  Jason Merrill  <jason@redhat.com>
1310
1311          PR c++/105655
1312          * pt.cc (build_template_decl): Add assert.
1313          (tsubst_function_decl): Don't return a template.
1314
13152022-05-31  Jason Merrill  <jason@redhat.com>
1316
1317          PR c++/105623
1318          * decl2.cc (mark_used): Copy type from fn to BASELINK.
1319          * pt.cc (unify_one_argument): Call mark_single_function.
1320
13212022-05-31  Jason Merrill  <jason@redhat.com>
1322
1323          PR c++/102307
1324          * decl.cc (check_initializer): Use build_cplus_new in case of
1325          constexpr failure.
1326
13272022-05-27  Marek Polacek  <polacek@redhat.com>
1328
1329          Backported from master:
1330          2022-05-27  Marek Polacek  <polacek@redhat.com>
1331
1332          PR c++/105725
1333          * parser.cc (class_decl_loc_t::add): Check CLASS_TYPE_P.
1334
13352022-05-15  Jason Merrill  <jason@redhat.com>
1336
1337          PR c++/105589
1338          PR c++/105191
1339          PR c++/92385
1340          * init.cc (build_value_init): Handle class in template.
1341
13422022-05-15  Jason Merrill  <jason@redhat.com>
1343
1344          PR c++/104470
1345          * cp-tree.h (enum tsubst_flags): Add tf_dguide.
1346          * pt.cc (tsubst_aggr_type): Check it.
1347          (tsubst_baselink, tsubst_copy): Check it.
1348          (maybe_dependent_member_ref): Check it.
1349          (instantiate_alias_template): Handle it.
1350          (build_deduction_guide): Set it.
1351
13522022-05-15  Jason Merrill  <jason@redhat.com>
1353
1354          PR c++/102651
1355          PR c++/49387
1356          * rtti.cc (get_tinfo_decl_direct): Don't complete_type.
1357          (emit_tinfo_decl): Update tdesc type if needed.
1358
13592022-05-06  Patrick Palka  <ppalka@redhat.com>
1360
1361          Backported from master:
1362          2022-05-04  Patrick Palka  <ppalka@redhat.com>
1363
1364          PR c++/105476
1365          * pt.cc (maybe_aggr_guide): Set processing_template_decl when
1366          partially instantiating the guide's parameter list.
1367
13682022-05-06  Jakub Jelinek  <jakub@redhat.com>
1369
1370          Backported from master:
1371          2022-05-04  Jakub Jelinek  <jakub@redhat.com>
1372
1373          * lambda.cc: Include decl.h.
1374          (maybe_add_lambda_conv_op): Temporarily override deprecated_state to
1375          UNAVAILABLE_DEPRECATED_SUPPRESS.
1376
13772022-05-06  Release Manager
1378
1379          * GCC 12.1.0 released.
1380
13812022-04-29  Iain Sandoe  <iain@sandoe.co.uk>
1382
1383          Backported from master:
1384          2022-04-29  Iain Sandoe  <iain@sandoe.co.uk>
1385
1386          PR c++/105426
1387          * coroutines.cc (register_local_var_uses): Allow promotion of unnamed
1388          temporaries to coroutine frame copies.
1389
13902022-04-28  Patrick Palka  <ppalka@redhat.com>
1391
1392          Backported from master:
1393          2022-04-28  Patrick Palka  <ppalka@redhat.com>
1394
1395          PR c++/105425
1396          * pt.cc (unify) <case TEMPLATE_PARM_INDEX>: Treat
1397          DEPENDENT_OPERATOR_TYPE like an empty type.
1398
13992022-04-28  Iain Sandoe  <iain@sandoe.co.uk>
1400
1401          PR c++/104051
1402          * coroutines.cc (coro_diagnose_throwing_final_aw_expr): Handle
1403          non-target expression inputs.
1404
14052022-04-28  Iain Sandoe  <iain@sandoe.co.uk>
1406
1407          PR c++/105301
1408          * coroutines.cc (coro_promise_type_found_p): Account for possible
1409          mutliple overloads of the promise return_value() method.
1410
14112022-04-28  Iain Sandoe  <iain@sandoe.co.uk>
1412
1413          PR c++/105287
1414          * coroutines.cc (maybe_promote_temps): Ensure generated temporaries
1415          are added to the bind expr.
1416          (add_var_to_bind): Fix local var naming to use portable punctuation.
1417          (register_local_var_uses): Do not add synthetic names to unnamed
1418          temporaries.
1419
14202022-04-28  Nathan Sidwell  <nathan@acm.org>
1421              Iain Sandoe  <iain@sandoe.co.uk>
1422
1423          PR c++/103868
1424          * coroutines.cc (finish_co_await_expr): Do not process non-dependent
1425          coroutine expressions at template definition time.
1426          (finish_co_yield_expr): Likewise.
1427          (finish_co_return_stmt): Likewise.
1428
14292022-04-28  Marek Polacek  <polacek@redhat.com>
1430
1431          PR c++/90107
1432          * parser.cc (cp_parser_class_specifier_1): Accept :: after a class
1433          definition.
1434
14352022-04-27  Jason Merrill  <jason@redhat.com>
1436
1437          * tree.cc (strip_typedefs): Add default argument comments.
1438
14392022-04-27  Marek Polacek  <polacek@redhat.com>
1440
1441          PR c++/105398
1442          * pt.cc (uses_template_parms): Return false for any NAMESPACE_DECL.
1443
14442022-04-26  Jason Merrill  <jason@redhat.com>
1445
1446          PR c++/102629
1447          * pt.cc (gen_elem_of_pack_expansion_instantiation): Clear
1448          TEMPLATE_TYPE_PARAMETER_PACK on auto.
1449
14502022-04-26  Patrick Palka  <ppalka@redhat.com>
1451
1452          PR c++/105386
1453          * semantics.cc (finish_decltype_type): Pass tf_decltype to
1454          instantiate_non_dependent_expr_sfinae.
1455
14562022-04-26  Jason Merrill  <jason@redhat.com>
1457
1458          PR c++/104624
1459          * pt.cc (check_for_bare_parameter_packs): Check for lambda
1460          function parameter pack.
1461
14622022-04-26  Patrick Palka  <ppalka@redhat.com>
1463
1464          PR c++/105289
1465          PR c++/86193
1466          * pt.cc (process_partial_specialization): Downgrade "partial
1467          specialization isn't more specialized" diagnostic from permerror
1468          to an on-by-default pedwarn.
1469          (unify) <case TEMPLATE_PARM_INDEX>: When substituting into the
1470          NTTP type a second time, use the original type not the
1471          substituted type.
1472
14732022-04-25  Marek Polacek  <polacek@redhat.com>
1474
1475          PR c++/105353
1476          * typeck.cc (build_x_shufflevector): Use
1477          instantiation_dependent_expression_p except for the first two
1478          arguments.
1479
14802022-04-21  Marek Polacek  <polacek@redhat.com>
1481
1482          * constexpr.cc (cxx_eval_logical_expression): Remove unused
1483          parameter.
1484          (cxx_eval_constant_expression) <case TRUTH_ANDIF_EXPR>,
1485          <case TRUTH_OR_EXPR>: Adjust calls to cxx_eval_logical_expression.
1486
14872022-04-21  Marek Polacek  <polacek@redhat.com>
1488
1489          PR c++/105321
1490          * constexpr.cc (cxx_eval_logical_expression): Always pass false for lval
1491          to cxx_eval_constant_expression.
1492
14932022-04-20  Ed Catmur  <ed@catmur.uk>
1494
1495          PR c++/104996
1496          * call.cc (compare_ics): When comparing list-initialization
1497          sequences, do not return early.
1498
14992022-04-19  Jakub Jelinek  <jakub@redhat.com>
1500
1501          PR c++/105256
1502          * typeck2.cc (process_init_constructor_array,
1503          process_init_constructor_record, process_init_constructor_union): Move
1504          CONSTRUCTOR_PLACEHOLDER_BOUNDARY flag from CONSTRUCTOR elements to the
1505          containing CONSTRUCTOR.
1506
15072022-04-15  Marek Polacek  <polacek@redhat.com>
1508
1509          PR c++/105268
1510          * parser.cc (cp_parser_placeholder_type_specifier): Return
1511          error_mark_node when trying to build up a constrained parameter in
1512          a default argument.
1513
15142022-04-15  Jason Merrill  <jason@redhat.com>
1515
1516          PR c++/102804
1517          * decl.cc (grokdeclarator): Drop typedef used with 'unsigned'.
1518
15192022-04-15  Jason Merrill  <jason@redhat.com>
1520
1521          PR c++/102987
1522          * error.cc (dump_expr): Handle USING_DECL.
1523          [VIEW_CONVERT_EXPR]: Just look through location wrapper.
1524
15252022-04-14  Jason Merrill  <jason@redhat.com>
1526
1527          PR c++/104646
1528          * constexpr.cc (maybe_save_constexpr_fundef): Don't do extra
1529          checks for defaulted ctors.
1530
15312022-04-14  Jason Merrill  <jason@redhat.com>
1532
1533          PR c++/82980
1534          * lambda.cc (type_deducible_expression_p): New.
1535          (lambda_capture_field_type): Check it.
1536
15372022-04-14  Jason Merrill  <jason@redhat.com>
1538
1539          PR c++/65211
1540          * pt.cc (tsubst_decl) [TYPE_DECL]: Copy TYPE_ALIGN.
1541
15422022-04-14  Jason Merrill  <jason@redhat.com>
1543
1544          PR c++/97219
1545          * name-lookup.cc (dependent_local_decl_p): New.
1546          * cp-tree.h (dependent_local_decl_p): Declare.
1547          * semantics.cc (finish_call_expr): Use it.
1548          * pt.cc (tsubst_arg_types): Also substitute default args
1549          for local externs.
1550
15512022-04-14  Jason Merrill  <jason@redhat.com>
1552
1553          PR c++/101698
1554          * pt.cc (tsubst_baselink): Also check dependent optype.
1555
15562022-04-14  Jason Merrill  <jason@redhat.com>
1557
1558          PR c++/101442
1559          * decl.cc (cp_finish_decl): Don't pass decl to push_cleanup.
1560          * init.cc (perform_member_init): Likewise.
1561          * semantics.cc (push_cleanup): Adjust comment.
1562
15632022-04-13  Jason Merrill  <jason@redhat.com>
1564
1565          PR c++/105245
1566          PR c++/100111
1567          * constexpr.cc (cxx_eval_store_expression): Build a CONSTRUCTOR
1568          as needed in empty base handling.
1569
15702022-04-13  Jakub Jelinek  <jakub@redhat.com>
1571
1572          PR c++/105233
1573          * decl2.cc (cp_check_const_attributes): For aligned attribute
1574          pass manifestly_const_eval=true to fold_non_dependent_expr.
1575
15762022-04-13  Marek Polacek  <polacek@redhat.com>
1577
1578          PR c++/97296
1579          * call.cc (direct_reference_binding): strip_top_quals when creating
1580          a ck_qual.
1581
15822022-04-12  Jason Merrill  <jason@redhat.com>
1583
1584          PR c++/104669
1585          * decl.cc (decls_match): Compare versions even if not recording.
1586          (duplicate_decls): Propagate attributes to alias.
1587          * decl2.cc (find_last_decl): Give up if versioned.
1588
15892022-04-12  Jason Merrill  <jason@redhat.com>
1590
1591          PR c++/102071
1592          * init.cc (build_new_1): Check array_p for alignment.
1593
15942022-04-12  Patrick Palka  <ppalka@redhat.com>
1595
1596          PR c++/103105
1597          * pt.cc (build_extra_args): Call preserve_args.
1598
15992022-04-12  Jason Merrill  <jason@redhat.com>
1600
1601          PR c++/104142
1602          * decl.cc (check_initializer): Check TREE_SIDE_EFFECTS.
1603
16042022-04-12  Jason Merrill  <jason@redhat.com>
1605
1606          PR c++/105223
1607          PR c++/92918
1608          * class.cc (finish_struct): Always using op=.
1609
16102022-04-11  Jason Merrill  <jason@redhat.com>
1611
1612          PR c++/98249
1613          * call.cc (build_operator_new_call): Just look in ::.
1614
16152022-04-11  Alexandre Oliva  <oliva@adacore.com>
1616
1617          * constexpr.cc (cxx_eval_call_expression): Disregard dtor
1618          result.
1619
16202022-04-11  Alexandre Oliva  <oliva@adacore.com>
1621
1622          * semantics.cc (set_cleanup_locs): Propagate locus to call
1623          wrapped in cast-to-void.
1624
16252022-04-11  Jason Merrill  <jason@redhat.com>
1626
1627          PR c++/100370
1628          * init.cc (warn_placement_new_too_small): Check deref.
1629
16302022-04-09  Jason Merrill  <jason@redhat.com>
1631
1632          PR c++/105191
1633          PR c++/92385
1634          * tree.cc (build_vec_init_elt): Do {}-init for aggregates.
1635          * constexpr.cc (cxx_eval_vec_init): Only treat {} as value-init
1636          for non-aggregate types.
1637          (build_vec_init_expr): Also check constancy of explicit
1638          initializer elements.
1639
16402022-04-09  Jason Merrill  <jason@redhat.com>
1641
1642          PR c++/91618
1643          PR c++/96604
1644          * name-lookup.cc (set_decl_namespace): Set
1645          DECL_IMPLICIT_INSTANTIATION if no non-template match.
1646          * pt.cc (check_explicit_specialization): Check it.
1647          * decl2.cc (check_classfn): Call it.
1648
16492022-04-07  Patrick Palka  <ppalka@redhat.com>
1650
1651          PR c++/99479
1652          * name-lookup.cc (name_lookup::using_queue): Change to an
1653          auto_vec (with 16 elements of internal storage).
1654          (name_lookup::queue_namespace): Change return type to void,
1655          take queue parameter by reference and adjust function body
1656          accordingly.
1657          (name_lookup::do_queue_usings): Inline into ...
1658          (name_lookup::queue_usings): ... here.  As in queue_namespace.
1659          (name_lookup::search_unqualified): Don't make queue static,
1660          remove length variable, and adjust function body accordingly.
1661
16622022-04-07  Jakub Jelinek  <jakub@redhat.com>
1663
1664          PR tree-optimization/102586
1665          * cp-objcp-common.h (cp_classtype_as_base): Declare.
1666          (LANG_HOOKS_CLASSTYPE_AS_BASE): Redefine.
1667          * cp-objcp-common.cc (cp_classtype_as_base): New function.
1668
16692022-04-07  Jason Merrill  <jason@redhat.com>
1670
1671          PR c++/101051
1672          * decl.cc (grokdeclarator): Reject conversion with trailing return
1673          sooner.
1674
16752022-04-07  Jason Merrill  <jason@redhat.com>
1676
1677          PR c++/101717
1678          * lambda.cc (lambda_expr_this_capture): Check all enclosing
1679          lambdas for completeness.
1680
16812022-04-07  Jason Merrill  <jason@redhat.com>
1682
1683          PR c++/105187
1684          * typeck2.cc (store_init_value): Allow TREE_HAS_CONSTRUCTOR for
1685          vectors.
1686
16872022-04-06  Jakub Jelinek  <jakub@redhat.com>
1688
1689          PR c++/104668
1690          * decl2.cc (splice_template_attributes): Return NULL if *p is
1691          error_mark_node.
1692          (cplus_decl_attributes): Return early if attributes is
1693          error_mark_node.  Don't check that later.
1694
16952022-04-06  Patrick Palka  <ppalka@redhat.com>
1696
1697          PR c++/105143
1698          * pt.cc (do_class_deduction): Check complain before attempting
1699          to issue a -Wctad-maybe-unsupported warning.
1700
17012022-04-06  Jason Merrill  <jason@redhat.com>
1702
1703          PR c++/104702
1704          * init.cc (build_vec_init): Use a reference for the result.
1705
17062022-04-06  Jason Merrill  <jason@redhat.com>
1707
1708          PR c++/100608
1709          * name-lookup.cc (check_local_shadow): Use -Wshadow=local
1710          if exactly one of 'old' and 'decl' is a type.
1711
17122022-04-05  Jason Merrill  <jason@redhat.com>
1713
1714          PR c++/103852
1715          DR 1286
1716          * pt.cc (do_class_deduction): Pedwarn for renaming alias in C++17.
1717
17182022-04-05  Jason Merrill  <jason@redhat.com>
1719
1720          PR c++/101677
1721          * name-lookup.h (struct cp_binding_level): Add requires_expression
1722          bit-field.
1723          * parser.cc (cp_parser_requires_expression): Set it.
1724          (synthesize_implicit_template_parm): Check it.
1725
17262022-04-04  Jason Merrill  <jason@redhat.com>
1727
1728          PR c++/101894
1729          * decl.cc (duplicate_decls): Copy DECL_FRIEND_CONTEXT.
1730
17312022-04-04  Jason Merrill  <jason@redhat.com>
1732
1733          PR c++/103852
1734          DR 1286
1735          * pt.cc (get_underlying_template): Compare default template args.
1736
17372022-04-03  Benno Evers  <benno.evers@tenzir.com>
1738              Iain Sandoe  <iain@sandoe.co.uk>
1739
1740          PR c++/103328
1741          * coroutines.cc (morph_fn_to_coro): Reset
1742          current_binding_level->blocks.
1743
17442022-04-01  Jason Merrill  <jason@redhat.com>
1745
1746          Revert:
1747          2022-03-31  Jason Merrill  <jason@redhat.com>
1748
1749          PR c++/96645
1750          * parser.cc (cp_parser_early_parsing_nsdmi): New.
1751          (cp_parser_member_declaration): Call it.
1752
17532022-04-01  Jason Merrill  <jason@redhat.com>
1754
1755          Revert:
1756          2022-03-24  Jason Merrill  <jason@redhat.com>
1757
1758          PR c++/96645
1759          * cp-tree.h (type_has_default_ctor_to_be_synthesized): Declare.
1760          * class.cc (type_has_default_ctor_to_be_synthesized): New.
1761          (type_has_non_user_provided_default_constructor_1): Support it.
1762          (type_has_non_user_provided_default_constructor): Now a wrapper.
1763          * method.cc (complain_about_unparsed_dmi): New.
1764          (constructible_expr): Call it.
1765
17662022-04-01  Patrick Palka  <ppalka@redhat.com>
1767
1768          PR c++/105110
1769          * pt.cc (unify) <case TEMPLATE_PARM_INDEX>: Drop cv-quals from
1770          the argument type of an NTTP before deducing from it.
1771
17722022-03-31  Jason Merrill  <jason@redhat.com>
1773
1774          PR c++/96645
1775          * parser.cc (cp_parser_early_parsing_nsdmi): New.
1776          (cp_parser_member_declaration): Call it.
1777
17782022-03-30  Patrick Palka  <ppalka@redhat.com>
1779
1780          PR c++/100474
1781          * constraint.cc (diagnose_trait_expr): Handle all remaining
1782          traits appropriately.  Remove default case.
1783
17842022-03-30  Marek Polacek  <polacek@redhat.com>
1785
1786          PR c++/93280
1787          PR c++/104583
1788          * init.cc (get_nsdmi): Set TARGET_EXPR_DIRECT_INIT_P to in_ctor.
1789
17902022-03-30  Jakub Jelinek  <jakub@redhat.com>
1791
1792          PR c++/105092
1793          * pt.cc (tsubst_omp_clause_decl): When handling iterators, set
1794          DECL_CONTEXT of the iterator var to current_function_decl and
1795          call pushdecl.
1796
17972022-03-30  Jakub Jelinek  <jakub@redhat.com>
1798
1799          PR c++/105061
1800          * parser.cc (cp_parser_template_introduction): If member_p, temporarily
1801          clear parser->colon_corrects_to_scope_p around tentative parsing of
1802          nested name specifier.
1803
18042022-03-28  Jason Merrill  <jason@redhat.com>
1805
1806          * pt.cc (determine_specialization): Add comment.
1807
18082022-03-28  Patrick Palka  <ppalka@redhat.com>
1809
1810          PR c++/105067
1811          * pt.cc (finish_concept_definition): Check that a concept is
1812          declared with exactly one template parameter list.
1813
18142022-03-28  Patrick Palka  <ppalka@redhat.com>
1815
1816          PR c++/105064
1817          * constraint.cc (maybe_substitute_reqs_for): Don't assume
1818          DECL_TEMPLATE_INFO is available.
1819
18202022-03-28  Jason Merrill  <jason@redhat.com>
1821
1822          PR c++/105003
1823          PR c++/104008
1824          PR c++/102869
1825          * pt.cc (complex_alias_template_r): walk_tree callback,     replacing
1826          uses_all_template_parms_r, complex_pack_expansion_r.
1827          (complex_alias_template_p): Adjust.
1828          * tree.cc (strip_typedefs): Revert r12-7710 change.
1829
18302022-03-28  Jason Merrill  <jason@redhat.com>
1831
1832          PR c++/102071
1833          * init.cc (build_new_1): Include cookie in alignment.  Omit
1834          constexpr wrapper from alloc_call.
1835
18362022-03-28  Jason Merrill  <jason@redhat.com>
1837
1838          PR c++/103291
1839          * name-lookup.cc (push_local_extern_decl_alias): Call
1840          determine_visibility.
1841
18422022-03-28  Jason Merrill  <jason@redhat.com>
1843
1844          PR c++/102123
1845          * pt.cc (tsubst_copy): Use make_unbound_class_template for rewriting
1846          a type template reference.
1847
18482022-03-28  Jason Merrill  <jason@redhat.com>
1849
1850          PR c++/103968
1851          * pt.cc (value_dependent_expression_p): Check
1852          has_value_dependent_address for conversion to reference.
1853
18542022-03-28  Jason Merrill  <jason@redhat.com>
1855
1856          PR c++/103943
1857          * pt.cc (tsubst_qualified_id): Handle getting SCOPE_REF from
1858          tsubst_baselink.
1859          (instantiation_dependent_scope_ref_p): Check dependent_scope_p.
1860
18612022-03-28  Jason Merrill  <jason@redhat.com>
1862
1863          PR c++/102045
1864          * call.cc (make_base_init_ok): Call make_used.
1865
18662022-03-28  Jason Merrill  <jason@redhat.com>
1867
1868          PR c++/104847
1869          * mangle.cc (write_expression): Don't write a union designator when
1870          undigested.
1871
18722022-03-28  Jason Merrill  <jason@redhat.com>
1873
1874          PR c++/99445
1875          PR c++/103769
1876          * tree.cc (strip_typedefs): Use build_distinct_type_copy.
1877
18782022-03-26  Patrick Palka  <ppalka@redhat.com>
1879
1880          PR c++/105050
1881          * constexpr.cc (potential_constant_expression_1) <case IF_STMT>:
1882          Clarify error message when a if-stmt is non-constant because its
1883          branches are non-constant.
1884
18852022-03-26  Patrick Palka  <ppalka@redhat.com>
1886
1887          PR c++/103455
1888          * call.cc (add_builtin_candidate) <case MEMBER_REF>: Test
1889          CLASS_TYPE_P instead of MAYBE_CLASS_TYPE_P.
1890
18912022-03-26  Jakub Jelinek  <jakub@redhat.com>
1892
1893          * parser.cc (cp_parser_postfix_expression)
1894          <case RID_BILTIN_CONVERTVECTOR, case RID_BUILTIN_BIT_CAST>: Don't
1895          return cp_build_{vec,convert,bit_cast} result right away, instead
1896          set postfix_expression to it and break.
1897
18982022-03-25  Marek Polacek  <polacek@redhat.com>
1899
1900          PR c++/104944
1901          * typeck.cc (cxx_sizeof_or_alignof_type): Diagnose alignof(void).
1902          (cxx_alignas_expr): Call cxx_sizeof_or_alignof_type with
1903          complain == true.
1904
19052022-03-24  Marek Polacek  <polacek@redhat.com>
1906
1907          PR c++/104284
1908          * decl.cc (check_initializer): Don't call build_aggr_init in
1909          a template.
1910
19112022-03-24  Jason Merrill  <jason@redhat.com>
1912
1913          PR c++/96645
1914          * cp-tree.h (type_has_default_ctor_to_be_synthesized): Declare.
1915          * class.cc (type_has_default_ctor_to_be_synthesized): New.
1916          (type_has_non_user_provided_default_constructor_1): Support it.
1917          (type_has_non_user_provided_default_constructor): Now a wrapper.
1918          * method.cc (complain_about_unparsed_dmi): New.
1919          (constructible_expr): Call it.
1920
19212022-03-24  Marek Polacek  <polacek@redhat.com>
1922
1923          PR c++/102990
1924          * typeck2.cc (massage_init_elt): Avoid folding CONSTRUCTORs.
1925
19262022-03-24  Patrick Palka  <ppalka@redhat.com>
1927
1928          PR c++/104620
1929          * call.cc (build_over_call): Use cxx_constant_value_sfinae
1930          instead of cxx_constant_value to evaluate a consteval call.
1931          * constexpr.cc (cxx_constant_value_sfinae): Add decl parameter
1932          and pass it to cxx_eval_outermost_constant_expr.
1933          * cp-tree.h (cxx_constant_value_sfinae): Add decl parameter.
1934          * pt.cc (fold_targs_r): Pass NULL_TREE as decl parameter to
1935          cxx_constant_value_sfinae.
1936
19372022-03-24  Jakub Jelinek  <jakub@redhat.com>
1938
1939          PR c++/104994
1940          * constexpr.cc (cxx_eval_constant_expression): Don't diagnose passing
1941          through extern thread_local declarations.  Change wording from
1942          declaration to definition.
1943          (potential_constant_expression_1): Don't diagnose extern thread_local
1944          declarations.  Change wording from declared to defined.
1945          * decl.cc (start_decl): Likewise.
1946
19472022-03-23  Jason Merrill  <jason@redhat.com>
1948
1949          PR c++/103337
1950          * decl.cc (reshape_single_init): New.
1951          (reshape_init_class): Use it.
1952
19532022-03-23  Jason Merrill  <jason@redhat.com>
1954
1955          PR c++/105006
1956          * name-lookup.cc (lookup_using_decl): Check that scope is
1957          a dependent type before looking for dependent using.
1958
19592022-03-23  Jason Merrill  <jason@redhat.com>
1960
1961          PR c++/105006
1962          * name-lookup.cc (lookup_using_decl): Set DECL_DEPENDENT_P if lookup
1963          finds a dependent using.
1964
19652022-03-21  Jason Merrill  <jason@redhat.com>
1966
1967          PR c++/58646
1968          * init.cc (build_vec_init): Check for vla element type.
1969
19702022-03-21  Jason Merrill  <jason@redhat.com>
1971
1972          PR c++/103337
1973          PR c++/102740
1974          PR c++/103299
1975          PR c++/102538
1976          * decl.cc (reshape_init_class): Avoid looking for designator
1977          after we found it.
1978          (reshape_init_r): Keep looking for designator.
1979
19802022-03-21  Jason Merrill  <jason@redhat.com>
1981
1982          PR c++/101767
1983          * decl.cc (reshape_init_class): Back out of anon struct
1984          if a designator doesn't match.
1985
19862022-03-18  Jason Merrill  <jason@redhat.com>
1987
1988          PR c++/92918
1989          PR c++/104476
1990          * class.cc (add_method): Avoid adding the same used function twice.
1991          (handle_using_decl): Don't add_method.
1992          (finish_struct): Don't using op= if we have one already.
1993          (maybe_push_used_methods): New.
1994          * semantics.cc (finish_member_declaration): Call it.
1995          * name-lookup.cc (diagnose_name_conflict): No longer static.
1996          (push_class_level_binding): Revert 92918 patch, limit
1997          to dependent using.
1998          * cp-tree.h: Adjust.
1999
20002022-03-18  Jakub Jelinek  <jakub@redhat.com>
2001
2002          PR c++/104568
2003          * init.cc (build_new_constexpr_heap_type): Remove FULL_SIZE
2004          argument and its handling, instead add ITYPE2 argument.  Only
2005          support COOKIE_SIZE != NULL.
2006          (build_new_1): If size is 0, change it to 0 * outer_nelts if
2007          outer_nelts is non-NULL.  Pass type rather than elt_type to
2008          maybe_wrap_new_for_constexpr.
2009          * constexpr.cc (build_new_constexpr_heap_type): New function.
2010          (cxx_eval_constant_expression) <case CONVERT_EXPR>:
2011          If elt_size is zero sized type, try to recover outer_nelts from
2012          the size argument to operator new/new[] and pass that as
2013          arg_size to build_new_constexpr_heap_type.  Pass ctx,
2014          non_constant_p and overflow_p to that call too.
2015
20162022-03-18  Marek Polacek  <polacek@redhat.com>
2017
2018          PR c++/104008
2019          * tree.cc (strip_typedefs): Don't strip an alias template when
2020          doing so would result in losing a parameter pack.
2021
20222022-03-16  Patrick Palka  <ppalka@redhat.com>
2023
2024          * search.cc (lookup_member): Simplify by handling all values
2025          of protect together in the ambiguous case.  Don't modify protect.
2026
20272022-03-16  Patrick Palka  <ppalka@redhat.com>
2028
2029          PR c++/96780
2030          * cp-gimplify.cc (cp_fold) <case CALL_EXPR>: Fold calls to
2031          std::move/forward and other cast-like functions into simple
2032          casts.
2033
20342022-03-15  Patrick Palka  <ppalka@redhat.com>
2035
2036          PR c++/103177
2037          * search.cc (lookup_field_info::errstr): Remove this data
2038          member.
2039          (lookup_field_r): Don't set errstr.
2040          (lookup_member): Check ambiguity before checking access.
2041          Simplify accordingly after errstr removal.  Exit early upon
2042          error or empty result.
2043
20442022-03-15  Jakub Jelinek  <jakub@redhat.com>
2045
2046          PR c++/104623
2047          * parser.cc (cp_parser_skip_to_pragma_eol): Don't purge any tokens.
2048
20492022-03-14  Jakub Jelinek  <jakub@redhat.com>
2050
2051          PR tree-optimization/102586
2052          * call.cc (build_cxx_call): Diagnose __builtin_clear_padding where
2053          first argument's type is pointer to non-trivially-copyable type unless
2054          it is address of a variable or parameter.
2055
20562022-03-12  Patrick Palka  <ppalka@redhat.com>
2057
2058          PR c++/104641
2059          * cp-tree.h (tsubst_flags::tf_tst_ok): New flag.
2060          * decl.cc (make_typename_type): Allow a typename-specifier to
2061          resolve to a template when tf_tst_ok, in which case return
2062          a CTAD placeholder for the template.
2063          * pt.cc (tsubst_decl) <case VAR_DECL>: Set tf_tst_ok when
2064          substituting the type.
2065          (tsubst): Clear tf_tst_ok and remember if it was set.
2066          <case TYPENAME_TYPE>: Pass tf_tst_ok to make_typename_type
2067          appropriately.
2068          (tsubst_copy) <case CAST_EXPR>: Set tf_tst_ok when substituting
2069          the type.
2070          (tsubst_copy_and_build) <case CAST_EXPR>: Likewise.
2071          <case CONSTRUCTOR>: Likewise.
2072
20732022-03-12  Patrick Palka  <ppalka@redhat.com>
2074
2075          PR c++/104622
2076          * call.cc (missing_conversion_p): Define.
2077          (add_candidates): Use it.
2078          * pt.cc (check_non_deducible_conversion): Change type of strict
2079          parameter to unification_kind_t and directly test for DEDUCE_CALL.
2080
20812022-03-12  Patrick Palka  <ppalka@redhat.com>
2082
2083          PR c++/104527
2084          * constraint.cc (normalize_atom): Set
2085          ATOMIC_CONSTR_EXPR_FROM_CONCEPT_P appropriately.
2086          (get_mapped_args):  Make static, adjust parameters.  Always
2087          return a vector whose depth corresponds to the template depth of
2088          the context of the atomic constraint expression.  Micro-optimize
2089          by passing false as exact to safe_grow_cleared and by collapsing
2090          a multi-level depth-one argument vector.
2091          (satisfy_atom): Adjust call to get_mapped_args and
2092          diagnose_atomic_constraint.
2093          (diagnose_atomic_constraint): Replace map parameter with an args
2094          parameter.
2095          * cp-tree.h (ATOMIC_CONSTR_EXPR_FROM_CONCEPT_P): Define.
2096          (get_mapped_args): Remove declaration.
2097
20982022-03-12  Patrick Palka  <ppalka@redhat.com>
2099              Jason Merrill  <jason@redhat.com>
2100
2101          PR c++/98644
2102          * constexpr.cc (mark_non_constant): Define, split out from ...
2103          (cxx_eval_outermost_constant_expr): ... here.
2104          (maybe_constant_value): Use it.
2105
21062022-03-12  Patrick Palka  <ppalka@redhat.com>
2107
2108          * semantics.cc (finish_unary_fold_expr): Use input_location
2109          instead of UNKNOWN_LOCATION.
2110          (finish_binary_fold_expr): Likewise.
2111
21122022-03-12  Thomas Schwinge  <thomas@codesourcery.com>
2113
2114          PR other/65095
2115          * semantics.cc (handle_omp_array_sections_1)
2116          (cp_oacc_check_attachments): Call 'user_omp_clause_code_name'
2117          instead of 'c_omp_map_clause_name'.
2118
21192022-03-10  Marek Polacek  <polacek@redhat.com>
2120
2121          PR c++/104608
2122          * parser.cc (cp_parser_template_name): Repeat lookup of
2123          TYPE_DECLs.
2124
21252022-03-10  Marek Polacek  <polacek@redhat.com>
2126
2127          PR c++/104752
2128          * semantics.cc (finish_compound_literal): Disallow auto{x} for
2129          is_constrained_auto.
2130          * typeck2.cc (build_functional_cast_1): Likewise.
2131
21322022-03-10  Marek Polacek  <polacek@redhat.com>
2133
2134          PR c++/104846
2135          * decl.cc (grokdeclarator): Check FUNC_OR_METHOD_TYPE_P before giving
2136          data member errors.
2137
21382022-03-10  Jakub Jelinek  <jakub@redhat.com>
2139
2140          PR c++/103460
2141          * decl.cc (grok_op_properties): Allow variadic operator[] for
2142          C++23.
2143
21442022-03-10  Roger Sayle  <roger@nextmovesoftware.com>
2145
2146          PR c++/95999
2147          * decl.cc (finish_enum_value_list): If VALUE isn't an INTEGER_CST
2148          consider it to be zero (i.e. treat it like error_mark_node).
2149          (build_enumerator): Likewise, if PREV_VALUE isn't an INTEGER_CST,
2150          set VALUE to error_mark_node.
2151
21522022-03-10  Roger Sayle  <roger@nextmovesoftware.com>
2153
2154          PR c++/39751
2155          * parser.cc (cp_parser_late_parsing_for_member): Confirm the token
2156          stream hasn't been purged before processing DECL_PENDING_INLINE.
2157
21582022-03-09  Patrick Palka  <ppalka@redhat.com>
2159
2160          PR c++/104823
2161          * except.cc (build_noexcept_spec): Strengthen dependence check
2162          to instantiation_dependent_expression_p.
2163          * parser.cc (cp_parser_parenthesized_expression_list_elt):
2164          Remove fold_expr_p parameter, and don't call
2165          instantiate_non_dependent_expr.
2166          (cp_parser_parenthesized_expression_list): Adjust accordingly.
2167          * pt.cc (expand_integer_pack): Strengthen dependence check
2168          to instantiation_dependent_expression_p.
2169          (instantiate_non_dependent_expr_internal): Adjust comment.
2170          (instantiate_non_dependent_expr_sfinae): Likewise.  Drop
2171          the potentially-constant check, and relax and turn the
2172          dependence check into a checking assert.
2173          (instantiate_non_dependent_or_null): Adjust comment.
2174          * semantics.cc (finish_decltype_type): Keep
2175          processing_template_decl cleared after calling
2176          instantiate_non_dependent_expr_sfinae.
2177
21782022-03-09  Patrick Palka  <ppalka@redhat.com>
2179
2180          PR c++/102137
2181          PR c++/87820
2182          * cp-tree.h (is_copy_initialization): Declare.
2183          * decl.cc (cp_finish_decl): Set LOOKUP_ONLYCONVERTING
2184          when is_copy_initialization is true.
2185          * init.cc (build_aggr_init): Split out copy-initialization
2186          check into ...
2187          (is_copy_initialization): ... here.
2188          * pt.cc (instantiate_decl): Pass 0 instead of
2189          LOOKUP_ONLYCONVERTING as flags to cp_finish_decl.
2190
21912022-03-09  Patrick Palka  <ppalka@redhat.com>
2192
2193          PR c++/65396
2194          * cp-tree.h (merge_default_template_args): Declare.
2195          * decl.cc (merge_default_template_args): Define, factored out
2196          from redeclare_class_template.
2197          (duplicate_decls): Use it when merging member function template
2198          and free function declarations.
2199          * pt.cc (redeclare_class_template): Factor out default argument
2200          merging logic into merge_default_template_args.  Improve location
2201          of a note when there's a template parameter kind mismatch.
2202
22032022-03-09  Jakub Jelinek  <jakub@redhat.com>
2204
2205          PR c/104711
2206          * constexpr.cc (cxx_eval_check_shift_p): Use TYPE_OVERFLOW_WRAPS
2207          instead of TYPE_UNSIGNED.
2208          * typeck.cc (cp_build_binary_op): Don't emit
2209          -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
2210
22112022-03-08  Roger Sayle  <roger@nextmovesoftware.com>
2212
2213          PR c++/96440
2214          * decl.cc (start_decl): Defend against prefix_attributes being
2215          error_mark_node.
2216
22172022-03-08  Roger Sayle  <roger@nextmovesoftware.com>
2218
2219          PR c++/96437
2220          * parser.cc (synthesize_implicit_template_parm): Check that
2221          TREE_VALUE (new_parm) isn't error_mark_node before setting its
2222          DECL_VIRTUAL_P.
2223
22242022-03-08  Roger Sayle  <roger@nextmovesoftware.com>
2225
2226          PR c++/96329
2227          * parser.cc (cp_parser_linkage_specification): Treat the case where
2228          linkage is error_mark_node as "invalid linkage-specification".
2229
22302022-03-08  Marek Polacek  <polacek@redhat.com>
2231
2232          PR c++/104108
2233          * pt.cc (convert_nontype_argument): Recompute
2234          value_dependent_expression_p after build_converted_constant_expr.
2235
22362022-03-08  Marek Polacek  <polacek@redhat.com>
2237
2238          * decl2.cc (is_late_template_attribute): Do not defer attribute
2239          unavailable.
2240          * pt.cc (tsubst_enum): Set TREE_UNAVAILABLE.
2241
22422022-03-08  Jakub Jelinek  <jakub@redhat.com>
2243
2244          PR c++/104806
2245          * search.cc (lookup_field_fuzzy_info::fuzzy_lookup_field): Ignore
2246          identifiers with space at the end.
2247
22482022-03-07  Jason Merrill  <jason@redhat.com>
2249
2250          PR c++/104618
2251          * decl2.cc (mark_single_function): Look through parens and location
2252          wrapper.
2253          * typeck.cc (cp_build_addr_expr_1): Not here.
2254
22552022-03-07  Jakub Jelinek  <jakub@redhat.com>
2256
2257          * parser.cc (cp_parser_omp_clause_map): Add missing space in string
2258          literal.
2259
22602022-03-07  Jakub Jelinek  <jakub@redhat.com>
2261
2262          * cvt.cc: Fix up duplicated word issue in a comment.
2263          * pt.cc: Likewise.
2264          * module.cc: Likewise.
2265          * coroutines.cc: Likewise.
2266
22672022-03-04  Nathan Sidwell  <nathan@acm.org>
2268
2269          * mangle.cc (is_std_substitution): Check global module.
2270          (is_std_substitution_char): Return bool.
2271
22722022-03-04  Nathan Sidwell  <nathan@acm.org>
2273
2274          * cp-tree.h (mangle_identifier): Replace with ...
2275          (mangle_module_component): ... this.
2276          * mangle.cc (dump_substitution_candidates): Adjust.
2277          (add_substitution): Likewise.
2278          (find_substitution): Likewise.
2279          (unmangled_name_p): Likewise.
2280          (mangle_module_substitution): Reimplement.
2281          (mangle_module_component): New.
2282          (write_module, maybe_write_module): Adjust.
2283          (write_name): Drop modules here.
2284          (write_unqualified): Do them here instead.
2285          (mangle_global_init): Adjust.
2286          * module.cc (module_state::mangle): Adjust.
2287          (mangle_module): Likewise.
2288          (get_originating_module): Adjust.
2289
22902022-02-28  Marek Polacek  <polacek@redhat.com>
2291
2292          PR c++/104682
2293          * cp-tree.h (build_enumerator): Adjust.
2294          * decl.cc (finish_enum): Make it return the new decl.
2295          * pt.cc (tsubst_enum): Propagate TREE_DEPRECATED and TREE_UNAVAILABLE.
2296
22972022-02-28  Marek Polacek  <polacek@redhat.com>
2298
2299          PR c++/104667
2300          * decl2.cc (is_late_template_attribute): Cope with a decl without
2301          a type.
2302
23032022-02-27  Jason Merrill  <jason@redhat.com>
2304
2305          PR c++/104618
2306          * typeck.cc (cp_build_addr_expr_1): Also
2307          maybe_undo_parenthesized_ref.
2308
23092022-02-24  Martin Liska  <mliska@suse.cz>
2310
2311          * pt.cc (defarg_insts_for): Use braces for subobject.
2312
23132022-02-18  Patrick Palka  <ppalka@redhat.com>
2314
2315          PR c++/94944
2316          * pt.cc (maybe_instantiate_noexcept): For non-static member
2317          functions, set current_class_ptr/ref to the specialized 'this'
2318          instead.
2319
23202022-02-17  Jason Merrill  <jason@redhat.com>
2321
2322          PR c++/104539
2323          * pt.cc (mark_decl_instantiated): Don't clear DECL_COMDAT.
2324
23252022-02-17  Jason Merrill  <jason@redhat.com>
2326
2327          PR c++/90451
2328          * decl2.cc (mark_single_function): New.
2329          * cp-tree.h: Declare it.
2330          * typeck.cc (cp_build_addr_expr_1): mark_used when making a PMF.
2331          * semantics.cc (finish_qualified_id_expr): Not here.
2332          (finish_id_expression_1): Or here.
2333          (finish_decltype_type): Call mark_single_function.
2334          * cvt.cc (convert_to_void): And here.
2335          * pt.cc (convert_nontype_argument): And here.
2336          * init.cc (build_offset_ref): Adjust assert.
2337
23382022-02-17  Patrick Palka  <ppalka@redhat.com>
2339
2340          PR c++/104565
2341          * semantics.cc (finish_compound_literal): Don't perform
2342          non-dependent expr folding before calling check_narrowing.
2343
23442022-02-16  Patrick Palka  <ppalka@redhat.com>
2345
2346          PR c++/104507
2347          * constexpr.cc (potential_constant_expression_1)
2348          <case NON_DEPENDENT_EXPR>: Return false instead of recursing.
2349          Assert tf_error isn't set.
2350
23512022-02-15  Jason Merrill  <jason@redhat.com>
2352
2353          PR c++/104107
2354          PR c++/95036
2355          * pt.cc (coerce_template_template_parms): Take full parms.
2356          Avoid adding too much of outer_args.
2357          (coerce_template_template_parm): Adjust.
2358          (template_template_parm_bindings_ok_p): Adjust.
2359          (convert_template_argument): Adjust.
2360
23612022-02-14  Jakub Jelinek  <jakub@redhat.com>
2362
2363          PR c++/104513
2364          * constexpr.cc (potential_constant_expression_1) <case GOTO_EXPR>:
2365          Don't punt if returns (target).
2366
23672022-02-11  Jakub Jelinek  <jakub@redhat.com>
2368
2369          PR c++/104472
2370          * constexpr.cc (cxx_eval_internal_function) <case IFN_VEC_CONVERT>:
2371          Only return fold_const_call result if it is non-NULL.  Otherwise
2372          fall through into the default: case to return t, set *non_constant_p
2373          and emit diagnostics if needed.
2374
23752022-02-10  Jason Merrill  <jason@redhat.com>
2376
2377          * module.cc (depset::hash::add_specializations): Use
2378          STRIP_TEMPLATE.
2379
23802022-02-10  Tobias Burnus  <tobias@codesourcery.com>
2381
2382          PR c++/102204
2383          * decl2.cc (cp_omp_mappable_type_1): Remove check for virtual
2384          members as those are permitted since OpenMP 5.0.
2385
23862022-02-10  Patrick Palka  <ppalka@redhat.com>
2387
2388          * pt.cc (filter_memfn_lookup): Handle dependent USING_DECL
2389          better.
2390
23912022-02-10  Marcel Vollweiler  <marcel@codesourcery.com>
2392
2393          * parser.cc (cp_parser_omp_clause_name): Parse 'has_device_addr' clause.
2394          (cp_parser_omp_var_list_no_open): Handle array sections.
2395          (cp_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
2396          case.
2397          (cp_parser_omp_target_update): Added HAS_DEVICE_ADDR to OMP_CLAUSE_MASK.
2398          * semantics.cc (handle_omp_array_sections): Handle clause restrictions.
2399          (finish_omp_clauses): Handle array sections.
2400
24012022-02-09  Patrick Palka  <ppalka@redhat.com>
2402
2403          PR c++/104432
2404          * call.cc (build_new_method_call): When a non-dependent call
2405          resolves to a specialization of a member template, always build
2406          the pruned overload set using the member template, not the
2407          specialization.
2408          * pt.cc (filter_memfn_lookup): New parameter newtype.  Simplify
2409          and correct how members from the new lookup set are matched to
2410          those from the old one.
2411          (tsubst_baselink): Pass binfo_type as newtype to
2412          filter_memfn_lookup.
2413
24142022-02-09  Jason Merrill  <jason@redhat.com>
2415
2416          PR c++/103752
2417          * module.cc (trees_out::core_vals): Stream explicit specifier.
2418          (trees_in::core_vals): Likewise.
2419          * pt.cc (store_explicit_specifier): No longer static.
2420          (tsubst_function_decl): Clear DECL_HAS_DEPENDENT_EXPLICIT_SPEC_P.
2421          * cp-tree.h (lookup_explicit_specifier): Declare.
2422
24232022-02-09  Jason Merrill  <jason@redhat.com>
2424
2425          PR c++/96876
2426          * typeck2.cc (split_nonconstant_init_1): Push cleanups for
2427          preceding members with constant initialization.
2428          (maybe_push_temp_cleanup): Do nothing if -fno-exceptions.
2429
24302022-02-08  Jakub Jelinek  <jakub@redhat.com>
2431
2432          PR c++/104379
2433          * name-lookup.cc (check_local_shadow): When diagnosing shadowing
2434          of a member or global declaration, add warning suppression for
2435          the decl and don't warn again on it.
2436
24372022-02-08  Jakub Jelinek  <jakub@redhat.com>
2438
2439          PR c++/104403
2440          * constexpr.cc (cxx_eval_constant_expression): Don't assert DECL_EXPRs
2441          of TREE_STATIC vars may only appear in -std=c++23.
2442
24432022-02-08  Patrick Palka  <ppalka@redhat.com>
2444
2445          PR c++/80951
2446          * pt.cc (uses_deducible_template_parms): Consider the
2447          noexcept-spec of a function type.
2448
24492022-02-08  Patrick Palka  <ppalka@redhat.com>
2450
2451          PR c++/104410
2452          * constraint.cc (satisfaction_value): Relax assert to accept
2453          cv-qualified bool.
2454
24552022-02-08  Patrick Palka  <ppalka@redhat.com>
2456
2457          PR c++/103706
2458          * pt.cc (preserve_args): New function.
2459          (tsubst_lambda_expr): Use it when setting LAMBDA_EXPR_REGEN_INFO.
2460
24612022-02-08  Patrick Palka  <ppalka@redhat.com>
2462
2463          PR c++/103706
2464          * constraint.cc (satisfy_declaration_constraints): Use
2465          lambda_regenerating_args instead.
2466          * cp-tree.h (lambda_regenerating_args): Declare.
2467          * pt.cc (lambda_regenerating_args): Define, split out from
2468          satisfy_declaration_constraints.
2469          (do_auto_deduction): Use lambda_regenerating_args to obtain the
2470          full set of outer template arguments for satisfaction when
2471          inside a lambda.
2472
24732022-02-06  Patrick Palka  <ppalka@redhat.com>
2474
2475          PR c++/96242
2476          * decl2.cc (mark_used): Directly synthesize a DECL_MAYBE_DELETED
2477          fn by calling maybe_synthesize_method instead of relying on
2478          maybe_instantiate_noexcept.  Move call to m_i_n after the
2479          DECL_DELETED_FN handling.
2480          * pt.cc (maybe_instantiate_noexcept): Restrict DECL_MAYBE_DELETED
2481          fn synthesis to only those with an implicit noexcept-spec, and
2482          return !DECL_DELETED_FN instead of !DECL_MAYBE_DELETED afterwards.
2483
24842022-02-06  Jakub Jelinek  <jakub@redhat.com>
2485
2486          PR c++/89074
2487          PR c++/104033
2488          * constexpr.cc (cxx_eval_binary_expression): Temporarily set
2489          folding_cxx_constexpr.
2490
24912022-02-05  Jason Merrill  <jason@redhat.com>
2492
2493          PR c++/104300
2494          PR c++/92385
2495          * cp-tree.h (get_vec_init_expr): New.
2496          (target_expr_needs_replace): New.
2497          * cp-gimplify.cc (cp_gimplify_init_expr): Use it.
2498          (struct cp_fold_data): New.
2499          (cp_fold_r): Only genericize inits at end of fn.
2500          (cp_fold_function): Here.
2501          (cp_fully_fold_init): Not here.
2502          * init.cc (build_vec_init): Use get_vec_init_expr.
2503          * tree.cc (build_vec_init_expr): Likewise.
2504          * typeck2.cc (split_nonconstant_init_1): Likewise.
2505          (process_init_constructor): Wrap VEC_INIT_EXPR in
2506          TARGET_EXPR.
2507
25082022-02-05  Jason Merrill  <jason@redhat.com>
2509
2510          * pt.cc (iterative_hash_template_arg): Add comment.
2511
25122022-02-03  Patrick Palka  <ppalka@redhat.com>
2513
2514          PR c++/104079
2515          * pt.cc (value_dependent_noexcept_spec_p): New predicate split
2516          out from ...
2517          (dependent_type_p_r): ... here.
2518          (instantiation_dependent_r): Use value_dependent_noexcept_spec_p
2519          to consider dependence of a noexcept-spec before C++17.
2520          * tree.cc (fixup_deferred_exception_variants): Clear
2521          TYPE_DEPENDENT_P_VALID.
2522
25232022-02-03  Jason Merrill  <jason@redhat.com>
2524
2525          PR c++/104302
2526          * decl.cc (maybe_deduce_size_from_array_init): Give up
2527          on type-dependent init.
2528          (cp_complete_array_type): Only call reshape_init for character
2529          array.
2530
25312022-02-01  Jason Merrill  <jason@redhat.com>
2532
2533          PR c++/103186
2534          * pt.cc (defarg_inst): Use tree_vec_map_cache_hasher.
2535          (defarg_insts_for): New.
2536          (tsubst_default_argument): Adjust.
2537
25382022-01-31  Marek Polacek  <polacek@redhat.com>
2539
2540          PR c++/102414
2541          PR c++/101874
2542          * decl.cc (create_array_type_for_decl): Use template_placeholder_p.
2543          Sorry on a variable-length array of auto.
2544
25452022-01-31  Marek Polacek  <polacek@redhat.com>
2546
2547          PR c++/102434
2548          * class.cc (finish_struct): Don't allow union initializer_list.
2549
25502022-01-31  Patrick Palka  <ppalka@redhat.com>
2551
2552          PR c++/104294
2553          * pt.cc (ctor_deduction_guides_for): Correct computation of
2554          outer_args.
2555
25562022-01-31  Patrick Palka  <ppalka@redhat.com>
2557
2558          PR c++/104291
2559          * pt.cc (for_each_template_parm_r) <case CONSTRUCTOR>: Clear
2560          walk_subtrees if !include_nondeduced_p.  Simplify given that
2561          cp_walk_subtrees already walks TYPE_PTRMEMFUNC_FN_TYPE_RAW.
2562
25632022-01-28  Patrick Palka  <ppalka@redhat.com>
2564              Jason Merrill  <jason@redhat.com>
2565
2566          PR c++/92752
2567          * typeck.cc (build_ptrmemfunc): Cast a nullptr constant to the
2568          unqualified pointer type not the qualified one.
2569
25702022-01-28  Patrick Palka  <ppalka@redhat.com>
2571
2572          PR c++/103341
2573          * decl.cc (cp_finish_decl): Pass the template arguments of a
2574          variable template specialization or a templated static data
2575          member to do_auto_deduction when the auto is constrained.
2576
25772022-01-28  Jason Merrill  <jason@redhat.com>
2578
2579          PR c++/100198
2580          PR c++/100030
2581          PR c++/100282
2582          * parser.cc (cp_parser_enumerator_definition): Sorry on parameter
2583          pack in lambda.
2584          (cp_parser_class_head): And in class attributes.
2585          * pt.cc (check_for_bare_parameter_packs): Sorry instead of error
2586          in lambda.
2587
25882022-01-27  Jason Merrill  <jason@redhat.com>
2589
2590          PR c++/104245
2591          PR c++/51344
2592          * decl2.cc (save_template_attributes): Take late attrs as parm.
2593          (cplus_decl_attributes): Call it after decl_attributes,
2594          splice_template_attributes before.
2595
25962022-01-27  Patrick Palka  <ppalka@redhat.com>
2597
2598          PR c++/99895
2599          * call.cc (build_over_call): For a non-dependent member call,
2600          build up a CALL_EXPR using a COMPONENT_REF callee, as in
2601          build_new_method_call.
2602          * pt.cc (build_non_dependent_expr): Don't wrap PARM_DECL either.
2603          * tree.cc (build_min_non_dep_op_overload): Adjust accordingly
2604          after the build_over_call change.
2605
26062022-01-27  Patrick Palka  <ppalka@redhat.com>
2607
2608          PR c++/92944
2609          PR c++/103678
2610          * parser.cc (cp_parser_class_head): Update 'type' with the result
2611          of maybe_process_partial_specialization in the
2612          nested_name_specifier branch.  Refactor nearby code to accomodate
2613          that maybe_process_partial_specialization returns a _TYPE, not a
2614          TYPE_DECL, and eliminate local variable 'class_type' in passing.
2615
26162022-01-27  Marek Polacek  <polacek@redhat.com>
2617
2618          PR c++/101988
2619          * decl.cc (create_array_type_for_decl): Reject forming an array of
2620          placeholder for a deduced class type.
2621
26222022-01-26  Jason Merrill  <jason@redhat.com>
2623
2624          PR c++/104206
2625          PR c++/101072
2626          * semantics.cc (finish_compound_literal): Restore VECTOR_TYPE check.
2627
26282022-01-26  Jakub Jelinek  <jakub@redhat.com>
2629
2630          PR c++/104226
2631          * constexpr.cc (init_subob_ctx): For vector ctors containing
2632          vector elements, ensure appending to the same ctor instead of
2633          creating another one.
2634
26352022-01-26  Marek Polacek  <polacek@redhat.com>
2636
2637          PR target/104213
2638          * decl.cc (finish_constructor_body): Suppress -Wuse-after-free.
2639          (finish_destructor_body): Likewise.
2640          * optimize.cc (build_delete_destructor_body): Likewise.
2641
26422022-01-26  Jason Merrill  <jason@redhat.com>
2643
2644          PR c++/104235
2645          * parser.cc (cp_parser_template_name): Repeat lookup of USING_DECL.
2646
26472022-01-26  Jason Merrill  <jason@redhat.com>
2648
2649          PR c++/103057
2650          * pt.cc (tsubst_aggr_type): Call tsubst for alias template
2651          specialization.
2652
26532022-01-25  Patrick Palka  <ppalka@redhat.com>
2654
2655          PR c++/101532
2656          PR c++/104225
2657          * decl2.cc (mark_used): Don't consider maybe_instantiate_noexcept
2658          on a deleted function.
2659
26602022-01-25  Jason Merrill  <jason@redhat.com>
2661
2662          PR c++/59950
2663          * call.cc (build_over_call): Use cp_build_indirect_ref.
2664
26652022-01-24  Patrick Palka  <ppalka@redhat.com>
2666
2667          PR c++/104197
2668          * pt.cc (make_auto_1): Use -1 as a placeholder default argument
2669          for level.
2670
26712022-01-24  Patrick Palka  <ppalka@redhat.com>
2672
2673          PR c++/104173
2674          * typeck.cc (build_class_member_access_expr): Extend
2675          unary_complex_lvalue result adjustment to preserve all
2676          rvalues, not just xvalues.
2677
26782022-01-23  Will Wray  <wjwray@gmail.com>
2679
2680          PR c++/55227
2681          * decl.cc (reshape_init_r): Only call has_designator_check when
2682          first_initializer_p or for the inner constructor element.
2683          (cp_complete_array_type): Call reshape_init on braced-init-list.
2684
26852022-01-23  Jason Merrill  <jason@redhat.com>
2686
2687          PR c++/104182
2688          * cp-gimplify.cc (cp_genericize_target_expr): Make sure nothing
2689          has set DECL_INITIAL on a TARGET_EXPR slot.
2690          * tree.cc (is_local_temp): Don't check DECL_CONTEXT.
2691
26922022-01-23  Jason Merrill  <jason@redhat.com>
2693
2694          PR c++/101072
2695          * cp-tree.h (build_implicit_conv_flags): Declare.
2696          * call.cc (build_implicit_conv_flags): Split out from...
2697          (perform_implicit_conversion_flags): ...here.
2698          * decl.cc (check_initializer): Use it.
2699          * pt.cc (tsubst_copy_and_build): Remove TARGET_EXPR handling.
2700          * semantics.cc (finish_compound_literal): Don't treat
2701          scalar values like CONSTRUCTORs.
2702
27032022-01-21  Jason Merrill  <jason@redhat.com>
2704
2705          * semantics.cc (find_failing_clause): Return expr if not
2706          decomposable.
2707          (finish_static_assert): Show constant values in failing
2708          comparison.
2709
27102022-01-21  Jason Merrill  <jason@redhat.com>
2711
2712          PR c++/104084
2713          PR c++/20040
2714          * init.cc (build_new_1): Only pull out TARGET_EXPR_INITIAL if
2715          alloc_expr is a TARGET_EXPR.
2716
27172022-01-21  Marek Polacek  <polacek@redhat.com>
2718
2719          PR c++/101715
2720          * tree.cc (fixup_deferred_exception_variants): Remove duplicate
2721          variants after parsing the exception specifications.
2722
27232022-01-21  Jason Merrill  <jason@redhat.com>
2724
2725          PR c++/104139
2726          PR c++/103681
2727          * class.cc (end_of_class): Use base_binfo.
2728
27292022-01-20  Jason Merrill  <jason@redhat.com>
2730
2731          PR c++/101405
2732          * decl.cc (reshape_init_class): Reject designator for a member of
2733          another class.
2734
27352022-01-20  Patrick Palka  <ppalka@redhat.com>
2736
2737          PR c++/91911
2738          PR c++/103672
2739          * pt.cc (keep_template_parm): Punt on a level 0 template parm.
2740          (tsubst_decl) <case VAR_DECL>: Remove !CHECKING_P safeguard.
2741          (tsubst) <case TEMPLATE_TYPE_PARM>: Handle CTAD placeholders
2742          specially.
2743          (make_auto_1): Add defaulted 'level' parameter.
2744          (make_template_placeholder): Pass 0 as 'level' to make_auto_1.
2745
27462022-01-20  Patrick Palka  <ppalka@redhat.com>
2747
2748          * decl.cc (grokdeclarator): Diagnose a CTAD placeholder as
2749          function return type even when !funcdecl_p.
2750
27512022-01-20  Martin Liska  <mliska@suse.cz>
2752
2753          PR c++/104134
2754          * error.cc (dump_aggr_type): Partially disable the warning.
2755
27562022-01-20  Jason Merrill  <jason@redhat.com>
2757
2758          PR c++/102300
2759          * parser.cc (cp_parser_template_name): Use dependent_scope_p.
2760
27612022-01-19  David Malcolm  <dmalcolm@redhat.com>
2762
2763          * cp-lang.cc (selftest::run_cp_tests): Update calls for .c to .cc
2764          renaming.
2765          * cp-tree.h (cp_pt_c_tests): Rename to...
2766          (cp_pt_cc_tests): ...this.
2767          (cp_tree_c_tests): Rename to...
2768          (cp_tree_cc_tests): ...this.
2769          * pt.cc (cp_pt_c_tests): Rename to...
2770          (cp_pt_cc_tests): ...this.
2771          * tree.cc (cp_tree_c_tests): Rename to...
2772          (cp_tree_cc_tests): ...this.
2773
27742022-01-19  Jason Merrill  <jason@redhat.com>
2775
2776          * parser.cc (saved_token_sentinel::rollback): Use
2777          cp_lexer_previous_token.
2778
27792022-01-18  Jakub Jelinek  <jakub@redhat.com>
2780
2781          PR c++/104055
2782          * constexpr.cc (cxx_eval_outermost_constant_expr): If t is a
2783          TARGET_EXPR with TARGET_EXPR_CLEANUP, use get_target_expr rather
2784          than get_target_expr_sfinae with tf_no_cleanup, and don't set
2785          TREE_CONSTANT.
2786
27872022-01-18  Jason Merrill  <jason@redhat.com>
2788              Jakub Jelinek   <jakub@redhat.com>
2789
2790          PR c++/104025
2791          * parser.cc (saved_token_sentinel::rollback): Call
2792          cp_lexer_set_source_position.
2793          (~saved_token_sentinel): Call rollback.
2794
27952022-01-18  Patrick Palka  <ppalka@redhat.com>
2796
2797          PR c++/104074
2798          * pt.cc (invalid_nontype_parm_type_p): Use WILDCARD_TYPE_P so
2799          that we return false for DEPENDENT_OPERATOR_TYPE too.
2800
28012022-01-17  Martin Liska  <mliska@suse.cz>
2802
2803          * Make-lang.in: Rename .c names to .cc.
2804          * config-lang.in: Likewise.
2805          * constexpr.cc (cxx_eval_constant_expression): Likewise.
2806          * coroutines.cc (morph_fn_to_coro): Likewise.
2807          * cp-gimplify.cc (cp_gimplify_expr): Likewise.
2808          * cp-lang.cc (struct lang_hooks): Likewise.
2809          (get_template_argument_pack_elems_folded): Likewise.
2810          * cp-objcp-common.cc (cp_tree_size): Likewise.
2811          (cp_unit_size_without_reusable_padding): Likewise.
2812          (pop_file_scope): Likewise.
2813          (cp_pushdecl): Likewise.
2814          * cp-objcp-common.h (GCC_CP_OBJCP_COMMON): Likewise.
2815          (cxx_simulate_record_decl): Likewise.
2816          * cp-tree.h (struct named_label_entry): Likewise.
2817          (current_function_return_value): Likewise.
2818          (more_aggr_init_expr_args_p): Likewise.
2819          (get_function_version_dispatcher): Likewise.
2820          (common_enclosing_class): Likewise.
2821          (strip_fnptr_conv): Likewise.
2822          (current_decl_namespace): Likewise.
2823          (do_aggregate_paren_init): Likewise.
2824          (cp_check_const_attributes): Likewise.
2825          (qualified_name_lookup_error): Likewise.
2826          (generic_targs_for): Likewise.
2827          (mark_exp_read): Likewise.
2828          (is_global_friend): Likewise.
2829          (maybe_reject_flexarray_init): Likewise.
2830          (module_token_lang): Likewise.
2831          (handle_module_option): Likewise.
2832          (literal_integer_zerop): Likewise.
2833          (build_extra_args): Likewise.
2834          (build_if_nonnull): Likewise.
2835          (maybe_check_overriding_exception_spec): Likewise.
2836          (finish_omp_target_clauses): Likewise.
2837          (maybe_warn_zero_as_null_pointer_constant): Likewise.
2838          (cxx_print_error_function): Likewise.
2839          (decl_in_std_namespace_p): Likewise.
2840          (merge_exception_specifiers): Likewise.
2841          (mangle_module_global_init): Likewise.
2842          (cxx_block_may_fallthru): Likewise.
2843          (fold_builtin_source_location): Likewise.
2844          (enum cp_oracle_request): Likewise.
2845          (subsumes): Likewise.
2846          (cp_finish_injected_record_type): Likewise.
2847          (vtv_build_vtable_verify_fndecl): Likewise.
2848          (cp_tree_c_finish_parsing): Likewise.
2849          * cvt.cc (diagnose_ref_binding): Likewise.
2850          (convert_to_void): Likewise.
2851          (convert_force): Likewise.
2852          (type_promotes_to): Likewise.
2853          * decl.cc (make_unbound_class_template_raw): Likewise.
2854          (cxx_init_decl_processing): Likewise.
2855          (check_class_member_definition_namespace): Likewise.
2856          (cxx_maybe_build_cleanup): Likewise.
2857          * decl2.cc (maybe_emit_vtables): Likewise.
2858          * error.cc (dump_function_name): Likewise.
2859          * init.cc (is_class_type): Likewise.
2860          (build_new_1): Likewise.
2861          * lang-specs.h: Likewise.
2862          * method.cc (make_alias_for_thunk): Likewise.
2863          * module.cc (specialization_add): Likewise.
2864          (module_state::read_cluster): Likewise.
2865          * name-lookup.cc (check_extern_c_conflict): Likewise.
2866          * name-lookup.h (struct cxx_binding): Likewise.
2867          * parser.cc (cp_parser_identifier): Likewise.
2868          * parser.h (struct cp_parser): Likewise.
2869          * pt.cc (has_value_dependent_address): Likewise.
2870          (push_tinst_level_loc): Likewise.
2871          * semantics.cc (finish_omp_clauses): Likewise.
2872          (finish_omp_atomic): Likewise.
2873          * tree.cc (cp_save_expr): Likewise.
2874          (cp_free_lang_data): Likewise.
2875          * typeck.cc (cp_common_type): Likewise.
2876          (strip_array_domain): Likewise.
2877          (rationalize_conditional_expr): Likewise.
2878          (check_return_expr): Likewise.
2879          * vtable-class-hierarchy.cc: Likewise.
2880
28812022-01-17  Martin Liska  <mliska@suse.cz>
2882
2883          * call.c: Moved to...
2884          * call.cc: ...here.
2885          * class.c: Moved to...
2886          * class.cc: ...here.
2887          * constexpr.c: Moved to...
2888          * constexpr.cc: ...here.
2889          * cp-gimplify.c: Moved to...
2890          * cp-gimplify.cc: ...here.
2891          * cp-lang.c: Moved to...
2892          * cp-lang.cc: ...here.
2893          * cp-objcp-common.c: Moved to...
2894          * cp-objcp-common.cc: ...here.
2895          * cp-ubsan.c: Moved to...
2896          * cp-ubsan.cc: ...here.
2897          * cvt.c: Moved to...
2898          * cvt.cc: ...here.
2899          * cxx-pretty-print.c: Moved to...
2900          * cxx-pretty-print.cc: ...here.
2901          * decl.c: Moved to...
2902          * decl.cc: ...here.
2903          * decl2.c: Moved to...
2904          * decl2.cc: ...here.
2905          * dump.c: Moved to...
2906          * dump.cc: ...here.
2907          * error.c: Moved to...
2908          * error.cc: ...here.
2909          * except.c: Moved to...
2910          * except.cc: ...here.
2911          * expr.c: Moved to...
2912          * expr.cc: ...here.
2913          * friend.c: Moved to...
2914          * friend.cc: ...here.
2915          * g++spec.c: Moved to...
2916          * g++spec.cc: ...here.
2917          * init.c: Moved to...
2918          * init.cc: ...here.
2919          * lambda.c: Moved to...
2920          * lambda.cc: ...here.
2921          * lex.c: Moved to...
2922          * lex.cc: ...here.
2923          * mangle.c: Moved to...
2924          * mangle.cc: ...here.
2925          * method.c: Moved to...
2926          * method.cc: ...here.
2927          * name-lookup.c: Moved to...
2928          * name-lookup.cc: ...here.
2929          * optimize.c: Moved to...
2930          * optimize.cc: ...here.
2931          * parser.c: Moved to...
2932          * parser.cc: ...here.
2933          * pt.c: Moved to...
2934          * pt.cc: ...here.
2935          * ptree.c: Moved to...
2936          * ptree.cc: ...here.
2937          * rtti.c: Moved to...
2938          * rtti.cc: ...here.
2939          * search.c: Moved to...
2940          * search.cc: ...here.
2941          * semantics.c: Moved to...
2942          * semantics.cc: ...here.
2943          * tree.c: Moved to...
2944          * tree.cc: ...here.
2945          * typeck.c: Moved to...
2946          * typeck.cc: ...here.
2947          * typeck2.c: Moved to...
2948          * typeck2.cc: ...here.
2949          * vtable-class-hierarchy.c: Moved to...
2950          * vtable-class-hierarchy.cc: ...here.
2951
29522022-01-17  Jakub Jelinek  <jakub@redhat.com>
2953
2954          PR c++/104031
2955          * cp-gimplify.c (cp_genericize_target_expr): Set DECL_CONTEXT of
2956          TARGET_EXPR_SLOT to current_function_decl if it was NULL.
2957
29582022-01-17  Andrew Stubbs  <ams@codesourcery.com>
2959
2960          * parser.c (cp_parser_omp_requires): Don't "sorry" dynamic_allocators.
2961
29622022-01-14  Chung-Lin Tang  <cltang@codesourcery.com>
2963
2964          PR c++/103705
2965          * semantics.c (finish_omp_clauses): Also continue peeling off of
2966          outer node for ARRAY_REFs.
2967
29682022-01-14  Jakub Jelinek  <jakub@redhat.com>
2969
2970          PR c++/103991
2971          * cp-objcp-common.c (cxx_block_may_fallthru) <case IF_STMT>: For
2972          IF_STMT_CONSTEXPR_P with constant false or true condition only
2973          check if the taken clause may fall through.
2974          * cp-gimplify.c (genericize_if_stmt): For consteval if, revert
2975          to r12-5638^ behavior if then_ block can't fall through.  For
2976          constexpr if, revert to r12-5638^ behavior.
2977
29782022-01-13  Anthony Sharp  <anthonysharp15@gmail.com>
2979              Jason Merrill  <jason@redhat.com>
2980
2981          PR c++/70417
2982          * parser.c (cp_parser_id_expression): Handle
2983          -Wmissing-template-keyword.
2984          (struct saved_token_sentinel): Add modes to control what happens
2985          on destruction.
2986          (cp_parser_statement): Adjust.
2987          (cp_parser_skip_entire_template_parameter_list): New function that
2988          skips an entire template parameter list.
2989          (cp_parser_require_end_of_template_parameter_list): Rename old
2990          cp_parser_skip_to_end_of_template_parameter_list.
2991          (cp_parser_skip_to_end_of_template_parameter_list): Refactor to be
2992          called from one of the above two functions.
2993          (cp_parser_lambda_declarator_opt)
2994          (cp_parser_explicit_template_declaration)
2995          (cp_parser_enclosed_template_argument_list): Adjust.
2996
29972022-01-12  Jakub Jelinek  <jakub@redhat.com>
2998              Jason Merrill  <jason@redhat.com>
2999
3000          PR c++/103480
3001          * tree.c (move): If expr is xvalue_p, just return expr without
3002          build_static_cast.
3003
30042022-01-11  Jakub Jelinek  <jakub@redhat.com>
3005
3006          PR c++/101597
3007          * class.c (build_vfn_ref): Build OBJ_TYPE_REF with INTEGER_CST
3008          OBJ_TYPE_REF_TOKEN with type equal to OBJ_TYPE_REF_OBJECT type.
3009          * error.c (resolve_virtual_fun_from_obj_type_ref): Use type of
3010          OBJ_TYPE_REF_TOKEN rather than type of OBJ_TYPE_REF_OBJECT as
3011          obj_type.
3012
30132022-01-11  Patrick Palka  <ppalka@redhat.com>
3014
3015          PR c++/103831
3016          * call.c (build_new_method_call): Consider dependent bases only
3017          if 'this' is available.
3018
30192022-01-11  Olivier Hainque  <hainque@adacore.com>
3020
3021          * decl.c (cxx_init_decl_processing): Move code possibly
3022          altering flag_weak before code testing it.
3023
30242022-01-10  Patrick Palka  <ppalka@redhat.com>
3025
3026          PR c++/103879
3027          * constexpr.c (cxx_fold_indirect_ref): Split out object/offset
3028          canonicalization step into a local lambda.  Strengthen it to
3029          absorb more components at position 0.  Use it before both calls
3030          to cxx_fold_indirect_ref_1.
3031
30322022-01-10  Patrick Palka  <ppalka@redhat.com>
3033
3034          PR c++/103783
3035          * call.c (cand_parms_match): Skip over 'this' when given one
3036          static and one non-static member function.
3037
30382022-01-10  Jakub Jelinek  <jakub@redhat.com>
3039
3040          PR c++/103912
3041          * semantics.c (expand_or_defer_fn): For immediate functions, set
3042          node->body_removed to true and clear analyzed, definition and
3043          force_output.
3044          * decl2.c (c_parse_final_cleanups): Ignore immediate functions for
3045          expand_or_defer_fn.
3046
30472022-01-08  Jakub Jelinek  <jakub@redhat.com>
3048
3049          PR c++/89074
3050          * constexpr.c (cxx_maybe_fold_addr_pointer_plus): New function.
3051          (cxx_eval_binary_expression): Use it.
3052
30532022-01-08  Jason Merrill  <jason@redhat.com>
3054
3055          PR c++/103946
3056          * init.c (build_vec_init): Remove assert.
3057          * tree.c (build_vec_init_expr): Likewise.
3058
30592022-01-08  Jason Merrill  <jason@redhat.com>
3060
3061          PR c++/100588
3062          * call.c (build_op_delete_call): Ignore destroying delete
3063          if alloc_fn.
3064
30652022-01-07  Jason Merrill  <jason@redhat.com>
3066
3067          PR c++/20040
3068          * init.c (build_new_1): Also build pointer cleanup if
3069          TYPE_GETS_DELETE.
3070          * cp-tree.h (TYPE_GETS_VEC_DELETE): New.
3071
30722022-01-07  Jason Merrill  <jason@redhat.com>
3073
3074          PR c++/103936
3075          PR c++/65591
3076          * cp-gimplify.c (cp_gimplify_expr): Restore VEC_INIT_EXPR handling.
3077
30782022-01-07  Jason Merrill  <jason@redhat.com>
3079
3080          PR c++/103711
3081          * init.c (perform_target_ctor): Select destructor by in_chrg.
3082
30832022-01-07  Jason Merrill  <jason@redhat.com>
3084
3085          PR c++/61611
3086          * except.c (in_nested_catch): New.
3087          (expand_end_catch_block): Check it.
3088
30892022-01-07  Jason Merrill  <jason@redhat.com>
3090
3091          PR c++/33799
3092          PR c++/102191
3093          * except.c (maybe_splice_retval_cleanup): Check
3094          current_binding_level.
3095          * semantics.c (do_poplevel): Call it here.
3096          * parser.c (cp_parser_compound_statement): Not here.
3097
30982022-01-07  Jason Merrill  <jason@redhat.com>
3099
3100          PR c++/53868
3101          * decl.c (cp_finish_decl): Use wrap_temporary_cleanups for
3102          cleanups from set_up_extended_ref_temp.
3103          (wrap_temporary_cleanups): Ignore array cleanups.
3104          (initialize_local_var): Don't check for array here.
3105          * cp-tree.h (BIND_EXPR_VEC_DTOR): New.
3106          * init.c (build_vec_delete_1): Set it.
3107
31082022-01-07  Jason Merrill  <jason@redhat.com>
3109
3110          PR c++/66451
3111          * init.c (build_vec_delete_1): Handle throwing dtor.
3112          (build_vec_init): Tell it we're in a cleanup already.
3113
31142022-01-07  Jason Merrill  <jason@redhat.com>
3115
3116          * typeck2.c (split_nonconstant_init_1): Don't cleanup the last elt.
3117          (split_nonconstant_init): Adjust.
3118
31192022-01-07  Jason Merrill  <jason@redhat.com>
3120
3121          PR c++/66139
3122          PR c++/52320
3123          * constexpr.c (replace_decl): Rename from replace_result_decl.
3124          * cp-tree.h (replace_decl): Declare it.
3125          * cp-gimplify.c (cp_gimplify_init_expr): Call it.
3126          (cp_gimplify_expr): Don't handle VEC_INIT_EXPR.
3127          (cp_genericize_init, cp_genericize_init_expr)
3128          (cp_genericize_target_expr): New.
3129          (cp_fold_r): Call them.
3130          * tree.c (build_array_copy): Add a TARGET_EXPR.
3131          * typeck2.c (digest_init_r): Look through a TARGET_EXPR.
3132
31332022-01-07  Jason Merrill  <jason@redhat.com>
3134
3135          PR c++/94041
3136          * decl.c (initialize_local_var): Fix comment.
3137          * init.c (build_new_1): Do stabilize array init.
3138          (build_vec_init): Use TARGET_EXPR for cleanup.  Initialization
3139          of an element from an explicit initializer is not a
3140          full-expression.
3141          * tree.c (expand_vec_init_expr): Pass flags through.
3142          * typeck2.c (split_nonconstant_init_1): Handle VEC_INIT_EXPR.
3143          (split_nonconstant_init): Handle array cleanups.
3144          * cp-tree.h: Adjust.
3145
31462022-01-07  Jason Merrill  <jason@redhat.com>
3147
3148          PR c++/94041
3149          * decl.c (check_initializer): Remove obsolete comment.
3150          (wrap_cleanups_r): Don't wrap CLEANUP_EH_ONLY.
3151          (initialize_local_var): Change assert to test.
3152          * typeck2.c (maybe_push_temp_cleanup): New.
3153          (split_nonconstant_init_1): Use it.
3154          (split_nonconstant_init): Clear cleanup flags.
3155
31562022-01-07  Jason Merrill  <jason@redhat.com>
3157
3158          PR c++/92385
3159          * typeck2.c (PICFLAG_VEC_INIT): New.
3160          (process_init_constructor_array): Set it.
3161          (process_init_constructor): Handle it.
3162          (split_nonconstant_init_1): Handle VEC_INIT_EXPR.
3163          * init.c (build_vec_init): Likewise.
3164          * cp-gimplify.c (cp_gimplify_expr): Factor out...
3165          * tree.c (expand_vec_init_expr): ...this function.
3166          (build_vec_init_elt): Handle BRACE_ENCLOSED_INITIALIZER_P.
3167          (build_vec_init_expr): Likewise.
3168          * constexpr.c (cxx_eval_vec_init): Likewise.
3169          (reduced_constant_expression_p): Check arrays before C++20.
3170          * cp-tree.h (expand_vec_init_expr): Declare.
3171
31722022-01-07  Jason Merrill  <jason@redhat.com>
3173
3174          * init.c (build_new_1): Remove preevaluation code.
3175
31762022-01-05  Nathan Sidwell  <nathan@acm.org>
3177
3178          * pt.c (instantiate_class_template_1): Process attribute((used)) set
3179          in class's context.
3180
31812022-01-05  Nathan Sidwell  <nathan@acm.org>
3182
3183          * init.c (build_new_1): Check complain before alignment warning.
3184
31852022-01-04  Jason Merrill  <jason@redhat.com>
3186
3187          * cp-tree.h (class releasing_vec): Add begin/end fns.
3188
31892022-01-04  Jason Merrill  <jason@redhat.com>
3190
3191          * init.c: Include -*- C++ -*- on first line.
3192
31932022-01-03  Marek Polacek  <polacek@redhat.com>
3194
3195          PR c++/103758
3196          * parser.c (cp_parser_decl_specifier_seq): Replace %<decl-specifier%>
3197          with %qD.
3198
31992022-01-03  Marek Polacek  <polacek@redhat.com>
3200
3201          * parser.c (make_char_string_pack): Add a cast to const unsigned
3202          char *.
3203
32042022-01-03  Jakub Jelinek  <jakub@redhat.com>
3205
3206          PR c++/103600
3207          * rtti.c (get_tinfo_decl_direct): Add "non overlapping" attribute
3208          to DECL_TINFO_P VAR_DECLs.
3209
32102022-01-02  Jason Merrill  <jason@redhat.com>
3211
3212          * init.c (build_vec_init): Append the decrement to elt_init.
3213
32142022-01-02  Jason Merrill  <jason@redhat.com>
3215
3216          * decl.c (wrap_cleanups_r): Don't wrap if noexcept.
3217
3218
3219Copyright (C) 2022 Free Software Foundation, Inc.
3220
3221Copying and distribution of this file, with or without modification,
3222are permitted in any medium without royalty provided the copyright
3223notice and this notice are preserved.
3224