diff options
author | Michael Smith <mikesmiffy128@gmail.com> | 2021-11-20 03:10:50 +0000 |
---|---|---|
committer | Michael Smith <mikesmiffy128@gmail.com> | 2021-11-20 03:18:08 +0000 |
commit | da6f343032cb01597dc7866e66f091adf3243a62 (patch) | |
tree | 870f8cb8e82bb42202ab92bea03fc6ab35ada7ca /src/unreachable.h |
Initial public snapshot
With code from Bill. Thanks Bill!
Diffstat (limited to 'src/unreachable.h')
-rw-r--r-- | src/unreachable.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/unreachable.h b/src/unreachable.h new file mode 100644 index 0000000..99c82b5 --- /dev/null +++ b/src/unreachable.h @@ -0,0 +1,14 @@ +/* This file is dedicated to the public domain. */ + +#ifndef INC_UNREACHABLE_H +#define INC_UNREACHABLE_H + +#if defined(__GNUC__) || defined(__clang__) +#define unreachable __builtin_unreachable() +#else +#define unreachable do; while (0) +#endif + +#endif + +// vi: sw=4 ts=4 noet tw=80 cc=80 |