diff options
author | Tom Tromey <tromey@adacore.com> | 2023-12-11 10:04:23 -0700 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2023-12-22 09:35:11 -0700 |
commit | 9b9e5c09b1879766af959d276e99780982f4350b (patch) | |
tree | 37171c4f05cae059fcaac1c0308b074a4262d9e0 /gdbsupport | |
parent | 54ede87e196dca065e1f7f66f8fd80c327fd5255 (diff) | |
download | gdb-9b9e5c09b1879766af959d276e99780982f4350b.zip gdb-9b9e5c09b1879766af959d276e99780982f4350b.tar.gz gdb-9b9e5c09b1879766af959d276e99780982f4350b.tar.bz2 |
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
Diffstat (limited to 'gdbsupport')
-rw-r--r-- | gdbsupport/new-op.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdbsupport/new-op.cc b/gdbsupport/new-op.cc index 181fc49..12bd5d2 100644 --- a/gdbsupport/new-op.cc +++ b/gdbsupport/new-op.cc @@ -27,6 +27,11 @@ #include "host-defs.h" #include <new> +/* These are declared in <new> starting C++14, but removing them + caused a build failure with clang. See PR build/31141. */ +extern void operator delete (void *p, std::size_t) noexcept; +extern void operator delete[] (void *p, std::size_t) noexcept; + /* Override operator new / operator new[], in order to internal_error on allocation failure and thus query the user for abort/core dump/continue, just like xmalloc does. We don't do this from a |