Vcsn  2.3
Be Rational
builtins.hh
Go to the documentation of this file.
1 #pragma once
2 
3 #if defined __clang__ || defined __GNUC__
4 
5 # define BUILTIN_UNREACHABLE() __builtin_unreachable()
6 
7 #elif defined _MSC_VER
8 
9 # define BUILTIN_UNREACHABLE() __assume(0)
10 
11 #else
12 
13 # define BUILTIN_UNREACHABLE() \
14  do { \
15  assert(!"unreachable code"); \
16  abort(); \
17  } while (false)
18 
19 #endif