+2007-03-03 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/28080 (partial)
+ * include/bits/stl_algobase.h: Do not include <iosfwd>,
+ <bits/functexcept.h> is enough; adjust __copy_aux declarations;
+ remove declaration of copy overload for istreambuf_iterator /
+ ostreambuf_iterator.
+ * src/debug.cc: Include <cstdio>.
+ * include/ext/rope: Include <iosfwd>.
+ * include/bits/char_traits.h: Include <cstdio> and <cwchar>.
+ * include/bits/stl_algo.h: Remove declaration of find overload
+ for istreambuf_iterator.
+ * include/std/queue: Clean up includes.
+ * include/std/stack: Likewise.
+ * include/std/memory: Likewise.
+ * include/std/algorithm: Likewise.
+ * include/std/vector: Likewise.
+ * include/std/deque: Likewise.
+ * include/std/list: Likewise.
+ * include/bits/stl_tree.h: Likewise.
+ * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Adjust
+ dg-error markers.
+ * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Likewise.
+ * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Likewise.
+ * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Likewise.
+ * testsuite/23_containers/set/operators/1_neg.cc: Likewise.
+ * testsuite/23_containers/map/operators/1_neg.cc: Likewise.
+ * testsuite/20_util/auto_ptr/assign_neg.cc: Likewise.
+
+ * include/ext/type_traits.h: Fix type of __max_digits10; clean up
+ includes.
+
+ * testsuite/util/testsuite_hooks.h: Do not include <cstddef>.
+ * testsuite/util/testsuite_hooks.cc: Do it here.
+
2007-03-02 Paolo Carlini <pcarlini@suse.de>
* testsuite/27_io/objects/wchar_t/9661-1.cc: Include <cstdlib>.
// Character Traits for use by standard string and iostream -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
#pragma GCC system_header
-#include <cstring> // For memmove, memset, memchr
-#include <bits/stl_algobase.h>// For copy, lexicographical_compare, fill_n
-#include <bits/postypes.h> // For streampos
+#include <cstring> // For memmove, memset, memchr
+#include <bits/stl_algobase.h> // For copy, fill_n
+#include <bits/postypes.h> // For streampos
+#include <cstdio> // For EOF
+#include <cwchar> // For WEOF, wmemmove, wmemset, etc.
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
#define _ALGO_H 1
#include <bits/stl_heap.h>
-#include <bits/stl_tempbuf.h> // for _Temporary_buffer
+#include <bits/stl_tempbuf.h> // for _Temporary_buffer
#include <debug/debug.h>
// See concept_check.h for the __glibcxx_*_requires macros.
}
/**
- * @if maint
- * This is an overload of find() for streambuf iterators.
- * @endif
- */
- template<typename _CharT>
- typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
- istreambuf_iterator<_CharT> >::__type
- find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>,
- const _CharT&);
-
- /**
* @brief Find the first occurrence of a value in a sequence.
* @param first An input iterator.
* @param last An input iterator.
#include <cwchar>
#include <cstdlib>
#include <cstddef>
-#include <iosfwd>
+#include <bits/functexcept.h>
#include <bits/stl_pair.h>
#include <bits/cpp_type_traits.h>
#include <ext/type_traits.h>
}
// Helpers for streambuf iterators (either istream or ostream).
+ // NB: avoid including <iosfwd>, relatively large.
+ template<typename _CharT>
+ struct char_traits;
+
+ template<typename _CharT, typename _Traits>
+ class istreambuf_iterator;
+
+ template<typename _CharT, typename _Traits>
+ class ostreambuf_iterator;
+
template<typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
- ostreambuf_iterator<_CharT> >::__type
- __copy_aux(_CharT*, _CharT*, ostreambuf_iterator<_CharT>);
+ ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type
+ __copy_aux(_CharT*, _CharT*,
+ ostreambuf_iterator<_CharT, char_traits<_CharT> >);
template<typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
- ostreambuf_iterator<_CharT> >::__type
- __copy_aux(const _CharT*, const _CharT*, ostreambuf_iterator<_CharT>);
+ ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type
+ __copy_aux(const _CharT*, const _CharT*,
+ ostreambuf_iterator<_CharT, char_traits<_CharT> >);
template<typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
_CharT*>::__type
- __copy_aux(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>,
- _CharT*);
+ __copy_aux(istreambuf_iterator<_CharT, char_traits<_CharT> >,
+ istreambuf_iterator<_CharT, char_traits<_CharT> >, _CharT*);
template<bool, bool>
struct __copy_normal
__result);
}
- // Overload for streambuf iterators.
- template<typename _CharT>
- typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
- ostreambuf_iterator<_CharT> >::__type
- copy(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>,
- ostreambuf_iterator<_CharT>);
-
template<bool, typename>
struct __copy_backward
{
// RB tree implementation -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
#include <bits/stl_algobase.h>
#include <bits/allocator.h>
-#include <bits/stl_construct.h>
#include <bits/stl_function.h>
#include <bits/cpp_type_traits.h>
// SGI's rope class -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
#include <bits/stl_numeric.h>
#include <bits/allocator.h>
#include <ext/hash_fun.h>
+#include <iosfwd>
# ifdef __GC
# define __GC_CONST const
#pragma GCC system_header
-#include <cstddef>
-#include <utility>
#include <limits>
-#include <iosfwd> // std::streamsize
#include <bits/cpp_type_traits.h>
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
struct __numeric_traits_floating
{
// Only floating point types. See N1822.
- static const std::streamsize __max_digits10 =
+ static const int __max_digits10 =
2 + std::numeric_limits<_Value>::digits * 3010/10000;
};
template<typename _Value>
- const std::streamsize __numeric_traits_floating<_Value>::__max_digits10;
+ const int __numeric_traits_floating<_Value>::__max_digits10;
template<typename _Value>
struct __numeric_traits
// <algorithm> -*- C++ -*-
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// 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
#pragma GCC system_header
#include <bits/stl_algobase.h>
-#include <bits/stl_construct.h>
-#include <bits/stl_uninitialized.h>
#include <bits/stl_algo.h>
#endif /* _GLIBCXX_ALGORITHM */
// <deque> -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// 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
#pragma GCC system_header
-#include <bits/functexcept.h>
#include <bits/stl_algobase.h>
#include <bits/allocator.h>
#include <bits/stl_construct.h>
#pragma GCC system_header
-#include <bits/functexcept.h>
#include <bits/stl_algobase.h>
#include <bits/allocator.h>
-#include <bits/stl_construct.h>
#include <bits/stl_list.h>
#ifndef _GLIBCXX_EXPORT_TEMPLATE
// <memory> -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
#include <bits/stl_algobase.h>
#include <bits/allocator.h>
#include <bits/stl_construct.h>
-#include <bits/stl_iterator_base_types.h> //for iterator_traits
#include <bits/stl_uninitialized.h>
#include <bits/stl_raw_storage_iter.h>
#include <debug/debug.h>
// <queue> -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// 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
#pragma GCC system_header
-#include <bits/c++config.h>
-#include <bits/functexcept.h>
-#include <bits/stl_algobase.h>
-#include <bits/allocator.h>
-#include <bits/stl_construct.h>
-#include <bits/stl_uninitialized.h>
-#include <bits/stl_heap.h>
-#include <bits/stl_function.h>
#include <deque>
#include <vector>
+#include <bits/stl_heap.h>
+#include <bits/stl_function.h>
#include <bits/stl_queue.h>
#endif /* _GLIBCXX_QUEUE */
// <stack> -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// 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
#pragma GCC system_header
-#include <bits/stl_algobase.h>
-#include <bits/allocator.h>
-#include <bits/stl_construct.h>
-#include <bits/stl_uninitialized.h>
#include <deque>
#include <bits/stl_stack.h>
// <vector> -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// 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
#pragma GCC system_header
-#include <bits/functexcept.h>
#include <bits/stl_algobase.h>
#include <bits/allocator.h>
#include <bits/stl_construct.h>
// Debugging mode support code -*- C++ -*-
-// Copyright (C) 2003, 2004, 2005, 2006
+// Copyright (C) 2003, 2004, 2005, 2006, 2007
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
#include <cassert>
#include <cstring>
#include <cctype>
+#include <cstdio>
using namespace std;
// { dg-do compile }
-// Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation
+// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation
//
// 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
test01();
return 0;
}
-// { dg-error "candidates" "" { target *-*-* } 224 }
-// { dg-error "::auto_ptr" "" { target *-*-* } 354 }
+// { dg-error "candidates" "" { target *-*-* } 223 }
+// { dg-error "::auto_ptr" "" { target *-*-* } 353 }
// { dg-do compile }
-// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
test &= itr == mapByName.end(); // { dg-error "no" }
}
-// { dg-error "candidates are" "" { target *-*-* } 211 }
-// { dg-error "candidates are" "" { target *-*-* } 215 }
+// { dg-error "candidates are" "" { target *-*-* } 210 }
+// { dg-error "candidates are" "" { target *-*-* } 214 }
// { dg-do compile }
-// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
test &= itr == setByName.end(); // { dg-error "no" }
}
-// { dg-error "candidates are" "" { target *-*-* } 286 }
-// { dg-error "candidates are" "" { target *-*-* } 290 }
+// { dg-error "candidates are" "" { target *-*-* } 285 }
+// { dg-error "candidates are" "" { target *-*-* } 289 }
// { dg-do compile }
// -*- C++ -*-
-// Copyright (C) 2006 Free Software Foundation, Inc.
+// Copyright (C) 2006, 2007 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
}
// { dg-error "instantiated from" "" { target *-*-* } 29 }
-// { dg-error "no type" "" { target *-*-* } 76 }
+// { dg-error "no type" "" { target *-*-* } 73 }
// { dg-excess-errors "In instantiation of" }
// { dg-do compile }
// -*- C++ -*-
-// Copyright (C) 2006 Free Software Foundation, Inc.
+// Copyright (C) 2006, 2007 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
}
// { dg-error "invalid use of incomplete" "" { target *-*-* } 29 }
-// { dg-error "declaration of" "" { target *-*-* } 71 }
+// { dg-error "declaration of" "" { target *-*-* } 68 }
// { dg-do compile }
// -*- C++ -*-
-// Copyright (C) 2006 Free Software Foundation, Inc.
+// Copyright (C) 2006, 2007 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
}
// { dg-error "instantiated from" "" { target *-*-* } 29 }
-// { dg-error "no type" "" { target *-*-* } 119 }
+// { dg-error "no type" "" { target *-*-* } 116 }
// { dg-excess-errors "In instantiation of" }
// { dg-do compile }
// -*- C++ -*-
-// Copyright (C) 2006 Free Software Foundation, Inc.
+// Copyright (C) 2006, 2007 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
}
// { dg-error "invalid use of incomplete" "" { target *-*-* } 29 }
-// { dg-error "declaration of" "" { target *-*-* } 114 }
+// { dg-error "declaration of" "" { target *-*-* } 111 }
#include <sys/time.h>
#include <sys/resource.h>
#endif
+
#include <list>
#include <string>
#include <stdexcept>
+#include <cstddef>
#include <clocale>
#include <locale>
#include <cxxabi.h>
#include <bits/c++config.h>
#include <bits/functexcept.h>
-#include <cstddef>
#include <ctime>
#ifdef _GLIBCXX_HAVE_SYS_STAT_H