From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 65E263858C55; Sun, 3 Mar 2024 08:33:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 65E263858C55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709454794; bh=X6Aa4Z80+7no8G693urf98psQnBPcYFGnleL9IlH770=; h=From:To:Subject:Date:In-Reply-To:References:From; b=AseLhJYrLv1RYhKshjg8EfqdlS2sH2oQ+tnICbFyuiNzrX4inzKApZxeIsLMAdFZy 2jdAk8RwsfER3fl4X2mMj4hg+3GefSS1MHSJK9x8GsXvoGBqoFOOfG06gIXJo1Sgfr j+xcfGAPIuoAX+vy4NvDshCSo/0EiBaChs2W7hO8= From: "janschultke at googlemail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/114219] [11/12/13/14 Regression] [expr.const] lvalue-to-rvalue conversion is not diagnosed to disqualify constant expressions for empty classes Date: Sun, 03 Mar 2024 08:33:14 +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: 14.0 X-Bugzilla-Keywords: accepts-invalid, needs-bisection X-Bugzilla-Severity: normal X-Bugzilla-Who: janschultke at googlemail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.5 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114219 --- Comment #4 from Jan Schultke --- I don't see how lvalue-to-rvalue conversion would be bypassed here. https://eel.is/c++draft/conv.lval#:conversion,lvalue-to-rvalue has no speci= al provision for empty classes. https://eel.is/c++draft/dcl.init.general#16.9 would necessitate lvalue-to-rvalue conversion because the initializer has to be converted to a prvalue. I couldn't find any special rule for empty classes.=