]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
3983-2.cc: Avoid -Wall warnings.
authorPaolo Carlini <pcarlini@suse.de>
Thu, 31 Jan 2008 17:19:55 +0000 (17:19 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 31 Jan 2008 17:19:55 +0000 (17:19 +0000)
2008-01-31  Paolo Carlini  <pcarlini@suse.de>

* testsuite/27_io/basic_istream/extractors_character/pod/3983-2.cc:
Avoid -Wall warnings.
* testsuite/22_locale/global_templates/user_facet_hierarchies.cc:
Likewise.
* testsuite/22_locale/global_templates/standard_facet_hierarchies.cc:
Likewise.
* testsuite/tr1/6_containers/hash/operators/size_t.cc: Likewise.
* testsuite/tr1/6_containers/tuple/cons/big_tuples.cc: Likewise.
* testsuite/tr1/6_containers/tuple/cons/constructor.cc: Likewise.
* testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc:
Likewise.
* testsuite/tr1/6_containers/array/requirements/contiguous.cc:
Likewise.
* testsuite/tr1/6_containers/array/requirements/member_swap.cc:
Likewise.
* testsuite/tr1/6_containers/array/requirements/assign.cc: Likewise.
* testsuite/tr1/6_containers/array/specialized_algorithms/swap.cc:
Likewise.
* testsuite/tr1/6_containers/array/comparison_operators/
less_or_equal.cc: Likewise.
* testsuite/tr1/6_containers/array/comparison_operators/
greater_or_equal.cc: Likewise.
* testsuite/tr1/6_containers/array/comparison_operators/less.cc:
Likewise.
* testsuite/tr1/6_containers/array/comparison_operators/equal.cc:
Likewise.
* testsuite/tr1/6_containers/array/comparison_operators/not_equal.cc:
Likewise.
* testsuite/tr1/6_containers/array/comparison_operators/greater.cc:
Likewise.
* testsuite/tr1/6_containers/array/tuple_interface/get.cc: Likewise.
* testsuite/tr1/6_containers/array/element_access/at_out_of_range.cc:
Likewise.
* testsuite/tr1/6_containers/array/element_access/back.cc: Likewise.
* testsuite/tr1/6_containers/array/element_access/front.cc: Likewise.
* testsuite/tr1/6_containers/array/element_access/data.cc: Likewise.
* testsuite/tr1/6_containers/array/iterators/end_is_one_past.cc:
Likewise.
* testsuite/tr1/6_containers/array/capacity/empty.cc: Likewise.
* testsuite/tr1/6_containers/array/capacity/max_size.cc: Likewise.
* testsuite/tr1/6_containers/array/capacity/size.cc: Likewise.
* testsuite/thread/guard.cc: Likewise.
* testsuite/20_util/tuple/cons/big_tuples.cc: Likewise.
* testsuite/20_util/tuple/cons/constructor.cc: Likewise.
* testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise.
* testsuite/20_util/shared_ptr/creation/make.cc: Likewise.
* testsuite/20_util/shared_ptr/creation/alloc.cc: Likewise.
* testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
* testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc:
Likewise.

From-SVN: r131979

35 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/20_util/shared_ptr/creation/alloc.cc
libstdc++-v3/testsuite/20_util/shared_ptr/creation/dr402.cc
libstdc++-v3/testsuite/20_util/shared_ptr/creation/make.cc
libstdc++-v3/testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc
libstdc++-v3/testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc
libstdc++-v3/testsuite/20_util/tuple/cons/big_tuples.cc
libstdc++-v3/testsuite/20_util/tuple/cons/constructor.cc
libstdc++-v3/testsuite/22_locale/global_templates/standard_facet_hierarchies.cc
libstdc++-v3/testsuite/22_locale/global_templates/user_facet_hierarchies.cc
libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/pod/3983-2.cc
libstdc++-v3/testsuite/thread/guard.cc
libstdc++-v3/testsuite/tr1/6_containers/array/capacity/empty.cc
libstdc++-v3/testsuite/tr1/6_containers/array/capacity/max_size.cc
libstdc++-v3/testsuite/tr1/6_containers/array/capacity/size.cc
libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/equal.cc
libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/greater.cc
libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/greater_or_equal.cc
libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/less.cc
libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/less_or_equal.cc
libstdc++-v3/testsuite/tr1/6_containers/array/comparison_operators/not_equal.cc
libstdc++-v3/testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc
libstdc++-v3/testsuite/tr1/6_containers/array/element_access/at_out_of_range.cc
libstdc++-v3/testsuite/tr1/6_containers/array/element_access/back.cc
libstdc++-v3/testsuite/tr1/6_containers/array/element_access/data.cc
libstdc++-v3/testsuite/tr1/6_containers/array/element_access/front.cc
libstdc++-v3/testsuite/tr1/6_containers/array/iterators/end_is_one_past.cc
libstdc++-v3/testsuite/tr1/6_containers/array/requirements/assign.cc
libstdc++-v3/testsuite/tr1/6_containers/array/requirements/contiguous.cc
libstdc++-v3/testsuite/tr1/6_containers/array/requirements/member_swap.cc
libstdc++-v3/testsuite/tr1/6_containers/array/specialized_algorithms/swap.cc
libstdc++-v3/testsuite/tr1/6_containers/array/tuple_interface/get.cc
libstdc++-v3/testsuite/tr1/6_containers/hash/operators/size_t.cc
libstdc++-v3/testsuite/tr1/6_containers/tuple/cons/big_tuples.cc
libstdc++-v3/testsuite/tr1/6_containers/tuple/cons/constructor.cc

index d10e4f3190e6e63484d7929b8c4adcda2e838bac..e64168abc6bf89fc137b0d39af1baced5dba7972 100644 (file)
@@ -1,3 +1,56 @@
+2008-01-31  Paolo Carlini  <pcarlini@suse.de>
+
+       * testsuite/27_io/basic_istream/extractors_character/pod/3983-2.cc:
+       Avoid -Wall warnings.
+       * testsuite/22_locale/global_templates/user_facet_hierarchies.cc:
+       Likewise.
+       * testsuite/22_locale/global_templates/standard_facet_hierarchies.cc:
+       Likewise.
+       * testsuite/tr1/6_containers/hash/operators/size_t.cc: Likewise.
+       * testsuite/tr1/6_containers/tuple/cons/big_tuples.cc: Likewise.
+       * testsuite/tr1/6_containers/tuple/cons/constructor.cc: Likewise.
+       * testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc:
+       Likewise.
+       * testsuite/tr1/6_containers/array/requirements/contiguous.cc: 
+       Likewise.
+       * testsuite/tr1/6_containers/array/requirements/member_swap.cc:
+       Likewise.
+       * testsuite/tr1/6_containers/array/requirements/assign.cc: Likewise.
+       * testsuite/tr1/6_containers/array/specialized_algorithms/swap.cc:
+       Likewise.
+       * testsuite/tr1/6_containers/array/comparison_operators/
+       less_or_equal.cc: Likewise.
+       * testsuite/tr1/6_containers/array/comparison_operators/
+       greater_or_equal.cc: Likewise.
+       * testsuite/tr1/6_containers/array/comparison_operators/less.cc:
+       Likewise.
+       * testsuite/tr1/6_containers/array/comparison_operators/equal.cc:
+       Likewise.
+       * testsuite/tr1/6_containers/array/comparison_operators/not_equal.cc:
+       Likewise.
+       * testsuite/tr1/6_containers/array/comparison_operators/greater.cc:
+       Likewise.
+       * testsuite/tr1/6_containers/array/tuple_interface/get.cc: Likewise.
+       * testsuite/tr1/6_containers/array/element_access/at_out_of_range.cc:
+       Likewise.
+       * testsuite/tr1/6_containers/array/element_access/back.cc: Likewise.
+       * testsuite/tr1/6_containers/array/element_access/front.cc: Likewise.
+       * testsuite/tr1/6_containers/array/element_access/data.cc: Likewise.
+       * testsuite/tr1/6_containers/array/iterators/end_is_one_past.cc:
+       Likewise.
+       * testsuite/tr1/6_containers/array/capacity/empty.cc: Likewise.
+       * testsuite/tr1/6_containers/array/capacity/max_size.cc: Likewise.
+       * testsuite/tr1/6_containers/array/capacity/size.cc: Likewise.
+       * testsuite/thread/guard.cc: Likewise.
+       * testsuite/20_util/tuple/cons/big_tuples.cc: Likewise.
+       * testsuite/20_util/tuple/cons/constructor.cc: Likewise.
+       * testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise.
+       * testsuite/20_util/shared_ptr/creation/make.cc: Likewise.
+       * testsuite/20_util/shared_ptr/creation/alloc.cc: Likewise.
+       * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
+       * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc:
+       Likewise.
+
 2008-01-26  David Edelsohn  <edelsohn@gnu.org>
 
        PR target/34794
index cb789e0713dfd9acf1585753e1abd4a89042280e..90fce24c73b4cdf910e99fd9314218efb286f486 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-options "-std=gnu++0x" }
 
