From 8dd2c912d299b84566c6f6d659336edfa9b18e9b Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 3 Jan 2022 09:12:17 -0300 Subject: Detail Warnings with clang when using long double for Lua floats. --- lcode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lcode.c') diff --git a/lcode.c b/lcode.c index 9cba24f9..06425a1d 100644 --- a/lcode.c +++ b/lcode.c @@ -607,7 +607,7 @@ static int luaK_numberK (FuncState *fs, lua_Number r) { return addk(fs, &o, &o); /* use number itself as key */ else { /* must build an alternative key */ const int nbm = l_floatatt(MANT_DIG); - const lua_Number q = l_mathop(ldexp)(1.0, -nbm + 1); + const lua_Number q = l_mathop(ldexp)(l_mathop(1.0), -nbm + 1); const lua_Number k = (ik == 0) ? q : r + r*q; /* new key */ TValue kv; setfltvalue(&kv, k); -- cgit v1.2.3-55-g6feb