mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-11-16 12:34:43 +00:00
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.
This commit is contained in:
@@ -105,7 +105,7 @@ struct blockranges
|
||||
This implies that within the body of one function
|
||||
the blocks appear in the order of a depth-first tree walk. */
|
||||
|
||||
struct block : public allocate_on_obstack
|
||||
struct block : public allocate_on_obstack<block>
|
||||
{
|
||||
/* Return this block's start address. */
|
||||
CORE_ADDR start () const
|
||||
|
||||
Reference in New Issue
Block a user