FALLTHROUGH comment must be last "statement"

(so it does not work when inside a block)
This commit is contained in:
Roberto Ierusalimschy 2018-03-16 11:22:09 -03:00
parent 7b0b6b3b39
commit 0c7738240e
2 changed files with 5 additions and 6 deletions

View File

@ -1,5 +1,5 @@
/*
** $Id: lcode.c,v 2.158 2018/02/26 14:16:05 roberto Exp roberto $
** $Id: lcode.c,v 2.159 2018/03/07 15:55:38 roberto Exp roberto $
** Code generator for Lua
** See Copyright Notice in lua.h
*/
@ -1696,8 +1696,7 @@ void luaK_finish (FuncState *fs) {
break; /* no extra work */
/* else use OP_RETURN to do the extra work */
SET_OPCODE(*pc, OP_RETURN);
/* FALLTHROUGH */
}
} /* FALLTHROUGH */
case OP_RETURN: case OP_TAILCALL: {
if (p->sizep > 0 || p->is_vararg) {
SETARG_C(*pc, p->is_vararg ? p->numparams + 1 : 0);

6
lgc.c
View File

@ -1,5 +1,5 @@
/*
** $Id: lgc.c,v 2.251 2018/02/23 13:21:27 roberto Exp roberto $
** $Id: lgc.c,v 2.252 2018/02/26 13:35:03 roberto Exp roberto $
** Garbage Collector
** See Copyright Notice in lua.h
*/
@ -301,8 +301,8 @@ static void reallymarkobject (global_State *g, GCObject *o) {
gray2black(o); /* nothing else to mark */
break;
}
/* else *//* FALLTHROUGH */
}
/* else... */
} /* FALLTHROUGH */
case LUA_TLCL: case LUA_TCCL: case LUA_TTABLE:
case LUA_TTHREAD: case LUA_TPROTO: {
linkobjgclist(o, g->gray);