Landing: a8c97564fbc3
Project / Subsystem
gcc / c++/libstdc++
Date
2026-09-10
Author
Jakub Jelinek
Commit
a8c97564fbc39b5c52dffaa3c8229c396632e28d
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- c++/libstdc++
- patch_id
- —
- commit_hash
- a8c97564fbc39b5c52dffaa3c8229c396632e28d
- source_type
- github
- headline
- Implement C++26 union lifetime rules
- tldr
- GCC now supports C++26's adjusted union lifetime and constexpr rules for object initialization.
- author
- Jakub Jelinek
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • c++
- • standardization
- • compiler
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-09-10T00:00:00.000Z
GCC and libstdc++ now implement the C++26 P3726R2 paper, adjusting union lifetime rules. This includes a new builtin for std::start_lifetime that operates on pointers, and improvements to reduced_constant_expression_p to correctly handle union-nested arrays and ignored holes. The changes ensure correct constant evaluation and object lifetime management in C++26, particularly for unions.