diff options
Diffstat (limited to 'ld/testsuite/ld-elf/del.cc')
-rw-r--r-- | ld/testsuite/ld-elf/del.cc | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elf/del.cc b/ld/testsuite/ld-elf/del.cc new file mode 100644 index 0000000..4e2cc60 --- /dev/null +++ b/ld/testsuite/ld-elf/del.cc @@ -0,0 +1,29 @@ +#include <new> + +extern "C" void free (void *); + +void +operator delete (void *ptr, const std::nothrow_t&) throw () +{ + if (ptr) + free (ptr); +} + +void +operator delete (void *ptr) throw () +{ + if (ptr) + free (ptr); +} + +void +operator delete[] (void *ptr) throw () +{ + ::operator delete (ptr); +} + +void +operator delete[] (void *ptr, const std::nothrow_t&) throw () +{ + ::operator delete (ptr); +} |