diff --git a/stl/inc/climits b/stl/inc/climits index 20b85bdf25a..097693232ff 100644 --- a/stl/inc/climits +++ b/stl/inc/climits @@ -8,7 +8,10 @@ #include #if _STL_COMPILER_PREPROCESSOR +#pragma warning(push) // TRANSITION, VSO-1985428 +#pragma warning(disable : 4668) // 'MEOW' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' #include +#pragma warning(pop) #endif // _STL_COMPILER_PREPROCESSOR #endif // _CLIMITS_ diff --git a/tests/std/include/test_death.hpp b/tests/std/include/test_death.hpp index d88f63e9dab..87a2c7080b1 100644 --- a/tests/std/include/test_death.hpp +++ b/tests/std/include/test_death.hpp @@ -9,7 +9,10 @@ #include #include +#pragma warning(push) // TRANSITION, OS-23694920 +#pragma warning(disable : 4668) // 'MEOW' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' #include +#pragma warning(pop) namespace std_testing { constexpr int internal_failure = 103; diff --git a/tests/std/include/test_thread_support.hpp b/tests/std/include/test_thread_support.hpp index a2e44363468..1ff3ae02130 100644 --- a/tests/std/include/test_thread_support.hpp +++ b/tests/std/include/test_thread_support.hpp @@ -10,7 +10,10 @@ #include #include +#pragma warning(push) // TRANSITION, OS-23694920 +#pragma warning(disable : 4668) // 'MEOW' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' #include +#pragma warning(pop) class one_shot { bool unblock = false; diff --git a/tests/std/tests/Dev08_563686_ostream/test.cpp b/tests/std/tests/Dev08_563686_ostream/test.cpp index 48935394f57..11d905320fd 100644 --- a/tests/std/tests/Dev08_563686_ostream/test.cpp +++ b/tests/std/tests/Dev08_563686_ostream/test.cpp @@ -29,7 +29,10 @@ #include #include +#pragma warning(push) // TRANSITION, OS-23694920 +#pragma warning(disable : 4668) // 'MEOW' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' #include +#pragma warning(pop) int main() { // Track CRT blocks diff --git a/tests/std/tests/Dev09_056375_locale_cleanup/test.cpp b/tests/std/tests/Dev09_056375_locale_cleanup/test.cpp index c37f325f7da..1fecfd287e3 100644 --- a/tests/std/tests/Dev09_056375_locale_cleanup/test.cpp +++ b/tests/std/tests/Dev09_056375_locale_cleanup/test.cpp @@ -7,7 +7,10 @@ #include #include +#pragma warning(push) // TRANSITION, OS-23694920 +#pragma warning(disable : 4668) // 'MEOW' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' #include +#pragma warning(pop) using namespace std; diff --git a/tests/std/tests/Dev09_056375_locale_cleanup/testdll.cpp b/tests/std/tests/Dev09_056375_locale_cleanup/testdll.cpp index b890a5b02ab..dd3ef599709 100644 --- a/tests/std/tests/Dev09_056375_locale_cleanup/testdll.cpp +++ b/tests/std/tests/Dev09_056375_locale_cleanup/testdll.cpp @@ -3,9 +3,6 @@ #include #include - -#include - using namespace std; // Tests for DLL diff --git a/tests/std/tests/Dev11_0493504_error_category_lifetime/test.cpp b/tests/std/tests/Dev11_0493504_error_category_lifetime/test.cpp index 749b29b1908..f95c731abd3 100644 --- a/tests/std/tests/Dev11_0493504_error_category_lifetime/test.cpp +++ b/tests/std/tests/Dev11_0493504_error_category_lifetime/test.cpp @@ -20,7 +20,10 @@ InvalidFunctor make_error_condition{}; #include #endif // _M_CEE_PURE +#pragma warning(push) // TRANSITION, OS-23694920 +#pragma warning(disable : 4668) // 'MEOW' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' #include +#pragma warning(pop) using namespace std; diff --git a/tests/std/tests/GH_002431_byte_range_find_with_unreachable_sentinel/test.cpp b/tests/std/tests/GH_002431_byte_range_find_with_unreachable_sentinel/test.cpp index efb5a03368d..4bbf13a56db 100644 --- a/tests/std/tests/GH_002431_byte_range_find_with_unreachable_sentinel/test.cpp +++ b/tests/std/tests/GH_002431_byte_range_find_with_unreachable_sentinel/test.cpp @@ -7,7 +7,10 @@ #include #include +#pragma warning(push) // TRANSITION, OS-23694920 +#pragma warning(disable : 4668) // 'MEOW' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' #include +#pragma warning(pop) using namespace std; diff --git a/tests/std/tests/P2093R14_formatted_output/test.cpp b/tests/std/tests/P2093R14_formatted_output/test.cpp index 92eb0884942..7c27d02a2f3 100644 --- a/tests/std/tests/P2093R14_formatted_output/test.cpp +++ b/tests/std/tests/P2093R14_formatted_output/test.cpp @@ -18,7 +18,10 @@ #include #include +#pragma warning(push) // TRANSITION, OS-23694920 +#pragma warning(disable : 4668) // 'MEOW' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' #include +#pragma warning(pop) #include "temp_file_name.hpp" diff --git a/tests/std/tests/VSO_0000000_exception_ptr_rethrow_seh/test.cpp b/tests/std/tests/VSO_0000000_exception_ptr_rethrow_seh/test.cpp index 6052ab4a493..60e6775aae8 100644 --- a/tests/std/tests/VSO_0000000_exception_ptr_rethrow_seh/test.cpp +++ b/tests/std/tests/VSO_0000000_exception_ptr_rethrow_seh/test.cpp @@ -8,7 +8,10 @@ #include #include +#pragma warning(push) // TRANSITION, OS-23694920 +#pragma warning(disable : 4668) // 'MEOW' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' #include +#pragma warning(pop) ULONG_PTR data[] = {0xC0FFEE, 1729}; diff --git a/tests/std/tests/VSO_0104705_throwing_copy_in_current_exception_seh/test.cpp b/tests/std/tests/VSO_0104705_throwing_copy_in_current_exception_seh/test.cpp index de2c60e1bd0..2c993e0752f 100644 --- a/tests/std/tests/VSO_0104705_throwing_copy_in_current_exception_seh/test.cpp +++ b/tests/std/tests/VSO_0104705_throwing_copy_in_current_exception_seh/test.cpp @@ -7,7 +7,10 @@ #include #include +#pragma warning(push) // TRANSITION, OS-23694920 +#pragma warning(disable : 4668) // 'MEOW' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' #include +#pragma warning(pop) ULONG_PTR data[] = {0xC0FFEE, 1729}; diff --git a/tests/std/tests/VSO_0121275_filesystem_canonical_should_handle_many_double_dots/test.cpp b/tests/std/tests/VSO_0121275_filesystem_canonical_should_handle_many_double_dots/test.cpp index 77be49b3f52..f219b21a6d1 100644 --- a/tests/std/tests/VSO_0121275_filesystem_canonical_should_handle_many_double_dots/test.cpp +++ b/tests/std/tests/VSO_0121275_filesystem_canonical_should_handle_many_double_dots/test.cpp @@ -12,7 +12,10 @@ #include #include +#pragma warning(push) // TRANSITION, OS-23694920 +#pragma warning(disable : 4668) // 'MEOW' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' #include +#pragma warning(pop) using namespace std; namespace fs = std::experimental::filesystem; diff --git a/tests/std/tests/VSO_0226079_mutex/test.cpp b/tests/std/tests/VSO_0226079_mutex/test.cpp index 584b3e982ea..9029ea2a3a8 100644 --- a/tests/std/tests/VSO_0226079_mutex/test.cpp +++ b/tests/std/tests/VSO_0226079_mutex/test.cpp @@ -13,7 +13,10 @@ #include #include +#pragma warning(push) // TRANSITION, OS-23694920 +#pragma warning(disable : 4668) // 'MEOW' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' #include +#pragma warning(pop) using namespace std; using namespace std::chrono; diff --git a/tests/std/tests/VSO_0744055_atomic_load_8_bytes_readonly/test.cpp b/tests/std/tests/VSO_0744055_atomic_load_8_bytes_readonly/test.cpp index d0050dba5c5..66f93fa472d 100644 --- a/tests/std/tests/VSO_0744055_atomic_load_8_bytes_readonly/test.cpp +++ b/tests/std/tests/VSO_0744055_atomic_load_8_bytes_readonly/test.cpp @@ -5,7 +5,10 @@ #include #include +#pragma warning(push) // TRANSITION, OS-23694920 +#pragma warning(disable : 4668) // 'MEOW' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' #include +#pragma warning(pop) int main() { // A customer wanted to read a std::atomic from a read-only memory-mapped file. diff --git a/tests/std/tests/prefix.lst b/tests/std/tests/prefix.lst index a2606478982..ca509bbe8fc 100644 --- a/tests/std/tests/prefix.lst +++ b/tests/std/tests/prefix.lst @@ -3,4 +3,4 @@ RUNALL_INCLUDE ..\..\universal_prefix.lst RUNALL_CROSSLIST -* PM_CL="/FIforce_include.hpp /w14365 /w15267 /D_ENFORCE_FACET_SPECIALIZATIONS=1 /D_STL_CALL_ABORT_INSTEAD_OF_INVALID_PARAMETER" +* PM_CL="/FIforce_include.hpp /w14365 /w14668 /w15267 /D_ENFORCE_FACET_SPECIALIZATIONS=1 /D_STL_CALL_ABORT_INSTEAD_OF_INVALID_PARAMETER" diff --git a/tests/tr1/include/tdefs.h b/tests/tr1/include/tdefs.h index f3431d4017b..30e03803e8f 100644 --- a/tests/tr1/include/tdefs.h +++ b/tests/tr1/include/tdefs.h @@ -369,7 +369,6 @@ int ulp = EPS_ULPL; #endif // value of FLOAT_TYPE int approx2(Float_type d1, Float_type d2, Float_type sensitivity) { // test for approximate equality -#if 199901L <= __STDC_VERSION__ if (isunordered(d1, d2)) { // at least one NaN if (!terse) { // report NaNs if (isnan(d1)) { @@ -381,9 +380,7 @@ int approx2(Float_type d1, Float_type d2, Float_type sensitivity) { // test for } } return 0; - } else -#endif // 199901L <= __STDC_VERSION__ - { // compare finite values + } else { // compare finite values Float_type err; if (d2 != (Float_type) 0) { diff --git a/tests/tr1/prefix.lst b/tests/tr1/prefix.lst index 45b4447dc69..5d1ecb45c88 100644 --- a/tests/tr1/prefix.lst +++ b/tests/tr1/prefix.lst @@ -3,4 +3,4 @@ RUNALL_INCLUDE ..\universal_prefix.lst RUNALL_CROSSLIST -* PM_CL="/FIforce_include.hpp /w15267 /D_ENFORCE_FACET_SPECIALIZATIONS=1 /D_CRT_SECURE_NO_WARNINGS /D_STL_CALL_ABORT_INSTEAD_OF_INVALID_PARAMETER" +* PM_CL="/FIforce_include.hpp /w14668 /w15267 /D_ENFORCE_FACET_SPECIALIZATIONS=1 /D_CRT_SECURE_NO_WARNINGS /D_STL_CALL_ABORT_INSTEAD_OF_INVALID_PARAMETER" diff --git a/tests/tr1/tests/regex2/test.cpp b/tests/tr1/tests/regex2/test.cpp index 146c8809c67..5d676d4fd8e 100644 --- a/tests/tr1/tests/regex2/test.cpp +++ b/tests/tr1/tests/regex2/test.cpp @@ -395,12 +395,12 @@ static const regex_test tests[] = { {__LINE__, T("\\x1b"), T("\x1b"), "1 0 1", ECMA}, -#if WIDE +#ifdef WIDE {__LINE__, T("\\u12cd"), T("\u12cd"), "1 0 1", ECMA}, {__LINE__, T("\\u12cd"), T(""), "-1", NOT_ECMA}, -#else +#else // defined WIDE {__LINE__, T("\\u12cd"), T(""), "-1", ALL}, -#endif +#endif // defined WIDE {__LINE__, T("\\07"), T("\07"), "1 0 1", AWK}, {__LINE__, T("\\177"), T("\177"), "1 0 1", AWK}, @@ -495,11 +495,11 @@ static const regex_test tests[] = { {__LINE__, T("[\\x1b]"), T("x"), "1 0 1", NOT_ECMA}, {__LINE__, T("[\\x1b]"), T("1"), "1 0 1", NOT_ECMA}, {__LINE__, T("[\\x1b]"), T("b"), "1 0 1", NOT_ECMA}, -#if WIDE +#ifdef WIDE {__LINE__, T("[\\u12cd]"), T("\u12cd"), "1 0 1", ECMA}, -#else +#else // defined WIDE {__LINE__, T("[\\u12cd]"), T(""), "-1", ECMA}, -#endif +#endif // defined WIDE {__LINE__, T("[\\u12cd]"), T("\\"), "1 0 1", NOT_ECMA}, {__LINE__, T("[\\u12cd]"), T("u"), "1 0 1", NOT_ECMA}, {__LINE__, T("[\\u12cd]"), T("1"), "1 0 1", NOT_ECMA},