aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/abi.cpp
AgeCommit message (Collapse)Author
2020-09-17Call std::terminate on pure or deleted virtual functionsMatthijs Kooijman
These are special functions that are presumably put into vtables for deleted or pure virtual functions. Previously, this would call `abort()` directly, but calling `std::terminate()` achieves the same effect, but allows user code to change the behavior (e.g. to print to serial, blink leds or whatever makes sense).
2020-09-17Add weak `std::terminate()` implementationMatthijs Kooijman
This allows calling it from other places later. The default implementation calls `abort()`, but making it weak allows user code to override this function (either directly, or by including a library like uclibc++ that implements `std::set_terminate()`). Note that this does not add a declaration for this function, since the standard dictates this to be in `<exception>`, but we cannot meaningfully or completely implement that header, so better leave it to be overridden by e.g. libraries like uclibc++.
2014-09-06Correct implementation of gcc specific internal functionsCristian Maglie
The following empty stubs has been replaced by the gcc flag -fno-threadsafe-static: int __cxa_guard_acquire(__guard *); void __cxa_guard_release (__guard *); void __cxa_guard_abort (__guard *); The following empty stubs has been moved into their specific module abi.cpp: void __cxa_pure_virtual(void) __attribute ((noreturn)); void __cxa_deleted_virtual(void) __attribute ((noreturn)); Fix #107