Silence a couple of /Wall
warnings
#4026
Merged
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.
Works towards DevCom-10368801 / VSO-1822115 "compiling
std.ixx
causes compiler warnings, even with/external:anglebrackets
and/external:W0
". (Additional changes are needed in the MSVC-internal repo: MSVC-PR-497556)We don't attempt to be
/Wall
clean in general, but users are experiencing this as a regression due to the addition of the automatic build of the Standard Library Modules. Only a few warnings are being emitted so we can just clean them up. While this is motivated by the Modules, the changes are not modules-related.I'm dealing with two warnings in this PR. First, I reported VSO-1885306 "warning C5039 shouldn't be emitted when an
extern "C"
function is markednoexcept(false)
".<stacktrace>
is correctly usingnoexcept(false)
, so we should suppress this warning in the header. The warning is potentially useful elsewhere, so I don't want to globally suppress it for the STL.The second change is to globally suppress warning C5220 for the STL in
<yvals_core.h>
. This is a classically obnoxious warning saying that the compiler is going to do what the Standard requires it to do, which we never need to be told. (It affects<pplcancellation_token.h>
and<ppltasks.h>
; my MSVC-internal changes will enhance those headers to use the<yvals_core.h>
suppression machinery.)