From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 82ADB3858C66; Wed, 13 Sep 2023 08:39:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 82ADB3858C66 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694594353; bh=QI/1vcshBNdG6kxkeypaldnHTZmSq+x+qr8N2Gx8n48=; h=From:To:Subject:Date:In-Reply-To:References:From; b=r2BJNNBL2CnSZoXEx5bkCktHJP6kcqkfi8OB5987IyTmCDWiNC8Oeq+nZdfv8+/ML EmyIZxSe04ZGA7hvxbZtBotENiuZdvd3ohoHMHlbuzdblvhdXWkS8pxeAtmD7/pTAb 3hgC4wzpUs+gbDbCi9ptu92hESiGcZ7z83t2Ketw= From: "xry111 at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/111379] comparison between unequal pointers to void should be illegal during constant evaluation Date: Wed, 13 Sep 2023 08:39:06 +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 X-Bugzilla-Severity: normal X-Bugzilla-Who: xry111 at gcc dot gnu.org 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D111379 Xi Ruoyao changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xry111 at gcc dot gnu.org --- Comment #2 from Xi Ruoyao --- (In reply to Jiang An from comment #1) > There's (or will be) a new DR CWG2749 which tentatively ready now. > https://cplusplus.github.io/CWG/issues/2749.html >=20 > It seems that the old resolution in CWG2526 was wrong, and the comparison > should be constexpr-friendly. >=20 > BTW I don't think there was anything specifying that "the comparison would > have *undefined* behaviour" before CWG2526. It is (or was) unspecified, not undefined. And the standard explicitly disallows "a relational operator where the result is unspecified" in [expr.const].=