* [Bug build/31141] gdbsupport fails to compile with clang due to missing C++ prototype for operator delete
2023-12-11 16:12 [Bug build/31141] New: gdbsupport fails to compile with clang due to missing C++ prototype for operator delete jremus at linux dot ibm.com
@ 2023-12-11 16:13 ` jremus at linux dot ibm.com
2023-12-11 17:00 ` tromey at sourceware dot org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jremus at linux dot ibm.com @ 2023-12-11 16:13 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31141
Jens Remus <jremus at linux dot ibm.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at sourceware dot org
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug build/31141] gdbsupport fails to compile with clang due to missing C++ prototype for operator delete
2023-12-11 16:12 [Bug build/31141] New: gdbsupport fails to compile with clang due to missing C++ prototype for operator delete jremus at linux dot ibm.com
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
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: tromey at sourceware dot org @ 2023-12-11 17:00 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31141
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2023-12-11
Ever confirmed|0 |1
--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
Seems like a clang bug but we can revert the patch.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug build/31141] gdbsupport fails to compile with clang due to missing C++ prototype for operator delete
2023-12-11 16:12 [Bug build/31141] New: gdbsupport fails to compile with clang due to missing C++ prototype for operator delete jremus at linux dot ibm.com
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
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: tromey at sourceware dot org @ 2023-12-11 17:04 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31141
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at sourceware dot org |tromey at sourceware dot org
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug build/31141] gdbsupport fails to compile with clang due to missing C++ prototype for operator delete
2023-12-11 16:12 [Bug build/31141] New: gdbsupport fails to compile with clang due to missing C++ prototype for operator delete jremus at linux dot ibm.com
` (2 preceding siblings ...)
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
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: tromey at sourceware dot org @ 2023-12-11 17:12 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31141
--- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
https://sourceware.org/pipermail/gdb-patches/2023-December/205021.html
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug build/31141] gdbsupport fails to compile with clang due to missing C++ prototype for operator delete
2023-12-11 16:12 [Bug build/31141] New: gdbsupport fails to compile with clang due to missing C++ prototype for operator delete jremus at linux dot ibm.com
` (3 preceding siblings ...)
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
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jremus at linux dot ibm.com @ 2023-12-11 17:33 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31141
--- Comment #3 from Jens Remus <jremus at linux dot ibm.com> ---
Thanks, Tom! Peeking at /usr/include/c++/13/new it looks like both subject
operator delete instances are guarded by __cpp_sized_deallocation:
#if __cpp_sized_deallocation
void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
__attribute__((__externally_visible__));
void operator delete[](void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
__attribute__((__externally_visible__));
#endif
Maybe that helps identify what would need to be changed in the build to make it
work with clang?
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug build/31141] gdbsupport fails to compile with clang due to missing C++ prototype for operator delete
2023-12-11 16:12 [Bug build/31141] New: gdbsupport fails to compile with clang due to missing C++ prototype for operator delete jremus at linux dot ibm.com
` (4 preceding siblings ...)
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
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jremus at linux dot ibm.com @ 2023-12-12 16:02 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31141
Jens Remus <jremus at linux dot ibm.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Jens Remus <jremus at linux dot ibm.com> ---
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 the
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/75a6b5764a264f2f2897adef40ecb4827b0bfa97/configure.ac#L2697)
2. Guard the two subject functions with __cpp_sized_deallocation in
gdbsupport/new-op.cc, provided they are currently unused.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug build/31141] gdbsupport fails to compile with clang due to missing C++ prototype for operator delete
2023-12-11 16:12 [Bug build/31141] New: gdbsupport fails to compile with clang due to missing C++ prototype for operator delete jremus at linux dot ibm.com
` (5 preceding siblings ...)
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
8 siblings, 0 replies; 10+ messages in thread
From: tromey at sourceware dot org @ 2023-12-12 20:32 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31141
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|FIXED |---
Status|RESOLVED |REOPENED
--- Comment #5 from Tom Tromey <tromey at sourceware dot org> ---
Reopening until the patch lands.
-fsized-deallocation sounds like more of a pain than just
reverting the patch, IMO.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug build/31141] gdbsupport fails to compile with clang due to missing C++ prototype for operator delete
2023-12-11 16:12 [Bug build/31141] New: gdbsupport fails to compile with clang due to missing C++ prototype for operator delete jremus at linux dot ibm.com
` (6 preceding siblings ...)
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
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-12-22 16:40 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31141
--- Comment #6 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom Tromey <tromey@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9b9e5c09b1879766af959d276e99780982f4350b
commit 9b9e5c09b1879766af959d276e99780982f4350b
Author: Tom Tromey <tromey@adacore.com>
Date: Mon Dec 11 10:04:23 2023 -0700
Fix build with clang 16
clang 16 reports a missing declaration in new-op.cc. We believed
these operators to be declared starting with C++14, but apparently
that is not the case.
This patch reverts the earlier change and then updates the comment to
reflect the current state.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31141
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug build/31141] gdbsupport fails to compile with clang due to missing C++ prototype for operator delete
2023-12-11 16:12 [Bug build/31141] New: gdbsupport fails to compile with clang due to missing C++ prototype for operator delete jremus at linux dot ibm.com
` (7 preceding siblings ...)
2023-12-22 16:40 ` cvs-commit at gcc dot gnu.org
@ 2023-12-22 16:42 ` tromey at sourceware dot org
8 siblings, 0 replies; 10+ messages in thread
From: tromey at sourceware dot org @ 2023-12-22 16:42 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31141
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|REOPENED |RESOLVED
Target Milestone|--- |15.1
--- Comment #7 from Tom Tromey <tromey at sourceware dot org> ---
Fixed now.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread