lua-users home
lua-l archive

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


On 14 March 2018 at 02:43, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
> All feedback welcome. Thanks.

I get a few warnings with gcc 7.3.0.
The LUA_USE_JUMPTABLE one has already been reported elsewhere in this thread.


gcc -std=gnu99 -O2 -Wall -Wextra -DLUA_COMPAT_5_3 -DLUA_USE_LINUX
-c -o lcode.o lcode.c
In file included from lcode.h:12:0,
                 from lcode.c:19:
lcode.c: In function ‘luaK_finish’:
lopcodes.h:108:30: warning: this statement may fall through
[-Wimplicit-fallthrough=]
 #define SET_OPCODE(i,o) ((i) = (((i)&MASK0(SIZE_OP,POS_OP)) | \
                         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ((cast(Instruction, o)<<POS_OP)&MASK1(SIZE_OP,POS_OP))))
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lcode.c:1698:9: note: in expansion of macro ‘SET_OPCODE’
         SET_OPCODE(*pc, OP_RETURN);
         ^~~~~~~~~~
lcode.c:1701:7: note: here
       case OP_RETURN: case OP_TAILCALL: {
       ^~~~
gcc -std=gnu99 -O2 -Wall -Wextra -DLUA_COMPAT_5_3 -DLUA_USE_LINUX
-c -o lgc.o lgc.c
lgc.c: In function ‘reallymarkobject’:
lgc.c:297:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
     case LUA_TUSERDATA: {
                         ^
lgc.c:306:5: note: here
     case LUA_TLCL: case LUA_TCCL: case LUA_TTABLE:
     ^~~~
gcc -std=gnu99 -O2 -Wall -Wextra -DLUA_COMPAT_5_3 -DLUA_USE_LINUX
-c -o lvm.o lvm
lvm.c: In function ‘luaV_execute’:
lvm.c:884:5: warning: this use of "defined" may not be portable
[-Wexpansion-to-defined]
 #if LUA_USE_JUMPTABLE
     ^~~~~~~~~~~~~~~~~