From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3A6703857C48; Tue, 28 Nov 2023 18:05:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3A6703857C48 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701194752; bh=FlL4v/noPotolbkPiAzKO4HT4mwEfMfM9mJG6Htcntk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Xa15yZqeroCn6qON+Ts2ckXXEsUUlelufaN40vfntILF/CaDcfgpVQQ9U6qm3a5+U +78oWz1Mh+DmgllrtwWnUlhbt8Q+jzo4D0CEwdvWNJAW7mywi5xTICoVO1DwqNZdyw FWhda0f7RLATGrhaLM6F7lNyGRG6xJD6tCI0UyYs= From: "jason at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/94264] Array-to-pointer conversion not performed on array prvalues Date: Tue, 28 Nov 2023 18:05:49 +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: 9.3.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: jason at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc assigned_to dependson bug_status 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=3D94264 Jason Merrill changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gn= u.org Depends on| |53220 Status|NEW |ASSIGNED --- Comment #7 from Jason Merrill --- This is due to my PR53220 change to discourage use of compound-literals in = ways that produce a dangling pointer when the C++ compiler treats them as prvalu= es, unlike C where they have variable lifetime. I think the change was always wrong, but wasn't really a problem until we a= dded array prvalues in C++17. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D53220 [Bug 53220] [4.7/4.8 Regression] g++ mis-compiles compound literals=