Patchwork [v3] Avoid -Wall warnings

login
register
mail settings
Submitter Paolo Carlini
Date May 21, 2012, 11:41 p.m.
Message ID <4FBAD29F.1050502@oracle.com>
Download mbox | patch
Permalink /patch/160502/
State New
Headers show

Comments

Paolo Carlini - May 21, 2012, 11:41 p.m.
Hi,

tested x86_64-linux, committed.

Paolo.

//////////////////////////
2012-05-21  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/22_locale/num_put/put/char/9780-2.cc: Avoid -Wall warnings.
	* testsuite/29_atomics/atomic/cons/49445.cc: Likewise.
	* testsuite/29_atomics/atomic/operators/pointer_partial_void.cc:
	* Likewise.
	* testsuite/23_containers/unordered_map/observers.cc: Likewise.
	* testsuite/23_containers/unordered_map/erase/1.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/erase/1.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/erase/2.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/insert/53115.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/observers.cc: Likewise.
	* testsuite/23_containers/vector/debug/alloc_prop.cc: Likewise.
	* testsuite/23_containers/unordered_set/observers.cc: Likewise.
	* testsuite/23_containers/unordered_set/erase/1.cc: Likewise.
	* testsuite/23_containers/unordered_multiset/erase/1.cc: Likewise.
	* testsuite/23_containers/unordered_multiset/erase/2.cc: Likewise.
	* testsuite/23_containers/unordered_multiset/insert/53115.cc: Likewise.
	* testsuite/23_containers/unordered_multiset/insert/multiset_range.cc:
	* Likewise.
	* testsuite/23_containers/unordered_multiset/observers.cc: Likewise.

Patch

Index: testsuite/22_locale/num_put/put/char/9780-2.cc
===================================================================
--- testsuite/22_locale/num_put/put/char/9780-2.cc	(revision 187733)
+++ testsuite/22_locale/num_put/put/char/9780-2.cc	(working copy)
@@ -1,7 +1,7 @@ 
 // { dg-require-namedlocale "de_DE" }
 // { dg-require-namedlocale "es_ES" }
 
-// Copyright (C) 2004, 2005, 2009, 2011 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2009, 2011, 2012 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 @@ 
 
   locale l2 = locale("C");
   const numpunct<char>& npunct2 = use_facet<numpunct<char> >(l2);
-  char c = npunct2.thousands_sep();
+  char c __attribute__((unused)) = npunct2.thousands_sep();
   string s = npunct2.grouping();
 
   ostringstream oss;
@@ -53,7 +53,7 @@ 
 
   locale l2 = locale("es_ES");
   const numpunct<char>& npunct3 = use_facet<numpunct<char> >(l2);
-  char c = npunct3.thousands_sep();
+  char c __attribute__((unused)) = npunct3.thousands_sep();
   string s = npunct3.grouping();
 
   ostringstream oss;
