diff --git a/libcxx/test/std/library/description/conventions/expos.only.func/synth_three_way.pass.cpp b/libcxx/test/std/library/description/conventions/expos.only.func/synth_three_way.pass.cpp --- a/libcxx/test/std/library/description/conventions/expos.only.func/synth_three_way.pass.cpp +++ b/libcxx/test/std/library/description/conventions/expos.only.func/synth_three_way.pass.cpp @@ -7,11 +7,16 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14, c++17, libcpp-no-concepts -// ADDITIONAL_COMPILE_FLAGS: -Wno-sign-compare // constexpr auto synth-three-way = ...; // via std::tuple(t) <=> std::tuple(u), which exposes its behavior most directly +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic ignored "-Wsign-compare" +#elif defined(_MSC_VER) +#pragma warning(disable: 4242 4244) // Various truncation warnings +#endif + #include #include #include // quiet_NaN diff --git a/libcxx/test/std/ranges/range.factories/range.iota.view/ctor.value.bound.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/ctor.value.bound.pass.cpp --- a/libcxx/test/std/ranges/range.factories/range.iota.view/ctor.value.bound.pass.cpp +++ b/libcxx/test/std/ranges/range.factories/range.iota.view/ctor.value.bound.pass.cpp @@ -10,7 +10,11 @@ // UNSUPPORTED: libcpp-no-concepts // UNSUPPORTED: libcpp-has-no-incomplete-ranges -// ADDITIONAL_COMPILE_FLAGS: -Wno-sign-compare +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic ignored "-Wsign-compare" +#elif defined(_MSC_VER) +#pragma warning(disable: 4018 4389) // various "signed/unsigned mismatch" +#endif // constexpr iota_view(type_identity_t value, type_identity_t bound); @@ -57,4 +61,3 @@ return 0; } - diff --git a/libcxx/test/std/ranges/range.factories/range.iota.view/end.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/end.pass.cpp --- a/libcxx/test/std/ranges/range.factories/range.iota.view/end.pass.cpp +++ b/libcxx/test/std/ranges/range.factories/range.iota.view/end.pass.cpp @@ -10,7 +10,11 @@ // UNSUPPORTED: libcpp-no-concepts // UNSUPPORTED: libcpp-has-no-incomplete-ranges -// ADDITIONAL_COMPILE_FLAGS: -Wno-sign-compare +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic ignored "-Wsign-compare" +#elif defined(_MSC_VER) +#pragma warning(disable: 4018 4389) // various "signed/unsigned mismatch" +#endif // constexpr auto end() const; // constexpr iterator end() const requires same_as; diff --git a/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/star.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/star.pass.cpp --- a/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/star.pass.cpp +++ b/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/star.pass.cpp @@ -10,10 +10,14 @@ // UNSUPPORTED: libcpp-no-concepts // UNSUPPORTED: libcpp-has-no-incomplete-ranges -// ADDITIONAL_COMPILE_FLAGS: -Wno-sign-compare - // constexpr W operator*() const noexcept(is_nothrow_copy_constructible_v); +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic ignored "-Wsign-compare" +#elif defined(_MSC_VER) +#pragma warning(disable: 4018) // various "signed/unsigned mismatch" +#endif + #include #include diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.rel/three_way.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.rel/three_way.pass.cpp --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.rel/three_way.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.rel/three_way.pass.cpp @@ -15,7 +15,12 @@ // operator<=>(const tuple& t, const tuple& u); // UNSUPPORTED: c++03, c++11, c++14, c++17, libcpp-no-concepts -// ADDITIONAL_COMPILE_FLAGS: -Wno-sign-compare + +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic ignored "-Wsign-compare" +#elif defined(_MSC_VER) +#pragma warning(disable: 4242 4244) // Various truncation warnings +#endif #include #include