publish UNREACHABLE macro

This commit is contained in:
Yuichi Nishiwaki
2014-03-19 17:40:31 +09:00
parent acfa79bc62
commit ef7d01971b
2 changed files with 9 additions and 4 deletions
+7
View File
@@ -56,6 +56,13 @@ extern "C" {
# define GENSYM(x) GENSYM1__(x,__LINE__)
#endif
#if __GNUC__ || __clang__
# define UNREACHABLE() (__builtin_unreachable())
#else
# include <assert.h>
# define UNREACHABLE() (assert(false))
#endif
#include "config.h"
#include "picrin/value.h"