-// Copyright (C) 2007 Free Software Foundation
+// Copyright (C) 2007, 2008 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 +54,7 @@ struct reset_count_struct
 
 // 20.6.6.2.6 shared_ptr creation [util.smartptr.shared.create]
 
-int
+void
 test01()
 {
   bool test __attribute__((unused)) = true;
@@ -68,10 +68,11 @@ test01()
     VERIFY( tracker_allocator_counter::get_allocation_count() > 0 );
   }
   VERIFY( A::ctor_count == A::dtor_count );
-  VERIFY( tracker_allocator_counter::get_allocation_count() == tracker_allocator_counter::get_deallocation_count() );
+  VERIFY( tracker_allocator_counter::get_allocation_count()
+         == tracker_allocator_counter::get_deallocation_count() );
 }
 
-int
+void
 test02()
 {
   bool test __attribute__((unused)) = true;
@@ -97,9 +98,8 @@ test02()
 
   p1 = std::shared_ptr<A>();
   VERIFY( A::ctor_count == A::dtor_count );
-  VERIFY( tracker_allocator_counter::get_allocation_count() == tracker_allocator_counter::get_deallocation_count() );
-
-  return 0;
+  VERIFY( tracker_allocator_counter::get_allocation_count()
+         == tracker_allocator_counter::get_deallocation_count() );
 }
 
 int
