diff options
| author | Mai <mathew1800@gmail.com> | 2022-06-14 08:34:16 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-14 08:34:16 -0400 |
| commit | ce98a3e5d738610051a2683d9d95a943a9e99c04 (patch) | |
| tree | 135226fe24596286c54bf9c5c4a12868c3c55e90 /src/common/assert.cpp | |
| parent | c2c39c564a3204d2e8c0debb6bc071d95e1f2172 (diff) | |
| parent | f91e2f27427ac7ecf2472c7a587958980ab93443 (diff) | |
Merge pull request #8439 from liamwhite/monkey-compiler
general: fix compilation on GCC 12
Diffstat (limited to 'src/common/assert.cpp')
| -rw-r--r-- | src/common/assert.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/common/assert.cpp b/src/common/assert.cpp index b445705285..6026b7dc22 100644 --- a/src/common/assert.cpp +++ b/src/common/assert.cpp @@ -6,8 +6,13 @@ #include "common/settings.h" -void assert_handle_failure() { +void assert_fail_impl() { if (Settings::values.use_debug_asserts) { Crash(); } } + +[[noreturn]] void unreachable_impl() { + Crash(); + throw std::runtime_error("Unreachable code"); +} |
