summaryrefslogtreecommitdiffstats
path: root/libstdc++/src/pure_virtual.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++/src/pure_virtual.cpp')
-rw-r--r--libstdc++/src/pure_virtual.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/libstdc++/src/pure_virtual.cpp b/libstdc++/src/pure_virtual.cpp
index 663c1e9..affb80f 100644
--- a/libstdc++/src/pure_virtual.cpp
+++ b/libstdc++/src/pure_virtual.cpp
@@ -1,10 +1,8 @@
+#undef NDEBUG
+#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-extern "C" void __cxa_pure_virtual()
-{
- fprintf(stderr, "Pure virtual function called. Are you calling virtual methods from a destructor?\n");
- abort();
+extern "C" void __cxa_pure_virtual() {
+ // We can't call __libc_android_log_write from libstdc++ because it's private, so cheat.
+ assert(!"Pure virtual function called. Are you calling virtual methods from a destructor?");
+ /* NOTREACHED */
}
-