Problem
When cc is clang 18, building the stage host tests stops with a -Wstring-plus-int warning in dev/tests/pi5_agent_test.c. Warnings are treated as errors there, so the default-compiler build fails. The warning is in existing code.
It showed up during the work on #478 (PR #482). On that cloud VM the default cc is clang 18, and it rejected pi5_agent_test.c. With gcc 13 (STAGE_CC=gcc make -C native/kernel -f stage.mk stage-test), the same suite builds clean and passes (CK_STAGE_HOST: PASS checks=900 failures=0). PR #482 doesn't touch that file.
Reproduce
On a host whose default cc is clang 18:
make -C native/kernel -f stage.mk stage-test
The build fails on -Wstring-plus-int in dev/tests/pi5_agent_test.c.
Done when
- The stage host test build passes with clang 18 and with gcc 13.
- The warning is fixed in the test code, not by turning it off.
Related: #483, a gcc 13-only failure in a different test. PR CI may not catch either one, because it doesn't build the stage host tests with both compilers.
— Grokbot