diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2012-05-21 23:40:55 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2012-05-21 23:40:55 +0000 |
commit | d847ec803dc79f9e98321d36a956e379708bcbfa (patch) | |
tree | 5298fa886dca3337e1527526a7376d7b2c24e5a6 /libstdc++-v3 | |
parent | c5e0766b42ec592e5cb0de03af01eb237f25a1ab (diff) | |
download | gcc-d847ec803dc79f9e98321d36a956e379708bcbfa.zip gcc-d847ec803dc79f9e98321d36a956e379708bcbfa.tar.gz gcc-d847ec803dc79f9e98321d36a956e379708bcbfa.tar.bz2 |
9780-2.cc: Avoid -Wall warnings.
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.
From-SVN: r187751
Diffstat (limited to 'libstdc++-v3')
18 files changed, 144 insertions, 123 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 63585b9..fd5b246 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,27 @@ 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. + +2012-05-21 Paolo Carlini <paolo.carlini@oracle.com> + PR c++/53361 * testsuite/23_containers/array/cons/53361.cc: New. diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/9780-2.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/9780-2.cc index 5cf0d04..817a3a8 100644 --- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/9780-2.cc +++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/9780-2.cc @@ -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 @@ void test01() 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 @@ void test02() 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 @@ void test02() int main() { // Sanity check. - char c = npunct.thousands_sep(); + char c __attribute__((unused)) = npunct.thousands_sep(); string s = npunct.grouping(); test01(); diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/erase/1.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/erase/1.cc index 9863ef7..602acb9 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_map/erase/1.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_map/erase/1.cc @@ -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 @@ void test01() 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 @@ void test01() 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 @@ void test01() 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 @@ void test01() 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 @@ void test01() 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 @@ void test01() 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() ); } diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/observers.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/observers.cc index 4a6847e..7a467f6 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_map/observers.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_map/observers.cc @@ -25,6 +25,6 @@ test01() { 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(); } diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/1.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/1.cc index c599cc0..5935c6d 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/1.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/1.cc @@ -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 @@ void test01() 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 @@ void test01() 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 @@ void test01() 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 @@ void test01() 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 @@ void test01() 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 @@ void test01() 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() ); } diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/2.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/2.cc index df73a85..15db3f4 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/2.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/2.cc @@ -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 @@ void test01() 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() diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/insert/53115.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/insert/53115.cc index 4eb5d42..82f93c3 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_multimap/insert/53115.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/insert/53115.cc @@ -40,57 +40,57 @@ void test01() 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() ); } diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/observers.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/observers.cc index 634bd9d..7b675d7 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_multimap/observers.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/observers.cc @@ -25,6 +25,6 @@ test01() { 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(); } diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/1.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/1.cc index b95c8a3..59d58f9 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/1.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/1.cc @@ -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 @@ void test01() 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 @@ void test01() 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 @@ void test01() 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 @@ void test01() 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 @@ void test01() 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 @@ void test01() 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() ); } diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/2.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/2.cc index ad6cad4..1bfa70a 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/2.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/2.cc @@ -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 @@ void test01() 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() diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/insert/53115.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/insert/53115.cc index a23eacb..f54ce33 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_multiset/insert/53115.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/insert/53115.cc @@ -40,57 +40,57 @@ void test01() 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() ); } diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/insert/multiset_range.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/insert/multiset_range.cc index 59cd8c9..f204758 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_multiset/insert/multiset_range.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/insert/multiset_range.cc @@ -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 @@ void test01() 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 @@ void test02() 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() diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/observers.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/observers.cc index 0ea3e5b..51b02c7 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_multiset/observers.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/observers.cc @@ -25,6 +25,6 @@ test01() { 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(); } diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/erase/1.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/erase/1.cc index cdefef2..bca9cb7 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_set/erase/1.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/erase/1.cc @@ -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 @@ void test01() 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 @@ void test01() 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 @@ void test01() 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 @@ void test01() 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 @@ void test01() 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 @@ void test01() 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() ); } diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/observers.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/observers.cc index c18b059..4e2264e 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_set/observers.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/observers.cc @@ -25,6 +25,6 @@ test01() { 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(); } diff --git a/libstdc++-v3/testsuite/23_containers/vector/debug/alloc_prop.cc b/libstdc++-v3/testsuite/23_containers/vector/debug/alloc_prop.cc index fffc466..c2fa659 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/debug/alloc_prop.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/debug/alloc_prop.cc @@ -67,8 +67,8 @@ struct X ~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() diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/cons/49445.cc b/libstdc++-v3/testsuite/29_atomics/atomic/cons/49445.cc index 569df4a..f44575a 100644 --- a/libstdc++-v3/testsuite/29_atomics/atomic/cons/49445.cc +++ b/libstdc++-v3/testsuite/29_atomics/atomic/cons/49445.cc @@ -33,10 +33,10 @@ enum class tacos : int 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; } diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/operators/pointer_partial_void.cc b/libstdc++-v3/testsuite/29_atomics/atomic/operators/pointer_partial_void.cc index fcc9708..cf2a65a 100644 --- a/libstdc++-v3/testsuite/29_atomics/atomic/operators/pointer_partial_void.cc +++ b/libstdc++-v3/testsuite/29_atomics/atomic/operators/pointer_partial_void.cc @@ -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 @@ int main(void) 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); |