@@ -72,7 +72,7 @@ 
 int main()
 {
   // Sanity check.
-  char c = npunct.thousands_sep();
+  char c __attribute__((unused)) = npunct.thousands_sep();
   string s = npunct.grouping();
 
   test01();
Index: testsuite/29_atomics/atomic/cons/49445.cc
===================================================================
--- testsuite/29_atomics/atomic/cons/49445.cc	(revision 187733)
+++ testsuite/29_atomics/atomic/cons/49445.cc	(working copy)
@@ -33,10 +33,10 @@ 
 int main()
 {
   std::atomic<float> af(0.0f);
-  float non_af = af;
+  float non_af __attribute__((unused)) = af;
   
   std::atomic<tacos> ae(tacos::sabor);
-  tacos non_ae = ae;
+  tacos non_ae __attribute__((unused)) = ae;
 
   return 0;
 }
Index: testsuite/29_atomics/atomic/operators/pointer_partial_void.cc
===================================================================
--- testsuite/29_atomics/atomic/operators/pointer_partial_void.cc	(revision 187733)
+++ testsuite/29_atomics/atomic/operators/pointer_partial_void.cc	(working copy)
@@ -26,8 +26,6 @@ 
 // atomic<void*> vs. explicitly specialized w/o operators, like atomic_bool?
 int main(void)
 {
-  // bool test __attribute__((unused)) = true;
-
   using namespace std;
 
   typedef int 	value_type;
@@ -35,7 +33,7 @@ 
   value_type value = 42;
   value_type* p = &value;
   void* vp = p;
-  ptrdiff_t dist(0);
+  ptrdiff_t __attribute__((unused)) dist(0);
 
   atomic<void*> a(vp);
 
Index: testsuite/23_containers/unordered_map/observers.cc
===================================================================
--- testsuite/23_containers/unordered_map/observers.cc	(revision 187733)
+++ testsuite/23_containers/unordered_map/observers.cc	(working copy)
@@ -25,6 +25,6 @@ 
 {
   std::unordered_map<int, int> um;
 
-  auto ke = um.key_eq();
-  auto h = um.hash_function();
+  auto ke __attribute__((unused)) = um.key_eq();
+  auto h __attribute__((unused)) = um.hash_function();
 }
Index: testsuite/23_containers/unordered_map/erase/1.cc
===================================================================
--- testsuite/23_containers/unordered_map/erase/1.cc	(revision 187733)
+++ testsuite/23_containers/unordered_map/erase/1.cc	(working copy)
@@ -2,7 +2,7 @@ 
 
 // 2010-02-10  Paolo Carlini  <paolo.carlini@oracle.com> 
 //
-// Copyright (C) 2010 Free Software Foundation, Inc.
+// Copyright (C) 2010, 2012 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
@@ -58,19 +58,19 @@ 
   m1.insert(value_type("one line behind", 10));
   VERIFY( m1.size() == 10 );
   VERIFY( get_nb_bucket_elems(m1) == m1.size() );
-  VERIFY( distance(m1.begin(), m1.end()) == m1.size() );
+  VERIFY( distance(m1.begin(), m1.end()) - m1.size() == 0 );
 
   VERIFY( m1.erase("eeilo") == 1 );
   VERIFY( m1.size() == 9 );
   VERIFY( get_nb_bucket_elems(m1) == m1.size() );
-  VERIFY( distance(m1.begin(), m1.end()) == m1.size() );
+  VERIFY( distance(m1.begin(), m1.end()) - m1.size() == 0 );
   iterator it1 = m1.find("eeilo");
   VERIFY( it1 == m1.end() );
 
   VERIFY( m1.erase("tillsammans") == 1 );
   VERIFY( m1.size() == 8 );
   VERIFY( get_nb_bucket_elems(m1) == m1.size() );
-  VERIFY( distance(m1.begin(), m1.end()) == m1.size() );
+  VERIFY( distance(m1.begin(), m1.end()) - m1.size() == 0 );
   iterator it2 = m1.find("tillsammans");
   VERIFY( it2 == m1.end() );
 
@@ -80,14 +80,14 @@ 
   VERIFY( m1.erase(it3->first) == 1 );
   VERIFY( m1.size() == 7 );
   VERIFY( get_nb_bucket_elems(m1) == m1.size() );
-  VERIFY( distance(m1.begin(), m1.end()) == m1.size() );
+  VERIFY( distance(m1.begin(), m1.end()) - m1.size() == 0 );
   it3 = m1.find("belonging (no longer mix)");
   VERIFY( it3 == m1.end() );
 
   VERIFY( !m1.erase("abra") );
   VERIFY( m1.size() == 7 );
   VERIFY( get_nb_bucket_elems(m1) == m1.size() );
-  VERIFY( distance(m1.begin(), m1.end()) == m1.size() );
+  VERIFY( distance(m1.begin(), m1.end()) - m1.size() == 0 );
 
   VERIFY( !m1.erase("eeilo") );
   VERIFY( m1.size() == 7 );
@@ -95,7 +95,7 @@ 
   VERIFY( m1.erase("because to why") == 1 );
   VERIFY( m1.size() == 6 );
   VERIFY( get_nb_bucket_elems(m1) == m1.size() );
-  VERIFY( distance(m1.begin(), m1.end()) == m1.size() );
+  VERIFY( distance(m1.begin(), m1.end()) - m1.size() == 0 );
   iterator it4 = m1.find("because to why");
   VERIFY( it4 == m1.end() );
 
@@ -112,14 +112,14 @@ 
   VERIFY( m1.erase(it5->first) == 1 );
   VERIFY( m1.size() == 5 );
   VERIFY( get_nb_bucket_elems(m1) == m1.size() );
-  VERIFY( distance(m1.begin(), m1.end()) == m1.size() );
+  VERIFY( distance(m1.begin(), m1.end()) - m1.size() == 0 );
   it5 = m1.find("umbra/penumbra");
   VERIFY( it5 == m1.end() );
 
   VERIFY( m1.erase(it6->first) == 1 );
   VERIFY( m1.size() == 4 );
   VERIFY( get_nb_bucket_elems(m1) == m1.size() );
-  VERIFY( distance(m1.begin(), m1.end()) == m1.size() );
+  VERIFY( distance(m1.begin(), m1.end()) - m1.size() == 0 );
   it6 = m1.find("one line behind");
   VERIFY( it6 == m1.end() );
 
@@ -132,7 +132,7 @@ 
   VERIFY( m1.erase(it8->first) == 1 );
   VERIFY( m1.size() == 3 );
   VERIFY( get_nb_bucket_elems(m1) == m1.size() );
-  VERIFY( distance(m1.begin(), m1.end()) == m1.size() );
+  VERIFY( distance(m1.begin(), m1.end()) - m1.size() == 0 );
   VERIFY( ++it7 == it9 );
 
   iterator it10 = it9;
@@ -141,20 +141,20 @@ 
 
   VERIFY( m1.erase(it9->first) == 1 );
   VERIFY( get_nb_bucket_elems(m1) == m1.size() );
-  VERIFY( distance(m1.begin(), m1.end()) == m1.size() );
+  VERIFY( distance(m1.begin(), m1.end()) - m1.size() == 0 );
   VERIFY( m1.size() == 2 );
   VERIFY( ++it10 == m1.end() );
 
   VERIFY( m1.erase(m1.begin()) != m1.end() );  
   VERIFY( m1.size() == 1 );
   VERIFY( get_nb_bucket_elems(m1) == m1.size() );
-  VERIFY( distance(m1.begin(), m1.end()) == m1.size() );
+  VERIFY( distance(m1.begin(), m1.end()) - m1.size() == 0 );
   VERIFY( m1.begin() == it11 );
 
   VERIFY( m1.erase(m1.begin()->first) == 1 );  
   VERIFY( m1.size() == 0 );
   VERIFY( get_nb_bucket_elems(m1) == m1.size() );
-  VERIFY( distance(m1.begin(), m1.end()) == m1.size() );
+  VERIFY( distance(m1.begin(), m1.end()) - m1.size() == 0 );
   VERIFY( m1.begin() == m1.end() );
 }
 
Index: testsuite/23_containers/unordered_multimap/erase/1.cc
===================================================================
--- testsuite/23_containers/unordered_multimap/erase/1.cc	(revision 187733)
+++ testsuite/23_containers/unordered_multimap/erase/1.cc	(working copy)
@@ -2,7 +2,7 @@ 
 
 // 2010-02-10  Paolo Carlini  <paolo.carlini@oracle.com> 
 //
-// Copyright (C) 2010 Free Software Foundation, Inc.
+// Copyright (C) 2010, 2012 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
@@ -59,19 +59,19 @@ 
   mm1.insert(value_type("because to why", 11));
   VERIFY( mm1.size() == 11 );
   VERIFY( get_nb_bucket_elems(mm1) == mm1.size() );
-  VERIFY( distance(mm1.begin(), mm1.end()) == mm1.size() );
+  VERIFY( distance(mm1.begin(), mm1.end()) - mm1.size() == 0 );
 
   VERIFY( mm1.erase("eeilo") == 1 );
   VERIFY( mm1.size() == 10 );
   VERIFY( get_nb_bucket_elems(mm1) == mm1.size() );
-  VERIFY( distance(mm1.begin(), mm1.end()) == mm1.size() );
+  VERIFY( distance(mm1.begin(), mm1.end()) - mm1.size() == 0 );
   iterator it1 = mm1.find("eeilo");
   VERIFY( it1 == mm1.end() );
 
   VERIFY( mm1.erase("tillsammans") == 1 );
   VERIFY( mm1.size() == 9 );
   VERIFY( get_nb_bucket_elems(mm1) == mm1.size() );
-  VERIFY( distance(mm1.begin(), mm1.end()) == mm1.size() );
+  VERIFY( distance(mm1.begin(), mm1.end()) - mm1.size() == 0 );
   iterator it2 = mm1.find("tillsammans");
   VERIFY( it2 == mm1.end() );
 
@@ -81,14 +81,14 @@ 
   VERIFY( mm1.erase(it3->first) == 1 );
   VERIFY( mm1.size() == 8 );
   VERIFY( get_nb_bucket_elems(mm1) == mm1.size() );
-  VERIFY( distance(mm1.begin(), mm1.end()) == mm1.size() );
+  VERIFY( distance(mm1.begin(), mm1.end()) - mm1.size() == 0 );
   it3 = mm1.find("belonging (no longer mix)");
   VERIFY( it3 == mm1.end() );
 
   VERIFY( !mm1.erase("abra") );
   VERIFY( mm1.size() == 8 );
   VERIFY( get_nb_bucket_elems(mm1) == mm1.size() );
-  VERIFY( distance(mm1.begin(), mm1.end()) == mm1.size() );
+  VERIFY( distance(mm1.begin(), mm1.end()) - mm1.size() == 0 );
 
   VERIFY( !mm1.erase("eeilo") );
   VERIFY( mm1.size() == 8 );
@@ -96,7 +96,7 @@ 
   VERIFY( mm1.erase("because to why") == 2 );
   VERIFY( mm1.size() == 6 );
   VERIFY( get_nb_bucket_elems(mm1) == mm1.size() );
-  VERIFY( distance(mm1.begin(), mm1.end()) == mm1.size() );
+  VERIFY( distance(mm1.begin(), mm1.end()) - mm1.size() == 0 );
   iterator it4 = mm1.find("because to why");
   VERIFY( it4 == mm1.end() );
 
@@ -113,14 +113,14 @@ 
   VERIFY( mm1.erase(it5->first) == 1 );
   VERIFY( mm1.size() == 5 );
   VERIFY( get_nb_bucket_elems(mm1) == mm1.size() );
-  VERIFY( distance(mm1.begin(), mm1.end()) == mm1.size() );
+  VERIFY( distance(mm1.begin(), mm1.end()) - mm1.size() == 0 );
   it5 = mm1.find("umbra/penumbra");
   VERIFY( it5 == mm1.end() );
 
   VERIFY( mm1.erase(it6->first) == 1 );
   VERIFY( mm1.size() == 4 );
   VERIFY( get_nb_bucket_elems(mm1) == mm1.size() );
-  VERIFY( distance(mm1.begin(), mm1.end()) == mm1.size() );
+  VERIFY( distance(mm1.begin(), mm1.end()) - mm1.size() == 0 );
   it6 = mm1.find("one line behind");
   VERIFY( it6 == mm1.end() );
 
@@ -133,7 +133,7 @@ 
   VERIFY( mm1.erase(it8->first) == 1 );
   VERIFY( mm1.size() == 3 );
   VERIFY( get_nb_bucket_elems(mm1) == mm1.size() );
-  VERIFY( distance(mm1.begin(), mm1.end()) == mm1.size() );
+  VERIFY( distance(mm1.begin(), mm1.end()) - mm1.size() == 0 );
   VERIFY( ++it7 == it9 );
 
   iterator it10 = it9;
@@ -142,20 +142,20 @@ 
 
   VERIFY( mm1.erase(it9->first) == 1 );
   VERIFY( get_nb_bucket_elems(mm1) == mm1.size() );
-  VERIFY( distance(mm1.begin(), mm1.end()) == mm1.size() );
+  VERIFY( distance(mm1.begin(), mm1.end()) - mm1.size() == 0 );
   VERIFY( mm1.size() == 2 );
   VERIFY( ++it10 == mm1.end() );
 
   VERIFY( mm1.erase(mm1.begin()) != mm1.end() );  
   VERIFY( mm1.size() == 1 );
   VERIFY( get_nb_bucket_elems(mm1) == mm1.size() );
-  VERIFY( distance(mm1.begin(), mm1.end()) == mm1.size() );
+  VERIFY( distance(mm1.begin(), mm1.end()) - mm1.size() == 0 );
   VERIFY( mm1.begin() == it11 );
 
   VERIFY( mm1.erase(mm1.begin()->first) == 1 );  
   VERIFY( mm1.size() == 0 );
   VERIFY( get_nb_bucket_elems(mm1) == mm1.size() );
-  VERIFY( distance(mm1.begin(), mm1.end()) == mm1.size() );
+  VERIFY( distance(mm1.begin(), mm1.end()) - mm1.size() == 0 );
   VERIFY( mm1.begin() == mm1.end() );
 }
 