@@ -107,4 +107,5 @@ main()
 {
   test01();
   test02();
+  return 0;
 }
index b9e6fde0eacb6b2339dec84ccc6fe9aee3ae1d1f..b096f4ff46111f25590e4f4de556eca8f618a7bd 100644 (file)
@@ -1,7 +1,7 @@
 // { dg-options "-std=gnu++0x" }
 // { dg-do compile }
 
-// Copyright (C) 2007 Free Software Foundation
+// Copyright (C) 2007, 2008 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
@@ -33,7 +33,7 @@ struct A
 
 // 20.6.6.2.6 shared_ptr creation [util.smartptr.shared.create]
 
-int
+void
 test01()
 {
   bool test __attribute__((unused)) = true;
@@ -45,4 +45,5 @@ int
 main()
 {
   test01();
+  return 0;
 }
index 2d763c109e1f18278ac29cc078eac31c8441bc05..006208318da7f4e95a7107859d1de18b168d3a82 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-options "-std=gnu++0x" }
 
-// Copyright (C) 2007 Free Software Foundation
+// Copyright (C) 2007, 2008 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
@@ -49,7 +49,7 @@ struct reset_count_struct
 
 // 20.6.6.2.6 shared_ptr creation [util.smartptr.shared.create]
 
-int
+void
 test01()
 {
   bool test __attribute__((unused)) = true;
@@ -64,7 +64,7 @@ test01()
   VERIFY( A::ctor_count == A::dtor_count );
 }
 
-int
+void
 test02()
 {
   bool test __attribute__((unused)) = true;
@@ -88,8 +88,6 @@ test02()
 
   p1 = std::shared_ptr<A>();
   VERIFY( A::ctor_count == A::dtor_count );
-
-  return 0;
 }
 
 int
index 31e31763ce79dbe246b2da48d77bb17f42e3810b..5bdd65c2700f5b85f0d83f6e5edd52dbe473afd6 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2006, 2007 Free Software Foundation
+// Copyright (C) 2006, 2007, 2008 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
@@ -163,7 +163,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, static_cast<void*>(&pools));
index 503498bd5f68a76df710321339c3995e6f81fa5f..20c2da146e0c88b58403ba3de951af8c3af6d66f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2006, 2007 Free Software Foundation
+// Copyright (C) 2006, 2007, 2008 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
@@ -165,7 +165,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, static_cast<void*>(&pools));
index 938e4cb48d4707626fe703ea9c5c576d52b8beab..0c60ec9ddef3c2372d00db09325b3300b4e53098 100644 (file)
@@ -38,7 +38,7 @@ test_constructors()
   const int &z1=x1;
 
   // Test empty constructor
