From e7e3e4cf2566ae69df80dba58fb0668c60a88285 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Mon, 5 Dec 2022 12:58:22 +0100 Subject: [PATCH] WASM: don't use a static_assert when an #error would suffice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No need to involve the compiler, make the preprocessor error out. Change-Id: I37d3f241bd0879ba123fe26342aaaaff74c2fb6b Reviewed-by: Morten Johan Sørvig --- src/corelib/kernel/qcore_wasm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/kernel/qcore_wasm.cpp b/src/corelib/kernel/qcore_wasm.cpp index 5c8fac59b0..d7135840fb 100644 --- a/src/corelib/kernel/qcore_wasm.cpp +++ b/src/corelib/kernel/qcore_wasm.cpp @@ -6,7 +6,7 @@ #include #if !defined(Q_OS_WASM) -static_assert(false, "This is a wasm-only file."); +#error This is a wasm-only file. #endif // !defined(Q_OS_WASM) QT_BEGIN_NAMESPACE