Skip to content

Commit

Permalink
Silence a couple of /Wall warnings (#4026)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanTLavavej committed Sep 14, 2023
1 parent c86e805 commit 33d950d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions stl/inc/stacktrace
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ _STL_DISABLE_CLANG_WARNINGS
#pragma push_macro("new")
#undef new

// TRANSITION, VSO-1885306: warning C5039 shouldn't be emitted when an extern "C" function is marked noexcept(false)
#pragma warning(disable : 5039) // '__std_stacktrace_meow': pointer or reference to potentially throwing function
// passed to 'extern "C"' function under -EHc. Undefined behavior may occur if this
// function throws an exception. (/Wall)

// The separately compiled part of the <stacktrace> implementation calls a function pointer of _Stacktrace_string_fill
// type to allocate a buffer for string output. The called function does the buffer allocation and calls a function
// pointer of _Stacktrace_string_fill_callback type to fill the buffer. This is needed to type-erase <string> or
Expand Down
4 changes: 3 additions & 1 deletion stl/inc/yvals_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -797,14 +797,16 @@
// warning C5026: move constructor was implicitly defined as deleted (/Wall)
// warning C5027: move assignment operator was implicitly defined as deleted (/Wall)
// warning C5045: Compiler will insert Spectre mitigation for memory load if /Qspectre switch specified (/Wall)
// warning C5220: a non-static data member with a volatile qualified type no longer implies that compiler generated
// copy/move constructors and copy/move assignment operators are not trivial (/Wall)
// warning C6294: Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed

#ifndef _STL_DISABLED_WARNINGS
// clang-format off
#define _STL_DISABLED_WARNINGS \
4180 4412 4455 4494 4514 4574 4582 4583 4587 4588 \
4619 4623 4625 4626 4643 4648 4702 4793 4820 4988 \
5026 5027 5045 6294 \
5026 5027 5045 5220 6294 \
_STL_DISABLED_WARNING_C4577 \
_STL_DISABLED_WARNING_C4984 \
_STL_DISABLED_WARNING_C5053 \
Expand Down

0 comments on commit 33d950d

Please sign in to comment.