From 0b42fcdb3733f6919e9d221380c0fe27554a0d57 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 3 Dec 2024 10:06:27 +0100 Subject: [PATCH] external/boost: Avoid some -Wdeprecated-variadic-comma-omission MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ...new with GCC 15 trunk -std=c++26 since "c++: Implement C++26 P3176R1 - The Oxford variadic comma", > In file included from workdir/UnpackedTarball/boost/boost/rational.hpp:82, > from source/external/boost/include/boost/rational.hpp:30, > from source/tools/source/generic/fract.cxx:32: > workdir/UnpackedTarball/boost/boost/integer/common_factor_rt.hpp:66:56: error: omission of ‘,’ before varargs ‘...’ is deprecated in C++26 [-Werror=deprecated-variadic-comma-omission] > 66 | inline constexpr void constexpr_swap(T&a, U& b...) BOOST_GCD_NOEXCEPT(T) > | ^~~ > | , and > In file included from workdir/UnpackedTarball/boost/boost/move/unique_ptr.hpp:24, > from workdir/UnpackedTarball/boost/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp:18, > from workdir/UnpackedTarball/boost/boost/spirit/home/classic/core/non_terminal/grammar.hpp:21, > from workdir/UnpackedTarball/boost/boost/spirit/home/classic/core.hpp:42, > from workdir/UnpackedTarball/boost/boost/spirit/home/classic.hpp:24, > from workdir/UnpackedTarball/boost/boost/spirit/include/classic.hpp:11, > from source/external/boost/include/boost/spirit/include/classic.hpp:30, > from sdext/source/pdfimport/pdfparse/pdfparse.cxx:23: > workdir/UnpackedTarball/boost/boost/move/detail/unique_ptr_meta_utils.hpp:500:39: error: omission of ‘,’ before varargs ‘...’ is deprecated in C++26 [-Werror=deprecated-variadic-comma-omission] > 500 | struct is_unary_function_impl > | ^~~ > | , Change-Id: I56856e274a7c577c53d96343992bb79d4c3d602e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177730 Reviewed-by: Stephan Bergmann Tested-by: Jenkins --- ...-before-ellipsis-in-constexpr_swap.patch.2 | 28 ++++++++++++++ ...variadic-comma-omission-with-GCC-1.patch.2 | 38 +++++++++++++++++++ external/boost/UnpackedTarball_boost.mk | 6 +++ 3 files changed, 72 insertions(+) create mode 100644 external/boost/0001-Add-a-comma-before-ellipsis-in-constexpr_swap.patch.2 create mode 100644 external/boost/0001-Avoid-Wdeprecated-variadic-comma-omission-with-GCC-1.patch.2 diff --git a/external/boost/0001-Add-a-comma-before-ellipsis-in-constexpr_swap.patch.2 b/external/boost/0001-Add-a-comma-before-ellipsis-in-constexpr_swap.patch.2 new file mode 100644 index 000000000000..3c3c8755fbfa --- /dev/null +++ b/external/boost/0001-Add-a-comma-before-ellipsis-in-constexpr_swap.patch.2 @@ -0,0 +1,28 @@ +From 2dfe66886d71b9a341433ea8b6ff225cc07da80b Mon Sep 17 00:00:00 2001 +From: Andrey Semashev +Date: Mon, 2 Dec 2024 19:22:20 +0300 +Subject: Add a comma before ellipsis in constexpr_swap. + +gcc 15 complains that the comma is required before vararg ellipsis. + +Fixes https://github.com/boostorg/integer/issues/35. +--- + include/boost/integer/common_factor_rt.hpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/boost/integer/common_factor_rt.hpp b/include/boost/integer/common_factor_rt.hpp +index d6765d4..817682f 100644 +--- a/include/boost/integer/common_factor_rt.hpp ++++ b/include/boost/integer/common_factor_rt.hpp +@@ -64,7 +64,7 @@ namespace boost { + return a.swap(b); + } + template +- inline constexpr void constexpr_swap(T&a, U& b...) BOOST_GCD_NOEXCEPT(T) ++ inline constexpr void constexpr_swap(T& a, U& b, ...) BOOST_GCD_NOEXCEPT(T) + { + T t(static_cast(a)); + a = static_cast(b); +-- +2.47.1 + diff --git a/external/boost/0001-Avoid-Wdeprecated-variadic-comma-omission-with-GCC-1.patch.2 b/external/boost/0001-Avoid-Wdeprecated-variadic-comma-omission-with-GCC-1.patch.2 new file mode 100644 index 000000000000..e7ebc6e18b62 --- /dev/null +++ b/external/boost/0001-Avoid-Wdeprecated-variadic-comma-omission-with-GCC-1.patch.2 @@ -0,0 +1,38 @@ +From aa25af1928cc275537276c1a50e6ba49333a3aec Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann +Date: Mon, 2 Dec 2024 19:06:25 +0100 +Subject: Avoid -Wdeprecated-variadic-comma-omission with GCC 15 trunk + -std=c++26 + +...since + +"c++: Implement C++26 P3176R1 - The Oxford variadic comma" +--- + include/boost/move/detail/unique_ptr_meta_utils.hpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/boost/move/detail/unique_ptr_meta_utils.hpp b/include/boost/move/detail/unique_ptr_meta_utils.hpp +index 4c6aeb5..27154e0 100644 +--- a/include/boost/move/detail/unique_ptr_meta_utils.hpp ++++ b/include/boost/move/detail/unique_ptr_meta_utils.hpp +@@ -497,7 +497,7 @@ struct is_unary_function_impl + { static const bool value = true; }; + + template +-struct is_unary_function_impl ++struct is_unary_function_impl + { static const bool value = true; }; + + #else // BOOST_MOVE_TT_TEST_MSC_FUNC_SIGS +@@ -519,7 +519,7 @@ struct is_unary_function_impl + { static const bool value = true; }; + + template +-struct is_unary_function_impl ++struct is_unary_function_impl + { static const bool value = true; }; + + #endif +-- +2.47.1 + diff --git a/external/boost/UnpackedTarball_boost.mk b/external/boost/UnpackedTarball_boost.mk index 23b9a3c23dc8..3a8033bbea1e 100644 --- a/external/boost/UnpackedTarball_boost.mk +++ b/external/boost/UnpackedTarball_boost.mk @@ -36,6 +36,12 @@ boost_patches += Wundef.patch.0 boost_patches += boost.spirit.noreturn.patch +boost_patches += 0001-Add-a-comma-before-ellipsis-in-constexpr_swap.patch.2 + +# Sent upstream as "Avoid +# -Wdeprecated-variadic-comma-omission with GCC 15 trunk -std=c++26": +boost_patches += 0001-Avoid-Wdeprecated-variadic-comma-omission-with-GCC-1.patch.2 + $(eval $(call gb_UnpackedTarball_UnpackedTarball,boost)) $(eval $(call gb_UnpackedTarball_set_tarball,boost,$(BOOST_TARBALL)))