On Tue, 24 Sept 2024, 21:43 Jason Merrill, <ja...@redhat.com> wrote: > On 9/24/24 7:51 AM, Jason Merrill wrote: > > Tested x86_64-pc-linux-gnu. > > > > Is this the right fix, or do we want to stop using these deprecated > classes, > > here and in stl_function.h? >
We can't stop using them in stl_function.h for ABI compatibility reasons, and the parallel mode should be deprecated in favour of C++17 parallel algos so isn't worth "fixing", so I think the pragmas are the right answer here. OK, thanks. > Oops, adding libstdc++ CC. > > > -- 8< -- > > > > The CI saw failures on 17_intro/headers/c++2011/parallel_mode.cc due to > > -Wdeprecated-declarations warnings in some parallel/ headers. > > > > libstdc++-v3/ChangeLog: > > > > * include/parallel/base.h: Suppress -Wdeprecated-declarations. > > * include/parallel/multiseq_selection.h: Likewise. > > --- > > libstdc++-v3/include/parallel/base.h | 4 ++++ > > libstdc++-v3/include/parallel/multiseq_selection.h | 6 ++++++ > > 2 files changed, 10 insertions(+) > > > > diff --git a/libstdc++-v3/include/parallel/base.h > b/libstdc++-v3/include/parallel/base.h > > index 5bc5350e723..fcbcc1e0b99 100644 > > --- a/libstdc++-v3/include/parallel/base.h > > +++ b/libstdc++-v3/include/parallel/base.h > > @@ -166,6 +166,8 @@ namespace __gnu_parallel > > { return !_M_comp(__a, __b) && !_M_comp(__b, __a); } > > }; > > > > +#pragma GCC diagnostic push > > +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" // > *nary_function > > > > /** @brief Similar to std::unary_negate, > > * but giving the argument types explicitly. */ > > @@ -297,6 +299,8 @@ namespace __gnu_parallel > > struct _Multiplies<_Tp, _Tp, _Tp> > > : public std::multiplies<_Tp> { }; > > > > +#pragma GCC diagnostic pop // -Wdeprecated-declarations > > + > > /** @brief _Iterator associated with __gnu_parallel::_PseudoSequence. > > * If features the usual random-access iterator functionality. > > * @param _Tp Sequence _M_value type. > > diff --git a/libstdc++-v3/include/parallel/multiseq_selection.h > b/libstdc++-v3/include/parallel/multiseq_selection.h > > index f25895adbdd..22bd97e6432 100644 > > --- a/libstdc++-v3/include/parallel/multiseq_selection.h > > +++ b/libstdc++-v3/include/parallel/multiseq_selection.h > > @@ -48,6 +48,10 @@ > > > > namespace __gnu_parallel > > { > > + > > +#pragma GCC diagnostic push > > +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" // > *nary_function > > + > > /** @brief Compare __a pair of types lexicographically, ascending. */ > > template<typename _T1, typename _T2, typename _Compare> > > class _Lexicographic > > @@ -100,6 +104,8 @@ namespace __gnu_parallel > > } > > }; > > > > +#pragma GCC diagnostic pop // -Wdeprecated-declarations > > + > > /** > > * @brief Splits several sorted sequences at a certain global > __rank, > > * resulting in a splitting point for each sequence. > > > > base-commit: b752eed3e3f2f27570ea89b7c2339468698472a8 > >