lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hey

When building Lua 5.3.1 on OS X with LLVM, I get the following warning:

lua/src/lvm.c:1128:58: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]

        b = luaD_poscall(L, ra, (b != 0 ? b - 1 : L->top - ra));

            ~~~~~~~~~~~~                          ~~~~~~~^~~~


This should be trivially fixable by casting L->top - ra to int.

IMHO this is worth doing because it's being implicitly converted anyway, and it's the only warning produced by the build :)

--
Cheers,

Chris