Index: testsuite/23_containers/unordered_multimap/erase/2.cc
===================================================================
--- testsuite/23_containers/unordered_multimap/erase/2.cc	(revision 187733)
+++ testsuite/23_containers/unordered_multimap/erase/2.cc	(working copy)
@@ -1,6 +1,6 @@ 
 // { dg-options "-std=gnu++0x" }
 
-// Copyright (C) 2011 Free Software Foundation, Inc.
+// Copyright (C) 2011, 2012 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
@@ -58,29 +58,29 @@ 
   mm1.insert(value_type("bar", 25));
   VERIFY( mm1.size() == 12 );
   VERIFY( get_nb_bucket_elems(mm1) == mm1.size() );
-  VERIFY( distance(mm1.begin(), mm1.end()) == mm1.size() );
+  VERIFY( distance(mm1.begin(), mm1.end()) - mm1.size() == 0 );
 
   VERIFY( mm1.erase(mm1.begin()) != mm1.end() );
   VERIFY( mm1.size() == 11 );
   VERIFY( get_nb_bucket_elems(mm1) == mm1.size() );
-  VERIFY( distance(mm1.begin(), mm1.end()) == mm1.size() );
+  VERIFY( distance(mm1.begin(), mm1.end()) - mm1.size() == 0 );
 
   auto it = mm1.begin();
   advance(it, 2);
   VERIFY( mm1.erase(mm1.begin(), it) != mm1.end() );
   VERIFY( mm1.size() == 9 );
   VERIFY( get_nb_bucket_elems(mm1) == mm1.size() );
