aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2024-09-23 23:38:34 -0400
committerJason Merrill <jason@redhat.com>2024-09-25 08:20:45 -0400
commit2407dbe1d887068a13c6ee9b6922560f1c89def5 (patch)
tree5ed6d7ba99e4897c5aaeff64ae17112e536a183c
parent7ad17fe095772f71c2f76bc75f92dcb93941ad96 (diff)
downloadgcc-2407dbe1d887068a13c6ee9b6922560f1c89def5.zip
gcc-2407dbe1d887068a13c6ee9b6922560f1c89def5.tar.gz
gcc-2407dbe1d887068a13c6ee9b6922560f1c89def5.tar.bz2
libstdc++: more #pragma diagnostic
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.
-rw-r--r--libstdc++-v3/include/parallel/base.h4
-rw-r--r--libstdc++-v3/include/parallel/multiseq_selection.h6
2 files changed, 10 insertions, 0 deletions
diff --git a/libstdc++-v3/include/parallel/base.h b/libstdc++-v3/include/parallel/base.h
index 5bc5350..fcbcc1e 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 f25895a..22bd97e 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.