From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B837C3939C03; Tue, 9 Feb 2021 01:52:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B837C3939C03 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/98994] [11 Regression] Empty type with [[no_unique_address]] in union with constructor is not a constant expression since r11-6918 Date: Tue, 09 Feb 2021 01:52:34 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Feb 2021 01:52:34 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98994 --- Comment #2 from CVS Commits --- The master branch has been updated by Jason Merrill : https://gcc.gnu.org/g:a8dd2b3e96590ceccead63d28fc91c956a5f1a73 commit r11-7141-ga8dd2b3e96590ceccead63d28fc91c956a5f1a73 Author: Jason Merrill Date: Mon Feb 8 15:56:11 2021 -0500 c++: constexpr, union, and no_unique_address [PR98994] My second patch for 97566 omits nested CONSTRUCTORs for empty fields, b= ut we do want them for empty union members. gcc/cp/ChangeLog: PR c++/98994 PR c++/97566 * constexpr.c (cxx_eval_store_expression): Only skip empty fiel= ds in RECORD_TYPE. gcc/testsuite/ChangeLog: PR c++/98994 * g++.dg/cpp2a/no_unique_address12.C: New test.=