-  VERIFY( distance(mm1.begin(), mm1.end()) == mm1.size() );
+  VERIFY( distance(mm1.begin(), mm1.end()) - mm1.size() == 0 );
 
   VERIFY( mm1.erase(mm1.begin()->first) == 3 );
   VERIFY( mm1.size() == 6 );
   VERIFY( get_nb_bucket_elems(mm1) == mm1.size() );
-  VERIFY( distance(mm1.begin(), mm1.end()) == mm1.size() );
+  VERIFY( distance(mm1.begin(), mm1.end()) - mm1.size() == 0 );
 
   VERIFY( mm1.erase(mm1.begin(), mm1.end()) == mm1.end() );
   VERIFY( mm1.empty() );
   VERIFY( get_nb_bucket_elems(mm1) == mm1.size() );
-  VERIFY( distance(mm1.begin(), mm1.end()) == mm1.size() );
+  VERIFY( distance(mm1.begin(), mm1.end()) - mm1.size() == 0 );
 }
 
 int main()
Index: testsuite/23_containers/unordered_multimap/insert/53115.cc
===================================================================
--- testsuite/23_containers/unordered_multimap/insert/53115.cc	(revision 187733)
+++ testsuite/23_containers/unordered_multimap/insert/53115.cc	(working copy)
@@ -40,57 +40,57 @@ 
   std::unordered_multimap<int, int> umm;
   umm.insert(make_pair(10, 1));
   VERIFY( umm.size() == 1 );
-  VERIFY( std::distance(umm.begin(), umm.end()) == umm.size() );
+  VERIFY( distance(umm.begin(), umm.end()) - umm.size() == 0 );
   VERIFY( get_nb_bucket_elems(umm) == umm.size() );
 
   umm.insert(make_pair(10, 2)); 
   VERIFY( umm.size() == 2 );
-  VERIFY( std::distance(umm.begin(), umm.end()) == umm.size() );
+  VERIFY( distance(umm.begin(), umm.end()) - umm.size() == 0 );
   VERIFY( get_nb_bucket_elems(umm) == umm.size() );
 
   umm.insert(make_pair(10, 3));
   VERIFY( umm.size() == 3 );
-  VERIFY( std::distance(umm.begin(), umm.end()) == umm.size() );
+  VERIFY( distance(umm.begin(), umm.end()) - umm.size() == 0 );
   VERIFY( get_nb_bucket_elems(umm) == umm.size() );
 
   umm.insert(make_pair(10, 4));
   VERIFY( umm.size() == 4 );
-  VERIFY( std::distance(umm.begin(), umm.end()) == umm.size() );
+  VERIFY( distance(umm.begin(), umm.end()) - umm.size() == 0 );
   VERIFY( get_nb_bucket_elems(umm) == umm.size() );
 
   umm.insert(make_pair(10, 5));
   VERIFY( umm.size() == 5 );
-  VERIFY( std::distance(umm.begin(), umm.end()) == umm.size() );
+  VERIFY( distance(umm.begin(), umm.end()) - umm.size() == 0 );
   VERIFY( get_nb_bucket_elems(umm) == umm.size() );
 
   umm.insert(make_pair(24, 6));
   VERIFY( umm.size() == 6 );
-  VERIFY( std::distance(umm.begin(), umm.end()) == umm.size() );
+  VERIFY( distance(umm.begin(), umm.end()) - umm.size() == 0 );
   VERIFY( get_nb_bucket_elems(umm) == umm.size() );
 
   umm.insert(make_pair(25, 7));
   VERIFY( umm.size() == 7 );
-  VERIFY( std::distance(umm.begin(), umm.end()) == umm.size() );
+  VERIFY( distance(umm.begin(), umm.end()) - umm.size() == 0 );
   VERIFY( get_nb_bucket_elems(umm) == umm.size() );
 
   umm.insert(make_pair(2, 8));
   VERIFY( umm.size() == 8 );
-  VERIFY( std::distance(umm.begin(), umm.end()) == umm.size() );
+  VERIFY( distance(umm.begin(), umm.end()) - umm.size() == 0 );
   VERIFY( get_nb_bucket_elems(umm) == umm.size() );
 
   umm.insert(make_pair(2, 9));
   VERIFY( umm.size() == 9 );
-  VERIFY( std::distance(umm.begin(), umm.end()) == umm.size() );
+  VERIFY( distance(umm.begin(), umm.end()) - umm.size() == 0 );
   VERIFY( get_nb_bucket_elems(umm) == umm.size() );
 
   umm.insert(make_pair(1, 10));
   VERIFY( umm.size() == 10 );
-  VERIFY( std::distance(umm.begin(), umm.end()) == umm.size() );
+  VERIFY( distance(umm.begin(), umm.end()) - umm.size() == 0 );
   VERIFY( get_nb_bucket_elems(umm) == umm.size() );
 
   umm.insert(make_pair(10, 11));
   VERIFY( umm.size() == 11 );
-  VERIFY( std::distance(umm.begin(), umm.end()) == umm.size() );
+  VERIFY( distance(umm.begin(), umm.end()) - umm.size() == 0 );
   VERIFY( get_nb_bucket_elems(umm) == umm.size() );
 }
 
