]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Require trivial destructor in allocate_on_obstack
authorTom Tromey <tromey@adacore.com>
Mon, 26 Feb 2024 17:19:07 +0000 (10:19 -0700)
committerTom Tromey <tromey@adacore.com>
Thu, 21 Mar 2024 18:21:24 +0000 (12:21 -0600)
commit7f032bbedf3e66f6695d4df0d149c2e8033224da
tree3e29a70d55d9e9952f81d6f91411e2cee13ac028
parent9069d69398649cd9a54e4dcac8548b10ece8a304
Require trivial destructor in allocate_on_obstack

This patch makes allocate_on_obstack a little bit safer, by enforcing
the rule that objects allocated on an obstack must have a trivial
destructor.

The static assert is done in a method -- doing it inside the class
itself won't work because the class is incomplete at that point.
gdb/addrmap.h
gdb/block.c
gdb/block.h
gdb/dwarf2/cooked-index.h
gdb/gdbtypes.h
gdb/symtab.h
gdbsupport/gdb_obstack.h