summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wasm/wat-lexer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wasm/wat-lexer.cpp b/src/wasm/wat-lexer.cpp
index befa9f6ab..6d7e9edec 100644
--- a/src/wasm/wat-lexer.cpp
+++ b/src/wasm/wat-lexer.cpp
@@ -221,6 +221,8 @@ struct LexFloatCtx : LexCtx {
std::optional<LexFloatResult> lexed() {
const double posNan = std::copysign(NAN, 1.0);
const double negNan = std::copysign(NAN, -1.0);
+ assert(!std::signbit(posNan) && "expected positive NaN to be positive");
+ assert(std::signbit(negNan) && "expected negative NaN to be negative");
auto basic = LexCtx::lexed();
if (!basic) {
return {};