]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorPaolo Carlini <paolo@gcc.gnu.org>
Mon, 10 Dec 2007 13:53:10 +0000 (13:53 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Mon, 10 Dec 2007 13:53:10 +0000 (13:53 +0000)
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.

From-SVN: r130743

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 730cf4f1aa5b85052b2199e358116977284fee0d..ae85dcef2a51cc94afe58f34064b4a889e016f21 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 d23e90f048aa566ab115d23d7cf29aa446d0866c..a4cce068e96f0a1227267484a0b6d131a8807afa 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 f6d0b29428ea805c68cf8f49a62249b94dc035e5..04204cb55fc18c67101f3593a073484f5be46399 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 4751d161e8e9949f9c8e7ea9eacb110829f334fb..6cad8c00ffd28e3a603f123cfebb8270edda003c 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 f4cd48cc6bda0d6c746e830a19f4493f650de155..30b83d1da69307eab66b4a4d51d5fdbc576443dd 100644 (file)
@@ -26,7 +26,6 @@
 int main()
 {
   bool test __attribute__((unused)) = true;
-  bool b;
 
   // 1
   std::error_code e1;
index 3bf89ba7357046a7bdb2737c359d290d8de914d4..6af9d13a61d8d9f1928100bb4ee50eb385b7e4ba 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 4a51c4c6fd34de185119726d5015ccebbda12736..56019a7494b9115cbb0b0b762445ae1002a94c63 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 f67582c5f26cba19056d64aabea0954ef5e5328d..5f60c2ff62729bd3860e623263285a5608254094 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 ff6228f124086d18a087e279254628d59984fba9..653f4de36db5788da13a7b6498587db24f4ec6c8 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 a784ee044a235f0f58ee0f32f57fc8629d5e3700..43bf0283d64db500e77feb93da05da505f8eea37 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 f1f06f594f1361d84e21f64fe23b1aaae6824d33..01935eabd9763c81c6dc7bffd16c04be6ecbb230 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 55d2536fd1419eac94e59d6e216c285551a6dd99..76c293f11a51e0b0273b4f152bdf69a0a436884e 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 16e81b3b8b90670849d2fcc57fe431a1a90b4812..0642e31da3ece3c0396c97e99a31023bfbbc8802 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 efef386bbba631b1ac0010ba32009995ccf8404d..7581e2a123b22741222146b712e788564e0b54f2 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 cb3ec744e56dfd375801269e926938423664cf6b..c6ecb25c3839e05f527843803b7b5d2c2d87f9d4 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 94064ecc993c2e98d2a6711de9bcc6ebe2f0d381..53354292ed66c22215b2485d2be5b87d3ffa44b2 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 266388fcc2dc0809c0600e786d9eb751a8ad6d26..1aff586a125d812f91bc79fa55ce74cc542e114b 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 60457f70793d4717191d93af7b0b99224d5c408a..a6268e2719f0f653162317f40c799d9676c1f535 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 e7a93f07df673eba0ac80bf7551b739a680f16cb..cf38a79902ec7c21d20232cd97a8e377ca3bc997 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 0bb9a2d28db6b954166dfc8b8ab9c13f87b1e406..8ef33f536c65db6c1900b5578f7ec6b5c531a0d5 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 7753fe947bc9fbf433659bb924aec717e81daa2d..f17c6b94ce7fd97951418cd053f31a1da039a80c 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 3a1d9914277a24b48b295fa0b4ae55456fa7f20f..2da9be0b146d51973cb3faca95a76166ae671405 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 aaf3e391e8d926868541bf39efa166ce8b454427..d635968c162e9a16e74db5310e3f2cc503461f19 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 167f1f2a12bff01b7c57a9be00ece200ae1a5ec6..5fe41db88def8ca3c6429bd9756165a52aa9ee8d 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 19542d3999e9e4488688b479d12ed2b935771c87..93ced1b906451fe03d6d8a7b31199af287c1e16b 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 8f27ab4c06e8b211c8dc590fa455bb7570e55c3d..35355380461126edd3872ff4feb02c289a045a8d 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 8ee2f2847d1478fd8412c1748260393376af6b7e..b781ca2f9479ab11ee9e08b2d459237b32ac1163 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 ffa386cfeb532f8a8c83121c551b09f473ddc869..a37a0a1a637e5c7fa2e40ec41408f0788b86fcc5 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 fcc311381a149e2923c8af6565c07789fbeef784..b0e6dc507e0ade61ede6381626321bbdae4b7998 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 3724768d4a6f1ee0166f82703c05135ca8b47754..6d71b23ff30e65de70330827ef36573aa7c51863 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 ed8635033b8c6e24953202f020847502a7c8f13d..84f959ae9a259e27a702d13273f65d012f59aeab 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 c0abab33859fe5f31a7e1bfebc9a6aeaa7f4fc00..c034f3a151f932d9662e54f57f0f62ff8a9625f2 100644 (file)
@@ -43,5 +43,5 @@ bool isnormal(const employee&)
 void test01()
 {
   manager m;
-  bool b = isnormal(m);
+  isnormal(m);
 }
index d4dd4f117d7bbcbb1203240ad8c7d1a99448cf63..4f3c1b157588f43aef019c5d3e1e651883118fba 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 f79fb064ccc9bbc5a77f17e859f135e8a2ff1774..9c68320bf1717ef797e59ae8975f036393f7eae1 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 cc02979cb5eede052930432d9caa44e66d2ac7d9..3ef1f8c43624f6e2c50901f621c5a180a045d0b4 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 736c8a8ae94f972e11cc5fb491ca424c0adacdd1..6213ad1f4be8ded29b84bcf64fbfde6730de1f96 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 ae13c5267e38b2c904c840be01dde020b3758b33..dc5ffe5dff2bd9e8a0e0bc6ed32a981e02db43c6 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 1a13e04fc409ce8d4089006633b68af690fba83b..e80242cf0a7b2b2e2a5be6e9e1f80dd72042c0e8 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 ca3f919a8232acf51bfea993afb957daa6ff855f..83989ff400f576dfe5a3099d2719549736348a1a 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 ecd9b4c5f04ad20175ee5be675cef245594ce982..009af5d24b82364c44ed08d263f0af8b5c0ec8ae 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 9fc9a62cfd490a2fe89659bad649cf09cbdad2ac..60ae6812fae8f64a339a6970da26d54e0f25b3f0 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 fa9dda8a8d87371335920d44491060d5eb4cb6d5..5d5830898835ad6c6cc7da0322349b7161948768 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 4a2b54821ccd0dcb72b0a903b856a99cbe704d02..6b6ad590440486a41e8280bf2b66acbcc22b3419 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 b7fda2f15c015bb30d0f9941e3e09e266fb2aaa4..f77cb97c376887a4302fcc00f7a90baa9045e021 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 ddaa51e5bde11bb47e3fed8aa140af46f6ecfba9..1383f83fb0decb42ee4465fa8ab6ddbdee2a1dd9 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 3cfaab2362d210a06f823cf9689f5975bef51c7b..955390b80301264fb348da17e361d3b46e7d0e17 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 3aa7de8cd82ce069135e3021d156e0ac193d1cb0..767ae32eb2cda6c3e20300f0de318c1f17dda977 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 47a9795b5cdee26b5dc8d40afeb3831342be4d1f..7565e73e5c0ccdb11f116194e1a96421ccc3b093 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 f76a2c4f62b846ab4d6416600d42353c05f7a8c0..eb506b0c81d689b8be60463c6465fbbb40bf19e6 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 405163d0bb912f1c500cc95f78e99cd4eadc51b5..205a99525f66f38cbe36d347f2b92090be783d81 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 ecf5fa2c159e6e69c3cb33a82da61f94f94f78e3..6f521ed95b0ad1bf95843dcb4e2e8eae47b44c2a 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 f11474fb1c16689fd72b2a2f42013f34494349ae..b2461348c56bb260e296fb99e6c9fdc85ad3b598 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 bf10eddbf7d69534ebc6917673d2bce6a9eda853..f699ba324489c60021b07bcd0ceb2d326a3eb3b5 100644 (file)
@@ -23,7 +23,7 @@
 #include <testsuite_hooks.h>
 
 // libstdc++/33128
-int test01()
+void test01()
 {
   bool test __attribute__((unused)) = true;
 
index e96e169463c189cccd25cf6bc1bbb444fb586055..d5bfb417a1d1d97799b0224ed85898c0c766d910 100644 (file)
@@ -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
index ca48cadf880ad1c816a3cc4facecec6058080bdd..1e97c6a5ce62298b6348a25fc594bd2b16d840ba 100644 (file)
@@ -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
index 53f1f4fc1c874d34371a3256e42a31af987173ce..42c2bf39879bb5c74f5772276855e3ab3b893835 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 eb9139a903898b813382c5b55f1dc72690ba7ae1..9ebebf2f601f766660ca83a759fc6749d1088821 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 b5249f449405778497e65942988ee51ec543ad1f..35ac5b2836fd3d592d77f2ce471b08b4722c93ad 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 bd82df95d5dabc066a78c26341b1b5ab69df7fa0..55d0e41654fc04b91f1d93a0a1eaba1413a86508 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&