From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 26E2B3AA9427; Fri, 18 Jun 2021 14:43:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 26E2B3AA9427 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/99006] make_shared silently works Date: Fri, 18 Jun 2021 14:43:35 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: accepts-invalid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW 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: 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jun 2021 14:43:36 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99006 --- Comment #7 from CVS Commits --- The releases/gcc-9 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:79fa567e234585dc6a71f9bd069101c993513f3e commit r9-9591-g79fa567e234585dc6a71f9bd069101c993513f3e Author: Jonathan Wakely Date: Thu Apr 22 15:46:51 2021 +0100 libstdc++: Reject std::make_shared [PR 99006] Prior to C++20 it should be ill-formed to use std::make_shared with an array type (and we don't support the C++20 feature to make it valid yet anyway). libstdc++-v3/ChangeLog: PR libstdc++/99006 * include/bits/shared_ptr.h (allocate_shared): Assert that _Tp is not an array type. * include/bits/shared_ptr_base.h (__allocate_shared): Likewise. * testsuite/20_util/shared_ptr/creation/99006.cc: New test. (cherry picked from commit 55650236cd97d81f42f9fdb4f6bcb12babafe51f)=