__builtin_unreachable() seems not emit runtime error

This commit is contained in:
Yuichi Nishiwaki
2017-04-09 17:25:12 +09:00
parent d52dfad671
commit 339e8e8419
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -173,7 +173,7 @@ typedef unsigned long uint32_t;
# define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
#endif
#if GCC_VERSION >= 40500 || __clang__
# define PIC_UNREACHABLE() (__builtin_unreachable())
# define PIC_UNREACHABLE() (assert(false), __builtin_unreachable())
#else
# define PIC_UNREACHABLE() (assert(false))
#endif