Repository navigation
Fix warning-free debug amalgamation builds - #1799
InauguralPhysicist merged 2 commits into
Conversation
|
Thank you. The fix itself is right: the explicit return after The new -O0/-O1 warning check fails under clang. That run produced 214 warnings, mostly Also, for whoever later touches |
…uguralSystems#1872) Under clang, -Wall -Wextra reports about 200 warnings across the tree, mostly -Wstring-plus-int, so the new check failed on the macOS lane, which runs only in the merge queue. The preprocessor decides which compiler it is (Apple's gcc is clang too); clang prints a SKIP line citing InauguralSystems#1872. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KC99CmwatKssQYggkBCgwF
|
Thank you again, @facelessdevhack: this is a good fix, and the -O0/-O1 check is a real improvement for embedders. To unblock it I pushed one small commit to your branch (94d3929, using "allow edits by maintainers"). It runs the new -O0/-O1 warning check under gcc only. Under clang, Once CI is green it goes into the merge queue, where the macOS (clang) lane runs. |
|
Merged: thank you, @facelessdevhack! Debug and -O1 embedders now get a warning-free amalgamation under gcc. The clang side is tracked in #1872 if you ever want to pick it up; it is mostly mechanical |
The two-file amalgamation now compiles without warnings at
-O0and-O1. Keepgather's existing argument guard and add an explicit final return; initialize the bitwise conversion temporaries and JIT index-set local where declared. Runtime control flow and strict/fail-soft results stay the same.The existing CI-enrolled amalgamation drop-in test now compiles the generated translation unit at both optimization levels with
-Wall -Wextraand the shared warning flags. It rejects compiler failures and warning diagnostics, while preserving the existingCCselection and host/evaluation/teardown checks.Fixes #1775.
Validation on macOS arm64 with actual GNU GCC 15.2.0_1:
-O0-Wreturn-type)-O1The issue's seven
-O1diagnostics were not reproduced on this compiler/architecture; the initializations and persistent-O1check cover the reported paths. Both exact issue-requested compile commands exit 0 after the fix, with empty diagnostic logs.CC=/opt/homebrew/bin/gcc-15 bash tests/test_amalgamation.sh: 7 passed, 0 failed. The test is invoked directly by existing CI; it is not selected bymake test-changed.Regression before the production fix: 6 passed, 1 failed, rejecting the actual zero-exit GCC
-O0warning. In an isolated checkout, removing only the added return reproduces that failure; restoring it returns to 7 passed, 0 failed.make: passed (normal repository compiler selection).make precheck: 19 passed, 0 failed, 0 skipped.make test-changed: 154/154 passed, 0 failed, 0 skipped. The planner identifies both C files as runtime changes; full runtime and sanitizer verification remains for CI.Shared warning-flag checker, Bash 3.2 syntax check, and
git diff --check: passed.Warning-free
-O0and-O1amalgamation compilation locally.Explicit return and initialized locals.
Persistent CI check with a real planted-return regression proof.
Hosted full-suite and sanitizer checks; Linux GCC verification of the original
-O1diagnostic family.Prepared with OpenAI Codex assistance and reviewed by a separate Codex agent.
Hosted validation at
44d12b9f233ed6fa3234320d16055c57c57df76d: all 31 reported checks completed, with 25 successful checks and six conditional skips. Successful checks include Linux GCC/Clang, ASan/UBSan, Valgrind, TSan and the changed-row self-test gate.