public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "jremus at linux dot ibm.com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug build/31141] New: gdbsupport fails to compile with clang due to missing C++ prototype for operator delete Date: Mon, 11 Dec 2023 16:12:02 +0000 [thread overview] Message-ID: <bug-31141-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=31141 Bug ID: 31141 Summary: gdbsupport fails to compile with clang due to missing C++ prototype for operator delete Product: gdb Version: HEAD Status: UNCONFIRMED Severity: normal Priority: P2 Component: build Assignee: unassigned at sourceware dot org Reporter: jremus at linux dot ibm.com Target Milestone: --- gdbsupport fails to compile with clang on s390x and x86 since commit 553b78748fd ("Rely on C++17 <new> in new-op.cc") as follows: $ make make all-recursive make[1]: Entering directory '/home/jremus/my-dev-stuff/binutils-build/gdbsupport' make[2]: Entering directory '/home/jremus/my-dev-stuff/binutils-build/gdbsupport' CXX new-op.o ../../binutils-gdb/gdbsupport/new-op.cc:114:1: error: no previous prototype for function 'operator delete' [-Werror,-Wmissing-prototypes] operator delete (void *p, std::size_t) noexcept ^ ../../binutils-gdb/gdbsupport/new-op.cc:113:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void ^ static ../../binutils-gdb/gdbsupport/new-op.cc:132:1: error: no previous prototype for function 'operator delete[]' [-Werror,-Wmissing-prototypes] operator delete[] (void *p, std::size_t) noexcept ^ ../../binutils-gdb/gdbsupport/new-op.cc:131:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void ^ static 2 errors generated. make[2]: *** [Makefile:554: new-op.o] Error 1 make[2]: Leaving directory '/home/jremus/my-dev-stuff/binutils-build/gdbsupport' make[1]: *** [Makefile:574: all-recursive] Error 1 make[1]: Leaving directory '/home/jremus/my-dev-stuff/binutils-build/gdbsupport' make: *** [Makefile:446: all] Error 2 It works again when reverting commit 553b78748fd ("Rely on C++17 <new> in new-op.cc"). My approach to build with clang are as follows: cd $HOME git clone git://sourceware.org/git/binutils-gdb.git mkdir binutils-build cd binutils-build CC=clang CXX=clang++ ../binutils-gdb/configure make My above test build on x86 was on Fedora 38 with clang 16.0.6 and gcc C++ system header files from package libstdc++-devel 13.2.1. -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2023-12-11 16:12 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-12-11 16:12 jremus at linux dot ibm.com [this message] 2023-12-11 16:13 ` [Bug build/31141] " jremus at linux dot ibm.com 2023-12-11 17:00 ` tromey at sourceware dot org 2023-12-11 17:04 ` tromey at sourceware dot org 2023-12-11 17:12 ` tromey at sourceware dot org 2023-12-11 17:33 ` jremus at linux dot ibm.com 2023-12-12 16:02 ` jremus at linux dot ibm.com 2023-12-12 20:32 ` tromey at sourceware dot org 2023-12-22 16:40 ` cvs-commit at gcc dot gnu.org 2023-12-22 16:42 ` tromey at sourceware dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-31141-4717@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).