Skip to content

Build fixes for GCC 15.3 and PUC Lua 5.1.5#6

Open
niklata wants to merge 9 commits into
damerell:masterfrom
niklata:lua-cpp-build-fixes
Open

Build fixes for GCC 15.3 and PUC Lua 5.1.5#6
niklata wants to merge 9 commits into
damerell:masterfrom
niklata:lua-cpp-build-fixes

Conversation

@niklata

@niklata niklata commented Jul 7, 2026

Copy link
Copy Markdown

These are a small pile of mostly trivial fixes I had to make in order to build Stoat Soup on an up-to-date, mostly-stable amd64 Gentoo install.

The update from luaL_openlib() to luaL_register() is to stop using a long-deprecated API that is removed in Lua 5.1.5 and perhaps prior versions. Stoat Soup fails to build for me without this commit applied.

The other commits are to silence warnings that often point to invalid or deprecated C++ constructs. There are eight of these commits because I've broken them out to make them easier to verify as being correct.

With all of these commits applied, Stoat Soup builds for me with no warnings.

No AI was used for any of these commits.

niklata added 9 commits July 6, 2026 22:17
The existing construct is very dubious, since it creates a std::string
temporary and then takes it by reference.  GCC warns about it, and it
may be UB.
I didn't investigate this deeply, so for now I just commented
out the function in question.
Silences a warning with recent GCCs that default to C++20.
tile_color has a constructor so this isn't valid.

Fix memset() by simply providing a default constructor that
zero-initializes.

Fix memcpy() by hand-writing a copy loop that uses the copy
assignment operator.
There's two issues.  First, the returned reference from the
copy assignment operator must not be const.  Second, the
intention of the existing definition is to define a default
copy assignment operator, so just use that.
@damerell

Copy link
Copy Markdown
Owner

Thank you! I'll take a look at these when I get a chance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants