From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3C96A3858D37; Sat, 21 Jan 2023 17:22:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3C96A3858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674321756; bh=/kTUkL4Y5CTnNmCYFgvKX4qK+vo6uN/0p0516rS/dA8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gtwaxj5R/6HPifs/yPLR+BqjTRx/Sbh9fLLqG1hM/ZtoPqbMHUCTS11YYXtnwRwx6 Zec5oryVS20YIe5e2Al39qE085e3lpT3x98TE0+QEOjm/sVT2iq2aLF7SL4/qtL6ur K7xubWhlEfV24MiZCtP1P0fDxMEDcXV9huT5kkYs= From: "StevenSun2021 at hotmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/108218] [12/13 Regression] Constant arguments in the new expression is not checked in unevaluated operand since r12-5253-g4df7f8c79835d569 Date: Sat, 21 Jan 2023 17:22: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: 12.1.0 X-Bugzilla-Keywords: accepts-invalid, rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: StevenSun2021 at hotmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.3 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=3D108218 --- Comment #11 from Steven Sun --- (In reply to Andrew Pinski from comment #10) > https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#2392 >=20 > "potentially-evaluated". Oh, I realized that, According to the DR 2392 accepted as a DR at the November, 2022 meeting: https://cplusplus.github.io/CWG/issues/2392.html We should not evaluate that expression in the first dimension of `new` anym= ore. So this is not a bug. This also applys for expressions appearing in requirement-seq of requires-expressions. So surprising! (Correct me if I am wrong)=