[Bug c++/126131] No way to use designated initializers for anonymous union warning/error free with -std=gnu++20 or later?
"jason at gcc dot gnu.org via Gcc-bugs" <[email protected]> Wed, 05 Aug 2026 14:33:07 +0000
| Newsgroups | gmane.comp.gcc.bugs |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126131
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2026-08-05
Status|UNCONFIRMED |NEW
CC| |jakub at gcc dot gnu.org,
| |jason at gcc dot gnu.org
Ever confirmed|0 |1
Keywords| |diagnostic
--- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> ---
Hmm, it probably makes sense to omit the warning for a designator in an
anonymous union since it's impossible to designate the anonymous union itself.