Skip to content

build: hold MSVC to /W4 /WX like GCC and Clang (0082) - #478

Merged
rmorozov merged 6 commits into
masterfrom
claude/project-thread-2xdqox
Oct 12, 2026
Merged

rmorozov merged 6 commits into
masterfrom
claude/project-thread-2xdqox

Conversation

@rmorozov

@rmorozov rmorozov commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Requested by Ruslan · project thread

Before: MSVC builds never saw the strict warning flags (/W4 sat inside if (UNIX)) and nothing passed /WX, so MSVC-only warnings went unnoticed while GCC and Clang failed on -Wall -Werror.

After: MSVC builds the library and the tests with /W4 /WX /external:W0 /wd4702, so all three compilers are held to the same bar. All three Windows jobs (C++17 Release, C++20 Debug shared, C++23 Debug) are green under /WX.

Task 0082 (status set to in-progress; the task file records what was measured).

How: /W4 was measured first on Windows CI, which reported two distinct warnings:

  • C4996 std::getenv in test/parity/parity_test.cpp: under MSVC it now uses _dupenv_s.
  • C4702 in fmt's fmt/base.h: /external:W0 does not silence it because the code generator reports it after the external-header filter, so it is suppressed with /wd4702 and a comment. The cost is that a real C4702 in project code is also hidden; revisit when fmt is bumped.

Only the strict-warnings block in CMakeLists.txt changed there (0068 and 0069 touch other parts of the file); master was merged in once (no conflicts).

Roles: main session only, plus two ci-triage reads of the Windows logs to collect the warnings; no verifier round (CMake flag and one test-file change, no src/ or include/ change). Red pushes: 0. (The first measurement push had no /WX; a temporary CI step to print warnings was added and removed.)

🤖 Generated with Claude Code

https://claude.ai/code/session_01G9u5hgS7vcar6yNGvnx3Xp

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G9u5hgS7vcar6yNGvnx3Xp
@rmorozov rmorozov self-assigned this Oct 12, 2026
@rmorozov
rmorozov marked this pull request as ready for review October 12, 2026 13:40
…ow-up)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G9u5hgS7vcar6yNGvnx3Xp
@rmorozov
rmorozov merged commit d7418e5 into master Oct 12, 2026
41 checks passed
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