mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:51:15 +08:00
Rely on std::uncaught_exceptions
std::uncaught_exceptions is a C++17 feature, so I think we can remove this conditional code from inferior.h.
This commit is contained in:
parent
d3f6bbc48d
commit
c12221171b
@ -86,13 +86,7 @@ struct infcall_suspend_state_deleter
|
||||
/* If we are restoring the inferior state due to an exception,
|
||||
some error message will be printed. So, only warn the user
|
||||
when we cannot restore during normal execution. */
|
||||
bool unwinding;
|
||||
#if __cpp_lib_uncaught_exceptions
|
||||
unwinding = std::uncaught_exceptions () > 0;
|
||||
#else
|
||||
unwinding = std::uncaught_exception ();
|
||||
#endif
|
||||
if (!unwinding)
|
||||
if (std::uncaught_exceptions () == 0)
|
||||
warning (_("Failed to restore inferior state: %s"), e.what ());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user