diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2008-07-19 19:58:52 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2008-07-19 19:58:52 +0000 |
commit | 52e07aa164ec9029ed9ddfb236917fe2efab0de0 (patch) | |
tree | 05f99167cdfb0d1908b163467f64eb4cfc00f84e /libstdc++-v3 | |
parent | a7ea9e2968dd6dc207e554ce89b16c291f4120a1 (diff) | |
download | gcc-52e07aa164ec9029ed9ddfb236917fe2efab0de0.zip gcc-52e07aa164ec9029ed9ddfb236917fe2efab0de0.tar.gz gcc-52e07aa164ec9029ed9ddfb236917fe2efab0de0.tar.bz2 |
2008-07-19 Paolo Carlini <paolo.carlini@oracle.com>
* include/ext/pb_ds/detail/binomial_heap_base_/debug_fn_imps.hpp
(assert_node_consistent): Avoid ambiguous else warning.
* include/ext/pb_ds/detail/debug_map_base.hpp: Include <iostream>.
* include/bits/c++config: In debug-mode (and parallel-mode) set
_GLIBCXX_EXTERN_TEMPLATE to -1, not 0, thus disabling extern
templates only for basic_string (per libstdc++/21674).
* include/bits/basic_string.tcc: Use extern templates when
_GLIBCXX_EXTERN_TEMPLATE > 0.
From-SVN: r137990
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 13 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/basic_string.tcc | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/c++config | 6 | ||||
-rw-r--r-- | libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/debug_fn_imps.hpp | 33 | ||||
-rw-r--r-- | libstdc++-v3/include/ext/pb_ds/detail/debug_map_base.hpp | 3 |
5 files changed, 39 insertions, 18 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 9d11f86..2652975 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,16 @@ +2008-07-19 Paolo Carlini <paolo.carlini@oracle.com> + + * include/ext/pb_ds/detail/binomial_heap_base_/debug_fn_imps.hpp + (assert_node_consistent): Avoid ambiguous else warning. + + * include/ext/pb_ds/detail/debug_map_base.hpp: Include <iostream>. + + * include/bits/c++config: In debug-mode (and parallel-mode) set + _GLIBCXX_EXTERN_TEMPLATE to -1, not 0, thus disabling extern + templates only for basic_string (per libstdc++/21674). + * include/bits/basic_string.tcc: Use extern templates when + _GLIBCXX_EXTERN_TEMPLATE > 0. + 2008-07-18 Kris Van Hees <kris.van.hees@oracle.com> Holger Hopp <holger.hopp@sap.com> diff --git a/libstdc++-v3/include/bits/basic_string.tcc b/libstdc++-v3/include/bits/basic_string.tcc index 062b02b..49b6494 100644 --- a/libstdc++-v3/include/bits/basic_string.tcc +++ b/libstdc++-v3/include/bits/basic_string.tcc @@ -1104,7 +1104,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // Inhibit implicit instantiations for required instantiations, // which are defined via explicit instantiations elsewhere. // NB: This syntax is a GNU extension. -#if _GLIBCXX_EXTERN_TEMPLATE +#if _GLIBCXX_EXTERN_TEMPLATE > 0 extern template class basic_string<char>; extern template basic_istream<char>& diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config index f4029b2..e40d960 100644 --- a/libstdc++-v3/include/bits/c++config +++ b/libstdc++-v3/include/bits/c++config @@ -135,7 +135,7 @@ # define _GLIBCXX_STD __cxx1998 # define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) { # define _GLIBCXX_END_NAMESPACE } -# define _GLIBCXX_EXTERN_TEMPLATE 0 +# define _GLIBCXX_EXTERN_TEMPLATE -1 # endif // parallel @@ -145,7 +145,7 @@ # define _GLIBCXX_STD __cxx1998 # define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) { # define _GLIBCXX_END_NAMESPACE } -# define _GLIBCXX_EXTERN_TEMPLATE 0 +# define _GLIBCXX_EXTERN_TEMPLATE -1 # endif // debug + parallel @@ -155,7 +155,7 @@ # define _GLIBCXX_STD __cxx1998 # define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) { # define _GLIBCXX_END_NAMESPACE } -# define _GLIBCXX_EXTERN_TEMPLATE 0 +# define _GLIBCXX_EXTERN_TEMPLATE -1 # endif # if __NO_INLINE__ && !__GXX_WEAK__ diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/debug_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/debug_fn_imps.hpp index 200249d..85e5b87 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/debug_fn_imps.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/binomial_heap_base_/debug_fn_imps.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -65,13 +65,15 @@ assert_max() const return; _GLIBCXX_DEBUG_ASSERT(base_type::parent(m_p_max) == NULL); for (const_iterator it = base_type::begin(); it != base_type::end(); ++it) - _GLIBCXX_DEBUG_ASSERT(!Cmp_Fn::operator()(m_p_max->m_value, it.m_p_nd->m_value)); + _GLIBCXX_DEBUG_ASSERT(!Cmp_Fn::operator()(m_p_max->m_value, + it.m_p_nd->m_value)); } PB_DS_CLASS_T_DEC void PB_DS_CLASS_C_DEC:: -assert_node_consistent(const_node_pointer p_nd, bool strictly_binomial, bool increasing) const +assert_node_consistent(const_node_pointer p_nd, bool strictly_binomial, + bool increasing) const { _GLIBCXX_DEBUG_ASSERT(increasing || strictly_binomial); base_type::assert_node_consistent(p_nd, false); @@ -83,15 +85,20 @@ assert_node_consistent(const_node_pointer p_nd, bool strictly_binomial, bool inc assert_node_consistent(p_nd->m_p_next_sibling, strictly_binomial, increasing); assert_node_consistent(p_nd->m_p_l_child, true, false); if (p_nd->m_p_next_sibling != NULL) - if (increasing) - { - if (strictly_binomial) - _GLIBCXX_DEBUG_ASSERT(p_nd->m_metadata < p_nd->m_p_next_sibling->m_metadata); - else - _GLIBCXX_DEBUG_ASSERT(p_nd->m_metadata <= p_nd->m_p_next_sibling->m_metadata); - } - else - _GLIBCXX_DEBUG_ASSERT(p_nd->m_metadata > p_nd->m_p_next_sibling->m_metadata); + { + if (increasing) + { + if (strictly_binomial) + _GLIBCXX_DEBUG_ASSERT(p_nd->m_metadata + < p_nd->m_p_next_sibling->m_metadata); + else + _GLIBCXX_DEBUG_ASSERT(p_nd->m_metadata + <= p_nd->m_p_next_sibling->m_metadata); + } + else + _GLIBCXX_DEBUG_ASSERT(p_nd->m_metadata + > p_nd->m_p_next_sibling->m_metadata); + } } -#endif +#endif diff --git a/libstdc++-v3/include/ext/pb_ds/detail/debug_map_base.hpp b/libstdc++-v3/include/ext/pb_ds/detail/debug_map_base.hpp index 086a50f..5319749 100644 --- a/libstdc++-v3/include/ext/pb_ds/detail/debug_map_base.hpp +++ b/libstdc++-v3/include/ext/pb_ds/detail/debug_map_base.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -52,6 +52,7 @@ #include <list> #include <utility> #include <cstdlib> +#include <iostream> #include <ext/throw_allocator.h> #include <debug/debug.h> |