From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4C7CE3858C5F; Tue, 19 Dec 2023 04:22:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4C7CE3858C5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1702959747; bh=yBbl6sTuaD5/nOcLSf5Oe79bu+EXKa408ggygYf1WEg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PjeMiROFv/4WfJVzTyC6yPRNnRfcYf3Jzaty6EYgxJ8W1lqyRiQrT5aroMatKj9wC 4DsY3w+e3lsmV2PoIqJc6TiCGC7+m59HAqXEvEhbMIdmFmX6ghR8RAMK0wodHmTx3n DFHOOk31YiMFeO0+Ey5NFIy8O6A1KU3i3bJ4ubUI= From: "de34 at live dot cn" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/113047] dereferencing a null pointer in a constant expression Date: Tue, 19 Dec 2023 04:22:26 +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: 13.2.0 X-Bugzilla-Keywords: accepts-invalid X-Bugzilla-Severity: normal X-Bugzilla-Who: de34 at live dot cn 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=3D113047 Jiang An changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |de34 at live dot cn --- Comment #3 from Jiang An --- CWG2823 has been voted into the standard (see https://wg21.link/p3046r0, https://wg21.link/n4972). > Should it be possible to dereference a null pointer in a C++20 constant e= xpression? Now such derefencing is clearly UB and needs to cause constant evaluation failure (not only in C++20, IMO).=