From 1963afd6894c1f408b65a0f893e009b4e9f36e55 Mon Sep 17 00:00:00 2001 From: Yury Delendik Date: Thu, 26 May 2016 19:26:36 -0500 Subject: Allows parsing of debug information in .S files Currently it ignores this information. Also it allows parse files with -asm-verbose=true. --- src/compiler-support.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/compiler-support.h') diff --git a/src/compiler-support.h b/src/compiler-support.h index 9e298b278..bf2885993 100644 --- a/src/compiler-support.h +++ b/src/compiler-support.h @@ -36,4 +36,10 @@ # define WASM_UNREACHABLE() abort() #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. +#define WASM_UNUSED(expr) \ + do { if (sizeof expr) { (void)0; } } while (0) + #endif // wasm_compiler_support_h -- cgit v1.2.3