Skip to content

Commit 2057443

Browse files
committed
[libc++] Upgrade to GCC 15
1 parent 3b4f9c5 commit 2057443

File tree

37 files changed

+117
-101
lines changed

37 files changed

+117
-101
lines changed

.github/workflows/libcxx-build-and-test.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ jobs:
5252
cxx: [ 'clang++-21' ]
5353
include:
5454
- config: 'generic-gcc'
55-
cc: 'gcc-14'
56-
cxx: 'g++-14'
55+
cc: 'gcc-15'
56+
cxx: 'g++-15'
5757
steps:
5858
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5959
- name: ${{ matrix.config }}.${{ matrix.cxx }}
@@ -92,8 +92,8 @@ jobs:
9292
cxx: [ 'clang++-21' ]
9393
include:
9494
- config: 'generic-gcc-cxx11'
95-
cc: 'gcc-14'
96-
cxx: 'g++-14'
95+
cc: 'gcc-15'
96+
cxx: 'g++-15'
9797
- config: 'generic-cxx26'
9898
cc: 'clang-20'
9999
cxx: 'clang++-20'

libcxx/docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Compiler Versions Restrictions Support policy
134134
Clang 19, 20, 21-git latest two stable releases per `LLVM's release page <https://releases.llvm.org>`_ and the development version
135135
AppleClang 15 latest stable release per `Xcode's release page <https://developer.apple.com/documentation/xcode-release-notes>`_
136136
Open XL 17.1.3 (AIX) latest stable release per `Open XL's documentation page <https://www.ibm.com/docs/en/openxl-c-and-cpp-aix>`_
137-
GCC 14 In C++11 or later only latest stable release per `GCC's release page <https://gcc.gnu.org/releases.html>`_
137+
GCC 15 In C++11 or later only latest stable release per `GCC's release page <https://gcc.gnu.org/releases.html>`_
138138
============ =================== ========================== =====================
139139

140140
Libc++ also supports common platforms and architectures:

libcxx/include/__new/allocate.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ _LIBCPP_CONSTEXPR inline _LIBCPP_HIDE_FROM_ABI bool __is_overaligned_for_new(siz
3333

3434
template <class... _Args>
3535
_LIBCPP_HIDE_FROM_ABI void* __libcpp_operator_new(_Args... __args) {
36-
#if __has_builtin(__builtin_operator_new) && __has_builtin(__builtin_operator_delete)
36+
#if __has_builtin(__builtin_operator_new) && __has_builtin(__builtin_operator_delete) && !defined(_LIBCPP_COMPILER_GCC)
3737
return __builtin_operator_new(__args...);
3838
#else
3939
return ::operator new(__args...);
@@ -42,7 +42,7 @@ _LIBCPP_HIDE_FROM_ABI void* __libcpp_operator_new(_Args... __args) {
4242

4343
template <class... _Args>
4444
_LIBCPP_HIDE_FROM_ABI void __libcpp_operator_delete(_Args... __args) _NOEXCEPT {
45-
#if __has_builtin(__builtin_operator_new) && __has_builtin(__builtin_operator_delete)
45+
#if __has_builtin(__builtin_operator_new) && __has_builtin(__builtin_operator_delete) && !defined(_LIBCPP_COMPILER_GCC)
4646
__builtin_operator_delete(__args...);
4747
#else
4848
::operator delete(__args...);

libcxx/include/__type_traits/add_lvalue_reference.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
_LIBCPP_BEGIN_NAMESPACE_STD
2020

21-
#if __has_builtin(__add_lvalue_reference)
21+
#if __has_builtin(__add_lvalue_reference) && !defined(_LIBCPP_COMPILER_GCC)
2222

2323
template <class _Tp>
2424
using __add_lvalue_reference_t _LIBCPP_NODEBUG = __add_lvalue_reference(_Tp);

libcxx/include/__type_traits/add_pointer.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020

2121
_LIBCPP_BEGIN_NAMESPACE_STD
2222

23-
#if !defined(_LIBCPP_WORKAROUND_OBJCXX_COMPILER_INTRINSICS) && __has_builtin(__add_pointer)
23+
#if !defined(_LIBCPP_WORKAROUND_OBJCXX_COMPILER_INTRINSICS) && __has_builtin(__add_pointer) && \
24+
!defined(_LIBCPP_COMPILER_GCC)
2425

2526
template <class _Tp>
2627
using __add_pointer_t _LIBCPP_NODEBUG = __add_pointer(_Tp);

libcxx/include/__type_traits/add_rvalue_reference.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
_LIBCPP_BEGIN_NAMESPACE_STD
2020

21-
#if __has_builtin(__add_rvalue_reference)
21+
#if __has_builtin(__add_rvalue_reference) && !defined(_LIBCPP_COMPILER_GCC)
2222

2323
template <class _Tp>
2424
using __add_rvalue_reference_t _LIBCPP_NODEBUG = __add_rvalue_reference(_Tp);

libcxx/include/__type_traits/decay.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
_LIBCPP_BEGIN_NAMESPACE_STD
2727

28-
#if __has_builtin(__decay)
28+
#if __has_builtin(__decay) && !defined(_LIBCPP_COMPILER_GCC)
2929
template <class _Tp>
3030
using __decay_t _LIBCPP_NODEBUG = __decay(_Tp);
3131

libcxx/include/__type_traits/remove_all_extents.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
_LIBCPP_BEGIN_NAMESPACE_STD
2020

21-
#if __has_builtin(__remove_all_extents)
21+
#if __has_builtin(__remove_all_extents) && !defined(_LIBCPP_COMPILER_GCC)
2222
template <class _Tp>
2323
struct _LIBCPP_NO_SPECIALIZATIONS remove_all_extents {
2424
using type _LIBCPP_NODEBUG = __remove_all_extents(_Tp);

libcxx/include/__type_traits/remove_extent.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
_LIBCPP_BEGIN_NAMESPACE_STD
2020

21-
#if __has_builtin(__remove_extent)
21+
#if __has_builtin(__remove_extent) && !defined(_LIBCPP_COMPILER_GCC)
2222
template <class _Tp>
2323
struct _LIBCPP_NO_SPECIALIZATIONS remove_extent {
2424
using type _LIBCPP_NODEBUG = __remove_extent(_Tp);

libcxx/test/std/algorithms/alg.nonmodifying/alg.contains/ranges.contains.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ constexpr bool test() {
195195
std::string a[] = {str1, str1, str, str1, str1};
196196
auto whole =
197197
std::ranges::subrange(forward_iterator(std::move_iterator(a)), forward_iterator(std::move_iterator(a + 5)));
198-
bool ret = std::ranges::contains(whole.begin(), whole.end(), "hello world", [&](const std::string i) {
198+
bool ret = std::ranges::contains(whole.begin(), whole.end(), +"hello world", [&](const std::string i) {
199199
++projection_count;
200200
return i;
201201
});
@@ -207,7 +207,7 @@ constexpr bool test() {
207207
std::string a[] = {str1, str1, str, str1, str1};
208208
auto whole =
209209
std::ranges::subrange(forward_iterator(std::move_iterator(a)), forward_iterator(std::move_iterator(a + 5)));
210-
bool ret = std::ranges::contains(whole, "hello world", [&](const std::string i) {
210+
bool ret = std::ranges::contains(whole, +"hello world", [&](const std::string i) {
211211
++projection_count;
212212
return i;
213213
});

0 commit comments

Comments
 (0)