Index: testsuite/23_containers/unordered_multimap/observers.cc
===================================================================
--- testsuite/23_containers/unordered_multimap/observers.cc	(revision 187733)
+++ testsuite/23_containers/unordered_multimap/observers.cc	(working copy)
@@ -25,6 +25,6 @@ 
 {
   std::unordered_multimap<int, int> um;
 
-  auto ke = um.key_eq();
-  auto h = um.hash_function();
+  auto ke __attribute__((unused)) = um.key_eq();
+  auto h __attribute__((unused)) = um.hash_function();
 }
Index: testsuite/23_containers/vector/debug/alloc_prop.cc
===================================================================
--- testsuite/23_containers/vector/debug/alloc_prop.cc	(revision 187733)
+++ testsuite/23_containers/vector/debug/alloc_prop.cc	(working copy)
@@ -67,8 +67,8 @@ 
   ~X() { }
   X(const X&) { }
   X(X&&) { }
-  X& operator=(const X&) { }
-  X& operator=(X&&) { }
+  X& operator=(const X&) { return *this; }
+  X& operator=(X&&) { return *this; }
 };
 
 int main()
Index: testsuite/23_containers/unordered_set/observers.cc
===================================================================
--- testsuite/23_containers/unordered_set/observers.cc	(revision 187733)
+++ testsuite/23_containers/unordered_set/observers.cc	(working copy)
@@ -25,6 +25,6 @@ 
 {
   std::unordered_set<int> us;
 
-  auto ke = us.key_eq();
-  auto h = us.hash_function();
+  auto ke __attribute__((unused)) = us.key_eq();
+  auto h __attribute__((unused)) = us.hash_function();
 }
Index: testsuite/23_containers/unordered_set/erase/1.cc
===================================================================
--- testsuite/23_containers/unordered_set/erase/1.cc	(revision 187733)
+++ testsuite/23_containers/unordered_set/erase/1.cc	(working copy)
@@ -2,7 +2,7 @@ 
 
 // 2010-02-10  Paolo Carlini  <paolo.carlini@oracle.com> 
 //
-// Copyright (C) 2010 Free Software Foundation, Inc.
+// Copyright (C) 2010, 2012 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
@@ -57,19 +57,19 @@ 
   s1.insert("one line behind");
   VERIFY( s1.size() == 10 );
   VERIFY( get_nb_bucket_elems(s1) == s1.size() );
-  VERIFY( distance(s1.begin(), s1.end()) == s1.size() );
+  VERIFY( distance(s1.begin(), s1.end()) - s1.size() == 0 );
 
   VERIFY( s1.erase("eeilo") == 1 );
   VERIFY( s1.size() == 9 );
   VERIFY( get_nb_bucket_elems(s1) == s1.size() );
-  VERIFY( distance(s1.begin(), s1.end()) == s1.size() );
+  VERIFY( distance(s1.begin(), s1.end()) - s1.size() == 0 );
   iterator it1 = s1.find("eeilo");
   VERIFY( it1 == s1.end() );
 
   VERIFY( s1.erase("tillsammans") == 1 );
   VERIFY( s1.size() == 8 );
   VERIFY( get_nb_bucket_elems(s1) == s1.size() );
-  VERIFY( distance(s1.begin(), s1.end()) == s1.size() );
+  VERIFY( distance(s1.begin(), s1.end()) - s1.size() == 0 );
   iterator it2 = s1.find("tillsammans");
   VERIFY( it2 == s1.end() );
 
@@ -79,14 +79,14 @@ 
   VERIFY( s1.erase(*it3) == 1 );
   VERIFY( s1.size() == 7 );
   VERIFY( get_nb_bucket_elems(s1) == s1.size() );
-  VERIFY( distance(s1.begin(), s1.end()) == s1.size() );
+  VERIFY( distance(s1.begin(), s1.end()) - s1.size() == 0 );
   it3 = s1.find("belonging (no longer mix)");
   VERIFY( it3 == s1.end() );
 
   VERIFY( !s1.erase("abra") );
   VERIFY( s1.size() == 7 );
   VERIFY( get_nb_bucket_elems(s1) == s1.size() );
-  VERIFY( distance(s1.begin(), s1.end()) == s1.size() );
+  VERIFY( distance(s1.begin(), s1.end()) - s1.size() == 0 );
 
   VERIFY( !s1.erase("eeilo") );
   VERIFY( s1.size() == 7 );
@@ -94,7 +94,7 @@ 
   VERIFY( s1.erase("because to why") == 1 );
   VERIFY( s1.size() == 6 );
   VERIFY( get_nb_bucket_elems(s1) == s1.size() );
-  VERIFY( distance(s1.begin(), s1.end()) == s1.size() );
+  VERIFY( distance(s1.begin(), s1.end()) - s1.size() == 0 );
   iterator it4 = s1.find("because to why");
   VERIFY( it4 == s1.end() );
 
@@ -111,14 +111,14 @@ 
   VERIFY( s1.erase(*it5) == 1 );
   VERIFY( s1.size() == 5 );
   VERIFY( get_nb_bucket_elems(s1) == s1.size() );
-  VERIFY( distance(s1.begin(), s1.end()) == s1.size() );
+  VERIFY( distance(s1.begin(), s1.end()) - s1.size() == 0 );
   it5 = s1.find("umbra/penumbra");
   VERIFY( it5 == s1.end() );
 
   VERIFY( s1.erase(*it6) == 1 );
   VERIFY( s1.size() == 4 );
   VERIFY( get_nb_bucket_elems(s1) == s1.size() );
-  VERIFY( distance(s1.begin(), s1.end()) == s1.size() );
+  VERIFY( distance(s1.begin(), s1.end()) - s1.size() == 0 );
   it6 = s1.find("one line behind");
   VERIFY( it6 == s1.end() );
 
@@ -131,7 +131,7 @@ 
   VERIFY( s1.erase(*it8) == 1 );
   VERIFY( s1.size() == 3 );
   VERIFY( get_nb_bucket_elems(s1) == s1.size() );
