[libc++] Define _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER whenever we enable warnings in the test suite

This should make CI consistent on all the compilers we support. Most of
this patch is working around various warnings emitted by GCC in our code
base, which are now being shown when we compile the tests.

After this patch, the whole test suite should be warning free on all
compilers we support and test, except for a few warnings on GCC that
we silence explicitly until we figure out the proper fix for them.

Differential Revision: https://reviews.llvm.org/D120684

NOKEYCHECK=True
GitOrigin-RevId: e39095a32e882185611eaa02509e12cef9083b73
diff --git a/include/__format/parser_std_format_spec.h b/include/__format/parser_std_format_spec.h
index 139d1fc..d58ad11 100644
--- a/include/__format/parser_std_format_spec.h
+++ b/include/__format/parser_std_format_spec.h
@@ -218,7 +218,7 @@
 
 template <class _Context>
 _LIBCPP_HIDE_FROM_ABI constexpr uint32_t
-__substitute_arg_id(basic_format_arg<_Context> __arg) {
+__substitute_arg_id(basic_format_arg<_Context> _Arg) {
   return visit_format_arg(
       [](auto __arg) -> uint32_t {
         using _Type = decltype(__arg);
@@ -242,7 +242,7 @@
           __throw_format_error("A format-spec arg-id replacement argument "
                                "isn't an integral type");
       },
-      __arg);
+      _Arg);
 }
 
 class _LIBCPP_TYPE_VIS __parser_width {
@@ -1037,7 +1037,7 @@
  * character.
  */
 _LIBCPP_HIDE_FROM_ABI inline constexpr int __column_width_3(uint32_t __c) noexcept {
-  _LIBCPP_ASSERT(__c < 0x1'0000,
+  _LIBCPP_ASSERT(__c < 0x10000,
                  "Use __column_width_4 or __column_width for larger values");
 
   // clang-format off
@@ -1062,7 +1062,7 @@
  * 4-byte UTF-8 character.
  */
 _LIBCPP_HIDE_FROM_ABI inline constexpr int __column_width_4(uint32_t __c) noexcept {
-  _LIBCPP_ASSERT(__c >= 0x1'0000,
+  _LIBCPP_ASSERT(__c >= 0x10000,
                  "Use __column_width_3 or __column_width for smaller values");
 
   // clang-format off
@@ -1080,7 +1080,7 @@
  * The general case, accepting all values.
  */
 _LIBCPP_HIDE_FROM_ABI inline constexpr int __column_width(uint32_t __c) noexcept {
-  if (__c < 0x1'0000)
+  if (__c < 0x10000)
     return __column_width_3(__c);
 
   return __column_width_4(__c);
@@ -1240,7 +1240,7 @@
       __c -= 0xd800;
       __c <<= 10;
       __c += (*(__first + 1) - 0xdc00);
-      __c += 0x10'000;
+      __c += 0x10000;
 
       __result += __column_width_4(__c);
       if (__result > __maximum)
diff --git a/include/__iterator/size.h b/include/__iterator/size.h
index bf40207..e060134 100644
--- a/include/__iterator/size.h
+++ b/include/__iterator/size.h
@@ -41,9 +41,14 @@
 ->                              common_type_t<ptrdiff_t, make_signed_t<decltype(__c.size())>>
 { return            static_cast<common_type_t<ptrdiff_t, make_signed_t<decltype(__c.size())>>>(__c.size()); }
 
+// GCC complains about the implicit conversion from ptrdiff_t to size_t in
+// the array bound.
+_LIBCPP_DIAGNOSTIC_PUSH
+_LIBCPP_GCC_DIAGNOSTIC_IGNORED("-Wsign-conversion")
 template <class _Tp, ptrdiff_t _Sz>
 _LIBCPP_INLINE_VISIBILITY
 constexpr ptrdiff_t ssize(const _Tp (&)[_Sz]) noexcept { return _Sz; }
+_LIBCPP_DIAGNOSTIC_POP
 #endif
 
 #endif // _LIBCPP_STD_VER > 14
diff --git a/include/__random/linear_congruential_engine.h b/include/__random/linear_congruential_engine.h
index f5aba75..42b4081 100644
--- a/include/__random/linear_congruential_engine.h
+++ b/include/__random/linear_congruential_engine.h
@@ -218,8 +218,8 @@
     static_assert(__m == 0 || __c < __m, "linear_congruential_engine invalid parameters");
     static_assert(is_unsigned<_UIntType>::value, "_UIntType must be unsigned type");
 public:
-    static _LIBCPP_CONSTEXPR const result_type _Min = __c == 0u ? 1u: 0u;
-    static _LIBCPP_CONSTEXPR const result_type _Max = __m - 1u;
+    static _LIBCPP_CONSTEXPR const result_type _Min = __c == 0u ? 1u : 0u;
+    static _LIBCPP_CONSTEXPR const result_type _Max = __m - _UIntType(1u);
     static_assert(_Min < _Max,           "linear_congruential_engine invalid parameters");
 
     // engine characteristics
diff --git a/include/any b/include/any
index 7dc50b7..fc1641f 100644
--- a/include/any
+++ b/include/any
@@ -85,6 +85,7 @@
 #include <__utility/forward.h>
 #include <__utility/in_place.h>
 #include <__utility/move.h>
+#include <__utility/unreachable.h>
 #include <cstdlib>
 #include <memory>
 #include <type_traits>
@@ -366,6 +367,7 @@
         case _Action::_TypeInfo:
           return __type_info();
         }
+        __libcpp_unreachable();
     }
 
     template <class ..._Args>
@@ -449,6 +451,7 @@
         case _Action::_TypeInfo:
           return __type_info();
         }
+        __libcpp_unreachable();
     }
 
     template <class ..._Args>
diff --git a/include/barrier b/include/barrier
index 52cd129..0382f2f 100644
--- a/include/barrier
+++ b/include/barrier
@@ -108,12 +108,12 @@
 
 template<class _CompletionF>
 class __barrier_base {
-    ptrdiff_t                                               __expected;
+    ptrdiff_t                                               __expected_;
     unique_ptr<__barrier_algorithm_base,
-               void (*)(__barrier_algorithm_base*)>         __base;
-    __atomic_base<ptrdiff_t>                                __expected_adjustment;
-    _CompletionF                                            __completion;
-    __atomic_base<__barrier_phase_t>                        __phase;
+               void (*)(__barrier_algorithm_base*)>         __base_;
+    __atomic_base<ptrdiff_t>                                __expected_adjustment_;
+    _CompletionF                                            __completion_;
+    __atomic_base<__barrier_phase_t>                        __phase_;
 
 public:
     using arrival_token = __barrier_phase_t;
@@ -124,22 +124,22 @@
 
     _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
     __barrier_base(ptrdiff_t __expected, _CompletionF __completion = _CompletionF())
-            : __expected(__expected), __base(__construct_barrier_algorithm_base(this->__expected),
-                                             &__destroy_barrier_algorithm_base),
-              __expected_adjustment(0), __completion(std::move(__completion)), __phase(0)
+            : __expected_(__expected), __base_(__construct_barrier_algorithm_base(this->__expected_),
+                                               &__destroy_barrier_algorithm_base),
+              __expected_adjustment_(0), __completion_(std::move(__completion)), __phase_(0)
     {
     }
     [[nodiscard]] _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
     arrival_token arrive(ptrdiff_t update)
     {
-        auto const __old_phase = __phase.load(memory_order_relaxed);
+        auto const __old_phase = __phase_.load(memory_order_relaxed);
         for(; update; --update)
-            if(__arrive_barrier_algorithm_base(__base.get(), __old_phase)) {
-                __completion();
-                __expected += __expected_adjustment.load(memory_order_relaxed);
-                __expected_adjustment.store(0, memory_order_relaxed);
-                __phase.store(__old_phase + 2, memory_order_release);
-                __phase.notify_all();
+            if(__arrive_barrier_algorithm_base(__base_.get(), __old_phase)) {
+                __completion_();
+                __expected_ += __expected_adjustment_.load(memory_order_relaxed);
+                __expected_adjustment_.store(0, memory_order_relaxed);
+                __phase_.store(__old_phase + 2, memory_order_release);
+                __phase_.notify_all();
             }
         return __old_phase;
     }
@@ -147,14 +147,14 @@
     void wait(arrival_token&& __old_phase) const
     {
         auto const __test_fn = [this, __old_phase]() -> bool {
-            return __phase.load(memory_order_acquire) != __old_phase;
+            return __phase_.load(memory_order_acquire) != __old_phase;
         };
         __libcpp_thread_poll_with_backoff(__test_fn, __libcpp_timed_backoff_policy());
     }
     _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
     void arrive_and_drop()
     {
-        __expected_adjustment.fetch_sub(1, memory_order_relaxed);
+        __expected_adjustment_.fetch_sub(1, memory_order_relaxed);
         (void)arrive(1);
     }
 };
diff --git a/include/bitset b/include/bitset
index 875e8ef..07c9494 100644
--- a/include/bitset
+++ b/include/bitset
@@ -947,7 +947,7 @@
 bitset<_Size>::to_string(_CharT __zero, _CharT __one) const
 {
     basic_string<_CharT, _Traits, _Allocator> __r(_Size, __zero);
-    for (size_t __i = 0; __i < _Size; ++__i)
+    for (size_t __i = 0; __i != _Size; ++__i)
     {
         if ((*this)[__i])
             __r[_Size - 1 - __i] = __one;
diff --git a/include/charconv b/include/charconv
index 4308fec..3b766e6 100644
--- a/include/charconv
+++ b/include/charconv
@@ -418,7 +418,7 @@
     }
     else
     {
-        if (__x <= __tl::max())
+        if (__x <= __to_unsigned_like(__tl::max()))
         {
             __value = __x;
             return __r;
@@ -462,11 +462,11 @@
 __subject_seq_combinator(_It __first, _It __last, _Tp& __value, _Fn __f,
                          _Ts... __args)
 {
-    auto __find_non_zero = [](_It __first, _It __last) {
-        for (; __first != __last; ++__first)
-            if (*__first != '0')
+    auto __find_non_zero = [](_It __firstit, _It __lastit) {
+        for (; __firstit != __lastit; ++__firstit)
+            if (*__firstit != '0')
                 break;
-        return __first;
+        return __firstit;
     };
 
     auto __p = __find_non_zero(__first, __last);
@@ -503,16 +503,16 @@
 
     return __subject_seq_combinator(
         __first, __last, __value,
-        [](const char* __first, const char* __last,
-           _Tp& __value) -> from_chars_result {
+        [](const char* _First, const char* _Last,
+           _Tp& __val) -> from_chars_result {
             __output_type __a, __b;
-            auto __p = __tx::__read(__first, __last, __a, __b);
-            if (__p == __last || !__in_pattern(*__p))
+            auto __p = __tx::__read(_First, _Last, __a, __b);
+            if (__p == _Last || !__in_pattern(*__p))
             {
                 __output_type __m = numeric_limits<_Tp>::max();
                 if (__m >= __a && __m - __a >= __b)
                 {
-                    __value = __a + __b;
+                    __val = __a + __b;
                     return {__p, {}};
                 }
             }
@@ -538,21 +538,21 @@
 
     return __subject_seq_combinator(
         __first, __last, __value,
-        [](const char* __p, const char* __lastx, _Tp& __value,
-           int __base) -> from_chars_result {
+        [](const char* __p, const char* __lastp, _Tp& __val,
+           int _Base) -> from_chars_result {
             using __tl = numeric_limits<_Tp>;
-            auto __digits = __tl::digits / log2f(float(__base));
-            _Tp __a = __in_pattern(*__p++, __base).__val, __b = 0;
+            auto __digits = __tl::digits / log2f(float(_Base));
+            _Tp __a = __in_pattern(*__p++, _Base).__val, __b = 0;
 
-            for (int __i = 1; __p != __lastx; ++__i, ++__p)
+            for (int __i = 1; __p != __lastp; ++__i, ++__p)
             {
-                if (auto __c = __in_pattern(*__p, __base))
+                if (auto __c = __in_pattern(*__p, _Base))
                 {
                     if (__i < __digits - 1)
-                        __a = __a * __base + __c.__val;
+                        __a = __a * _Base + __c.__val;
                     else
                     {
-                        if (!__itoa::__mul_overflowed(__a, __base, __a))
+                        if (!__itoa::__mul_overflowed(__a, _Base, __a))
                             ++__p;
                         __b = __c.__val;
                         break;
@@ -562,11 +562,11 @@
                     break;
             }
 
-            if (__p == __lastx || !__in_pattern(*__p, __base))
+            if (__p == __lastp || !__in_pattern(*__p, _Base))
             {
                 if (__tl::max() - __a >= __b)
                 {
-                    __value = __a + __b;
+                    __val = __a + __b;
                     return {__p, {}};
                 }
             }
diff --git a/include/experimental/simd b/include/experimental/simd
index 31426a9..93d39c8 100644
--- a/include/experimental/simd
+++ b/include/experimental/simd
@@ -1470,6 +1470,7 @@
   simd operator+() const;
   simd operator-() const;
 
+#if 0
   // binary operators [simd.binary]
   friend simd operator+(const simd&, const simd&);
   friend simd operator-(const simd&, const simd&);
@@ -1506,6 +1507,7 @@
   friend mask_type operator<=(const simd&, const simd&);
   friend mask_type operator>(const simd&, const simd&);
   friend mask_type operator<(const simd&, const simd&);
+#endif
 };
 
 // [simd.mask.class]
@@ -1545,6 +1547,7 @@
   // unary operators [simd.mask.unary]
   simd_mask operator!() const noexcept;
 
+#if 0
   // simd_mask binary operators [simd.mask.binary]
   friend simd_mask operator&&(const simd_mask&, const simd_mask&) noexcept;
   friend simd_mask operator||(const simd_mask&, const simd_mask&) noexcept;
@@ -1560,6 +1563,7 @@
   // simd_mask compares [simd.mask.comparison]
   friend simd_mask operator==(const simd_mask&, const simd_mask&) noexcept;
   friend simd_mask operator!=(const simd_mask&, const simd_mask&) noexcept;
+#endif
 };
 
 #endif // _LIBCPP_STD_VER >= 17
diff --git a/include/istream b/include/istream
index 8735a79..8259c52 100644
--- a/include/istream
+++ b/include/istream
@@ -1592,7 +1592,7 @@
             size_t __c = 0;
             _CharT __zero = __ct.widen('0');
             _CharT __one = __ct.widen('1');
-            while (__c < _Size)
+            while (__c != _Size)
             {
                 typename _Traits::int_type __i = __is.rdbuf()->sgetc();
                 if (_Traits::eq_int_type(__i, _Traits::eof()))
diff --git a/include/latch b/include/latch
index e1e1519..7df7fda 100644
--- a/include/latch
+++ b/include/latch
@@ -91,10 +91,9 @@
     inline _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
     void wait() const
     {
-        auto const __test_fn = [=]() -> bool {
+        __cxx_atomic_wait(&__a.__a_, [&]() -> bool {
             return try_wait();
-        };
-        __cxx_atomic_wait(&__a.__a_, __test_fn);
+        });
     }
     inline _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
     void arrive_and_wait(ptrdiff_t __update = 1)
diff --git a/include/regex b/include/regex
index 944fa4a..56d92f2 100644
--- a/include/regex
+++ b/include/regex
@@ -2097,14 +2097,14 @@
 {
     typedef __owns_one_state<_CharT> base;
 
-    bool __multiline;
+    bool __multiline_;
 
 public:
     typedef _VSTD::__state<_CharT> __state;
 
     _LIBCPP_INLINE_VISIBILITY
     __r_anchor_multiline(bool __multiline, __node<_CharT>* __s)
-        : base(__s), __multiline(__multiline) {}
+        : base(__s), __multiline_(__multiline) {}
 
     virtual void __exec(__state&) const;
 };
@@ -2119,7 +2119,7 @@
         __s.__do_ = __state::__accept_but_not_consume;
         __s.__node_ = this->first();
     }
-    else if (__multiline && __is_eol(*__s.__current_))
+    else if (__multiline_ && __is_eol(*__s.__current_))
     {
         __s.__do_ = __state::__accept_but_not_consume;
         __s.__node_ = this->first();
diff --git a/include/string b/include/string
index 7eadde7..1d0b783 100644
--- a/include/string
+++ b/include/string
@@ -2304,7 +2304,7 @@
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::__assign_no_alias(
     const value_type* __s, size_type __n) {
-  size_type __cap = __is_short ? __min_cap : __get_long_cap();
+  size_type __cap = __is_short ? static_cast<size_type>(__min_cap) : __get_long_cap();
   if (__n < __cap) {
     pointer __p = __is_short ? __get_short_pointer() : __get_long_pointer();
     __is_short ? __set_short_size(__n) : __set_long_size(__n);
diff --git a/include/tuple b/include/tuple
index ab1202d..e1303f9 100644
--- a/include/tuple
+++ b/include/tuple
@@ -1544,6 +1544,7 @@
     typename __tuple_cat_return_ref<tuple<_Types...>&&, _Tuple0&&>::type
     operator()(tuple<_Types...> __t, _Tuple0&& __t0)
     {
+        (void)__t; // avoid unused parameter warning on GCC when _I0 is empty
         return _VSTD::forward_as_tuple(
             _VSTD::forward<_Types>(_VSTD::get<_I0>(__t))...,
             _VSTD::get<_J0>(_VSTD::forward<_Tuple0>(__t0))...);
@@ -1554,6 +1555,7 @@
     typename __tuple_cat_return_ref<tuple<_Types...>&&, _Tuple0&&, _Tuple1&&, _Tuples&&...>::type
     operator()(tuple<_Types...> __t, _Tuple0&& __t0, _Tuple1&& __t1, _Tuples&& ...__tpls)
     {
+        (void)__t; // avoid unused parameter warning on GCC when _I0 is empty
         typedef _LIBCPP_NODEBUG typename remove_reference<_Tuple0>::type _T0;
         typedef _LIBCPP_NODEBUG typename remove_reference<_Tuple1>::type _T1;
         return __tuple_cat<
diff --git a/include/variant b/include/variant
index 6128f2b..2eb93ba 100644
--- a/include/variant
+++ b/include/variant
@@ -1136,8 +1136,11 @@
   using __base_type = __copy_assignment<__traits<_Types...>>;
 
 public:
-  using __base_type::__base_type;
-  using __base_type::operator=;
+  using __base_type::__base_type; // get in_place_index_t constructor & friends
+  __impl(__impl const&) = default;
+  __impl(__impl&&) = default;
+  __impl& operator=(__impl const&) = default;
+  __impl& operator=(__impl&&) = default;
 
   template <size_t _Ip, class _Arg>
   inline _LIBCPP_INLINE_VISIBILITY
diff --git a/include/vector b/include/vector
index 2170ae6..b5bafbe 100644
--- a/include/vector
+++ b/include/vector
@@ -2335,7 +2335,7 @@
     void __vdeallocate() _NOEXCEPT;
     _LIBCPP_INLINE_VISIBILITY
     static size_type __align_it(size_type __new_size) _NOEXCEPT
-        {return __new_size + (__bits_per_word-1) & ~((size_type)__bits_per_word-1);}
+        {return (__new_size + (__bits_per_word-1)) & ~((size_type)__bits_per_word-1);}
     _LIBCPP_INLINE_VISIBILITY  size_type __recommend(size_type __new_size) const;
     _LIBCPP_INLINE_VISIBILITY void __construct_at_end(size_type __n, bool __x);
     template <class _ForwardIterator>
diff --git a/test/std/concepts/concepts.lang/concept.default.init/default_initializable.compile.pass.cpp b/test/std/concepts/concepts.lang/concept.default.init/default_initializable.compile.pass.cpp
index 02b8642..340c29f 100644
--- a/test/std/concepts/concepts.lang/concept.default.init/default_initializable.compile.pass.cpp
+++ b/test/std/concepts/concepts.lang/concept.default.init/default_initializable.compile.pass.cpp
@@ -8,6 +8,10 @@
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 
+// We voluntarily use std::default_initializable on types that have redundant
+// or ignored cv-qualifiers -- don't warn about it.
+// ADDITIONAL_COMPILE_FLAGS: -Wno-ignored-qualifiers
+
 // template<class T>
 //     concept default_initializable = constructible_from<T> &&
 //     requires { T{}; } &&
diff --git a/test/std/concepts/concepts.object/movable.compile.pass.cpp b/test/std/concepts/concepts.object/movable.compile.pass.cpp
index 394321c..c5879be 100644
--- a/test/std/concepts/concepts.object/movable.compile.pass.cpp
+++ b/test/std/concepts/concepts.object/movable.compile.pass.cpp
@@ -73,7 +73,6 @@
 static_assert(std::movable<std::optional<std::vector<int> > >);
 static_assert(std::movable<std::vector<int> >);
 
-static_assert(std::movable<traditional_copy_assignment_only>);
 static_assert(std::movable<has_volatile_member>);
 static_assert(std::movable<has_array_member>);
 
@@ -109,9 +108,9 @@
 static_assert(std::movable<multi_param_move_ctor>);
 static_assert(!std::movable<not_quite_multi_param_move_ctor>);
 
-static_assert(!std::assignable_from<copy_assign_with_mutable_parameter&,
-                                    copy_assign_with_mutable_parameter>);
-static_assert(!std::movable<copy_assign_with_mutable_parameter>);
+static_assert(!std::assignable_from<copy_with_mutable_parameter&,
+                                    copy_with_mutable_parameter>);
+static_assert(!std::movable<copy_with_mutable_parameter>);
 
 static_assert(!std::movable<const_move_assignment>);
 static_assert(std::movable<volatile_move_assignment>);
diff --git a/test/std/utilities/memory/specialized.algorithms/specialized.construct/construct_at.pass.cpp b/test/std/utilities/memory/specialized.algorithms/specialized.construct/construct_at.pass.cpp
index e7fd797..47d4bba 100644
--- a/test/std/utilities/memory/specialized.algorithms/specialized.construct/construct_at.pass.cpp
+++ b/test/std/utilities/memory/specialized.algorithms/specialized.construct/construct_at.pass.cpp
@@ -8,9 +8,6 @@
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 
-// Investigation needed
-// XFAIL: gcc
-
 // <memory>
 
 // template <class T, class ...Args>
@@ -23,15 +20,17 @@
 #include "test_iterators.h"
 
 struct Foo {
-    int a;
-    char b;
-    double c;
     constexpr Foo() { }
-    constexpr Foo(int a, char b, double c) : a(a), b(b), c(c) { }
+    constexpr Foo(int a, char b, double c) : a_(a), b_(b), c_(c) { }
     constexpr Foo(int a, char b, double c, int* count) : Foo(a, b, c) { *count += 1; }
     constexpr bool operator==(Foo const& other) const {
-        return a == other.a && b == other.b && c == other.c;
+        return a_ == other.a_ && b_ == other.b_ && c_ == other.c_;
     }
+
+private:
+    int a_;
+    char b_;
+    double c_;
 };
 
 struct Counted {
diff --git a/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_pair.pass.cpp b/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_pair.pass.cpp
index e922d70..2fc54fd 100644
--- a/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_pair.pass.cpp
+++ b/test/std/utilities/tuple/tuple.tuple/tuple.assign/const_pair.pass.cpp
@@ -22,9 +22,11 @@
 #include <utility>
 
 struct NothrowCopyAssignable {
+    NothrowCopyAssignable(NothrowCopyAssignable const&) = delete;
     NothrowCopyAssignable& operator=(NothrowCopyAssignable const&) noexcept { return *this; }
 };
 struct PotentiallyThrowingCopyAssignable {
+    PotentiallyThrowingCopyAssignable(PotentiallyThrowingCopyAssignable const&) = delete;
     PotentiallyThrowingCopyAssignable& operator=(PotentiallyThrowingCopyAssignable const&) { return *this; }
 };
 
diff --git a/test/std/utilities/tuple/tuple.tuple/tuple.assign/convert_copy.pass.cpp b/test/std/utilities/tuple/tuple.tuple/tuple.assign/convert_copy.pass.cpp
index 8a6b5b9..0b7c0a9 100644
--- a/test/std/utilities/tuple/tuple.tuple/tuple.assign/convert_copy.pass.cpp
+++ b/test/std/utilities/tuple/tuple.tuple/tuple.assign/convert_copy.pass.cpp
@@ -40,10 +40,12 @@
 };
 
 struct NothrowCopyAssignable {
+    NothrowCopyAssignable(NothrowCopyAssignable const&) = delete;
     NothrowCopyAssignable& operator=(NothrowCopyAssignable const&) noexcept { return *this; }
 };
 
 struct PotentiallyThrowingCopyAssignable {
+    PotentiallyThrowingCopyAssignable(PotentiallyThrowingCopyAssignable const&) = delete;
     PotentiallyThrowingCopyAssignable& operator=(PotentiallyThrowingCopyAssignable const&) { return *this; }
 };
 
diff --git a/test/std/utilities/variant/variant.variant/variant.assign/T.pass.cpp b/test/std/utilities/variant/variant.variant/variant.assign/T.pass.cpp
index 295fabf..bc52c9c 100644
--- a/test/std/utilities/variant/variant.variant/variant.assign/T.pass.cpp
+++ b/test/std/utilities/variant/variant.variant/variant.assign/T.pass.cpp
@@ -211,16 +211,6 @@
     assert(v.index() == 1);
     assert(std::get<1>(v) == nullptr);
   }
-  {
-    std::variant<bool volatile, int> v = 42;
-    v = false;
-    assert(v.index() == 0);
-    assert(!std::get<0>(v));
-    bool lvt = true;
-    v = lvt;
-    assert(v.index() == 0);
-    assert(std::get<0>(v));
-  }
 #if !defined(TEST_VARIANT_HAS_NO_REFERENCES)
   {
     using V = std::variant<int &, int &&, long>;
diff --git a/test/support/type_classification/movable.h b/test/support/type_classification/movable.h
index 842bd24..88cf737 100644
--- a/test/support/type_classification/movable.h
+++ b/test/support/type_classification/movable.h
@@ -66,14 +66,10 @@
   not_quite_multi_param_move_ctor& operator=(not_quite_multi_param_move_ctor&&);
 };
 
-struct traditional_copy_assignment_only {
-  traditional_copy_assignment_only&
-  operator=(traditional_copy_assignment_only const&);
-};
-
-struct copy_assign_with_mutable_parameter {
-  copy_assign_with_mutable_parameter&
-  operator=(copy_assign_with_mutable_parameter&);
+struct copy_with_mutable_parameter {
+  copy_with_mutable_parameter(copy_with_mutable_parameter&);
+  copy_with_mutable_parameter&
+  operator=(copy_with_mutable_parameter&);
 };
 
 struct const_move_assignment {
diff --git a/utils/libcxx/test/features.py b/utils/libcxx/test/features.py
index 34d58a9..99e5f7f 100644
--- a/utils/libcxx/test/features.py
+++ b/utils/libcxx/test/features.py
@@ -134,13 +134,21 @@
   Feature(name=lambda cfg: 'apple-clang-{__clang_major__}.{__clang_minor__}'.format(**compilerMacros(cfg)),                        when=_isAppleClang),
   Feature(name=lambda cfg: 'apple-clang-{__clang_major__}.{__clang_minor__}.{__clang_patchlevel__}'.format(**compilerMacros(cfg)), when=_isAppleClang),
 
-  Feature(name='clang',                                                                                                            when=_isClang,
-          actions=[AddCompileFlag('-D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER')]),
+  Feature(name='clang',                                                                                                            when=_isClang),
   Feature(name=lambda cfg: 'clang-{__clang_major__}'.format(**compilerMacros(cfg)),                                                when=_isClang),
   Feature(name=lambda cfg: 'clang-{__clang_major__}.{__clang_minor__}'.format(**compilerMacros(cfg)),                              when=_isClang),
   Feature(name=lambda cfg: 'clang-{__clang_major__}.{__clang_minor__}.{__clang_patchlevel__}'.format(**compilerMacros(cfg)),       when=_isClang),
 
-  Feature(name='gcc',                                                                                                              when=_isGCC),
+  # Note: Due to a GCC bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104760), we must disable deprecation warnings
+  #       on GCC or spurious diagnostics are issued.
+  #
+  # TODO:
+  # - Enable -Wplacement-new with GCC.
+  # - Enable -Wclass-memaccess with GCC.
+  Feature(name='gcc',                                                                                                              when=_isGCC,
+          actions=[AddCompileFlag('-D_LIBCPP_DISABLE_DEPRECATION_WARNINGS'),
+                   AddCompileFlag('-Wno-placement-new'),
+                   AddCompileFlag('-Wno-class-memaccess')]),
   Feature(name=lambda cfg: 'gcc-{__GNUC__}'.format(**compilerMacros(cfg)),                                                         when=_isGCC),
   Feature(name=lambda cfg: 'gcc-{__GNUC__}.{__GNUC_MINOR__}'.format(**compilerMacros(cfg)),                                        when=_isGCC),
   Feature(name=lambda cfg: 'gcc-{__GNUC__}.{__GNUC_MINOR__}.{__GNUC_PATCHLEVEL__}'.format(**compilerMacros(cfg)),                  when=_isGCC),
diff --git a/utils/libcxx/test/params.py b/utils/libcxx/test/params.py
index 7be5c28..c0e5008 100644
--- a/utils/libcxx/test/params.py
+++ b/utils/libcxx/test/params.py
@@ -20,7 +20,6 @@
   '-Wno-attributes',
   '-Wno-pessimizing-move',
   '-Wno-c++11-extensions',
-  '-Wno-user-defined-literals',
   '-Wno-noexcept-type',
   '-Wno-aligned-allocation-unavailable',
   '-Wno-atomic-alignment',
@@ -29,6 +28,11 @@
   # functions, but we know better what we're doing/testing in the test suite.
   '-Wno-sized-deallocation',
 
+  # Turn off warnings about user-defined literals with reserved suffixes. Those are
+  # just noise since we are testing the Standard Library itself.
+  '-Wno-literal-suffix', # GCC
+  '-Wno-user-defined-literals', # Clang
+
   # These warnings should be enabled in order to support the MSVC
   # team using the test suite; They enable the warnings below and
   # expect the test suite to be clean.
@@ -117,9 +121,10 @@
 
   Parameter(name='enable_warnings', choices=[True, False], type=bool, default=True,
             help="Whether to enable warnings when compiling the test suite.",
-            actions=lambda warnings: [] if not warnings else [
-              AddOptionalWarningFlag(w) for w in _warningFlags
-            ]),
+            actions=lambda warnings: [] if not warnings else
+              [AddOptionalWarningFlag(w) for w in _warningFlags] +
+              [AddCompileFlag('-D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER')]
+            ),
 
   Parameter(name='debug_level', choices=['', '0', '1'], type=str, default='',
             help="The debugging level to enable in the test suite.",