19fbfa74f5f7a5d8d279641dc18045b5319fb582
[platform/upstream/gcc.git] / gcc / cp / ChangeLog
1 2022-01-28  Patrick Palka  <ppalka@redhat.com>
2             Jason Merrill  <jason@redhat.com>
3
4         PR c++/92752
5         * typeck.cc (build_ptrmemfunc): Cast a nullptr constant to the
6         unqualified pointer type not the qualified one.
7
8 2022-01-28  Patrick Palka  <ppalka@redhat.com>
9
10         PR c++/103341
11         * decl.cc (cp_finish_decl): Pass the template arguments of a
12         variable template specialization or a templated static data
13         member to do_auto_deduction when the auto is constrained.
14
15 2022-01-28  Jason Merrill  <jason@redhat.com>
16
17         PR c++/100198
18         PR c++/100030
19         PR c++/100282
20         * parser.cc (cp_parser_enumerator_definition): Sorry on parameter
21         pack in lambda.
22         (cp_parser_class_head): And in class attributes.
23         * pt.cc (check_for_bare_parameter_packs): Sorry instead of error
24         in lambda.
25
26 2022-01-27  Jason Merrill  <jason@redhat.com>
27
28         PR c++/104245
29         PR c++/51344
30         * decl2.cc (save_template_attributes): Take late attrs as parm.
31         (cplus_decl_attributes): Call it after decl_attributes,
32         splice_template_attributes before.
33
34 2022-01-27  Patrick Palka  <ppalka@redhat.com>
35
36         PR c++/99895
37         * call.cc (build_over_call): For a non-dependent member call,
38         build up a CALL_EXPR using a COMPONENT_REF callee, as in
39         build_new_method_call.
40         * pt.cc (build_non_dependent_expr): Don't wrap PARM_DECL either.
41         * tree.cc (build_min_non_dep_op_overload): Adjust accordingly
42         after the build_over_call change.
43
44 2022-01-27  Patrick Palka  <ppalka@redhat.com>
45
46         PR c++/92944
47         PR c++/103678
48         * parser.cc (cp_parser_class_head): Update 'type' with the result
49         of maybe_process_partial_specialization in the
50         nested_name_specifier branch.  Refactor nearby code to accomodate
51         that maybe_process_partial_specialization returns a _TYPE, not a
52         TYPE_DECL, and eliminate local variable 'class_type' in passing.
53
54 2022-01-27  Marek Polacek  <polacek@redhat.com>
55
56         PR c++/101988
57         * decl.cc (create_array_type_for_decl): Reject forming an array of
58         placeholder for a deduced class type.
59
60 2022-01-26  Jason Merrill  <jason@redhat.com>
61
62         PR c++/104206
63         PR c++/101072
64         * semantics.cc (finish_compound_literal): Restore VECTOR_TYPE check.
65
66 2022-01-26  Jakub Jelinek  <jakub@redhat.com>
67
68         PR c++/104226
69         * constexpr.cc (init_subob_ctx): For vector ctors containing
70         vector elements, ensure appending to the same ctor instead of
71         creating another one.
72
73 2022-01-26  Marek Polacek  <polacek@redhat.com>
74
75         PR target/104213
76         * decl.cc (finish_constructor_body): Suppress -Wuse-after-free.
77         (finish_destructor_body): Likewise.
78         * optimize.cc (build_delete_destructor_body): Likewise.
79
80 2022-01-26  Jason Merrill  <jason@redhat.com>
81
82         PR c++/104235
83         * parser.cc (cp_parser_template_name): Repeat lookup of USING_DECL.
84
85 2022-01-26  Jason Merrill  <jason@redhat.com>
86
87         PR c++/103057
88         * pt.cc (tsubst_aggr_type): Call tsubst for alias template
89         specialization.
90
91 2022-01-25  Patrick Palka  <ppalka@redhat.com>
92
93         PR c++/101532
94         PR c++/104225
95         * decl2.cc (mark_used): Don't consider maybe_instantiate_noexcept
96         on a deleted function.
97
98 2022-01-25  Jason Merrill  <jason@redhat.com>
99
100         PR c++/59950
101         * call.cc (build_over_call): Use cp_build_indirect_ref.
102
103 2022-01-24  Patrick Palka  <ppalka@redhat.com>
104
105         PR c++/104197
106         * pt.cc (make_auto_1): Use -1 as a placeholder default argument
107         for level.
108
109 2022-01-24  Patrick Palka  <ppalka@redhat.com>
110
111         PR c++/104173
112         * typeck.cc (build_class_member_access_expr): Extend
113         unary_complex_lvalue result adjustment to preserve all
114         rvalues, not just xvalues.
115
116 2022-01-23  Will Wray  <wjwray@gmail.com>
117
118         PR c++/55227
119         * decl.cc (reshape_init_r): Only call has_designator_check when
120         first_initializer_p or for the inner constructor element.
121         (cp_complete_array_type): Call reshape_init on braced-init-list.
122
123 2022-01-23  Jason Merrill  <jason@redhat.com>
124
125         PR c++/104182
126         * cp-gimplify.cc (cp_genericize_target_expr): Make sure nothing
127         has set DECL_INITIAL on a TARGET_EXPR slot.
128         * tree.cc (is_local_temp): Don't check DECL_CONTEXT.
129
130 2022-01-23  Jason Merrill  <jason@redhat.com>
131
132         PR c++/101072
133         * cp-tree.h (build_implicit_conv_flags): Declare.
134         * call.cc (build_implicit_conv_flags): Split out from...
135         (perform_implicit_conversion_flags): ...here.
136         * decl.cc (check_initializer): Use it.
137         * pt.cc (tsubst_copy_and_build): Remove TARGET_EXPR handling.
138         * semantics.cc (finish_compound_literal): Don't treat
139         scalar values like CONSTRUCTORs.
140
141 2022-01-21  Jason Merrill  <jason@redhat.com>
142
143         * semantics.cc (find_failing_clause): Return expr if not
144         decomposable.
145         (finish_static_assert): Show constant values in failing
146         comparison.
147
148 2022-01-21  Jason Merrill  <jason@redhat.com>
149
150         PR c++/104084
151         PR c++/20040
152         * init.cc (build_new_1): Only pull out TARGET_EXPR_INITIAL if
153         alloc_expr is a TARGET_EXPR.
154
155 2022-01-21  Marek Polacek  <polacek@redhat.com>
156
157         PR c++/101715
158         * tree.cc (fixup_deferred_exception_variants): Remove duplicate
159         variants after parsing the exception specifications.
160
161 2022-01-21  Jason Merrill  <jason@redhat.com>
162
163         PR c++/104139
164         PR c++/103681
165         * class.cc (end_of_class): Use base_binfo.
166
167 2022-01-20  Jason Merrill  <jason@redhat.com>
168
169         PR c++/101405
170         * decl.cc (reshape_init_class): Reject designator for a member of
171         another class.
172
173 2022-01-20  Patrick Palka  <ppalka@redhat.com>
174
175         PR c++/91911
176         PR c++/103672
177         * pt.cc (keep_template_parm): Punt on a level 0 template parm.
178         (tsubst_decl) <case VAR_DECL>: Remove !CHECKING_P safeguard.
179         (tsubst) <case TEMPLATE_TYPE_PARM>: Handle CTAD placeholders
180         specially.
181         (make_auto_1): Add defaulted 'level' parameter.
182         (make_template_placeholder): Pass 0 as 'level' to make_auto_1.
183
184 2022-01-20  Patrick Palka  <ppalka@redhat.com>
185
186         * decl.cc (grokdeclarator): Diagnose a CTAD placeholder as
187         function return type even when !funcdecl_p.
188
189 2022-01-20  Martin Liska  <mliska@suse.cz>
190
191         PR c++/104134
192         * error.cc (dump_aggr_type): Partially disable the warning.
193
194 2022-01-20  Jason Merrill  <jason@redhat.com>
195
196         PR c++/102300
197         * parser.cc (cp_parser_template_name): Use dependent_scope_p.
198
199 2022-01-19  David Malcolm  <dmalcolm@redhat.com>
200
201         * cp-lang.cc (selftest::run_cp_tests): Update calls for .c to .cc
202         renaming.
203         * cp-tree.h (cp_pt_c_tests): Rename to...
204         (cp_pt_cc_tests): ...this.
205         (cp_tree_c_tests): Rename to...
206         (cp_tree_cc_tests): ...this.
207         * pt.cc (cp_pt_c_tests): Rename to...
208         (cp_pt_cc_tests): ...this.
209         * tree.cc (cp_tree_c_tests): Rename to...
210         (cp_tree_cc_tests): ...this.
211
212 2022-01-19  Jason Merrill  <jason@redhat.com>
213
214         * parser.cc (saved_token_sentinel::rollback): Use
215         cp_lexer_previous_token.
216
217 2022-01-18  Jakub Jelinek  <jakub@redhat.com>
218
219         PR c++/104055
220         * constexpr.cc (cxx_eval_outermost_constant_expr): If t is a
221         TARGET_EXPR with TARGET_EXPR_CLEANUP, use get_target_expr rather
222         than get_target_expr_sfinae with tf_no_cleanup, and don't set
223         TREE_CONSTANT.
224
225 2022-01-18  Jason Merrill  <jason@redhat.com>
226             Jakub Jelinek   <jakub@redhat.com>
227
228         PR c++/104025
229         * parser.cc (saved_token_sentinel::rollback): Call
230         cp_lexer_set_source_position.
231         (~saved_token_sentinel): Call rollback.
232
233 2022-01-18  Patrick Palka  <ppalka@redhat.com>
234
235         PR c++/104074
236         * pt.cc (invalid_nontype_parm_type_p): Use WILDCARD_TYPE_P so
237         that we return false for DEPENDENT_OPERATOR_TYPE too.
238
239 2022-01-17  Martin Liska  <mliska@suse.cz>
240
241         * Make-lang.in: Rename .c names to .cc.
242         * config-lang.in: Likewise.
243         * constexpr.cc (cxx_eval_constant_expression): Likewise.
244         * coroutines.cc (morph_fn_to_coro): Likewise.
245         * cp-gimplify.cc (cp_gimplify_expr): Likewise.
246         * cp-lang.cc (struct lang_hooks): Likewise.
247         (get_template_argument_pack_elems_folded): Likewise.
248         * cp-objcp-common.cc (cp_tree_size): Likewise.
249         (cp_unit_size_without_reusable_padding): Likewise.
250         (pop_file_scope): Likewise.
251         (cp_pushdecl): Likewise.
252         * cp-objcp-common.h (GCC_CP_OBJCP_COMMON): Likewise.
253         (cxx_simulate_record_decl): Likewise.
254         * cp-tree.h (struct named_label_entry): Likewise.
255         (current_function_return_value): Likewise.
256         (more_aggr_init_expr_args_p): Likewise.
257         (get_function_version_dispatcher): Likewise.
258         (common_enclosing_class): Likewise.
259         (strip_fnptr_conv): Likewise.
260         (current_decl_namespace): Likewise.
261         (do_aggregate_paren_init): Likewise.
262         (cp_check_const_attributes): Likewise.
263         (qualified_name_lookup_error): Likewise.
264         (generic_targs_for): Likewise.
265         (mark_exp_read): Likewise.
266         (is_global_friend): Likewise.
267         (maybe_reject_flexarray_init): Likewise.
268         (module_token_lang): Likewise.
269         (handle_module_option): Likewise.
270         (literal_integer_zerop): Likewise.
271         (build_extra_args): Likewise.
272         (build_if_nonnull): Likewise.
273         (maybe_check_overriding_exception_spec): Likewise.
274         (finish_omp_target_clauses): Likewise.
275         (maybe_warn_zero_as_null_pointer_constant): Likewise.
276         (cxx_print_error_function): Likewise.
277         (decl_in_std_namespace_p): Likewise.
278         (merge_exception_specifiers): Likewise.
279         (mangle_module_global_init): Likewise.
280         (cxx_block_may_fallthru): Likewise.
281         (fold_builtin_source_location): Likewise.
282         (enum cp_oracle_request): Likewise.
283         (subsumes): Likewise.
284         (cp_finish_injected_record_type): Likewise.
285         (vtv_build_vtable_verify_fndecl): Likewise.
286         (cp_tree_c_finish_parsing): Likewise.
287         * cvt.cc (diagnose_ref_binding): Likewise.
288         (convert_to_void): Likewise.
289         (convert_force): Likewise.
290         (type_promotes_to): Likewise.
291         * decl.cc (make_unbound_class_template_raw): Likewise.
292         (cxx_init_decl_processing): Likewise.
293         (check_class_member_definition_namespace): Likewise.
294         (cxx_maybe_build_cleanup): Likewise.
295         * decl2.cc (maybe_emit_vtables): Likewise.
296         * error.cc (dump_function_name): Likewise.
297         * init.cc (is_class_type): Likewise.
298         (build_new_1): Likewise.
299         * lang-specs.h: Likewise.
300         * method.cc (make_alias_for_thunk): Likewise.
301         * module.cc (specialization_add): Likewise.
302         (module_state::read_cluster): Likewise.
303         * name-lookup.cc (check_extern_c_conflict): Likewise.
304         * name-lookup.h (struct cxx_binding): Likewise.
305         * parser.cc (cp_parser_identifier): Likewise.
306         * parser.h (struct cp_parser): Likewise.
307         * pt.cc (has_value_dependent_address): Likewise.
308         (push_tinst_level_loc): Likewise.
309         * semantics.cc (finish_omp_clauses): Likewise.
310         (finish_omp_atomic): Likewise.
311         * tree.cc (cp_save_expr): Likewise.
312         (cp_free_lang_data): Likewise.
313         * typeck.cc (cp_common_type): Likewise.
314         (strip_array_domain): Likewise.
315         (rationalize_conditional_expr): Likewise.
316         (check_return_expr): Likewise.
317         * vtable-class-hierarchy.cc: Likewise.
318
319 2022-01-17  Martin Liska  <mliska@suse.cz>
320
321         * call.c: Moved to...
322         * call.cc: ...here.
323         * class.c: Moved to...
324         * class.cc: ...here.
325         * constexpr.c: Moved to...
326         * constexpr.cc: ...here.
327         * cp-gimplify.c: Moved to...
328         * cp-gimplify.cc: ...here.
329         * cp-lang.c: Moved to...
330         * cp-lang.cc: ...here.
331         * cp-objcp-common.c: Moved to...
332         * cp-objcp-common.cc: ...here.
333         * cp-ubsan.c: Moved to...
334         * cp-ubsan.cc: ...here.
335         * cvt.c: Moved to...
336         * cvt.cc: ...here.
337         * cxx-pretty-print.c: Moved to...
338         * cxx-pretty-print.cc: ...here.
339         * decl.c: Moved to...
340         * decl.cc: ...here.
341         * decl2.c: Moved to...
342         * decl2.cc: ...here.
343         * dump.c: Moved to...
344         * dump.cc: ...here.
345         * error.c: Moved to...
346         * error.cc: ...here.
347         * except.c: Moved to...
348         * except.cc: ...here.
349         * expr.c: Moved to...
350         * expr.cc: ...here.
351         * friend.c: Moved to...
352         * friend.cc: ...here.
353         * g++spec.c: Moved to...
354         * g++spec.cc: ...here.
355         * init.c: Moved to...
356         * init.cc: ...here.
357         * lambda.c: Moved to...
358         * lambda.cc: ...here.
359         * lex.c: Moved to...
360         * lex.cc: ...here.
361         * mangle.c: Moved to...
362         * mangle.cc: ...here.
363         * method.c: Moved to...
364         * method.cc: ...here.
365         * name-lookup.c: Moved to...
366         * name-lookup.cc: ...here.
367         * optimize.c: Moved to...
368         * optimize.cc: ...here.
369         * parser.c: Moved to...
370         * parser.cc: ...here.
371         * pt.c: Moved to...
372         * pt.cc: ...here.
373         * ptree.c: Moved to...
374         * ptree.cc: ...here.
375         * rtti.c: Moved to...
376         * rtti.cc: ...here.
377         * search.c: Moved to...
378         * search.cc: ...here.
379         * semantics.c: Moved to...
380         * semantics.cc: ...here.
381         * tree.c: Moved to...
382         * tree.cc: ...here.
383         * typeck.c: Moved to...
384         * typeck.cc: ...here.
385         * typeck2.c: Moved to...
386         * typeck2.cc: ...here.
387         * vtable-class-hierarchy.c: Moved to...
388         * vtable-class-hierarchy.cc: ...here.
389
390 2022-01-17  Jakub Jelinek  <jakub@redhat.com>
391
392         PR c++/104031
393         * cp-gimplify.c (cp_genericize_target_expr): Set DECL_CONTEXT of
394         TARGET_EXPR_SLOT to current_function_decl if it was NULL.
395
396 2022-01-17  Andrew Stubbs  <ams@codesourcery.com>
397
398         * parser.c (cp_parser_omp_requires): Don't "sorry" dynamic_allocators.
399
400 2022-01-14  Chung-Lin Tang  <cltang@codesourcery.com>
401
402         PR c++/103705
403         * semantics.c (finish_omp_clauses): Also continue peeling off of
404         outer node for ARRAY_REFs.
405
406 2022-01-14  Jakub Jelinek  <jakub@redhat.com>
407
408         PR c++/103991
409         * cp-objcp-common.c (cxx_block_may_fallthru) <case IF_STMT>: For
410         IF_STMT_CONSTEXPR_P with constant false or true condition only
411         check if the taken clause may fall through.
412         * cp-gimplify.c (genericize_if_stmt): For consteval if, revert
413         to r12-5638^ behavior if then_ block can't fall through.  For
414         constexpr if, revert to r12-5638^ behavior.
415
416 2022-01-13  Anthony Sharp  <anthonysharp15@gmail.com>
417             Jason Merrill  <jason@redhat.com>
418
419         PR c++/70417
420         * parser.c (cp_parser_id_expression): Handle
421         -Wmissing-template-keyword.
422         (struct saved_token_sentinel): Add modes to control what happens
423         on destruction.
424         (cp_parser_statement): Adjust.
425         (cp_parser_skip_entire_template_parameter_list): New function that
426         skips an entire template parameter list.
427         (cp_parser_require_end_of_template_parameter_list): Rename old
428         cp_parser_skip_to_end_of_template_parameter_list.
429         (cp_parser_skip_to_end_of_template_parameter_list): Refactor to be
430         called from one of the above two functions.
431         (cp_parser_lambda_declarator_opt)
432         (cp_parser_explicit_template_declaration)
433         (cp_parser_enclosed_template_argument_list): Adjust.
434
435 2022-01-12  Jakub Jelinek  <jakub@redhat.com>
436             Jason Merrill  <jason@redhat.com>
437
438         PR c++/103480
439         * tree.c (move): If expr is xvalue_p, just return expr without
440         build_static_cast.
441
442 2022-01-11  Jakub Jelinek  <jakub@redhat.com>
443
444         PR c++/101597
445         * class.c (build_vfn_ref): Build OBJ_TYPE_REF with INTEGER_CST
446         OBJ_TYPE_REF_TOKEN with type equal to OBJ_TYPE_REF_OBJECT type.
447         * error.c (resolve_virtual_fun_from_obj_type_ref): Use type of
448         OBJ_TYPE_REF_TOKEN rather than type of OBJ_TYPE_REF_OBJECT as
449         obj_type.
450
451 2022-01-11  Patrick Palka  <ppalka@redhat.com>
452
453         PR c++/103831
454         * call.c (build_new_method_call): Consider dependent bases only
455         if 'this' is available.
456
457 2022-01-11  Olivier Hainque  <hainque@adacore.com>
458
459         * decl.c (cxx_init_decl_processing): Move code possibly
460         altering flag_weak before code testing it.
461
462 2022-01-10  Patrick Palka  <ppalka@redhat.com>
463
464         PR c++/103879
465         * constexpr.c (cxx_fold_indirect_ref): Split out object/offset
466         canonicalization step into a local lambda.  Strengthen it to
467         absorb more components at position 0.  Use it before both calls
468         to cxx_fold_indirect_ref_1.
469
470 2022-01-10  Patrick Palka  <ppalka@redhat.com>
471
472         PR c++/103783
473         * call.c (cand_parms_match): Skip over 'this' when given one
474         static and one non-static member function.
475
476 2022-01-10  Jakub Jelinek  <jakub@redhat.com>
477
478         PR c++/103912
479         * semantics.c (expand_or_defer_fn): For immediate functions, set
480         node->body_removed to true and clear analyzed, definition and
481         force_output.
482         * decl2.c (c_parse_final_cleanups): Ignore immediate functions for
483         expand_or_defer_fn.
484
485 2022-01-08  Jakub Jelinek  <jakub@redhat.com>
486
487         PR c++/89074
488         * constexpr.c (cxx_maybe_fold_addr_pointer_plus): New function.
489         (cxx_eval_binary_expression): Use it.
490
491 2022-01-08  Jason Merrill  <jason@redhat.com>
492
493         PR c++/103946
494         * init.c (build_vec_init): Remove assert.
495         * tree.c (build_vec_init_expr): Likewise.
496
497 2022-01-08  Jason Merrill  <jason@redhat.com>
498
499         PR c++/100588
500         * call.c (build_op_delete_call): Ignore destroying delete
501         if alloc_fn.
502
503 2022-01-07  Jason Merrill  <jason@redhat.com>
504
505         PR c++/20040
506         * init.c (build_new_1): Also build pointer cleanup if
507         TYPE_GETS_DELETE.
508         * cp-tree.h (TYPE_GETS_VEC_DELETE): New.
509
510 2022-01-07  Jason Merrill  <jason@redhat.com>
511
512         PR c++/103936
513         PR c++/65591
514         * cp-gimplify.c (cp_gimplify_expr): Restore VEC_INIT_EXPR handling.
515
516 2022-01-07  Jason Merrill  <jason@redhat.com>
517
518         PR c++/103711
519         * init.c (perform_target_ctor): Select destructor by in_chrg.
520
521 2022-01-07  Jason Merrill  <jason@redhat.com>
522
523         PR c++/61611
524         * except.c (in_nested_catch): New.
525         (expand_end_catch_block): Check it.
526
527 2022-01-07  Jason Merrill  <jason@redhat.com>
528
529         PR c++/33799
530         PR c++/102191
531         * except.c (maybe_splice_retval_cleanup): Check
532         current_binding_level.
533         * semantics.c (do_poplevel): Call it here.
534         * parser.c (cp_parser_compound_statement): Not here.
535
536 2022-01-07  Jason Merrill  <jason@redhat.com>
537
538         PR c++/53868
539         * decl.c (cp_finish_decl): Use wrap_temporary_cleanups for
540         cleanups from set_up_extended_ref_temp.
541         (wrap_temporary_cleanups): Ignore array cleanups.
542         (initialize_local_var): Don't check for array here.
543         * cp-tree.h (BIND_EXPR_VEC_DTOR): New.
544         * init.c (build_vec_delete_1): Set it.
545
546 2022-01-07  Jason Merrill  <jason@redhat.com>
547
548         PR c++/66451
549         * init.c (build_vec_delete_1): Handle throwing dtor.
550         (build_vec_init): Tell it we're in a cleanup already.
551
552 2022-01-07  Jason Merrill  <jason@redhat.com>
553
554         * typeck2.c (split_nonconstant_init_1): Don't cleanup the last elt.
555         (split_nonconstant_init): Adjust.
556
557 2022-01-07  Jason Merrill  <jason@redhat.com>
558
559         PR c++/66139
560         PR c++/52320
561         * constexpr.c (replace_decl): Rename from replace_result_decl.
562         * cp-tree.h (replace_decl): Declare it.
563         * cp-gimplify.c (cp_gimplify_init_expr): Call it.
564         (cp_gimplify_expr): Don't handle VEC_INIT_EXPR.
565         (cp_genericize_init, cp_genericize_init_expr)
566         (cp_genericize_target_expr): New.
567         (cp_fold_r): Call them.
568         * tree.c (build_array_copy): Add a TARGET_EXPR.
569         * typeck2.c (digest_init_r): Look through a TARGET_EXPR.
570
571 2022-01-07  Jason Merrill  <jason@redhat.com>
572
573         PR c++/94041
574         * decl.c (initialize_local_var): Fix comment.
575         * init.c (build_new_1): Do stabilize array init.
576         (build_vec_init): Use TARGET_EXPR for cleanup.  Initialization
577         of an element from an explicit initializer is not a
578         full-expression.
579         * tree.c (expand_vec_init_expr): Pass flags through.
580         * typeck2.c (split_nonconstant_init_1): Handle VEC_INIT_EXPR.
581         (split_nonconstant_init): Handle array cleanups.
582         * cp-tree.h: Adjust.
583
584 2022-01-07  Jason Merrill  <jason@redhat.com>
585
586         PR c++/94041
587         * decl.c (check_initializer): Remove obsolete comment.
588         (wrap_cleanups_r): Don't wrap CLEANUP_EH_ONLY.
589         (initialize_local_var): Change assert to test.
590         * typeck2.c (maybe_push_temp_cleanup): New.
591         (split_nonconstant_init_1): Use it.
592         (split_nonconstant_init): Clear cleanup flags.
593
594 2022-01-07  Jason Merrill  <jason@redhat.com>
595
596         PR c++/92385
597         * typeck2.c (PICFLAG_VEC_INIT): New.
598         (process_init_constructor_array): Set it.
599         (process_init_constructor): Handle it.
600         (split_nonconstant_init_1): Handle VEC_INIT_EXPR.
601         * init.c (build_vec_init): Likewise.
602         * cp-gimplify.c (cp_gimplify_expr): Factor out...
603         * tree.c (expand_vec_init_expr): ...this function.
604         (build_vec_init_elt): Handle BRACE_ENCLOSED_INITIALIZER_P.
605         (build_vec_init_expr): Likewise.
606         * constexpr.c (cxx_eval_vec_init): Likewise.
607         (reduced_constant_expression_p): Check arrays before C++20.
608         * cp-tree.h (expand_vec_init_expr): Declare.
609
610 2022-01-07  Jason Merrill  <jason@redhat.com>
611
612         * init.c (build_new_1): Remove preevaluation code.
613
614 2022-01-05  Nathan Sidwell  <nathan@acm.org>
615
616         * pt.c (instantiate_class_template_1): Process attribute((used)) set
617         in class's context.
618
619 2022-01-05  Nathan Sidwell  <nathan@acm.org>
620
621         * init.c (build_new_1): Check complain before alignment warning.
622
623 2022-01-04  Jason Merrill  <jason@redhat.com>
624
625         * cp-tree.h (class releasing_vec): Add begin/end fns.
626
627 2022-01-04  Jason Merrill  <jason@redhat.com>
628
629         * init.c: Include -*- C++ -*- on first line.
630
631 2022-01-03  Marek Polacek  <polacek@redhat.com>
632
633         PR c++/103758
634         * parser.c (cp_parser_decl_specifier_seq): Replace %<decl-specifier%>
635         with %qD.
636
637 2022-01-03  Marek Polacek  <polacek@redhat.com>
638
639         * parser.c (make_char_string_pack): Add a cast to const unsigned
640         char *.
641
642 2022-01-03  Jakub Jelinek  <jakub@redhat.com>
643
644         PR c++/103600
645         * rtti.c (get_tinfo_decl_direct): Add "non overlapping" attribute
646         to DECL_TINFO_P VAR_DECLs.
647
648 2022-01-02  Jason Merrill  <jason@redhat.com>
649
650         * init.c (build_vec_init): Append the decrement to elt_init.
651
652 2022-01-02  Jason Merrill  <jason@redhat.com>
653
654         * decl.c (wrap_cleanups_r): Don't wrap if noexcept.
655
656 \f
657 Copyright (C) 2022 Free Software Foundation, Inc.
658
659 Copying and distribution of this file, with or without modification,
660 are permitted in any medium without royalty provided the copyright
661 notice and this notice are preserved.