-  tuple<> ta;
+  tuple<> ta __attribute__((unused));
   tuple<int,int> tb;
   // Test construction from values
   tuple<int,int> tc(x1,x2);
index 8440413d930cafc3c6f4d922669a7ec2ec4c14b3..105727d7983ee2e5c94562c7500b5abd15305fc9 100644 (file)
@@ -1,6 +1,6 @@
 // { dg-options "-std=gnu++0x" }
 
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -34,7 +34,7 @@ main()
   const int &z1=x1;
 
   // Test empty constructor
-  tuple<> ta;
+  tuple<> ta __attribute__((unused));
   tuple<int,int> tb;
   // Test construction from values
   tuple<int,int> tc(x1,x2);
index fa915a5343693d5b209356b45291fcce20785155..6b157e35aeca29370e4222eb159ccc1b1f95cbeb 100644 (file)
@@ -37,8 +37,6 @@ int main()
   locale loc_base = loc_c;
   locale loc_derived(loc_c, new derived_facet("C"));
 
-  bool b;
-
   // Standard base facet.
   VERIFY( has_facet<base_facet>(loc_c) );
   VERIFY( has_facet<base_facet>(loc_base) );
index 6ef4b77f6af6055fec7c884cb553e9680978f4db..94c41771502932aea101dde4f1a4665e686b3920 100644 (file)
@@ -56,8 +56,6 @@ int main()
   locale loc_base(loc_c, new base_facet);
   locale loc_derived(loc_c, new derived_facet);
 
-  bool b;
-
   // Standard facets.
   VERIFY( has_facet<std::ctype<char> >(loc_c) );
   VERIFY( has_facet<std::ctype<char> >(loc_base) );
index 7a979be7d38f21a24f4325d857b7c2026c81c8aa..a5164dc94c9fd852c514de0da83f1ece16c7f673 100644 (file)
@@ -1,6 +1,7 @@
 // 2001-06-05 Benjamin Kosnik  <bkoz@redhat.com>
 
-// Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+// Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -50,10 +51,11 @@ void test03()
   bool test __attribute__((unused)) = true;
 
   // input streams
-  pod_ushort arr[6] = { value_type('a'), value_type('b'), 
-                     value_type('c'), value_type('d'), value_type('e') };
+  pod_ushort arr[6] = { { value_type('a') }, { value_type('b') }, 
+                       { value_type('c') }, { value_type('d') },
+                       { value_type('e') } };
 
-  try 
+  try
     { 
       iss >> arr;
     }
index 0e9e827003d1c63f380ebd50e1df411f70f06a6b..a509321f83f17628091db016b5ec0982ba2fdc56 100644 (file)
@@ -1,5 +1,5 @@
 //
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -40,14 +40,13 @@ get_bar (void)
 void*
 do_something (void *arg)
 {
-  static int bar = get_bar ();
+  static int bar __attribute__((unused)) = get_bar ();
   return NULL;
 }
 
 int
 get_foo (void)
 {
-  int status;
   pthread_t new_thread;
 
   if (pthread_create (&new_thread, NULL, do_something, NULL) != 0)
@@ -62,6 +61,6 @@ get_foo (void)
 int
 main (int argc, char **argv)
 {
-  static int foo = get_foo ();
+  static int foo __attribute__((unused)) = get_foo ();
   return 0;  
 }
index 7eda922370198f75e5ee4e7d935147fc4fe007a7..50e7ead18951efcaa6f2f69ebad8894622003b49 100644 (file)
@@ -1,6 +1,6 @@
 // 2004-10-20  Benjamin Kosnik  <bkoz@redhat.com>
 //
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -30,8 +30,8 @@ test01()
     const size_t len = 5;
     typedef std::tr1::array<int, len> array_type;
     bool test __attribute__((unused)) = true;
-    array_type a = { 0, 1, 2, 3, 4 };
-    
+    array_type a = { { 0, 1, 2, 3, 4 } };
+
     VERIFY( a.empty() == false );
   }
 
@@ -40,7 +40,7 @@ test01()
     typedef std::tr1::array<int, len> array_type;
     bool test __attribute__((unused)) = true;
     array_type a;
-    
+
     VERIFY( a.empty() == true );
   }
 }
index 22e0c7b503a77321882dffbed6f76036cedbf17e..05849b8835656f8508e6e588ca42ce7315a98efb 100644 (file)
@@ -1,6 +1,6 @@
 // 2004-10-20  Benjamin Kosnik  <bkoz@redhat.com>
 //
-// Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -30,8 +30,8 @@ test01()
     const size_t len = 5;
     typedef std::tr1::array<int, len> array_type;
     bool test __attribute__((unused)) = true;
-    array_type a = { 0, 1, 2, 3, 4 };
-    
+    array_type a = { { 0, 1, 2, 3, 4 } };
+
     VERIFY( a.max_size() == len );
   }
 
@@ -40,7 +40,7 @@ test01()
     typedef std::tr1::array<int, len> array_type;
     bool test __attribute__((unused)) = true;
     array_type a;
-    
+
     VERIFY( a.max_size() == len );
   }
 }
index bb04ab151a086e56ac83c6f152e8ae3fa4f88b2c..748fb8d2cfb8ddec4f72b39b82b2f2e56bc1d827 100644 (file)
@@ -1,6 +1,6 @@
 // 2004-10-20  Benjamin Kosnik  <bkoz@redhat.com>
 //
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -30,8 +30,8 @@ test01()
     const size_t len = 5;
     typedef std::tr1::array<int, len> array_type;
     bool test __attribute__((unused)) = true;
-    array_type a = { 0, 1, 2, 3, 4 };
-    
+    array_type a = { { 0, 1, 2, 3, 4 } };
+
     VERIFY( a.size() == len );
   }
 
@@ -40,7 +40,7 @@ test01()
     typedef std::tr1::array<int, len> array_type;
     bool test __attribute__((unused)) = true;
     array_type a;
-    
+
     VERIFY( a.size() == len );
   }
 }
index 0df99ef0294769e84ec95813ad24ec91be38b603..971fcde1d3020bd585bdc7de4fdebcf0ea4b19a0 100644 (file)
@@ -1,6 +1,6 @@
 // 2004-10-20  Benjamin Kosnik  <bkoz@redhat.com>
 //
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -29,10 +29,10 @@ test01()
   const size_t len = 5;
   typedef std::tr1::array<int, len> array_type;
   bool test __attribute__((unused)) = true;
-  array_type a = { 0, 1, 2, 3, 4 };
-  array_type b = { 0, 1, 2, 3, 4 };
-  array_type c = { 0, 1, 2, 3 };
-    
+  array_type a = { { 0, 1, 2, 3, 4 } };
+  array_type b = { { 0, 1, 2, 3, 4 } };
+  array_type c = { { 0, 1, 2, 3 } };
+
   VERIFY( a == b );
   VERIFY( !(a == c) );
 }
index 11a8e77074159b18acf0693ed8e0595d76e22168..8d38e9a8a3cd36445444fe06cc19521484b8a28a 100644 (file)
@@ -1,6 +1,6 @@
 // 2004-10-20  Benjamin Kosnik  <bkoz@redhat.com>
 //
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -29,10 +29,10 @@ test01()
   const size_t len = 5;
   typedef std::tr1::array<int, len> array_type;
   bool test __attribute__((unused)) = true;
-  array_type a = { 0, 1, 2, 3, 4 };
-  array_type b = { 0, 1, 2, 3, 4 };
-  array_type c = { 0, 1, 2, 3, 7 };
-    
+  array_type a = { { 0, 1, 2, 3, 4 } };
+  array_type b = { { 0, 1, 2, 3, 4 } };
+  array_type c = { { 0, 1, 2, 3, 7 } };
+
   VERIFY( !(a > b) );
   VERIFY( c > a );
 }
index ad4e6d607f9db6ea72e955f4047735c7c9144656..914cd2e326a095f14cc84106d75cb64b469c23b1 100644 (file)
@@ -1,6 +1,6 @@
 // 2004-10-20  Benjamin Kosnik  <bkoz@redhat.com>
 //
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -29,10 +29,10 @@ test01()
   const size_t len = 5;
   typedef std::tr1::array<int, len> array_type;
   bool test __attribute__((unused)) = true;
-  array_type a = { 0, 1, 2, 3, 4 };
-  array_type b = { 0, 1, 2, 3, 4 };
-  array_type c = { 0, 1, 2, 3, 7 };
-    
+  array_type a = { { 0, 1, 2, 3, 4 } };
+  array_type b = { { 0, 1, 2, 3, 4 } };
+  array_type c = { { 0, 1, 2, 3, 7 } };
+
   VERIFY( a >= b );
   VERIFY( c >= a );
 }
