summaryrefslogtreecommitdiffhomepage
path: root/compat
diff options
context:
space:
mode:
Diffstat (limited to 'compat')
-rw-r--r--compat/macros1.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/compat/macros1.h b/compat/macros1.h
index 96c09af4..915b8d29 100644
--- a/compat/macros1.h
+++ b/compat/macros1.h
@@ -37,7 +37,7 @@
#define PP_EXPAND3(x) x
#ifdef _MSC_VER
-# define unreachable() __assume(0)
+# define unreachable() do { __assume(0); *(volatile int*)nullptr = 0; } while (0) /* NOLINT(clang-analyzer-core.NullDereference) */
#else
-# define unreachable() __builtin_unreachable()
+# define unreachable() do { __builtin_unreachable(); *(volatile int*)nullptr = 0; } while (0) /* NOLINT(clang-analyzer-core.NullDereference) */
#endif