-  VERIFY( distance(s1.begin(), s1.end()) == s1.size() );
+  VERIFY( distance(s1.begin(), s1.end()) - s1.size() == 0 );
   VERIFY( ++it7 == it9 );
 
   iterator it10 = it9;
@@ -140,20 +140,20 @@ 
 
   VERIFY( s1.erase(*it9) == 1 );
   VERIFY( get_nb_bucket_elems(s1) == s1.size() );
-  VERIFY( distance(s1.begin(), s1.end()) == s1.size() );
+  VERIFY( distance(s1.begin(), s1.end()) - s1.size() == 0 );
   VERIFY( s1.size() == 2 );
   VERIFY( ++it10 == s1.end() );
 
   VERIFY( s1.erase(s1.begin()) != s1.end() );  
   VERIFY( s1.size() == 1 );
   VERIFY( get_nb_bucket_elems(s1) == s1.size() );
-  VERIFY( distance(s1.begin(), s1.end()) == s1.size() );
+  VERIFY( distance(s1.begin(), s1.end()) - s1.size() == 0 );
   VERIFY( s1.begin() == it11 );
 
   VERIFY( s1.erase(*s1.begin()) == 1 );  
   VERIFY( s1.size() == 0 );
   VERIFY( get_nb_bucket_elems(s1) == s1.size() );
-  VERIFY( distance(s1.begin(), s1.end()) == s1.size() );
+  VERIFY( distance(s1.begin(), s1.end()) - s1.size() == 0 );
   VERIFY( s1.begin() == s1.end() );
 }
 
Index: testsuite/23_containers/unordered_multiset/erase/1.cc
===================================================================
--- testsuite/23_containers/unordered_multiset/erase/1.cc	(revision 187733)
+++ testsuite/23_containers/unordered_multiset/erase/1.cc	(working copy)
@@ -2,7 +2,7 @@ 
 
 // 2010-02-10  Paolo Carlini  <paolo.carlini@oracle.com> 
 //
-// Copyright (C) 2010 Free Software Foundation, Inc.
+// Copyright (C) 2010, 2012 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
@@ -58,19 +58,19 @@ 
   ms1.insert("because to why");
   VERIFY( ms1.size() == 11 );
   VERIFY( get_nb_bucket_elems(ms1) == ms1.size() );
-  VERIFY( distance(ms1.begin(), ms1.end()) == ms1.size() );
+  VERIFY( distance(ms1.begin(), ms1.end()) - ms1.size() == 0 );
 
   VERIFY( ms1.erase("eeilo") == 1 );
   VERIFY( ms1.size() == 10 );
   VERIFY( get_nb_bucket_elems(ms1) == ms1.size() );
-  VERIFY( distance(ms1.begin(), ms1.end()) == ms1.size() );
+  VERIFY( distance(ms1.begin(), ms1.end()) - ms1.size() == 0 );
   iterator it1 = ms1.find("eeilo");
   VERIFY( it1 == ms1.end() );
 
   VERIFY( ms1.erase("tillsammans") == 1 );
   VERIFY( ms1.size() == 9 );
   VERIFY( get_nb_bucket_elems(ms1) == ms1.size() );
-  VERIFY( distance(ms1.begin(), ms1.end()) == ms1.size() );
+  VERIFY( distance(ms1.begin(), ms1.end()) - ms1.size() == 0 );
   iterator it2 = ms1.find("tillsammans");
   VERIFY( it2 == ms1.end() );
 
@@ -80,14 +80,14 @@ 
   VERIFY( ms1.erase(*it3) == 1 );
   VERIFY( ms1.size() == 8 );
   VERIFY( get_nb_bucket_elems(ms1) == ms1.size() );
-  VERIFY( distance(ms1.begin(), ms1.end()) == ms1.size() );
+  VERIFY( distance(ms1.begin(), ms1.end()) - ms1.size() == 0 );
   it3 = ms1.find("belonging (no longer mix)");
   VERIFY( it3 == ms1.end() );
 
   VERIFY( !ms1.erase("abra") );
   VERIFY( ms1.size() == 8 );
   VERIFY( get_nb_bucket_elems(ms1) == ms1.size() );
-  VERIFY( distance(ms1.begin(), ms1.end()) == ms1.size() );
+  VERIFY( distance(ms1.begin(), ms1.end()) - ms1.size() == 0 );
 
   VERIFY( !ms1.erase("eeilo") );
   VERIFY( ms1.size() == 8 );
@@ -95,7 +95,7 @@ 
   VERIFY( ms1.erase("because to why") == 2 );
   VERIFY( ms1.size() == 6 );
   VERIFY( get_nb_bucket_elems(ms1) == ms1.size() );
-  VERIFY( distance(ms1.begin(), ms1.end()) == ms1.size() );
+  VERIFY( distance(ms1.begin(), ms1.end()) - ms1.size() == 0 );
   iterator it4 = ms1.find("because to why");
   VERIFY( it4 == ms1.end() );
 
@@ -112,14 +112,14 @@ 
   VERIFY( ms1.erase(*it5) == 1 );
   VERIFY( ms1.size() == 5 );
   VERIFY( get_nb_bucket_elems(ms1) == ms1.size() );
-  VERIFY( distance(ms1.begin(), ms1.end()) == ms1.size() );
+  VERIFY( distance(ms1.begin(), ms1.end()) - ms1.size() == 0 );
   it5 = ms1.find("umbra/penumbra");
   VERIFY( it5 == ms1.end() );
 
   VERIFY( ms1.erase(*it6) == 1 );
   VERIFY( ms1.size() == 4 );
   VERIFY( get_nb_bucket_elems(ms1) == ms1.size() );
-  VERIFY( distance(ms1.begin(), ms1.end()) == ms1.size() );
+  VERIFY( distance(ms1.begin(), ms1.end()) - ms1.size() == 0 );
   it6 = ms1.find("one line behind");
   VERIFY( it6 == ms1.end() );
 
