]> granicus.if.org Git - postgresql/commitdiff
Implement pg_unreachable() on MSVC.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 23 Jan 2013 10:47:00 +0000 (12:47 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 23 Jan 2013 10:53:55 +0000 (12:53 +0200)
src/include/c.h

index 59af5b5cb8efdc1394e38575db72efe7f81a046a..230229c80e49758e8cb04d986aa176d36f66cea6 100644 (file)
@@ -755,6 +755,8 @@ typedef NameData *Name;
  */
 #if defined(HAVE__BUILTIN_UNREACHABLE) && !defined(USE_ASSERT_CHECKING)
 #define pg_unreachable() __builtin_unreachable()
+#elif defined(_MSC_VER) && !defined(USE_ASSERT_CHECKING)
+#define pg_unreachable() __assume(0)
 #else
 #define pg_unreachable() abort()
 #endif