Skip to content

tests: avoid MSVC 14.52 unreachable-code warning in test_buffers - #6290

Merged
henryiii merged 1 commit into
pybind:masterfrom
henryiii:fix-msvc-c4702
Nov 20, 2026
Merged

henryiii merged 1 commit into
pybind:masterfrom
henryiii:fix-msvc-c4702

Conversation

@henryiii

Copy link
Copy Markdown
Collaborator

🤖 AI text below 🤖

Description

The new windows-2025-vs2026 runner image (20261111) has MSVC 14.52. With /GL, this compiler inlines BrokenMatrix::throw_runtime_error() and then warns that the return py::buffer_info(); after it is unreachable (C4702). /WX makes this an error, and the abi3t from GIL-enabled Python • windows-latest job fails (seen on #6285).

The def_buffer lambda now has an explicit return type and throws directly, so it has no unreachable code.

@henryiii henryiii changed the title fix(tests): avoid MSVC 14.52 unreachable-code warning in test_buffers tests: avoid MSVC 14.52 unreachable-code warning in test_buffers Nov 20, 2026
@henryiii
henryiii merged commit c39408e into pybind:master Nov 20, 2026
96 checks passed
@henryiii
henryiii deleted the fix-msvc-c4702 branch November 20, 2026 21:30
@github-actions github-actions Bot added the needs changelog Possibly needs a changelog entry label Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs changelog Possibly needs a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant