aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGavin Howard <gavin@yzena.com>2021-07-18 21:31:59 -0600
committerGavin Howard <gavin@yzena.com>2021-07-18 21:31:59 -0600
commiteb6680d69d9f44a0c37843269b60631a71ebf5d2 (patch)
tree9e4191fb03f67bd7391f0cd3c0a63800e7decf0f /include
parent39b2af3547fda138e77a54ec1f29a25b4432166d (diff)
downloadplatform_external_bc-eb6680d69d9f44a0c37843269b60631a71ebf5d2.tar.gz
platform_external_bc-eb6680d69d9f44a0c37843269b60631a71ebf5d2.tar.bz2
platform_external_bc-eb6680d69d9f44a0c37843269b60631a71ebf5d2.zip
Add BC_UNREACHABLE for MSVC
Signed-off-by: Gavin Howard <gavin@yzena.com>
Diffstat (limited to 'include')
-rw-r--r--include/status.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/status.h b/include/status.h
index 49b41eef..b012e6bf 100644
--- a/include/status.h
+++ b/include/status.h
@@ -159,9 +159,21 @@
#endif // defined(__clang__) || defined(__GNUC__)
#if BC_HAS_UNREACHABLE
+
#define BC_UNREACHABLE __builtin_unreachable();
+
#else // BC_HAS_UNREACHABLE
+
+#ifdef _WIN32
+
+#define BC_UNREACHABLE __assume(0);
+
+#else // _WIN32
+
#define BC_UNREACHABLE
+
+#endif // _WIN32
+
#endif // BC_HAS_UNREACHABLE
#ifdef __GNUC__