The bcache uses memcpy to make copies of the data passed to it. In
C++, this is only safe for trivially-copyable types.
This patch changes bcache to require this property, and slightly
changes the API to make it easier to use when copying a single object.
It also makes the new 'insert' template methods return the correct
type.
---
gdb/bcache.h | 25 ++++++++++++++++++++++++-
gdb/gdbtypes.c | 2 +-
gdb/macrotab.c | 12 ++++++------
gdb/psymtab.c | 6 ++----
4 files changed, 33 insertions(+), 12 deletions(-)
I can confirm this change does not cause any regressions on Fedora Rawhide aarch64.