lua-users home
lua-l archive

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

build Lua 5.3.0 work2 with gcc -O3 -Wall produce this warning:

gcc -O3 -Wall -Wextra -DLUA_COMPAT_ALL -DLUA_BUILD_AS_DLL    -c -o lvm.o lvm.c
lvm.c: In function 'luaV_equalobj':
lvm.c:223:22: warning: 'n2' may be used uninitialized in this function [-Wmaybe-uninitialized]
       lua_Number n1, n2;
In file included from lua.h:16:0,
                 from lvm.c:16:
luaconf.h:511:30: warning: 'n1' may be used uninitialized in this function [-Wmaybe-uninitialized]
 #define luai_numeq(a,b)  ((a)==(b))
lvm.c:223:18: note: 'n1' was declared here
       lua_Number n1, n2;

Is that worth to fix? (-O3 is unsafe optimize?)

2014-03-22 4:44 GMT+08:00 Luiz Henrique de Figueiredo <>:
Lua 5.3.0 (work2) is now available for testing at

MD5     52bd13d0b40f637bc388a133b9bb8771  -
SHA1    e52ea0acf4b2d7bf042f48bd01dddc149d517184  -

This is a work version. An updated reference manual is included but
all details may change in the final version. See

The main change in Lua 5.3.0 is the introduction of integers.
For other changes, see

The complete diffs from work1 are at

Enjoy. All feedback welcome. Thanks.

Xavier Wang.