Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yvals_core.h: Consistent diagnostics and warnings #2973

Merged
9 changes: 4 additions & 5 deletions stl/inc/experimental/coroutine
Expand Up @@ -27,14 +27,13 @@ _STL_DISABLE_CLANG_WARNINGS
#undef new

#if defined(__clang__) && !defined(_SILENCE_CLANG_COROUTINE_MESSAGE)
#error The <experimental/coroutine>, <experimental/generator>, and <experimental/resumable> headers currently do not \
support Clang. You can define _SILENCE_CLANG_COROUTINE_MESSAGE to silence this message and acknowledge that this is \
unsupported.
#error The <experimental/coroutine>, <experimental/generator>, and <experimental/resumable> \
headers do not support Clang, but the C++20 <coroutine> header does.
#endif // defined(__clang__) && !defined(_SILENCE_CLANG_COROUTINE_MESSAGE)

#ifdef __cpp_impl_coroutine
#error The <experimental/coroutine> and <experimental/resumable> headers are only supported \
with /await and implement pre-C++20 coroutine support. Use <coroutine> for standard C++20 coroutines.
#error The <experimental/coroutine> and <experimental/resumable> headers are only supported with \
/await and implement pre-C++20 coroutine support. Use <coroutine> for standard C++20 coroutines.
#endif // __cpp_impl_coroutine

// intrinsics used in implementation of coroutine_handle
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/experimental/filesystem
Expand Up @@ -27,7 +27,7 @@ _STL_DISABLE_CLANG_WARNINGS
#ifndef _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING
#error The <experimental/filesystem> header providing std::experimental::filesystem is deprecated by Microsoft \
and will be REMOVED. It is superseded by the C++17 <filesystem> header providing std::filesystem. \
You can define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING to acknowledge that you have received this warning.
You can define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING to suppress this error.
#endif // _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING

#pragma warning(disable : 4365) // conversion from 'type_1' to 'type_2', signed/unsigned mismatch (/Wall)
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/hash_map
Expand Up @@ -19,7 +19,7 @@ _STL_DISABLE_CLANG_WARNINGS

#ifndef _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS
#error <hash_map> is deprecated and will be REMOVED. Please use <unordered_map>. You can define \
_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning.
_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to suppress this error.
#endif // _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS

namespace stdext {
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/hash_set
Expand Up @@ -19,7 +19,7 @@ _STL_DISABLE_CLANG_WARNINGS

#ifndef _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS
#error <hash_set> is deprecated and will be REMOVED. Please use <unordered_set>. You can define \
_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning.
_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to suppress this error.
#endif // _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS

namespace stdext {
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/ranges
Expand Up @@ -3077,7 +3077,7 @@ namespace ranges {
"We believe that WG21 will be unable to fix this problem without breaking ABI. "
"To minimize breakage when a fix is implemented, "
"we are temporarily disabling potentially problematic cases. "
"You can define _USE_JOIN_VIEW_INPUT_RANGE to suppress this diagnostic, "
"You can define _USE_JOIN_VIEW_INPUT_RANGE to suppress this error, "
"but be aware that you will almost certainly need to recompile "
"when we release a fix.");
#endif // _USE_JOIN_VIEW_INPUT_RANGE
Expand Down
8 changes: 3 additions & 5 deletions stl/inc/type_traits
Expand Up @@ -1024,11 +1024,9 @@ struct _Aligned<_Len, _Align, double, false> {
"non-conformingly have an alignment of only alignof(max_align_t). VS 2017 15.8 was fixed to "
"handle this correctly, but the fix inherently changes layout and breaks binary compatibility "
"(*only* for uses of aligned_storage with extended alignments). "
"Please define either "
"(1) _ENABLE_EXTENDED_ALIGNED_STORAGE to acknowledge that you understand this message and "
"that you actually want a type with an extended alignment, or "
"(2) _DISABLE_EXTENDED_ALIGNED_STORAGE to silence this message and get the old non-conforming "
"behavior.");
"To suppress this error, please define either "
"(1) _ENABLE_EXTENDED_ALIGNED_STORAGE to confirm that you want a type with an extended alignment, or "
"(2) _DISABLE_EXTENDED_ALIGNED_STORAGE to get the old non-conforming behavior.");
#endif // !_DISABLE_EXTENDED_ALIGNED_STORAGE
using type = _Align_type<max_align_t, _Len>;
#endif // _ENABLE_EXTENDED_ALIGNED_STORAGE
Expand Down