summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2007-12-10 13:53:10 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2007-12-10 13:53:10 +0000
commit810d0cce2bd8f89c695e03cf48baf6c25c25b36d (patch)
treeefaf75a0cf56d1509cf98b8e8e38285285b0cf4b /libstdc++-v3
parent00e7d8a50a40553a2a5ffbc5de4d7d42aadfb719 (diff)
downloadppe42-gcc-810d0cce2bd8f89c695e03cf48baf6c25c25b36d.tar.gz
ppe42-gcc-810d0cce2bd8f89c695e03cf48baf6c25c25b36d.zip
2007-12-10 Paolo Carlini <pcarlini@suse.de>
* testsuite/25_algorithms/nth_element/2.cc: Avoid -Wall warnings. * testsuite/27_io/basic_streambuf/sgetc/wchar_t/1.cc: Likewise. * testsuite/27_io/basic_streambuf/sgetc/char/1.cc: Likewise. * testsuite/27_io/basic_stringbuf/sgetn/wchar_t/1.cc: Likewise. * testsuite/27_io/basic_stringbuf/sgetn/char/1.cc: Likewise. * testsuite/27_io/basic_stringbuf/sbumpc/wchar_t/1.cc: Likewise. * testsuite/27_io/basic_stringbuf/sbumpc/char/1.cc: Likewise. * testsuite/27_io/basic_stringbuf/snextc/wchar_t/1.cc: Likewise. * testsuite/27_io/basic_stringbuf/snextc/char/1.cc: Likewise. * testsuite/27_io/basic_istream/peek/wchar_t/12296.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_character/wchar_t/ 28277-2.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_character/wchar_t/ 28277-3.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_character/wchar_t/ 28277-4.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_character/char/ 28277-3.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_character/char/ 28277-4.cc: Likewise. * testsuite/19_diagnostics/error_code/operators/bool.cc: Likewise. * testsuite/19_diagnostics/error_code/operators/bool_neg.cc: Likewise. * testsuite/18_support/headers/cstddef/macros.cc: Likewise. * testsuite/21_strings/basic_string/inserters_extractors/ wchar_t/28277.cc: Likewise. * testsuite/21_strings/basic_string/inserters_extractors/ char/28277.cc: Likewise. * testsuite/26_numerics/headers/cmath/25913.cc: Likewise. * testsuite/ext/pb_ds/example/priority_queue_xref.cc: Likewise. * testsuite/ext/vstring/inserters_extractors/wchar_t/28277.cc: Likewise. * testsuite/ext/vstring/inserters_extractors/char/28277.cc: Likewise. * testsuite/ext/enc_filebuf/char/13598.cc: Likewise. * testsuite/22_locale/collate/compare/char/2.cc: Likewise. * testsuite/22_locale/time_put/put/wchar_t/5.cc: Likewise. * testsuite/22_locale/time_put/put/char/5.cc: Likewise. * testsuite/22_locale/time_put/put/char/6.cc: Likewise. * testsuite/22_locale/time_put/put/char/7.cc: Likewise. * testsuite/22_locale/time_put/put/char/8.cc: Likewise. * testsuite/22_locale/codecvt/unshift/char/1.cc: Likewise. * testsuite/22_locale/codecvt/length/char/1.cc: Likewise. * testsuite/22_locale/codecvt/length/char/2.cc: Likewise. * testsuite/22_locale/codecvt/in/wchar_t/9.cc: Likewise. * testsuite/22_locale/codecvt/in/char/1.cc: Likewise. * testsuite/22_locale/codecvt/out/char/1.cc: Likewise. * testsuite/22_locale/num_get/get/wchar_t/1.cc: Likewise. * testsuite/22_locale/num_get/get/char/1.cc: Likewise. * testsuite/tr1/5_numerical_facilities/random/uniform_int/ 33128.cc: Likewise. * testsuite/tr1/2_general_utilities/shared_ptr/thread/ mutex_weaktoshared.cc: Likewise. * testsuite/tr1/2_general_utilities/shared_ptr/thread/ default_weaktoshared.cc: Likewise. * testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/ range.cc: Likewise. * testsuite/tr1/7_regular_expressions/basic_regex/assign/char/ range.cc: Likewise. * testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/ range.cc: Likewise. * testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/ range.cc: Likewise. * testsuite/23_containers/multimap/operations/1.cc: Likewise. * testsuite/23_containers/set/operations/1.cc: Likewise. * testsuite/23_containers/vector/bool/capacity/29134.cc: Likewise. * testsuite/23_containers/deque/modifiers/erase/1.cc: Likewise. * testsuite/23_containers/deque/modifiers/erase/2.cc: Likewise. * testsuite/23_containers/multiset/operations/1.cc: Likewise. * testsuite/23_containers/map/operations/1.cc: Likewise. * testsuite/util/testsuite_hooks.cc: Likewise. * testsuite/util/testsuite_rvalref.h: Likewise. 2007-12-10 Jakub Jelinek <jakub@redhat.com> * include/ext/throw_allocator.h (print_to_string): Change sprintf format to %lu and cast ref.second.{first,second} to long. * include/debug/safe_iterator.tcc (_M_can_advance): Add parens to avoid warnings. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130743 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog79
-rw-r--r--libstdc++-v3/include/debug/safe_iterator.tcc10
-rw-r--r--libstdc++-v3/include/ext/throw_allocator.h8
-rw-r--r--libstdc++-v3/testsuite/18_support/headers/cstddef/macros.cc5
-rw-r--r--libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool.cc1
-rw-r--r--libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/20_util/raw_storage_iterator/requirements/typedefs.cc4
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/28277.cc4
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/28277.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/in/char/1.cc2
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/9.cc3
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/length/char/1.cc2
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/length/char/2.cc2
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/out/char/1.cc2
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/1.cc2
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc7
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc1
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc1
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc8
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc8
-rw-r--r--libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/1.cc26
-rw-r--r--libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/2.cc18
-rw-r--r--libstdc++-v3/testsuite/23_containers/map/operations/1.cc3
-rw-r--r--libstdc++-v3/testsuite/23_containers/multimap/operations/1.cc3
-rw-r--r--libstdc++-v3/testsuite/23_containers/multiset/operations/1.cc3
-rw-r--r--libstdc++-v3/testsuite/23_containers/set/operations/1.cc3
-rw-r--r--libstdc++-v3/testsuite/23_containers/vector/bool/capacity/29134.cc4
-rw-r--r--libstdc++-v3/testsuite/25_algorithms/nth_element/2.cc20
-rw-r--r--libstdc++-v3/testsuite/26_numerics/headers/cmath/25913.cc2
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_istream/peek/wchar_t/12296.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/28277-3.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/28277-4.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-2.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-3.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-4.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/char/1.cc6
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/wchar_t/1.cc6
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/char/1.cc7
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/wchar_t/1.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/char/1.cc7
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/wchar_t/1.cc7
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/char/1.cc7
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/wchar_t/1.cc7
-rw-r--r--libstdc++-v3/testsuite/ext/enc_filebuf/char/13598.cc7
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_xref.cc4
-rw-r--r--libstdc++-v3/testsuite/ext/vstring/inserters_extractors/char/28277.cc2
-rw-r--r--libstdc++-v3/testsuite/ext/vstring/inserters_extractors/wchar_t/28277.cc2
-rw-r--r--libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/default_weaktoshared.cc2
-rw-r--r--libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/mutex_weaktoshared.cc2
-rw-r--r--libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/uniform_int/33128.cc2
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/range.cc2
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/range.cc2
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/range.cc2
-rw-r--r--libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/range.cc2
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_hooks.cc2
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_rvalref.h3
59 files changed, 231 insertions, 133 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 730cf4f1aa5..ae85dcef2a5 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,82 @@
+2007-12-10 Paolo Carlini <pcarlini@suse.de>
+
+ * testsuite/25_algorithms/nth_element/2.cc: Avoid -Wall warnings.
+ * testsuite/27_io/basic_streambuf/sgetc/wchar_t/1.cc: Likewise.
+ * testsuite/27_io/basic_streambuf/sgetc/char/1.cc: Likewise.
+ * testsuite/27_io/basic_stringbuf/sgetn/wchar_t/1.cc: Likewise.
+ * testsuite/27_io/basic_stringbuf/sgetn/char/1.cc: Likewise.
+ * testsuite/27_io/basic_stringbuf/sbumpc/wchar_t/1.cc: Likewise.
+ * testsuite/27_io/basic_stringbuf/sbumpc/char/1.cc: Likewise.
+ * testsuite/27_io/basic_stringbuf/snextc/wchar_t/1.cc: Likewise.
+ * testsuite/27_io/basic_stringbuf/snextc/char/1.cc: Likewise.
+ * testsuite/27_io/basic_istream/peek/wchar_t/12296.cc: Likewise.
+ * testsuite/27_io/basic_ostream/inserters_character/wchar_t/
+ 28277-2.cc: Likewise.
+ * testsuite/27_io/basic_ostream/inserters_character/wchar_t/
+ 28277-3.cc: Likewise.
+ * testsuite/27_io/basic_ostream/inserters_character/wchar_t/
+ 28277-4.cc: Likewise.
+ * testsuite/27_io/basic_ostream/inserters_character/char/
+ 28277-3.cc: Likewise.
+ * testsuite/27_io/basic_ostream/inserters_character/char/
+ 28277-4.cc: Likewise.
+ * testsuite/19_diagnostics/error_code/operators/bool.cc: Likewise.
+ * testsuite/19_diagnostics/error_code/operators/bool_neg.cc: Likewise.
+ * testsuite/18_support/headers/cstddef/macros.cc: Likewise.
+ * testsuite/21_strings/basic_string/inserters_extractors/
+ wchar_t/28277.cc: Likewise.
+ * testsuite/21_strings/basic_string/inserters_extractors/
+ char/28277.cc: Likewise.
+ * testsuite/26_numerics/headers/cmath/25913.cc: Likewise.
+ * testsuite/ext/pb_ds/example/priority_queue_xref.cc: Likewise.
+ * testsuite/ext/vstring/inserters_extractors/wchar_t/28277.cc: Likewise.
+ * testsuite/ext/vstring/inserters_extractors/char/28277.cc: Likewise.
+ * testsuite/ext/enc_filebuf/char/13598.cc: Likewise.
+ * testsuite/22_locale/collate/compare/char/2.cc: Likewise.
+ * testsuite/22_locale/time_put/put/wchar_t/5.cc: Likewise.
+ * testsuite/22_locale/time_put/put/char/5.cc: Likewise.
+ * testsuite/22_locale/time_put/put/char/6.cc: Likewise.
+ * testsuite/22_locale/time_put/put/char/7.cc: Likewise.
+ * testsuite/22_locale/time_put/put/char/8.cc: Likewise.
+ * testsuite/22_locale/codecvt/unshift/char/1.cc: Likewise.
+ * testsuite/22_locale/codecvt/length/char/1.cc: Likewise.
+ * testsuite/22_locale/codecvt/length/char/2.cc: Likewise.
+ * testsuite/22_locale/codecvt/in/wchar_t/9.cc: Likewise.
+ * testsuite/22_locale/codecvt/in/char/1.cc: Likewise.
+ * testsuite/22_locale/codecvt/out/char/1.cc: Likewise.
+ * testsuite/22_locale/num_get/get/wchar_t/1.cc: Likewise.
+ * testsuite/22_locale/num_get/get/char/1.cc: Likewise.
+ * testsuite/tr1/5_numerical_facilities/random/uniform_int/
+ 33128.cc: Likewise.
+ * testsuite/tr1/2_general_utilities/shared_ptr/thread/
+ mutex_weaktoshared.cc: Likewise.
+ * testsuite/tr1/2_general_utilities/shared_ptr/thread/
+ default_weaktoshared.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/
+ range.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/basic_regex/assign/char/
+ range.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/
+ range.cc: Likewise.
+ * testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/
+ range.cc: Likewise.
+ * testsuite/23_containers/multimap/operations/1.cc: Likewise.
+ * testsuite/23_containers/set/operations/1.cc: Likewise.
+ * testsuite/23_containers/vector/bool/capacity/29134.cc: Likewise.
+ * testsuite/23_containers/deque/modifiers/erase/1.cc: Likewise.
+ * testsuite/23_containers/deque/modifiers/erase/2.cc: Likewise.
+ * testsuite/23_containers/multiset/operations/1.cc: Likewise.
+ * testsuite/23_containers/map/operations/1.cc: Likewise.
+ * testsuite/util/testsuite_hooks.cc: Likewise.
+ * testsuite/util/testsuite_rvalref.h: Likewise.
+
+2007-12-10 Jakub Jelinek <jakub@redhat.com>
+
+ * include/ext/throw_allocator.h (print_to_string): Change sprintf
+ format to %lu and cast ref.second.{first,second} to long.
+ * include/debug/safe_iterator.tcc (_M_can_advance): Add parens to
+ avoid warnings.
+
2007-12-09 Benjamin Kosnik <bkoz@redhat.com>
* docs/html/ext/howto.html: Update.
diff --git a/libstdc++-v3/include/debug/safe_iterator.tcc b/libstdc++-v3/include/debug/safe_iterator.tcc
index d23e90f048a..a4cce068e96 100644
--- a/libstdc++-v3/include/debug/safe_iterator.tcc
+++ b/libstdc++-v3/include/debug/safe_iterator.tcc
@@ -1,6 +1,6 @@
// Debugging iterator implementation (out of line) -*- 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
@@ -54,8 +54,8 @@ namespace __gnu_debug
static_cast<const _Sequence*>(_M_sequence)->begin();
std::pair<difference_type, _Distance_precision> __dist =
this->_M_get_distance(__begin, *this);
- bool __ok = (__dist.second == __dp_exact && __dist.first >= -__n
- || __dist.second != __dp_exact && __dist.first > 0);
+ bool __ok = ((__dist.second == __dp_exact && __dist.first >= -__n)
+ || (__dist.second != __dp_exact && __dist.first > 0));
return __ok;
}
else
@@ -64,8 +64,8 @@ namespace __gnu_debug
static_cast<const _Sequence*>(_M_sequence)->end();
std::pair<difference_type, _Distance_precision> __dist =
this->_M_get_distance(*this, __end);
- bool __ok = (__dist.second == __dp_exact && __dist.first >= __n
- || __dist.second != __dp_exact && __dist.first > 0);
+ bool __ok = ((__dist.second == __dp_exact && __dist.first >= __n)
+ || (__dist.second != __dp_exact && __dist.first > 0));
return __ok;
}
}
diff --git a/libstdc++-v3/include/ext/throw_allocator.h b/libstdc++-v3/include/ext/throw_allocator.h
index f6d0b29428e..04204cb55fc 100644
--- a/libstdc++-v3/include/ext/throw_allocator.h
+++ b/libstdc++-v3/include/ext/throw_allocator.h
@@ -430,15 +430,17 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
char buf[40];
const char tab('\t');
s += "address: ";
- sprintf(buf, "%p", ref.first);
+ __builtin_sprintf(buf, "%p", ref.first);
s += buf;
s += tab;
s += "label: ";
- sprintf(buf, "%u", ref.second.first);
+ unsigned long l = static_cast<unsigned long>(ref.second.first);
+ __builtin_sprintf(buf, "%lu", l);
s += buf;
s += tab;
s += "size: ";
- sprintf(buf, "%u", ref.second.second);
+ l = static_cast<unsigned long>(ref.second.second);
+ __builtin_sprintf(buf, "%lu", l);
s += buf;
s += '\n';
}
diff --git a/libstdc++-v3/testsuite/18_support/headers/cstddef/macros.cc b/libstdc++-v3/testsuite/18_support/headers/cstddef/macros.cc
index 4751d161e8e..6cad8c00ffd 100644
--- a/libstdc++-v3/testsuite/18_support/headers/cstddef/macros.cc
+++ b/libstdc++-v3/testsuite/18_support/headers/cstddef/macros.cc
@@ -1,7 +1,8 @@
// { dg-do compile }
// 2001-02-06 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2001, 2003, 2007 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
@@ -42,7 +43,7 @@ namespace gnu
void test02()
{
// Must not be (void*)0
- const int j = NULL;
+ const int j __attribute__((unused)) = NULL;
#ifndef NULL
#error "NULL_must_be_a_macro"
diff --git a/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool.cc b/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool.cc
index f4cd48cc6bd..30b83d1da69 100644
--- a/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool.cc
+++ b/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool.cc
@@ -26,7 +26,6 @@
int main()
{
bool test __attribute__((unused)) = true;
- bool b;
// 1
std::error_code e1;
diff --git a/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool_neg.cc b/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool_neg.cc
index 3bf89ba7357..6af9d13a61d 100644
--- a/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool_neg.cc
+++ b/libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool_neg.cc
@@ -28,7 +28,7 @@ int main()
std::error_code e;
int i = e;
- return 0;
+ return i;
}
// { dg-error "invalid conversion" "" { target *-*-* } 29 }
diff --git a/libstdc++-v3/testsuite/20_util/raw_storage_iterator/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/raw_storage_iterator/requirements/typedefs.cc
index 4a51c4c6fd3..56019a7494b 100644
--- a/libstdc++-v3/testsuite/20_util/raw_storage_iterator/requirements/typedefs.cc
+++ b/libstdc++-v3/testsuite/20_util/raw_storage_iterator/requirements/typedefs.cc
@@ -1,7 +1,8 @@
// { dg-do compile }
// 2001-06-18 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2001, 2003, 2007 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
@@ -28,7 +29,6 @@ void test01()
using namespace std;
// Check for required typedefs
- long l;
typedef raw_storage_iterator<long*, long> test_iterator;
typedef test_iterator::value_type value_type;
typedef test_iterator::difference_type difference_type;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/28277.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/28277.cc
index f67582c5f26..5f60c2ff627 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/28277.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/28277.cc
@@ -1,6 +1,6 @@
// 2006-10-12 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2006 Free Software Foundation
+// Copyright (C) 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
@@ -39,7 +39,7 @@ void test01()
oss_01 << str_01;
VERIFY( oss_01.good() );
- VERIFY( oss_01.str().size() == width );
+ VERIFY( oss_01.str().size() == string::size_type(width) );
}
int main()
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/28277.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/28277.cc
index ff6228f1240..653f4de36db 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/28277.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/28277.cc
@@ -1,6 +1,6 @@
// 2006-10-12 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2006 Free Software Foundation
+// Copyright (C) 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
@@ -39,7 +39,7 @@ void test01()
oss_01 << str_01;
VERIFY( oss_01.good() );
- VERIFY( oss_01.str().size() == width );
+ VERIFY( oss_01.str().size() == wstring::size_type(width) );
}
int main()
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/char/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/char/1.cc
index a784ee044a2..43bf0283d64 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/in/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/char/1.cc
@@ -36,7 +36,7 @@ void test01()
bool test __attribute__((unused)) = true;
const char* c_lit = "black pearl jasmine tea";
const char* from_next;
- int size = 25;
+ int size = 23;
char* c_arr = new char[size];
char* c_ref = new char[size];
char* to_next;
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/9.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/9.cc
index f1f06f594f1..01935eabd97 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/9.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/9.cc
@@ -128,9 +128,6 @@ void test09()
r1 = cvt->in(state01, efrom, e_lit + i, efrom_next,
ito, i_arr + esize, ito_next);
- printf("%d %d %d %x %x\n", efrom - e_lit, i, efrom_next - e_lit,
- efrom[-1], ito[-1]);
-
// It it not clear if partial should ever be returned here
// (see DR 382).
VERIFY( r1 == codecvt_base::ok || r1 == codecvt_base::partial );
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/char/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/char/1.cc
index 55d2536fd14..76c293f11a5 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/length/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/char/1.cc
@@ -33,7 +33,7 @@ void test01()
bool test __attribute__((unused)) = true;
const char* c_lit = "black pearl jasmine tea";
- int size = 25;
+ int size = 23;
locale loc = locale::classic();
c_codecvt::state_type state;
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/char/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/char/2.cc
index 16e81b3b8b9..0642e31da3e 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/length/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/char/2.cc
@@ -51,7 +51,7 @@ void test02()
bool test __attribute__((unused)) = true;
const char* c_lit = "black pearl jasmine tea";
- int size = 25;
+ int size = 23;
locale loc (locale::classic(), new length_codecvt);
c_codecvt::state_type state;
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/char/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/char/1.cc
index efef386bbba..7581e2a123b 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/out/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/char/1.cc
@@ -36,7 +36,7 @@ void test01()
bool test __attribute__((unused)) = true;
const char* c_lit = "black pearl jasmine tea";
const char* from_next;
- int size = 25;
+ int size = 23;
char* c_arr = new char[size];
char* c_ref = new char[size];
char* to_next;
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/1.cc
index cb3ec744e56..c6ecb25c383 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/1.cc
@@ -36,7 +36,7 @@ void test01()
bool test __attribute__((unused)) = true;
const char* c_lit = "black pearl jasmine tea";
const char* from_next;
- int size = 25;
+ int size = 23;
char* c_arr = new char[size];
char* c_ref = new char[size];
char* to_next;
diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc
index 94064ecc993..53354292ed6 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc
@@ -2,7 +2,8 @@
// 2001-08-15 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation
+// Copyright (C) 2001, 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
@@ -48,19 +49,17 @@ void test02()
// int compare(const charT*, const charT*, const charT*, const charT*) const
- const char* strlit1 = "monkey picked tikuanyin oolong";
const char* strlit3 = "Äuglein Augment"; // "C" == "Augment Äuglein"
const char* strlit4 = "Base baß Baß Bast"; // "C" == "Base baß Baß Bast"
int i1;
int i2;
- int size1 = char_traits<char>::length(strlit1) - 1;
int size3 = char_traits<char>::length(strlit3) - 1;
int size4 = char_traits<char>::length(strlit4) - 1;
i1 = coll_de.compare(strlit3, strlit3 + size3, strlit3, strlit3 + 7);
VERIFY ( i1 == 1 );
- i1 = coll_de.compare(strlit3, strlit3 + 7, strlit3, strlit3 + size1);
+ i1 = coll_de.compare(strlit3, strlit3 + 7, strlit3, strlit3 + size3);
VERIFY ( i1 == -1 );
i1 = coll_de.compare(strlit3, strlit3 + 7, strlit3, strlit3 + 7);
VERIFY ( i1 == 0 );
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc
index 266388fcc2d..1aff586a125 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc
@@ -45,7 +45,6 @@ void test01()
bool b1 = true;
bool b0 = false;
unsigned long ul1 = 1294967294;
- unsigned long ul2 = 0;
unsigned long ul;
double d1 = 1.02345e+308;
double d2 = 3.15e-308;
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc
index 60457f70793..a6268e2719f 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc
@@ -45,7 +45,6 @@ void test01()
bool b1 = true;
bool b0 = false;
unsigned long ul1 = 1294967294;
- unsigned long ul2 = 0;
unsigned long ul;
double d1 = 1.02345e+308;
double d2 = 3.15e-308;
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc
index e7a93f07df6..cf38a79902e 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc
@@ -1,6 +1,7 @@
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
+// Copyright (C) 2001, 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
@@ -52,8 +53,9 @@ void test05()
date, date + traits::length(date));
string result5 = oss.str();
VERIFY( result5 == "Sunday, the second of April");
- iterator_type os_it06 = tim_put.put(oss.rdbuf(), oss, '*', &time1,
- date_ex, date_ex + traits::length(date));
+ iterator_type os_it06 = tim_put.put(oss.rdbuf(), oss, '*', &time1,
+ date_ex,
+ date_ex + traits::length(date_ex));
string result6 = oss.str();
VERIFY( result6 != result5 );
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc
index 0bb9a2d28db..8ef33f536c6 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc
@@ -2,7 +2,8 @@
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
+// Copyright (C) 2001, 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
@@ -55,7 +56,8 @@ void test06()
string result7 = oss.str();
VERIFY( result7 == "Sonntag, the second of April");
iterator_type os_it08 = tim_put.put(oss.rdbuf(), oss, '*', &time1,
- date_ex, date_ex + traits::length(date));
+ date_ex,
+ date_ex + traits::length(date_ex));
string result8 = oss.str();
VERIFY( result8 != result7 );
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc
index 7753fe947bc..f17c6b94ce7 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc
@@ -2,7 +2,8 @@
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
+// Copyright (C) 2001, 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
@@ -55,7 +56,8 @@ void test07()
string result9 = oss.str();
VERIFY( result9 == "Sunday, the second of April");
iterator_type os_it10 = tim_put.put(oss.rdbuf(), oss, '*', &time1,
- date_ex, date_ex + traits::length(date));
+ date_ex,
+ date_ex + traits::length(date_ex));
string result10 = oss.str();
VERIFY( result10 != result9 );
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc
index 3a1d9914277..2da9be0b146 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc
@@ -2,7 +2,8 @@
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
+// Copyright (C) 2001, 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
@@ -54,7 +55,8 @@ void test08()
string result11 = oss.str();
VERIFY( result11 == "dimanche, the second of avril");
iterator_type os_it12 = tim_put.put(oss.rdbuf(), oss, '*', &time1,
- date_ex, date_ex + traits::length(date));
+ date_ex,
+ date_ex + traits::length(date_ex));
string result12 = oss.str();
VERIFY( result12 != result11 );
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc
index aaf3e391e8d..d635968c162 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc
@@ -1,6 +1,7 @@
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
+// Copyright (C) 2001, 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
@@ -54,8 +55,9 @@ void test05()
date, date + traits::length(date));
wstring result5 = oss.str();
VERIFY( result5 == L"Sunday, the second of April");
- iterator_type os_it06 = tim_put.put(oss.rdbuf(), oss, L'*', &time1,
- date_ex, date_ex + traits::length(date));
+ iterator_type os_it06 = tim_put.put(oss.rdbuf(), oss, L'*', &time1,
+ date_ex,
+ date_ex + traits::length(date_ex));
wstring result6 = oss.str();
VERIFY( result6 != result5 );
}
diff --git a/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/1.cc b/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/1.cc
index 167f1f2a12b..5fe41db88de 100644
--- a/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/1.cc
@@ -1,6 +1,6 @@
// 2005-11-25 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2005 Free Software Foundation, Inc.
+// Copyright (C) 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
@@ -29,12 +29,12 @@ const int A2[] = {0, 2, 3, 4, 10, 11, 12, 13, 14, 15};
const int A3[] = {0, 2, 3, 4, 10, 11};
const int A4[] = {4, 10, 11};
const int A5[] = {4, 10};
-const int N = sizeof(A) / sizeof(int);
-const int N1 = sizeof(A1) / sizeof(int);
-const int N2 = sizeof(A2) / sizeof(int);
-const int N3 = sizeof(A3) / sizeof(int);
-const int N4 = sizeof(A4) / sizeof(int);
-const int N5 = sizeof(A5) / sizeof(int);
+const unsigned N = sizeof(A) / sizeof(int);
+const unsigned N1 = sizeof(A1) / sizeof(int);
+const unsigned N2 = sizeof(A2) / sizeof(int);
+const unsigned N3 = sizeof(A3) / sizeof(int);
+const unsigned N4 = sizeof(A4) / sizeof(int);
+const unsigned N5 = sizeof(A5) / sizeof(int);
void
test01()
@@ -85,17 +85,17 @@ test02()
typedef deque_type::iterator iterator_type;
deque_type v, v1, v2, v3, v4, v5;
- for (int i = 0; i < N; ++i)
+ for (unsigned i = 0; i < N; ++i)
v.push_back(std::deque<int>(1, A[i]));
- for (int i = 0; i < N1; ++i)
+ for (unsigned i = 0; i < N1; ++i)
v1.push_back(std::deque<int>(1, A1[i]));
- for (int i = 0; i < N2; ++i)
+ for (unsigned i = 0; i < N2; ++i)
v2.push_back(std::deque<int>(1, A2[i]));
- for (int i = 0; i < N3; ++i)
+ for (unsigned i = 0; i < N3; ++i)
v3.push_back(std::deque<int>(1, A3[i]));
- for (int i = 0; i < N4; ++i)
+ for (unsigned i = 0; i < N4; ++i)
v4.push_back(std::deque<int>(1, A4[i]));
- for (int i = 0; i < N5; ++i)
+ for (unsigned i = 0; i < N5; ++i)
v5.push_back(std::deque<int>(1, A5[i]));
iterator_type it1 = v.erase(v.begin() + 1);
diff --git a/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/2.cc b/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/2.cc
index 19542d3999e..93ced1b9064 100644
--- a/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/2.cc
+++ b/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/2.cc
@@ -1,6 +1,6 @@
// 2005-11-25 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2005 Free Software Foundation, Inc.
+// Copyright (C) 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
@@ -32,14 +32,14 @@ const int A3[] = {-5, 0, 1, 2, 8, 9, 10, 11};
const int A4[] = {2, 8, 9, 10, 11};
const int A5[] = {2, 8, 10, 11};
const int A6[] = {2, 8, 10};
-const int N = sizeof(A) / sizeof(int);
-const int N0 = sizeof(A0) / sizeof(int);
-const int N1 = sizeof(A1) / sizeof(int);
-const int N2 = sizeof(A2) / sizeof(int);
-const int N3 = sizeof(A3) / sizeof(int);
-const int N4 = sizeof(A4) / sizeof(int);
-const int N5 = sizeof(A5) / sizeof(int);
-const int N6 = sizeof(A6) / sizeof(int);
+const unsigned N = sizeof(A) / sizeof(int);
+const unsigned N0 = sizeof(A0) / sizeof(int);
+const unsigned N1 = sizeof(A1) / sizeof(int);
+const unsigned N2 = sizeof(A2) / sizeof(int);
+const unsigned N3 = sizeof(A3) / sizeof(int);
+const unsigned N4 = sizeof(A4) / sizeof(int);
+const unsigned N5 = sizeof(A5) / sizeof(int);
+const unsigned N6 = sizeof(A6) / sizeof(int);
template<int Size>
class My_class
diff --git a/libstdc++-v3/testsuite/23_containers/map/operations/1.cc b/libstdc++-v3/testsuite/23_containers/map/operations/1.cc
index 8f27ab4c06e..35355380461 100644
--- a/libstdc++-v3/testsuite/23_containers/map/operations/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/map/operations/1.cc
@@ -1,6 +1,6 @@
// 2006-11-25 Paolo Carlini <pcarlini@suse.de>
-// 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
@@ -128,6 +128,7 @@ void test01()
VERIFY( pp0.second == irt1.first );
}
+int
main()
{
test01();
diff --git a/libstdc++-v3/testsuite/23_containers/multimap/operations/1.cc b/libstdc++-v3/testsuite/23_containers/multimap/operations/1.cc
index 8ee2f2847d1..b781ca2f947 100644
--- a/libstdc++-v3/testsuite/23_containers/multimap/operations/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/multimap/operations/1.cc
@@ -1,6 +1,6 @@
// 2006-11-25 Paolo Carlini <pcarlini@suse.de>
-// 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
@@ -127,6 +127,7 @@ void test01()
VERIFY( pp0.second == iter1 );
}
+int
main()
{
test01();
diff --git a/libstdc++-v3/testsuite/23_containers/multiset/operations/1.cc b/libstdc++-v3/testsuite/23_containers/multiset/operations/1.cc
index ffa386cfeb5..a37a0a1a637 100644
--- a/libstdc++-v3/testsuite/23_containers/multiset/operations/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/multiset/operations/1.cc
@@ -1,6 +1,6 @@
// 2006-11-25 Paolo Carlini <pcarlini@suse.de>
-// 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
@@ -126,6 +126,7 @@ void test01()
VERIFY( pp0.second == iter1 );
}
+int
main()
{
test01();
diff --git a/libstdc++-v3/testsuite/23_containers/set/operations/1.cc b/libstdc++-v3/testsuite/23_containers/set/operations/1.cc
index fcc311381a1..b0e6dc507e0 100644
--- a/libstdc++-v3/testsuite/23_containers/set/operations/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/set/operations/1.cc
@@ -1,6 +1,6 @@
// 2006-11-25 Paolo Carlini <pcarlini@suse.de>
-// 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
@@ -127,6 +127,7 @@ void test01()
VERIFY( pp0.second == irt1.first );
}
+int
main()
{
test01();
diff --git a/libstdc++-v3/testsuite/23_containers/vector/bool/capacity/29134.cc b/libstdc++-v3/testsuite/23_containers/vector/bool/capacity/29134.cc
index 3724768d4a6..6d71b23ff30 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/bool/capacity/29134.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/bool/capacity/29134.cc
@@ -39,8 +39,10 @@ void test01()
// Actually, vector<bool> is special, see libstdc++/31370.
vector<bool> vb;
typedef vector<bool>::difference_type difference_type;
+ typedef vector<bool>::size_type size_type;
VERIFY( vb.max_size()
- == (numeric_limits<difference_type>::max() - int(_S_word_bit) + 1) );
+ == size_type(numeric_limits<difference_type>::max()
+ - int(_S_word_bit) + 1) );
}
int main()
diff --git a/libstdc++-v3/testsuite/25_algorithms/nth_element/2.cc b/libstdc++-v3/testsuite/25_algorithms/nth_element/2.cc
index ed8635033b8..84f959ae9a2 100644
--- a/libstdc++-v3/testsuite/25_algorithms/nth_element/2.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/nth_element/2.cc
@@ -1,4 +1,4 @@
-// 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
@@ -23,27 +23,27 @@
#include <testsuite_hooks.h>
void
-test_set(std::vector<int>& v, int size)
+test_set(std::vector<unsigned>& v, unsigned size)
{
v.clear();
- for (int i = 0; i < size; i += 4)
+ for (unsigned i = 0; i < size; i += 4)
{
v.push_back(i / 2);
v.push_back((size - 2) - (i / 2));
}
- for (int i = 1; i < size; i += 2)
+ for (unsigned i = 1; i < size; i += 2)
v.push_back(i);
}
void
-do_test01(int size)
+do_test01(unsigned size)
{
bool test __attribute__((unused)) = true;
- std::vector<int> v, s;
+ std::vector<unsigned> v, s;
- for (int j = 0; j < size; ++j)
+ for (unsigned j = 0; j < size; ++j)
{
test_set(v, size);
s = v;
@@ -53,10 +53,10 @@ do_test01(int size)
VERIFY( v[j] == s[j] );
- for (int i = 0; i < j; ++i)
+ for (unsigned i = 0; i < j; ++i)
VERIFY( !(v[j] < v[i]) );
- for (int i = j; i < v.size(); ++i)
+ for (unsigned i = j; i < v.size(); ++i)
VERIFY( !(v[i] < v[j]) );
}
}
@@ -64,7 +64,7 @@ do_test01(int size)
void
test01()
{
- for (int size = 4; size <= 1 << 10; size <<= 1)
+ for (unsigned size = 4; size <= 1 << 10; size <<= 1)
do_test01(size);
}
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/25913.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/25913.cc
index c0abab33859..c034f3a151f 100644
--- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/25913.cc
+++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/25913.cc
@@ -43,5 +43,5 @@ bool isnormal(const employee&)
void test01()
{
manager m;
- bool b = isnormal(m);
+ isnormal(m);
}
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/peek/wchar_t/12296.cc b/libstdc++-v3/testsuite/27_io/basic_istream/peek/wchar_t/12296.cc
index d4dd4f117d7..4f3c1b15758 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/peek/wchar_t/12296.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/peek/wchar_t/12296.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2004 Free Software Foundation
+// Copyright (C) 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
@@ -30,7 +30,7 @@ void test01()
wistringstream stream;
VERIFY( stream.rdstate() == ios_base::goodbit );
wistringstream::int_type c = stream.peek();
- VERIFY( c == istringstream::traits_type::eof() );
+ VERIFY( c == wistringstream::traits_type::eof() );
VERIFY( stream.rdstate() == ios_base::eofbit );
}
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/28277-3.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/28277-3.cc
index f79fb064ccc..9c68320bf17 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/28277-3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/28277-3.cc
@@ -1,6 +1,6 @@
// 2006-10-12 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2006 Free Software Foundation
+// Copyright (C) 2006, 2006 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
@@ -38,7 +38,7 @@ void test01()
oss_01 << 'a';
VERIFY( oss_01.good() );
- VERIFY( oss_01.str().size() == width );
+ VERIFY( oss_01.str().size() == string::size_type(width) );
}
int main()
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/28277-4.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/28277-4.cc
index cc02979cb5e..3ef1f8c4362 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/28277-4.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/28277-4.cc
@@ -1,6 +1,6 @@
// 2006-10-12 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2006 Free Software Foundation
+// Copyright (C) 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
@@ -39,7 +39,7 @@ void test01()
oss_01 << str_01.c_str();
VERIFY( oss_01.good() );
- VERIFY( oss_01.str().size() == width );
+ VERIFY( oss_01.str().size() == string::size_type(width) );
}
int main()
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-2.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-2.cc
index 736c8a8ae94..6213ad1f4be 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-2.cc
@@ -1,6 +1,6 @@
// 2006-10-12 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2006 Free Software Foundation
+// Copyright (C) 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
@@ -39,7 +39,7 @@ void test01()
oss_01 << str_01.c_str();
VERIFY( oss_01.good() );
- VERIFY( oss_01.str().size() == width );
+ VERIFY( oss_01.str().size() == wstring::size_type(width) );
}
int main()
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-3.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-3.cc
index ae13c5267e3..dc5ffe5dff2 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-3.cc
@@ -1,6 +1,6 @@
// 2006-10-12 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2006 Free Software Foundation
+// Copyright (C) 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
@@ -38,7 +38,7 @@ void test01()
oss_01 << L'a';
VERIFY( oss_01.good() );
- VERIFY( oss_01.str().size() == width );
+ VERIFY( oss_01.str().size() == wstring::size_type(width) );
}
int main()
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-4.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-4.cc
index 1a13e04fc40..e80242cf0a7 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-4.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-4.cc
@@ -1,6 +1,6 @@
// 2006-10-12 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2006 Free Software Foundation
+// Copyright (C) 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
@@ -39,7 +39,7 @@ void test01()
oss_01 << str_01.c_str();
VERIFY( oss_01.good() );
- VERIFY( oss_01.str().size() == width );
+ VERIFY( oss_01.str().size() == wstring::size_type(width) );
}
int main()
diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/char/1.cc
index ca3f919a823..83989ff400f 100644
--- a/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/char/1.cc
@@ -106,11 +106,11 @@ void test01()
buf01.pub_setg(lit01, lit01, (lit01 + i01));
VERIFY( i01 == buf01.in_avail() );
- VERIFY( buf01.pub_uflow() == lit01[0] );
+ VERIFY( buf01.pub_uflow() == traits_type::to_int_type(lit01[0]) );
VERIFY( buf01.sgetc() == traits_type::to_int_type(lit01[1]) );
- VERIFY( buf01.pub_uflow() == lit01[1] );
+ VERIFY( buf01.pub_uflow() == traits_type::to_int_type(lit01[1]) );
VERIFY( buf01.sgetc() == traits_type::to_int_type(lit01[2]) );
- VERIFY( buf01.pub_uflow() == lit01[2] );
+ VERIFY( buf01.pub_uflow() == traits_type::to_int_type(lit01[2]) );
VERIFY( buf01.sgetc() == traits_type::eof() );
}
diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/wchar_t/1.cc
index ecd9b4c5f04..009af5d24b8 100644
--- a/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/wchar_t/1.cc
@@ -106,11 +106,11 @@ void test01()
buf01.pub_setg(lit01, lit01, (lit01 + i01));
VERIFY( i01 == buf01.in_avail() );
- VERIFY( buf01.pub_uflow() == lit01[0] );
+ VERIFY( buf01.pub_uflow() == traits_type::to_int_type(lit01[0]) );
VERIFY( buf01.sgetc() == traits_type::to_int_type(lit01[1]) );
- VERIFY( buf01.pub_uflow() == lit01[1] );
+ VERIFY( buf01.pub_uflow() == traits_type::to_int_type(lit01[1]) );
VERIFY( buf01.sgetc() == traits_type::to_int_type(lit01[2]) );
- VERIFY( buf01.pub_uflow() == lit01[2] );
+ VERIFY( buf01.pub_uflow() == traits_type::to_int_type(lit01[2]) );
VERIFY( buf01.sgetc() == traits_type::eof() );
}
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/char/1.cc
index 9fc9a62cfd4..60ae6812fae 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/char/1.cc
@@ -1,6 +1,7 @@
// 981208 bkoz test functionality of basic_stringbuf for char_type == char
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+// 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
@@ -47,8 +48,8 @@ void test04()
int_type c1 = strb_01.sbumpc();
int_type c2 = strb_02.sbumpc();
VERIFY( c1 != c2 );
- VERIFY( c1 == str_01[0] );
- VERIFY( c2 == str_02[0] ); //should equal first letter at this point
+ VERIFY( c1 == traits_type::to_int_type(str_01[0]) );
+ VERIFY( c2 == traits_type::to_int_type(str_02[0]) ); //should equal first letter at this point
int_type c3 = strb_01.sbumpc();
int_type c4 = strb_02.sbumpc();
VERIFY( c1 != c2 );
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/wchar_t/1.cc
index fa9dda8a8d8..5d583089883 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/wchar_t/1.cc
@@ -47,8 +47,8 @@ void test04()
int_type c1 = strb_01.sbumpc();
int_type c2 = strb_02.sbumpc();
VERIFY( c1 != c2 );
- VERIFY( c1 == str_01[0] );
- VERIFY( c2 == str_02[0] ); //should equal first letter at this point
+ VERIFY( c1 == traits_type::to_int_type(str_01[0]) );
+ VERIFY( c2 == traits_type::to_int_type(str_02[0]) ); //should equal first letter at this point
int_type c3 = strb_01.sbumpc();
int_type c4 = strb_02.sbumpc();
VERIFY( c1 != c2 );
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/char/1.cc
index 4a2b54821cc..6b6ad590440 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/char/1.cc
@@ -1,6 +1,7 @@
// 981208 bkoz test functionality of basic_stringbuf for char_type == char
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+// 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
@@ -83,8 +84,8 @@ void test04()
c2 = strb_02.sgetc();
VERIFY( c6 == c1 ); //just by co-incidence both o's
VERIFY( c7 != c2 ); // n != i
- VERIFY( c1 == str_01[13] );
- VERIFY( c2 == str_02[13] ); //should equal fourteenth letter at this point
+ VERIFY( c1 == traits_type::to_int_type(str_01[13]) );
+ VERIFY( c2 == traits_type::to_int_type(str_02[13]) ); //should equal fourteenth letter at this point
strmsz_1 = strb_03.sgetn(carray1, 10);
VERIFY( !strmsz_1 ); //zero
strmsz_1 = strb_02.in_avail();
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/wchar_t/1.cc
index b7fda2f15c0..f77cb97c376 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/wchar_t/1.cc
@@ -1,6 +1,7 @@
// 981208 bkoz test functionality of basic_stringbuf for char_type == wchar_t
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+// 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
@@ -83,8 +84,8 @@ void test04()
c2 = strb_02.sgetc();
VERIFY( c6 == c1 ); //just by co-incidence both o's
VERIFY( c7 != c2 ); // n != i
- VERIFY( c1 == str_01[13] );
- VERIFY( c2 == str_02[13] ); //should equal fourteenth letter at this point
+ VERIFY( c1 == traits_type::to_int_type(str_01[13]) );
+ VERIFY( c2 == traits_type::to_int_type(str_02[13]) ); //should equal fourteenth letter at this point
strmsz_1 = strb_03.sgetn(carray1, 10);
VERIFY( !strmsz_1 ); //zero
strmsz_1 = strb_02.in_avail();
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/char/1.cc
index ddaa51e5bde..1383f83fb0d 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/char/1.cc
@@ -1,6 +1,7 @@
// 981208 bkoz test functionality of basic_stringbuf for char_type == char
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
+// 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
@@ -62,8 +63,8 @@ void test04()
c7 = strb_02.snextc();
VERIFY( c6 != c8 );
VERIFY( c7 != c9 );
- VERIFY( c6 == str_01[3] );
- VERIFY( c7 == str_02[3] ); //should equal fourth letter at this point
+ VERIFY( c6 == traits_type::to_int_type(str_01[3]) );
+ VERIFY( c7 == traits_type::to_int_type(str_02[3]) ); //should equal fourth letter at this point
c5 = strb_03.snextc();
VERIFY( c5 == traits_type::eof() );
}
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/wchar_t/1.cc
index 3cfaab2362d..955390b8030 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/wchar_t/1.cc
@@ -1,6 +1,7 @@
// 981208 bkoz test functionality of basic_stringbuf for char_type == wchar_t
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+// 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
@@ -62,8 +63,8 @@ void test04()
c7 = strb_02.snextc();
VERIFY( c6 != c8 );
VERIFY( c7 != c9 );
- VERIFY( c6 == str_01[3] );
- VERIFY( c7 == str_02[3] ); //should equal fourth letter at this point
+ VERIFY( c6 == traits_type::to_int_type(str_01[3]) );
+ VERIFY( c7 == traits_type::to_int_type(str_02[3]) ); //should equal fourth letter at this point
c5 = strb_03.snextc();
VERIFY( c5 == traits_type::eof() );
}
diff --git a/libstdc++-v3/testsuite/ext/enc_filebuf/char/13598.cc b/libstdc++-v3/testsuite/ext/enc_filebuf/char/13598.cc
index 3aa7de8cd82..767ae32eb2c 100644
--- a/libstdc++-v3/testsuite/ext/enc_filebuf/char/13598.cc
+++ b/libstdc++-v3/testsuite/ext/enc_filebuf/char/13598.cc
@@ -1,6 +1,6 @@
// { dg-require-iconv "ISO-8859-1" }
-// Copyright (C) 2004, 2007 Free Software Foundation
+// Copyright (C) 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
@@ -20,6 +20,7 @@
#include <locale>
#include <cstring>
+#include <cstddef>
#include <testsuite_hooks.h>
#include <ext/enc_filebuf.h>
@@ -41,8 +42,8 @@ int main()
std::streamsize n = fb.sputn(str, std::strlen(str));
int s = fb.pubsync();
fb.close();
-
- VERIFY( n == std::strlen(str) );
+
+ VERIFY( std::size_t(n) == std::strlen(str) );
VERIFY( s == 0 );
return 0;
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_xref.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_xref.cc
index 47a9795b5cd..7565e73e5c0 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_xref.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_xref.cc
@@ -1,6 +1,6 @@
// -*- C++ -*-
-// Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+// Copyright (C) 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 terms
@@ -80,7 +80,7 @@ public:
push(const int& r_str);
// Returns a const reference to the largest int in the container.
- const int
+ int
top() const
{
assert(!empty());
diff --git a/libstdc++-v3/testsuite/ext/vstring/inserters_extractors/char/28277.cc b/libstdc++-v3/testsuite/ext/vstring/inserters_extractors/char/28277.cc
index f76a2c4f62b..eb506b0c81d 100644
--- a/libstdc++-v3/testsuite/ext/vstring/inserters_extractors/char/28277.cc
+++ b/libstdc++-v3/testsuite/ext/vstring/inserters_extractors/char/28277.cc
@@ -38,7 +38,7 @@ void test01()
oss_01 << str_01;
VERIFY( oss_01.good() );
- VERIFY( oss_01.str().size() == width );
+ VERIFY( oss_01.str().size() == __gnu_cxx::__vstring::size_type(width) );
}
int main()
diff --git a/libstdc++-v3/testsuite/ext/vstring/inserters_extractors/wchar_t/28277.cc b/libstdc++-v3/testsuite/ext/vstring/inserters_extractors/wchar_t/28277.cc
index 405163d0bb9..205a99525f6 100644
--- a/libstdc++-v3/testsuite/ext/vstring/inserters_extractors/wchar_t/28277.cc
+++ b/libstdc++-v3/testsuite/ext/vstring/inserters_extractors/wchar_t/28277.cc
@@ -38,7 +38,7 @@ void test01()
oss_01 << str_01;
VERIFY( oss_01.good() );
- VERIFY( oss_01.str().size() == width );
+ VERIFY( oss_01.str().size() == __gnu_cxx::__wvstring::size_type(width) );
}
int main()
diff --git a/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/default_weaktoshared.cc b/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/default_weaktoshared.cc
index ecf5fa2c159..6f521ed95b0 100644
--- a/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/default_weaktoshared.cc
+++ b/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/default_weaktoshared.cc
@@ -162,7 +162,7 @@ test01()
#endif
pthread_attr_t tattr;
- int ret = pthread_attr_init(&tattr);
+ pthread_attr_init(&tattr);
shared_and_weak_pools pools(obj_pool, weak_pool[0]);
pthread_create(threads, &tattr, thread_hammer_and_kill, reinterpret_cast<void*>(&pools));
diff --git a/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/mutex_weaktoshared.cc b/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/mutex_weaktoshared.cc
index f11474fb1c1..b2461348c56 100644
--- a/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/mutex_weaktoshared.cc
+++ b/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/mutex_weaktoshared.cc
@@ -164,7 +164,7 @@ test01()
#endif
pthread_attr_t tattr;
- int ret = pthread_attr_init(&tattr);
+ pthread_attr_init(&tattr);
shared_and_weak_pools pools(obj_pool, weak_pool[0]);
pthread_create(threads, &tattr, thread_hammer_and_kill, reinterpret_cast<void*>(&pools));
diff --git a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/uniform_int/33128.cc b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/uniform_int/33128.cc
index bf10eddbf7d..f699ba32448 100644
--- a/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/uniform_int/33128.cc
+++ b/libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/uniform_int/33128.cc
@@ -23,7 +23,7 @@
#include <testsuite_hooks.h>
// libstdc++/33128
-int test01()
+void test01()
{
bool test __attribute__((unused)) = true;
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/range.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/range.cc
index e96e169463c..d5bfb417a1d 100644
--- a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/range.cc
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/range.cc
@@ -32,7 +32,7 @@ void test01()
char s[] = "a+b|c";
test_type re;
- re.assign(s, s + sizeof(s));
+ re.assign(s, s + 5);
}
int
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/range.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/range.cc
index ca48cadf880..1e97c6a5ce6 100644
--- a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/range.cc
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/range.cc
@@ -32,7 +32,7 @@ void test01()
wchar_t s[] = L"a+b|c";
test_type re;
- re.assign(s, s + sizeof(s));
+ re.assign(s, s + 5);
}
int
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/range.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/range.cc
index 53f1f4fc1c8..42c2bf39879 100644
--- a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/range.cc
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/range.cc
@@ -31,7 +31,7 @@ void test01()
typedef std::tr1::basic_regex<char> test_type;
char s[] = "a+b|c";
- test_type re(s, s + sizeof(s));
+ test_type re(s, s + 5);
}
int
diff --git a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/range.cc b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/range.cc
index eb9139a9038..9ebebf2f601 100644
--- a/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/range.cc
+++ b/libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/range.cc
@@ -31,7 +31,7 @@ void test01()
typedef std::tr1::basic_regex<wchar_t> test_type;
wchar_t s[] = L"a+b|c";
- test_type re(s, s + sizeof(s));
+ test_type re(s, s + 5);
}
int
diff --git a/libstdc++-v3/testsuite/util/testsuite_hooks.cc b/libstdc++-v3/testsuite/util/testsuite_hooks.cc
index b5249f44940..35ac5b2836f 100644
--- a/libstdc++-v3/testsuite/util/testsuite_hooks.cc
+++ b/libstdc++-v3/testsuite/util/testsuite_hooks.cc
@@ -173,7 +173,6 @@ namespace __gnu_test
run_tests_wrapped_locale(const char* name, const func_callback& l)
{
using namespace std;
- bool test = true;
// Set the global locale.
locale loc_name = locale(name);
@@ -202,7 +201,6 @@ namespace __gnu_test
const func_callback& l)
{
using namespace std;
- bool test = true;
#ifdef _GLIBCXX_HAVE_SETENV
// Set the global locale.
diff --git a/libstdc++-v3/testsuite/util/testsuite_rvalref.h b/libstdc++-v3/testsuite/util/testsuite_rvalref.h
index bd82df95d5d..55d0e41654f 100644
--- a/libstdc++-v3/testsuite/util/testsuite_rvalref.h
+++ b/libstdc++-v3/testsuite/util/testsuite_rvalref.h
@@ -72,6 +72,7 @@ namespace __gnu_test
VERIFY(valid == false);
val = newval;
valid = true;
+ return *this;
}
rvalstruct(rvalstruct&& in)
@@ -145,6 +146,7 @@ namespace __gnu_test
{
val = newval;
valid = true;
+ return *this;
}
bool
@@ -154,6 +156,7 @@ namespace __gnu_test
++copycount;
val = in.val;
valid = true;
+ return true;
}
copycounter&
OpenPOWER on IntegriCloud