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 <lhf@tecgraf.puc-rio.br>:
Lua 5.3.0 (work2) is now available for testing at
        http://www.lua.org/work/lua-5.3.0-work2.tar.gz

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
        http://www.lua.org/work/doc/readme.html

The main change in Lua 5.3.0 is the introduction of integers.
For other changes, see
        http://www.lua.org/work/doc/readme.html#changes

The complete diffs from work1 are at
        http://www.lua.org/work/diffs-lua-5.3.0-work1-work2.txt

Enjoy. All feedback welcome. Thanks.
--lhf





--
regards,
Xavier Wang.