From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3AFFB3858C2F; Tue, 12 Dec 2023 16:02:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3AFFB3858C2F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1702396956; bh=8rQm65ut97dCVH4tMEOWxZzm4boQ5oPWW4sKTH6+XrY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=kejwXr1s9sgnS2aZ+GOp5xaZfF3B1mOf7A3XIXBrOQHx1dyIL40Aryx1aRGcQENZ7 vlx6LFB82SGSouVvk0ybp3/zZWSXZaBv4gLxR9ilA2aI4weS4p1p26bmPr9H+VYj2g hDoE3I7ltHPXDQzlIBjcWzLWlZBixdzTPIjzZi8Y= From: "jremus at linux dot ibm.com" To: gdb-prs@sourceware.org Subject: [Bug build/31141] gdbsupport fails to compile with clang due to missing C++ prototype for operator delete Date: Tue, 12 Dec 2023 16:02:35 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: build X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jremus at linux dot ibm.com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: tromey at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31141 Jens Remus changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #4 from Jens Remus --- Hello Tom, I can confirm that your referenced patch resolves the gdb build issue with clang on both s390 and x86. Thanks! Googling for "clang __cpp_sized_deallocation" I found that clang requires t= he command-line option -fsized-deallocation to support C++ sized deallocation: https://bcain-llvm.readthedocs.io/projects/clang/en/release_37/ReleaseNotes= /#new-compiler-flags https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-= fsized-deallocation Further details: https://reviews.llvm.org/D8467 Ongoing effort to enable C++ sized deallocation by default: https://reviews.llvm.org/D112921 Besides reverting your changes there could possibly be two alternative approaches: 1. Add -fsized-deallocation to the C++ flags (see https://github.com/tomhughes/valgrind/blob/75a6b5764a264f2f2897adef40ecb482= 7b0bfa97/configure.ac#L2697) 2. Guard the two subject functions with __cpp_sized_deallocation in gdbsupport/new-op.cc, provided they are currently unused. --=20 You are receiving this mail because: You are on the CC list for the bug.=