mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:27:45 +00:00
Kernel: Do not implement VERIFY_NOT_REACHED() as VERIFY(false)
If a switch case ends in VERIFY_NOT_REACHED(), gcc 12 thinks it might fall through.
This commit is contained in:
parent
014b9fd709
commit
f157ad8a35
1 changed files with 2 additions and 3 deletions
|
@ -18,15 +18,14 @@
|
|||
__assertion_failed(#expr, __FILE__, __LINE__, __PRETTY_FUNCTION__); \
|
||||
} while (0)
|
||||
|
||||
#define VERIFY_NOT_REACHED() VERIFY(false)
|
||||
#define VERIFY_NOT_REACHED() __assertion_failed("not reached", __FILE__, __LINE__, __PRETTY_FUNCTION__)
|
||||
|
||||
extern "C" {
|
||||
[[noreturn]] void _abort();
|
||||
[[noreturn]] void abort();
|
||||
}
|
||||
|
||||
static constexpr bool TODO = false;
|
||||
#define TODO() VERIFY(TODO)
|
||||
#define TODO() __assertion_failed("TODO", __FILE__, __LINE__, __PRETTY_FUNCTION__)
|
||||
|
||||
#if ARCH(I386) || ARCH(X86_64)
|
||||
# define VERIFY_INTERRUPTS_DISABLED() VERIFY(!(cpu_flags() & 0x200))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue