Re: [PATCH] c++, v4: implement C++29 P2287R6 - Designated-initializers for Base Classes [PR125989]

[email protected] Wed, 5 Aug 2026 15:29:53 +0200
Newsgroups gmane.comp.gcc.patches
Message-ID <[email protected]>
Am 2026-08-05 um 14:05 schrieb Jakub Jelinek:
> On Wed, Aug 05, 2026 at 01:57:47PM +0200, [email protected] wrote:
>> Hmm, since I see -Wmissing-braces mentioned, is there a chance that this
>> fixes/changes the c++20 behaviour reported in PR c++/126131?
> 
> Not sure, don't use designators in that case or disable the warning?
> It is a case where omitting the designator on the anon union is invalid if
> it is used in oother designators, even with the C++29 rules, and designating
> the anon union member without {}s around it is what -Wmissing-braces is
> supposed to warn about.
Changing the source is what I already prepared, but still this is a 
strange inconsistency IMHO.

So, you think -Wmissing-braces is likely wrong in the C++20 or later 
anonymous union case with designated initializers? I'll update PR 126131 
accordingly. And I'll just test your patch and see what happens :-).

Thanks,
Franz