diff --git a/libcxx/include/__string/constexpr_c_functions.h b/libcxx/include/__string/constexpr_c_functions.h index 4da8542e3807..a978f816f189 100644 --- a/libcxx/include/__string/constexpr_c_functions.h +++ b/libcxx/include/__string/constexpr_c_functions.h @@ -123,7 +123,7 @@ __constexpr_memcmp_equal(const _Tp* __lhs, const _Up* __rhs, __element_count __n } return true; } else { - return __builtin_memcmp(__lhs, __rhs, __count * sizeof(_Tp)) == 0; + return ::__builtin_memcmp(__lhs, __rhs, __count * sizeof(_Tp)) == 0; } } diff --git a/libcxx/include/__type_traits/remove_pointer.h b/libcxx/include/__type_traits/remove_pointer.h index 54390a1939f7..1048f67055a2 100644 --- a/libcxx/include/__type_traits/remove_pointer.h +++ b/libcxx/include/__type_traits/remove_pointer.h @@ -23,8 +23,13 @@ struct remove_pointer { using type _LIBCPP_NODEBUG = __remove_pointer(_Tp); }; +# ifdef _LIBCPP_COMPILER_GCC +template +using __remove_pointer_t = typename remove_pointer<_Tp>::type; +# else template using __remove_pointer_t = __remove_pointer(_Tp); +# endif #else // clang-format off template struct _LIBCPP_TEMPLATE_VIS remove_pointer {typedef _LIBCPP_NODEBUG _Tp type;}; diff --git a/libcxx/include/bitset b/libcxx/include/bitset index 8818ab6563b5..6bd7bfe585f3 100644 --- a/libcxx/include/bitset +++ b/libcxx/include/bitset @@ -375,8 +375,11 @@ template _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long __bitset<_N_words, _Size>::to_ullong(true_type, true_type) const { unsigned long long __r = __first_[0]; + _LIBCPP_DIAGNOSTIC_PUSH + _LIBCPP_GCC_DIAGNOSTIC_IGNORED("-Wshift-count-overflow") for (size_t __i = 1; __i < sizeof(unsigned long long) / sizeof(__storage_type); ++__i) __r |= static_cast(__first_[__i]) << (sizeof(__storage_type) * CHAR_BIT); + _LIBCPP_DIAGNOSTIC_POP return __r; } diff --git a/libcxx/test/std/time/time.zone/time.zone.leap/nonmembers/comparison.pass.cpp b/libcxx/test/std/time/time.zone/time.zone.leap/nonmembers/comparison.pass.cpp index 448cd88d146f..ccff0248ebac 100644 --- a/libcxx/test/std/time/time.zone/time.zone.leap/nonmembers/comparison.pass.cpp +++ b/libcxx/test/std/time/time.zone/time.zone.leap/nonmembers/comparison.pass.cpp @@ -9,8 +9,8 @@ // UNSUPPORTED: c++03, c++11, c++14, c++17 // UNSUPPORTED: no-filesystem, no-localization, no-tzdb -// TODO TZDB test whether this can be enabled with gcc 14. -// UNSUPPORTED: gcc-13 +// TODO TZDB investigate why this fails with GCC +// UNSUPPORTED: gcc-13, gcc-14 // XFAIL: libcpp-has-no-experimental-tzdb // XFAIL: availability-tzdb-missing diff --git a/libcxx/test/std/utilities/expected/expected.expected/monadic/transform.pass.cpp b/libcxx/test/std/utilities/expected/expected.expected/monadic/transform.pass.cpp index d38a46f04524..aa7106fb91ad 100644 --- a/libcxx/test/std/utilities/expected/expected.expected/monadic/transform.pass.cpp +++ b/libcxx/test/std/utilities/expected/expected.expected/monadic/transform.pass.cpp @@ -10,7 +10,7 @@ // GCC has a issue for `Guaranteed copy elision for potentially-overlapping non-static data members`, // please refer to: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108333 -// XFAIL: gcc-13 +// XFAIL: gcc-13, gcc-14 // diff --git a/libcxx/test/std/utilities/expected/expected.expected/monadic/transform_error.pass.cpp b/libcxx/test/std/utilities/expected/expected.expected/monadic/transform_error.pass.cpp index ec55f637f020..ae9feccb58cf 100644 --- a/libcxx/test/std/utilities/expected/expected.expected/monadic/transform_error.pass.cpp +++ b/libcxx/test/std/utilities/expected/expected.expected/monadic/transform_error.pass.cpp @@ -10,7 +10,7 @@ // GCC has a issue for `Guaranteed copy elision for potentially-overlapping non-static data members`, // please refer to: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108333. -// XFAIL: gcc-13 +// XFAIL: gcc-13, gcc-14 // diff --git a/libcxx/test/std/utilities/expected/expected.void/monadic/transform_error.pass.cpp b/libcxx/test/std/utilities/expected/expected.void/monadic/transform_error.pass.cpp index cd6e5a5038d2..f70bddbed020 100644 --- a/libcxx/test/std/utilities/expected/expected.void/monadic/transform_error.pass.cpp +++ b/libcxx/test/std/utilities/expected/expected.void/monadic/transform_error.pass.cpp @@ -10,7 +10,7 @@ // GCC has a issue for `Guaranteed copy elision for potentially-overlapping non-static data members`, // please refer to: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108333 -// XFAIL: gcc-13 +// XFAIL: gcc-13, gcc-14 // diff --git a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.char_array.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.char_array.pass.cpp index b0ee399a1c19..cad13c1efeca 100644 --- a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.char_array.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.char_array.pass.cpp @@ -7,7 +7,7 @@ // UNSUPPORTED: c++03, c++11, c++14, c++17 // TODO FMT __builtin_memcpy isn't constexpr in GCC -// UNSUPPORTED: gcc-13 +// UNSUPPORTED: gcc-13, gcc-14 // diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR31384.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR31384.pass.cpp index c9e7bb6a57e2..0b40ac9ff046 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR31384.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR31384.pass.cpp @@ -8,6 +8,9 @@ // UNSUPPORTED: c++03 +// FIXME: Why does this start to fail with GCC 14? +// XFAIL: gcc-14 + // See https://llvm.org/PR31384. #include diff --git a/libcxx/test/std/utilities/variant/variant.visit.member/visit_return_type.pass.cpp b/libcxx/test/std/utilities/variant/variant.visit.member/visit_return_type.pass.cpp index 2c1cbb06e706..7429cdf80fac 100644 --- a/libcxx/test/std/utilities/variant/variant.visit.member/visit_return_type.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.visit.member/visit_return_type.pass.cpp @@ -34,6 +34,9 @@ struct overloaded : Ts... { using Ts::operator()...; }; +template +overloaded(Ts...) -> overloaded; + void test_overload_ambiguity() { using V = std::variant; using namespace std::string_literals; diff --git a/libcxxabi/test/catch_member_function_pointer_02.pass.cpp b/libcxxabi/test/catch_member_function_pointer_02.pass.cpp index c4a07c1297dd..b4b8ce823499 100644 --- a/libcxxabi/test/catch_member_function_pointer_02.pass.cpp +++ b/libcxxabi/test/catch_member_function_pointer_02.pass.cpp @@ -15,7 +15,7 @@ // GCC supports noexcept function types but this test still fails. // This is likely a bug in their implementation. Investigation needed. -// XFAIL: gcc-13 +// XFAIL: gcc-13, gcc-14 #include