This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[v3] Fix remaining -Wall testsuite warnings
- From: Paolo Carlini <pcarlini at suse dot de>
- To: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 31 Jan 2008 18:20:58 +0100
- Subject: [v3] Fix remaining -Wall testsuite warnings
Hi,
tested x86_64-linux, committed to mainline.
Paolo.
//////////////////
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.
Index: testsuite/27_io/basic_istream/extractors_character/pod/3983-2.cc
===================================================================
--- testsuite/27_io/basic_istream/extractors_character/pod/3983-2.cc (revision 131977)
+++ testsuite/27_io/basic_istream/extractors_character/pod/3983-2.cc (working copy)
@@ -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 @@
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: testsuite/22_locale/global_templates/user_facet_hierarchies.cc
===================================================================
--- testsuite/22_locale/global_templates/user_facet_hierarchies.cc (revision 131977)
+++ testsuite/22_locale/global_templates/user_facet_hierarchies.cc (working copy)
@@ -56,8 +56,6 @@
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: testsuite/22_locale/global_templates/standard_facet_hierarchies.cc
===================================================================
--- testsuite/22_locale/global_templates/standard_facet_hierarchies.cc (revision 131977)
+++ testsuite/22_locale/global_templates/standard_facet_hierarchies.cc (working copy)
@@ -37,8 +37,6 @@
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: testsuite/tr1/6_containers/hash/operators/size_t.cc
===================================================================
--- testsuite/tr1/6_containers/hash/operators/size_t.cc (revision 131977)
+++ testsuite/tr1/6_containers/hash/operators/size_t.cc (working copy)
@@ -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 @@
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: testsuite/tr1/6_containers/tuple/cons/big_tuples.cc
===================================================================
--- testsuite/tr1/6_containers/tuple/cons/big_tuples.cc (revision 131977)
+++ testsuite/tr1/6_containers/tuple/cons/big_tuples.cc (working copy)
@@ -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 @@
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: testsuite/tr1/6_containers/tuple/cons/constructor.cc
===================================================================
--- testsuite/tr1/6_containers/tuple/cons/constructor.cc (revision 131977)
+++ testsuite/tr1/6_containers/tuple/cons/constructor.cc (working copy)
@@ -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 @@
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: testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc
===================================================================
--- testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc (revision 131977)
+++ testsuite/tr1/6_containers/array/cons/aggregate_initialization.cc (working copy)
@@ -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 @@
{
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: testsuite/tr1/6_containers/array/requirements/contiguous.cc
===================================================================
--- testsuite/tr1/6_containers/array/requirements/contiguous.cc (revision 131977)
+++ testsuite/tr1/6_containers/array/requirements/contiguous.cc (working copy)
@@ -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 @@
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: testsuite/tr1/6_containers/array/requirements/member_swap.cc
===================================================================
--- testsuite/tr1/6_containers/array/requirements/member_swap.cc (revision 131977)
+++ testsuite/tr1/6_containers/array/requirements/member_swap.cc (working copy)
@@ -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 @@
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: testsuite/tr1/6_containers/array/requirements/assign.cc
===================================================================
--- testsuite/tr1/6_containers/array/requirements/assign.cc (revision 131977)
+++ testsuite/tr1/6_containers/array/requirements/assign.cc (working copy)
@@ -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 @@
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: testsuite/tr1/6_containers/array/specialized_algorithms/swap.cc
===================================================================
--- testsuite/tr1/6_containers/array/specialized_algorithms/swap.cc (revision 131977)
+++ testsuite/tr1/6_containers/array/specialized_algorithms/swap.cc (working copy)
@@ -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 @@
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: testsuite/tr1/6_containers/array/comparison_operators/less_or_equal.cc
===================================================================
--- testsuite/tr1/6_containers/array/comparison_operators/less_or_equal.cc (revision 131977)
+++ testsuite/tr1/6_containers/array/comparison_operators/less_or_equal.cc (working copy)
@@ -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 @@
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: testsuite/tr1/6_containers/array/comparison_operators/greater_or_equal.cc
===================================================================
--- testsuite/tr1/6_containers/array/comparison_operators/greater_or_equal.cc (revision 131977)
+++ testsuite/tr1/6_containers/array/comparison_operators/greater_or_equal.cc (working copy)
@@ -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 @@
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: testsuite/tr1/6_containers/array/comparison_operators/less.cc
===================================================================
--- testsuite/tr1/6_containers/array/comparison_operators/less.cc (revision 131977)
+++ testsuite/tr1/6_containers/array/comparison_operators/less.cc (working copy)
@@ -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 @@
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: testsuite/tr1/6_containers/array/comparison_operators/equal.cc
===================================================================
--- testsuite/tr1/6_containers/array/comparison_operators/equal.cc (revision 131977)
+++ testsuite/tr1/6_containers/array/comparison_operators/equal.cc (working copy)
@@ -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 @@
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: testsuite/tr1/6_containers/array/comparison_operators/not_equal.cc
===================================================================
--- testsuite/tr1/6_containers/array/comparison_operators/not_equal.cc (revision 131977)
+++ testsuite/tr1/6_containers/array/comparison_operators/not_equal.cc (working copy)
@@ -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 @@
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: testsuite/tr1/6_containers/array/comparison_operators/greater.cc
===================================================================
--- testsuite/tr1/6_containers/array/comparison_operators/greater.cc (revision 131977)
+++ testsuite/tr1/6_containers/array/comparison_operators/greater.cc (working copy)
@@ -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 @@
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: testsuite/tr1/6_containers/array/tuple_interface/get.cc
===================================================================
--- testsuite/tr1/6_containers/array/tuple_interface/get.cc (revision 131977)
+++ testsuite/tr1/6_containers/array/tuple_interface/get.cc (working copy)
@@ -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 @@
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: testsuite/tr1/6_containers/array/element_access/at_out_of_range.cc
===================================================================
--- testsuite/tr1/6_containers/array/element_access/at_out_of_range.cc (revision 131977)
+++ testsuite/tr1/6_containers/array/element_access/at_out_of_range.cc (working copy)
@@ -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 @@
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: testsuite/tr1/6_containers/array/element_access/back.cc
===================================================================
--- testsuite/tr1/6_containers/array/element_access/back.cc (revision 131977)
+++ testsuite/tr1/6_containers/array/element_access/back.cc (working copy)
@@ -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 @@
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: testsuite/tr1/6_containers/array/element_access/front.cc
===================================================================
--- testsuite/tr1/6_containers/array/element_access/front.cc (revision 131977)
+++ testsuite/tr1/6_containers/array/element_access/front.cc (working copy)
@@ -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 @@
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: testsuite/tr1/6_containers/array/element_access/data.cc
===================================================================
--- testsuite/tr1/6_containers/array/element_access/data.cc (revision 131977)
+++ testsuite/tr1/6_containers/array/element_access/data.cc (working copy)
@@ -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 @@
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: testsuite/tr1/6_containers/array/iterators/end_is_one_past.cc
===================================================================
--- testsuite/tr1/6_containers/array/iterators/end_is_one_past.cc (revision 131977)
+++ testsuite/tr1/6_containers/array/iterators/end_is_one_past.cc (working copy)
@@ -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 @@
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: testsuite/tr1/6_containers/array/capacity/empty.cc
===================================================================
--- testsuite/tr1/6_containers/array/capacity/empty.cc (revision 131977)
+++ testsuite/tr1/6_containers/array/capacity/empty.cc (working copy)
@@ -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 @@
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 @@
typedef std::tr1::array<int, len> array_type;
bool test __attribute__((unused)) = true;
array_type a;
-
+
VERIFY( a.empty() == true );
}
}
Index: testsuite/tr1/6_containers/array/capacity/max_size.cc
===================================================================
--- testsuite/tr1/6_containers/array/capacity/max_size.cc (revision 131977)
+++ testsuite/tr1/6_containers/array/capacity/max_size.cc (working copy)
@@ -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 @@
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 @@
typedef std::tr1::array<int, len> array_type;
bool test __attribute__((unused)) = true;
array_type a;
-
+
VERIFY( a.max_size() == len );
}
}
Index: testsuite/tr1/6_containers/array/capacity/size.cc
===================================================================
--- testsuite/tr1/6_containers/array/capacity/size.cc (revision 131977)
+++ testsuite/tr1/6_containers/array/capacity/size.cc (working copy)
@@ -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 @@
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 @@
typedef std::tr1::array<int, len> array_type;
bool test __attribute__((unused)) = true;
array_type a;
-
+
VERIFY( a.size() == len );
}
}
Index: testsuite/thread/guard.cc
===================================================================
--- testsuite/thread/guard.cc (revision 131977)
+++ testsuite/thread/guard.cc (working copy)
@@ -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 @@
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 @@
int
main (int argc, char **argv)
{
- static int foo = get_foo ();
+ static int foo __attribute__((unused)) = get_foo ();
return 0;
}
Index: testsuite/20_util/tuple/cons/big_tuples.cc
===================================================================
--- testsuite/20_util/tuple/cons/big_tuples.cc (revision 131977)
+++ testsuite/20_util/tuple/cons/big_tuples.cc (working copy)
@@ -38,7 +38,7 @@
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: testsuite/20_util/tuple/cons/constructor.cc
===================================================================
--- testsuite/20_util/tuple/cons/constructor.cc (revision 131977)
+++ testsuite/20_util/tuple/cons/constructor.cc (working copy)
@@ -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 @@
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: testsuite/20_util/shared_ptr/creation/dr402.cc
===================================================================
--- testsuite/20_util/shared_ptr/creation/dr402.cc (revision 131977)
+++ testsuite/20_util/shared_ptr/creation/dr402.cc (working copy)
@@ -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 @@
// 20.6.6.2.6 shared_ptr creation [util.smartptr.shared.create]
-int
+void
test01()
{
bool test __attribute__((unused)) = true;
@@ -45,4 +45,5 @@
main()
{
test01();
+ return 0;
}
Index: testsuite/20_util/shared_ptr/creation/make.cc
===================================================================
--- testsuite/20_util/shared_ptr/creation/make.cc (revision 131977)
+++ testsuite/20_util/shared_ptr/creation/make.cc (working copy)
@@ -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 @@
// 20.6.6.2.6 shared_ptr creation [util.smartptr.shared.create]
-int
+void
test01()
{
bool test __attribute__((unused)) = true;
@@ -64,7 +64,7 @@
VERIFY( A::ctor_count == A::dtor_count );
}
-int
+void
test02()
{
bool test __attribute__((unused)) = true;
@@ -88,8 +88,6 @@
p1 = std::shared_ptr<A>();
VERIFY( A::ctor_count == A::dtor_count );
-
- return 0;
}
int
Index: testsuite/20_util/shared_ptr/creation/alloc.cc
===================================================================
--- testsuite/20_util/shared_ptr/creation/alloc.cc (revision 131977)
+++ testsuite/20_util/shared_ptr/creation/alloc.cc (working copy)
@@ -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 @@
// 20.6.6.2.6 shared_ptr creation [util.smartptr.shared.create]
-int
+void
test01()
{
bool test __attribute__((unused)) = true;
@@ -68,10 +68,11 @@
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 @@
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 @@
{
test01();
test02();
+ return 0;
}
Index: testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc
===================================================================
--- testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc (revision 131977)
+++ testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc (working copy)
@@ -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 @@
#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: testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc
===================================================================
--- testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc (revision 131977)
+++ testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc (working copy)
@@ -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 @@
#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));