OSDN Git Service

2007-12-10 Paolo Carlini <pcarlini@suse.de>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 10 Dec 2007 13:53:10 +0000 (13:53 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 10 Dec 2007 13:53:10 +0000 (13:53 +0000)
* 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

59 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/debug/safe_iterator.tcc
libstdc++-v3/include/ext/throw_allocator.h
libstdc++-v3/testsuite/18_support/headers/cstddef/macros.cc
libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool.cc
libstdc++-v3/testsuite/19_diagnostics/error_code/operators/bool_neg.cc
libstdc++-v3/testsuite/20_util/raw_storage_iterator/requirements/typedefs.cc
libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/28277.cc
libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/28277.cc
libstdc++-v3/testsuite/22_locale/codecvt/in/char/1.cc
libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/9.cc
libstdc++-v3/testsuite/22_locale/codecvt/length/char/1.cc
libstdc++-v3/testsuite/22_locale/codecvt/length/char/2.cc
libstdc++-v3/testsuite/22_locale/codecvt/out/char/1.cc
libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/1.cc
libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc
libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc
libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc
libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc
libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc
libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc
libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc
libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc
libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/1.cc
libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/2.cc
libstdc++-v3/testsuite/23_containers/map/operations/1.cc
libstdc++-v3/testsuite/23_containers/multimap/operations/1.cc
libstdc++-v3/testsuite/23_containers/multiset/operations/1.cc
libstdc++-v3/testsuite/23_containers/set/operations/1.cc
libstdc++-v3/testsuite/23_containers/vector/bool/capacity/29134.cc
libstdc++-v3/testsuite/25_algorithms/nth_element/2.cc
libstdc++-v3/testsuite/26_numerics/headers/cmath/25913.cc
libstdc++-v3/testsuite/27_io/basic_istream/peek/wchar_t/12296.cc
libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/28277-3.cc
libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/28277-4.cc
libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-2.cc
libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-3.cc
libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-4.cc
libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/char/1.cc
libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/wchar_t/1.cc
libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/char/1.cc
libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/wchar_t/1.cc
libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/char/1.cc
libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/wchar_t/1.cc
libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/char/1.cc
libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/wchar_t/1.cc
libstdc++-v3/testsuite/ext/enc_filebuf/char/13598.cc
libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_xref.cc
libstdc++-v3/testsuite/ext/vstring/inserters_extractors/char/28277.cc
libstdc++-v3/testsuite/ext/vstring/inserters_extractors/wchar_t/28277.cc
libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/default_weaktoshared.cc
libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/thread/mutex_weaktoshared.cc
libstdc++-v3/testsuite/tr1/5_numerical_facilities/random/uniform_int/33128.cc
libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/char/range.cc
libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/assign/wchar_t/range.cc
libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/char/range.cc
libstdc++-v3/testsuite/tr1/7_regular_expressions/basic_regex/ctors/wchar_t/range.cc
libstdc++-v3/testsuite/util/testsuite_hooks.cc
libstdc++-v3/testsuite/util/testsuite_rvalref.h

index 730cf4f..ae85dce 100644 (file)
@@ -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.
index d23e90f..a4cce06 100644 (file)
@@ -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;
        }
     }
index f6d0b29..04204cb 100644 (file)
@@ -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';
   }
index 4751d16..6cad8c0 100644 (file)
@@ -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"
index 3bf89ba..6af9d13 100644 (file)
@@ -28,7 +28,7 @@ int main()
   std::error_code e;
   int i = e; 
 
-  return 0;
+  return i;
 }
 
 // { dg-error "invalid conversion" "" { target *-*-* } 29 }
index 4a51c4c..56019a7 100644 (file)
@@ -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;
index f67582c..5f60c2f 100644 (file)
@@ -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()
index ff6228f..653f4de 100644 (file)
@@ -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()
index a784ee0..43bf028 100644 (file)
@@ -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;
index f1f06f5..01935ea 100644 (file)
@@ -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 );
index 55d2536..76c293f 100644 (file)
@@ -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;
index 16e81b3..0642e31 100644 (file)
@@ -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;
index efef386..7581e2a 100644 (file)
@@ -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;
index cb3ec74..c6ecb25 100644 (file)
@@ -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;
index 94064ec..5335429 100644 (file)
@@ -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 );
index 266388f..1aff586 100644 (file)
@@ -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;
index 60457f7..a6268e2 100644 (file)
@@ -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;
index e7a93f0..cf38a79 100644 (file)
@@ -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 );
 }
index 0bb9a2d..8ef33f5 100644 (file)
@@ -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 );
 }
index 7753fe9..f17c6b9 100644 (file)
@@ -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 );
 }
index 3a1d991..2da9be0 100644 (file)
@@ -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 );
 }
index aaf3e39..d635968 100644 (file)
@@ -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 );
 }
index 167f1f2..5fe41db 100644 (file)
@@ -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);
index 19542d3..93ced1b 100644 (file)
@@ -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
index 8f27ab4..3535538 100644 (file)
@@ -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();
index 8ee2f28..b781ca2 100644 (file)
@@ -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();
index ffa386c..a37a0a1 100644 (file)
@@ -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();
index fcc3113..b0e6dc5 100644 (file)
@@ -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();
index 3724768..6d71b23 100644 (file)
@@ -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()
index ed86350..84f959a 100644 (file)
@@ -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
 #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);
 }
 
index c0abab3..c034f3a 100644 (file)
@@ -43,5 +43,5 @@ bool isnormal(const employee&)
 void test01()
 {
   manager m;
-  bool b = isnormal(m);
+  isnormal(m);
 }
index d4dd4f1..4f3c1b1 100644 (file)
@@ -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 );
 }
 
index f79fb06..9c68320 100644 (file)
@@ -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()
index cc02979..3ef1f8c 100644 (file)
@@ -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()
index 736c8a8..6213ad1 100644 (file)
@@ -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()
index ae13c52..dc5ffe5 100644 (file)
@@ -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()
index 1a13e04..e80242c 100644 (file)
@@ -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()
index ca3f919..83989ff 100644 (file)
@@ -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() );
 }
 
index ecd9b4c..009af5d 100644 (file)
@@ -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() );
 }
 
index 9fc9a62..60ae681 100644 (file)
@@ -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 );
index fa9dda8..5d58308 100644 (file)
@@ -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 );
index 4a2b548..6b6ad59 100644 (file)
@@ -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();
index b7fda2f..f77cb97 100644 (file)
@@ -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();
index ddaa51e..1383f83 100644 (file)
@@ -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() );
 }
index 3cfaab2..955390b 100644 (file)
@@ -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() );
 }
index 3aa7de8..767ae32 100644 (file)
@@ -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;
index 47a9795..7565e73 100644 (file)
@@ -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());
index f76a2c4..eb506b0 100644 (file)
@@ -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()
index 405163d..205a995 100644 (file)
@@ -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()
index ecf5fa2..6f521ed 100644 (file)
@@ -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));
index f11474f..b246134 100644 (file)
@@ -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));
index 53f1f4f..42c2bf3 100644 (file)
@@ -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
index eb9139a..9ebebf2 100644 (file)
@@ -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
index b5249f4..35ac5b2 100644 (file)
@@ -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. 
index bd82df9..55d0e41 100644 (file)
@@ -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&