From: Jakub Jelinek Date: Mon, 17 Nov 2025 14:27:04 +0000 (+0100) Subject: c++: Add testcase for CWG3079 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9acc6d887647301a2d1c6b3559d16996c47f0801;p=thirdparty%2Fgcc.git c++: Add testcase for CWG3079 We already implement anonymous unions that way, the following patch just adds a testcase for it. 2025-11-17 Jakub Jelinek * g++.dg/DRs/dr3079.C: New test. --- diff --git a/gcc/testsuite/g++.dg/DRs/dr3079.C b/gcc/testsuite/g++.dg/DRs/dr3079.C new file mode 100644 index 00000000000..5fd26d3603e --- /dev/null +++ b/gcc/testsuite/g++.dg/DRs/dr3079.C @@ -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;; }; };