@@ -132,7 +132,7 @@ 
   VERIFY( ms1.erase(*it8) == 1 );
   VERIFY( ms1.size() == 3 );
   VERIFY( get_nb_bucket_elems(ms1) == ms1.size() );
-  VERIFY( distance(ms1.begin(), ms1.end()) == ms1.size() );
+  VERIFY( distance(ms1.begin(), ms1.end()) - ms1.size() == 0 );
   VERIFY( ++it7 == it9 );
 
   iterator it10 = it9;
@@ -141,20 +141,20 @@ 
 
   VERIFY( ms1.erase(*it9) == 1 );
   VERIFY( get_nb_bucket_elems(ms1) == ms1.size() );
-  VERIFY( distance(ms1.begin(), ms1.end()) == ms1.size() );
+  VERIFY( distance(ms1.begin(), ms1.end()) - ms1.size() == 0 );
   VERIFY( ms1.size() == 2 );
   VERIFY( ++it10 == ms1.end() );
 
   VERIFY( ms1.erase(ms1.begin()) != ms1.end() );  
   VERIFY( ms1.size() == 1 );
   VERIFY( get_nb_bucket_elems(ms1) == ms1.size() );
-  VERIFY( distance(ms1.begin(), ms1.end()) == ms1.size() );
+  VERIFY( distance(ms1.begin(), ms1.end()) - ms1.size() == 0 );
   VERIFY( ms1.begin() == it11 );
 
   VERIFY( ms1.erase(*ms1.begin()) == 1 );  
   VERIFY( ms1.size() == 0 );
   VERIFY( get_nb_bucket_elems(ms1) == ms1.size() );
-  VERIFY( distance(ms1.begin(), ms1.end()) == ms1.size() );
+  VERIFY( distance(ms1.begin(), ms1.end()) - ms1.size() == 0 );
   VERIFY( ms1.begin() == ms1.end() );
 }
 
Index: testsuite/23_containers/unordered_multiset/erase/2.cc
===================================================================
--- testsuite/23_containers/unordered_multiset/erase/2.cc	(revision 187733)
+++ testsuite/23_containers/unordered_multiset/erase/2.cc	(working copy)
@@ -1,6 +1,6 @@ 
 // { dg-options "-std=gnu++0x" }
 
-// Copyright (C) 2011 Free Software Foundation, Inc.
+// Copyright (C) 2011, 2012 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
@@ -57,29 +57,29 @@ 
   ms1.insert("bar");
   VERIFY( ms1.size() == 12 );
   VERIFY( get_nb_bucket_elems(ms1) == ms1.size() );
-  VERIFY( distance(ms1.begin(), ms1.end()) == ms1.size() );
+  VERIFY( distance(ms1.begin(), ms1.end()) - ms1.size() == 0 );
 
   VERIFY( ms1.erase(ms1.begin()) != ms1.end() );
   VERIFY( ms1.size() == 11 );
   VERIFY( get_nb_bucket_elems(ms1) == ms1.size() );
-  VERIFY( distance(ms1.begin(), ms1.end()) == ms1.size() );
+  VERIFY( distance(ms1.begin(), ms1.end()) - ms1.size() == 0 );
 
   auto it = ms1.begin();
   advance(it, 2);
   VERIFY( ms1.erase(ms1.begin(), it) != ms1.end() );
   VERIFY( ms1.size() == 9 );
   VERIFY( get_nb_bucket_elems(ms1) == ms1.size() );
-  VERIFY( distance(ms1.begin(), ms1.end()) == ms1.size() );
+  VERIFY( distance(ms1.begin(), ms1.end()) - ms1.size() == 0 );
 
   VERIFY( ms1.erase(*(ms1.begin())) == 3 );
   VERIFY( ms1.size() == 6 );
   VERIFY( get_nb_bucket_elems(ms1) == ms1.size() );
-  VERIFY( distance(ms1.begin(), ms1.end()) == ms1.size() );
+  VERIFY( distance(ms1.begin(), ms1.end()) - ms1.size() == 0 );
 
   VERIFY( ms1.erase(ms1.begin(), ms1.end()) == ms1.end() );
   VERIFY( ms1.empty() );
   VERIFY( get_nb_bucket_elems(ms1) == ms1.size() );
-  VERIFY( distance(ms1.begin(), ms1.end()) == ms1.size() );
+  VERIFY( distance(ms1.begin(), ms1.end()) - ms1.size() == 0 );
 }
 
 int main()
Index: testsuite/23_containers/unordered_multiset/insert/53115.cc
===================================================================
--- testsuite/23_containers/unordered_multiset/insert/53115.cc	(revision 187733)
+++ testsuite/23_containers/unordered_multiset/insert/53115.cc	(working copy)
@@ -40,57 +40,57 @@ 
   std::unordered_multiset<int> mms;
   mms.insert(10);
   VERIFY( mms.size() == 1 );
-  VERIFY( std::distance(mms.begin(), mms.end()) == mms.size() );
+  VERIFY( distance(mms.begin(), mms.end()) - mms.size() == 0 );
   VERIFY( get_nb_bucket_elems(mms) == mms.size() );
 
   mms.insert(10); 
   VERIFY( mms.size() == 2 );
-  VERIFY( std::distance(mms.begin(), mms.end()) == mms.size() );
+  VERIFY( distance(mms.begin(), mms.end()) - mms.size() == 0 );
   VERIFY( get_nb_bucket_elems(mms) == mms.size() );
 
   mms.insert(10);
   VERIFY( mms.size() == 3 );
-  VERIFY( std::distance(mms.begin(), mms.end()) == mms.size() );
+  VERIFY( distance(mms.begin(), mms.end()) - mms.size() == 0 );
   VERIFY( get_nb_bucket_elems(mms) == mms.size() );
 
   mms.insert(10);
   VERIFY( mms.size() == 4 );
-  VERIFY( std::distance(mms.begin(), mms.end()) == mms.size() );
+  VERIFY( distance(mms.begin(), mms.end()) - mms.size() == 0 );
   VERIFY( get_nb_bucket_elems(mms) == mms.size() );
 
   mms.insert(10);
   VERIFY( mms.size() == 5 );
