We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents dcd711d + 000101d commit 25d6beaCopy full SHA for 25d6bea
src/cxx.cc
@@ -76,7 +76,9 @@ inline namespace cxxbridge1 {
76
77
template <typename Exception>
78
void panic [[noreturn]] (const char *msg) {
79
-#if defined(RUST_CXX_NO_EXCEPTIONS)
+// Do not attempt to throw if the compiler explicitly does not support it.
80
+// If __cpp_attributes is not set, the compiler may not implement feature-test macros.
81
+#if defined(RUST_CXX_NO_EXCEPTIONS) || (defined(__cpp_attributes) && !defined(__cpp_exceptions))
82
std::fprintf(stderr, "Error: %s. Aborting.\n", msg);
83
std::abort();
84
#else
0 commit comments