aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/abi.cpp
diff options
context:
space:
mode:
authorMartino Facchin <m.facchin@arduino.cc>2020-10-15 10:36:33 +0200
committerGitHub <noreply@github.com>2020-10-15 10:36:33 +0200
commit6ec80154cd2ca52bce443afbbed8a1ad44d049cb (patch)
tree9f5ce5b42f26358b537dd9807a1c3f8617f5c3d7 /cores/arduino/abi.cpp
parent3055c1efa3c6980c864f661e6c8cc5d5ac773af4 (diff)
parent6d292502e138b5c73705f0df8095ded3f1df956f (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.cpp15
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();
}
-