-  VERIFY( std::distance(mms.begin(), mms.end()) == mms.size() );
+  VERIFY( distance(mms.begin(), mms.end()) - mms.size() == 0 );
   VERIFY( get_nb_bucket_elems(mms) == mms.size() );
 
   mms.insert(24);
   VERIFY( mms.size() == 6 );
-  VERIFY( std::distance(mms.begin(), mms.end()) == mms.size() );
+  VERIFY( distance(mms.begin(), mms.end()) - mms.size() == 0 );
   VERIFY( get_nb_bucket_elems(mms) == mms.size() );
 
   mms.insert(25);
   VERIFY( mms.size() == 7 );
-  VERIFY( std::distance(mms.begin(), mms.end()) == mms.size() );
+  VERIFY( distance(mms.begin(), mms.end()) - mms.size() == 0 );
   VERIFY( get_nb_bucket_elems(mms) == mms.size() );
 
   mms.insert(2);
   VERIFY( mms.size() == 8 );
-  VERIFY( std::distance(mms.begin(), mms.end()) == mms.size() );
+  VERIFY( distance(mms.begin(), mms.end()) - mms.size() == 0 );
   VERIFY( get_nb_bucket_elems(mms) == mms.size() );
 
   mms.insert(2);
   VERIFY( mms.size() == 9 );
-  VERIFY( std::distance(mms.begin(), mms.end()) == mms.size() );
+  VERIFY( distance(mms.begin(), mms.end()) - mms.size() == 0 );
   VERIFY( get_nb_bucket_elems(mms) == mms.size() );
 
   mms.insert(1);
   VERIFY( mms.size() == 10 );
-  VERIFY( std::distance(mms.begin(), mms.end()) == mms.size() );
+  VERIFY( distance(mms.begin(), mms.end()) - mms.size() == 0 );
   VERIFY( get_nb_bucket_elems(mms) == mms.size() );
 
   mms.insert(10);
   VERIFY( mms.size() == 11 );
-  VERIFY( std::distance(mms.begin(), mms.end()) == mms.size() );
+  VERIFY( distance(mms.begin(), mms.end()) - mms.size() == 0 );
   VERIFY( get_nb_bucket_elems(mms) == mms.size() );
 }
 
Index: testsuite/23_containers/unordered_multiset/insert/multiset_range.cc
===================================================================
--- testsuite/23_containers/unordered_multiset/insert/multiset_range.cc	(revision 187733)
+++ testsuite/23_containers/unordered_multiset/insert/multiset_range.cc	(working copy)
@@ -1,6 +1,6 @@ 
 // { dg-options "-std=gnu++0x" }
 
-// Copyright (C) 2010 Free Software Foundation, Inc.
+// Copyright (C) 2010, 2012 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,16 +50,17 @@ 
   const std::string A[N] = { "red", "green", "blue", "violet", "cyan",
 			     "magenta", "yellow", "orange", "pink", "gray" };
 
-  s.insert(A+0, A+N);
+  s.insert(A + 0, A + N);
   VERIFY( s.size() == static_cast<unsigned int>(N) );
-  VERIFY( std::distance(s.begin(), s.end()) == N );
-  VERIFY( get_nb_bucket_elems(s) == N );
+  VERIFY( std::distance(s.begin(), s.end()) - N == 0 );
+  VERIFY( get_nb_bucket_elems(s) - N == 0 );
 
-  for (int i = 0; i < N; ++i) {
-    std::string str = A[i];
-    Set::iterator it = std::find(s.begin(), s.end(), str);
-    VERIFY(it != s.end());
-  }
+  for (int i = 0; i < N; ++i)
+    {
+      std::string str = A[i];
+      Set::iterator it = std::find(s.begin(), s.end(), str);
+      VERIFY(it != s.end());
+    }
 }
 
 void test02()
@@ -74,16 +75,16 @@ 
   const int A[N] = { 3, 7, 4, 8, 2, 4, 6, 7 };
 
   s.insert(A+0, A+N);
-  VERIFY(s.size() == static_cast<unsigned int>(N));
-  VERIFY(std::distance(s.begin(), s.end()) == N);
-  VERIFY( get_nb_bucket_elems(s) == N );
+  VERIFY( s.size() == static_cast<unsigned int>(N) );
+  VERIFY( std::distance(s.begin(), s.end()) - N == 0 );
+  VERIFY( get_nb_bucket_elems(s) - N == 0 );
 
-  VERIFY(std::count(s.begin(), s.end(), 2) == 1);
-  VERIFY(std::count(s.begin(), s.end(), 3) == 1);
-  VERIFY(std::count(s.begin(), s.end(), 4) == 2);
-  VERIFY(std::count(s.begin(), s.end(), 6) == 1);
-  VERIFY(std::count(s.begin(), s.end(), 7) == 2);
-  VERIFY(std::count(s.begin(), s.end(), 8) == 1);
+  VERIFY( std::count(s.begin(), s.end(), 2) == 1 );
+  VERIFY( std::count(s.begin(), s.end(), 3) == 1 );
+  VERIFY( std::count(s.begin(), s.end(), 4) == 2 );
+  VERIFY( std::count(s.begin(), s.end(), 6) == 1 );
+  VERIFY( std::count(s.begin(), s.end(), 7) == 2 );
+  VERIFY( std::count(s.begin(), s.end(), 8) == 1 );
 }
 
 int main()
Index: testsuite/23_containers/unordered_multiset/observers.cc
===================================================================
--- testsuite/23_containers/unordered_multiset/observers.cc	(revision 187733)
+++ testsuite/23_containers/unordered_multiset/observers.cc	(working copy)
@@ -25,6 +25,6 @@ 
 {
   std::unordered_multiset<int> us;
 
-  auto ke = us.key_eq();
-  auto h = us.hash_function();
+  auto ke __attribute__((unused)) = us.key_eq();
+  auto h __attribute__((unused)) = us.hash_function();
 }