diff options
author | Martino Facchin <m.facchin@arduino.cc> | 2020-10-15 10:36:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-15 10:36:33 +0200 |
commit | 6ec80154cd2ca52bce443afbbed8a1ad44d049cb (patch) | |
tree | 9f5ce5b42f26358b537dd9807a1c3f8617f5c3d7 /cores/arduino/abi.cpp | |
parent | 3055c1efa3c6980c864f661e6c8cc5d5ac773af4 (diff) | |
parent | 6d292502e138b5c73705f0df8095ded3f1df956f (diff) |
Merge pull request #361 from matthijskooijman/improve-new
Improve and complete implementation of new/delete
Diffstat (limited to 'cores/arduino/abi.cpp')
-rw-r--r-- | cores/arduino/abi.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/cores/arduino/abi.cpp b/cores/arduino/abi.cpp index 8d719b8..6e1b0f8 100644 --- a/cores/arduino/abi.cpp +++ b/cores/arduino/abi.cpp @@ -21,15 +21,16 @@ extern "C" void __cxa_pure_virtual(void) __attribute__ ((__noreturn__)); extern "C" void __cxa_deleted_virtual(void) __attribute__ ((__noreturn__)); +namespace std { + [[gnu::weak, noreturn]] void terminate() { + abort(); + } +} + void __cxa_pure_virtual(void) { - // We might want to write some diagnostics to uart in this case - //std::terminate(); - abort(); + std::terminate(); } void __cxa_deleted_virtual(void) { - // We might want to write some diagnostics to uart in this case - //std::terminate(); - abort(); + std::terminate(); } - |