Compilation problems.
Posted: Thu Jun 18, 2020 2:19 pm
I use debug flag for autogen. It's not my error, because on master the same error occur. Is the a way to suppress this single error? Compile this file with different autogen options set and copy an object file? Maybe better approach?
CC lstring.lo
In function ‘createstrobj’,
inlined from ‘luaS_createlngstrobj’ at ../../../../dependencies/lua-5.4/src/lstring.c:168:17,
inlined from ‘luaS_newlstr’ at ../../../../dependencies/lua-5.4/src/lstring.c:238:10:
../../../../dependencies/lua-5.4/src/lstring.c:162:17: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
162 | getstr(ts)[l] = '\0'; /* ending 0 */
In file included from ../../../../dependencies/lua-5.4/src/ldebug.h:11,
from ../../../../dependencies/lua-5.4/src/lstring.c:17:
../../../../dependencies/lua-5.4/src/lstring.c: In function ‘luaS_newlstr’:
../../../../dependencies/lua-5.4/src/lstate.h:315:18: note: at offset 0 to object ‘ts’ with size 24 declared here
315 | struct TString ts;
| ^~
cc1: all warnings being treated as errors
CC lstring.lo
In function ‘createstrobj’,
inlined from ‘luaS_createlngstrobj’ at ../../../../dependencies/lua-5.4/src/lstring.c:168:17,
inlined from ‘luaS_newlstr’ at ../../../../dependencies/lua-5.4/src/lstring.c:238:10:
../../../../dependencies/lua-5.4/src/lstring.c:162:17: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
162 | getstr(ts)[l] = '\0'; /* ending 0 */
In file included from ../../../../dependencies/lua-5.4/src/ldebug.h:11,
from ../../../../dependencies/lua-5.4/src/lstring.c:17:
../../../../dependencies/lua-5.4/src/lstring.c: In function ‘luaS_newlstr’:
../../../../dependencies/lua-5.4/src/lstate.h:315:18: note: at offset 0 to object ‘ts’ with size 24 declared here
315 | struct TString ts;
| ^~
cc1: all warnings being treated as errors