Skip to content

Commit a1faa7f

Browse files
committed
Revert "To be investigated: restore cxa_pure_virtual"
This reverts commit 68651bc.
1 parent a25986e commit a1faa7f

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

cores/arduino/abi.cpp

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Copyright (c) 2024 Arduino SA
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <stdlib.h>
8+
9+
extern "C" void __cxa_pure_virtual(void) __attribute__ ((__noreturn__));
10+
extern "C" void __cxa_deleted_virtual(void) __attribute__ ((__noreturn__));
11+
12+
namespace std {
13+
[[gnu::weak, noreturn]] void terminate() {
14+
abort();
15+
}
16+
}
17+
18+
void __cxa_pure_virtual(void) {
19+
std::terminate();
20+
}
21+
22+
void __cxa_deleted_virtual(void) {
23+
std::terminate();
24+
}

cores/arduino/new.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
#include "new.h"
88

9-
extern "C" void __cxa_pure_virtual() {}
10-
119
// The C++ spec dictates that allocation failure should cause the
1210
// (non-nothrow version of the) operator new to throw an exception.
1311
// Since we expect to have exceptions disabled, it would be more

0 commit comments

Comments
 (0)