lua-users home
lua-l archive

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


> GCC 10 just came out and its -Wstringop-overflow warning is pickier
> than it used to be. Attached to this message is the warning that I get
> when compiling 5.4-rc3 using GCC 10.0.1.
> 
> The culprit seems to be the getstr macro in lobject.h. It appears that
> GCC doesn't like that the string bytes are after the struct and would
> prefer if the byte array were a member of the struct:
> 
>   [...]

In previous versions, we did not use that implementation because Lua
fully aligned strings. Once we have removed that requirement, this
"open array" implementation should be the clear choice.

That said, the current implementation is valid ISO C code. Is this
warning included in -Wextra?

-- Roberto
_______________________________________________
lua-l mailing list -- lua-l@lists.lua.org
To unsubscribe send an email to lua-l-leave@lists.lua.org