Silence new warning C4877 when overriding deprecated non-pure virtual functions#6279
Open
StephanTLavavej wants to merge 2 commits into
Open
Silence new warning C4877 when overriding deprecated non-pure virtual functions#6279StephanTLavavej wants to merge 2 commits into
StephanTLavavej wants to merge 2 commits into
Conversation
Followup to GH 5645 on 2025-07-15.
…ING`. Implemented by MSVC-PR-734301 on 2026-05-01. Should revert selfbuild fix MSVC-PR-734920 on 2026-05-04.
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the STL’s deprecated-warning suppression macro to also silence a newly introduced MSVC /Wall warning (C4877) that appears when overriding deprecated non-pure virtual functions.
Changes:
- Clarify the classification comment for warning C5291 as
/Wall-only. - Extend
_STL_DISABLE_DEPRECATED_WARNINGto disable C4877 in addition to C4996. - Add inline documentation describing C4877 and its relationship to C4996.
Show a summary per file
| File | Description |
|---|---|
| stl/inc/yvals_core.h | Adds C4877 to the deprecated-warning suppression pragma and updates warning documentation comments. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 1
vicroms
approved these changes
May 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
_STL_DISABLE_DEPRECATED_WARNING.Example
Before
For
[[deprecated("reason")]], C4877 repeats the reason, otherwise it just says "was declared deprecated".After
As we don't officially attempt to be
/Wall-clean, we don't have/Walltest coverage, but the internal compiler selfbuild will be an effective test (after I remove the workaround in the compiler's sources).