From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 037E5385E449; Sun, 9 May 2021 17:49:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 037E5385E449 From: "msebor at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/100485] False positive in -Wmismatched-new-delete Date: Sun, 09 May 2021 17:49:27 +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: 11.1.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: msebor at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: WONTFIX 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 blocked resolution 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 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: Sun, 09 May 2021 17:49:28 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100485 Martin Sebor changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |msebor at gcc dot gnu.org Blocks| |100406 Resolution|--- |WONTFIX Status|UNCONFIRMED |RESOLVED --- Comment #1 from Martin Sebor --- The call to the inline operator delete is inlined but the call to new is no= t so the warning sees a mismatch. This can be suppressed either by inlining both calls or by preventing it by declaring the operators with attribute noinlin= e.=20=20 The article below gives more insight: https://developers.redhat.com/blog/2021/04/30/detecting-memory-management-b= ugs-with-gcc-11-part-1-understanding-dynamic-allocation/ https://developers.redhat.com/blog/2021/05/05/detecting-memory-management-b= ugs-with-gcc-11-part-2-deallocation-functions/ Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100406 [Bug 100406] bogus/missing -Wmismatched-new-delete=