Skip to content

ps2xTest: include <cstring> for std::memcpy - #449

Open
Fructose0517 wants to merge 1 commit into
ran-j:mainfrom
Fructose0517:fix-test-cstring-include
Open

Fructose0517 wants to merge 1 commit into
ran-j:mainfrom
Fructose0517:fix-test-cstring-include

Conversation

@Fructose0517

Copy link
Copy Markdown

What

ps2xTest/src/code_generator_tests.cpp calls std::memcpy (line 1964, added in #359) without including <cstring>. MSVC's standard headers pull it in through other includes; libstdc++ and libc++ do not, so on main (ccc1655) both Linux CI jobs fail at Build:

code_generator_tests.cpp:1964:18: error: 'memcpy' is not a member of 'std'; did you mean 'wmemcpy'?        (gcc)
code_generator_tests.cpp:1964:18: error: no member named 'memcpy' in namespace 'std'; did you mean 'wmemcpy'? (clang)

This adds #include <cstring> to the file.

Tests

Linux, GCC 13.3: the file compiles with the change and fails with the error above without it (-std=c++20, same include paths as the test library). I did not build and run the whole Linux suite on this machine (no FFmpeg development packages for the runtime); Clang was not tried locally, the CI log shows it fails on the same line.

The Windows CI job fails on main for a separate reason (__attribute__ in the GS files under MSVC); that has its own small PR. A third one pins ImGuiFileDialog, whose master no longer has the API ps2xStudio/src/GUI.cpp uses; the Linux jobs probably need that one too to go green (I could not check it here).

🤖 Generated with Claude Code

code_generator_tests.cpp calls std::memcpy without including <cstring>;
MSVC's headers pull it in, libstdc++'s and libc++'s do not, so the Linux
gcc and clang CI jobs stop at this file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant