diff options
author | Tom Tromey <tromey@adacore.com> | 2024-02-27 10:24:30 -0700 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2024-06-04 09:49:27 -0600 |
commit | c12221171ba4851dff700f25ebc3cdbf120618a2 (patch) | |
tree | 9d92182924a023d1ae9b496b7cc482cf70640075 /gdb/inferior.h | |
parent | d3f6bbc48d498c9d866eab7191f4c7b000a0e4e7 (diff) | |
download | fsf-binutils-gdb-c12221171ba4851dff700f25ebc3cdbf120618a2.zip fsf-binutils-gdb-c12221171ba4851dff700f25ebc3cdbf120618a2.tar.gz fsf-binutils-gdb-c12221171ba4851dff700f25ebc3cdbf120618a2.tar.bz2 |
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.
Diffstat (limited to 'gdb/inferior.h')
-rw-r--r-- | gdb/inferior.h | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/gdb/inferior.h b/gdb/inferior.h index e239aa5..c08261b 100644 --- a/gdb/inferior.h +++ b/gdb/inferior.h @@ -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 ()); } } |