diff options
Diffstat (limited to 'src/compiler-support.h')
-rw-r--r-- | src/compiler-support.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compiler-support.h b/src/compiler-support.h index bf2885993..3dd873383 100644 --- a/src/compiler-support.h +++ b/src/compiler-support.h @@ -36,6 +36,14 @@ # define WASM_UNREACHABLE() abort() #endif +#ifdef __GNUC__ +#define WASM_NORETURN __attribute__((noreturn)) +#elif defined(_MSC_VER) +#define WASM_NORETURN __declspec(noreturn) +#else +#define WASM_NORETURN +#endif + // The code might contain TODOs or stubs that read some values but do nothing // with them. The compiler might fail with [-Werror,-Wunused-variable]. // The WASM_UNUSED(varible) is a wrapper that helps to suppress the error. |