Landing: ca6cd7cb4851
Project / Subsystem
gcc / gcc
Date
2026-05-22
Author
Jakub Jelinek
Commit
ca6cd7cb48512d60c28024174b319df4580498ce
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- gcc
- patch_id
- —
- commit_hash
- ca6cd7cb48512d60c28024174b319df4580498ce
- source_type
- github
- headline
- GCC now supports C++26 trivial unions per P3074R7 and CWG3189.
- tldr
- GCC now implements the C++26 trivial unions feature, allowing unions with simpler initialization and destruction semantics.
- author
- Jakub Jelinek
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • gcc
- • c++
- • c++26
- • standards
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-05-22T00:00:00.000Z
GCC now supports C++26’s trivial unions as defined by P3074R7 and CWG3189. This impacts how the compiler handles unions, particularly regarding default constructors and destructors. The patch also fixes a pre-existing issue in handling const-qualified variant members in older C++ standards, where the compiler incorrectly diagnosed their usage.