On 11/17/25 4:41 PM, Jakub Jelinek wrote:
Hi!

Working virtually out of Beaker Island.

We already implement anonymous unions that way, the following patch
just adds a testcase for it.

Tested on x86_64-linux and i686-linux, ok for trunk?

OK.
2025-11-17  Jakub Jelinek  <[email protected]>

        * g++.dg/DRs/dr3079.C: New test.

--- gcc/testsuite/g++.dg/DRs/dr3079.C.jj        2025-11-17 11:09:52.100091004 
+0100
+++ gcc/testsuite/g++.dg/DRs/dr3079.C   2025-11-17 11:11:50.928431712 +0100
@@ -0,0 +1,5 @@
+// DR 3079 - Allow empty-declarations in anonymous unions
+// { dg-do compile { target c++11 } }
+
+struct A { union { int x;; } u; };
+struct B { union { int x;; }; };


        Jakub


Reply via email to