[0/3] Make allocate_on_obstack a bit safer

Message ID 20240227-obstac-alloc-v1-0-bd079aad35cd@adacore.com
Headers
Series Make allocate_on_obstack a bit safer |

Message

Tom Tromey Feb. 27, 2024, 9:42 p.m. UTC
  This series makes the allocate_on_obstack mixin a little safer by
having it enforce the rule that an object allocated on an obstack must
have a trivial destructor.

---
Tom Tromey (3):
      Use addrmap_fixed in a few spots
      Don't use virtual destructor in addrmap
      Require trivial destructor in allocate_on_obstack

 gdb/addrmap.h             |  7 ++++---
 gdb/block.c               |  2 +-
 gdb/block.h               | 12 ++++++------
 gdb/dwarf2/cooked-index.h |  4 ++--
 gdb/dwarf2/read.h         |  2 +-
 gdb/gdbtypes.h            |  4 ++--
 gdb/symtab.h              |  2 +-
 gdbsupport/gdb_obstack.h  |  6 +++++-
 8 files changed, 22 insertions(+), 17 deletions(-)
---
base-commit: 407ca654547b100903f7eab44d078a2440736f13
change-id: 20240227-obstac-alloc-deabe0f935c3

Best regards,
  

Comments

Tom Tromey March 21, 2024, 6:20 p.m. UTC | #1
>>>>> "Tom" == Tom Tromey <tromey@adacore.com> writes:

Tom> This series makes the allocate_on_obstack mixin a little safer by
Tom> having it enforce the rule that an object allocated on an obstack must
Tom> have a trivial destructor.

I'm checking this in.

Tom