index b42dc645f3e4850f1177cbaf18fa3dd1a905eb8a..e6f394cc93555e76ac70331ece4d71501a286914 100644 (file)
@@ -1,6 +1,6 @@
 // 2004-10-20  Benjamin Kosnik  <bkoz@redhat.com>
 //
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -29,10 +29,10 @@ test01()
   const size_t len = 5;
   typedef std::tr1::array<int, len> array_type;
   bool test __attribute__((unused)) = true;
-  array_type a = { 0, 1, 2, 3, 4 };
-  array_type b = { 0, 1, 2, 3, 4 };
-  array_type c = { 0, 1, 2, 3, 7 };
-    
+  array_type a = { { 0, 1, 2, 3, 4 } };
+  array_type b = { { 0, 1, 2, 3, 4 } };
+  array_type c = { { 0, 1, 2, 3, 7 } };
+
   VERIFY( !(a < b) );
   VERIFY( a < c );
 }
index 6b8f6caf7c4dfc13b5fc3deb4964e93fe5137ef2..d74b529edd13eeb0ace9a54c595dbdd11d452b5b 100644 (file)
@@ -1,6 +1,6 @@
 // 2004-10-20  Benjamin Kosnik  <bkoz@redhat.com>
 //
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -29,10 +29,10 @@ test01()
   const size_t len = 5;
   typedef std::tr1::array<int, len> array_type;
   bool test __attribute__((unused)) = true;
-  array_type a = { 0, 1, 2, 3, 4 };
-  array_type b = { 0, 1, 2, 3, 4 };
-  array_type c = { 0, 1, 2, 3, 7 };
-    
+  array_type a = { { 0, 1, 2, 3, 4 } };
+  array_type b = { { 0, 1, 2, 3, 4 } };
+  array_type c = { { 0, 1, 2, 3, 7 } };
+
   VERIFY( a <= b );
   VERIFY( a <= c );
 }
index 717fc8a8307ef209556a08a0c722ddd02569cfef..dc0ac6381f99e15e3916102f95fb946ee7f7f6e1 100644 (file)
@@ -1,6 +1,6 @@
 // 2004-10-20  Benjamin Kosnik  <bkoz@redhat.com>
 //
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -29,10 +29,10 @@ test01()
   const size_t len = 5;
   typedef std::tr1::array<int, len> array_type;
   bool test __attribute__((unused)) = true;
-  array_type a = { 0, 1, 2, 3, 4 };
-  array_type b = { 0, 1, 2, 3, 4 };
-  array_type c = { 0, 1, 2, 3 };
-  
+  array_type a = { { 0, 1, 2, 3, 4 } };
+  array_type b = { { 0, 1, 2, 3, 4 } };
+  array_type c = { { 0, 1, 2, 3 } };
+
   VERIFY( !(a != b) );
   VERIFY( a != c );
 }
index 1c6c8edd670c32e076c7fa4cd920ebaf89a6c4b1..ca3ea5d3b66e30c64d078840c9b50a42667225aa 100644 (file)
@@ -2,7 +2,7 @@
 
 // 2004-10-20  Benjamin Kosnik  <bkoz@redhat.com>
 //
-// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -29,8 +29,8 @@ test01()
 { 
   typedef std::tr1::array<int, 5> array_type;
 
-  array_type a = { 0, 1, 2, 3, 4 };
-  array_type b = { 0, 1, 2, 3 };
+  array_type a = { { 0, 1, 2, 3, 4 } };
+  array_type b = { { 0, 1, 2, 3 } };
 
   a = b;
 }
index 10796dccfb8b3cf0d7537d8db6a88e025cbc051d..cee0e732a719fece2497c49cac8cc00504d55ee1 100644 (file)
@@ -1,6 +1,6 @@
 // 2004-10-20  Benjamin Kosnik  <bkoz@redhat.com>
 //
-// Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -30,7 +30,7 @@ test01()
   const size_t len = 5;
   typedef std::tr1::array<int, len> array_type;
   bool test __attribute__((unused)) = true;
