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 | a3b12e3809e388e9c9b0608b14d85c0985e412c3 (patch) | |
tree | 135226fe24596286c54bf9c5c4a12868c3c55e90 /src/common/assert.cpp | |
parent | dc47d0f624afe76623158a60623d2b6866b36678 (diff) | |
parent | bd38aefc573e5e554386217546bd3a0dd78cc449 (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 b44570528..6026b7dc2 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"); +} |