This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: v3 PATCH to fix libstdc++ build/test with C++11 default compiler
- From: Jason Merrill <jason at redhat dot com>
- To: gcc-patches List <gcc-patches at gcc dot gnu dot org>, libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Sat, 09 May 2015 16:47:51 -0500
- Subject: Re: v3 PATCH to fix libstdc++ build/test with C++11 default compiler
- Authentication-results: sourceware.org; auth=none
- References: <554D8E65 dot 4050309 at redhat dot com>
On 05/08/2015 11:34 PM, Jason Merrill wrote:
The second patch fixes all but one of the testsuite failures that turned
up with a compiler that defaults to C++11.
And here's the fix for a C++14 compiler:
commit 42dc3f6f9af19c12d4201af8b6ef2e28bb08e944
Author: Jason Merrill <jason@redhat.com>
Date: Sat May 9 12:51:20 2015 -0500
* testsuite/20_util/headers/functional/synopsis.cc: Add
_GLIBCXX14_CONSTEXPR.
* testsuite/25_algorithms/headers/algorithm/synopsis.cc: Likewise.
diff --git a/libstdc++-v3/testsuite/20_util/headers/functional/synopsis.cc b/libstdc++-v3/testsuite/20_util/headers/functional/synopsis.cc
index 03d37a6..5e561de 100644
--- a/libstdc++-v3/testsuite/20_util/headers/functional/synopsis.cc
+++ b/libstdc++-v3/testsuite/20_util/headers/functional/synopsis.cc
@@ -50,9 +50,11 @@ namespace std {
// lib.negators, negators:
template <class Predicate> struct unary_negate;
template <class Predicate>
+ _GLIBCXX14_CONSTEXPR
unary_negate<Predicate> not1(const Predicate&);
template <class Predicate> struct binary_negate;
template <class Predicate>
+ _GLIBCXX14_CONSTEXPR
binary_negate<Predicate> not2(const Predicate&);
// lib.binders, binders:
diff --git a/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/synopsis.cc b/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/synopsis.cc
index ba38f25..4758796 100644
--- a/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/synopsis.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/synopsis.cc
@@ -483,75 +483,93 @@ namespace std
// 25.3.7, minimum and maximum:
template<typename _Tp>
+ _GLIBCXX14_CONSTEXPR
const _Tp&
min(const _Tp&, const _Tp&);
template<typename _Tp, typename _Compare>
+ _GLIBCXX14_CONSTEXPR
const _Tp&
min(const _Tp&, const _Tp&, _Compare);
template<typename _Tp>
+ _GLIBCXX14_CONSTEXPR
const _Tp&
max(const _Tp&, const _Tp&);
template<typename _Tp, typename _Compare>
+ _GLIBCXX14_CONSTEXPR
const _Tp&
max(const _Tp&, const _Tp&, _Compare);
template<typename _FIter>
+ _GLIBCXX14_CONSTEXPR
_FIter
min_element(_FIter, _FIter);
template<typename _FIter, typename _Compare>
+ _GLIBCXX14_CONSTEXPR
_FIter
min_element(_FIter, _FIter, _Compare);
template<typename _FIter>
+ _GLIBCXX14_CONSTEXPR
_FIter
max_element(_FIter, _FIter);
template<typename _FIter, typename _Compare>
+ _GLIBCXX14_CONSTEXPR
_FIter
max_element(_FIter, _FIter, _Compare);
#if __cplusplus >= 201103L
template<typename _Tp>
+ _GLIBCXX14_CONSTEXPR
pair<const _Tp&, const _Tp&>
minmax(const _Tp&, const _Tp&);
template<typename _Tp, typename _Compare>
+ _GLIBCXX14_CONSTEXPR
pair<const _Tp&, const _Tp&>
minmax(const _Tp&, const _Tp&, _Compare);
template<typename _FIter>
+ _GLIBCXX14_CONSTEXPR
pair<_FIter, _FIter>
minmax_element(_FIter, _FIter);
template<typename _FIter, typename _Compare>
+ _GLIBCXX14_CONSTEXPR
pair<_FIter, _FIter>
minmax_element(_FIter, _FIter, _Compare);
template<typename _Tp>
+ _GLIBCXX14_CONSTEXPR
_Tp
min(initializer_list<_Tp>);
template<typename _Tp, typename _Compare>
+ _GLIBCXX14_CONSTEXPR
_Tp
min(initializer_list<_Tp>, _Compare);
template<typename _Tp>
+ _GLIBCXX14_CONSTEXPR
_Tp
max(initializer_list<_Tp>);
template<typename _Tp, typename _Compare>
+ _GLIBCXX14_CONSTEXPR
_Tp
max(initializer_list<_Tp>, _Compare);
template<typename _Tp>
+ _GLIBCXX14_CONSTEXPR
pair<_Tp, _Tp>
minmax(initializer_list<_Tp>);
template<typename _Tp, typename _Compare>
+ _GLIBCXX14_CONSTEXPR
pair<_Tp, _Tp>
minmax(initializer_list<_Tp>, _Compare);
#endif