-  array_type a = { 0, 1, 2, 3, 4 };
+  array_type a = { { 0, 1, 2, 3, 4 } };
 
   try
     {
index cc08381341e2467f66996584c346dec0398c64e3..9ba2f6343ac17a995ecf6027350990984662197d 100644 (file)
@@ -1,6 +1,6 @@
 // 2005-08-26  Paolo Carlini  <pcarlini@suse.de>
 //
-// Copyright (C) 2005 Free Software Foundation, Inc.
+// Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -32,13 +32,13 @@ test01()
   typedef std::tr1::array<int, len> array_type;
   
   {
-    array_type a = { 0, 1, 2, 3, 4 };
+    array_type a = { { 0, 1, 2, 3, 4 } };
     int& ri = a.back();
     VERIFY( ri == 4 );
   }
 
   {
-    const array_type ca = { 4, 3, 2, 1, 0 };
+    const array_type ca = { { 4, 3, 2, 1, 0 } };
     const int& cri = ca.back();
     VERIFY( cri == 0 );
   }
index f6866dcc67000a9db015eb1328b702bf40e4d8cb..3a4efcf1ffb80b7184200ba71a8930c7646c1768 100644 (file)
@@ -1,6 +1,6 @@
 // 2005-08-26  Paolo Carlini  <pcarlini@suse.de>
 //
-// Copyright (C) 2005 Free Software Foundation, Inc.
+// Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -32,13 +32,13 @@ test01()
   typedef std::tr1::array<int, len> array_type;
   
   {
-    array_type a = { 0, 1, 2, 3, 4 };
+    array_type a = { { 0, 1, 2, 3, 4 } };
     int* pi = a.data();
     VERIFY( *pi == 0 );
   }
 
   {
-    const array_type ca = { 4, 3, 2, 1, 0 };
+    const array_type ca = { { 4, 3, 2, 1, 0 } };
     const int* pci = ca.data();
     VERIFY( *pci == 4 );
   }
index 33c93bef52f5a80b9b58c7be0caa24d30242e5f0..493c6ed4c1ba41a941fdea73b63f3576974aa954 100644 (file)
@@ -1,6 +1,6 @@
 // 2005-08-26  Paolo Carlini  <pcarlini@suse.de>
 //
-// Copyright (C) 2005 Free Software Foundation, Inc.
+// Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -32,13 +32,13 @@ test01()
   typedef std::tr1::array<int, len> array_type;
   
   {
-    array_type a = { 0, 1, 2, 3, 4 };
+    array_type a = { { 0, 1, 2, 3, 4 } };
     int& ri = a.front();
     VERIFY( ri == 0 );
   }
 
   {
-    const array_type ca = { 4, 3, 2, 1, 0 };
+    const array_type ca = { { 4, 3, 2, 1, 0 } };
     const int& cri = ca.front();
     VERIFY( cri == 4 );
   }
index 497fb61e32df4d36c4a42893fe174b7f6b5b2c70..58ba7be4ea0ba938069ad66addaf16692a46b0f8 100644 (file)
@@ -1,6 +1,6 @@
 // 2004-10-20  Benjamin Kosnik  <bkoz@redhat.com>
 //
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -30,7 +30,7 @@ test01()
   const size_t len = 5;
   typedef std::tr1::array<int, len> array_type;
   bool test __attribute__((unused)) = true;
-  array_type a = { 0, 1, 2, 3, 4 };
+  array_type a = { { 0, 1, 2, 3, 4 } };
 
   array_type::iterator b = a.begin();
   array_type::iterator e = a.end();
index e65c54e9aeed85c848b1bb5f1649e8f35366e670..5ffe849d91f8ce08faa821339714e036d5144603 100644 (file)
@@ -1,6 +1,6 @@
 // 2006-02-24  Paolo Carlini  <pcarlini@suse.de>
 //
-// Copyright (C) 2006 Free Software Foundation, Inc.
+// Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -31,7 +31,7 @@ test01()
   const size_t len = 3;
   typedef std::tr1::array<int, len> array_type;
 
-  array_type a = { 0, 1, 2 };
+  array_type a = { { 0, 1, 2 } };
   const int value = 5;
 
   a.assign(value);
index 7632674cf501d18aa6450796ce9bd901a5fff0be..30c78583a44de1720938bcbfc66227f0baebe102 100644 (file)
@@ -1,6 +1,6 @@
 // 2004-10-20  Benjamin Kosnik  <bkoz@redhat.com>
 //
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -29,7 +29,7 @@ test01()
   const size_t len = 5;
   typedef std::tr1::array<int, len> array_type;
   bool test __attribute__((unused)) = true;
-  array_type a = { 0, 1, 2, 3, 4 };
+  array_type a = { { 0, 1, 2, 3, 4 } };
 
   // &a[n] == &a[0] + n for all 0 <= n < N.
   for (size_t i = 0; i < len; ++i)
index 3baa3cb2b3adfc1aa04b20e6647bf540f64882e7..3f09b89237a8fefc6227543fc0905e785dc56939 100644 (file)
@@ -1,6 +1,6 @@
 // 2006-02-24  Paolo Carlini  <pcarlini@suse.de>
 //
-// Copyright (C) 2006 Free Software Foundation, Inc.
+// Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -31,10 +31,10 @@ test01()
   const size_t len = 5;
   typedef std::tr1::array<int, len> array_type;
 
-  array_type a = { 0, 1, 2, 3, 4 };
+  array_type a = { { 0, 1, 2, 3, 4 } };
   const array_type a_ref = a;
 
-  array_type b = { 4, 3, 2, 1, 0 };
+  array_type b = { { 4, 3, 2, 1, 0 } };
   const array_type b_ref = b;
 
   a.swap(b);
index 6ec9968f4c750f270e0f2bed988fcaa4677181e0..f369838daa5a60ef6e99770af0f1fc11e619a5a3 100644 (file)
@@ -1,6 +1,6 @@
 // 2006-02-24  Paolo Carlini  <pcarlini@suse.de>
 //
-// Copyright (C) 2006 Free Software Foundation, Inc.
+// Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -31,10 +31,10 @@ test01()
   const size_t len = 5;
   typedef std::tr1::array<int, len> array_type;
 
-  array_type a = { 0, 1, 2, 3, 4 };
+  array_type a = { { 0, 1, 2, 3, 4 } };
   const array_type a_ref = a;
 
-  array_type b = { 4, 3, 2, 1, 0 };
+  array_type b = { { 4, 3, 2, 1, 0 } };
   const array_type b_ref = b;
 
   std::tr1::swap(a, b);
index b7463b389579e7c17aacf070ff6c841fac400faf..59c0c7ffc9a3b6ee5ecf546d977d1e9928c85007 100644 (file)
@@ -1,6 +1,6 @@
 // 2005-08-26  Paolo Carlini  <pcarlini@suse.de>
 //
-// Copyright (C) 2005 Free Software Foundation, Inc.
+// Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -33,13 +33,13 @@ test01()
   typedef array<int, len> array_type;
 
   {
-    array_type a = { 0, 1, 2, 3, 4 };
+    array_type a = { { 0, 1, 2, 3, 4 } };
     int& ri = get<0>(a);
     VERIFY( ri == 0 );
   }
 
   {
-    const array_type a = { 4, 3, 2, 1, 0 };
+    const array_type a = { { 4, 3, 2, 1, 0 } };
     const int& cri = get<1>(a);
     VERIFY( cri == 3 );
   }
index 067a9f51da0c0ccb697c456621943589bfe9c3b8..7b45816da5087fd53c9862363d7dda0b4d0e1493 100644 (file)
@@ -1,6 +1,6 @@
 // 2007-08-20  <benjamin@redhat.com>
 //
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -34,7 +34,8 @@ template<typename T>
     typedef std::tr1::hash<value_type>         hash_type;
     using std::size_t;
 
-    value_type v; // default initialized is fine, same value all that matters.
+    value_type v = T(); // default initialized is fine, same value all
+                        // that matters.
     hash_type h1;
     size_t r1 = size_t(h1(v));
     
index 2af47e5bd170ba62fcb56b5b0d1eb4841e8b49ad..3525bf2cb7c46675a12232c7a014aa49932d7876 100644 (file)
@@ -1,6 +1,7 @@
 // 2004-09-23 Chris Jefferson <chris@bubblescope.net>
 
-// Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008
+// Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -39,7 +40,7 @@ test_constructors()
   const int &z1=x1;
 
   // Test empty constructor
-  tuple<> ta;
+  tuple<> ta __attribute__((unused));
   tuple<int,int> tb;
   // Test construction from values
   tuple<int,int> tc(x1,x2);
index de34ba44809f3fff76d04b259a0859c1d52f9d5a..73f9ed6879a46c8219fa4187a82056ddc5fe8b39 100644 (file)
@@ -1,6 +1,7 @@
 // 2004-09-23 Chris Jefferson <chris@bubblescope.net>
 
-// Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006, 2007, 2008
+// Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -35,7 +36,7 @@ main()
   const int &z1=x1;
 
   // Test empty constructor
-  tuple<> ta;
+  tuple<> ta __attribute__((unused));
   tuple<int,int> tb;
   // Test construction from values
   tuple<int,int> tc(x1,x2);