Debian Codegraph @

gcc/cp/ChangeLog

raw
1 2026-06-17 Andrew Pinski <[email protected]>
2
3 Backported from master:
4 2026-05-04 Andrew Pinski <[email protected]>
5
6 PR c++/65271
7 * parser.cc (cp_parser_class_specifier): Accept &&.
8
9 2026-06-12 Release Manager
10
11 * GCC 15.3.0 released.
12
13 2026-06-05 Jason Merrill <[email protected]>
14
15 Revert:
16 2026-05-14 Egas Ribeiro <[email protected]>
17 Jason Merrill <[email protected]>
18
19 PR c++/123346
20 * constexpr.cc (init_subob_ctx): Do initialize new_ctx.ctor
21 for an empty union member.
22
23 2026-06-05 Jason Merrill <[email protected]>
24
25 Revert:
26 2026-05-15 Jason Merrill <[email protected]>
27
28 PR c++/125315
29 * constexpr.cc (init_subob_ctx): Allow both ctor and object
30 to be null for an empty subobject.
31
32 2026-06-03 Nathaniel Shead <[email protected]>
33
34 Backported from master:
35 2025-10-12 Nathaniel Shead <[email protected]>
36
37 PR c++/122163
38 * expr.cc (mark_use): When processing a reference, always return
39 an lvalue reference when !rvalue_p.
40
41 2026-06-01 Jakub Jelinek <[email protected]>
42
43 Backported from master:
44 2026-05-21 Jakub Jelinek <[email protected]>
45
46 PR c++/125376
47 * coroutines.cc (register_local_var_uses): Ignore DECL_NAME for
48 name independent decls.
49
50 2026-06-01 Jakub Jelinek <[email protected]>
51
52 Backported from master:
53 2026-04-15 Jakub Jelinek <[email protected]>
54
55 PR c++/124850
56 * typeck.cc (cxx_mark_addressable): For DECL_ANON_UNION_VAR_P vars
57 also mark their DECL_VALUE_EXPR.
58
59 2026-06-01 Jakub Jelinek <[email protected]>
60
61 Backported from master:
62 2026-04-08 Jakub Jelinek <[email protected]>
63
64 * parser.cc (cp_parser_omp_loop_nest): Write orig_declv, not incrv.
65
66 2026-06-01 Yang Kun <[email protected]>
67
68 Backported from master:
69 2026-04-08 Yang Kun <[email protected]>
70
71 * parser.cc (cp_parser_omp_clause_proc_bind): Fix error message
72 (cp_parser_omp_clause_device_type): Likewise.
73
74 2026-06-01 Jakub Jelinek <[email protected]>
75
76 Backported from master:
77 2026-04-07 Jakub Jelinek <[email protected]>
78
79 PR c++/124487
80 * mangle.cc (write_type) <case PACK_INDEX_TYPE>: Handle even
81 the case of partially substituted pack.
82 (write_expression): Similarly for PACK_INDEX_EXPR.
83
84 2026-06-01 Jakub Jelinek <[email protected]>
85
86 Backported from master:
87 2026-04-04 Jakub Jelinek <[email protected]>
88
89 PR c++/124487
90 * mangle.cc (write_type) <case PACK_INDEX_TYPE>: Handle pack index
91 mangling unless (for now) PACK_INDEX_PACK is a TREE_VEC.
92 (write_expression): Handle PACK_INDEX_EXPR.
93
94 2026-06-01 Jakub Jelinek <[email protected]>
95
96 Backported from master:
97 2026-04-04 Jakub Jelinek <[email protected]>
98
99 PR c++/124198
100 * parser.cc (cp_parser_pack_index): If index is not type dependent,
101 call build_converted_constant_expr on it. Return error_mark_node
102 if index is error_operand_p.
103 * pt.cc (tsubst_pack_index): Likewise.
104
105 2026-06-01 Jakub Jelinek <[email protected]>
106
107 Backported from master:
108 2026-04-03 Jakub Jelinek <[email protected]>
109
110 PR c++/124531
111 * init.cc (build_vec_init): Call braced_lists_to_strings for
112 array CONSTRUCTORs. Handle RAW_DATA_CST and handle RANGE_EXPR
113 correctly.
114
115 2026-05-15 Jason Merrill <[email protected]>
116
117 Backported from master:
118 2026-05-15 Jason Merrill <[email protected]>
119
120 PR c++/125315
121 * constexpr.cc (init_subob_ctx): Allow both ctor and object
122 to be null for an empty subobject.
123
124 2026-05-14 Jason Merrill <[email protected]>
125
126 Backported from master:
127 2026-04-17 Jason Merrill <[email protected]>
128
129 PR c++/124632
130 * constexpr.cc (cxx_eval_call_expression): Unshare bindings
131 sooner.
132
133 2026-05-14 Egas Ribeiro <[email protected]>
134
135 Backported from master:
136 2026-04-16 Egas Ribeiro <[email protected]>
137 Jason Merrill <[email protected]>
138
139 PR c++/123346
140 * constexpr.cc (init_subob_ctx): Do initialize new_ctx.ctor
141 for an empty union member.
142
143 2026-05-01 Marek Polacek <[email protected]>
144
145 Backported from master:
146 2026-03-01 Marek Polacek <[email protected]>
147
148 PR c++/123143
149 * pt.cc (tsubst_expr) <case COMPONENT_REF>: Check identifier_p
150 before doing lookup for a template function.
151
152 2026-04-16 Marek Polacek <[email protected]>
153
154 Backported from master:
155 2026-04-15 Marek Polacek <[email protected]>
156
157 PR c++/120338
158 * decl.cc (cp_finish_decl): Set DECL_INITIAL to error_mark_node
159 instead of NULL_TREE for deleted main.
160
161 2026-04-15 Jason Merrill <[email protected]>
162
163 Backported from master:
164 2026-04-15 Jason Merrill <[email protected]>
165
166 PR c++/121643
167 PR c++/123975
168 * coroutines.cc (build_co_await): Pass rvalue to await_suspend.
169 (expand_one_await_expression): Fix await_suspend surgery.
170
171 2026-04-15 Jason Merrill <[email protected]>
172
173 Backported from master:
174 2026-04-15 Jason Merrill <[email protected]>
175
176 PR c++/121961
177 * coroutines.cc (build_actor_fn): Move the delete label before
178 the refcount handling.
179 (cp_coroutine_transform::build_ramp_function): Decrement refcount
180 after destroying gro.
181
182 2026-04-15 Jason Merrill <[email protected]>
183
184 Backported from master:
185 2026-04-15 Jason Merrill <[email protected]>
186
187 PR c++/117133
188 PR c++/124768
189 PR c++/124773
190 * mangle.cc (unmangled_name_p): Don't mangle internal extern "C"
191 variables.
192
193 2026-04-07 Patrick Palka <[email protected]>
194
195 Backported from master:
196 2026-04-07 Patrick Palka <[email protected]>
197
198 PR c++/123700
199 * pt.cc (dependent_opaque_alias_p): Return true for a
200 template-id typedef with a lambda targ.
201
202 2026-04-07 Patrick Palka <[email protected]>
203
204 Backported from master:
205 2026-04-07 Patrick Palka <[email protected]>
206
207 PR c++/123529
208 PR c++/98930
209 * pt.cc (has_value_dependent_address): Correct context
210 dependence check for a static local variable.
211
212 2026-04-07 Nathaniel Shead <[email protected]>
213
214 Backported from master:
215 2026-04-06 Nathaniel Shead <[email protected]>
216
217 PR c++/118630
218 * module.cc (depset::hash::add_dependency): Correct entry point
219 corection for recursive clusters.
220
221 2026-04-07 Nathaniel Shead <[email protected]>
222
223 Backported from master:
224 2026-04-06 Nathaniel Shead <[email protected]>
225
226 PR c++/124735
227 * module.cc (trees_in::is_matching_decl): Handle importing
228 undeduced auto when existing is already deduced.
229
230 2026-04-07 Nathaniel Shead <[email protected]>
231
232 Backported from master:
233 2026-04-06 Nathaniel Shead <[email protected]>
234
235 PR c++/124781
236 * module.cc (set_originating_module): Add a function comment,
237 only set attachment/exporting for entities with non-NULL
238 DECL_CONTEXT.
239 (check_module_decl_linkage): Use decl_anon_ns_mem_p instead of
240 decl_internal_context_p.
241
242 2026-04-07 Nathaniel Shead <[email protected]>
243
244 Backported from master:
245 2026-04-06 Nathaniel Shead <[email protected]>
246
247 PR c++/124785
248 * module.cc (trees_in::is_matching_decl): Narrow condition for
249 when noexcept propagation occurs; assert that we don't propagate
250 noexcept-specs for TEMPLATE_DECLs.
251
252 2026-04-02 Nathaniel Shead <[email protected]>
253
254 Backported from master:
255 2026-04-02 Nathaniel Shead <[email protected]>
256
257 PR c++/124477
258 * module.cc (trees_in::read_function_def): Set DECL_ARGUMENTS if
259 installing and otherwise missing.
260
261 2026-03-28 Patrick Palka <[email protected]>
262
263 Backported from master:
264 2026-03-03 Patrick Palka <[email protected]>
265
266 * constraint.cc (struct sat_entry): New data member inst_entry.
267 (satisfaction_cache::satisfaction_cache): Initialize inst_entry.
268 (satisfaction_cache::get): Use it to prefer printing the
269 instantiated atom in case of constraint recursion.
270 (satisfy_atom): Set inst_entry of the first cache entry to point
271 to the second entry.
272
273 2026-03-28 Patrick Palka <[email protected]>
274
275 Backported from master:
276 2026-03-03 Patrick Palka <[email protected]>
277
278 PR c++/123665
279 PR c++/123408
280 * pt.cc (build_extra_args): If TREE_STATIC was set on the
281 arguments, keep it set.
282 (add_extra_args): Set TREE_STATIC on the resulting arguments
283 when substituting templated arguments into a full set of
284 deferred arguments.
285 (tsubst_lambda_expr): Always defer templated substitution if
286 LAMBDA_EXPR_EXTRA_ARGS was set.
287
288 2026-03-28 Patrick Palka <[email protected]>
289
290 Backported from master:
291 2026-02-10 Patrick Palka <[email protected]>
292
293 PR c++/122621
294 * pt.cc (tsubst_pack_expansion): Use tf_partial instead of
295 tf_none, except when substituting outer (non-dependent) template
296 arguments.
297
298 2026-03-17 Marek Polacek <[email protected]>
299
300 Backported from master:
301 2026-03-16 Marek Polacek <[email protected]>
302
303 PR c++/124489
304 * error.cc (dump_type) <case NULLPTR_TYPE>: Use pp_cxx_ws_string
305 instead of pp_string.
306
307 2026-03-17 Jakub Jelinek <[email protected]>
308
309 Backported from master:
310 2026-03-16 Jakub Jelinek <[email protected]>
311
312 PR c++/120039
313 PR c++/122559
314 * pt.cc (tsubst_expr) <case VAR_DECL>: Don't call lookup_name on
315 DECL_NAME (t) if it is NULL_TREE.
316
317 2026-03-14 Jakub Jelinek <[email protected]>
318
319 Backported from master:
320 2026-03-12 Jakub Jelinek <[email protected]>
321
322 * parser.cc (cp_parser_omp_taskwait): Set TREE_TYPE of OMP_TASK
323 to void_type_node rather than void_node.
324 (cp_parser_omp_dispatch): Likewise.
325
326 2026-03-12 Nathaniel Shead <[email protected]>
327
328 Backported from master:
329 2026-03-12 Nathaniel Shead <[email protected]>
330
331 PR c++/124309
332 * module.cc (enum module_directness): Fix inconsistent
333 capitalisation.
334 (module_state::read_imports): Reparent module locations newly
335 seen as direct via partition.
336
337 2026-03-12 Nathaniel Shead <[email protected]>
338
339 Backported from master:
340 2026-03-12 Nathaniel Shead <[email protected]>
341
342 PR c++/124311
343 * module.cc (trees_in::key_mergeable): Check DECL_DEFAULTED_FN
344 instead of DECL_ARTIFICIAL.
345
346 2026-03-12 Nathaniel Shead <[email protected]>
347
348 Backported from master:
349 2026-03-12 Nathaniel Shead <[email protected]>
350
351 PR c++/124431
352 * module.cc (trees_in::key_mergeable): Allow merging members of
353 template specialisations.
354
355 2026-03-08 Jakub Jelinek <[email protected]>
356
357 Backported from master:
358 2026-02-17 Jakub Jelinek <[email protected]>
359
360 PR c++/120685
361 * typeck2.cc (build_functional_cast_1): For C++23 auto(x)
362 without tf_warning or tf_error return error_mark_node instead of
363 emitting pedwarn and handling it.
364 * semantics.cc (finish_compound_literal): Similarly for C++26
365 auto{x}.
366
367 2026-03-08 Jakub Jelinek <[email protected]>
368
369 Backported from master:
370 2026-02-09 Jakub Jelinek <[email protected]>
371
372 PR c++/123889
373 * constexpr.cc (explain_invalid_constexpr_fn): Diagnose
374 NULL or error_mark_node massaged on non-constructor.
375
376 2026-03-08 Jakub Jelinek <[email protected]>
377
378 Backported from master:
379 2026-01-27 Jakub Jelinek <[email protected]>
380
381 PR c++/123578
382 * tree.cc (cxx_printable_name_internal): Call lang_decl_name before
383 finding the slot to cache it in and repeat search in the cache
384 after the call.
385
386 2026-03-08 Jakub Jelinek <[email protected]>
387
388 Backported from master:
389 2026-01-24 Jakub Jelinek <[email protected]>
390
391 PR c++/123737
392 * parser.cc (cp_parser_expression): Don't handle CPP_EMBED just
393 as the last byte in it if expression has or might have overloaded
394 type. In that case call build_x_compound_expr for each byte
395 in CPP_EMBED separately.
396
397 2026-03-08 Jakub Jelinek <[email protected]>
398
399 Backported from master:
400 2026-01-24 Jakub Jelinek <[email protected]>
401
402 PR c++/123667
403 * semantics.cc (finish_decltype_type): Allow a structured binding
404 for ptds.saved to have DECL_HAS_VALUE_EXPR_P cleared, if it is
405 not within current_function_decl, but in that case assert that
406 lookup_decomp_type succeeded.
407
408 2026-03-08 Jakub Jelinek <[email protected]>
409
410 Backported from master:
411 2026-01-24 Jakub Jelinek <[email protected]>
412
413 PR c++/123684
414 * name-lookup.cc (handle_namespace_attrs): Only handle visibility and
415 abi_tag attributes in the gnu namespace and deprecated attribute in
416 the standard or gnu namespaces.
417
418 2026-03-03 Patrick Palka <[email protected]>
419
420 Backported from master:
421 2026-01-30 Patrick Palka <[email protected]>
422
423 PR c++/123845
424 PR libstdc++/114865
425 * constexpr.cc (build_data_member_initialization): Remove
426 C++11-specific recognition of MODIFY_EXPR.
427 (check_constexpr_ctor_body): Relax error diagnostic to a
428 pedwarn and don't clear DECL_DECLARED_CONSTEXPR_P upon
429 error. Return true if complaining.
430
431 2026-02-19 Patrick Palka <[email protected]>
432
433 Backported from master:
434 2026-02-12 Patrick Palka <[email protected]>
435
436 PR c++/123989
437 * cp-gimplify.cc (cp_gimplify_expr) <case CALL_EXPR>: Evaluate
438 the object argument of an xobj memfn call first too.
439
440 2026-02-17 Patrick Palka <[email protected]>
441
442 Backported from master:
443 2026-02-17 Patrick Palka <[email protected]>
444
445 PR c++/121822
446 * cvt.cc (convert_to_void): Don't evaluate a concept-id
447 in an unevaluated context.
448
449 2026-02-17 Patrick Palka <[email protected]>
450
451 Backported from master:
452 2026-02-17 Patrick Palka <[email protected]>
453
454 PR c++/122318
455 PR c++/101670
456 * pt.cc (unify) <default>: Accept LAMBDA_EXPR.
457
458 2026-02-05 Patrick Palka <[email protected]>
459
460 Backported from master:
461 2026-02-05 Patrick Palka <[email protected]>
462
463 PR c++/122169
464 * pt.cc (tsubst_pack_index): Propagate cv-qualifiers of
465 PACK_INDEX_TYPE.
466
467 2026-01-27 Patrick Palka <[email protected]>
468
469 Backported from master:
470 2026-01-27 Patrick Palka <[email protected]>
471
472 PR c++/123676
473 * pt.cc (tsubst_pack_expansion): Relax unsubsituted_packs
474 assert to allow !processing_template_decl when args is
475 NULL_TREE.
476
477 2026-01-27 Patrick Palka <[email protected]>
478
479 Backported from master:
480 2026-01-27 Patrick Palka <[email protected]>
481
482 PR c++/122494
483 PR c++/123814
484 * constexpr.cc (cxx_eval_outermost_constant_expr): Clear
485 uid_sensitive_constexpr_evaluation_value when mce_true.
486
487 2026-01-23 Jakub Jelinek <[email protected]>
488
489 Backported from master:
490 2026-01-23 Jakub Jelinek <[email protected]>
491
492 PR c++/123597
493 * parser.cc (substitute_in_tree_walker, substitute_in_tree): Don't
494 consider BIND_EXPRs with !BIND_EXPR_VARS redundant if
495 processing_template_decl.
496
497 2026-01-20 Egas Ribeiro <[email protected]>
498
499 Backported from master:
500 2025-12-23 Egas Ribeiro <[email protected]>
501
502 PR c++/122550
503 * decl.cc (member_like_constrained_friend_p): Check that the
504 friend's enclosing class is an implicit instantiation.
505
506 2026-01-20 Egas Ribeiro <[email protected]>
507
508 Backported from master:
509 2025-12-18 Egas Ribeiro <[email protected]>
510 Patrick Palka <[email protected]>
511
512 PR c++/122070
513 * pt.cc (type_targs_deducible_from): Fall back to
514 TYPE_TEMPLATE_INFO when TYPE_TEMPLATE_INFO_MAYBE_ALIAS is NULL.
515
516 2026-01-16 Jakub Jelinek <[email protected]>
517
518 Backported from master:
519 2026-01-03 Jakub Jelinek <[email protected]>
520
521 PR c++/123331
522 * constexpr.cc (cxx_eval_vec_init_1): Don't build INIT_EXPR if
523 eltinit is erroneous.
524
525 2026-01-16 Jakub Jelinek <[email protected]>
526
527 Backported from master:
528 2025-12-19 Jakub Jelinek <[email protected]>
529
530 PR c++/91388
531 * semantics.cc (finish_static_assert): Suppress -Wreturn-type warnings
532 in functions with failed assertions.
533
534 2026-01-16 Jakub Jelinek <[email protected]>
535
536 Backported from master:
537 2025-12-19 Jakub Jelinek <[email protected]>
538
539 PR c++/122772
540 * tree.cc (cp_stabilize_bitfield_reference): New function.
541 (cp_stabilize_reference): Use it for stabilization of
542 clk_bitfield or clk_packed lvalues.
543
544 2026-01-16 Jakub Jelinek <[email protected]>
545
546 Backported from master:
547 2025-12-19 Jakub Jelinek <[email protected]>
548
549 PR c++/122834
550 * typeck.cc (cp_compare_floating_point_conversion_ranks): Return
551 3 if fmt2->b is 10 except for _Float16 vs. _Decimal128, in that
552 case return -2.
553
554 2026-01-14 David Malcolm <[email protected]>
555
556 Backported from master:
557 2025-09-17 David Malcolm <[email protected]>
558
559 PR c++/121966
560 * call.cc (print_z_candidates): Copy the filtering logic on viable
561 candidates from the printing loop to the counting loop, so that
562 num_candidates matches the number of iterations of the latter
563 loop.
564
565 2026-01-09 Eczbek <[email protected]>
566
567 Backported from master:
568 2025-11-29 Eczbek <[email protected]>
569 Jason Merrill <[email protected]>
570
571 PR c++/116952
572 * parser.cc (cp_parser_lambda_expression): Revert
573 r11-8166-ge1666ebd9ad31d change prohibiting lambda in non-type
574 parameter.
575
576 2026-01-09 Jason Merrill <[email protected]>
577
578 Backported from master:
579 2025-09-27 Jason Merrill <[email protected]>
580
581 PR c++/122048
582 * pt.cc (tsubst_expr): Don't use a lambda current_class_ptr.
583
584 2026-01-09 Jason Merrill <[email protected]>
585
586 PR c++/121854
587 * lambda.cc (lambda_expr_this_capture): Don't assume
588 current_class_ref.
589
590 2025-12-23 Nathaniel Shead <[email protected]>
591
592 Backported from master:
593 2025-12-19 Nathaniel Shead <[email protected]>
594
595 PR c++/122922
596 * module.cc (trees_in::post_types): New member.
597 (trees_in::trees_in): Initialize it.
598 (trees_in::~trees_in): Clean it up.
599 (trees_in::post_process_type): New functions.
600 (trees_in::tree_node): Save incomplete ARRAY_TYPEs for later
601 post-processing.
602 (module_state::read_cluster): Attempt to complete any
603 ARRAY_TYPEs we saved earlier.
604
605 2025-12-16 Patrick Palka <[email protected]>
606
607 Backported from master:
608 2025-12-15 Patrick Palka <[email protected]>
609
610 PR c++/122752
611 * pt.cc (tsubst) <case TYPENAME_TYPE>: Allow TYPENAME_TYPE
612 resolving to another wildcard type.
613
614 2025-12-16 Patrick Palka <[email protected]>
615
616 Backported from master:
617 2025-11-19 Patrick Palka <[email protected]>
618
619 PR c++/122668
620 PR c++/114764
621 * pt.cc (dependentish_scope_p): Return true for the current
622 instantiation from within an immediately parsed noexcept-spec.
623
624 2025-12-08 Jakub Jelinek <[email protected]>
625
626 Backported from master:
627 2025-11-21 Jakub Jelinek <[email protected]>
628
629 PR c++/121445
630 * constexpr.cc (build_data_member_initialization): Just return
631 false if member is COMPONENT_REF of COMPONENT_REF with
632 VAR_P get_base_address.
633
634 2025-12-08 Jakub Jelinek <[email protected]>
635
636 Backported from master:
637 2025-11-20 Jakub Jelinek <[email protected]>
638
639 PR c++/120876
640 * pt.cc (tsubst_baselink): Move maybe_incomplete handling after
641 !baselink handling.
642
643 2025-11-28 Daniele Sahebi <[email protected]>
644
645 Backported from master:
646 2025-11-22 Daniele Sahebi <[email protected]>
647 Jakub Jelinek <[email protected]>
648
649 PR c++/122658
650 * call.cc (build_over_call): Don't call build_cplus_new in
651 template declarations.
652
653 2025-11-26 Marek Polacek <[email protected]>
654
655 Backported from master:
656 2025-11-26 Marek Polacek <[email protected]>
657
658 PR c++/121325
659 * pt.cc (tsubst_tree_vec): New.
660 (tsubst_pack_index): Call it.
661
662 2025-11-25 Nathaniel Shead <[email protected]>
663
664 Backported from master:
665 2025-11-25 Nathaniel Shead <[email protected]>
666
667 PR c++/122789
668 * module.cc (trees_out::core_vals): Treat REQUIRES_EXPR
669 specially and stream the chained decls of its first operand.
670 (trees_in::core_vals): Likewise.
671 (trees_out::tree_node): Check the PARM_DECLs we see are what we
672 expect.
673
674 2025-11-21 Marek Polacek <[email protected]>
675
676 Backported from master:
677 2025-11-21 Marek Polacek <[email protected]>
678
679 PR c++/120529
680 * call.cc (ref_conv_binds_to_temporary): Don't ignore access control.
681
682 2025-11-19 Marek Polacek <[email protected]>
683
684 Backported from master:
685 2025-11-19 Marek Polacek <[email protected]>
686
687 PR c++/119580
688 * pt.cc (tsubst_baselink): Return error_mark_node if
689 tsubst_template_args returned error_mark_node.
690
691 2025-11-18 Jonathan Wakely <[email protected]>
692
693 Backported from master:
694 2025-11-18 Jonathan Wakely <[email protected]>
695
696 PR c++/122677
697 * module.cc (create_dirs): Skip past any leading slashes.
698
699 2025-11-16 Nathaniel Shead <[email protected]>
700
701 Backported from master:
702 2025-11-16 Nathaniel Shead <[email protected]>
703
704 PR c++/122625
705 * module.cc (trees_in::read_var_def): Also track class-scope
706 primary template specialisations.
707
708 2025-11-04 Nathaniel Shead <[email protected]>
709
710 Backported from master:
711 2025-11-04 Nathaniel Shead <[email protected]>
712
713 PR c++/122253
714 * decl2.cc (min_vis_expr_r): Don't mark no-linkage declarations
715 as VISIBILITY_ANON.
716
717 2025-11-02 Nathaniel Shead <[email protected]>
718
719 Backported from master:
720 2025-11-02 Nathaniel Shead <[email protected]>
721
722 PR c++/122421
723 * module.cc (trees_in::read_var_def): Don't handle class-scope
724 variables anymore.
725 (trees_in::read_class_def): Handle them here instead.
726
727 2025-11-01 Nathaniel Shead <[email protected]>
728
729 Backported from master:
730 2025-11-01 Nathaniel Shead <[email protected]>
731
732 PR c++/122381
733 * module.cc (trees_out::core_vals): Write BASELINK_OPTYPE (aka
734 TREE_CHAIN).
735 (trees_in::core_vals): Read it.
736
737 2025-10-28 Patrick Palka <[email protected]>
738
739 Backported from master:
740 2025-10-14 Patrick Palka <[email protected]>
741
742 PR c++/122192
743 * parser.cc (cp_parser_mem_initializer_id): Pass class_type
744 instead of typename_type to cp_parser_class_name in the
745 nested-name-specifier case.
746
747 2025-10-28 Patrick Palka <[email protected]>
748
749 Backported from master:
750 2025-10-10 Patrick Palka <[email protected]>
751
752 PR c++/122192
753 * decl.cc (make_typename_type): Document base-specifier as
754 another type-only lookup case.
755 * parser.cc (cp_parser_class_name): Propagate tag_type to
756 make_typename_type instead of hardcoding typename_type.
757 (cp_parser_base_specifier): Pass class_type instead of
758 typename_type as tag_type to cp_parser_class_name.
759
760 2025-10-28 Nathaniel Shead <[email protected]>
761
762 Backported from master:
763 2025-10-27 Nathaniel Shead <[email protected]>
764
765 PR c++/122310
766 * module.cc (get_keyed_decl_scope): New function.
767 (trees_out::get_merge_kind): Use it.
768 (trees_out::key_mergeable): Use it.
769 (maybe_key_decl): Key to the containing type for all members.
770
771 2025-10-14 Jason Merrill <[email protected]>
772
773 Backported from master:
774 2025-08-21 Jason Merrill <[email protected]>
775
776 PR c++/120757
777 * pt.cc (tsubst_expr) [OFFSET_REF]: Don't tsubst the type.
778
779 2025-09-25 Nathaniel Shead <[email protected]>
780
781 Backported from master:
782 2025-09-25 Nathaniel Shead <[email protected]>
783
784 PR c++/122015
785 PR c++/122019
786 * module.cc (trees_in::install_entity): Remove incorrect
787 assertion.
788
789 2025-09-24 Patrick Palka <[email protected]>
790
791 Backported from master:
792 2025-09-20 Patrick Palka <[email protected]>
793
794 PR c++/121981
795 * pt.cc (any_template_parm_r) <case TEMPLATE_TYPE_PARM>:
796 Don't walk TREE_TYPE.
797
798 2025-09-24 Jakub Jelinek <[email protected]>
799
800 Backported from master:
801 2025-08-14 Jakub Jelinek <[email protected]>
802
803 PR c++/121524
804 * tree.cc (build_cplus_array_type): Don't reuse variant type
805 if it has TREE_DEPRECATED or TREE_UNAVAILABLE flags set or,
806 unless elt_type has TYPE_USER_ALIGN set and TYPE_ALIGN is
807 TYPE_ALIGN of elt_type, TYPE_USER_ALIGN is not set.
808
809 2025-09-24 Nathaniel Shead <[email protected]>
810
811 Backported from master:
812 2025-09-24 Nathaniel Shead <[email protected]>
813
814 PR c++/122019
815 * module.cc (trees_in::install_entity): Don't be affected by
816 global language linkage state.
817 (trees_in::is_matching_decl): Check mismatching language linkage
818 for variables too.
819 (module_may_redeclare): Report the correct module name for
820 partitions and implementation units.
821
822 2025-09-23 Nathaniel Shead <[email protected]>
823
824 Backported from master:
825 2025-09-22 Nathaniel Shead <[email protected]>
826
827 PR c++/122015
828 * cp-tree.h (make_auto_pack): Declare.
829 * lambda.cc (lambda_capture_field_type): Use make_auto_pack to
830 ensure TYPE_CANONICAL is set correctly.
831 * pt.cc (make_auto_pack): New function.
832
833 2025-09-15 Matthias Kretz <[email protected]>
834
835 Backported from master:
836 2025-09-09 Matthias Kretz <[email protected]>
837
838 PR c++/121801
839 * mangle.cc (write_real_cst): Handle 16-bit real and assert
840 that reals have 16 bits or a multiple of 32 bits.
841
842 2025-09-12 Patrick Palka <[email protected]>
843
844 Backported from master:
845 2025-09-12 Patrick Palka <[email protected]>
846
847 PR c++/121795
848 * pt.cc (unify) <case PACK_INDEX_TYPE>: New non-deduced context
849 case.
850
851 2025-09-11 Patrick Palka <[email protected]>
852
853 Backported from master:
854 2025-09-03 Patrick Palka <[email protected]>
855
856 PR c++/97740
857 * pt.cc (tsubst_expr) <case COMPONENT_REF>: Don't check access
858 when the given member is already a FIELD_DECL.
859
860 2025-09-04 Nathaniel Shead <[email protected]>
861
862 Backported from master:
863 2025-09-04 Nathaniel Shead <[email protected]>
864
865 PR c++/121724
866 * name-lookup.cc (push_namespace): Mark inline namespace
867 contexts as purview if needed.
868
869 2025-08-27 Nathaniel Shead <[email protected]>
870
871 Backported from master:
872 2025-08-23 Nathaniel Shead <[email protected]>
873
874 PR c++/120499
875 * method.cc (synthesize_method): Set the instantiating module.
876
877 2025-08-26 Patrick Palka <[email protected]>
878
879 Backported from master:
880 2025-08-19 Patrick Palka <[email protected]>
881
882 PR c++/121351
883 * class.cc (add_method): Use outer_template_args when
884 substituting outer template arguments into constraints.
885
886 2025-08-08 Patrick Palka <[email protected]>
887
888 Backported from master:
889 2025-08-04 Patrick Palka <[email protected]>
890
891 PR c++/121351
892 PR c++/119859
893 * class.cc (add_method): Substitute outer template arguments
894 into constraints before comparing them if the declarations are
895 from different classes.
896
897 2025-08-08 Patrick Palka <[email protected]>
898
899 Backported from master:
900 2025-08-04 Patrick Palka <[email protected]>
901
902 PR c++/120620
903 * constexpr.cc (cxx_dynamic_cast_fn_p): Return true only
904 for synthesized __dynamic_cast.
905
906 2025-08-08 Release Manager
907
908 * GCC 15.2.0 released.
909
910 2025-08-01 Nathaniel Shead <[email protected]>
911
912 Backported from master:
913 2025-08-01 Nathaniel Shead <[email protected]>
914
915 PR c++/108080
916 * module.cc (trees_out::core_vals): Warn when streaming
917 target/optimize node; adjust comments.
918 (trees_in::core_vals): Don't stream a target/optimize node.
919
920 2025-08-01 Nathaniel Shead <[email protected]>
921
922 Backported from master:
923 2025-08-01 Nathaniel Shead <[email protected]>
924
925 PR c++/121238
926 * module.cc (trees_in::fn_parms_fini): Merge properties for
927 definitions.
928
929 2025-07-31 Jason Merrill <[email protected]>
930
931 Backported from master:
932 2025-07-31 Jason Merrill <[email protected]>
933
934 PR c++/120800
935 * constexpr.cc (cxx_eval_vec_init_1): Suppress access control.
936
937 2025-07-31 Patrick Palka <[email protected]>
938
939 Backported from master:
940 2025-06-05 Patrick Palka <[email protected]>
941
942 PR c++/120224
943 * pt.cc (tsubst_function_decl): Return error_mark_node if
944 substituting into the formal parameter list failed.
945 (tsubst_decl) <case PARM_DECL>: Return error_mark_node
946 upon TREE_TYPE substitution failure, when in a SFINAE
947 context. Return error_mark_node upon DECL_CHAIN substitution
948 failure.
949
950 2025-07-31 Marek Polacek <[email protected]>
951
952 Backported from master:
953 2025-06-27 Marek Polacek <[email protected]>
954
955 PR c++/120756
956 * pt.cc (resolve_nondeduced_context): Pass complain to mark_used.
957
958 2025-07-30 Jakub Jelinek <[email protected]>
959
960 Backported from master:
961 2025-07-30 Jakub Jelinek <[email protected]>
962
963 PR c++/121133
964 * parser.cc (cp_parser_unary_expression): Adjust
965 cp_parser_extension_opt caller and restore warn_long_long.
966 (cp_parser_declaration): Likewise.
967 (cp_parser_block_declaration): Likewise.
968 (cp_parser_member_declaration): Likewise.
969 (cp_parser_extension_opt): Add SAVED_LONG_LONG argument,
970 save previous warn_long_long state into it and clear it
971 for __extension__.
972
973 2025-07-29 Iain Sandoe <[email protected]>
974
975 Backported from master:
976 2025-07-25 Iain Sandoe <[email protected]>
977
978 PR c++/121219
979 * coroutines.cc
980 (cp_coroutine_transform::build_ramp_function): Reorder the return
981 expressions for the 'normal' and 'allocation failed' cases so that
982 NRV constraints are met.
983
984 2025-07-29 Iain Sandoe <[email protected]>
985
986 Backported from master:
987 2025-06-18 Iain Sandoe <[email protected]>
988
989 PR c++/115908
990 PR c++/118074
991 PR c++/95615
992 * coroutines.cc (coro_frame_refcount_id): New.
993 (coro_init_identifiers): Initialise coro_frame_refcount_id.
994 (build_actor_fn): Set up initial_await_resume_called. Handle
995 decrementing of the frame reference count. Return directly to
996 the caller if that is non-zero.
997 (cp_coroutine_transform::wrap_original_function_body): Use a
998 conditional eh-only cleanup around the initial await expression
999 to release the body use on exception before initial await
1000 resume.
1001 (cp_coroutine_transform::build_ramp_function): Wrap the called
1002 body in a cleanup that releases a use of the frame when we
1003 return to the ramp. Implement frame, promise and argument copy
1004 destruction via conditional cleanups when the frame use count
1005 is zero.
1006
1007 2025-07-29 Iain Sandoe <[email protected]>
1008
1009 Backported from master:
1010 2025-06-17 Iain Sandoe <[email protected]>
1011
1012 * coroutines.cc (struct coroutine_info): Update comments.
1013 (struct coro_aw_data): Remove self_handle and add in
1014 information to create the handle in lowering.
1015 (expand_one_await_expression): Build a temporary coroutine
1016 handle.
1017 (build_actor_fn): Remove reference to the frame copy of the
1018 coroutine handle.
1019 (cp_coroutine_transform::wrap_original_function_body): Remove
1020 reference to the frame copy of the coroutine handle.
1021
1022 2025-07-29 Iain Sandoe <[email protected]>
1023
1024 Backported from master:
1025 2025-06-17 Iain Sandoe <[email protected]>
1026
1027 * coroutines.cc (analyze_expression_awaits): Elide assume
1028 attributes containing await expressions, since these have
1029 side effects. Emit a diagnostic that this has been done.
1030
1031 2025-07-29 Iain Sandoe <[email protected]>
1032
1033 Backported from master:
1034 2025-06-17 Iain Sandoe <[email protected]>
1035
1036 * coroutines.cc (finish_co_await_expr): Do not allow in an
1037 unevaluated context.
1038 (finish_co_yield_expr): Likewise.
1039
1040 2025-07-29 Iain Sandoe <[email protected]>
1041
1042 Backported from master:
1043 2025-06-17 Iain Sandoe <[email protected]>
1044
1045 PR c++/120273
1046 * coroutines.cc
1047 (cp_coroutine_transform::wrap_original_function_body): Use
1048 function start and end locations when synthesizing code.
1049 (cp_coroutine_transform::cp_coroutine_transform): Set the
1050 function end location.
1051
1052 2025-07-29 Iain Sandoe <[email protected]>
1053
1054 Backported from master:
1055 2025-06-14 Iain Sandoe <[email protected]>
1056
1057 * coroutines.cc (build_co_await): Identify diagnostics
1058 for initial and final await expressions.
1059 (cp_coroutine_transform::wrap_original_function_body): Do
1060 not handle initial and final await expressions here ...
1061 (cp_coroutine_transform::apply_transforms): ... handle them
1062 here and avoid duplicate diagnostics.
1063 * coroutines.h: Declare inital and final await expressions
1064 in the transform class. Save the function closing brace
1065 location.
1066
1067 2025-07-29 Iain Sandoe <[email protected]>
1068
1069 Backported from master:
1070 2025-06-13 Iain Sandoe <[email protected]>
1071
1072 PR c++/116775
1073 * coroutines.cc (analyze_expression_awaits): When we see
1074 a builtin_constant_p call, and that contains one or more
1075 await expressions, then replace the call with its result
1076 and discard the unevaluated operand.
1077
1078 2025-07-29 Iain Sandoe <[email protected]>
1079
1080 Backported from master:
1081 2025-06-13 Iain Sandoe <[email protected]>
1082
1083 * coroutines.cc (build_actor_fn): Set can_throw.
1084
1085 2025-07-29 Iain Sandoe <[email protected]>
1086
1087 Backported from master:
1088 2025-06-09 Iain Sandoe <[email protected]>
1089
1090 PR c++/120495
1091 PR c++/115605
1092 * pt.cc (lookup_template_class): Honour provided namespace contexts
1093 when looking up class templates.
1094
1095 2025-07-29 Iain Sandoe <[email protected]>
1096
1097 Backported from master:
1098 2025-06-05 Iain Sandoe <[email protected]>
1099
1100 * coroutines.cc (analyze_fn_parms): Move from free function..
1101 (cp_coroutine_transform::analyze_fn_parms):... to method.
1102 (cp_coroutine_transform::apply_transforms): Adjust call to
1103 analyze_fn_parms.
1104 * coroutines.h: Declare analyze_fn_parms.
1105
1106 2025-07-29 Iain Sandoe <[email protected]>
1107
1108 Backported from master:
1109 2025-06-05 Iain Sandoe <[email protected]>
1110
1111 * coroutines.cc (expand_one_await_expression): Set the
1112 initial_await_resume_called flag here.
1113 (build_actor_fn): Populate the frame accessor for the
1114 initial_await_resume_called flag.
1115 (cp_coroutine_transform::wrap_original_function_body): Do
1116 not modify the initial_await expression to include the
1117 initial_await_resume_called flag here.
1118
1119 2025-07-29 Iain Sandoe <[email protected]>
1120
1121 Backported from master:
1122 2025-06-02 Iain Sandoe <[email protected]>
1123
1124 * coroutines.cc (build_actor_fn): Remove an unused
1125 label, guard the frame deallocation correctly, use
1126 simpler APIs to build if and return statements.
1127
1128 2025-07-29 Iain Sandoe <[email protected]>
1129
1130 Backported from master:
1131 2025-06-02 Iain Sandoe <[email protected]>
1132
1133 PR c++/118903
1134 * constexpr.cc (potential_constant_expression_1): Emit
1135 an error when co_await et. al. are used in constexpr
1136 contexts.
1137
1138 2025-07-29 Iain Sandoe <[email protected]>
1139
1140 Backported from master:
1141 2025-06-02 Iain Sandoe <[email protected]>
1142
1143 * error.cc (dump_expr): Add co_await, co_yield and co_return.
1144
1145 2025-07-29 Iain Sandoe <[email protected]>
1146
1147 Backported from master:
1148 2025-05-29 Iain Sandoe <[email protected]>
1149
1150 PR c++/109283
1151 * coroutines.cc (find_any_await): Only save the statement
1152 pointer if the caller passes a place for it.
1153 (flatten_await_stmt): When checking that ternary expressions
1154 have been handled, also check that they contain a co_await.
1155
1156 2025-07-29 Iain Sandoe <[email protected]>
1157
1158 Backported from master:
1159 2025-05-21 Iain Sandoe <[email protected]>
1160
1161 * coroutines.cc (analyze_fn_parms): No longer
1162 create a parameter copy guard var.
1163 (cp_coroutine_transform::build_ramp_function): Replace ramp
1164 cleanup try-catch block with eh-only cleanup statements.
1165 * coroutines.h (struct param_info): Remove the
1166 entry for the parameter copy destructor guard.
1167
1168 2025-07-29 Iain Sandoe <[email protected]>
1169
1170 Backported from master:
1171 2025-05-21 Iain Sandoe <[email protected]>
1172
1173 * coroutines.cc
1174 (cp_coroutine_transform::build_ramp_function): Use
1175 decltype(auto) to determine the type of the temporary
1176 get_return_object.
1177
1178 2025-07-29 Iain Sandoe <[email protected]>
1179
1180 Backported from master:
1181 2025-05-21 Iain Sandoe <[email protected]>
1182
1183 PR c++/119916
1184 * coroutines.cc
1185 (cp_coroutine_transform::wrap_original_function_body): Do not
1186 initialise initial_await_resume_called here...
1187 (cp_coroutine_transform::build_ramp_function): ... but here.
1188 When the coroutine is not void, initialize a GRO object from
1189 promise.get_return_object(). Use this as the argument to the
1190 return expression. Use a regular cleanup for the GRO, since
1191 it is ramp-local.
1192
1193 2025-07-29 Iain Sandoe <[email protected]>
1194
1195 Backported from master:
1196 2025-05-29 Iain Sandoe <[email protected]>
1197
1198 PR c++/120453
1199 * cp-tree.h (DECL_RAMP_P): New.
1200 * typeck.cc (check_return_expr): Use DECL_RAMP_P instead
1201 of DECL_RAMP_FN.
1202
1203 2025-07-29 Iain Sandoe <[email protected]>
1204
1205 Backported from master:
1206 2025-05-16 Iain Sandoe <[email protected]>
1207
1208 * typeck.cc (check_return_expr): Suppress conversions for NVRO
1209 in coroutine ramp functions.
1210
1211 2025-07-29 Iain Sandoe <[email protected]>
1212
1213 Backported from master:
1214 2025-05-16 Iain Sandoe <[email protected]>
1215
1216 * decl.cc (poplevel): Set BLOCK_OUTER_CURLY_BRACE_P on the
1217 body block for functions with no subblocks.
1218
1219 2025-07-25 Jason Merrill <[email protected]>
1220
1221 Backported from master:
1222 2025-07-15 Jason Merrill <[email protected]>
1223
1224 PR c++/120577
1225 * constexpr.cc (cxx_eval_call_expression): Set
1226 CONSTRUCTOR_NO_CLEARING on initial value for ctor.
1227 (cxx_eval_component_reference): Make value-initialization
1228 of an aggregate member explicit.
1229
1230 2025-07-24 Patrick Palka <[email protected]>
1231
1232 Backported from master:
1233 2025-07-23 Patrick Palka <[email protected]>
1234
1235 PR c++/121055
1236 * method.cc (build_invoke): Correct reference_wrapper handling.
1237
1238 2025-07-24 Nathaniel Shead <[email protected]>
1239
1240 Backported from master:
1241 2025-07-24 Nathaniel Shead <[email protected]>
1242
1243 PR c++/120412
1244 * module.cc (trees_out::core_vals): Write TU_LOCAL_ENTITY bits.
1245 (trees_in::core_vals): Read it.
1246 (trees_in::tree_node): Handle TU_LOCAL_ENTITY typedefs.
1247
1248 2025-07-11 Jakub Jelinek <[email protected]>
1249
1250 Backported from master:
1251 2025-07-10 Jakub Jelinek <[email protected]>
1252
1253 PR c++/120628
1254 * parser.cc (cp_parser_elaborated_type_specifier): Use
1255 cp_parser_nth_token_starts_class_definition_p with extra argument 1
1256 instead of cp_parser_next_token_starts_class_definition_p.
1257 (cp_parser_class_property_specifier_seq_opt): For final conditional
1258 keyword in C++98 check if the token after it isn't
1259 cp_parser_nth_token_starts_class_definition_p nor CPP_NAME and in
1260 that case break without consuming it nor warning.
1261 (cp_parser_class_head): Use
1262 cp_parser_nth_token_starts_class_definition_p with extra argument 1
1263 instead of cp_parser_next_token_starts_class_definition_p.
1264 (cp_parser_next_token_starts_class_definition_p): Renamed to ...
1265 (cp_parser_nth_token_starts_class_definition_p): ... this. Add N
1266 argument. Use cp_lexer_peek_nth_token instead of cp_lexer_peek_token.
1267
1268 2025-07-11 Jakub Jelinek <[email protected]>
1269
1270 Backported from master:
1271 2025-07-10 Jakub Jelinek <[email protected]>
1272
1273 PR c++/120569
1274 * parser.cc (cp_parser_class_property_specifier_seq_opt): New
1275 function.
1276 (cp_parser_class_head): Use it instead of
1277 cp_parser_property_specifier_seq_opt. Don't diagnose
1278 VIRT_SPEC_OVERRIDE here. Formatting fix.
1279
1280 2025-07-04 Jason Merrill <[email protected]>
1281
1282 Backported from master:
1283 2025-07-04 Jason Merrill <[email protected]>
1284
1285 PR c++/120575
1286 PR c++/116064
1287 * parser.cc (cp_parser_abort_tentative_parse): Check seen_error
1288 instead of errorcount.
1289
1290 2025-07-03 Jakub Jelinek <[email protected]>
1291
1292 Backported from master:
1293 2025-07-03 Jakub Jelinek <[email protected]>
1294
1295 PR c++/120940
1296 * typeck.cc (cp_build_array_ref): Fix a pasto.
1297
1298 2025-07-03 Jason Merrill <[email protected]>
1299
1300 PR c++/120684
1301 PR c++/118856
1302 * constexpr.cc (cxx_eval_constant_expression) [TARGET_EXPR]: Clear
1303 the value first if is_complex.
1304
1305 2025-07-01 Jakub Jelinek <[email protected]>
1306
1307 Backported from master:
1308 2025-07-01 Jakub Jelinek <[email protected]>
1309
1310 PR c++/120471
1311 * typeck.cc (cp_build_array_ref) <case COND_EXPR>: If idx is not
1312 INTEGER_CST, don't optimize the case (but cp_default_conversion on
1313 array early if it has ARRAY_TYPE) or use
1314 SAVE_EXPR <op0>, SAVE_EXPR <idx>, SAVE_EXPR <op0> as new op0 depending
1315 on flag_strong_eval_order and whether op1 and op2 are arrays with
1316 invariant address or tree invariant pointers. Formatting fixes.
1317
1318 2025-06-09 Jason Merrill <[email protected]>
1319
1320 Backported from master:
1321 2025-06-06 Jason Merrill <[email protected]>
1322
1323 PR c++/120555
1324 * decl2.cc (fn_being_defined, fn_template_being_defined): New.
1325 (mark_used): Check fn_template_being_defined.
1326
1327 2025-06-09 Jason Merrill <[email protected]>
1328
1329 PR c++/120502
1330 * cp-gimplify.cc (cp_fold_r) [TARGET_EXPR]: Do constexpr evaluation
1331 before genericize.
1332 * constexpr.cc (cxx_eval_store_expression): Add comment.
1333
1334 2025-06-02 Jason Merrill <[email protected]>
1335
1336 PR c++/120123
1337 * lambda.cc (nonlambda_method_basetype): Look through lambdas
1338 even when current_class_ref is null.
1339
1340 2025-05-30 Sandra Loosemore <[email protected]>
1341
1342 Backported from master:
1343 2025-05-29 Sandra Loosemore <[email protected]>
1344
1345 * parser.cc (cp_parser_omp_metadirective): Do not call
1346 cp_parser_skip_to_end_of_block_or_statement after an error.
1347
1348 2025-05-30 Sandra Loosemore <[email protected]>
1349
1350 Backported from master:
1351 2025-05-29 Sandra Loosemore <[email protected]>
1352
1353 PR c/120180
1354 * parser.cc (cp_parser_omp_metadirective): Only consume the
1355 token if it is the expected close paren.
1356
1357 2025-05-26 Tobias Burnus <[email protected]>
1358
1359 Backported from master:
1360 2025-05-26 Tobias Burnus <[email protected]>
1361
1362 PR c++/120413
1363 * semantics.cc (finish_omp_target_clauses_r): Handle
1364 BIND_EXPR with empty BIND_EXPR_BLOCK.
1365
1366 2025-05-23 Nathaniel Shead <[email protected]>
1367
1368 Backported from master:
1369 2025-05-23 Nathaniel Shead <[email protected]>
1370
1371 PR c++/120363
1372 * decl2.cc (get_tls_init_fn): Set context as global_namespace.
1373 (get_tls_wrapper_fn): Likewise.
1374
1375 2025-05-23 Nathaniel Shead <[email protected]>
1376
1377 Backported from master:
1378 2025-05-23 Nathaniel Shead <[email protected]>
1379
1380 PR c++/120414
1381 * module.cc (trees_in::tree_node): Allow reading a USING_DECL
1382 when streaming tt_data_member.
1383
1384 2025-05-20 Nathaniel Shead <[email protected]>
1385
1386 Backported from master:
1387 2025-05-20 Nathaniel Shead <[email protected]>
1388
1389 PR c++/120013
1390 * module.cc (trees_in::install_entity): Handle re-registering
1391 the inner TYPE_DECL of a partial specialisation.
1392
1393 2025-05-20 Nathaniel Shead <[email protected]>
1394
1395 Backported from master:
1396 2025-05-20 Nathaniel Shead <[email protected]>
1397
1398 PR c++/120350
1399 * rtti.cc (get_tinfo_decl_direct): Mark TREE_ADDRESSABLE.
1400
1401 2025-05-15 Patrick Palka <[email protected]>
1402
1403 Backported from master:
1404 2025-05-15 Patrick Palka <[email protected]>
1405
1406 PR c++/120161
1407 * pt.cc (unify) <case RECORD_TYPE>: When comparing specializations
1408 of a non-primary template, still perform a type comparison.
1409
1410 2025-05-14 Nathaniel Shead <[email protected]>
1411
1412 Backported from master:
1413 2025-05-14 Nathaniel Shead <[email protected]>
1414
1415 PR c++/120125
1416 * module.cc (trees_out::write_function_def): Only set
1417 DECL_NOT_REALLY_EXTERN if the importer might need to emit it.
1418 * optimize.cc (maybe_thunk_body): Don't assume 'fn' has a cgraph
1419 node created.
1420
1421 2025-05-14 Nathaniel Shead <[email protected]>
1422
1423 Backported from master:
1424 2025-05-14 Nathaniel Shead <[email protected]>
1425
1426 PR c++/119864
1427 * decl2.cc (start_objects): Only use module initialized for
1428 host.
1429 (c_parse_final_cleanups): Don't always create an OMP offload
1430 init function in modules.
1431
1432 2025-05-12 Jason Merrill <[email protected]>
1433
1434 Backported from master:
1435 2025-05-12 Jason Merrill <[email protected]>
1436
1437 PR c++/120012
1438 * class.cc (check_non_pod_aggregate): Check is_empty_class.
1439
1440 2025-05-07 Jason Merrill <[email protected]>
1441
1442 Backported from master:
1443 2025-05-02 Jason Merrill <[email protected]>
1444
1445 PR c++/120012
1446 * cp-tree.h (struct lang_type): Add non_aggregate_pod.
1447 (CLASSTYPE_NON_AGGREGATE_POD): New.
1448 * class.cc (check_bases_and_members): Set it.
1449 (check_non_pod_aggregate): Diagnose it.
1450
1451 2025-05-01 Nathaniel Shead <[email protected]>
1452
1453 Backported from master:
1454 2025-04-30 Nathaniel Shead <[email protected]>
1455
1456 PR c++/120023
1457 * module.cc (depset::hash::find_dependencies): Also call
1458 add_deduction_guides when walking one.
1459
1460 2025-05-01 Nathaniel Shead <[email protected]>
1461
1462 Backported from master:
1463 2025-04-30 Nathaniel Shead <[email protected]>
1464
1465 PR c++/119938
1466 * pt.cc (get_template_parm_object): When !check_init, add assert
1467 that expr really is constant and mark decl as such.
1468
1469 2025-05-01 Nathaniel Shead <[email protected]>
1470
1471 Backported from master:
1472 2025-04-30 Nathaniel Shead <[email protected]>
1473
1474 PR c++/119551
1475 PR c++/119996
1476 * module.cc (depset::hash::make_dependency): Also mark inline
1477 variables referencing TU-local values as exposures here.
1478 (depset::hash::finalize_dependencies): Add error message for
1479 inline variables.
1480
1481 2025-04-30 Patrick Palka <[email protected]>
1482
1483 Backported from master:
1484 2025-04-30 Patrick Palka <[email protected]>
1485
1486 PR c++/119981
1487 PR c++/119378
1488 * pt.cc (tsubst) <case UNBOUND_CLASS_TEMPLATE>: Substitute
1489 into template parameter list first. When substituting the
1490 context, only set processing_template_decl if there's more
1491 than one level of introduced template parameters.
1492
1493 2025-04-27 Nathaniel Shead <[email protected]>
1494
1495 Backported from master:
1496 2025-04-27 Nathaniel Shead <[email protected]>
1497
1498 PR c++/119939
1499 * module.cc (trees_out::lang_decl_vals): Also stream
1500 lang->u.fn.context when DECL_UNIQUE_FRIEND_P.
1501 (trees_in::lang_decl_vals): Likewise.
1502
1503 2025-04-27 Nathaniel Shead <[email protected]>
1504
1505 Backported from master:
1506 2025-04-22 Nathaniel Shead <[email protected]>
1507
1508 PR c++/119863
1509 * name-lookup.cc (get_mergeable_namespace_binding): Remove
1510 no-longer-used function.
1511 (lookup_imported_hidden_friend): Also look for hidden imported
1512 decls in an attached decl's module.
1513
1514 2025-04-25 Release Manager
1515
1516 * GCC 15.1.0 released.
1517
1518 2025-04-17 Jason Merrill <[email protected]>
1519
1520 PR c++/113360
1521 * cp-tree.h (struct language_function): Add erroneous bit.
1522 * constexpr.cc (explain_invalid_constexpr_fn): Return if set.
1523 (cxx_eval_call_expression): Quiet if set.
1524 * parser.cc (cp_parser_function_definition_after_declarator)
1525 * pt.cc (instantiate_body): Set it.
1526
1527 2025-04-16 Jason Merrill <[email protected]>
1528
1529 PR c++/114772
1530 PR c++/101180
1531 * pt.cc (apply_late_template_attributes): Also override
1532 target_option_current_node.
1533
1534 2025-04-16 Jason Merrill <[email protected]>
1535
1536 PR c++/116954
1537 * contracts.cc (remove_contract_attributes): Preserve flags
1538 on the attribute list.
1539
1540 2025-04-15 Nathaniel Shead <[email protected]>
1541
1542 PR c++/119755
1543 * lambda.cc (prune_lambda_captures): Remove pruned capture from
1544 function's BLOCK_VARS and BIND_EXPR_VARS.
1545
1546 2025-04-15 Jason Merrill <[email protected]>
1547
1548 PR c++/111075
1549 * constexpr.cc (cxx_eval_call_expression): Allow trivial
1550 call from a thunk.
1551
1552 2025-04-15 Patrick Palka <[email protected]>
1553
1554 PR c++/119807
1555 PR c++/112288
1556 * pt.cc (tsubst_friend_function): Skip remapping an
1557 existing specialization if it doesn't match the shape of
1558 the new friend definition.
1559
1560 2025-04-15 Jason Merrill <[email protected]>
1561
1562 PR c++/113835
1563 * constexpr.cc (cxx_eval_outermost_constant_expr): Bail out early
1564 for std::vector(N).
1565
1566 2025-04-14 Patrick Palka <[email protected]>
1567
1568 PR c++/99214
1569 * constraint.cc (satisfy_declaration_constraints): Pass the
1570 original ARGS to push_tinst_level.
1571
1572 2025-04-13 Patrick Palka <[email protected]>
1573
1574 PR c++/115639
1575 * constexpr.cc (struct constexpr_call): Add NSDMIs to each
1576 field. Replace 'result' data member with 3-element 'results'
1577 array and a 'result' accessor function. Remove
1578 'manifestly_const_eval' data member.
1579 (constexpr_call_hasher::equal): Adjust after constexpr_call
1580 layout change.
1581 (cxx_eval_call_expression): Likewise. Define some local
1582 variables closer to their first use. Use unknown_type_node
1583 instead of NULL_TREE as the "in progress" result. After
1584 successully evaluating a call with mce_unknown, also cache the
1585 result in the corresponding mce_true and mce_false slots.
1586
1587 2025-04-13 Nathaniel Shead <[email protected]>
1588
1589 * module.cc (trees_in::is_matching_decl): Don't check for
1590 mismatches when importing a DECL_MAYBE_DELETED function over one
1591 that's already finished.
1592
1593 2025-04-13 Nathaniel Shead <[email protected]>
1594
1595 * module.cc (trees_in::is_matching_decl): Add custom errors for
1596 different kinds of mismatches.
1597
1598 2025-04-12 Patrick Palka <[email protected]>
1599
1600 PR c++/116416
1601 * constexpr.cc (maybe_constant_init_1): Generalize type of
1602 of manifestly_const_eval parameter from bool to mce_value.
1603 (maybe_constant_init): Define 3-parameter version taking a
1604 manifestly_const_eval instead of bool parameter.
1605 (cxx_constant_init): Adjust.
1606 * cp-gimplify.cc (cp_fold_r) <case TARGET_EXPR>: Pass mce_false
1607 to maybe_constant_init during prvalue folding if ff_mce_false is
1608 set.
1609 * cp-tree.h (maybe_constant_init): Declare new overload.
1610
1611 2025-04-11 Jason Merrill <[email protected]>
1612
1613 PR c++/114970
1614 * cp-gimplify.cc (cp_build_init_expr_for_ctor): Suppress warnings on
1615 return_this COMPOUND_EXPR.
1616
1617 2025-04-10 Jason Merrill <[email protected]>
1618
1619 PR c++/119345
1620 * pt.cc (add_extra_args): Also register a specialization
1621 of the captured variable.
1622
1623 2025-04-10 Patrick Palka <[email protected]>
1624
1625 PR c++/119687
1626 * pt.cc (alias_ctad_tweaks): Use lkp_range / lkp_iterator
1627 instead of ovl_iterator.
1628
1629 2025-04-10 Jakub Jelinek <[email protected]>
1630
1631 PR translation/119684
1632 * error.cc (cp_print_error_function): Use G_ instead of _ for
1633 pp_printf arguments.
1634 (function_category): Use G_ instead of _.
1635 (print_instantiation_full_context): Use G_ instead of _ in pp_verbatim
1636 arguments.
1637 (print_location): Likewise.
1638 (print_instantiation_partial_context): Likewise.
1639 (maybe_print_constexpr_context): Likewise.
1640 (print_constrained_decl_info): Use G_() around pp_verbatim argument.
1641 (print_concept_check_info): Likewise.
1642 (print_constraint_context_head): Likewise.
1643 (print_requires_expression_info): Likewise. Merge separate pp_verbatim
1644 "in requirements " and "with " into one with conditional messages.
1645
1646 2025-04-10 Jason Merrill <[email protected]>
1647
1648 PR c++/119175
1649 * mangle.cc (decl_mangling_context): Look through lambda type.
1650
1651 2025-04-09 Patrick Palka <[email protected]>
1652
1653 PR c++/119574
1654 * pt.cc (add_extra_args): Remove checking assert.
1655
1656 2025-04-09 Jason Merrill <[email protected]>
1657
1658 PR c++/118698
1659 * constraint.cc (struct norm_info): Add tf_partial.
1660 * pt.cc (any_template_parm_r): Handle LAMBDA_EXPR_EXTRA_ARGS.
1661
1662 2025-04-08 Jason Merrill <[email protected]>
1663
1664 PR c++/117530
1665 * pt.cc (instantiate_template): Check retrieve_specialization after
1666 tsubst.
1667
1668 2025-04-07 Jason Merrill <[email protected]>
1669
1670 PR c++/119652
1671 * constexpr.cc (cxx_eval_outermost_constant_expr): Also don't add a
1672 TARGET_EXPR around AGGR_INIT_EXPR.
1673
1674 2025-04-06 Patrick Palka <[email protected]>
1675
1676 PR c++/118626
1677 * pt.cc (maybe_dependent_member_ref): Restrict TYPENAME_TYPE
1678 shortcut to non-typedef TYPE_DECL.
1679
1680 2025-04-06 Patrick Palka <[email protected]>
1681
1682 PR c++/118626
1683 * pt.cc (maybe_dependent_member_ref): Substitute and return the
1684 stripped type if we decided to not rewrite it directly.
1685
1686 2025-04-05 Patrick Palka <[email protected]>
1687
1688 PR c++/118249
1689 * constexpr.cc (potential_constant_expression_1)
1690 <case INDIRECT_REF>: Remove obsolete *this handling.
1691
1692 2025-04-05 Jason Merrill <[email protected]>
1693
1694 PR c++/118629
1695 * name-lookup.cc (pushdecl_outermost_localscope): Look for an
1696 sk_block.
1697
1698 2025-04-04 Nathaniel Shead <[email protected]>
1699
1700 PR c++/119564
1701 * decl.cc (cp_tree_node_structure): Add TU_LOCAL_ENTITY; fix
1702 formatting.
1703
1704 2025-04-04 Nathaniel Shead <[email protected]>
1705
1706 PR c++/119608
1707 * module.cc (trees_out::decl_node): Maybe require by-value
1708 walking not just when streaming.
1709
1710 2025-04-04 Nathaniel Shead <[email protected]>
1711
1712 PR c++/119462
1713 * module.cc (trees_in::is_matching_decl): Propagate exception
1714 spec and constexpr to DECL_MAYBE_DELETED; clear if appropriate.
1715
1716 2025-04-04 Jason Merrill <[email protected]>
1717
1718 PR c++/99546
1719 PR c++/113925
1720 PR c++/106976
1721 PR c++/109961
1722 PR c++/117336
1723 * lambda.cc (build_lambda_object): Handle fake
1724 requires-expr processing_template_decl.
1725 * parser.cc (cp_parser_lambda_expression): Likewise.
1726
1727 2025-04-04 Patrick Palka <[email protected]>
1728
1729 PR c++/117849
1730 * semantics.cc (finish_id_expression_1): Allow use of constraint
1731 variable outside an unevaluated context.
1732
1733 2025-04-03 Patrick Palka <[email protected]>
1734
1735 PR c++/119387
1736 * constexpr.cc (p2280_active_p): New.
1737 (cxx_eval_constant_expression) <case VAR_DECL>: Use it to
1738 restrict P2280 relaxations.
1739 <case PARM_DECL>: Likewise.
1740
1741 2025-04-03 Jason Merrill <[email protected]>
1742
1743 * module.cc (module_state::read_cluster)
1744 (post_load_processing): Clear DECL_EXTERNAL if DECL_COMDAT.
1745
1746 2025-04-03 Jason Merrill <[email protected]>
1747
1748 * call.cc (add_candidates): Re-lookup ne_fns if we move into
1749 another namespace.
1750
1751 2025-04-03 Andrew Pinski <[email protected]>
1752 Jakub Jelinek <[email protected]>
1753
1754 PR c++/119563
1755 * call.cc (build_list_conv): Fix a typo in loop gathering
1756 summary information from subsubconvs.
1757
1758 2025-04-02 Sandra Loosemore <[email protected]>
1759
1760 PR middle-end/118965
1761 * parser.cc (c_parser_omp_clause_init_modifiers): Adjust
1762 error message.
1763 (cp_parser_omp_clause_init): Remove code for recognizing clauses
1764 without modifiers. Diagnose missing target/targetsync modifier.
1765 (cp_finish_omp_declare_variant): Diagnose missing target/targetsync
1766 modifier.
1767
1768 2025-04-01 Nathaniel Shead <[email protected]>
1769
1770 PR c++/119551
1771 * module.cc (trees_out::write_var_def): Only ignore non-inline
1772 variable initializers.
1773
1774 2025-04-01 Nathaniel Shead <[email protected]>
1775
1776 * parser.cc (cp_parser_diagnose_invalid_type_name): Replace
1777 fmodules-ts with fmodules.
1778 (cp_parser_template_declaration): Likewise.
1779
1780 2025-04-01 Marek Polacek <[email protected]>
1781
1782 PR c++/119383
1783 * call.cc (build_over_call): Use force_lvalue to ensure op= returns
1784 an lvalue.
1785 * cp-tree.h (force_lvalue): Declare.
1786 * cvt.cc (force_lvalue): New.
1787 * typeck.cc (cp_build_indirect_ref_1): Revert r15-8011.
1788
1789 2025-03-31 Jason Merrill <[email protected]>
1790
1791 PR c++/119401
1792 * pt.cc (regenerate_decl_from_template): Don't regenerate if the
1793 signature involves a lambda.
1794
1795 2025-03-31 Jakub Jelinek <[email protected]>
1796
1797 PR c++/119518
1798 * decl.cc (finish_function): Don't set TREE_NOTHROW for
1799 functions with "noipa" attribute even when we can prove
1800 they can't throw.
1801
1802 2025-03-29 Jason Merrill <[email protected]>
1803
1804 * decl.cc (duplicate_decls): Don't clobber DECL_MODULE_IMPORT_P with
1805 an injected friend.
1806 * name-lookup.cc (check_module_override): Look at all reachable
1807 decls in decl's originating module.
1808
1809 2025-03-29 Jason Merrill <[email protected]>
1810
1811 PR c++/64500
1812 PR c++/116285
1813 * name-lookup.cc (push_to_top_level): Don't try to store_bindings
1814 for namespace levels.
1815
1816 2025-03-29 Jakub Jelinek <[email protected]>
1817
1818 * name-lookup.cc (maybe_lazily_declare): Fix comment typo,
1819 anout -> about.
1820
1821 2025-03-29 Nathaniel Shead <[email protected]>
1822
1823 PR c++/118961
1824 * class.cc (copy_fndecl_with_name): Mark clones as non-abstract.
1825 * cp-tree.h (setup_explicit_instantiation_definition_linkage):
1826 Declare new function.
1827 * module.cc (trees_in::read_var_def): Use it.
1828 (module_state::read_cluster): Likewise.
1829 * pt.cc (setup_explicit_instantiation_definition_linkage): New
1830 function.
1831 (mark_decl_instantiated): Use it.
1832
1833 2025-03-27 Tobias Burnus <[email protected]>
1834
1835 * cp-tree.h (cp_finish_omp_init_prefer_type): Add.
1836 * decl.cc (omp_declare_variant_finalize_one): Call it.
1837 * pt.cc (tsubst_attribute): Minor rebustification for OpenMP
1838 append_args handling.
1839 * semantics.cc (cp_omp_init_prefer_type_update): Rename to ...
1840 (cp_finish_omp_init_prefer_type): ... this; remove static attribute
1841 and return modified tree. Move clause handling to ...
1842 (finish_omp_clauses): ... the caller.
1843
1844 2025-03-27 Nathaniel Shead <[email protected]>
1845
1846 PR c++/118920
1847 * cp-tree.h (equal_abi_tags): Declare.
1848 * mangle.cc (equal_abi_tags): Make external, fix comparison.
1849 (tree_string_cmp): Make internal.
1850 * module.cc (trees_in::check_abi_tags): New function.
1851 (trees_in::decl_value): Use it.
1852 (trees_in::is_matching_decl): Likewise.
1853
1854 2025-03-27 Nathaniel Shead <[email protected]>
1855 Jason Merrill <[email protected]>
1856
1857 PR c++/118920
1858 * name-lookup.cc (lookup_imported_hidden_friend): Check for
1859 module entity rather than just module import.
1860 * module.cc (get_originating_module): Rename for_mangle parm to
1861 global_m1.
1862 * error.cc (dump_module_suffix): Don't decorate global module decls.
1863
1864 2025-03-26 Thomas Schwinge <[email protected]>
1865 Jason Merrill <[email protected]>
1866
1867 * rtti.cc (throw_bad_typeid): Adjust implicit '__cxa_bad_typeid'
1868 prototype to reality. Adjust all users.
1869
1870 2025-03-25 Simon Martin <[email protected]>
1871
1872 PR c++/114525
1873 * typeck2.cc (build_m_component_ref): Call cp_build_addr_expr
1874 instead of build_address.
1875
1876 2025-03-25 yxj-github-437 <[email protected]>
1877
1878 * parser.cc (cp_parser_lambda_expression): Use cp_evaluated.
1879
1880 2025-03-24 Jason Merrill <[email protected]>
1881
1882 * semantics.cc (finish_type_pack_element): Pass mce_true to
1883 maybe_constant_value.
1884
1885 2025-03-23 Nathaniel Shead <[email protected]>
1886
1887 PR c++/119154
1888 * decl2.cc (vague_linkage_p): Revert gnu_linkage handling.
1889 * module.cc (importer_interface): New enumeration.
1890 (get_importer_interface): New function.
1891 (trees_out::core_bools): Use it to determine interface.
1892 (trees_in::is_matching_decl): Propagate gnu_inline handling onto
1893 existing forward declarations.
1894 (trees_in::read_var_def): Also note explicit instantiation
1895 definitions of variable templates to be emitted.
1896
1897 2025-03-22 Patrick Palka <[email protected]>
1898
1899 PR c++/119379
1900 * pt.cc (tsubst_decl) <case TYPE_DECL>: Preserve structural-ness
1901 of a partially instantiated typedef.
1902
1903 2025-03-21 Paul-Antoine Arras <[email protected]>
1904 Tobias Burnus <[email protected]>
1905
1906 * parser.cc (cp_parser_omp_clause_init): Make addressable.
1907
1908 2025-03-21 Jason Merrill <[email protected]>
1909
1910 * init.cc (throw_bad_array_new_length): Returns void.
1911
1912 2025-03-21 Thomas Schwinge <[email protected]>
1913
1914 * rtti.cc (throw_bad_cast): Adjust implicit '__cxa_bad_cast'
1915 prototype to reality.
1916
1917 2025-03-20 Richard Biener <[email protected]>
1918
1919 * module.cc (trees_out::core_bools): Convert scoped enum
1920 explicitly.
1921
1922 2025-03-20 Jakub Jelinek <[email protected]>
1923
1924 PR c++/119370
1925 * decl2.cc (set_context_for_auto_vars_r): New function.
1926 (emit_partial_init_fini_fn): Call walk_tree with that function
1927 on &init before walk_tree with copy_tree_body_r.
1928
1929 2025-03-19 Jason Merrill <[email protected]>
1930
1931 PR c++/119316
1932 * mangle.cc (write_expression) [NEW_EXPR]: Avoid using
1933 compute_array_index_type.
1934 (write_array_type): Add checking_assert.
1935
1936 2025-03-19 Jakub Jelinek <[email protected]>
1937
1938 PR target/118068
1939 * cp-gimplify.cc (cp_fold_immediate): Use cp_walk_tree rather than
1940 cp_walk_tree_without_duplicates.
1941 (cp_fold_immediate_r): For IF_STMT_CONSTEVAL_P IF_STMT don't walk
1942 into THEN_CLAUSE subtree, only ELSE_CLAUSE. For non-call related
1943 stmts call data->pset.add and if it returns true, don't walk subtrees.
1944 (cp_fold_r): Don't call cp_fold_immediate_r here.
1945 (cp_fold_function): For C++20 or later call cp_walk_tree
1946 with cp_fold_immediate_r callback first before calling cp_walk_tree
1947 with cp_fold_r callback and call data.pset.empty () in between.
1948 (cp_fully_fold_init): Likewise.
1949 (cp_genericize_r) <case RETURN_EXPR>: Suppress -Wreturn-type warning
1950 if RETURN_EXPR has erroneous argument.
1951
1952 2025-03-18 Marek Polacek <[email protected]>
1953
1954 PR c++/119344
1955 * typeck.cc (cp_build_binary_op): Use cp_save_expr instead of save_expr.
1956
1957 2025-03-18 Jason Merrill <[email protected]>
1958
1959 PR c++/119194
1960 * decl2.cc (min_vis_expr_r) [ADDR_EXPR]: New case.
1961
1962 2025-03-18 Marek Polacek <[email protected]>
1963
1964 PR c++/118104
1965 * pt.cc (use_pack_expansion_extra_args_p): Remove an assert.
1966
1967 2025-03-18 Jakub Jelinek <[email protected]>
1968
1969 PR c/116545
1970 * parser.cc (cp_parser_statement): Call cp_parser_attributes_opt
1971 rather than cp_parser_std_attribute_spec_seq.
1972 (cp_parser_jump_statement): Diagnose gnu::musttail attributes
1973 with no arguments.
1974
1975 2025-03-18 Patrick Palka <[email protected]>
1976
1977 PR c++/119233
1978 * pt.cc (mark_template_arguments_used): Also handle member
1979 function pointers.
1980
1981 2025-03-14 Jakub Jelinek <[email protected]>
1982
1983 PR target/119120
1984 * cp-gimplify.cc (cp_genericize_r): Set DECL_NOT_GIMPLE_REG_P
1985 on {REAL,IMAG}PART_EXPR is_gimple_reg operand at -O0 if it is lhs
1986 of a MODIFY_EXPR.
1987
1988 2025-03-12 Jakub Jelinek <[email protected]>
1989
1990 PR c++/119150
1991 * constexpr.cc (cxx_eval_call_expression): For
1992 DECL_IMMEDIATE_FUNCTION_P (fun) set manifestly_const_eval in new_ctx
1993 and new_call to mce_true and set ctx to &new_ctx.
1994
1995 2025-03-12 Nathaniel Shead <[email protected]>
1996
1997 PR c++/118799
1998 * module.cc (depset::hash::is_tu_local_entity): Only types,
1999 functions, variables, and template (specialisations) can be
2000 TU-local. Explicit type aliases are TU-local iff the type they
2001 refer to are.
2002 (module_state::write_namespaces): Allow unnamed namespaces in
2003 named modules.
2004 (check_module_decl_linkage): Error for all exported declarations
2005 in an unnamed namespace.
2006
2007 2025-03-12 Nathaniel Shead <[email protected]>
2008
2009 PR c++/119154
2010 * decl2.cc (vague_linkage_p): Don't treat gnu_inline functions
2011 as having vague linkage.
2012 * module.cc (trees_out::core_bools): Clear DECL_INTERFACE_KNOWN
2013 for vague-linkage entities.
2014 (read_var_def): Maybe set comdat linkage for imported var
2015 definitions.
2016 (module_state::read_cluster): Use expand_or_defer_fn instead of
2017 ad-hoc linkage management.
2018 (post_load_processing): Likewise.
2019 * semantics.cc (expand_or_defer_fn_1): Don't forget that we had
2020 a definition at all.
2021
2022 2025-03-12 Marek Polacek <[email protected]>
2023
2024 PR c++/117512
2025 * typeck.cc (cp_build_indirect_ref_1): Only do the *&e -> e
2026 folding if the result would be an lvalue.
2027
2028 2025-03-12 Simon Martin <[email protected]>
2029
2030 PR c++/110584
2031 * cp-tree.h (strip_normal_capture_proxy): Declare.
2032 * lambda.cc (strip_normal_capture_proxy): New function to look
2033 through normal capture proxies.
2034 (build_capture_proxy): Use it.
2035 * semantics.cc (process_outer_var_ref): Likewise.
2036
2037 2025-03-12 Marek Polacek <[email protected]>
2038
2039 PR c++/119134
2040 * pt.cc (check_for_bare_parameter_packs): Check DECL_CONTEXT.
2041
2042 2025-03-12 Jakub Jelinek <[email protected]>
2043
2044 PR c++/119076
2045 * module.cc (trees_out::start): Handle RAW_DATA_CST.
2046 (trees_in::start): Likewise.
2047 (trees_out::core_vals): Likewise.
2048 (trees_in::core_vals): Likewise.
2049
2050 2025-03-11 Jason Merrill <[email protected]>
2051
2052 PR c++/119162
2053 * constexpr.cc (find_deleted_heap_var): New.
2054 (cxx_eval_call_expression): Don't cache a
2055 reference to heap_deleted.
2056
2057 2025-03-10 Nathaniel Shead <[email protected]>
2058
2059 * module.cc (trees_out::has_tu_local_dep): Also look at the
2060 TI_TEMPLATE if we don't find a dep for a decl.
2061 (depset::hash::is_tu_local_entity): Handle unnamed template
2062 types, treat lambdas specially.
2063 (is_exposure_of_member_type): New function.
2064 (depset::hash::add_dependency): Use it.
2065 (depset::hash::finalize_dependencies): Likewise.
2066
2067 2025-03-08 Sandra Loosemore <[email protected]>
2068
2069 * parser.cc (cp_parser_asm_definition): Make comment more explicit.
2070 (cp_parser_asm_operand_list): Likewise. Also correct the comment
2071 block at the top of the function to reflect reality.
2072
2073 2025-03-08 Jason Merrill <[email protected]>
2074 Nathaniel Shead <[email protected]>
2075
2076 PR c++/114630
2077 PR c++/114795
2078 * pt.cc (reopen_tinst_level): Set or clear MK_PURVIEW.
2079 (mark_decl_instantiated): Call set_instantiating_module.
2080 (instantiate_pending_templates): Save and restore module_kind so
2081 it isn't affected by reopen_tinst_level.
2082
2083 2025-03-07 Marek Polacek <[email protected]>
2084
2085 PR c++/118775
2086 * constexpr.cc (cxx_eval_call_expression): Check tree_fits_uhwi_p.
2087
2088 2025-03-07 Nathaniel Shead <[email protected]>
2089
2090 * constexpr.cc (potential_constant_expression_1): Handle
2091 TU_LOCAL_ENTITY.
2092 * pt.cc (expr_contains_tu_local_entity): Remove.
2093 (function_contains_tu_local_entity): Remove.
2094 (dependent_operand_p): Remove special handling for
2095 TU_LOCAL_ENTITY.
2096 (tsubst_expr): Handle TU_LOCAL_ENTITY when tsubsting OVERLOADs;
2097 remove now-unnecessary extra handling.
2098 (type_dependent_expression_p): Handle TU_LOCAL_ENTITY.
2099
2100 2025-03-06 Simon Martin <[email protected]>
2101
2102 * cp-tree.h (processing_contract_condition): Fix comment typo,
2103 paramter -> parameter.
2104 * parser.cc (cp_parser_requires_expression): Fix comment typo,
2105 delared -> declared.
2106
2107 2025-03-06 Jakub Jelinek <[email protected]>
2108
2109 PR c++/98533
2110 PR c++/119123
2111 * parser.cc (cp_parser_class_specifier): Update TYPE_FIELDS of
2112 variant types in case cp_parser_late_parsing_default_args etc. change
2113 TYPE_FIELDS on the main variant. Add switch_to_class lambda and
2114 use it to simplify repeated class switching code.
2115
2116 2025-03-06 Jakub Jelinek <[email protected]>
2117
2118 PR c++/119138
2119 * pt.cc (apply_late_template_attributes): Set p to NULL if
2120 ATTR_FLAG_TYPE_IN_PLACE is not set in attr_flags.
2121 (tsubst) <case POINTER_TYPE, case REFERENCE_TYPE, case ARRAY_TYPE>:
2122 Reuse original type even if TYPE_ATTRIBUTES is non-NULL, but all
2123 the attributes are non-dependent.
2124
2125 2025-03-06 Simon Martin <[email protected]>
2126
2127 PR c++/117504
2128 * call.cc (perform_implicit_conversion_flags): Don't call
2129 mark_{l,r}value_use.
2130
2131 2025-03-05 Jason Merrill <[email protected]>
2132 Jakub Jelinek <[email protected]>
2133
2134 PR c++/117364
2135 PR c++/118874
2136 * coroutines.cc (cp_coroutine_transform::build_ramp_function): For
2137 !aggregate_value_p return force return value into a local temp.
2138
2139 2025-03-05 Da Xie <[email protected]>
2140
2141 PR c++/100589
2142 * decl.cc (grokdeclarator): Issue an error for a declarator with
2143 constrained auto type specifier and trailing return types. Include
2144 function names if available.
2145
2146 2025-03-05 Simon Martin <[email protected]>
2147
2148 PR c++/116740
2149 * name-lookup.cc (set_identifier_type_value_with_scope): Don't
2150 fail assert with ill-formed input.
2151
2152 2025-03-05 Jakub Jelinek <[email protected]>
2153
2154 PR c++/119102
2155 * module.cc (enum streamed_extensions): Add SE_OPENMP_SIMD
2156 and SE_OPENACC, change value of SE_OPENMP and SE_BITS.
2157 (CASE_OMP_SIMD_CODE, CASE_OMP_CODE, CASE_OACC_CODE): Define.
2158 (trees_out::start): Don't set SE_OPENMP extension for OMP_CLAUSE.
2159 Set SE_OPENMP_SIMD extension for CASE_OMP_SIMD_CODE, SE_OPENMP
2160 for CASE_OMP_CODE and SE_OPENACC for CASE_OACC_CODE.
2161 (trees_in::start): Don't fail for OMP_CLAUSE with missing
2162 SE_OPENMP extension. Do fail for CASE_OMP_SIMD_CODE and missing
2163 SE_OPENMP_SIMD extension, or CASE_OMP_CODE and missing SE_OPENMP
2164 extension, or CASE_OACC_CODE and missing SE_OPENACC extension.
2165 (module_state::write_readme): Write all of SE_OPENMP_SIMD, SE_OPENMP
2166 and SE_OPENACC extensions.
2167 (module_state::read_config): Diagnose missing -fopenmp, -fopenmp-simd
2168 and/or -fopenacc depending on extensions used.
2169
2170 2025-03-05 Jakub Jelinek <[email protected]>
2171
2172 * typeck.cc (check_return_expr): Fix comment typo, rom -> from.
2173
2174 2025-03-05 Jakub Jelinek <[email protected]>
2175
2176 PR c++/118787
2177 * pt.cc (tsubst) <case ARRAY_TYPE>: Use return t; only if it doesn't
2178 have any TYPE_ATTRIBUTES. Call apply_late_template_attributes.
2179 <case POINTER_TYPE, case REFERENCE_TYPE>: Likewise. Formatting fix.
2180
2181 2025-03-04 Jason Merrill <[email protected]>
2182
2183 PR c++/119073
2184 * call.cc (extend_temps_r): Preserve types of COND_EXPR arms.
2185
2186 2025-03-04 Marek Polacek <[email protected]>
2187
2188 PR c++/109431
2189 * cp-tree.h (range_expr_nelts): Declare.
2190 * init.cc (build_vec_init): If the CONSTRUCTOR's index is a
2191 RANGE_EXPR, use range_expr_nelts to count how many elements
2192 were initialized.
2193
2194 2025-02-28 Marek Polacek <[email protected]>
2195
2196 PR c++/114913
2197 PR c++/110822
2198 * constexpr.cc (replace_decl_r): If we've replaced something
2199 inside of an ADDR_EXPR, call cxx_mark_addressable and
2200 recompute_tree_invariant_for_addr_expr on the resulting ADDR_EXPR.
2201
2202 2025-02-28 Marek Polacek <[email protected]>
2203
2204 PR c++/118986
2205 * constexpr.cc (cxx_eval_call_expression): Check that the types match
2206 before calling replace_decl, if not, set *non_constant_p.
2207 (maybe_constant_init_1): Don't strip INIT_EXPR if it would change the
2208 type of the expression.
2209
2210 2025-02-28 Patrick Palka <[email protected]>
2211
2212 PR c++/119038
2213 * lambda.cc (maybe_generic_this_capture): Consider xobj
2214 member functions as well, not just iobj. Update function
2215 comment.
2216
2217 2025-02-28 Jakub Jelinek <[email protected]>
2218
2219 PR c++/119045
2220 * constexpr.cc (cxx_eval_store_expression) <case REALPART_EXPR>:
2221 Assert that refs->is_empty () rather than probe == target.
2222 (cxx_eval_store_expression) <case IMAGPART_EXPR>: Likewise.
2223
2224 2025-02-27 Marek Polacek <[email protected]>
2225
2226 PR c++/118928
2227 * constexpr.cc (cxx_eval_constant_expression) <case GOTO_EXPR>: Remove
2228 an assert.
2229
2230 2025-02-27 Marek Polacek <[email protected]>
2231
2232 PR c++/118516
2233 * parser.cc (cp_parser_template_argument): Don't call
2234 require_potential_constant_expression.
2235
2236 2025-02-25 Jakub Jelinek <[email protected]>
2237
2238 PR c++/118876
2239 * cp-tree.h (register_dtor_fn): Add a bool argument defaulted to false.
2240 * decl.cc (start_cleanup_fn): Add OMP_TARGET argument, use
2241 "__omp_tcf" prefix rather than "__tcf" in that case. Add
2242 "omp declare target" and "omp declare target nohost" attributes
2243 to the fndecl.
2244 (register_dtor_fn): Add OMP_TARGET argument, pass it down to
2245 start_cleanup_fn.
2246 * decl2.cc (one_static_initialization_or_destruction): Add OMP_TARGET
2247 argument, pass it down to register_dtor_fn.
2248 (emit_partial_init_fini_fn): Pass omp_target to
2249 one_static_initialization_or_destruction.
2250 (handle_tls_init): Pass false to
2251 one_static_initialization_or_destruction.
2252
2253 2025-02-25 Jakub Jelinek <[email protected]>
2254
2255 PR c++/118923
2256 * tree.cc (get_internal_target_expr): Use force_target_expr
2257 instead of build_target_expr_with_type.
2258 * typeck.cc (get_member_function_from_ptrfunc): Use
2259 get_internal_target_expr instead of force_target_expr.
2260 * decl.cc (cp_finish_decl): Likewise.
2261 * method.cc (build_comparison_op): Likewise.
2262
2263 2025-02-22 Sandra Loosemore <[email protected]>
2264
2265 * parser.cc (cp_finish_omp_declare_variant): Initialize
2266 append_args_last.
2267
2268 2025-02-17 Jason Merrill <[email protected]>
2269
2270 PR c++/118856
2271 PR c++/118763
2272 * cp-tree.h (TARGET_EXPR_INTERNAL_P): New.
2273 * call.cc (extend_temps_r): Check it instead of CLEANUP_EH_ONLY.
2274 * tree.cc (get_internal_target_expr): Set it instead.
2275 * typeck2.cc (maybe_push_temp_cleanup): Don't set CLEANUP_EH_ONLY.
2276
2277 2025-02-15 Nathaniel Shead <[email protected]>
2278
2279 PR c++/118846
2280 * cp-tree.h (WILDCARD_TYPE_P): Include UNBOUND_CLASS_TEMPLATE.
2281 * decl2.cc (min_vis_expr_r): Don't assume a TEMPLATE_DECL will
2282 be a function or variable.
2283
2284 2025-02-15 Jason Merrill <[email protected]>
2285
2286 PR c++/118053
2287 * constexpr.cc (cxx_eval_constant_expression): Generalize
2288 DECL_VALUE_EXPR invisiref handling.
2289
2290 2025-02-14 Marek Polacek <[email protected]>
2291
2292 * pt.cc (tsubst_expr) <COMPONENT_REF>: Assign the result of
2293 force_paren_expr.
2294
2295 2025-02-14 Jason Merrill <[email protected]>
2296
2297 PR c++/118856
2298 * call.cc (set_up_extended_ref_temp): Retain a TARGET_EXPR for
2299 cleanups if something later in initialization throws.
2300 (extend_temps_r): Don't extend eliding or EH-only TARGET_EXPRs.
2301 * cp-tree.h (get_internal_target_expr): Declare.
2302 * tree.cc (get_internal_target_expr): New.
2303 * decl.cc (cp_finish_decomp, expand_static_init): Use it.
2304 * except.cc (build_throw): Likewise.
2305 * init.cc (build_new_1, build_vec_init, build_delete): Likewise.
2306 (build_vec_delete): Likewise.
2307 * typeck2.cc (maybe_push_temp_cleanup): Likewise.
2308
2309 2025-02-14 Jason Merrill <[email protected]>
2310
2311 * init.cc (perform_member_init): Remove unicode from comment.
2312
2313 2025-02-14 Marek Polacek <[email protected]>
2314
2315 PR c++/116379
2316 * pt.cc (tsubst_expr) <COMPONENT_REF>: Use force_paren_expr to set
2317 REF_PARENTHESIZED_P.
2318
2319 2025-02-14 Nathaniel Shead <[email protected]>
2320
2321 * lambda.cc (record_lambda_scope): Clear mangling scope for
2322 otherwise unattached lambdas in class member templates.
2323
2324 2025-02-14 Nathaniel Shead <[email protected]>
2325
2326 PR c++/107741
2327 * cp-tree.h (is_static_data_member_initialized_in_class):
2328 Declare new predicate.
2329 * decl2.cc (start_initialized_static_member): Push the
2330 TEMPLATE_DECL when appropriate.
2331 (is_static_data_member_initialized_in_class): New predicate.
2332 (finish_initialized_static_member): Use it.
2333 * lambda.cc (record_lambda_scope): Likewise.
2334 * parser.cc (cp_parser_init_declarator): Start the member decl
2335 early for static members so that lambda scope is set.
2336 (cp_parser_template_declaration_after_parameters): Don't
2337 register in-class initialized static members here.
2338
2339 2025-02-13 Jason Merrill <[email protected]>
2340
2341 * tree.cc (handle_init_priority_attribute): Use OPT_prio_ctor_dtor.
2342
2343 2025-02-13 Jason Merrill <[email protected]>
2344
2345 * decl.cc (omp_declare_variant_finalize_one): Use forward_parm.
2346
2347 2025-02-13 Jason Merrill <[email protected]>
2348
2349 PR c++/118856
2350 * call.cc (struct extend_temps_data): Add var_map.
2351 (extend_all_temps): Adjust.
2352 (set_up_extended_ref_temp): Make walk_data void*.
2353 (extend_temps_r): Remap variables. Handle pset here.
2354 Extend all TARGET_EXPRs.
2355
2356 2025-02-13 Nathaniel Shead <[email protected]>
2357
2358 PR c++/118849
2359 * decl2.cc (min_vis_expr_r): Constrain visibility according to
2360 the type of decl_constant_var_p decls.
2361
2362 2025-02-13 Jakub Jelinek <[email protected]>
2363
2364 PR c++/118822
2365 PR c++/118833
2366 * semantics.cc (adjust_loop_decl_cond): Allow multiple trailing
2367 CLEANUP_STMT levels in *BODY_P. Set *CLEANUP_P to the number
2368 of levels rather than one particular cleanup, keep the cleanups
2369 in *PREP_P. Set *BODY_P to the last stmt in the cur_stmt_list
2370 or NULL if *CLEANUP_P and the innermost cur_stmt_list is empty.
2371 (finish_loop_cond_prep): New function.
2372 (finish_while_stmt, finish_for_stmt): Use it. Don't call
2373 set_one_cleanup_loc.
2374 * constexpr.cc (cxx_eval_loop_expr): Adjust handling of
2375 {FOR,WHILE}_COND_{PREP,CLEANUP}.
2376
2377 2025-02-11 Jason Merrill <[email protected]>
2378
2379 PR c++/118574
2380 PR c++/107637
2381 * call.cc (struct extend_temps_data): New.
2382 (extend_temps_r, extend_all_temps): New.
2383 (set_up_extended_ref_temp): Handle tree walk case.
2384 (extend_ref_init_temps): Cal extend_all_temps.
2385 * decl.cc (initialize_local_var): Revert ext-temps change.
2386 * parser.cc (cp_convert_range_for): Likewise.
2387 (cp_parser_omp_loop_nest): Likewise.
2388 * pt.cc (tsubst_stmt): Likewise.
2389 * semantics.cc (finish_for_stmt): Likewise.
2390
2391 2025-02-11 Sandra Loosemore <[email protected]>
2392
2393 * parser.cc (cp_finish_omp_declare_variant): Update call to
2394 omp_check_context_selector.
2395 (cp_parser_omp_metadirective): Likewise.
2396
2397 2025-02-11 Simon Martin <[email protected]>
2398
2399 PR c++/118306
2400 PR c++/118304
2401 * decl.cc (maybe_strip_indirect_ref): New.
2402 (check_special_function_return_type): Take declarator as input.
2403 Call maybe_strip_indirect_ref and error out if it returns true.
2404 (grokdeclarator): Update call to
2405 check_special_function_return_type.
2406
2407 2025-02-11 Nathaniel Shead <[email protected]>
2408
2409 PR c++/118807
2410 * pt.cc (reregister_specialization): Remove spec from
2411 DECL_TEMPLATE_INSTANTIATIONS.
2412
2413 2025-02-07 Jakub Jelinek <[email protected]>
2414
2415 PR c++/115586
2416 * parser.cc (cp_parser_range_for): For name independent decls in
2417 structured bindings, only push the name/binding once per
2418 structured binding.
2419
2420 2025-02-07 Jakub Jelinek <[email protected]>
2421 Jason Merrill <[email protected]>
2422
2423 PR c++/86769
2424 * semantics.cc (set_one_cleanup_loc): New function.
2425 (set_cleanup_locs): Use it.
2426 (simplify_loop_decl_cond): Remove.
2427 (adjust_loop_decl_cond): New function.
2428 (begin_while_stmt): Add 2 further NULL_TREE operands to build_stmt.
2429 (finish_while_stmt_cond): Call adjust_loop_decl_cond instead of
2430 simplify_loop_decl_cond.
2431 (finish_while_stmt): Call do_poplevel also on WHILE_COND_PREP if
2432 non-NULL and also use pop_stmt_list rather than do_poplevel for
2433 WHILE_BODY in that case. Call set_one_cleanup_loc.
2434 (begin_for_stmt): Add 2 further NULL_TREE operands to build_stmt.
2435 (finish_for_cond): Call adjust_loop_decl_cond instead of
2436 simplify_loop_decl_cond.
2437 (finish_for_stmt): Call do_poplevel also on FOR_COND_PREP if non-NULL
2438 and also use pop_stmt_list rather than do_poplevel for FOR_BODY in
2439 that case. Call set_one_cleanup_loc.
2440 * constexpr.cc (cxx_eval_loop_expr): Handle
2441 {WHILE,FOR}_COND_{PREP,CLEANUP}.
2442 (check_for_return_continue): Handle {WHILE,FOR}_COND_PREP.
2443 (potential_constant_expression_1): RECUR on
2444 {WHILE,FOR}_COND_{PREP,CLEANUP}.
2445
2446 2025-02-07 Marek Polacek <[email protected]>
2447
2448 PR c++/117106
2449 PR c++/118190
2450 * pt.cc (maybe_instantiate_noexcept): Give an error if the noexcept
2451 hasn't been parsed yet.
2452
2453 2025-02-07 Simon Martin <[email protected]>
2454
2455 PR c++/118282
2456 * call.cc (add_builtin_candidate): Also check for null_ptr_cst_p
2457 operands.
2458
2459 2025-02-07 Jakub Jelinek <[email protected]>
2460
2461 PR c++/118763
2462 * init.cc (build_new_1): Don't set CLEANUP_EH_ONLY.
2463
2464 2025-02-07 Jakub Jelinek <[email protected]>
2465
2466 PR c++/118773
2467 * decl.cc (grokdeclarator): Use cplus_decl_attributes rather than
2468 decl_attributes for std_attributes on pointer and array types.
2469
2470 2025-02-07 Jakub Jelinek <[email protected]>
2471
2472 PR c++/118661
2473 * constexpr.cc (potential_constant_expression_1): Don't diagnose
2474 lvalue-to-rvalue conversion of volatile lvalue if it has NULLPTR_TYPE.
2475 * decl2.cc (decl_maybe_constant_var_p): Return true for constexpr
2476 decls with NULLPTR_TYPE even if they are volatile.
2477
2478 2025-02-05 Simon Martin <[email protected]>
2479
2480 PR c++/118319
2481 * decl.cc (grokfndecl): Inspect all friend function parameters.
2482 If it's not valid for them to have a default value and we're
2483 processing a template, set the default value to error_mark_node
2484 and give a hard error.
2485
2486 2025-02-04 Jakub Jelinek <[email protected]>
2487
2488 PR c++/118671
2489 * call.cc (build_list_conv): For RAW_DATA_CST, call
2490 implicit_conversion with INTEGER_CST representing first byte instead
2491 of the whole RAW_DATA_CST. If it is an optimizable trivial
2492 conversion, just save that to subconvs, otherwise allocate an
2493 artificial ck_list for all the RAW_DATA_CST bytes and create
2494 subsubconv for each of them.
2495 (convert_like_internal): For ck_list with RAW_DATA_CST, instead of
2496 doing all the checks for optimizable conversion just check kind and
2497 assert everything else, otherwise use subsubconversions instead of
2498 the subconversion for each element.
2499
2500 2025-02-04 Marek Polacek <[email protected]>
2501
2502 PR c++/117778
2503 * parser.cc (cp_parser_late_return_type_opt): Maybe override
2504 auto_is_implicit_function_template_parm_p.
2505 (cp_parser_parameter_declaration): Move a make_temp_override below.
2506
2507 2025-02-04 Marek Polacek <[email protected]>
2508
2509 PR c++/118718
2510 * parser.cc (warn_about_ambiguous_parse): Don't warn when a trailing
2511 return type is present.
2512
2513 2025-02-04 Simon Martin <[email protected]>
2514 Jason Merrill <[email protected]>
2515
2516 PR c++/117114
2517 PR c++/109918
2518 * class.cc (warn_hidden): Keep track of overloaded and of hidden
2519 base methods.
2520 * error.cc (location_of): Skip over conv_op_marker.
2521
2522 2025-02-04 Simon Martin <[email protected]>
2523
2524 PR c++/114619
2525 * init.cc (build_vec_init): Properly determine whether
2526 digest_init has been called.
2527
2528 2025-02-04 Jakub Jelinek <[email protected]>
2529
2530 PR c++/118719
2531 * lambda.cc (add_capture): Only pedwarn about capturing structured
2532 binding if !explicit_init_p.
2533
2534 2025-02-04 Nathaniel Shead <[email protected]>
2535
2536 PR c++/108205
2537 * contracts.cc (get_pseudo_contract_violation_type): Give names
2538 to generated FIELD_DECLs.
2539 (declare_handle_contract_violation): Mark contract_violation
2540 type as external linkage.
2541 (build_contract_handler_call): Ensure any builtin declarations
2542 created here aren't treated as attached to the current module.
2543
2544 2025-02-04 Nathaniel Shead <[email protected]>
2545
2546 PR c++/98893
2547 * decl.cc (start_cleanup_fn): Make name from the mangled name of
2548 the passed-in decl.
2549 (register_dtor_fn): Pass decl to start_cleanup_fn.
2550
2551 2025-02-03 A J Ryan Solutions Ltd <[email protected]>
2552
2553 PR c++/118265
2554 * pt.cc (find_parameter_packs_r) <case TEMPLATE_PARM_INDEX>:
2555 Walk into the type of a parameter pack.
2556
2557 2025-02-03 Iain Sandoe <[email protected]>
2558 Jason Merrill <[email protected]>
2559
2560 PR c++/116506
2561 PR c++/116880
2562 * coroutines.cc (build_co_await): Ensure that xvalues are
2563 materialised. Handle references/pointer values in awaiter
2564 access expressions.
2565 (is_stable_lvalue): New.
2566 * decl.cc (cxx_maybe_build_cleanup): Handle null arg.
2567
2568 2025-02-03 Jason Merrill <[email protected]>
2569
2570 PR c++/116914
2571 PR c++/117231
2572 PR c++/118470
2573 PR c++/118491
2574 * semantics.cc (finish_for_stmt): Don't wrap the result of
2575 pop_stmt_list in EXPR_STMT.
2576
2577 2025-02-03 Richard Biener <[email protected]>
2578
2579 PR c++/79786
2580 * rtti.cc (emit_tinfo_decl): Fix DATA_ABI_ALIGNMENT invocation.
2581
2582 2025-01-31 Jakub Jelinek <[email protected]>
2583
2584 PR c++/117516
2585 * class.cc (field_nonempty_p): Formatting fixes. Use
2586 integer_zerop instead of tree_int_cst_equal with size_zero_node.
2587 (struct flexmems_t): Change type of first member from tree to bool.
2588 (find_flexarrays): Add nested_p argument. Change pun argument type
2589 from tree to bool, adjust uses. Formatting fixes. If BASE_P or
2590 NESTED_P and T is RECORD_TYPE, start looking only at the last
2591 non-empty or array FIELD_DECL. Adjust recursive call, set first
2592 if it was a nested call and found an array.
2593 (diagnose_invalid_flexarray, diagnose_flexarrays, check_flexarrays):
2594 Formatting fixes.
2595
2596 2025-01-31 Marek Polacek <[email protected]>
2597
2598 PR c++/117501
2599 * cp-gimplify.cc (cp_build_init_expr_for_ctor): New.
2600 (cp_fold_immediate_r): Call it.
2601 (cp_fold): Break out code into cp_build_init_expr_for_ctor.
2602
2603 2025-01-30 Patrick Palka <[email protected]>
2604
2605 * cp-tree.h (LAMBDA_EXPR_CAPTURES_THIS_P): Remove.
2606
2607 2025-01-30 Iain Sandoe <[email protected]>
2608
2609 PR c++/118673
2610 * tree.cc (lvalue_kind): Mark CONST_DECLs as mergable
2611 when they are also TREE_STATIC.
2612
2613 2025-01-30 Tobias Burnus <[email protected]>
2614
2615 * parser.cc (cp_finish_omp_declare_variant): Modify how append_args
2616 is saved internally.
2617 * pt.cc (tsubst_attribute): Likewise.
2618 (tsubst_omp_clauses): Remove C_ORT_OMP_DECLARE_SIMD from interop
2619 handling as no longer called for it.
2620 * decl.cc (omp_declare_variant_finalize_one): Update append_args
2621 changes; fixes for ADL input.
2622
2623 2025-01-29 Jakub Jelinek <[email protected]>
2624
2625 PR c++/118655
2626 * semantics.cc (trait_expr_value) <case CPTK_IS_BOUNDED_ARRAY>: Return
2627 false for zero-sized arrays.
2628
2629 2025-01-28 Jason Merrill <[email protected]>
2630
2631 PR c++/118285
2632 * constexpr.cc (cxx_eval_vec_init_1): Build INIT_EXPR for
2633 initializing a class.
2634
2635 2025-01-28 Jason Merrill <[email protected]>
2636
2637 PR c++/118673
2638 * call.cc (maybe_init_list_as_array): Check for lvalue
2639 initializers.
2640 * cp-tree.h (enum cp_lvalue_kind_flags): Add clk_mergeable.
2641 * tree.cc (lvalue_kind): Return it.
2642 (non_mergeable_glvalue_p): New.
2643 (test_lvalue_kind): Adjust.
2644
2645 2025-01-28 Patrick Palka <[email protected]>
2646
2647 PR c++/117855
2648 * cp-tree.h (DECL_FRIEND_CONTEXT): Exclude deduction guides.
2649
2650 2025-01-27 Jason Merrill <[email protected]>
2651
2652 PR c++/118632
2653 * pt.cc (unify): Only strip conversion if deducible_expression.
2654
2655 2025-01-27 Simon Martin <[email protected]>
2656
2657 PR c++/114292
2658 * pt.cc (for_each_template_parm_r) <INTEGER_TYPE>: Remove case
2659 now handled by cp_walk_subtrees.
2660 * tree.cc (cp_walk_subtrees): Walk the type of DECL_EXPR
2661 declarations, as well as the TYPE_{MIN,MAX}_VALUE of
2662 INTEGER_TYPEs.
2663
2664 2025-01-27 John David Anglin <[email protected]>
2665
2666 * module.cc: Test HAVE_MUNMAP and HAVE_MSYNC instead of
2667 _POSIX_MAPPED_FILES > 0.
2668
2669 2025-01-27 Jakub Jelinek <[email protected]>
2670
2671 PR c++/115769
2672 * module.cc (module_state::write_inits): Verify
2673 STATIC_INIT_DECOMP_{,NON}BASE_P flags and stream changes in those
2674 out.
2675 (module_state::read_inits): Stream those flags in.
2676
2677 2025-01-27 Jakub Jelinek <[email protected]>
2678
2679 PR c++/115769
2680 * cp-tree.h (STATIC_INIT_DECOMP_BASE_P): Define.
2681 (STATIC_INIT_DECOMP_NONBASE_P): Define.
2682 * decl.cc (cp_finish_decl): Mark nodes in {static,tls}_aggregates
2683 emitted for namespace scope structured bindings with
2684 STATIC_INIT_DECOMP_{,NON}BASE_P flags when needed.
2685 * decl2.cc (decomp_handle_one_var, decomp_finalize_var_list): New
2686 functions.
2687 (emit_partial_init_fini_fn): Use them.
2688 (prune_vars_needing_no_initialization): Assert
2689 STATIC_INIT_DECOMP_*BASE_P is not set on DECL_EXTERNAL vars to be
2690 pruned out.
2691 (partition_vars_for_init_fini): Use same priority for
2692 consecutive STATIC_INIT_DECOMP_*BASE_P vars and propagate
2693 those flags to new TREE_LISTs when possible. Formatting fix.
2694 (handle_tls_init): Use decomp_handle_one_var and
2695 decomp_finalize_var_list functions.
2696
2697 2025-01-25 Simon Martin <[email protected]>
2698
2699 PR c++/118239
2700 * constexpr.cc (cx_check_missing_mem_inits): Don't skip fields
2701 with DECL_FIELD_IS_BASE.
2702
2703 2025-01-25 Jakub Jelinek <[email protected]>
2704
2705 PR c++/117827
2706 * init.cc (build_new_1): Pass address of a make_tree_vector ()
2707 initialized gc tree vector to build_vec_init and append
2708 build_disable_temp_cleanup to init_expr from it.
2709
2710 2025-01-25 Nathaniel Shead <[email protected]>
2711
2712 PR c++/116568
2713 * module.cc (trees_out::get_merge_kind): Treat all lambdas
2714 without a mangling scope as un-mergeable.
2715
2716 2025-01-25 Nathaniel Shead <[email protected]>
2717
2718 PR c++/116568
2719 * cp-tree.h (finish_concept_definition): Adjust parameters.
2720 (start_concept_definition): Declare.
2721 * module.cc (depset::hash::is_tu_local_entity): Use
2722 LAMBDA_EXPR_EXTRA_SCOPE to detect TU-local lambdas.
2723 * parser.cc (cp_parser_concept_definition): Start a lambda scope
2724 for concept definitions.
2725 * pt.cc (tsubst_lambda_expr): Namespace-scope lambdas may now
2726 have extra scope.
2727 (finish_concept_definition): Split into...
2728 (start_concept_definition): ...this new function.
2729
2730 2025-01-25 Nathaniel Shead <[email protected]>
2731
2732 PR c++/118245
2733 * cp-tree.h (LAMBDA_EXPR_EXTRA_SCOPE): Adjust comment.
2734 * parser.cc (cp_parser_class_head): Start (and do not finish)
2735 lambda scope for all valid types.
2736 (cp_parser_class_specifier): Finish lambda scope after parsing
2737 members instead.
2738 * pt.cc (instantiate_class_template): Add lambda scoping.
2739
2740 2025-01-24 Marek Polacek <[email protected]>
2741
2742 PR c++/117153
2743 * decl2.cc (build_anon_union_vars): Use FIELD for the second operand
2744 of a COMPONENT_REF.
2745
2746 2025-01-23 Marek Polacek <[email protected]>
2747
2748 PR c++/117602
2749 * cp-tree.h (current_nonlambda_scope): Add a default argument.
2750 * lambda.cc (current_nonlambda_scope): New bool parameter. Use it.
2751 * parser.cc (cp_parser_lambda_introducer): Use current_nonlambda_scope
2752 to check if the lambda is non-local.
2753
2754 2025-01-23 Jakub Jelinek <[email protected]>
2755
2756 PR c++/118590
2757 * typeck.cc (build_omp_array_section): If array_expr is type dependent
2758 or a TYPE_DECL, build OMP_ARRAY_SECTION with NULL type.
2759
2760 2025-01-23 Jakub Jelinek <[email protected]>
2761
2762 PR c++/118604
2763 * parser.cc (cp_parser_omp_metadirective): Test !default_p
2764 first and use strcmp () != 0 rather than !strcmp () == 0.
2765
2766 2025-01-23 Nathaniel Shead <[email protected]>
2767
2768 * mangle.cc (write_expression): Update mangling for lambdas.
2769
2770 2025-01-23 Nathaniel Shead <[email protected]>
2771
2772 PR c++/107741
2773 * cp-tree.h (start_initialized_static_member): Declare.
2774 (finish_initialized_static_member): Declare.
2775 * decl2.cc (start_initialized_static_member): New function.
2776 (finish_initialized_static_member): New function.
2777 * lambda.cc (record_lambda_scope): Support falling back to old
2778 ABI (maybe with warning).
2779 * parser.cc (cp_parser_member_declaration): Build decl early
2780 when parsing an initialized static data member.
2781
2782 2025-01-23 Nathaniel Shead <[email protected]>
2783
2784 PR c++/118582
2785 * module.cc (trees_out::decl_value): Always stream
2786 imported_temploid_friends information.
2787 (trees_in::decl_value): Likewise.
2788
2789 2025-01-22 Jakub Jelinek <[email protected]>
2790
2791 PR c++/115769
2792 * decl.cc: Partially implement CWG 2867 - Order of initialization
2793 for structured bindings.
2794 (cp_finish_decl): If need_decomp_init, for function scope structure
2795 binding bases, temporarily clear stmts_are_full_exprs_p before
2796 calling expand_static_init, after it call cp_finish_decomp and wrap
2797 code emitted by both into maybe_cleanup_point_expr_void and ensure
2798 cp_finish_decomp isn't called again.
2799
2800 2025-01-22 Marek Polacek <[email protected]>
2801
2802 PR c++/118396
2803 * constexpr.cc (cxx_eval_outermost_constant_expr): Add an error call
2804 when !allow_non_constant.
2805
2806 2025-01-22 Simon Martin <[email protected]>
2807
2808 PR c++/118199
2809 * typeck2.cc (split_nonconstant_init_1): Clear
2810 TARGET_EXPR_ELIDING_P if we need to use a copy constructor
2811 because of __no_unique_address__.
2812
2813 2025-01-22 Jakub Jelinek <[email protected]>
2814
2815 * parser.cc (cp_parser_objc_message_args): Use tree_cons with
2816 nreverse at the end for both sel_args and addl_args, instead of
2817 chainon with build_tree_list second argument.
2818
2819 2025-01-22 Jakub Jelinek <[email protected]>
2820
2821 * call.cc (add_list_candidates): Use append_ctor_to_tree_vector.
2822
2823 2025-01-22 Patrick Palka <[email protected]>
2824
2825 PR c++/116756
2826 * lambda.cc (lambda_expr_this_capture): Call
2827 retrieve_local_specialization on the result of
2828 LAMBDA_EXPR_THIS_CAPTURE for a generic lambda.
2829 * parser.cc (cp_parser_lambda_expression): Don't clear
2830 LAMBDA_EXPR_THIS_CAPTURE.
2831 * pt.cc (tsubst_stmt) <case DECL_EXPR>: Don't overwrite
2832 LAMBDA_EXPR_THIS_CAPTURE with the specialized capture.
2833 (tsubst_lambda_expr): Don't clear LAMBDA_EXPR_THIS_CAPTURE
2834 afterward.
2835
2836 2025-01-21 Andrew Pinski <[email protected]>
2837
2838 PR c++/118525
2839 * cp-gimplify.cc (cp_fold): Check operands of unary, binary, cond/vec_cond
2840 and array_ref for error_mark before checking if the operands had changed.
2841
2842 2025-01-21 Jakub Jelinek <[email protected]>
2843
2844 PR objc++/118586
2845 * parser.cc (cp_parser_objc_message_args): Handle CPP_EMBED.
2846
2847 2025-01-21 Marek Polacek <[email protected]>
2848
2849 PR c++/118396
2850 PR c++/118523
2851 * constexpr.cc (cxx_eval_outermost_constant_expr): For non-simple
2852 TARGET_EXPRs, return ctx.ctor rather than the result of
2853 cxx_eval_constant_expression. If TYPE and the type of R don't
2854 match, return the original expression.
2855
2856 2025-01-21 Simon Martin <[email protected]>
2857
2858 PR c++/118225
2859 * typeck.cc (build_class_member_access_expr): Let errors that
2860 that have been reported go through.
2861
2862 2025-01-21 Jakub Jelinek <[email protected]>
2863
2864 * parser.cc (cp_lexer_new_main): Attempt to optimize large sequences
2865 of CPP_NUMBER with int type and values 0-255 separated by CPP_COMMA
2866 into CPP_EMBED with RAW_DATA_CST u.value.
2867
2868 2025-01-21 Jakub Jelinek <[email protected]>
2869
2870 * cp-objcp-common.cc (names_builtin_p): Return 1 for RID_VA_ARG.
2871
2872 2025-01-21 Jakub Jelinek <[email protected]>
2873
2874 PR c++/118532
2875 * call.cc (add_list_candidates): Handle RAW_DATA_CST among init_list
2876 elts.
2877 * error.cc (dump_expr_init_vec): Handle RAW_DATA_CST among v elts.
2878
2879 2025-01-20 Nathaniel Shead <[email protected]>
2880
2881 * parser.cc (cp_parser_decomposition_declaration): Check linkage
2882 of structured bindings in modules.
2883 * tree.cc (decl_linkage): Structured bindings don't necessarily
2884 have no linkage.
2885
2886 2025-01-20 Nathaniel Shead <[email protected]>
2887
2888 PR c++/118101
2889 * module.cc (trees_in::decl_value): Use structural equality when
2890 deduping partial specs with mismatching canonical types.
2891
2892 2025-01-18 Jakub Jelinek <[email protected]>
2893
2894 PR c++/118513
2895 * decl2.cc (copy_linkage): If not TREE_PUBLIC, also set
2896 DECL_INTERFACE_KNOWN, assert it was set on decl and copy
2897 DECL_NOT_REALLY_EXTERN flags.
2898
2899 2025-01-18 Jakub Jelinek <[email protected]>
2900
2901 PR c++/118534
2902 * constexpr.cc (find_array_ctor_elt): Don't return i early if
2903 i == end - 1 and the last elt's value is RAW_DATA_CST.
2904
2905 2025-01-17 Nathaniel Shead <[email protected]>
2906
2907 PR c++/118049
2908 * module.cc (trees_in::is_matching_decl): Propagate
2909 FNDECL_USED_AUTO as well.
2910
2911 2025-01-17 Tobias Burnus <[email protected]>
2912
2913 PR fortran/118321
2914 * decl.cc (omp_declare_variant_finalize_one): Shift adjust_args index
2915 by one for non-static class function's 'this' pointer.
2916
2917 2025-01-17 Nathaniel Shead <[email protected]>
2918
2919 PR c++/118147
2920 * parser.cc (cp_parser_cache_defarg): Don't error when
2921 CPP_PRAGMA_EOL.
2922
2923 2025-01-17 Simon Martin <[email protected]>
2924
2925 PR c++/118255
2926 * name-lookup.cc (pushdecl): Don't call check_template_shadow
2927 for hidden bindings.
2928
2929 2025-01-16 Patrick Palka <[email protected]>
2930
2931 PR c++/105440
2932 * constexpr.cc (cxx_eval_call_expression): If any RESULT_DECLs get
2933 replaced in the call result, try further evaluating the result.
2934
2935 2025-01-16 Patrick Palka <[email protected]>
2936
2937 PR c++/107522
2938 * constraint.cc (get_normalized_constraints_from_decl): Use the
2939 most general template for an explicit specialization of a
2940 member template.
2941
2942 2025-01-16 Patrick Palka <[email protected]>
2943
2944 PR c++/118454
2945 * cp-tree.h (STF_KEEP_INJ_CLASS_NAME): Define.
2946 * pt.cc (iterative_hash_template_argument) <case tcc_type>:
2947 Clarify comment for when we'd see an alias template
2948 specialization here.
2949 (coerce_template_parms): Strip typedefs (except for
2950 injected-class-names) in the pack expansion early break cases
2951 that defer coercion.
2952 * tree.cc (strip_typedefs): Don't strip an injected-class-name
2953 if STF_KEEP_INJ_CLASS_NAME is set.
2954
2955 2025-01-16 Patrick Palka <[email protected]>
2956
2957 PR c++/116417
2958 * cp-tree.h (finish_pseudo_destructor_expr): Add complain
2959 parameter.
2960 * parser.cc (cp_parser_postfix_dot_deref_expression): Pass
2961 complain=tf_warning_or_error to finish_pseudo_destructor_expr.
2962 * pt.cc (tsubst_expr): Pass complain to
2963 finish_pseudo_destructor_expr.
2964 * semantics.cc (finish_pseudo_destructor_expr): Check complain
2965 before emitting a diagnostic.
2966
2967 2025-01-16 Simon Martin <[email protected]>
2968
2969 PR c++/117775
2970 * decl.cc (fold_sizeof_expr): Make sure the folded result has
2971 type size_type_node.
2972
2973 2025-01-16 Sandra Loosemore <[email protected]>
2974
2975 * parser.cc (cp_parser_omp_assumption_clauses): Give a more specific
2976 error message for invalid directives vs unknown names.
2977
2978 2025-01-16 Sandra Loosemore <[email protected]>
2979
2980 * decl2.cc (cplus_decl_attributes): Don't add "omp declare target
2981 block".
2982
2983 2025-01-16 Sandra Loosemore <[email protected]>
2984 Kwok Cheung Yeung <[email protected]>
2985 Sandra Loosemore <[email protected]>
2986
2987 PR middle-end/112779
2988 PR middle-end/113904
2989 * cp-tree.h (struct saved_scope): Add new field
2990 x_processing_omp_trait_property_expr.
2991 (processing_omp_trait_property_expr): New.
2992 * parser.cc (cp_parser_skip_to_end_of_block_or_statement): Add
2993 metadirective_p parameter and handle skipping over the parentheses
2994 in a "for" statement.
2995 (struct omp_metadirective_parse_data): New.
2996 (mangle_metadirective_region_label): New.
2997 (cp_parser_label_for_labeled_statement): Mangle label names in a
2998 metadirective body.
2999 (cp_parser_jump_statement): Likewise.
3000 (cp_parser_omp_context_selector): Allow arbitrary expressions in
3001 device_num and condition properties.
3002 (cp_parser_omp_assumption_clauses): Handle C_OMP_DIR_META.
3003 (analyze_metadirective_body): New.
3004 (cp_parser_omp_metadirective): New.
3005 (cp_parser_pragma): Handle PRAGMA_OMP_METADIRECTIVE.
3006 * parser.h (struct cp_parser): Add omp_metadirective_state field.
3007 * pt.cc (tsubst_omp_context_selector): New.
3008 (tsubst_stmt): Handle OMP_METADIRECTIVE.
3009 * semantics.cc (finish_id_expression_1): Don't diagnose use of
3010 parameter outside function body in dynamic selector expressions here.
3011
3012 2025-01-16 Jakub Jelinek <[email protected]>
3013
3014 PR c++/118214
3015 * decl.cc (struct reshape_iter): Add raw_idx member.
3016 (cp_maybe_split_raw_data): Add inc_cur parameter, set *inc_cur,
3017 don't modify original CONSTRUCTOR, use d->raw_idx to track index
3018 into a RAW_DATA_CST d->cur->value.
3019 (consume_init): Adjust cp_maybe_split_raw_data caller, increment
3020 d->cur when cur_inc is true.
3021 (reshape_init_array_1): Don't modify original CONSTRUCTOR when
3022 handling RAW_DATA_CST d->cur->value and !reuse, instead use
3023 d->raw_idx to track index into RAW_DATA_CST.
3024 (reshape_single_init): Initialize iter.raw_idx.
3025 (reshape_init_class): Adjust for introduction of d->raw_idx,
3026 adjust cp_maybe_split_raw_data caller, do d->cur++ if inc_cur
3027 rather than when it returns non-NULL.
3028 (reshape_init_r): Check for has_designator_problem for second
3029 half of _Complex earlier, also check for
3030 error_operand_p (d->cur->value). Use consume_init instead of
3031 cp_maybe_split_raw_data with later conditional d->cur++.
3032 (reshape_init): Initialize d.raw_idx.
3033
3034 2025-01-16 Jakub Jelinek <[email protected]>
3035
3036 * parser.cc (cp_parser_lambda_declarator_opt,
3037 cp_parser_statement, cp_parser_selection_statement,
3038 cp_parser_jump_statement): Use -std=c++23 and -std=gnu++23
3039 in diagnostics rather than -std=c++2b and -std=gnu++2b.
3040 * semantics.cc (finish_compound_literal): Likewise.
3041 * typeck2.cc (build_functional_cast_1): Likewise.
3042 * decl.cc (start_decl): Likewise.
3043 * constexpr.cc (ensure_literal_type_for_constexpr_object,
3044 potential_constant_expression_1): Likewise.
3045
3046 2025-01-15 Jakub Jelinek <[email protected]>
3047
3048 PR c++/118390
3049 * cp-tree.h (count_ctor_elements): Declare.
3050 * call.cc (count_ctor_elements): No longer static.
3051 * pt.cc (unify): Use count_ctor_elements instead of
3052 CONSTRUCTOR_NELTS.
3053
3054 2025-01-15 Jakub Jelinek <[email protected]>
3055
3056 PR c++/118278
3057 * mangle.cc (write_expression): Handle RAW_DATA_CST.
3058
3059 2025-01-15 Marek Polacek <[email protected]>
3060
3061 PR c++/118139
3062 * cxx-pretty-print.cc (pp_cxx_nested_name_specifier): Handle
3063 a computed-type-specifier.
3064
3065 2025-01-15 Tobias Burnus <[email protected]>
3066
3067 PR c++/118486
3068 * decl.cc (omp_declare_variant_finalize_one): When resolving
3069 the variant to use, handle variant calls with TARGET_EXPR.
3070
3071 2025-01-15 Jakub Jelinek <[email protected]>
3072
3073 PR c++/118387
3074 * method.cc (build_comparison_op): Set bad if
3075 std::strong_ordering::equal doesn't convert to rettype.
3076
3077 2025-01-15 Jakub Jelinek <[email protected]>
3078
3079 PR c++/118124
3080 * cp-tree.h (build_array_of_n_type): Change second argument type
3081 from int to unsigned HOST_WIDE_INT.
3082 * tree.cc (build_array_of_n_type): Likewise.
3083 * call.cc (count_ctor_elements): New function.
3084 (maybe_init_list_as_array): Use it instead of CONSTRUCTOR_NELTS.
3085 (convert_like_internal): Use length from init's type instead of
3086 len when handling the maybe_init_list_as_array case.
3087
3088 2025-01-15 Jakub Jelinek <[email protected]>
3089
3090 PR c++/118124
3091 * call.cc (convert_like_internal): Handle RAW_DATA_CST in
3092 ck_list handling. Formatting fixes.
3093
3094 2025-01-14 Marek Polacek <[email protected]>
3095
3096 PR c++/118047
3097 PR c++/118355
3098 * typeck2.cc (massage_init_elt): Call fold_non_dependent_init
3099 unless for a CONSTRUCTOR in a template.
3100
3101 2025-01-14 Sandra Loosemore <[email protected]>
3102 Kwok Cheung Yeung <[email protected]>
3103 Sandra Loosemore <[email protected]>
3104 Marcel Vollweiler <[email protected]>
3105
3106 PR middle-end/114596
3107 PR middle-end/112779
3108 PR middle-end/113904
3109 * decl.cc (omp_declare_variant_finalize_one): Update for changes
3110 to omp-general.h interfaces.
3111 * parser.cc (cp_finish_omp_declare_variant): Likewise.
3112
3113 2025-01-14 Nathaniel Shead <[email protected]>
3114
3115 PR c++/117397
3116 * module.cc (depset::hash::add_deduction_guides): Don't emit
3117 imported deduction guides.
3118 (depset::hash::finalize_dependencies): Add check for any
3119 bindings referring to imported entities.
3120
3121 2025-01-14 Andrew Pinski <[email protected]>
3122
3123 PR c++/118445
3124 * constexpr.cc (cxx_eval_constant_expression): Handle VEC_DUPLICATE like
3125 a "normal" unary operator.
3126 (potential_constant_expression_1): Likewise.
3127
3128 2025-01-11 Nathaniel Shead <[email protected]>
3129
3130 PR c++/114630
3131 * module.cc (trees_in::core_vals) <BLOCK>: Chain a new node if
3132 DECL_CHAIN already is set.
3133
3134 2025-01-11 Jason Merrill <[email protected]>
3135
3136 * module.cc (trees_out::type_node): Write attributes for
3137 tt_derived_type, not tt_variant_type.
3138 (trees_in::tree_node): Likewise for reading.
3139
3140 2025-01-11 Jason Merrill <[email protected]>
3141
3142 * module.cc (trees_in::decl_value): Merge attributes.
3143
3144 2025-01-10 Paul-Antoine Arras <[email protected]>
3145
3146 * parser.cc (cp_parser_pragma): Replace call to cp_parser_omp_dispatch
3147 with cp_parser_omp_construct and check context.
3148
3149 2025-01-10 Jakub Jelinek <[email protected]>
3150
3151 PR c++/118387
3152 * method.cc (genericize_spaceship): For tag == cc_last if
3153 type is not auto just return error_mark_node instead of failing
3154 checking assertion.
3155
3156 2025-01-10 Jason Merrill <[email protected]>
3157
3158 * module.cc (trees_out::core_bools): Write replaceable_operator.
3159 (trees_in::core_bools): Read it.
3160
3161 2025-01-10 Marek Polacek <[email protected]>
3162
3163 PR c++/117937
3164 * pt.cc (tsubst_pack_index): tsubst the pack even when it's not
3165 PACK_EXPANSION_P.
3166
3167 2025-01-10 Jakub Jelinek <[email protected]>
3168
3169 PR c++/118277
3170 * cp-tree.h (finish_asm_string_expression): Declare.
3171 * semantics.cc (finish_asm_string_expression): New function.
3172 (finish_asm_stmt): Use it.
3173 * parser.cc (cp_parser_asm_string_expression): Likewise.
3174 Wrap string into PAREN_EXPR in the ("") case.
3175 (cp_parser_asm_definition): Don't ICE if finish_asm_stmt
3176 returns error_mark_node.
3177 (cp_parser_asm_specification_opt): Revert 2024-06-24 changes.
3178 * pt.cc (tsubst_stmt): Don't ICE if finish_asm_stmt returns
3179 error_mark_node.
3180
3181 2025-01-10 Jakub Jelinek <[email protected]>
3182
3183 * module.cc (trees_out::core_vals): Note DECL_VALUE_EXPR even for
3184 vars outside of functions.
3185 (trees_in::core_vals): Read in DECL_VALUE_EXPR even for vars outside
3186 of functions.
3187 (trees_out::get_merge_kind): Make DECL_DECOMPOSITION_P MK_unique.
3188
3189 2025-01-10 Jason Merrill <[email protected]>
3190
3191 * error.cc (cxx_initialize_diagnostics): Improve comment.
3192 * module.cc (modules): Improve comment.
3193 (get_originating_module): Add function comment.
3194
3195 2025-01-10 Jason Merrill <[email protected]>
3196
3197 * module.cc (trees_out::write_function_def): Write returns* flags.
3198 (struct post_process_data): Add returns_* flags.
3199 (trees_in::read_function_def): Set them.
3200 (module_state::read_cluster): Use them.
3201
3202 2025-01-09 Jason Merrill <[email protected]>
3203
3204 * decl.cc (check_redeclaration_exception_specification): Be more
3205 lenient about ::operator new.
3206
3207 2025-01-09 Jason Merrill <[email protected]>
3208 Torbjörn SVENSSON <[email protected]>
3209
3210 PR c/116060
3211 * call.cc (standard_conversion): Preserve type name in ck_identity.
3212 (maybe_adjust_type_name): New.
3213 (convert_like_internal): Use it.
3214 Handle -Wsuggest-attribute=format here.
3215 (convert_for_arg_passing): Not here.
3216
3217 2025-01-09 Patrick Palka <[email protected]>
3218
3219 PR c++/118060
3220 * constraint.cc (tsubst_valid_expression_requirement): Don't
3221 check convert_to_void during partial substitution.
3222
3223 2025-01-09 Patrick Palka <[email protected]>
3224
3225 PR c++/117887
3226 * pt.cc (instantiate_template): Set tf_partial if arguments are
3227 dependent.
3228
3229 2025-01-09 Patrick Palka <[email protected]>
3230
3231 PR c++/117925
3232 * constexpr.cc (potential_constant_expression_1) <case CAST_EXPR>:
3233 Fix check for class conversion to literal type to properly look
3234 through the TREE_LIST operand of a CAST_EXPR.
3235
3236 2025-01-09 Patrick Palka <[email protected]>
3237
3238 PR c++/117925
3239 * constexpr.cc (cxx_eval_constant_expression) <default>:
3240 Relax ICE when encountering an unexpected tree code into a
3241 checking ICE guarded by flag_checking.
3242
3243 2025-01-09 Patrick Palka <[email protected]>
3244
3245 PR c++/117993
3246 * search.cc (any_dependent_bases_p): Recurse into bases (of
3247 dependent type) that are not BINFO_DEPENDENT_BASE_P. Document
3248 default argument.
3249
3250 2025-01-09 Patrick Palka <[email protected]>
3251
3252 PR c++/117792
3253 * pt.cc (type_dependent_expression_p): Consider the dependence
3254 of the address of each template argument of a function
3255 template-id.
3256
3257 2025-01-08 Jakub Jelinek <[email protected]>
3258
3259 PR c++/117825
3260 * typeck.cc (cp_build_function_call_vec): Don't call
3261 check_function_arguments if complain doesn't have tf_warning bit set.
3262
3263 2025-01-08 Jason Merrill <[email protected]>
3264
3265 * cp-tree.h (build_nop): Add CXX_MEM_STAT_INFO.
3266 * typeck.cc (build_nop): Add MEM_STAT_DECL.
3267
3268 2025-01-08 Jason Merrill <[email protected]>
3269
3270 * call.cc (implicit_conversion): Check that FROM isn't a reference
3271 if we also got an EXPR argument.
3272 (convert_like_internal): Check that EXPR isn't a reference.
3273 (can_convert_arg): convert_from_reference if needed.
3274
3275 2025-01-08 Jason Merrill <[email protected]>
3276
3277 * method.cc (is_stub_object): New.
3278 * cp-tree.h (is_stub_object): Declare.
3279 * error.cc (dump_expr): Use it.
3280
3281 2025-01-08 Jason Merrill <[email protected]>
3282
3283 * call.cc (convert_like_internal): Add missing break.
3284 * coroutines.cc (cp_coroutine_transform::build_ramp_function): Build
3285 INIT_EXPR directly.
3286 * decl.cc (omp_declare_variant_finalize_one): Use build_stub_object.
3287
3288 2025-01-08 Marek Polacek <[email protected]>
3289
3290 PR c++/118169
3291 * typeck2.cc (split_nonconstant_init): Call finish_expr_stmt instead
3292 of add_stmt.
3293
3294 2025-01-03 Tobias Burnus <[email protected]>
3295
3296 * parser.cc (cp_parser_omp_var_list_no_open,
3297 cp_parser_omp_var_list): For kind=0 (= OMP_CLAUSE_ERROR),
3298 store also the expression location in the tree list.
3299 (cp_parser_oacc_data_clause_deviceptr,
3300 cp_finish_omp_declare_variant): Use that location instead or
3301 input_location/the before-parsing location.
3302 * semantics.cc (finish_omp_threadprivate): Likewise.
3303
3304 2025-01-02 Paul-Antoine Arras <[email protected]>
3305
3306 * parser.cc (cp_parser_omp_dispatch): Handle INDIRECT_REF.
3307
3308
3309 Copyright (C) 2025 Free Software Foundation, Inc.
3310
3311 Copying and distribution of this file, with or without modification,
3312 are permitted in any medium without royalty provided the copyright
3313 notice and this notice are preserved.