Task: Suppress C4275 alongside C4251 in the global MSVC warning config

Table of Contents

This page documents a task in the Hotfix: Continuous Windows MSVC jobs red on C4275 in the exported exception classes story. It captures the goal, current status, acceptance, and any notes or results.

1. Goal

Add /wd4275 to the MSVC warning configuration in projects/CMakeLists.txt, beside the existing /wd4251. The two jobs on the Continuous Windows workflow that use MSVC then compile ores.platform instead of stopping at error C2220.

2. Status

Field Value
State DONE
Parent story Hotfix: Continuous Windows MSVC jobs red on C4275 in the exported exception classes
Now Nothing.
Waiting on Nothing.
Next Nothing.
Last touched 2026-09-17

3. Acceptance

  • projects/CMakeLists.txt carries /wd4275 under the MSVC generator expression, next to /wd4251.
  • A comment above the flag gives the reason, in the same voice as the C4251 comment.
  • The configure step accepts the change, and the full build and test suite pass on a preset that uses this file.
  • No other compiler sees the flag.

4. Plan

The change is four lines in one file. The flag mirrors the /wd4251 line immediately above it, so it goes under the same $<$<CXX_COMPILER_ID:MSVC>:...> generator expression and carries a comment of the same shape.

The verification is the code class set for a CMakeLists.txt change: the full build and ctest on a preset, the roundtrip script, the drift checks, the compass test suite and the misspell pass.

One limit is worth stating up front. This host has no MSVC, so no local check compiles the file the flag applies to. The generator expression and the flag spelling are what the change is, and both are visible by inspection. The real evidence is the MSVC job on the PR.

5. Notes

6. Test Scenarios

Manual QA scenarios (scaffolded via compass add test_scenario, run through the QA Validation Runner panel) that verify this task. Link new ones here as they're created; the scenario doc itself links back via its "Verifies task" field.

Scenario State Notes
     

7. PRs

PR Title
#2086 [build] Disable C4275 for MSVC

8. Review

# Comment summary File Decision Notes
1 The suppression is global, so it disables C4275 for every exported class in the tree and not only for the two that fail today projects/CMakeLists.txt Accepted Deliberate. The sibling C4251 suppression is global for the same reason, and that reason is a property of the tree rather than of one component. It also covers the other exported exception classes, which this build never reached because it stops at the first error.
2 The change cannot be verified on this host, which has no MSVC toolchain projects/CMakeLists.txt Accepted Recorded as a limitation in the PR body. The generator expression and the flag spelling are checkable by inspection, and the MSVC job on the PR is the real evidence.
3 misspell-fixer . exits 1 over the tree three doc/agile records Declined The three hits are the prose of earlier review rows that declined to correct the name of an example portfolio, which upstream spells that way. The token is not reproduced here, because writing it into this table made this task file a hit of its own. An isolated run over this change's files is now clean, which it was not before that correction.

9. Result

projects/CMakeLists.txt carries /wd4275 directly below /wd4251, under the same $<$<CXX_COMPILER_ID:MSVC>:...> generator expression, with a comment above it that gives the reason. The change is five added lines in that one file.

The configure step accepts the change. On the linux-clang-debug-make preset the full build reaches 100% and exits 0, and the test suite passes 73 tests of 73. The roundtrip check exits 0. The component_files.cmake drift check reports every file up to date. The codegen drift check regenerates the nine components in its registry and changes no generated file.

No other compiler sees the flag. The generator expression tests the compiler id, and only MSVC matches it, so the GNU and Clang branches are untouched.

The CDash experimental check ran three times and did not finish once. Each attempt was killed. The last attempt reached the furthest. It configured, built the package target, and passed 73 tests of 73. Its submit step did not complete, because the kill landed during the upload. The build and test results the check carries are therefore already recorded above, and only the dashboard entry is missing. The check is visibility only.

The acceptance is met with one limit. No local check compiles the file the flag applies to, because this host has no MSVC toolchain. The generator expression and the flag spelling are both visible by inspection, and the MSVC job on the PR is the real evidence.

Emacs 29.3 (Org mode 9.6.15)