From f8ef786cfd35341f4c3d1742375e22f829a0876f Mon Sep 17 00:00:00 2001
From: bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Tue, 23 Sep 2003 20:03:30 +0000
Subject: [PATCH] 2003-09-23  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/locale_facets.tcc: Tweak to avoid warnings.
	* testsuite/testsuite_hooks.h: Same.
	* testsuite/*/*.cc: Same.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71693 138bc75d-0d04-0410-961f-82ee72b054a4
---
 libstdc++-v3/ChangeLog                        |   6 +
 libstdc++-v3/include/bits/locale_facets.tcc   |   2 +-
 .../testsuite/17_intro/header_cerrno.cc       |   5 +-
 .../testsuite/17_intro/header_ciso646.cc      | 119 ------------------
 .../testsuite/17_intro/header_csetjmp.cc      |   4 +-
 .../testsuite/17_intro/header_cstdarg.cc      |   4 +-
 .../testsuite/17_intro/header_cstddef.cc      |   4 +-
 .../testsuite/17_intro/header_cstdio.cc       |   4 +-
 .../testsuite/17_intro/header_cstdlib.cc      |   8 +-
 .../testsuite/17_intro/header_cstring.cc      |   4 +-
 .../testsuite/17_intro/header_ctime.cc        |   5 +-
 .../testsuite/17_intro/header_cwchar.cc       |   6 +-
 .../testsuite/18_support/numeric_limits.cc    |  20 +--
 .../testsuite/19_diagnostics/stdexceptions.cc |   8 +-
 .../testsuite/20_util/allocator_members.cc    |   4 +-
 libstdc++-v3/testsuite/20_util/auto_ptr.cc    |  30 ++---
 libstdc++-v3/testsuite/20_util/binders.cc     |   6 +-
 libstdc++-v3/testsuite/20_util/pairs.cc       |   8 +-
 .../testsuite/20_util/raw_storage_iterator.cc |   4 +-
 .../testsuite/20_util/temporary_buffer.cc     |   2 +-
 .../21_strings/basic_string/append/char/1.cc  |   5 +-
 .../basic_string/append/wchar_t/1.cc          |   5 +-
 .../21_strings/basic_string/assign/char/1.cc  |   2 +-
 .../21_strings/basic_string/assign/char/2.cc  |   2 +-
 .../21_strings/basic_string/assign/char/3.cc  |   2 +-
 .../basic_string/assign/wchar_t/1.cc          |   2 +-
 .../basic_string/assign/wchar_t/2.cc          |   2 +-
 .../basic_string/assign/wchar_t/3.cc          |   2 +-
 .../21_strings/basic_string/capacity/1.cc     |   4 +-
 .../basic_string/capacity/char/1.cc           |   6 +-
 .../basic_string/capacity/char/2.cc           |   2 +-
 .../basic_string/capacity/wchar_t/1.cc        |   6 +-
 .../basic_string/capacity/wchar_t/2.cc        |   2 +-
 .../21_strings/basic_string/cons/char/1.cc    |   4 +-
 .../21_strings/basic_string/cons/char/2.cc    |   2 +-
 .../21_strings/basic_string/cons/char/3.cc    |   2 +-
 .../21_strings/basic_string/cons/char/4.cc    |   2 +-
 .../21_strings/basic_string/cons/char/5.cc    |   2 +-
 .../21_strings/basic_string/cons/wchar_t/1.cc |   4 +-
 .../21_strings/basic_string/cons/wchar_t/2.cc |   2 +-
 .../21_strings/basic_string/cons/wchar_t/3.cc |   2 +-
 .../21_strings/basic_string/cons/wchar_t/4.cc |   2 +-
 .../21_strings/basic_string/cons/wchar_t/5.cc |   2 +-
 .../basic_string/element_access/char/1.cc     |   7 +-
 .../basic_string/element_access/char/2.cc     |   3 +-
 .../basic_string/element_access/char/3.cc     |   4 +-
 .../basic_string/element_access/wchar_t/1.cc  |   7 +-
 .../basic_string/element_access/wchar_t/2.cc  |   3 +-
 .../basic_string/element_access/wchar_t/3.cc  |   4 +-
 .../21_strings/basic_string/find/char/1.cc    |   2 +-
 .../21_strings/basic_string/find/char/2.cc    |   2 +-
 .../21_strings/basic_string/find/char/3.cc    |   2 +-
 .../21_strings/basic_string/find/wchar_t/1.cc |   2 +-
 .../21_strings/basic_string/find/wchar_t/2.cc |   2 +-
 .../21_strings/basic_string/find/wchar_t/3.cc |   2 +-
 .../21_strings/basic_string/insert/char/1.cc  |   3 +-
 .../21_strings/basic_string/insert/char/2.cc  |   2 +-
 .../basic_string/insert/wchar_t/1.cc          |   3 +-
 .../basic_string/insert/wchar_t/2.cc          |   2 +-
 .../inserters_extractors/char/1.cc            |   4 +-
 .../inserters_extractors/char/4.cc            |   6 +-
 .../inserters_extractors/char/5.cc            |   6 +-
 .../inserters_extractors/char/6.cc            |   2 +-
 .../inserters_extractors/char/7.cc            |   2 +-
 .../inserters_extractors/char/8.cc            |   2 +-
 .../inserters_extractors/char/9.cc            |   2 +-
 .../inserters_extractors/wchar_t/1.cc         |   4 +-
 .../inserters_extractors/wchar_t/4.cc         |   6 +-
 .../inserters_extractors/wchar_t/5.cc         |   6 +-
 .../inserters_extractors/wchar_t/6.cc         |   2 +-
 .../inserters_extractors/wchar_t/7.cc         |   2 +-
 .../inserters_extractors/wchar_t/8.cc         |   2 +-
 .../inserters_extractors/wchar_t/9.cc         |   2 +-
 .../basic_string/operators/char/1.cc          |   6 +-
 .../basic_string/operators/char/2.cc          |   2 +-
 .../basic_string/operators/wchar_t/1.cc       |   6 +-
 .../basic_string/operators/wchar_t/2.cc       |   2 +-
 .../21_strings/basic_string/replace/char/1.cc |   4 +-
 .../21_strings/basic_string/replace/char/2.cc |   2 +-
 .../21_strings/basic_string/replace/char/3.cc |   2 +-
 .../21_strings/basic_string/replace/char/4.cc |   2 +-
 .../21_strings/basic_string/replace/char/5.cc |   2 +-
 .../basic_string/replace/wchar_t/1.cc         |   4 +-
 .../basic_string/replace/wchar_t/2.cc         |   2 +-
 .../basic_string/replace/wchar_t/3.cc         |   2 +-
 .../basic_string/replace/wchar_t/4.cc         |   2 +-
 .../basic_string/replace/wchar_t/5.cc         |   2 +-
 .../21_strings/basic_string/rfind/char/1.cc   |   2 +-
 .../21_strings/basic_string/rfind/char/2.cc   |   2 +-
 .../21_strings/basic_string/rfind/char/3.cc   |   2 +-
 .../basic_string/rfind/wchar_t/1.cc           |   2 +-
 .../basic_string/rfind/wchar_t/2.cc           |   2 +-
 .../basic_string/rfind/wchar_t/3.cc           |   2 +-
 .../21_strings/basic_string/substr/char/1.cc  |   5 +-
 .../basic_string/substr/wchar_t/1.cc          |   5 +-
 .../testsuite/21_strings/c_strings/char/1.cc  |   2 +-
 .../testsuite/21_strings/c_strings/char/2.cc  |  15 +--
 .../21_strings/c_strings/wchar_t/1.cc         |   2 +-
 .../21_strings/c_strings/wchar_t/2.cc         |  13 +-
 .../char_traits/requirements/char/1.cc        |   2 +-
 .../char_traits/requirements/short/1.cc       |   2 +-
 .../char_traits/requirements/wchar_t/1.cc     |   2 +-
 .../21_strings/char_traits/typedefs/char/1.cc |   2 +-
 libstdc++-v3/testsuite/22_locale/codecvt/1.cc |   2 +-
 .../22_locale/codecvt/always_noconv/char/1.cc |   6 +-
 .../codecvt/always_noconv/wchar_t/1.cc        |   2 +-
 .../codecvt/always_noconv/wchar_t/2.cc        |   2 +-
 .../codecvt/always_noconv/wchar_t/3.cc        |   2 +-
 .../codecvt/always_noconv/wchar_t/4.cc        |   2 +-
 .../22_locale/codecvt/encoding/char/1.cc      |   6 +-
 .../22_locale/codecvt/encoding/wchar_t/1.cc   |   2 +-
 .../22_locale/codecvt/encoding/wchar_t/2.cc   |   2 +-
 .../22_locale/codecvt/encoding/wchar_t/3.cc   |   2 +-
 .../22_locale/codecvt/encoding/wchar_t/4.cc   |   2 +-
 .../testsuite/22_locale/codecvt/in/char/1.cc  |   2 +-
 .../22_locale/codecvt/in/wchar_t/1.cc         |   2 +-
 .../22_locale/codecvt/in/wchar_t/2.cc         |   2 +-
 .../22_locale/codecvt/in/wchar_t/3.cc         |   2 +-
 .../22_locale/codecvt/in/wchar_t/4.cc         |   2 +-
 .../22_locale/codecvt/in/wchar_t/5.cc         |   2 +-
 .../22_locale/codecvt/in/wchar_t/6.cc         |   2 +-
 .../22_locale/codecvt/in/wchar_t/7.cc         |   2 +-
 .../22_locale/codecvt/in/wchar_t/8.cc         |   2 +-
 .../22_locale/codecvt/in/wchar_t/9.cc         |   4 +-
 .../22_locale/codecvt/length/char/1.cc        |   2 +-
 .../22_locale/codecvt/length/char/2.cc        |   2 +-
 .../22_locale/codecvt/length/wchar_t/1.cc     |   2 +-
 .../22_locale/codecvt/length/wchar_t/2.cc     |   2 +-
 .../22_locale/codecvt/length/wchar_t/3.cc     |   2 +-
 .../22_locale/codecvt/length/wchar_t/4.cc     |   3 +-
 .../22_locale/codecvt/length/wchar_t/5.cc     |   2 +-
 .../22_locale/codecvt/length/wchar_t/6.cc     |   2 +-
 .../22_locale/codecvt/length/wchar_t/7.cc     |   3 +-
 .../22_locale/codecvt/max_length/char/1.cc    |   7 +-
 .../22_locale/codecvt/max_length/wchar_t/1.cc |   2 +-
 .../22_locale/codecvt/max_length/wchar_t/2.cc |   2 +-
 .../22_locale/codecvt/max_length/wchar_t/3.cc |   2 +-
 .../22_locale/codecvt/max_length/wchar_t/4.cc |   2 +-
 .../testsuite/22_locale/codecvt/out/char/1.cc |   2 +-
 .../22_locale/codecvt/out/wchar_t/1.cc        |   2 +-
 .../22_locale/codecvt/out/wchar_t/2.cc        |   2 +-
 .../22_locale/codecvt/out/wchar_t/3.cc        |   2 +-
 .../22_locale/codecvt/out/wchar_t/4.cc        |   2 +-
 .../22_locale/codecvt/out/wchar_t/5.cc        |   2 +-
 .../22_locale/codecvt/out/wchar_t/6.cc        |   2 +-
 .../22_locale/codecvt/out/wchar_t/7.cc        |   2 +-
 .../testsuite/22_locale/codecvt/unicode/1.cc  |   2 +-
 .../22_locale/codecvt/unicode/char.cc         |   4 +-
 .../22_locale/codecvt/unicode/wchar_t.cc      |   6 +-
 .../22_locale/codecvt/unshift/char/1.cc       |   2 +-
 .../22_locale/codecvt/unshift/wchar_t/1.cc    |   2 +-
 .../22_locale/codecvt/unshift/wchar_t/2.cc    |   2 +-
 .../22_locale/codecvt/unshift/wchar_t/3.cc    |   2 +-
 .../22_locale/codecvt/unshift/wchar_t/4.cc    |   2 +-
 libstdc++-v3/testsuite/22_locale/collate/1.cc |   2 +-
 .../22_locale/collate/compare/char/1.cc       |   5 +-
 .../22_locale/collate/compare/char/2.cc       |   7 +-
 .../22_locale/collate/compare/char/3.cc       |   2 +-
 .../22_locale/collate/compare/wchar_t/1.cc    |   5 +-
 .../22_locale/collate/compare/wchar_t/2.cc    |   7 +-
 .../22_locale/collate/compare/wchar_t/3.cc    |   2 +-
 .../22_locale/collate/hash/char/1.cc          |   2 +-
 .../22_locale/collate/hash/char/2.cc          |   9 +-
 .../22_locale/collate/hash/wchar_t/1.cc       |   2 +-
 .../22_locale/collate/hash/wchar_t/2.cc       |   9 +-
 .../22_locale/collate/transform/char/2.cc     |   7 +-
 .../22_locale/collate/transform/char/3.cc     |   2 +-
 .../22_locale/collate/transform/wchar_t/2.cc  |   7 +-
 .../22_locale/collate/transform/wchar_t/3.cc  |   2 +-
 .../testsuite/22_locale/collate_byname/1.cc   |   3 +-
 libstdc++-v3/testsuite/22_locale/ctype/1.cc   |  11 +-
 .../testsuite/22_locale/ctype/cons/char/1.cc  |   2 +-
 .../testsuite/22_locale/ctype/is/char/1.cc    |   8 +-
 .../testsuite/22_locale/ctype/is/char/2.cc    |   2 +-
 .../testsuite/22_locale/ctype/is/char/3.cc    |   2 +-
 .../testsuite/22_locale/ctype/is/wchar_t/1.cc |   9 +-
 .../testsuite/22_locale/ctype/is/wchar_t/2.cc |   2 +-
 .../22_locale/ctype/narrow/char/1.cc          |   6 +-
 .../22_locale/ctype/narrow/char/2.cc          |   6 +-
 .../22_locale/ctype/narrow/wchar_t/1.cc       |   6 +-
 .../22_locale/ctype/narrow/wchar_t/2.cc       |   6 +-
 .../22_locale/ctype/narrow/wchar_t/3.cc       |   2 +-
 .../testsuite/22_locale/ctype/scan/char/1.cc  |   2 +-
 .../22_locale/ctype/scan/wchar_t/1.cc         |   2 +-
 .../testsuite/22_locale/ctype/to/char/1.cc    |  10 +-
 .../testsuite/22_locale/ctype/to/wchar_t/1.cc |  10 +-
 .../testsuite/22_locale/ctype/widen/char/1.cc |   7 +-
 .../22_locale/ctype/widen/wchar_t/1.cc        |   7 +-
 .../22_locale/ctype/widen/wchar_t/2.cc        |   2 +-
 .../22_locale/ctype/widen/wchar_t/3.cc        |   2 +-
 libstdc++-v3/testsuite/22_locale/facet/1.cc   |   2 +-
 libstdc++-v3/testsuite/22_locale/facet/2.cc   |   2 +-
 .../testsuite/22_locale/global_templates/1.cc |   8 +-
 .../testsuite/22_locale/locale/cons/2.cc      |   2 +-
 .../testsuite/22_locale/locale/cons/4.cc      |   2 +-
 .../testsuite/22_locale/locale/cons/5.cc      |   2 +-
 .../testsuite/22_locale/locale/cons/6.cc      |   6 +-
 .../testsuite/22_locale/locale/cons/7.cc      |   2 +-
 .../testsuite/22_locale/locale/cons/7222-c.cc |   2 +-
 .../22_locale/locale/cons/7222-env.cc         |   2 +-
 .../testsuite/22_locale/locale/cons/8.cc      |   2 +-
 .../locale/global_locale_objects/1.cc         |   2 +-
 .../locale/global_locale_objects/2.cc         |   2 +-
 .../locale/global_locale_objects/3.cc         |   2 +-
 .../22_locale/locale/operations/1.cc          |   2 +-
 .../22_locale/locale/operations/2.cc          |   2 +-
 .../testsuite/22_locale/messages/1.cc         |   4 +-
 .../22_locale/messages/members/char/1.cc      |   5 +-
 .../22_locale/messages/members/char/2.cc      |   5 +-
 .../22_locale/messages/members/char/3.cc      |   4 +-
 .../testsuite/22_locale/messages_byname/1.cc  |   2 +-
 .../testsuite/22_locale/money_get/1.cc        |   2 +-
 .../22_locale/money_get/get/char/1.cc         |   8 +-
 .../22_locale/money_get/get/char/11528.cc     |   2 +-
 .../22_locale/money_get/get/char/2.cc         |   8 +-
 .../22_locale/money_get/get/char/3.cc         |  14 +--
 .../22_locale/money_get/get/char/4.cc         |  14 +--
 .../22_locale/money_get/get/char/5.cc         |   3 +-
 .../22_locale/money_get/get/char/6.cc         |   2 +-
 .../22_locale/money_get/get/char/7.cc         |   2 +-
 .../22_locale/money_get/get/char/8.cc         |   2 +-
 .../22_locale/money_get/get/wchar_t/1.cc      |   8 +-
 .../22_locale/money_get/get/wchar_t/11528.cc  |   2 +-
 .../22_locale/money_get/get/wchar_t/2.cc      |   8 +-
 .../22_locale/money_get/get/wchar_t/3.cc      |  14 +--
 .../22_locale/money_get/get/wchar_t/4.cc      |  14 +--
 .../22_locale/money_get/get/wchar_t/5.cc      |   3 +-
 .../22_locale/money_get/get/wchar_t/6.cc      |   2 +-
 .../22_locale/money_get/get/wchar_t/7.cc      |   2 +-
 .../22_locale/money_get/get/wchar_t/8.cc      |   2 +-
 .../testsuite/22_locale/money_put/1.cc        |   2 +-
 .../22_locale/money_put/put/char/1.cc         |   8 +-
 .../22_locale/money_put/put/char/2.cc         |   8 +-
 .../22_locale/money_put/put/char/3.cc         |  14 +--
 .../22_locale/money_put/put/char/4.cc         |   3 +-
 .../22_locale/money_put/put/char/5.cc         |   2 +-
 .../22_locale/money_put/put/char/6.cc         |   2 +-
 .../22_locale/money_put/put/wchar_t/1.cc      |   8 +-
 .../22_locale/money_put/put/wchar_t/2.cc      |   8 +-
 .../22_locale/money_put/put/wchar_t/3.cc      |  14 +--
 .../22_locale/money_put/put/wchar_t/4.cc      |   3 +-
 .../22_locale/money_put/put/wchar_t/5.cc      |   2 +-
 .../22_locale/money_put/put/wchar_t/6.cc      |   2 +-
 .../testsuite/22_locale/moneypunct/1.cc       |   2 +-
 .../testsuite/22_locale/moneypunct/2.cc       |   2 +-
 .../22_locale/moneypunct/members/char/1.cc    |   2 +-
 .../22_locale/moneypunct/members/char/2.cc    |   3 +-
 .../22_locale/moneypunct/members/wchar_t/1.cc |   2 +-
 .../22_locale/moneypunct/members/wchar_t/2.cc |   3 +-
 .../22_locale/moneypunct_byname/1.cc          |   2 +-
 libstdc++-v3/testsuite/22_locale/num_get/1.cc |   2 +-
 .../testsuite/22_locale/num_get/get/char/1.cc |  13 +-
 .../testsuite/22_locale/num_get/get/char/2.cc |  16 +--
 .../testsuite/22_locale/num_get/get/char/3.cc |  22 +---
 .../testsuite/22_locale/num_get/get/char/4.cc |   3 +-
 .../testsuite/22_locale/num_get/get/char/5.cc |   2 +-
 .../testsuite/22_locale/num_get/get/char/6.cc |   2 +-
 .../22_locale/num_get/get/wchar_t/1.cc        |  13 +-
 .../22_locale/num_get/get/wchar_t/2.cc        |  16 +--
 .../22_locale/num_get/get/wchar_t/3.cc        |  22 +---
 .../22_locale/num_get/get/wchar_t/4.cc        |   3 +-
 .../22_locale/num_get/get/wchar_t/5.cc        |   2 +-
 .../22_locale/num_get/get/wchar_t/6.cc        |   2 +-
 libstdc++-v3/testsuite/22_locale/num_put/1.cc |   2 +-
 .../testsuite/22_locale/num_put/put/char/1.cc |   9 +-
 .../testsuite/22_locale/num_put/put/char/2.cc |  15 +--
 .../testsuite/22_locale/num_put/put/char/3.cc |  17 +--
 .../testsuite/22_locale/num_put/put/char/4.cc |   4 +-
 .../testsuite/22_locale/num_put/put/char/5.cc |   2 +-
 .../testsuite/22_locale/num_put/put/char/6.cc |   2 +-
 .../testsuite/22_locale/num_put/put/char/7.cc |   2 +-
 .../22_locale/num_put/put/wchar_t/1.cc        |  13 +-
 .../22_locale/num_put/put/wchar_t/2.cc        |  15 +--
 .../22_locale/num_put/put/wchar_t/3.cc        |  17 +--
 .../22_locale/num_put/put/wchar_t/4.cc        |   4 +-
 .../22_locale/num_put/put/wchar_t/5.cc        |   2 +-
 .../22_locale/num_put/put/wchar_t/6.cc        |   2 +-
 .../22_locale/num_put/put/wchar_t/7.cc        |   2 +-
 .../testsuite/22_locale/numpunct/1.cc         |   2 +-
 .../22_locale/numpunct/members/char/1.cc      |   5 +-
 .../22_locale/numpunct/members/char/2.cc      |   4 +-
 .../numpunct/members/char/cache_1.cc          |   2 +-
 .../numpunct/members/char/cache_2.cc          |   2 +-
 .../22_locale/numpunct/members/pod/1.cc       |   4 +-
 .../22_locale/numpunct/members/pod/2.cc       |  16 +--
 .../22_locale/numpunct/members/wchar_t/1.cc   |   5 +-
 .../22_locale/numpunct/members/wchar_t/2.cc   |   4 +-
 .../numpunct/members/wchar_t/cache_1.cc       |   2 +-
 .../numpunct/members/wchar_t/cache_2.cc       |   2 +-
 .../testsuite/22_locale/numpunct_byname/1.cc  |   2 +-
 .../testsuite/22_locale/numpunct_byname/2.cc  |   2 +-
 .../testsuite/22_locale/time_get/1.cc         |   4 +-
 .../22_locale/time_get/date_order/char/1.cc   |  11 +-
 .../time_get/date_order/wchar_t/1.cc          |   8 +-
 .../22_locale/time_get/get_date/char/1.cc     |  14 +--
 .../22_locale/time_get/get_date/char/2.cc     |  15 +--
 .../22_locale/time_get/get_date/char/3.cc     |   5 +-
 .../22_locale/time_get/get_date/wchar_t/1.cc  |  14 +--
 .../22_locale/time_get/get_date/wchar_t/2.cc  |  15 +--
 .../22_locale/time_get/get_date/wchar_t/3.cc  |   5 +-
 .../time_get/get_monthname/char/1.cc          |  10 +-
 .../time_get/get_monthname/char/2.cc          |  10 +-
 .../time_get/get_monthname/char/3.cc          |   4 +-
 .../time_get/get_monthname/wchar_t/1.cc       |  10 +-
 .../time_get/get_monthname/wchar_t/2.cc       |  10 +-
 .../time_get/get_monthname/wchar_t/3.cc       |   4 +-
 .../22_locale/time_get/get_time/char/1.cc     |  14 +--
 .../22_locale/time_get/get_time/char/2.cc     |  10 +-
 .../22_locale/time_get/get_time/char/3.cc     |   5 +-
 .../22_locale/time_get/get_time/wchar_t/1.cc  |  14 +--
 .../22_locale/time_get/get_time/wchar_t/2.cc  |  10 +-
 .../22_locale/time_get/get_time/wchar_t/3.cc  |   5 +-
 .../22_locale/time_get/get_weekday/char/1.cc  |  14 +--
 .../22_locale/time_get/get_weekday/char/2.cc  |  10 +-
 .../22_locale/time_get/get_weekday/char/3.cc  |   5 +-
 .../time_get/get_weekday/wchar_t/1.cc         |  14 +--
 .../time_get/get_weekday/wchar_t/2.cc         |  10 +-
 .../time_get/get_weekday/wchar_t/3.cc         |   5 +-
 .../22_locale/time_get/get_year/char/1.cc     |  14 +--
 .../22_locale/time_get/get_year/char/3.cc     |   5 +-
 .../22_locale/time_get/get_year/wchar_t/1.cc  |  14 +--
 .../22_locale/time_get/get_year/wchar_t/3.cc  |   5 +-
 .../testsuite/22_locale/time_put/1.cc         |   2 +-
 .../22_locale/time_put/put/char/1.cc          |  14 +--
 .../22_locale/time_put/put/char/10.cc         |   3 +-
 .../22_locale/time_put/put/char/2.cc          |  14 +--
 .../22_locale/time_put/put/char/3.cc          |  14 +--
 .../22_locale/time_put/put/char/4.cc          |  14 +--
 .../22_locale/time_put/put/char/5.cc          |  12 +-
 .../22_locale/time_put/put/char/6.cc          |  12 +-
 .../22_locale/time_put/put/char/7.cc          |  12 +-
 .../22_locale/time_put/put/char/8.cc          |  12 +-
 .../22_locale/time_put/put/char/9.cc          |   2 +-
 .../22_locale/time_put/put/wchar_t/1.cc       |  14 +--
 .../22_locale/time_put/put/wchar_t/10.cc      |   3 +-
 .../22_locale/time_put/put/wchar_t/2.cc       |  14 +--
 .../22_locale/time_put/put/wchar_t/3.cc       |  14 +--
 .../22_locale/time_put/put/wchar_t/4.cc       |  14 +--
 .../22_locale/time_put/put/wchar_t/5.cc       |  12 +-
 .../22_locale/time_put/put/wchar_t/6.cc       |  12 +-
 .../22_locale/time_put/put/wchar_t/7.cc       |  12 +-
 .../22_locale/time_put/put/wchar_t/8.cc       |  12 +-
 .../22_locale/time_put/put/wchar_t/9.cc       |   2 +-
 .../testsuite/23_containers/bitset/cons/1.cc  |   4 +-
 .../23_containers/bitset/cons/6282.cc         |   2 +-
 .../23_containers/bitset/operations/1.cc      |   4 +-
 .../23_containers/bitset/operations/2.cc      |   2 +-
 .../testsuite/23_containers/bitset/test/1.cc  |   4 +-
 .../23_containers/bitset/to_ulong/1.cc        |   2 +-
 .../testsuite/23_containers/deque/cons/1.cc   |   2 +-
 .../testsuite/23_containers/deque/cons/2.cc   |  16 +--
 .../23_containers/deque/operators/1.cc        |   4 +-
 .../23_containers/list/capacity/1.cc          |   4 +-
 .../testsuite/23_containers/list/cons/1.cc    |   2 +-
 .../testsuite/23_containers/list/cons/2.cc    |   6 +-
 .../testsuite/23_containers/list/cons/3.cc    |   6 +-
 .../testsuite/23_containers/list/cons/4.cc    |   6 +-
 .../testsuite/23_containers/list/cons/5.cc    |   4 +-
 .../testsuite/23_containers/list/cons/6.cc    |   8 +-
 .../testsuite/23_containers/list/cons/7.cc    |   8 +-
 .../testsuite/23_containers/list/cons/8.cc    |   6 +-
 .../testsuite/23_containers/list/cons/9.cc    |   6 +-
 .../23_containers/list/modifiers/1.cc         |   2 +-
 .../23_containers/list/modifiers/2.cc         |   2 +-
 .../23_containers/list/modifiers/3.cc         |   4 +-
 .../23_containers/list/operators/1.cc         |   8 +-
 .../23_containers/list/operators/2.cc         |   4 +-
 .../23_containers/list/operators/3.cc         |   4 +-
 .../23_containers/list/operators/4.cc         |   4 +-
 .../testsuite/23_containers/map/insert/1.cc   |   2 +-
 .../23_containers/map/operators/1_neg.cc      |   2 +-
 .../23_containers/set/operators/1_neg.cc      |   2 +-
 .../23_containers/vector/bool/6886.cc         |   2 +-
 .../23_containers/vector/capacity/1.cc        |   2 +-
 .../23_containers/vector/capacity/2.cc        |   8 +-
 .../23_containers/vector/capacity/8230.cc     |   2 +-
 .../testsuite/23_containers/vector/cons/3.cc  |   2 +-
 .../testsuite/23_containers/vector/cons/4.cc  |  48 ++++---
 .../23_containers/vector/element_access/1.cc  |   4 +-
 .../23_containers/vector/modifiers/1.cc       |   2 +-
 .../23_containers/vector/modifiers/2.cc       |   8 +-
 .../23_containers/vector/resize/1.cc          |   2 +-
 .../24_iterators/back_insert_iterator.cc      |   2 +-
 .../24_iterators/front_insert_iterator.cc     |   2 +-
 .../testsuite/24_iterators/insert_iterator.cc |   2 +-
 .../24_iterators/istream_iterator.cc          |   4 +-
 .../24_iterators/istreambuf_iterator.cc       |  16 +--
 .../testsuite/24_iterators/iterator.cc        |   2 +-
 .../24_iterators/ostream_iterator.cc          |   2 +-
 .../24_iterators/ostreambuf_iterator.cc       |   4 +-
 .../24_iterators/reverse_iterator/1.cc        |   2 +-
 .../24_iterators/reverse_iterator/3.cc        |   2 +-
 .../testsuite/25_algorithms/binary_search.cc  |  16 +--
 libstdc++-v3/testsuite/25_algorithms/copy.cc  |  10 +-
 libstdc++-v3/testsuite/25_algorithms/heap.cc  |  10 +-
 .../testsuite/25_algorithms/lower_bound.cc    |   2 +-
 .../testsuite/25_algorithms/min_max.cc        |   4 +-
 .../testsuite/25_algorithms/partition.cc      |  10 +-
 .../testsuite/25_algorithms/rotate.cc         |  10 +-
 libstdc++-v3/testsuite/25_algorithms/sort.cc  |  18 +--
 .../c99_classification_macros_c++.cc          |   2 +-
 libstdc++-v3/testsuite/26_numerics/c_math.cc  |   4 +-
 .../testsuite/26_numerics/c_math_dynamic.cc   |   2 +-
 .../complex_inserters_extractors.cc           |   9 +-
 .../testsuite/26_numerics/complex_value.cc    |   2 +-
 libstdc++-v3/testsuite/26_numerics/slice.cc   |  11 +-
 .../26_numerics/slice_array_assignment.cc     |   2 +-
 .../testsuite/26_numerics/sum_diff.cc         |   2 +-
 .../testsuite/26_numerics/valarray.cc         |   2 +-
 .../26_numerics/valarray_operators.cc         |   4 +-
 .../testsuite/27_io/basic_filebuf/3.cc        |   2 +-
 .../testsuite/27_io/basic_filebuf/4.cc        |   2 +-
 .../27_io/basic_filebuf/close/char/1.cc       |   2 +-
 .../27_io/basic_filebuf/close/char/2.cc       |   2 +-
 .../27_io/basic_filebuf/close/char/3.cc       |   7 +-
 .../27_io/basic_filebuf/close/char/4.cc       |   2 +-
 .../27_io/basic_filebuf/close/char/4879.cc    |   2 +-
 .../27_io/basic_filebuf/close/char/5.cc       |   2 +-
 .../27_io/basic_filebuf/close/char/9964.cc    |   2 +-
 .../basic_filebuf/cons/wchar_t/10132-1.cc     |   2 +-
 .../27_io/basic_filebuf/imbue/char/2.cc       |   4 +-
 .../27_io/basic_filebuf/imbue/char/3.cc       |   4 +-
 .../27_io/basic_filebuf/imbue/char/9322.cc    |   4 +-
 .../27_io/basic_filebuf/imbue/wchar_t/2.cc    |   4 +-
 .../27_io/basic_filebuf/imbue/wchar_t/3.cc    |   4 +-
 .../27_io/basic_filebuf/imbue/wchar_t/9322.cc |   4 +-
 .../27_io/basic_filebuf/in_avail/char/1.cc    |   6 +-
 .../27_io/basic_filebuf/is_open/char/1.cc     |   2 +-
 .../27_io/basic_filebuf/open/char/1.cc        |   2 +-
 .../27_io/basic_filebuf/open/char/2.cc        |   2 +-
 .../27_io/basic_filebuf/open/char/3.cc        |   2 +-
 .../27_io/basic_filebuf/open/char/9507.cc     |   2 +-
 .../27_io/basic_filebuf/overflow/char/1.cc    |   2 +-
 .../basic_filebuf/overflow/char/2-unbuf.cc    |   4 +-
 .../27_io/basic_filebuf/overflow/char/2.cc    |   4 +-
 .../27_io/basic_filebuf/overflow/char/3599.cc |   4 +-
 .../27_io/basic_filebuf/overflow/char/9169.cc |   4 +-
 .../basic_filebuf/overflow/char/9182-2.cc     |   4 +-
 .../27_io/basic_filebuf/overflow/char/9988.cc |   4 +-
 .../basic_filebuf/overflow/wchar_t/11305-1.cc |   2 +-
 .../basic_filebuf/overflow/wchar_t/11305-2.cc |   2 +-
 .../basic_filebuf/overflow/wchar_t/11305-3.cc |   2 +-
 .../basic_filebuf/overflow/wchar_t/11305-4.cc |   2 +-
 .../basic_filebuf/pbackfail/char/9761.cc      |   4 +-
 .../27_io/basic_filebuf/sbumpc/char/1-in.cc   |   4 +-
 .../27_io/basic_filebuf/sbumpc/char/1-io.cc   |   4 +-
 .../27_io/basic_filebuf/sbumpc/char/1-out.cc  |   4 +-
 .../27_io/basic_filebuf/sbumpc/char/2-in.cc   |   4 +-
 .../27_io/basic_filebuf/sbumpc/char/2-io.cc   |   4 +-
 .../27_io/basic_filebuf/sbumpc/char/2-out.cc  |   4 +-
 .../27_io/basic_filebuf/sbumpc/char/9825.cc   |   4 +-
 .../27_io/basic_filebuf/seekoff/10132-2.cc    |   2 +-
 .../27_io/basic_filebuf/seekoff/char/1-in.cc  |   5 +-
 .../27_io/basic_filebuf/seekoff/char/1-io.cc  |   5 +-
 .../27_io/basic_filebuf/seekoff/char/1-out.cc |   5 +-
 .../27_io/basic_filebuf/seekoff/char/2-in.cc  |   5 +-
 .../27_io/basic_filebuf/seekoff/char/2-io.cc  |   5 +-
 .../27_io/basic_filebuf/seekoff/char/2-out.cc |   5 +-
 .../27_io/basic_filebuf/seekoff/char/3-in.cc  |   2 +-
 .../27_io/basic_filebuf/seekoff/char/3-io.cc  |   2 +-
 .../27_io/basic_filebuf/seekoff/char/3-out.cc |   2 +-
 .../27_io/basic_filebuf/seekoff/wchar_t/1.cc  |   4 +-
 .../27_io/basic_filebuf/seekoff/wchar_t/2.cc  |   2 +-
 .../seekoff/wchar_t/9875_seekoff.cc           |   2 +-
 .../27_io/basic_filebuf/seekpos/10132-3.cc    |   2 +-
 .../27_io/basic_filebuf/seekpos/char/1-in.cc  |   6 +-
 .../27_io/basic_filebuf/seekpos/char/1-io.cc  |   6 +-
 .../27_io/basic_filebuf/seekpos/char/1-out.cc |   6 +-
 .../27_io/basic_filebuf/seekpos/char/2-in.cc  |   6 +-
 .../27_io/basic_filebuf/seekpos/char/2-io.cc  |   6 +-
 .../27_io/basic_filebuf/seekpos/char/2-out.cc |   6 +-
 .../27_io/basic_filebuf/seekpos/char/3-in.cc  |   2 +-
 .../27_io/basic_filebuf/seekpos/char/3-io.cc  |   2 +-
 .../27_io/basic_filebuf/seekpos/char/3-out.cc |   2 +-
 .../seekpos/wchar_t/9875_seekpos.cc           |   2 +-
 .../27_io/basic_filebuf/setbuf/char/1.cc      |  10 +-
 .../27_io/basic_filebuf/setbuf/char/2.cc      |   4 +-
 .../27_io/basic_filebuf/setbuf/char/3.cc      |   4 +-
 .../27_io/basic_filebuf/sgetc/char/1-in.cc    |   4 +-
 .../27_io/basic_filebuf/sgetc/char/1-io.cc    |   4 +-
 .../27_io/basic_filebuf/sgetc/char/1-out.cc   |   6 +-
 .../27_io/basic_filebuf/sgetc/char/2-in.cc    |   4 +-
 .../27_io/basic_filebuf/sgetc/char/2-io.cc    |   4 +-
 .../27_io/basic_filebuf/sgetc/char/2-out.cc   |   6 +-
 .../27_io/basic_filebuf/sgetn/char/1-in.cc    |   8 +-
 .../27_io/basic_filebuf/sgetn/char/1-io.cc    |   8 +-
 .../27_io/basic_filebuf/sgetn/char/1-out.cc   |   9 +-
 .../27_io/basic_filebuf/sgetn/char/2-in.cc    |   9 +-
 .../27_io/basic_filebuf/sgetn/char/2-io.cc    |   9 +-
 .../27_io/basic_filebuf/sgetn/char/2-out.cc   |  10 +-
 .../27_io/basic_filebuf/sgetn/char/3.cc       |   4 +-
 .../basic_filebuf/showmanyc/char/9533-1.cc    |   2 +-
 .../basic_filebuf/showmanyc/char/9533-2.cc    |   2 +-
 .../27_io/basic_filebuf/snextc/char/1-in.cc   |   6 +-
 .../27_io/basic_filebuf/snextc/char/1-io.cc   |   6 +-
 .../27_io/basic_filebuf/snextc/char/1-out.cc  |   6 +-
 .../27_io/basic_filebuf/snextc/char/2-in.cc   |   6 +-
 .../27_io/basic_filebuf/snextc/char/2-io.cc   |   6 +-
 .../27_io/basic_filebuf/snextc/char/2-out.cc  |   6 +-
 .../basic_filebuf/sputbackc/char/1-in.cc      |   4 +-
 .../basic_filebuf/sputbackc/char/1-io.cc      |   4 +-
 .../basic_filebuf/sputbackc/char/1-out.cc     |   6 +-
 .../basic_filebuf/sputbackc/char/2-in.cc      |   4 +-
 .../basic_filebuf/sputbackc/char/2-io.cc      |   4 +-
 .../basic_filebuf/sputbackc/char/2-out.cc     |   6 +-
 .../basic_filebuf/sputbackc/char/9425.cc      |   4 +-
 .../27_io/basic_filebuf/sputc/char/1-in.cc    |   8 +-
 .../27_io/basic_filebuf/sputc/char/1-io.cc    |   8 +-
 .../27_io/basic_filebuf/sputc/char/1-out.cc   |   8 +-
 .../27_io/basic_filebuf/sputc/char/2-in.cc    |   8 +-
 .../27_io/basic_filebuf/sputc/char/2-io.cc    |   8 +-
 .../27_io/basic_filebuf/sputc/char/2-out.cc   |   8 +-
 .../27_io/basic_filebuf/sputc/char/9701-2.cc  |   4 +-
 .../27_io/basic_filebuf/sputn/char/1-in.cc    |   6 +-
 .../27_io/basic_filebuf/sputn/char/1-io.cc    |   4 +-
 .../27_io/basic_filebuf/sputn/char/1-out.cc   |   6 +-
 .../27_io/basic_filebuf/sputn/char/2-in.cc    |   6 +-
 .../27_io/basic_filebuf/sputn/char/2-io.cc    |   4 +-
 .../27_io/basic_filebuf/sputn/char/2-out.cc   |   6 +-
 .../27_io/basic_filebuf/sputn/char/9339.cc    |   2 +-
 .../27_io/basic_filebuf/sputn/char/9701-1.cc  |   4 +-
 .../27_io/basic_filebuf/sungetc/char/1-in.cc  |   4 +-
 .../27_io/basic_filebuf/sungetc/char/1-io.cc  |   4 +-
 .../27_io/basic_filebuf/sungetc/char/1-out.cc |   6 +-
 .../27_io/basic_filebuf/sungetc/char/2-in.cc  |   4 +-
 .../27_io/basic_filebuf/sungetc/char/2-io.cc  |   4 +-
 .../27_io/basic_filebuf/sungetc/char/2-out.cc |   6 +-
 .../27_io/basic_filebuf/sync/char/1057.cc     |   2 +-
 .../27_io/basic_filebuf/sync/char/9182-1.cc   |   4 +-
 .../27_io/basic_filebuf/underflow/char/1.cc   |   2 +-
 .../basic_filebuf/underflow/char/10097.cc     |   4 +-
 .../27_io/basic_filebuf/underflow/char/2.cc   |   2 +-
 .../basic_filebuf/underflow/char/9027.cc      |   2 +-
 .../basic_filebuf/underflow/wchar_t/1.cc      |   4 +-
 .../underflow/wchar_t/11389-1.cc              |   2 +-
 .../underflow/wchar_t/11389-2.cc              |   2 +-
 .../underflow/wchar_t/11389-3.cc              |   2 +-
 .../underflow/wchar_t/11389-4.cc              |   2 +-
 .../basic_filebuf/underflow/wchar_t/2.cc      |   4 +-
 .../basic_filebuf/underflow/wchar_t/3.cc      |   4 +-
 .../basic_filebuf/underflow/wchar_t/4.cc      |   4 +-
 .../basic_filebuf/underflow/wchar_t/5.cc      |   2 +-
 .../basic_filebuf/underflow/wchar_t/9178.cc   |   2 +-
 .../basic_filebuf/underflow/wchar_t/9520.cc   |   2 +-
 .../testsuite/27_io/basic_fstream/3.cc        |   2 +-
 .../testsuite/27_io/basic_fstream/4.cc        |   2 +-
 .../27_io/basic_fstream/rdbuf/char/2832.cc    |   3 +-
 .../testsuite/27_io/basic_ifstream/3.cc       |   2 +-
 .../testsuite/27_io/basic_ifstream/4.cc       |   2 +-
 .../27_io/basic_ifstream/cons/char/1.cc       |   2 +-
 .../27_io/basic_ifstream/open/char/1.cc       |   2 +-
 .../27_io/basic_ifstream/rdbuf/char/2832.cc   |   3 +-
 libstdc++-v3/testsuite/27_io/basic_ios/3.cc   |   2 +-
 libstdc++-v3/testsuite/27_io/basic_ios/4.cc   |   2 +-
 .../testsuite/27_io/basic_ios/clear/char/1.cc |   6 +-
 .../testsuite/27_io/basic_ios/cons/char/1.cc  |   4 +-
 .../testsuite/27_io/basic_ios/cons/char/2.cc  |   2 +-
 .../testsuite/27_io/basic_ios/cons/char/3.cc  |   2 +-
 .../27_io/basic_ios/copyfmt/char/1.cc         |   6 +-
 .../27_io/basic_ios/copyfmt/char/2.cc         |   2 +-
 .../27_io/basic_ios/exceptions/char/1.cc      |   7 +-
 .../27_io/basic_ios/locales/char/1.cc         |   7 +-
 .../testsuite/27_io/basic_iostream/3.cc       |   2 +-
 .../testsuite/27_io/basic_iostream/4.cc       |   4 +-
 .../testsuite/27_io/basic_istream/3.cc        |   2 +-
 .../testsuite/27_io/basic_istream/4.cc        |   2 +-
 .../basic_istream/exceptions/char/9561.cc     |   2 +-
 .../extractors_arithmetic/char/01.cc          |   5 +-
 .../extractors_arithmetic/char/02.cc          |   2 +-
 .../extractors_arithmetic/char/03.cc          |   2 +-
 .../extractors_arithmetic/char/06.cc          |   4 +-
 .../extractors_arithmetic/char/07.cc          |   2 +-
 .../extractors_arithmetic/char/08.cc          |   3 +-
 .../extractors_arithmetic/char/09.cc          |   2 +-
 .../extractors_arithmetic/char/10.cc          |   2 +-
 .../extractors_arithmetic/char/11.cc          |   2 +-
 .../extractors_arithmetic/char/12.cc          |   6 +-
 .../extractors_arithmetic/char/13.cc          |   3 +-
 .../extractors_arithmetic/char/9555-ia.cc     |   2 +-
 .../extractors_character/char/1.cc            |   2 +-
 .../extractors_character/char/11095-i.cc      |   2 +-
 .../extractors_character/char/2.cc            |   2 +-
 .../extractors_character/char/3.cc            |   3 +-
 .../extractors_character/char/9555-ic.cc      |   4 +-
 .../extractors_character/char/9826.cc         |   4 +-
 .../basic_istream/extractors_other/char/1.cc  |   2 +-
 .../basic_istream/extractors_other/char/2.cc  |   2 +-
 .../basic_istream/extractors_other/char/3.cc  |   3 +-
 .../extractors_other/char/9318-in.cc          |   2 +-
 .../extractors_other/char/9424-in.cc          |   2 +-
 .../extractors_other/char/9555-io.cc          |   2 +-
 .../27_io/basic_istream/get/char/1.cc         |   5 +-
 .../27_io/basic_istream/get/char/2.cc         |   2 +-
 .../27_io/basic_istream/getline/char/1.cc     |   3 +-
 .../27_io/basic_istream/getline/char/2.cc     |   4 +-
 .../27_io/basic_istream/getline/char/3.cc     |   2 +-
 .../27_io/basic_istream/ignore/char/1.cc      |   2 +-
 .../27_io/basic_istream/ignore/char/6360.cc   |   2 +-
 .../27_io/basic_istream/ignore/char/7220.cc   |   3 +-
 .../27_io/basic_istream/peek/char/1.cc        |   2 +-
 .../27_io/basic_istream/peek/char/6414.cc     |   2 +-
 .../27_io/basic_istream/putback/char/1.cc     |   6 +-
 .../27_io/basic_istream/read/char/1.cc        |   2 +-
 .../27_io/basic_istream/read/char/2.cc        |   6 +-
 .../27_io/basic_istream/read/char/3.cc        |   2 +-
 .../basic_istream/readsome/char/6746-1.cc     |   2 +-
 .../basic_istream/readsome/char/6746-2.cc     |   2 +-
 .../27_io/basic_istream/readsome/char/8258.cc |   2 +-
 .../27_io/basic_istream/seekg/char/2.cc       |   2 +-
 .../basic_istream/seekg/char/2346-fstream.cc  |   4 +-
 .../basic_istream/seekg/char/2346-sstream.cc  |   4 +-
 .../27_io/basic_istream/seekg/char/8348-1.cc  |   2 +-
 .../27_io/basic_istream/seekg/char/8348-2.cc  |   2 +-
 .../27_io/basic_istream/seekg/char/fstream.cc |   2 +-
 .../27_io/basic_istream/seekg/char/sstream.cc |   2 +-
 .../27_io/basic_istream/sentry/char/1.cc      |   2 +-
 .../27_io/basic_istream/sentry/char/2.cc      |   2 +-
 .../27_io/basic_istream/sentry/char/3.cc      |   2 +-
 .../basic_istream/sentry/char/3983-fstream.cc |   2 +-
 .../basic_istream/sentry/char/3983-sstream.cc |   2 +-
 .../27_io/basic_istream/tellg/char/1.cc       |   2 +-
 .../27_io/basic_istream/tellg/char/2.cc       |   2 +-
 .../27_io/basic_istream/tellg/char/8348.cc    |   2 +-
 .../27_io/basic_istream/tellg/char/fstream.cc |   2 +-
 .../27_io/basic_istream/tellg/char/sstream.cc |   2 +-
 .../27_io/basic_istream/ws/char/1.cc          |   4 +-
 .../testsuite/27_io/basic_istringstream/3.cc  |   4 +-
 .../testsuite/27_io/basic_istringstream/4.cc  |   2 +-
 .../basic_istringstream/rdbuf/char/2832.cc    |   3 +-
 .../27_io/basic_istringstream/str/char/1.cc   |   2 +-
 .../testsuite/27_io/basic_ofstream/3.cc       |   2 +-
 .../testsuite/27_io/basic_ofstream/4.cc       |   2 +-
 .../27_io/basic_ofstream/cons/char/2.cc       |   2 +-
 .../27_io/basic_ofstream/open/char/1.cc       |   2 +-
 .../27_io/basic_ofstream/rdbuf/char/2832.cc   |   3 +-
 .../testsuite/27_io/basic_ostream/3.cc        |   2 +-
 .../testsuite/27_io/basic_ostream/4.cc        |   2 +-
 .../27_io/basic_ostream/cons/char/9827.cc     |   2 +-
 .../27_io/basic_ostream/endl/char/1.cc        |   4 +-
 .../27_io/basic_ostream/ends/char/1.cc        |   4 +-
 .../27_io/basic_ostream/ends/char/2.cc        |   4 +-
 .../basic_ostream/exceptions/char/9561.cc     |   2 +-
 .../27_io/basic_ostream/flush/char/1.cc       |   4 +-
 .../inserters_arithmetic/char/1.cc            |   4 +-
 .../inserters_arithmetic/char/2.cc            |   2 +-
 .../inserters_arithmetic/char/3.cc            |   2 +-
 .../inserters_arithmetic/char/4.cc            |   2 +-
 .../inserters_arithmetic/char/4402.cc         |   2 +-
 .../inserters_arithmetic/char/5.cc            |   2 +-
 .../inserters_arithmetic/char/6.cc            |   2 +-
 .../inserters_arithmetic/char/9555-oa.cc      |   2 +-
 .../inserters_arithmetic/wchar_t/1.cc         |   4 +-
 .../inserters_character/char/11095-oa.cc      |   2 +-
 .../inserters_character/char/11095-ob.cc      |   2 +-
 .../inserters_character/char/11095-oc.cc      |   2 +-
 .../inserters_character/char/2.cc             |   2 +-
 .../inserters_character/char/3.cc             |   2 +-
 .../inserters_character/char/4.cc             |   4 +-
 .../inserters_character/char/5.cc             |   2 +-
 .../inserters_character/char/6.cc             |   2 +-
 .../inserters_character/char/8.cc             |   2 +-
 .../inserters_character/char/9555-oc.cc       |   2 +-
 .../inserters_character/wchar_t/11095-od.cc   |   2 +-
 .../inserters_character/wchar_t/11095-oe.cc   |   2 +-
 .../inserters_character/wchar_t/11095-of.cc   |   2 +-
 .../inserters_character/wchar_t/7.cc          |   2 +-
 .../inserters_character/wchar_t/8.cc          |   2 +-
 .../basic_ostream/inserters_other/char/1.cc   |   2 +-
 .../basic_ostream/inserters_other/char/3.cc   |   2 +-
 .../basic_ostream/inserters_other/char/4.cc   |   2 +-
 .../inserters_other/char/9318-out.cc          |   2 +-
 .../inserters_other/char/9424-out.cc          |   2 +-
 .../inserters_other/char/9555-oo.cc           |   2 +-
 .../27_io/basic_ostream/sentry/char/1.cc      |   2 +-
 .../27_io/basic_ostream/sentry/char/2.cc      |   2 +-
 .../basic_ostream/sentry/char/3983-fstream.cc |   2 +-
 .../basic_ostream/sentry/char/3983-sstream.cc |   2 +-
 .../27_io/basic_ostream/tellp/char/1.cc       |   2 +-
 .../27_io/basic_ostream/tellp/char/2.cc       |   2 +-
 .../testsuite/27_io/basic_ostringstream/3.cc  |   4 +-
 .../testsuite/27_io/basic_ostringstream/4.cc  |   2 +-
 .../27_io/basic_ostringstream/cons/char/3.cc  |   2 +-
 .../basic_ostringstream/rdbuf/char/2832.cc    |   3 +-
 .../27_io/basic_ostringstream/str/char/1.cc   |   6 +-
 .../27_io/basic_ostringstream/str/char/2.cc   |   2 +-
 .../testsuite/27_io/basic_streambuf/3.cc      |   2 +-
 .../27_io/basic_streambuf/cons/char/1.cc      |   5 +-
 .../27_io/basic_streambuf/imbue/char/9322.cc  |   2 +-
 .../basic_streambuf/in_avail/char/9701-3.cc   |   2 +-
 .../27_io/basic_streambuf/overflow/char/1.cc  |   7 +-
 .../27_io/basic_streambuf/overflow/char/2.cc  |   2 +-
 .../basic_streambuf/overflow/char/3599.cc     |   4 +-
 .../27_io/basic_streambuf/sgetc/char/1.cc     |   7 +-
 .../27_io/basic_streambuf/sgetn/char/1.cc     |  13 +-
 .../basic_streambuf/sputbackc/char/9538.cc    |   6 +-
 .../27_io/basic_streambuf/sputn/char/1.cc     |  13 +-
 .../27_io/basic_streambuf/sync/char/1057.cc   |   2 +-
 .../testsuite/27_io/basic_stringbuf/3.cc      |   4 +-
 .../testsuite/27_io/basic_stringbuf/5.cc      |   2 +-
 .../27_io/basic_stringbuf/imbue/char/9322.cc  |   2 +-
 .../27_io/basic_stringbuf/in_avail/char/1.cc  |   7 +-
 .../27_io/basic_stringbuf/overflow/char/2.cc  |   2 +-
 .../basic_stringbuf/overflow/char/3599.cc     |   4 +-
 .../basic_stringbuf/overflow/char/9988.cc     |   4 +-
 .../27_io/basic_stringbuf/sbumpc/char/1.cc    |   3 +-
 .../27_io/basic_stringbuf/sbumpc/char/9825.cc |   4 +-
 .../27_io/basic_stringbuf/seekoff/char/1.cc   |   7 +-
 .../27_io/basic_stringbuf/seekoff/char/2.cc   |   2 +-
 .../27_io/basic_stringbuf/seekpos/char/1.cc   |   6 +-
 .../27_io/basic_stringbuf/seekpos/char/2.cc   |   2 +-
 .../27_io/basic_stringbuf/seekpos/char/3.cc   |   2 +-
 .../27_io/basic_stringbuf/setbuf/char/1.cc    |  10 +-
 .../27_io/basic_stringbuf/setbuf/char/2.cc    |   4 +-
 .../27_io/basic_stringbuf/setbuf/char/3.cc    |   4 +-
 .../27_io/basic_stringbuf/sgetc/char/1.cc     |   5 +-
 .../27_io/basic_stringbuf/sgetn/char/1.cc     |  15 +--
 .../27_io/basic_stringbuf/snextc/char/1.cc    |  11 +-
 .../27_io/basic_stringbuf/sputbackc/char/1.cc |   4 +-
 .../basic_stringbuf/sputbackc/char/9425.cc    |   4 +-
 .../27_io/basic_stringbuf/sputc/char/1.cc     |   6 +-
 .../basic_stringbuf/sputc/char/9404-1.cc      |   2 +-
 .../27_io/basic_stringbuf/sputn/char/1.cc     |   9 +-
 .../basic_stringbuf/sputn/char/9404-2.cc      |   2 +-
 .../27_io/basic_stringbuf/str/char/1.cc       |  10 +-
 .../27_io/basic_stringbuf/str/char/2.cc       |   2 +-
 .../27_io/basic_stringbuf/str/char/3.cc       |   2 +-
 .../27_io/basic_stringbuf/str/char/3955.cc    |   2 +-
 .../27_io/basic_stringbuf/sungetc/char/1.cc   |   4 +-
 .../27_io/basic_stringbuf/sync/char/1057.cc   |   2 +-
 .../testsuite/27_io/basic_stringstream/3.cc   |   4 +-
 .../testsuite/27_io/basic_stringstream/4.cc   |   2 +-
 .../basic_stringstream/rdbuf/char/2832.cc     |   3 +-
 .../27_io/basic_stringstream/str/char/1.cc    |   2 +-
 .../27_io/basic_stringstream/str/char/2.cc    |   3 +-
 .../27_io/basic_stringstream/str/char/3.cc    |   2 +-
 .../27_io/basic_stringstream/str/char/4.cc    |   2 +-
 .../testsuite/27_io/fpos/mbstate_t/1.cc       |   8 +-
 .../testsuite/27_io/fpos/mbstate_t/2.cc       |   6 +-
 .../testsuite/27_io/fpos/mbstate_t/3.cc       |   9 +-
 .../testsuite/27_io/ios_base/callbacks/1.cc   |   8 +-
 .../testsuite/27_io/ios_base/state/1.cc       |   4 +-
 .../testsuite/27_io/ios_base/storage/1.cc     |   8 +-
 .../testsuite/27_io/ios_base/storage/2.cc     |   2 +-
 .../27_io/ios_base/sync_with_stdio/2.cc       |   2 +-
 .../27_io/manipulators/adjustfield/char/1.cc  |   2 +-
 .../27_io/manipulators/adjustfield/char/2.cc  |   2 +-
 .../27_io/manipulators/basefield/char/1.cc    |   2 +-
 .../27_io/manipulators/standard/char/1.cc     |   2 +-
 .../27_io/manipulators/standard/char/2.cc     |   2 +-
 .../testsuite/27_io/objects/char/1.cc         |   2 +-
 .../testsuite/27_io/objects/char/10.cc        |   2 +-
 .../testsuite/27_io/objects/char/3045.cc      |   2 +-
 .../testsuite/27_io/objects/char/5.cc         |   2 +-
 .../testsuite/27_io/objects/char/6.cc         |   2 +-
 .../testsuite/27_io/objects/char/6548_xin.cc  |   2 +-
 .../27_io/objects/char/6648-1_xin.cc          |   2 +-
 .../27_io/objects/char/6648-2_xin.cc          |   2 +-
 .../testsuite/27_io/objects/char/7.cc         |   2 +-
 .../testsuite/27_io/objects/char/7744_xin.cc  |   2 +-
 .../testsuite/27_io/objects/char/8.cc         |   2 +-
 .../testsuite/27_io/objects/char/9.cc         |   2 +-
 .../testsuite/27_io/objects/char/9661-1.cc    |   2 +-
 .../27_io/objects/char/9661-2_xin.cc          |   2 +-
 .../testsuite/27_io/objects/wchar_t/1.cc      |   2 +-
 .../testsuite/27_io/objects/wchar_t/10.cc     |   2 +-
 .../testsuite/27_io/objects/wchar_t/11.cc     |   2 +-
 .../testsuite/27_io/objects/wchar_t/12.cc     |   2 +-
 .../testsuite/27_io/objects/wchar_t/13.cc     |   4 +-
 .../testsuite/27_io/objects/wchar_t/3045.cc   |   2 +-
 .../testsuite/27_io/objects/wchar_t/5.cc      |   2 +-
 .../27_io/objects/wchar_t/6548_xin.cc         |   2 +-
 .../27_io/objects/wchar_t/6648-1_xin.cc       |   2 +-
 .../27_io/objects/wchar_t/6648-2_xin.cc       |   2 +-
 .../testsuite/27_io/objects/wchar_t/7.cc      |   2 +-
 .../27_io/objects/wchar_t/7744_xin.cc         |   2 +-
 .../testsuite/27_io/objects/wchar_t/8.cc      |   2 +-
 .../testsuite/27_io/objects/wchar_t/9520.cc   |   2 +-
 .../testsuite/27_io/objects/wchar_t/9661-1.cc |   2 +-
 .../27_io/objects/wchar_t/9661-2_xin.cc       |   2 +-
 .../testsuite/27_io/objects/wchar_t/9662.cc   |   2 +-
 libstdc++-v3/testsuite/27_io/types/2.cc       |   2 +-
 .../testsuite/backward/strstream_members.cc   |   5 +-
 libstdc++-v3/testsuite/ext/allocators.cc      |   2 +-
 libstdc++-v3/testsuite/ext/hash_map.cc        |   2 +-
 libstdc++-v3/testsuite/ext/hash_set.cc        |   2 +-
 libstdc++-v3/testsuite/ext/pod_char_traits.cc |   6 +-
 libstdc++-v3/testsuite/ext/stdio_filebuf_2.cc |   2 +-
 .../testsuite/ext/stdio_sync_filebuf_char.cc  |  10 +-
 .../ext/stdio_sync_filebuf_wchar_t.cc         |  23 ++--
 .../testsuite/performance/map_create_fill.cc  |   2 +-
 libstdc++-v3/testsuite/testsuite_hooks.h      |   2 +-
 libstdc++-v3/testsuite/thread/pthread1.cc     |   2 +-
 libstdc++-v3/testsuite/thread/pthread5.cc     |   4 +-
 libstdc++-v3/testsuite/thread/pthread6.cc     |   4 +-
 .../testsuite/thread/pthread7-rope.cc         |   7 +-
 795 files changed, 1309 insertions(+), 2296 deletions(-)
 delete mode 100644 libstdc++-v3/testsuite/17_intro/header_ciso646.cc

diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 9caf65ac7e18..224cc60d3a32 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,9 @@
+2003-09-23  Benjamin Kosnik  <bkoz@redhat.com>
+
+	* include/bits/locale_facets.tcc: Tweak to avoid warnings.
+	* testsuite/testsuite_hooks.h: Same.
+	* testsuite/*/*.cc: Same.
+
 2003-09-22  Petur Runolfsson  <peturr02@ru.is>
 
 	* include/bits/istream.tcc (basic_istream::read,
diff --git a/libstdc++-v3/include/bits/locale_facets.tcc b/libstdc++-v3/include/bits/locale_facets.tcc
index e76ac84ea71e..f0e41123e771 100644
--- a/libstdc++-v3/include/bits/locale_facets.tcc
+++ b/libstdc++-v3/include/bits/locale_facets.tcc
@@ -105,7 +105,7 @@ namespace std
 	const locale::facet** __caches = __loc._M_impl->_M_caches;
 	if (!__caches[__i])
 	  {
-	    __numpunct_cache<_CharT>* __tmp;
+	    __numpunct_cache<_CharT>* __tmp = NULL;
 	    try
 	      {
 		__tmp = new __numpunct_cache<_CharT>;
diff --git a/libstdc++-v3/testsuite/17_intro/header_cerrno.cc b/libstdc++-v3/testsuite/17_intro/header_cerrno.cc
index bfd869e8685c..a8d19cf722bc 100644
--- a/libstdc++-v3/testsuite/17_intro/header_cerrno.cc
+++ b/libstdc++-v3/testsuite/17_intro/header_cerrno.cc
@@ -1,6 +1,6 @@
 // 2001-02-06  Benjamin Kosnik  <bkoz@redhat.com>
 
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2003 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
@@ -24,12 +24,13 @@
 
 namespace gnu
 {
-  void test01()
+  int test01()
   { 
     int i = errno;
 #ifndef errno
     #error "errno_must_be_a_macro"
 #endif
+    return i;
   }
 }
   
diff --git a/libstdc++-v3/testsuite/17_intro/header_ciso646.cc b/libstdc++-v3/testsuite/17_intro/header_ciso646.cc
deleted file mode 100644
index 35b1ceef32d8..000000000000
--- a/libstdc++-v3/testsuite/17_intro/header_ciso646.cc
+++ /dev/null
@@ -1,119 +0,0 @@
-// 1999-05-20 bkoz
-
-// Copyright (C) 1999, 2003 Free Software Foundation, Inc.
-//
-// This file is part of the GNU ISO C++ Library.  This library is free
-// software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
-// any later version.
-
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-// USA.
-
-// 17.4.1.2 Headers, ciso646
-
-// { dg-do link }
-
-#include <ciso646>
-#include <testsuite_hooks.h>
-
-
-// 2.11 Keywords
-// alternative representations
-// and, and_eq, bitand, bitor, compl, not, not_eq, or, or_eq, xor, xor_eq
-
-// C 2.2.2 Header <iso646.h> 
-// The tokens (as above) are keywords and do not appear as macros in <ciso646>.
-
-// Test for macros.
-bool test01() 
-{
-  bool test = true;
-
-#if 0
-
-#ifdef and
-  test = false;
-#endif
-
-#ifdef and_eq
-  test = false;
-#endif
-
-#ifdef bitand
-  test = false;
-#endif
-
-#ifdef bitor
-  test = false;
-#endif
-
-#ifdef compl
-  test = false;
-#endif
-
-#ifdef not_eq
-  test = false;
-#endif
-
-#ifdef not_or
-  test = false;
-#endif
-
-#ifdef or
-  test = false;
-#endif
-
-#ifdef or_eq
-  test = false;
-#endif
-
-#ifdef xor
-  test = false;
-#endif
-
-#ifdef xor_eq
-  test = false;
-#endif
-
-#endif
-
-  return test;
-}
-
-
-// Equivalance in usage.
-bool test02()
-{
-  bool test = true;
-
-  bool arg1 = true;
-  bool arg2 = false;
-  int  int1 = 45;
-  int  int2 = 0;
-  
-  VERIFY( arg1 && int1 );
-  VERIFY( arg1 and int1 );
-
-  VERIFY( (arg1 && arg2) == (arg1 and arg2) );
-  VERIFY( (arg1 && int1) == (arg1 and int1) );
-
-  return test;
-}
-
-
-int main(void)
-{
-  test01();
-  test02();
-
-  return 0;
-}
diff --git a/libstdc++-v3/testsuite/17_intro/header_csetjmp.cc b/libstdc++-v3/testsuite/17_intro/header_csetjmp.cc
index 4e2610de4f2c..1cbb630e752e 100644
--- a/libstdc++-v3/testsuite/17_intro/header_csetjmp.cc
+++ b/libstdc++-v3/testsuite/17_intro/header_csetjmp.cc
@@ -1,6 +1,6 @@
 // 2001-02-06  Benjamin Kosnik  <bkoz@redhat.com>
 
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2003 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
@@ -27,7 +27,7 @@ namespace gnu
   void test01()
   { 
     std::jmp_buf env;
-    int i = setjmp(env);
+    int i __attribute__((unused)) = setjmp(env);
 #ifndef setjmp
     #error "setjmp_must_be_a_macro"
 #endif
diff --git a/libstdc++-v3/testsuite/17_intro/header_cstdarg.cc b/libstdc++-v3/testsuite/17_intro/header_cstdarg.cc
index 260e92905cb6..9e82930976eb 100644
--- a/libstdc++-v3/testsuite/17_intro/header_cstdarg.cc
+++ b/libstdc++-v3/testsuite/17_intro/header_cstdarg.cc
@@ -1,6 +1,6 @@
 // 2001-02-06  Benjamin Kosnik  <bkoz@redhat.com>
 
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2003 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
@@ -26,7 +26,7 @@ namespace gnu
 {
   void test01()
   { 
-    std::va_list list;
+    std::va_list __attribute__((unused)) list;
 #ifndef va_arg
     #error "va_arg_must_be_a_macro"
 #endif
diff --git a/libstdc++-v3/testsuite/17_intro/header_cstddef.cc b/libstdc++-v3/testsuite/17_intro/header_cstddef.cc
index eab1c75386af..69f83f07f3a6 100644
--- a/libstdc++-v3/testsuite/17_intro/header_cstddef.cc
+++ b/libstdc++-v3/testsuite/17_intro/header_cstddef.cc
@@ -1,6 +1,6 @@
 // 2001-02-06  Benjamin Kosnik  <bkoz@redhat.com>
 
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2003 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,7 +32,7 @@ namespace gnu
 
   void test01()
   { 
-    std::size_t i = offsetof(struct test_type, i);
+    std::size_t i __attribute__((unused)) = offsetof(struct test_type, i);
 #ifndef offsetof
     #error "offsetof_must_be_a_macro"
 #endif
diff --git a/libstdc++-v3/testsuite/17_intro/header_cstdio.cc b/libstdc++-v3/testsuite/17_intro/header_cstdio.cc
index 383cc0a52933..a7be009f9c4e 100644
--- a/libstdc++-v3/testsuite/17_intro/header_cstdio.cc
+++ b/libstdc++-v3/testsuite/17_intro/header_cstdio.cc
@@ -1,6 +1,6 @@
 // 2000-01-01 bkoz
 
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2003 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
@@ -25,6 +25,6 @@
 int main(void)
 {
   // Make sure size_t is in namespace std
-  std::size_t i = 5;
+  std::size_t i __attribute__((unused)) = 5;
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/17_intro/header_cstdlib.cc b/libstdc++-v3/testsuite/17_intro/header_cstdlib.cc
index f86f423d8750..377bd60ace48 100644
--- a/libstdc++-v3/testsuite/17_intro/header_cstdlib.cc
+++ b/libstdc++-v3/testsuite/17_intro/header_cstdlib.cc
@@ -1,6 +1,6 @@
 // 2000-01-01 bkoz
 
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003 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
@@ -25,15 +25,15 @@
 // libstdc++/2190
 void test01()
 {
-  long a = std::abs(1L);
+  long a __attribute__((unused)) = std::abs(1L);
   std::div(2L, 1L);
-  std::ldiv_t b;
+  std::ldiv_t b __attribute__((unused));
 }
 
 void test02()
 {
   // Make sure size_t is in namespace std.
-  std::size_t i = 5;
+  std::size_t i __attribute__((unused)) = 5;
 }
 
 int main()
diff --git a/libstdc++-v3/testsuite/17_intro/header_cstring.cc b/libstdc++-v3/testsuite/17_intro/header_cstring.cc
index ae8852a43e06..3085763954b2 100644
--- a/libstdc++-v3/testsuite/17_intro/header_cstring.cc
+++ b/libstdc++-v3/testsuite/17_intro/header_cstring.cc
@@ -1,6 +1,6 @@
 // 2000-01-01 bkoz
 
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2003 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
@@ -26,6 +26,6 @@
 int main(void)
 {
   // Make sure size_t is in namespace std
-  std::size_t i = std::strlen("tibet shop/san francisco (415) 982-0326");
+  std::size_t i __attribute__((unused)) = std::strlen("tibet shop/san francisco (415) 982-0326");
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/17_intro/header_ctime.cc b/libstdc++-v3/testsuite/17_intro/header_ctime.cc
index 03f8294cda61..1b97d645ec71 100644
--- a/libstdc++-v3/testsuite/17_intro/header_ctime.cc
+++ b/libstdc++-v3/testsuite/17_intro/header_ctime.cc
@@ -1,6 +1,6 @@
 // 2000-01-01 bkoz
 
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2003 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
@@ -22,10 +22,9 @@
 
 #include <ctime>
 
-
 int main(void)
 {
   // Make sure size_t is in namespace std
-  std::size_t i = 5;
+  std::size_t i __attribute__((unused)) = 5;
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/17_intro/header_cwchar.cc b/libstdc++-v3/testsuite/17_intro/header_cwchar.cc
index 8d65e024195d..dc2eefe14319 100644
--- a/libstdc++-v3/testsuite/17_intro/header_cwchar.cc
+++ b/libstdc++-v3/testsuite/17_intro/header_cwchar.cc
@@ -1,6 +1,6 @@
 // 2000-01-01 bkoz
 
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2003 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
@@ -25,9 +25,9 @@
 int main(void)
 {
   // Make sure size_t is in namespace std
-  std::size_t i = 5;
+  std::size_t i __attribute__((unused)) = 5;
 
-  std::tm mytime;
+  std::tm  __attribute__((unused)) mytime;
 
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/18_support/numeric_limits.cc b/libstdc++-v3/testsuite/18_support/numeric_limits.cc
index 63d9412c3684..a96cdf55453f 100644
--- a/libstdc++-v3/testsuite/18_support/numeric_limits.cc
+++ b/libstdc++-v3/testsuite/18_support/numeric_limits.cc
@@ -62,7 +62,7 @@ DEFINE_EXTREMA(long double, LDBL_MIN, LDBL_MAX);
 template<typename T>
 void test_extrema()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   T limits_min = std::numeric_limits<T>::min();
   T limits_max = std::numeric_limits<T>::max();
   T extrema_min = extrema<T>::min;
@@ -74,7 +74,7 @@ void test_extrema()
 template<typename T>
 void test_epsilon()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   T epsilon = std::numeric_limits<T>::epsilon();
   T one = 1;
 
@@ -89,7 +89,7 @@ void test_epsilon()
 
 void test_sign()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   VERIFY( std::numeric_limits<char>::is_signed == char_is_signed );
   VERIFY( std::numeric_limits<signed char>::is_signed == true );
   VERIFY( std::numeric_limits<unsigned char>::is_signed == false );
@@ -200,7 +200,7 @@ struct B
 
 bool test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::numeric_limits< A<B> > obj;
 
   VERIFY( !obj.is_specialized );
@@ -244,16 +244,16 @@ void test02()
   typedef std::numeric_limits<B> b_nl_type;
   
   // Should probably do all of them...
-  const int* pi1 = &b_nl_type::digits;
-  const int* pi2 = &b_nl_type::digits10;
-  const int* pi3 = &b_nl_type::max_exponent10;
-  const bool* pb1 = &b_nl_type::traps;
+  const int* __attribute__((unused)) pi1 = &b_nl_type::digits;
+  const int* __attribute__((unused)) pi2 = &b_nl_type::digits10;
+  const int* __attribute__((unused)) pi3 = &b_nl_type::max_exponent10;
+  const bool* __attribute__((unused)) pb1 = &b_nl_type::traps;
 }
 
 // libstdc++/5045
 bool test03()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   VERIFY( std::numeric_limits<bool>::digits10 == 0 );
   if (__CHAR_BIT__ == 8)
@@ -282,7 +282,7 @@ bool test03()
 // libstdc++/8949
 bool test04()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   VERIFY( !std::numeric_limits<short>::is_iec559 );
   VERIFY( !std::numeric_limits<unsigned short>::is_iec559 );
diff --git a/libstdc++-v3/testsuite/19_diagnostics/stdexceptions.cc b/libstdc++-v3/testsuite/19_diagnostics/stdexceptions.cc
index 267795acb752..30595f0f76a0 100644
--- a/libstdc++-v3/testsuite/19_diagnostics/stdexceptions.cc
+++ b/libstdc++-v3/testsuite/19_diagnostics/stdexceptions.cc
@@ -27,7 +27,7 @@
 // libstdc++/1972
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::string s("lack of sunlight, no water error");
 
   // 1
@@ -41,7 +41,7 @@ void test01()
 
 void test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::string s("lack of sunlight error");
   std::domain_error x(s);
   
@@ -57,7 +57,7 @@ public:
 
 void test03()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   try
     { throw fuzzy_logic(); }
   catch(const fuzzy_logic& obj)
@@ -78,7 +78,7 @@ void allocate_on_stack(void)
 }
 void test04()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const std::string s("CA ISO emergency once again:immediate power down");
   const char* strlit1 = "wish I lived in Palo Alto";
   const char* strlit2 = "...or Santa Barbara";
diff --git a/libstdc++-v3/testsuite/20_util/allocator_members.cc b/libstdc++-v3/testsuite/20_util/allocator_members.cc
index 8c40ab760f7f..4170a9d9a966 100644
--- a/libstdc++-v3/testsuite/20_util/allocator_members.cc
+++ b/libstdc++-v3/testsuite/20_util/allocator_members.cc
@@ -45,7 +45,7 @@ void operator delete(void *v) throw()
 
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::allocator<gnu> obj;
 
   // XXX These should work for various size allocation and
@@ -61,7 +61,7 @@ void test01()
 // libstdc++/8230
 void test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   try 
     {
       std::allocator<int> alloc;
diff --git a/libstdc++-v3/testsuite/20_util/auto_ptr.cc b/libstdc++-v3/testsuite/20_util/auto_ptr.cc
index d70b63f3e9ef..110d4b2d4bf0 100644
--- a/libstdc++-v3/testsuite/20_util/auto_ptr.cc
+++ b/libstdc++-v3/testsuite/20_util/auto_ptr.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2000, 2002 Free Software Foundation
+// Copyright (C) 2000, 2002, 2003 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
@@ -60,8 +60,8 @@ struct reset_count_struct
 int
 test01()
 {
-  reset_count_struct reset;
-  bool test = true;
+  reset_count_struct __attribute__((unused)) reset;
+  bool test __attribute__((unused)) = true;
 
   std::auto_ptr<A> A_default;
   VERIFY( A_default.get() == 0 );
@@ -91,8 +91,8 @@ test01()
 int
 test02()
 {
-  reset_count_struct reset;
-  bool test = true;
+  reset_count_struct __attribute__((unused)) reset;
+  bool test __attribute__((unused)) = true;
 
   std::auto_ptr<A> A_from_A(new A);
   std::auto_ptr<B> B_from_B(new B);
@@ -115,8 +115,8 @@ test02()
 int
 test03()
 {
-  reset_count_struct reset;
-  bool test = true;
+  reset_count_struct __attribute__((unused)) reset;
+  bool test __attribute__((unused)) = true;
 
   std::auto_ptr<A> A_from_ptr_A;
   std::auto_ptr<A> A_from_ptr_B;
@@ -141,8 +141,8 @@ test03()
 int
 test04()
 {
-  reset_count_struct reset;
-  bool test = true;
+  reset_count_struct __attribute__((unused)) reset;
+  bool test __attribute__((unused)) = true;
 
   {/*lifetine scope*/
     std::auto_ptr<A> A_from_A(new A);
@@ -171,8 +171,8 @@ private:
 int 
 test05()
 {
-  bool test = true;
-  reset_count_struct reset;
+  bool test __attribute__((unused)) = true;
+  reset_count_struct __attribute__((unused)) reset;
 
   pimpl<A>();
   pimpl<B>();
@@ -190,8 +190,8 @@ test05()
 int
 test06()
 {
-  reset_count_struct reset;
-  bool test = true;
+  reset_count_struct __attribute__((unused)) reset;
+  bool test __attribute__((unused)) = true;
 
   std::auto_ptr<A> A_from_A(new A);
   std::auto_ptr<A> A_from_A_ptr(A_from_A.release());
@@ -231,8 +231,8 @@ static void drain(std::auto_ptr<T>)
 int
 test07()
 {
-  bool test = true;
-  reset_count_struct reset;
+  bool test __attribute__((unused)) = true;
+  reset_count_struct __attribute__((unused)) reset;
 
   drain(source<A>());
   // The resolution of core issue 84, now a DR, breaks this call.
diff --git a/libstdc++-v3/testsuite/20_util/binders.cc b/libstdc++-v3/testsuite/20_util/binders.cc
index 6dd45e3ff96f..a12d3b681463 100644
--- a/libstdc++-v3/testsuite/20_util/binders.cc
+++ b/libstdc++-v3/testsuite/20_util/binders.cc
@@ -1,6 +1,6 @@
 // 2001-06-11  Benjamin Kosnik  <bkoz@redhat.com>
 
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2003 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
@@ -27,8 +27,8 @@
 class Elem 
 { 
 public: 
-  void print(int i) const { } 
-  void modify(int i) { } 
+  void print(int) const { } 
+  void modify(int) { } 
 }; 
 
 // libstdc++/3113
diff --git a/libstdc++-v3/testsuite/20_util/pairs.cc b/libstdc++-v3/testsuite/20_util/pairs.cc
index 451ef19703b5..085937f435fc 100644
--- a/libstdc++-v3/testsuite/20_util/pairs.cc
+++ b/libstdc++-v3/testsuite/20_util/pairs.cc
@@ -46,7 +46,7 @@ template<typename T>
 // heterogeneous
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::pair<bool, long> p_bl_1(true, 433);
   std::pair<bool, long> p_bl_2 = std::make_pair(true, 433);
@@ -75,7 +75,7 @@ void test01()
 // homogeneous
 void test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::pair<bool, bool> p_bb_1(true, false);
   std::pair<bool, bool> p_bb_2 = std::make_pair(true, false);
@@ -87,7 +87,7 @@ void test02()
 // const
 void test03()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   const std::pair<bool, long> p_bl_1(true, 433);
   const std::pair<bool, long> p_bl_2 = std::make_pair(true, 433);
@@ -116,7 +116,7 @@ void test03()
 // const&
 void test04()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const gnu_obj& obj1 = gnu_obj(5);
   const std::pair<const char*, gnu_obj> p_sg_1("enlightenment", obj1);
   const std::pair<const char*, gnu_obj> p_sg_2 = 
diff --git a/libstdc++-v3/testsuite/20_util/raw_storage_iterator.cc b/libstdc++-v3/testsuite/20_util/raw_storage_iterator.cc
index 7d59a8a60995..c79e54005812 100644
--- a/libstdc++-v3/testsuite/20_util/raw_storage_iterator.cc
+++ b/libstdc++-v3/testsuite/20_util/raw_storage_iterator.cc
@@ -1,6 +1,6 @@
 // 2001-06-18  Benjamin Kosnik  <bkoz@redhat.com>
 
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2003 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 @@ void test01()
   typedef raw_storage_iterator<long*, long> test_iterator;
   typedef iterator<output_iterator_tag, void, void, void, void> base_iterator;
   test_iterator rs_it(&l);
-  base_iterator* base = &rs_it;
+  base_iterator* base __attribute__((unused)) = &rs_it;
 
   // Check for required typedefs
   typedef test_iterator::value_type value_type;
diff --git a/libstdc++-v3/testsuite/20_util/temporary_buffer.cc b/libstdc++-v3/testsuite/20_util/temporary_buffer.cc
index 602b2fe80b7e..e83a82efcf88 100644
--- a/libstdc++-v3/testsuite/20_util/temporary_buffer.cc
+++ b/libstdc++-v3/testsuite/20_util/temporary_buffer.cc
@@ -27,7 +27,7 @@ struct junk { char j[12]; };
 
 int main(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::pair<junk*,ptrdiff_t>  results = std::get_temporary_buffer<junk>(5);
 
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/append/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/append/char/1.cc
index 496a6e543092..8fd48e555b99 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/append/char/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/append/char/1.cc
@@ -26,12 +26,11 @@
 
 bool test01(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::string::size_type csize_type;
   typedef std::string::const_reference cref;
   typedef std::string::reference ref;
-  csize_type npos = std::string::npos;
-  csize_type csz01, csz02;
+  csize_type csz01;
 
   const char str_lit01[] = "point bolivar, texas";
   const std::string str01(str_lit01);
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/append/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/append/wchar_t/1.cc
index f6002f9af5d3..194e09d21841 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/append/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/append/wchar_t/1.cc
@@ -26,12 +26,11 @@
 
 bool test01(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::wstring::size_type csize_type;
   typedef std::wstring::const_reference cref;
   typedef std::wstring::reference ref;
-  csize_type npos = std::wstring::npos;
-  csize_type csz01, csz02;
+  csize_type csz01;
 
   const wchar_t str_lit01[] = L"point bolivar, texas";
   const std::wstring str01(str_lit01);
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/assign/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/assign/char/1.cc
index 879d3c139c7f..1aa8a67809d0 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/assign/char/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/assign/char/1.cc
@@ -27,7 +27,7 @@
 void
 test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   using namespace std;
 
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/assign/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/assign/char/2.cc
index 9783c45202cc..9635b1b47ffc 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/assign/char/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/assign/char/2.cc
@@ -28,7 +28,7 @@
 void
 test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   using namespace std;
   
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/assign/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/assign/char/3.cc
index cfc35545da47..0c08fe7c72e3 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/assign/char/3.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/assign/char/3.cc
@@ -29,7 +29,7 @@
 void
 test03()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   using namespace std;
  
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/assign/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/assign/wchar_t/1.cc
index 5f110598bb98..377e35bf7b52 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/assign/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/assign/wchar_t/1.cc
@@ -27,7 +27,7 @@
 void
 test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   using namespace std;
 
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/assign/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/assign/wchar_t/2.cc
index 458204c522e9..7064d1f935f4 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/assign/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/assign/wchar_t/2.cc
@@ -28,7 +28,7 @@
 void
 test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   using namespace std;
   
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/assign/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/assign/wchar_t/3.cc
index fc9b5a21eea7..0d46ebe653d6 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/assign/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/assign/wchar_t/3.cc
@@ -29,7 +29,7 @@
 void
 test03()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   using namespace std;
  
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/1.cc
index 0a50ee7d9ed2..c37e01fb0464 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/1.cc
@@ -125,7 +125,7 @@ namespace std
 
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // non POD types : resize, capacity, reserve
   std::basic_string< A<B> > str02;
@@ -140,7 +140,7 @@ void test01()
   VERIFY( sz04 >= 100 );
   str02.reserve();
   sz03 = str02.capacity();
-  VERIFY( sz03 >= 0 );
+  VERIFY( sz03 > 0 );
 
   sz03 = str02.size() + 5;
   str02.resize(sz03);
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/1.cc
index 6072898318a3..649c5418ba6c 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/1.cc
@@ -26,7 +26,7 @@
 void test01()
 {
   // POD types : resize, capacity, reserve
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::string str01;
   typedef std::string::size_type size_type_s;
 
@@ -37,7 +37,7 @@ void test01()
   VERIFY( sz02 >= 100 );
   str01.reserve();
   sz01 = str01.capacity();
-  VERIFY( sz01 >= 0 );
+  VERIFY( sz01 > 0 );
 
   sz01 = str01.size() + 5;
   str01.resize(sz01);
@@ -79,9 +79,7 @@ void test01()
     
   // trickster allocator issues involved with these:
   std::string str3 = "8-chars_8-chars_";
-  const char* p3 = str3.c_str();
   std::string str4 = str3 + "7-chars";
-  const char* p4 = str3.c_str();
   
   sz01 = str01.size();
   sz02 = str01.max_size();  
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/2.cc
index 731a91870657..b88597486bdd 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/2.cc
@@ -27,7 +27,7 @@
 // http://gcc.gnu.org/ml/libstdc++/2001-11/msg00150.html
 void test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::string str01 = "twelve chars";
   // str01 becomes shared
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/1.cc
index 18af608d7d14..f10a25578a01 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/1.cc
@@ -26,7 +26,7 @@
 void test01()
 {
   // POD types : resize, capacity, reserve
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::wstring str01;
   typedef std::wstring::size_type size_type_s;
 
@@ -37,7 +37,7 @@ void test01()
   VERIFY( sz02 >= 100 );
   str01.reserve();
   sz01 = str01.capacity();
-  VERIFY( sz01 >= 0 );
+  VERIFY( sz01 > 0 );
 
   sz01 = str01.size() + 5;
   str01.resize(sz01);
@@ -79,9 +79,7 @@ void test01()
     
   // trickster allocator issues involved with these:
   std::wstring str3 = L"8-chars_8-chars_";
-  const wchar_t* p3 = str3.c_str();
   std::wstring str4 = str3 + L"7-chars";
-  const wchar_t* p4 = str3.c_str();
   
   sz01 = str01.size();
   sz02 = str01.max_size();  
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/2.cc
index 08aa2294bfa1..e611567ecd5e 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/2.cc
@@ -27,7 +27,7 @@
 // http://gcc.gnu.org/ml/libstdc++/2001-11/msg00150.html
 void test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::wstring str01 = L"twelve chars";
   // str01 becomes shared
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/1.cc
index 8f673c89dbfb..996f8ad0d32b 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/1.cc
@@ -27,11 +27,11 @@
 
 void test01(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::string::size_type csize_type;
   typedef std::string::iterator citerator;
   csize_type npos = std::string::npos;
-  csize_type csz01, csz02;
+  csize_type csz01;
 
   const char str_lit01[] = "rodeo beach, marin";
   const std::string str01(str_lit01);
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/2.cc
index d6458a967125..85c82ba78cf1 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/2.cc
@@ -25,7 +25,7 @@
 
 void test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // template<typename _InputIter>
   //   basic_string(_InputIter begin, _InputIter end, const allocator& a)
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/3.cc
index 6f40dda1833e..fc86271d0bc0 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/3.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/3.cc
@@ -27,7 +27,7 @@
 
 void test03()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* with_nulls = "This contains \0 a zero byte.";
 
   // These are tests to see how basic_string handles data with NUL
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/4.cc
index fe2f32132157..020eff6f229f 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/4.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/4.cc
@@ -26,7 +26,7 @@
 // http://gcc.gnu.org/ml/libstdc++/2002-06/msg00025.html
 void test04()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::string str01("portofino");
 
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/5.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/5.cc
index 4b2f4015854a..0aecd998e337 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/5.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/5.cc
@@ -27,7 +27,7 @@
 // libstdc++/8347
 void test05()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::vector<char> empty;
   std::string empty2(empty.begin(), empty.end());
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/1.cc
index b1a5b6dd40aa..45715fd5c14f 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/1.cc
@@ -27,11 +27,11 @@
 
 void test01(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::wstring::size_type csize_type;
   typedef std::wstring::iterator citerator;
   csize_type npos = std::wstring::npos;
-  csize_type csz01, csz02;
+  csize_type csz01;
 
   const wchar_t str_lit01[] = L"rodeo beach, marin";
   const std::wstring str01(str_lit01);
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/2.cc
index 9eaf4ce2700f..c7b6422675aa 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/2.cc
@@ -25,7 +25,7 @@
 
 void test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // template<typename _InputIter>
   //   basic_string(_InputIter begin, _InputIter end, const allocator& a)
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/3.cc
index 46b7287b0e01..882e22c59df1 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/3.cc
@@ -27,7 +27,7 @@
 
 void test03()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const wchar_t* with_nulls = L"This contains \0 a zero byte.";
 
   // These are tests to see how basic_string handles data with NUL
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/4.cc
index 87dab121eab6..9140ff759e4b 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/4.cc
@@ -26,7 +26,7 @@
 // http://gcc.gnu.org/ml/libstdc++/2002-06/msg00025.html
 void test04()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::wstring str01(L"portofino");
 
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/5.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/5.cc
index d02dc9c8f4b4..a426f292c888 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/5.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/5.cc
@@ -27,7 +27,7 @@
 // libstdc++/8347
 void test05()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::vector<wchar_t> empty;
   std::wstring empty2(empty.begin(), empty.end());
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/1.cc
index f594df728474..556039e6e1dd 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/1.cc
@@ -26,11 +26,10 @@
 
 bool test01(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::string::size_type csize_type;
   typedef std::string::const_reference cref;
   typedef std::string::reference ref;
-  csize_type npos = std::string::npos;
   csize_type csz01, csz02;
 
   const std::string str01("tamarindo, costa rica");
@@ -56,7 +55,7 @@ bool test01(void)
   cref cref3 = str01.at(csz01 - 1);
   VERIFY( cref3 == 'a' );
   try {
-    cref cref4 = str01.at(csz01);
+    str01.at(csz01);
     VERIFY( false ); // Should not get here, as exception thrown.
   }
   catch(std::out_of_range& fail) {
@@ -71,7 +70,7 @@ bool test01(void)
   ref ref3 = str02.at(csz02 - 1);
   VERIFY( ref3 == 'a' );
   try {
-    ref ref4 = str02.at(csz02);
+    str02.at(csz02);
     VERIFY( false ); // Should not get here, as exception thrown.
   }
   catch(std::out_of_range& fail) {
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/2.cc
index d2b5831ad6b7..34c1772d4ceb 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/2.cc
@@ -29,11 +29,10 @@
 // underlying string implementation, of course.
 bool test01(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::string::size_type csize_type;
   typedef std::string::iterator siterator;
   typedef std::string::reverse_iterator sriterator;
-  csize_type npos = std::string::npos;
   csize_type csz01, csz02;
   siterator it1;
   sriterator rit1;  
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/3.cc
index 1c7ee5bbdf7a..fec27bb5ef2b 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/3.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/char/3.cc
@@ -28,12 +28,10 @@
 // iterators, namely insert and erase.
 bool test02(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::string::size_type csize_type;
   typedef std::string::iterator siterator;
   typedef std::string::reverse_iterator sriterator;
-  csize_type npos = std::string::npos;
-  csize_type csz01, csz02;
   siterator it1;
   sriterator rit1;  
 
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/1.cc
index 3c39bc555cc1..11f5921eda24 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/1.cc
@@ -26,11 +26,10 @@
 
 bool test01(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::wstring::size_type csize_type;
   typedef std::wstring::const_reference cref;
   typedef std::wstring::reference ref;
-  csize_type npos = std::wstring::npos;
   csize_type csz01, csz02;
 
   const std::wstring str01(L"tamarindo, costa rica");
@@ -56,7 +55,7 @@ bool test01(void)
   cref cref3 = str01.at(csz01 - 1);
   VERIFY( cref3 == L'a' );
   try {
-    cref cref4 = str01.at(csz01);
+    str01.at(csz01);
     VERIFY( false ); // Should not get here, as exception thrown.
   }
   catch(std::out_of_range& fail) {
@@ -71,7 +70,7 @@ bool test01(void)
   ref ref3 = str02.at(csz02 - 1);
   VERIFY( ref3 == L'a' );
   try {
-    ref ref4 = str02.at(csz02);
+    str02.at(csz02);
     VERIFY( false ); // Should not get here, as exception thrown.
   }
   catch(std::out_of_range& fail) {
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/2.cc
index e2455e635e7b..a8e86fbf5822 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/2.cc
@@ -29,11 +29,10 @@
 // underlying string implementation, of course.
 bool test01(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::wstring::size_type csize_type;
   typedef std::wstring::iterator siterator;
   typedef std::wstring::reverse_iterator sriterator;
-  csize_type npos = std::wstring::npos;
   csize_type csz01, csz02;
   siterator it1;
   sriterator rit1;  
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/3.cc
index 0ef50cc8fb73..defd0875a8bb 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/element_access/wchar_t/3.cc
@@ -28,12 +28,10 @@
 // iterators, namely insert and erase.
 bool test02(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::wstring::size_type csize_type;
   typedef std::wstring::iterator siterator;
   typedef std::wstring::reverse_iterator sriterator;
-  csize_type npos = std::wstring::npos;
-  csize_type csz01, csz02;
   siterator it1;
   sriterator rit1;  
 
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/find/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/find/char/1.cc
index 0f2236cbe1ac..485ef4f1fc11 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/find/char/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/find/char/1.cc
@@ -25,7 +25,7 @@
 
 bool test01(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::string::size_type csize_type;
   typedef std::string::const_reference cref;
   typedef std::string::reference ref;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/find/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/find/char/2.cc
index 9c3e2f079a8e..6874f833ea58 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/find/char/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/find/char/2.cc
@@ -25,7 +25,7 @@
 
 bool test02(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::string::size_type csize_type;
   csize_type npos = std::string::npos;
   csize_type csz01, csz02;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/find/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/find/char/3.cc
index 15d0ee2ef52b..24b73333744a 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/find/char/3.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/find/char/3.cc
@@ -25,7 +25,7 @@
 
 bool test03(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::string::size_type csize_type;
   csize_type npos = std::string::npos;
   csize_type csz01;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/1.cc
index 6ed224b3b31e..11d14e59b189 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/1.cc
@@ -25,7 +25,7 @@
 
 bool test01(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::wstring::size_type csize_type;
   typedef std::wstring::const_reference cref;
   typedef std::wstring::reference ref;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/2.cc
index 4635dac12672..a0f0466e105b 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/2.cc
@@ -25,7 +25,7 @@
 
 bool test02(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::wstring::size_type csize_type;
   csize_type npos = std::wstring::npos;
   csize_type csz01, csz02;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/3.cc
index c874229d8530..6964e013f30a 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/find/wchar_t/3.cc
@@ -25,7 +25,7 @@
 
 bool test03(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::wstring::size_type csize_type;
   csize_type npos = std::wstring::npos;
   csize_type csz01;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/insert/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/insert/char/1.cc
index 919c8717b0ac..e1c540250759 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/insert/char/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/insert/char/1.cc
@@ -26,10 +26,9 @@
 
 int test01(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::string::size_type csize_type;
   typedef std::string::iterator citerator;
-  csize_type npos = std::string::npos;
   csize_type csz01, csz02;
 
   const std::string str01("rodeo beach, marin");
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/insert/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/insert/char/2.cc
index d39bbe2d091e..44384533a187 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/insert/char/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/insert/char/2.cc
@@ -29,7 +29,7 @@
 // but now s points inside the _Rep
 int test02(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::string str01;
   const char* title = "Everything was beautiful, and nothing hurt";
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/insert/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/insert/wchar_t/1.cc
index f439df907d94..2e6fdfd2c702 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/insert/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/insert/wchar_t/1.cc
@@ -26,10 +26,9 @@
 
 int test01(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::wstring::size_type csize_type;
   typedef std::wstring::iterator citerator;
-  csize_type npos = std::wstring::npos;
   csize_type csz01, csz02;
 
   const std::wstring str01(L"rodeo beach, marin");
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/insert/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/insert/wchar_t/2.cc
index 8b1468b3338e..a1a5389656a3 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/insert/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/insert/wchar_t/2.cc
@@ -29,7 +29,7 @@
 // but now s points inside the _Rep
 int test02(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::wstring str01;
   const wchar_t* title = L"Everything was beautiful, and nothing hurt";
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/1.cc
index ba92251c6ad3..fb2721782c92 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/1.cc
@@ -33,12 +33,10 @@
 
 bool test01(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::string::size_type csize_type;
   typedef std::string::const_reference cref;
   typedef std::string::reference ref;
-  csize_type npos = std::string::npos;
-  csize_type csz01, csz02;
 
   const std::string str01("sailing grand traverse bay\n"
 	       "\t\t\t    from Elk Rapids to the point reminds me of miles");
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/4.cc
index b53ca2764d25..1fbc3d05dc89 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/4.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/4.cc
@@ -30,11 +30,11 @@
 
 // testing basic_stringbuf::xsputn via stress testing with large strings
 // based on a bug report libstdc++ 9
-void test04(int size)
+void test04(std::size_t size)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::string str(size, 's');
-  int expected_size = 2 * (size + 1);
+  std::size_t expected_size = 2 * (size + 1);
   std::ostringstream oss(str);
   
   // sanity checks
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/5.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/5.cc
index 416a1df4421e..7ba1cecea818 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/5.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/5.cc
@@ -32,9 +32,9 @@
 // testing basic_filebuf::xsputn via stress testing with large strings
 // based on a bug report libstdc++ 9
 // mode == out
-void test05(int size)
+void test05(std::size_t size)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char filename[] = "inserters_extractors-1.txt";
   const char fillc = 'f';
   std::ofstream ofs(filename);
@@ -60,7 +60,7 @@ void test05(int size)
 
   // sanity check on the written file
   std::ifstream ifs(filename);
-  int count = 0;
+  std::size_t count = 0;
   char c;
   while (count <= (2 * size) + 4)
     {
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/6.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/6.cc
index 195ef9dc2ff9..b074ff2d44c9 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/6.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/6.cc
@@ -33,7 +33,7 @@
 // http://gcc.gnu.org/ml/libstdc++/1999-q4/msg00049.html
 void test06(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   typedef std::string::size_type size_type;
   std::string str01("@silent");
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/7.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/7.cc
index 07e3ce63cacd..02a2de8f051e 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/7.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/7.cc
@@ -34,7 +34,7 @@
 // NB: this is a defect in the standard.
 void test07(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const std::string name("z6.cc");
   std::istringstream iss (name);
   int i = 0;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/8.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/8.cc
index bdc848e8055a..4d5556661d48 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/8.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/8.cc
@@ -34,7 +34,7 @@ void test08()
 {
   using namespace std;
 
-  bool 		test = true;
+  bool test __attribute__((unused)) = true;
   istringstream istrm("enero:2001");
   int 		year;
   char 		sep;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/9.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/9.cc
index fb201c269291..6755af3f4e1b 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/9.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/9.cc
@@ -32,7 +32,7 @@
 // libstdc++/2830
 void test09()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::string blanks( 3, '\0');
   std::string foo = "peace";
   foo += blanks;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/1.cc
index 46718003d777..e77dbc1dc1d0 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/1.cc
@@ -33,12 +33,10 @@
 
 bool test01(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::wstring::size_type csize_type;
   typedef std::wstring::const_reference cref;
   typedef std::wstring::reference ref;
-  csize_type npos = std::wstring::npos;
-  csize_type csz01, csz02;
 
   const std::wstring str01(L"sailing grand traverse bay\n"
 	       L"\t\t\t    from Elk Rapids to the point reminds me of miles");
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/4.cc
index fd844438184c..ba4f84cead1f 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/4.cc
@@ -30,11 +30,11 @@
 
 // testing basic_stringbuf::xsputn via stress testing with large strings
 // based on a bug report libstdc++ 9
-void test04(int size)
+void test04(std::size_t size)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::wstring str(size, L's');
-  int expected_size = 2 * (size + 1);
+  std::size_t expected_size = 2 * (size + 1);
   std::wostringstream oss(str);
   
   // sanity checks
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/5.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/5.cc
index 6d5c69cc1a34..9a88091fd8f8 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/5.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/5.cc
@@ -32,9 +32,9 @@
 // testing basic_filebuf::xsputn via stress testing with large strings
 // based on a bug report libstdc++ 9
 // mode == out
-void test05(int size)
+void test05(std::size_t size)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char filename[] = "inserters_extractors-1.txt";
   const wchar_t fillc = L'f';
   std::wofstream ofs(filename);
@@ -60,7 +60,7 @@ void test05(int size)
 
   // sanity check on the written file
   std::wifstream ifs(filename);
-  int count = 0;
+  std::size_t count = 0;
   wchar_t c;
   while (count <= (2 * size) + 4)
     {
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/6.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/6.cc
index 1fa1fb07ca33..33699eb974a2 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/6.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/6.cc
@@ -33,7 +33,7 @@
 // http://gcc.gnu.org/ml/libstdc++/1999-q4/msg00049.html
 void test06(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   typedef std::wstring::size_type size_type;
   std::wstring str01(L"@silent");
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/7.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/7.cc
index 0a3775c0bc63..1971e959af39 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/7.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/7.cc
@@ -34,7 +34,7 @@
 // NB: this is a defect in the standard.
 void test07(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const std::wstring name(L"z6.cc");
   std::wistringstream iss(name);
   int i = 0;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/8.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/8.cc
index d43d818633fc..24aef6f6f18c 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/8.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/8.cc
@@ -34,7 +34,7 @@ void test08()
 {
   using namespace std;
 
-  bool 		 test = true;
+  bool test __attribute__((unused)) = true;
   wistringstream istrm(L"enero:2001");
   int 		 year;
   wchar_t	 sep;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/9.cc b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/9.cc
index 726dacc9816e..d83a17c3cac9 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/9.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/9.cc
@@ -32,7 +32,7 @@
 // libstdc++/2830
 void test09()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::wstring blanks(3, L'\0');
   std::wstring foo = L"peace";
   foo += blanks;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/1.cc
index dec24cff731e..b7337b2fd8d2 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/1.cc
@@ -26,7 +26,7 @@
 
 int test01(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::string str1;
   std::string str2;
@@ -35,11 +35,11 @@ int test01(void)
   // 1:8-chars_8-chars_
   // 2:8-chars_8-chars_
   str1 = std::string("8-chars_") + "8-chars_";
-  const char* p1 = str1.c_str();
+  str1.c_str();
   // printf("1:%s\n", str1.c_str());
   str2 = str1 + "7-chars";
   // printf("2:%s\n", str1.c_str()); //str1 is gone
-  const char* p2 = str1.c_str();
+  str1.c_str();
   return 0;
 }
 
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/2.cc
index bc3351d02fb4..c60985e4e2ab 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/operators/char/2.cc
@@ -115,7 +115,7 @@ template<class charT, class traits, class Allocator>
 
 int test01(void)
 {
-  bool 		test = true;
+  bool test __attribute__((unused)) = true;
   std::string 	str_0("costa rica");
   std::string 	str_1("costa marbella");
   std::string 	str_2("cost");
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/1.cc
index 1dec0cb68954..98b42f9f769f 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/1.cc
@@ -26,7 +26,7 @@
 
 int test01(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::wstring str1;
   std::wstring str2;
@@ -35,11 +35,11 @@ int test01(void)
   // 1:8-chars_8-chars_
   // 2:8-chars_8-chars_
   str1 = std::wstring(L"8-chars_") + L"8-chars_";
-  const wchar_t* p1 = str1.c_str();
+  str1.c_str();
   // wprintf("1:%s\n", str1.c_str());
   str2 = str1 + L"7-chars";
   // wprintf("2:%s\n", str1.c_str()); //str1 is gone
-  const wchar_t* p2 = str1.c_str();
+  str1.c_str();
   return 0;
 }
 
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/2.cc
index d92450d23baa..86ac5dbbf467 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/operators/wchar_t/2.cc
@@ -115,7 +115,7 @@ template<class charT, class traits, class Allocator>
 
 int test01(void)
 {
-  bool 		test = true;
+  bool test __attribute__((unused)) = true;
   std::wstring 	str_0(L"costa rica");
   std::wstring 	str_1(L"costa marbella");
   std::wstring 	str_2(L"cost");
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/1.cc
index d4c632b7a42c..497132428553 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/1.cc
@@ -25,12 +25,10 @@
 
 bool test01(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::string::size_type csize_type;
   typedef std::string::const_reference cref;
   typedef std::string::reference ref;
-  csize_type npos = std::string::npos;
-  csize_type csz01, csz02;
 
   const char str_lit01[] = "ventura, california";
   const std::string str01(str_lit01);
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/2.cc
index 7731edd37a48..08efb962c9e3 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/2.cc
@@ -26,7 +26,7 @@
 void
 test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* strlit = "../the long pier/Hanalei Bay/Kauai/Hawaii";
   std::string aux = strlit;
   aux.replace(aux.begin()+5, aux.begin()+20,
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/3.cc
index a04d13d40243..81cde7bceef1 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/3.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/3.cc
@@ -27,7 +27,7 @@
 void
 test03()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* title01 = "nine types of ambiguity";
   const char* title02 = "ultra";
   std::string str01 = title01;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/4.cc
index fcb924a82221..14a294221d66 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/4.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/4.cc
@@ -29,7 +29,7 @@
 void
 test04()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::string str01 = "geogaddi";
   std::string str02;
 
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/5.cc b/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/5.cc
index 8c112c545ed0..4e1837f89b29 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/5.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/replace/char/5.cc
@@ -28,7 +28,7 @@
 void
 test05()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::string str01 = "londinium";
   std::string str02 = "cydonia";
 
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/1.cc
index 19ee154025f9..8d2209da497a 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/1.cc
@@ -25,12 +25,10 @@
 
 bool test01(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::wstring::size_type csize_type;
   typedef std::wstring::const_reference cref;
   typedef std::wstring::reference ref;
-  csize_type npos = std::wstring::npos;
-  csize_type csz01, csz02;
 
   const wchar_t str_lit01[] = L"ventura, california";
   const std::wstring str01(str_lit01);
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/2.cc
index da9678a338ff..2ee38141ca2e 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/2.cc
@@ -27,7 +27,7 @@
 void
 test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const wchar_t* strlit = L"../the long pier/Hanalei Bay/Kauai/Hawaii";
   std::wstring aux = strlit;
   aux.replace(aux.begin()+5, aux.begin()+20,
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/3.cc
index 2ff6ef282949..b50af79b0ad3 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/3.cc
@@ -27,7 +27,7 @@
 void
 test03()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const wchar_t* title01 = L"nine types of ambiguity";
   const wchar_t* title02 = L"ultra";
   std::wstring str01 = title01;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/4.cc
index 94baa82250da..d11dec82fd2d 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/4.cc
@@ -29,7 +29,7 @@
 void
 test04()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::wstring str01 = L"geogaddi";
   std::wstring str02;
 
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/5.cc b/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/5.cc
index f54cfb9a2e7b..1f8d4d9feb4d 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/5.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/replace/wchar_t/5.cc
@@ -28,7 +28,7 @@
 void
 test05()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::wstring str01 = L"londinium";
   std::wstring str02 = L"cydonia";
 
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/1.cc
index ddc791b6c4aa..42913dc3b4d9 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/1.cc
@@ -24,7 +24,7 @@
 // 21.3.6.2 basic_string rfind
 bool test01(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::string::size_type csize_type;
   typedef std::string::const_reference cref;
   typedef std::string::reference ref;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/2.cc
index d186199a1383..1f0f5a3367ed 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/2.cc
@@ -24,7 +24,7 @@
 // 21.3.6.4 basic_string::find_last_of
 bool test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::string z("ab");
   std::string::size_type pos;
   pos = z.find_last_of("ab");
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/3.cc
index 3517d4da169f..9c3bec96facb 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/3.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/char/3.cc
@@ -24,7 +24,7 @@
 // 21.3.6.6 basic_string::find_last_not_of
 bool test03()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::string::size_type csize_type;
   std::string::size_type pos;
   csize_type npos = std::string::npos;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/1.cc
index bfb1f914c21e..46077a8550fd 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/1.cc
@@ -24,7 +24,7 @@
 // 21.3.6.2 basic_string rfind
 bool test01(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::wstring::size_type csize_type;
   typedef std::wstring::const_reference cref;
   typedef std::wstring::reference ref;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/2.cc
index 2f813b9b28b4..af012b9d0695 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/2.cc
@@ -24,7 +24,7 @@
 // 21.3.6.4 basic_string::find_last_of
 bool test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::wstring::size_type pos;
   std::wstring z(L"ab");
   pos = z.find_last_of(L"ab");
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/3.cc b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/3.cc
index a94da0d3e859..7c564e769e70 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/rfind/wchar_t/3.cc
@@ -24,7 +24,7 @@
 // 21.3.6.6 basic_string::find_last_not_of
 bool test03()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::wstring::size_type csize_type;
   std::wstring::size_type pos;
   csize_type npos = std::wstring::npos;
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/substr/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/substr/char/1.cc
index 486892a62e0c..b1ed63d60aed 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/substr/char/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/substr/char/1.cc
@@ -26,12 +26,11 @@
 
 bool test01(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::string::size_type csize_type;
   typedef std::string::const_reference cref;
   typedef std::string::reference ref;
-  csize_type npos = std::string::npos;
-  csize_type csz01, csz02;
+  csize_type csz01;
 
   const char str_lit01[] = "rockaway, pacifica";
   const std::string str01(str_lit01);
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/substr/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/substr/wchar_t/1.cc
index 1a4e4f63936e..da00f1c507bd 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/substr/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/substr/wchar_t/1.cc
@@ -26,12 +26,11 @@
 
 bool test01(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::wstring::size_type csize_type;
   typedef std::wstring::const_reference cref;
   typedef std::wstring::reference ref;
-  csize_type npos = std::wstring::npos;
-  csize_type csz01, csz02;
+  csize_type csz01;
 
   const wchar_t str_lit01[] = L"rockaway, pacifica";
   const std::wstring str01(str_lit01);
diff --git a/libstdc++-v3/testsuite/21_strings/c_strings/char/1.cc b/libstdc++-v3/testsuite/21_strings/c_strings/char/1.cc
index 7dfe6c24cf2a..c18b4238a6e9 100644
--- a/libstdc++-v3/testsuite/21_strings/c_strings/char/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/c_strings/char/1.cc
@@ -25,7 +25,7 @@
 
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   char c = 'a';
   const char cc = 'b';
   char* c1 = &c;
diff --git a/libstdc++-v3/testsuite/21_strings/c_strings/char/2.cc b/libstdc++-v3/testsuite/21_strings/c_strings/char/2.cc
index 7ec0561b8877..2eaac5e7d357 100644
--- a/libstdc++-v3/testsuite/21_strings/c_strings/char/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/c_strings/char/2.cc
@@ -31,14 +31,15 @@ void test02()
   const char* ccarray2 = "san francisco sunny-day park inspectors";
   char carray[50];
   strcpy(carray, ccarray1);
-  void* v = carray;
   const void* cv = ccarray1;
- 
-  memchr(cv, '/', 3);
-  strchr(ccarray1, '/');
-  strpbrk(ccarray1, ccarray2);
-  strrchr(ccarray1, 'c');
-  strstr(carray, carray);
+  void* v;
+  char* c;
+
+  v = memchr(cv, '/', 3);
+  c = strchr(ccarray1, '/');
+  c = strrchr(ccarray1, 'c');
+  c = strpbrk(ccarray1, ccarray2);
+  c = strstr(carray, carray);
 }
 
 int main()
diff --git a/libstdc++-v3/testsuite/21_strings/c_strings/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/c_strings/wchar_t/1.cc
index 3ad6aed1e0a6..7c4395aea3dd 100644
--- a/libstdc++-v3/testsuite/21_strings/c_strings/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/c_strings/wchar_t/1.cc
@@ -26,7 +26,7 @@
 
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   wchar_t c = L'a';
   const wchar_t cc = L'b';
   wchar_t* c1 = &c;
diff --git a/libstdc++-v3/testsuite/21_strings/c_strings/wchar_t/2.cc b/libstdc++-v3/testsuite/21_strings/c_strings/wchar_t/2.cc
index 3a8f77cd3355..19a7ebe30421 100644
--- a/libstdc++-v3/testsuite/21_strings/c_strings/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/21_strings/c_strings/wchar_t/2.cc
@@ -32,12 +32,13 @@ void test02()
   const wchar_t* ccarray2 = L"san francisco sunny-day park inspectors";
   wchar_t carray[50];
   wcscpy(carray, ccarray1);
- 
-  wmemchr(ccarray1, L'/', 3);
-  wcschr(ccarray1, L'/');
-  wcspbrk(ccarray1, ccarray2);
-  wcsrchr(ccarray1, L'c');
-  wcsstr(carray, carray);
+  wchar_t* w;
+
+  w = wmemchr(ccarray1, L'/', 3);
+  w = wcschr(ccarray1, L'/');
+  w = wcspbrk(ccarray1, ccarray2);
+  w = wcsrchr(ccarray1, L'c');
+  w = wcsstr(carray, carray);
 }
 
 int main()
diff --git a/libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/1.cc b/libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/1.cc
index 6f8eb4737379..4ef29f20d35b 100644
--- a/libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/1.cc
@@ -25,7 +25,7 @@
 
 void test01(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const std::string str_01("zuma beach");
   const std::string str_02("montara and ocean beach");
  
diff --git a/libstdc++-v3/testsuite/21_strings/char_traits/requirements/short/1.cc b/libstdc++-v3/testsuite/21_strings/char_traits/requirements/short/1.cc
index 4a61942efc7a..b38b3cff177c 100644
--- a/libstdc++-v3/testsuite/21_strings/char_traits/requirements/short/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/char_traits/requirements/short/1.cc
@@ -29,7 +29,7 @@
 
 void test02(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
  
   // 21.1.1 character traits requirements
 
diff --git a/libstdc++-v3/testsuite/21_strings/char_traits/requirements/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/char_traits/requirements/wchar_t/1.cc
index a93d2f50f2e1..d4a64ae4a10b 100644
--- a/libstdc++-v3/testsuite/21_strings/char_traits/requirements/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/char_traits/requirements/wchar_t/1.cc
@@ -25,7 +25,7 @@
 
 void test02(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const std::wstring str_01(L"zuma beach");
   const std::wstring str_02(L"montara and ocean beach");
  
diff --git a/libstdc++-v3/testsuite/21_strings/char_traits/typedefs/char/1.cc b/libstdc++-v3/testsuite/21_strings/char_traits/typedefs/char/1.cc
index 4f2d061fb095..5d34aae47793 100644
--- a/libstdc++-v3/testsuite/21_strings/char_traits/typedefs/char/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/char_traits/typedefs/char/1.cc
@@ -28,7 +28,7 @@ int main()
   // 21.1.3: char_traits<char>::int_type == int
   // dg-options -ansi -pedantic-err
   std::char_traits<char>::int_type* p = 0;
-  int* q = p;                   // dg-do compile
+  int* q __attribute__((unused)) = p;                   // dg-do compile
 
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/1.cc
index fa285752871d..1c46d583c419 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/1.cc
@@ -29,7 +29,7 @@ void test01()
   typedef std::codecvt<char, char, mbstate_t> test_type;
   typedef std::locale::facet base_type;
   const test_type& obj = std::use_facet<test_type>(std::locale()); 
-  const base_type* base = &obj;
+  const base_type* base __attribute__((unused)) = &obj;
   
   // Check for required typedefs
   typedef test_type::intern_type intern_type;
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/1.cc
index 523322ece874..060b3683a520 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/char/1.cc
@@ -31,16 +31,12 @@ void test01()
   typedef codecvt_base::result			result;
   typedef codecvt<char, char, mbstate_t> 	c_codecvt;
 
-  bool 			test = true;
-  const char* 		c_lit = "black pearl jasmine tea";
-  const char* 	        from_next;
+  bool test __attribute__((unused)) = true;
   int 			size = 25;
   char* 		c_arr = new char[size];
   char*                 c_ref = new char[size];
-  char*			to_next;
 
   locale 		loc = locale::classic();
-  c_codecvt::state_type state;
   const c_codecvt* 	cvt = &use_facet<c_codecvt>(loc); 
 
   // According to the resolution of DR19 (see also libstd++/9168), in
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/1.cc
index 6b57c89232f2..13fc3838c73a 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/1.cc
@@ -28,7 +28,7 @@
 void test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef codecvt<wchar_t, char, mbstate_t> 	w_codecvt;
 
   locale 		loc;
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc
index 1a933f8fd3b6..da377b57a454 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc
@@ -30,7 +30,7 @@
 void test02()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef codecvt<wchar_t, char, mbstate_t> 	w_codecvt;
 
   locale loc = __gnu_test::try_named_locale("en_US.ISO-8859-1");
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc
index 9e98f53f88b2..6830d301036c 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc
@@ -30,7 +30,7 @@
 void test03()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef codecvt<wchar_t, char, mbstate_t> 	w_codecvt;
 
   locale loc = __gnu_test::try_named_locale("en_US.ISO-8859-15");
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/4.cc
index 0929676270f9..ecb007531753 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/4.cc
@@ -30,7 +30,7 @@
 void test04()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef codecvt<wchar_t, char, mbstate_t> 	w_codecvt;
 
   locale loc = __gnu_test::try_named_locale("en_US.UTF-8");
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/1.cc
index 9ac07c5f044b..76428bff1808 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/char/1.cc
@@ -31,16 +31,12 @@ void test01()
   typedef codecvt_base::result			result;
   typedef codecvt<char, char, mbstate_t> 	c_codecvt;
 
-  bool 			test = true;
-  const char* 		c_lit = "black pearl jasmine tea";
-  const char* 	        from_next;
+  bool test __attribute__((unused)) = true;
   int 			size = 25;
   char* 		c_arr = new char[size];
   char*                 c_ref = new char[size];
-  char*			to_next;
 
   locale 		loc = locale::classic();
-  c_codecvt::state_type state;
   const c_codecvt* 	cvt = &use_facet<c_codecvt>(loc); 
 
   // According to the resolution of DR19 (see also libstd++/9168), in
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/1.cc
index d2fa938e8923..1b86fb7a8ddc 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/1.cc
@@ -29,7 +29,7 @@ void test01()
 {
   using namespace std;
   typedef codecvt<wchar_t, char, mbstate_t> 	w_codecvt;
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
 
   locale 		loc_c = locale::classic();
   const w_codecvt* 	cvt = &use_facet<w_codecvt>(loc_c); 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/2.cc
index c103b2e41c50..815cfd3ec282 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/2.cc
@@ -31,7 +31,7 @@ void test02()
 {
   using namespace std;
   typedef codecvt<wchar_t, char, mbstate_t> 	w_codecvt;
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
 
   locale loc = __gnu_test::try_named_locale("en_US.ISO-8859-1");
   locale::global(loc);
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/3.cc
index 9cc921c7bce1..d456868b85d3 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/3.cc
@@ -31,7 +31,7 @@ void test03()
 {
   using namespace std;
   typedef codecvt<wchar_t, char, mbstate_t> 	w_codecvt;
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
 
   locale loc = __gnu_test::try_named_locale("en_US.ISO-8859-15");
   locale::global(loc);
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/4.cc
index 68972e7ab325..d996797a8bea 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/4.cc
@@ -31,7 +31,7 @@ void test04()
 {
   using namespace std;
   typedef codecvt<wchar_t, char, mbstate_t> 	w_codecvt;
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
 
   locale loc = __gnu_test::try_named_locale("en_US.UTF-8");
   locale::global(loc);
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/char/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/char/1.cc
index 71f6ac774986..bbc6397ce373 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/in/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/char/1.cc
@@ -31,7 +31,7 @@ void test01()
   typedef codecvt_base::result			result;
   typedef codecvt<char, char, mbstate_t> 	c_codecvt;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const char* 		c_lit = "black pearl jasmine tea";
   const char* 	        from_next;
   int 			size = 25;
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/1.cc
index d5a410a77418..d8c2e8fe42ad 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/1.cc
@@ -49,7 +49,7 @@ void test01()
   typedef char					ext_type;
   typedef char_traits<wchar_t>			int_traits;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const ext_type* 	e_lit = "black pearl jasmine tea";
   const ext_type*       efrom_next;
   const int_type* 	i_lit = L"black pearl jasmine tea";
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/2.cc
index 51739b6ae3b5..c1e025cff4b1 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/2.cc
@@ -49,7 +49,7 @@ void test02()
   typedef char					ext_type;
   typedef char_traits<wchar_t>			int_traits;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const ext_type* 	e_lit =
     "\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13"
     "\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20!\"#$%&"
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/3.cc
index 118462d618b8..361f2c7c418d 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/3.cc
@@ -49,7 +49,7 @@ void test03()
   typedef char					ext_type;
   typedef char_traits<wchar_t>			int_traits;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const ext_type* 	e_lit =
     "\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13"
     "\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20!\"#$%&"
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/4.cc
index c08ee55efea0..14b67284b8cf 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/4.cc
@@ -50,7 +50,7 @@ void test04()
   typedef char					ext_type;
   typedef char_traits<wchar_t>			int_traits;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const ext_type* 	e_lit =
     "\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13"
     "\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20!\"#$%&"
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/5.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/5.cc
index ec65f60c6928..aa0879d393db 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/5.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/5.cc
@@ -50,7 +50,7 @@ void test05()
   typedef char					ext_type;
   typedef char_traits<wchar_t>			int_traits;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const ext_type 	e_lit[] = { '\0', '\0', 'f', '\0' };
   const ext_type*       efrom_next;
   const int_type 	i_lit[] = { L'\0', L'\0', L'f', L'\0' };
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/6.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/6.cc
index 1be30323b8b3..1eed2880dbc6 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/6.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/6.cc
@@ -50,7 +50,7 @@ void test06()
   typedef char					ext_type;
   typedef char_traits<wchar_t>			int_traits;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const ext_type* 	e_lit = "black pearl jasmine tea";
   const ext_type*       efrom_next;
   const int_type* 	i_lit = L"black pearl jasmine tea";
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/7.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/7.cc
index 7d14ab4cfb51..8689be233faf 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/7.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/7.cc
@@ -49,7 +49,7 @@ void test07()
   typedef char					ext_type;
   typedef char_traits<wchar_t>			int_traits;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const ext_type* 	e_lit = "a\xc0\xff";
   const ext_type*       efrom_next;
   const int_type* 	i_lit = L"a";
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/8.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/8.cc
index 296f2eb3171d..ee4d82bae63f 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/8.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/8.cc
@@ -49,7 +49,7 @@ void test08()
   typedef char					ext_type;
   typedef char_traits<wchar_t>			int_traits;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const ext_type* 	e_lit =
     "\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13"
     "\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20!\"#$%&"
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/9.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/9.cc
index 7ba367b13276..ed6e68849a7d 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/9.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/9.cc
@@ -49,7 +49,7 @@ void test09()
   typedef char					ext_type;
   typedef char_traits<wchar_t>			int_traits;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const ext_type* 	e_lit =
     "\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13"
     "\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20!\"#$%&"
@@ -118,7 +118,7 @@ void test09()
   // in
   w_codecvt::state_type state01;
   zero_state(state01);
-  result r1;
+  result r1 = codecvt_base::error;
 
   for (int i = 0; i <= esize; ++i)
     {
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/char/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/char/1.cc
index 3ea244dcbb0d..085952863c2a 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/length/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/char/1.cc
@@ -31,7 +31,7 @@ void test01()
   typedef codecvt_base::result			result;
   typedef codecvt<char, char, mbstate_t> 	c_codecvt;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const char* 		c_lit = "black pearl jasmine tea";
   int 			size = 25;
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/char/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/char/2.cc
index 6e0a7e96f2ea..5e5023af8509 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/length/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/char/2.cc
@@ -49,7 +49,7 @@ void test02()
   typedef codecvt_base::result			result;
   typedef codecvt<char, char, mbstate_t> 	c_codecvt;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const char* 		c_lit = "black pearl jasmine tea";
   int 			size = 25;
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/1.cc
index 100de8567fcc..bc228755a0d5 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/1.cc
@@ -44,7 +44,7 @@ void test01()
   typedef codecvt<wchar_t, char, mbstate_t> 	w_codecvt;
   typedef char					ext_type;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const ext_type* 	e_lit = "black pearl jasmine tea";
   int 			size = strlen(e_lit);
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/2.cc
index 6f92b6ce093e..a969ef612359 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/2.cc
@@ -44,7 +44,7 @@ void test02()
   typedef codecvt<wchar_t, char, mbstate_t> 	w_codecvt;
   typedef char					ext_type;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const ext_type* 	e_lit =
     "\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13"
     "\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20!\"#$%&"
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/3.cc
index 8aec29d580ba..3512e8ce265c 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/3.cc
@@ -44,7 +44,7 @@ void test03()
   typedef codecvt<wchar_t, char, mbstate_t> 	w_codecvt;
   typedef char					ext_type;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const ext_type* 	e_lit =
     "\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13"
     "\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20!\"#$%&"
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/4.cc
index 0b7b87c26435..ca742c302402 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/4.cc
@@ -45,7 +45,7 @@ void test04()
   typedef wchar_t				int_type;
   typedef char					ext_type;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const ext_type* 	e_lit =
     "\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13"
     "\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20!\"#$%&"
@@ -72,7 +72,6 @@ void test04()
     "\x80\x80\x80\xfc\x90\x80\x80\x80\x80\xfc\xa0\x80\x80\x80\x80"
     "\xfd\x80\x80\x80\x80\x80";
 
-  const ext_type*       efrom_next;
   const int_type 	i_lit[] = {
     0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc,
     0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/5.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/5.cc
index 284233e7b6bf..2921a9d9bfdc 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/5.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/5.cc
@@ -44,7 +44,7 @@ void test05()
   typedef codecvt<wchar_t, char, mbstate_t> 	w_codecvt;
   typedef char					ext_type;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const ext_type 	e_lit[] = { '\0', '\0', 'f', '\0' };
   int 			size = sizeof(e_lit);
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/6.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/6.cc
index 76c151edf05c..a0700c189201 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/6.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/6.cc
@@ -62,7 +62,7 @@ void test06()
   typedef codecvt<wchar_t, char, mbstate_t> 	w_codecvt;
   typedef char					ext_type;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const ext_type* 	e_lit = "black pearl jasmine tea";
   int 			size = strlen(e_lit);
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/7.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/7.cc
index 7d8ff4a1d802..5f35a0f2b1a7 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/7.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/7.cc
@@ -47,9 +47,8 @@ void test07()
   typedef wchar_t				int_type;
   typedef char					ext_type;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const ext_type* 	e_lit = "a\xc0\xff";
-  const ext_type*       efrom_next;
   int 			size = strlen(e_lit);
 
   locale loc = __gnu_test::try_named_locale("en_US.UTF-8");
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/1.cc
index 789007ae9052..2880ec526364 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/char/1.cc
@@ -31,16 +31,11 @@ void test01()
   typedef codecvt_base::result			result;
   typedef codecvt<char, char, mbstate_t> 	c_codecvt;
 
-  bool 			test = true;
-  const char* 		c_lit = "black pearl jasmine tea";
-  const char* 	        from_next;
+  bool test __attribute__((unused)) = true;
   int 			size = 25;
   char* 		c_arr = new char[size];
   char*                 c_ref = new char[size];
-  char*			to_next;
-
   locale 		loc = locale::classic();
-  c_codecvt::state_type state;
   const c_codecvt* 	cvt = &use_facet<c_codecvt>(loc); 
 
   // According to the resolution of DR19 (see also libstd++/9168), in
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/1.cc
index 5ecc99e0c6a9..ad8cc24c60cb 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/1.cc
@@ -28,7 +28,7 @@
 void test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef codecvt<wchar_t, char, mbstate_t> 	w_codecvt;
 
   locale 		loc_c = locale::classic();
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/2.cc
index c99c823fbe28..57d471e77989 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/2.cc
@@ -28,7 +28,7 @@
 void test02()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef codecvt<wchar_t, char, mbstate_t> 	w_codecvt;
 
   locale  loc = __gnu_test::try_named_locale("en_US.ISO-8859-1");
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/3.cc
index 27f67a4f1174..229692b5f733 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/3.cc
@@ -28,7 +28,7 @@
 void test03()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef codecvt<wchar_t, char, mbstate_t> 	w_codecvt;
 
   locale loc = __gnu_test::try_named_locale("en_US.ISO-8859-15");
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/4.cc
index 8ab6828ddb56..7533e4c06591 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/4.cc
@@ -28,7 +28,7 @@
 void test04()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef codecvt<wchar_t, char, mbstate_t> 	w_codecvt;
 
   locale loc = __gnu_test::try_named_locale("en_US.UTF-8");
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/char/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/char/1.cc
index f0ef0a5da639..1dddbb207c76 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/out/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/char/1.cc
@@ -31,7 +31,7 @@ void test01()
   typedef codecvt_base::result			result;
   typedef codecvt<char, char, mbstate_t> 	c_codecvt;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const char* 		c_lit = "black pearl jasmine tea";
   const char* 	        from_next;
   int 			size = 25;
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/1.cc
index 82a57c6fdbdd..75eb2ff08175 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/1.cc
@@ -47,7 +47,7 @@ void test01()
   typedef char					ext_type;
   typedef char_traits<char>			ext_traits;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const ext_type* 	e_lit = "black pearl jasmine tea";
   const int_type* 	i_lit = L"black pearl jasmine tea";
   const int_type*       ifrom_next;
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/2.cc
index ff413d5ac8ae..cffff049c284 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/2.cc
@@ -47,7 +47,7 @@ void test02()
   typedef char					ext_type;
   typedef char_traits<char>			ext_traits;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const ext_type* 	e_lit =
     "\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13"
     "\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20!\"#$%&"
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/3.cc
index b1fa9fa4f22b..c421488d1c40 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/3.cc
@@ -47,7 +47,7 @@ void test03()
   typedef char					ext_type;
   typedef char_traits<char>			ext_traits;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const ext_type* 	e_lit =
     "\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13"
     "\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20!\"#$%&"
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/4.cc
index 4fd193e3055e..fabb941b021a 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/4.cc
@@ -47,7 +47,7 @@ void test04()
   typedef char					ext_type;
   typedef char_traits<char>			ext_traits;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const ext_type* 	e_lit =
     "\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13"
     "\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20!\"#$%&"
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/5.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/5.cc
index 13ca4b287195..55ba7eff9006 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/5.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/5.cc
@@ -50,7 +50,7 @@ void test05()
   typedef char					ext_type;
   typedef char_traits<char>			ext_traits;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const ext_type 	e_lit[] = { '\0', '\0', 'f', '\0' };
   const int_type 	i_lit[] = { L'\0', L'\0', L'f', L'\0' };
   const int_type*       ifrom_next;
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/6.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/6.cc
index 9ee2770bafdc..a44746ff02d7 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/6.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/6.cc
@@ -50,7 +50,7 @@ void test06()
   typedef char					ext_type;
   typedef char_traits<char>			ext_traits;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const ext_type* 	e_lit = "black pearl jasmine tea";
   const int_type* 	i_lit = L"black pearl jasmine tea";
   const int_type*       ifrom_next;
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/7.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/7.cc
index 3c069c8bb840..2a469c65c30d 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/7.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/7.cc
@@ -47,7 +47,7 @@ void test03()
   typedef char					ext_type;
   typedef char_traits<char>			ext_traits;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const ext_type* 	e_lit = "a";
   const int_type 	i_lit[] = { L'a', 0x20ac, 0x0 };
   const int_type*       ifrom_next;
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unicode/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unicode/1.cc
index b1dc652d6d4e..705f43afd6f1 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/unicode/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/unicode/1.cc
@@ -119,7 +119,7 @@ void test01()
   typedef __enc_traits				enc_type;
   typedef codecvt<int_type, ext_type, enc_type>	unicode_codecvt;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const ext_type* 	e_lit = "black pearl jasmine tea";
   int 			size = strlen(e_lit);
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unicode/char.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unicode/char.cc
index 1fa9648f5e86..ad31f9ae2fcb 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/unicode/char.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/unicode/char.cc
@@ -126,7 +126,7 @@ void test01()
   typedef char_traits<int_type>			int_traits;
   typedef char_traits<ext_type>			ext_traits;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const ext_type* 	e_lit = "black pearl jasmine tea";
   int 			size = strlen(e_lit);
 
@@ -215,7 +215,7 @@ void test02()
   typedef char_traits<int_type>			int_traits;
   typedef char_traits<ext_type>			ext_traits;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const ext_type* 	e_lit = "black pearl jasmine tea";
   int 			size = strlen(e_lit);
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unicode/wchar_t.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unicode/wchar_t.cc
index 5f3d76cfe640..5793b33aa77a 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/unicode/wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/unicode/wchar_t.cc
@@ -103,7 +103,7 @@ void test01()
   typedef char_traits<int_type>			int_traits;
   typedef char_traits<ext_type>			ext_traits;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   int 			size = 23;
   char  e_lit_base[96] __attribute__((aligned(__alignof__(ext_type)))) =
   {
@@ -155,8 +155,8 @@ void test01()
   unicode_codecvt::state_type state02("UCS-2BE", "UCS-4BE", 0, 0);
   initialize_state(state02);  
   result r2 = cvt.out(state02, i_lit, i_lit + size, ifrom_next, 
-		       e_arr, e_arr + size, eto_next);
-  // XXX   VERIFY( r2 == codecvt_base::ok );
+		       e_arr, e_arr + size, eto_next);   
+  VERIFY( r2 == codecvt_base::ok ); // XXX?
   VERIFY( !ext_traits::compare(e_arr, e_lit, size) ); 
   VERIFY( ifrom_next == i_lit + size );
   VERIFY( eto_next == e_arr + size );
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/1.cc
index 1a6eadd82fe6..25a36ef5ee9f 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/char/1.cc
@@ -31,7 +31,7 @@ void test01()
   typedef codecvt_base::result			result;
   typedef codecvt<char, char, mbstate_t> 	c_codecvt;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const char* 		c_lit = "black pearl jasmine tea";
   const char* 	        from_next;
   int 			size = 25;
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/1.cc
index 65aaea05056a..8410a358c4cd 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/1.cc
@@ -46,7 +46,7 @@ void test01()
   typedef wchar_t				int_type;
   typedef char					ext_type;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const ext_type* 	e_lit = "black pearl jasmine tea";
   int 			size = strlen(e_lit);
   ext_type* 		e_arr = new ext_type[size + 1];
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/2.cc
index a6d107cacb60..dce60f81a26a 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/2.cc
@@ -47,7 +47,7 @@ void test02()
   typedef char					ext_type;
   typedef char_traits<char>			ext_traits;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const int_type* 	i_lit =
     L"\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13"
     L"\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20!\"#$%&"
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/3.cc
index 7ca700764c31..e327ef867312 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/3.cc
@@ -47,7 +47,7 @@ void test03()
   typedef char					ext_type;
   typedef char_traits<char>			ext_traits;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const int_type 	i_lit[] = {
     0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc,
     0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/4.cc
index 234a4b63f467..d4dc56051af5 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/4.cc
@@ -47,7 +47,7 @@ void test04()
   typedef char					ext_type;
   typedef char_traits<char>			ext_traits;
 
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const int_type 	i_lit[] = {
     0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc,
     0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
diff --git a/libstdc++-v3/testsuite/22_locale/collate/1.cc b/libstdc++-v3/testsuite/22_locale/collate/1.cc
index 5b55b03f24ff..2f6415fcd67d 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/1.cc
@@ -29,7 +29,7 @@ void test01()
   typedef std::messages<char> test_type;
   typedef std::locale::facet base_type;
   const test_type& obj = std::use_facet<test_type>(std::locale()); 
-  const base_type* base = &obj;
+  const base_type* base __attribute__((unused)) = &obj;
 
   // Check for required typedefs
   typedef test_type::char_type char_type;
diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/char/1.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/char/1.cc
index 42469aea5141..62e9510d3682 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/compare/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/compare/char/1.cc
@@ -29,7 +29,7 @@ void test01()
   using namespace std;
   typedef std::collate<char>::string_type string_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -43,9 +43,6 @@ void test01()
 
   // cache the collate facets
   const collate<char>& coll_c = use_facet<collate<char> >(loc_c); 
-  const collate<char>& coll_us = use_facet<collate<char> >(loc_us); 
-  const collate<char>& coll_fr = use_facet<collate<char> >(loc_fr); 
-  const collate<char>& coll_de = use_facet<collate<char> >(loc_de); 
 
   // int compare(const charT*, const charT*, const charT*, const charT*) const
 
diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc
index b6f944949a38..d0bad93196bd 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc
@@ -29,7 +29,7 @@ void test02()
   using namespace std;
   typedef std::collate<char>::string_type string_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -42,22 +42,17 @@ void test02()
   VERIFY( loc_de != loc_fr );
 
   // cache the collate facets
-  const collate<char>& coll_c = use_facet<collate<char> >(loc_c); 
-  const collate<char>& coll_us = use_facet<collate<char> >(loc_us); 
-  const collate<char>& coll_fr = use_facet<collate<char> >(loc_fr); 
   const collate<char>& coll_de = use_facet<collate<char> >(loc_de); 
 
   // int compare(const charT*, const charT*, const charT*, const charT*) const
 
   const char* strlit1 = "monkey picked tikuanyin oolong";
-  const char* strlit2 = "imperial tea court green oolong";
   const char* strlit3 = "Äuglein Augment"; // "C" == "Augment Äuglein"
   const char* strlit4 = "Base baß Baß Bast"; // "C" == "Base baß Baß Bast"
 
   int i1;
   int i2;
   int size1 = char_traits<char>::length(strlit1) - 1;
-  int size2 = char_traits<char>::length(strlit2) - 1;
   int size3 = char_traits<char>::length(strlit3) - 1;
   int size4 = char_traits<char>::length(strlit4) - 1;
 
diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/char/3.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/char/3.cc
index 6712832294c8..7de98aa7925d 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/compare/char/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/compare/char/3.cc
@@ -29,7 +29,7 @@ void test03()
   using namespace std;
   typedef std::collate<char>::string_type string_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/1.cc
index c1825e2bbf25..995c5b4f699d 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/1.cc
@@ -29,7 +29,7 @@ void test01()
   using namespace std;
   typedef std::collate<wchar_t>::string_type string_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -43,9 +43,6 @@ void test01()
 
   // cache the collate facets
   const collate<wchar_t>& coll_c = use_facet<collate<wchar_t> >(loc_c); 
-  const collate<wchar_t>& coll_us = use_facet<collate<wchar_t> >(loc_us); 
-  const collate<wchar_t>& coll_fr = use_facet<collate<wchar_t> >(loc_fr); 
-  const collate<wchar_t>& coll_de = use_facet<collate<wchar_t> >(loc_de); 
 
   // int compare(const charT*, const charT*, const charT*, const charT*) const
 
diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/2.cc
index 8d813abde3d3..fd4aee7a0161 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/2.cc
@@ -33,7 +33,7 @@ void test02()
   using namespace std;
   typedef std::collate<wchar_t>::string_type string_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -46,22 +46,17 @@ void test02()
   VERIFY( loc_de != loc_fr );
 
   // cache the collate facets
-  const collate<wchar_t>& coll_c = use_facet<collate<wchar_t> >(loc_c); 
-  const collate<wchar_t>& coll_us = use_facet<collate<wchar_t> >(loc_us); 
-  const collate<wchar_t>& coll_fr = use_facet<collate<wchar_t> >(loc_fr); 
   const collate<wchar_t>& coll_de = use_facet<collate<wchar_t> >(loc_de); 
 
   // int compare(const charT*, const charT*, const charT*, const charT*) const
 
   const wchar_t* strlit1 = L"monkey picked tikuanyin oolong";
-  const wchar_t* strlit2 = L"imperial tea court green oolong";
   const wchar_t* strlit3 = L"Äuglein Augment"; // "C" == "Augment Äuglein"
   const wchar_t* strlit4 = L"Base baß Baß Bast"; // "C" == "Base baß Baß Bast"
 
   int i1;
   int i2;
   int size1 = char_traits<wchar_t>::length(strlit1) - 1;
-  int size2 = char_traits<wchar_t>::length(strlit2) - 1;
   int size3 = char_traits<wchar_t>::length(strlit3) - 1;
   int size4 = char_traits<wchar_t>::length(strlit4) - 1;
 
diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/3.cc
index c4b87bad0683..209f7f835e31 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/3.cc
@@ -29,7 +29,7 @@ void test03()
   using namespace std;
   typedef std::collate<wchar_t>::string_type string_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
diff --git a/libstdc++-v3/testsuite/22_locale/collate/hash/char/1.cc b/libstdc++-v3/testsuite/22_locale/collate/hash/char/1.cc
index 9be618a8f4a9..e8d9d8ef0a1d 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/hash/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/hash/char/1.cc
@@ -26,7 +26,7 @@
 // Check "C" locale.
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::string str1("fffff");
   std::string str2("ffffffffffff");
diff --git a/libstdc++-v3/testsuite/22_locale/collate/hash/char/2.cc b/libstdc++-v3/testsuite/22_locale/collate/hash/char/2.cc
index 6ef1bedbb08d..236d21e128da 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/hash/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/hash/char/2.cc
@@ -29,7 +29,7 @@ void test02()
   using namespace std;
   typedef std::collate<char>::string_type string_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -42,19 +42,12 @@ void test02()
   VERIFY( loc_de != loc_fr );
 
   // cache the collate facets
-  const collate<char>& coll_c = use_facet<collate<char> >(loc_c); 
-  const collate<char>& coll_us = use_facet<collate<char> >(loc_us); 
-  const collate<char>& coll_fr = use_facet<collate<char> >(loc_fr); 
   const collate<char>& coll_de = use_facet<collate<char> >(loc_de); 
 
   // long hash(const charT*, const charT*) cosnt
-  const char* strlit1 = "monkey picked tikuanyin oolong";
-  const char* strlit2 = "imperial tea court green oolong";
   const char* strlit3 = "Äuglein Augment"; // "C" == "Augment Äuglein"
   const char* strlit4 = "Base baß Baß Bast"; // "C" == "Base baß Baß Bast"
 
-  int i1;
-  int i2;
   long l1;
   long l2;
   int size3 = char_traits<char>::length(strlit4) - 1;
diff --git a/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/1.cc
index 73f8da142ca9..fad5848e46de 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/1.cc
@@ -28,7 +28,7 @@ void test01()
 {
   using namespace std;
   typedef std::collate<wchar_t>::string_type string_type;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   string_type str1(L"fffff");
   string_type str2(L"ffffffffffff");
diff --git a/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/2.cc
index 2347e0469b27..280180322278 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/2.cc
@@ -32,7 +32,7 @@ void test02()
 {
   using namespace std;
   typedef std::collate<wchar_t>::string_type string_type;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -45,19 +45,12 @@ void test02()
   VERIFY( loc_de != loc_fr );
 
   // cache the collate facets
-  const collate<wchar_t>& coll_c = use_facet<collate<wchar_t> >(loc_c); 
-  const collate<wchar_t>& coll_us = use_facet<collate<wchar_t> >(loc_us); 
-  const collate<wchar_t>& coll_fr = use_facet<collate<wchar_t> >(loc_fr); 
   const collate<wchar_t>& coll_de = use_facet<collate<wchar_t> >(loc_de); 
 
   // long hash(const charT*, const charT*) cosnt
-  const wchar_t* strlit1 = L"monkey picked tikuanyin oolong";
-  const wchar_t* strlit2 = L"imperial tea court green oolong";
   const wchar_t* strlit3 = L"Äuglein Augment"; // "C" == "Augment Äuglein"
   const wchar_t* strlit4 = L"Base baß Baß Bast"; // "C" == "Base baß Baß Bast"
 
-  int i1;
-  int i2;
   long l1;
   long l2;
   int size3 = char_traits<wchar_t>::length(strlit4) - 1;
diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/char/2.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/char/2.cc
index 679a4b0c8fd3..9dfc00ffaf47 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/transform/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/transform/char/2.cc
@@ -28,7 +28,7 @@ void test02()
   using namespace std;
   typedef std::collate<char>::string_type string_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -41,14 +41,9 @@ void test02()
   VERIFY( loc_de != loc_fr );
 
   // cache the collate facets
-  const collate<char>& coll_c = use_facet<collate<char> >(loc_c); 
-  const collate<char>& coll_us = use_facet<collate<char> >(loc_us); 
-  const collate<char>& coll_fr = use_facet<collate<char> >(loc_fr); 
   const collate<char>& coll_de = use_facet<collate<char> >(loc_de); 
 
   // long hash(const charT*, const charT*) cosnt
-  const char* strlit1 = "monkey picked tikuanyin oolong";
-  const char* strlit2 = "imperial tea court green oolong";
   const char* strlit3 = "Äuglein Augment"; // "C" == "Augment Äuglein"
   const char* strlit4 = "Base baß Baß Bast"; // "C" == "Base baß Baß Bast"
 
diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/char/3.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/char/3.cc
index c82d97cfa85b..dab1f081b0da 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/transform/char/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/transform/char/3.cc
@@ -28,7 +28,7 @@ void test03()
   using namespace std;
   typedef std::collate<char>::string_type string_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/2.cc
index 4943ba0b7d54..d21d39964920 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/2.cc
@@ -32,7 +32,7 @@ void test02()
   using namespace std;
   typedef std::collate<wchar_t>::string_type string_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -45,14 +45,9 @@ void test02()
   VERIFY( loc_de != loc_fr );
 
   // cache the collate facets
-  const collate<wchar_t>& coll_c = use_facet<collate<wchar_t> >(loc_c); 
-  const collate<wchar_t>& coll_us = use_facet<collate<wchar_t> >(loc_us); 
-  const collate<wchar_t>& coll_fr = use_facet<collate<wchar_t> >(loc_fr); 
   const collate<wchar_t>& coll_de = use_facet<collate<wchar_t> >(loc_de); 
 
   // long hash(const charT*, const charT*) cosnt
-  const wchar_t* strlit1 = L"monkey picked tikuanyin oolong";
-  const wchar_t* strlit2 = L"imperial tea court green oolong";
   const wchar_t* strlit3 = L"Äuglein Augment"; // "C" == "Augment Äuglein"
   const wchar_t* strlit4 = L"Base baß Baß Bast"; // "C" == "Base baß Baß Bast"
 
diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/3.cc
index 583d747145a6..fdd88f708855 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/3.cc
@@ -28,7 +28,7 @@ void test03()
   using namespace std;
   typedef std::collate<wchar_t>::string_type string_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
diff --git a/libstdc++-v3/testsuite/22_locale/collate_byname/1.cc b/libstdc++-v3/testsuite/22_locale/collate_byname/1.cc
index f650be796a05..be4524f9ca65 100644
--- a/libstdc++-v3/testsuite/22_locale/collate_byname/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate_byname/1.cc
@@ -28,7 +28,7 @@ void test01()
   using namespace std;
   typedef std::collate<char>::string_type string_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   string str;
   locale loc_c = locale::classic();
 
@@ -41,7 +41,6 @@ void test01()
   VERIFY( loc_de != loc_byname );
 
   // cache the collate facets
-  const collate<char>& coll_byname = use_facet<collate<char> >(loc_byname); 
   const collate<char>& coll_de = use_facet<collate<char> >(loc_de); 
 
   // Check German "de_DE" locale.
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/1.cc b/libstdc++-v3/testsuite/22_locale/ctype/1.cc
index 541f2b9c2373..adda6fd548d9 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/1.cc
@@ -141,14 +141,15 @@ test01()
 
   ctype_base::mask m01;
   ctype_base::mask m02;
-  
+  ctype_base::mask res;
+
   m01 = ctype_base::space;
   m02 = ctype_base::xdigit;
 
-  m01 & m02;
-  m01 | m02;
-  m01 ^ m02;
-  ~m01;
+  res = m01 & m02;
+  res = m01 | m02;
+  res = m01 ^ m02;
+  res = ~m01;
   m01 &= m02;
   m01 |= m02;
   m01 ^= m02;
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/cons/char/1.cc b/libstdc++-v3/testsuite/22_locale/ctype/cons/char/1.cc
index 4846aec220ed..d21ee946d7a3 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/cons/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/cons/char/1.cc
@@ -51,7 +51,7 @@ public:
 void test01()
 {
   using namespace std;
-  bool test = true; 
+  bool test __attribute__((unused)) = true; 
 
   comma_ctype obj;
   const ctype_base::mask* tmp = obj.get_classic_table();
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/char/1.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/char/1.cc
index 8e80fd2fb963..523044f6d322 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/is/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/is/char/1.cc
@@ -35,10 +35,9 @@ class gnu_ctype: public std::ctype<char_type> { };
 
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char_type strlit00[] = "manilla, cebu, tandag PHILIPPINES";
   const char_type strlit01[] = "MANILLA, CEBU, TANDAG PHILIPPINES";
-  const char_type strlit02[] = "manilla, cebu, tandag philippines";
   const char_type c00 = 'S';
   const char_type c10 = 's';
   const char_type c20 = '9';
@@ -46,13 +45,9 @@ void test01()
   const char_type c40 = '!';
   const char_type c50 = 'F';
   const char_type c60 = 'f';
-  const char_type c70 = 'X';
   const char_type c80 = 'x';
 
   gnu_ctype gctype;
-  char_type c100;
-  int len = std::char_traits<char_type>::length(strlit00);
-  char_type c_array[len + 1];
 
   // sanity check ctype_base::mask members
   int i01 = std::ctype_base::space;
@@ -66,7 +61,6 @@ void test01()
   int i09 = std::ctype_base::graph;
   int i10 = std::ctype_base::print;
   int i11 = std::ctype_base::cntrl;
-  int i12 = sizeof(std::ctype_base::mask);
   VERIFY ( i01 != i02);
   VERIFY ( i02 != i03);
   VERIFY ( i03 != i04);
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc
index 89be53dd3f01..0211607de8f4 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc
@@ -41,7 +41,7 @@ void test02()
   typedef ctype_base::mask 	mask;
   typedef vector<mask> 		vector_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   //  const int max = numeric_limits<char>::max();
   const int max = 255;
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/char/3.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/char/3.cc
index 0b56b5ca3b09..9ddeadb1f033 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/is/char/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/is/char/3.cc
@@ -35,7 +35,7 @@ typedef char char_type;
 // Per Liboriussen <liborius@stofanet.dk>
 void test03()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::ctype_base::mask maskdata[256];
   for (int i = 0; i < 256; ++i)
     maskdata[i] = std::ctype_base::alpha;
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/1.cc
index ff115d2cdbe3..29fdfe97c7eb 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/1.cc
@@ -35,10 +35,9 @@ class gnu_ctype: public std::ctype<char_type> { };
 
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char_type strlit00[] = L"manilla, cebu, tandag PHILIPPINES";
   const char_type strlit01[] = L"MANILLA, CEBU, TANDAG PHILIPPINES";
-  const char_type strlit02[] = L"manilla, cebu, tandag philippines";
   const char_type c00 = L'S';
   const char_type c10 = L's';
   const char_type c20 = L'9';
@@ -46,13 +45,9 @@ void test01()
   const char_type c40 = L'!';
   const char_type c50 = L'F';
   const char_type c60 = L'f';
-  const char_type c70 = L'X';
   const char_type c80 = L'x';
 
   gnu_ctype gctype;
-  char_type c100;
-  int len = std::char_traits<char_type>::length(strlit00);
-  char_type c_array[len + 1];
 
   // sanity check ctype_base::mask members
   int i01 = std::ctype_base::space;
@@ -66,7 +61,6 @@ void test01()
   int i09 = std::ctype_base::graph;
   int i10 = std::ctype_base::print;
   int i11 = std::ctype_base::cntrl;
-  int i12 = sizeof(std::ctype_base::mask);
   VERIFY ( i01 != i02);
   VERIFY ( i02 != i03);
   VERIFY ( i03 != i04);
@@ -100,7 +94,6 @@ void test01()
   std::ctype_base::mask m02[13];
   const char_type* cc0 = strlit00;
   const char_type* cc1 = NULL;
-  const char_type* cc2 = NULL;
 
   cc0 = strlit00;
   m01[0] = m00;
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/2.cc
index c9eb1e0b2a48..df028783f85b 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/2.cc
@@ -41,7 +41,7 @@ void test02()
   typedef ctype_base::mask 	mask;
   typedef vector<mask> 		vector_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   //  const int max = numeric_limits<char>::max();
   const int max = 255;
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/1.cc b/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/1.cc
index bbe0c2eadf07..6643803a1a1a 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/1.cc
@@ -39,7 +39,7 @@ void test01()
   using namespace std;
   typedef char 	wide_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char dfault = '?';
   const locale loc_c = locale::classic();
   const ctype<wide_type>& ctype_c = use_facet<ctype<wide_type> >(loc_c); 
@@ -49,7 +49,7 @@ void test01()
   vector<char> 			narrow_chars(wide.length() + 1);
   
   // narrow(charT c, char dfault) const
-  for (int i = 0; i < wide.length(); ++i)
+  for (size_t i = 0; i < wide.length(); ++i)
     {
       char c = ctype_c.narrow(wide[i], dfault);
       VERIFY( c == narrow[i] );
@@ -58,7 +58,7 @@ void test01()
   // narrow(const charT* low, const charT* high, char dfault, char* dest) const
   ctype_c.narrow(&wide[0], &wide[0] + wide.length(), dfault, &narrow_chars[0]);
   VERIFY( narrow_chars[0] != dfault );
-  for (int i = 0; i < wide.length(); ++i)
+  for (size_t i = 0; i < wide.length(); ++i)
     VERIFY( narrow_chars[i] == narrow[i] );
 }
 
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/2.cc b/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/2.cc
index aa3ff4c70bc9..1f0e1619afc1 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/narrow/char/2.cc
@@ -38,7 +38,7 @@ void test02()
   using namespace std;
   typedef char 	wide_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char dfault = '?';
   const locale loc_c = locale::classic();
   const ctype<wide_type>& ctype_c = use_facet<ctype<wide_type> >(loc_c); 
@@ -53,7 +53,7 @@ void test02()
   vector<char> 			narrow_chars(wide.length() + 1);
 
   // narrow(charT c, char dfault) const
-  for (int i = 0; i < wide.length(); ++i)
+  for (size_t i = 0; i < wide.length(); ++i)
     {
       char c = ctype_c.narrow(wide[i], dfault);
       VERIFY( c == narrow[i] );
@@ -62,7 +62,7 @@ void test02()
   // narrow(const charT* low, const charT* high, char dfault, char* dest) const
   ctype_c.narrow(&wide[0], &wide[0] + wide.length(), dfault, &narrow_chars[0]);
   VERIFY( narrow_chars[0] != dfault );
-  for (int i = 0; i < wide.length(); ++i)
+  for (size_t i = 0; i < wide.length(); ++i)
     VERIFY( narrow_chars[i] == narrow[i] );
 }
 
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/1.cc
index 459dcf7db576..a9d30f44cc2a 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/1.cc
@@ -39,7 +39,7 @@ void test01()
   using namespace std;
   typedef wchar_t 	wide_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char dfault = '?';
   const locale loc_c = locale::classic();
   const ctype<wide_type>& ctype_c = use_facet<ctype<wide_type> >(loc_c); 
@@ -49,7 +49,7 @@ void test01()
   vector<char> 			narrow_chars(wide.length() + 1);
   
   // narrow(charT c, char dfault) const
-  for (int i = 0; i < wide.length(); ++i)
+  for (size_t i = 0; i < wide.length(); ++i)
     {
       char c = ctype_c.narrow(wide[i], dfault);
       VERIFY( c == narrow[i] );
@@ -58,7 +58,7 @@ void test01()
   // narrow(const charT* low, const charT* high, char dfault, char* dest) const
   ctype_c.narrow(&wide[0], &wide[0] + wide.length(), dfault, &narrow_chars[0]);
   VERIFY( narrow_chars[0] != dfault );
-  for (int i = 0; i < wide.length(); ++i)
+  for (size_t i = 0; i < wide.length(); ++i)
     VERIFY( narrow_chars[i] == narrow[i] );
 }
 
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/2.cc
index 8f8fecc6ea92..5422a5685a90 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/2.cc
@@ -38,7 +38,7 @@ void test02()
   using namespace std;
   typedef wchar_t 	wide_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char dfault = '?';
   const locale loc_c = locale::classic();
   const ctype<wide_type>& ctype_c = use_facet<ctype<wide_type> >(loc_c); 
@@ -53,7 +53,7 @@ void test02()
   vector<char> 			narrow_chars(wide.length() + 1);
 
   // narrow(charT c, char dfault) const
-  for (int i = 0; i < wide.length(); ++i)
+  for (size_t i = 0; i < wide.length(); ++i)
     {
       char c = ctype_c.narrow(wide[i], dfault);
       VERIFY( c == narrow[i] );
@@ -62,7 +62,7 @@ void test02()
   // narrow(const charT* low, const charT* high, char dfault, char* dest) const
   ctype_c.narrow(&wide[0], &wide[0] + wide.length(), dfault, &narrow_chars[0]);
   VERIFY( narrow_chars[0] != dfault );
-  for (int i = 0; i < wide.length(); ++i)
+  for (size_t i = 0; i < wide.length(); ++i)
     VERIFY( narrow_chars[i] == narrow[i] );
 }
 
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/3.cc
index ac3b436f5900..1e00a840a2bd 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/3.cc
@@ -36,7 +36,7 @@
 void test03()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   locale loc = __gnu_test::try_named_locale("se_NO.UTF-8");
   const ctype<wchar_t>& wct = use_facet<ctype<wchar_t> >(loc);
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/scan/char/1.cc b/libstdc++-v3/testsuite/22_locale/ctype/scan/char/1.cc
index 6e8d1d31e26b..86ca5cc2f01c 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/scan/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/scan/char/1.cc
@@ -50,7 +50,7 @@ class gnu_ctype: public std::ctype<char_type> { };
 // Sanity check scan_is() and scan_not().
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   const char_type *const ca = "aaaaa";
   const char_type *const cz = "zzzzz";
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/scan/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/ctype/scan/wchar_t/1.cc
index afe99f378b71..dead79ea2f67 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/scan/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/scan/wchar_t/1.cc
@@ -51,7 +51,7 @@ class gnu_ctype: public std::ctype<char_type> { };
 // Sanity check scan_is() and scan_not().
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   const char_type *const ca = L"aaaaa";
   const char_type *const cz = L"zzzzz";
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/to/char/1.cc b/libstdc++-v3/testsuite/22_locale/ctype/to/char/1.cc
index a337d8e5ed43..504eb89d5407 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/to/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/to/char/1.cc
@@ -35,19 +35,12 @@ class gnu_ctype: public std::ctype<char_type> { };
 
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char_type strlit00[] = "manilla, cebu, tandag PHILIPPINES";
   const char_type strlit01[] = "MANILLA, CEBU, TANDAG PHILIPPINES";
   const char_type strlit02[] = "manilla, cebu, tandag philippines";
   const char_type c00 = 'S';
   const char_type c10 = 's';
-  const char_type c20 = '9';
-  const char_type c30 = ' ';
-  const char_type c40 = '!';
-  const char_type c50 = 'F';
-  const char_type c60 = 'f';
-  const char_type c70 = 'X';
-  const char_type c80 = 'x';
 
   gnu_ctype gctype;
   char_type c100;
@@ -66,7 +59,6 @@ void test01()
   int i09 = std::ctype_base::graph;
   int i10 = std::ctype_base::print;
   int i11 = std::ctype_base::cntrl;
-  int i12 = sizeof(std::ctype_base::mask);
   VERIFY ( i01 != i02);
   VERIFY ( i02 != i03);
   VERIFY ( i03 != i04);
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/1.cc
index 9f042abc4382..9d446c791ca7 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/to/wchar_t/1.cc
@@ -35,19 +35,12 @@ class gnu_ctype: public std::ctype<char_type> { };
 
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char_type strlit00[] = L"manilla, cebu, tandag PHILIPPINES";
   const char_type strlit01[] = L"MANILLA, CEBU, TANDAG PHILIPPINES";
   const char_type strlit02[] = L"manilla, cebu, tandag philippines";
   const char_type c00 = L'S';
   const char_type c10 = L's';
-  const char_type c20 = L'9';
-  const char_type c30 = L' ';
-  const char_type c40 = L'!';
-  const char_type c50 = L'F';
-  const char_type c60 = L'f';
-  const char_type c70 = L'X';
-  const char_type c80 = L'x';
 
   gnu_ctype gctype;
   char_type c100;
@@ -66,7 +59,6 @@ void test01()
   int i09 = std::ctype_base::graph;
   int i10 = std::ctype_base::print;
   int i11 = std::ctype_base::cntrl;
-  int i12 = sizeof(std::ctype_base::mask);
   VERIFY ( i01 != i02);
   VERIFY ( i02 != i03);
   VERIFY ( i03 != i04);
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/widen/char/1.cc b/libstdc++-v3/testsuite/22_locale/ctype/widen/char/1.cc
index f7a2c15ad862..e4ac43ab6cfa 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/widen/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/widen/char/1.cc
@@ -38,8 +38,7 @@ void test01()
   using namespace std;
   typedef char wide_type;
 
-  bool test = true;
-  const char dfault = '?';
+  bool test __attribute__((unused)) = true;
   const locale loc_c = locale::classic();
   const ctype<wide_type>& ctype_c = use_facet<ctype<wide_type> >(loc_c); 
 
@@ -48,7 +47,7 @@ void test01()
   vector<wide_type> 		wide_chars(narrow.length() + 1);
   
   // widen(char c) const
-  for (int i = 0; i < narrow.length(); ++i)
+  for (size_t i = 0; i < narrow.length(); ++i)
     {
       char c = ctype_c.widen(narrow[i]);
       VERIFY( c == wide[i] );
@@ -56,7 +55,7 @@ void test01()
 
   // widen(const char* low, const char* high, charT* dest) const
   ctype_c.widen(&narrow[0], &narrow[0] + narrow.length(), &wide_chars[0]);  
-  for (int i = 0; i < narrow.length(); ++i)
+  for (size_t i = 0; i < narrow.length(); ++i)
     VERIFY( wide_chars[i] == wide[i] );
 }
 
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/1.cc
index 042a0b5f705e..7e2377475e0d 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/1.cc
@@ -38,8 +38,7 @@ void test01()
   using namespace std;
   typedef wchar_t wide_type;
 
-  bool test = true;
-  const char dfault = '?';
+  bool test __attribute__((unused)) = true;
   const locale loc_c = locale::classic();
   const ctype<wide_type>& ctype_c = use_facet<ctype<wide_type> >(loc_c); 
 
@@ -48,7 +47,7 @@ void test01()
   vector<wide_type> 		wide_chars(narrow.length() + 1);
   
   // widen(char c) const
-  for (int i = 0; i < narrow.length(); ++i)
+  for (size_t i = 0; i < narrow.length(); ++i)
     {
       char c = ctype_c.widen(narrow[i]);
       VERIFY( c == wide[i] );
@@ -56,7 +55,7 @@ void test01()
 
   // widen(const char* low, const char* high, charT* dest) const
   ctype_c.widen(&narrow[0], &narrow[0] + narrow.length(), &wide_chars[0]);  
-  for (int i = 0; i < narrow.length(); ++i)
+  for (size_t i = 0; i < narrow.length(); ++i)
     VERIFY( wide_chars[i] == wide[i] );
 }
 
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/2.cc
index 6f9dec45d3c1..0cb05dd930a8 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/2.cc
@@ -36,7 +36,7 @@
 void test02()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   locale loc = __gnu_test::try_named_locale("en_US.ISO-8859-1");
   const ctype<wchar_t>& wct = use_facet<ctype<wchar_t> >(loc);
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/3.cc
index d9b32b0a6cb6..8d6f1f3c7ae7 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/3.cc
@@ -36,7 +36,7 @@
 void test03()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   locale loc = __gnu_test::try_named_locale("se_NO.UTF-8");
   const ctype<wchar_t>& wct = use_facet<ctype<wchar_t> >(loc);
diff --git a/libstdc++-v3/testsuite/22_locale/facet/1.cc b/libstdc++-v3/testsuite/22_locale/facet/1.cc
index f93265bd7d1a..83609561cc38 100644
--- a/libstdc++-v3/testsuite/22_locale/facet/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/facet/1.cc
@@ -172,7 +172,7 @@ std::locale::id gnu_facet::id;
 
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const std::string name_no("*");
   const std::string name_c("C");
 
diff --git a/libstdc++-v3/testsuite/22_locale/facet/2.cc b/libstdc++-v3/testsuite/22_locale/facet/2.cc
index 844eb7b3d245..f3059ee05b7f 100644
--- a/libstdc++-v3/testsuite/22_locale/facet/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/facet/2.cc
@@ -46,7 +46,7 @@ typedef surf facet_type;
 void test02()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // 1: Destroyed when out of scope.
   VERIFY( counter == 0 );
diff --git a/libstdc++-v3/testsuite/22_locale/global_templates/1.cc b/libstdc++-v3/testsuite/22_locale/global_templates/1.cc
index 49886aa18bf0..c82c4d3c77ff 100644
--- a/libstdc++-v3/testsuite/22_locale/global_templates/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/global_templates/1.cc
@@ -32,7 +32,7 @@ void test01()
 {
   using namespace std;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // construct a locale object with the C facet
   const locale& 	cloc = locale::classic();
@@ -45,17 +45,17 @@ void test01()
   VERIFY( has_facet<gnu_codecvt>(loc) );
 
   try 
-    { const ccodecvt& cvt01 = use_facet<ccodecvt>(cloc); }
+    { const ccodecvt& cvt01 __attribute__((unused)) = use_facet<ccodecvt>(cloc); }
   catch(...)
     { VERIFY( false ); }
 
   try
-    { const gnu_codecvt& cvt02 = use_facet<gnu_codecvt>(loc); } 
+    { const gnu_codecvt& cvt02 __attribute__((unused)) = use_facet<gnu_codecvt>(loc); } 
   catch(...)
     { VERIFY( false ); }
 
   try 
-    { const ccodecvt& cvt03 = use_facet<gnu_codecvt>(cloc); }
+    { const ccodecvt& cvt03 __attribute__((unused)) = use_facet<gnu_codecvt>(cloc); }
   catch(bad_cast& obj)
     { VERIFY( true ); }
   catch(...)
diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/2.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/2.cc
index e49756f18fd3..af51d3313d60 100644
--- a/libstdc++-v3/testsuite/22_locale/locale/cons/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/locale/cons/2.cc
@@ -110,7 +110,7 @@ void test01()
   typedef __enc_traits				enc_type;
   typedef codecvt<int_type, ext_type, enc_type>	unicode_codecvt;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   string str1, str2;
 
   // construct a locale object with the C facet
diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/4.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/4.cc
index e450441816eb..9343535a8ad5 100644
--- a/libstdc++-v3/testsuite/22_locale/locale/cons/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/locale/cons/4.cc
@@ -28,7 +28,7 @@
 // libstdc++/7811
 void test03()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 #ifdef _GLIBCXX_HAVE_SETENV 
   const char* LC_ALL_orig = getenv("LC_ALL");
   if (!setenv("LC_ALL", "it_IT", 1))
diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/5.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/5.cc
index 5492a0ce723e..697b4a49c677 100644
--- a/libstdc++-v3/testsuite/22_locale/locale/cons/5.cc
+++ b/libstdc++-v3/testsuite/22_locale/locale/cons/5.cc
@@ -28,7 +28,7 @@
 // More tests for locale("") == POSIX locale::name. 
 void test04()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   using namespace std;
 
 #ifdef _GLIBCXX_HAVE_SETENV
diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/6.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/6.cc
index 6b11ac1e9a10..07682e5b60a4 100644
--- a/libstdc++-v3/testsuite/22_locale/locale/cons/6.cc
+++ b/libstdc++-v3/testsuite/22_locale/locale/cons/6.cc
@@ -29,7 +29,7 @@ void
 test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const string name_c("C");
   const string str_unnamed("*");
   string str;
@@ -46,10 +46,6 @@ test01()
   VERIFY( has_facet<numpunct<char> >(loc_1) );
   VERIFY( has_facet<numpunct<char> >(loc_c) );
   
-  // extract facet
-  const numpunct<char>&	f_nump_1 = use_facet<numpunct<char> >(loc_1); 
-  const numpunct<char>&	f_nump_c = use_facet<numpunct<char> >(loc_c); 
-
   // attempt to re-synthesize classic locale
   locale		loc_2 = loc_1.combine<numpunct<char> >(loc_c);
   VERIFY( loc_2.name() == str_unnamed );
diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/7.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/7.cc
index ffcd3ab943a5..8b4aafe14f44 100644
--- a/libstdc++-v3/testsuite/22_locale/locale/cons/7.cc
+++ b/libstdc++-v3/testsuite/22_locale/locale/cons/7.cc
@@ -28,7 +28,7 @@ void
 test02()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const string name_c("C");
   const string name_no("*");
   string str;
diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/7222-c.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/7222-c.cc
index 003462441ee4..ce7b2695ee8e 100644
--- a/libstdc++-v3/testsuite/22_locale/locale/cons/7222-c.cc
+++ b/libstdc++-v3/testsuite/22_locale/locale/cons/7222-c.cc
@@ -28,7 +28,7 @@
 // libstdc++/7222
 void test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::locale loc_c1("C");
   std::locale loc_c2("C");
diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/7222-env.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/7222-env.cc
index 8bd9c4ace2a9..4524a070b7a4 100644
--- a/libstdc++-v3/testsuite/22_locale/locale/cons/7222-env.cc
+++ b/libstdc++-v3/testsuite/22_locale/locale/cons/7222-env.cc
@@ -28,7 +28,7 @@
 // libstdc++/7222
 void test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::locale loc_1 = __gnu_test::try_named_locale("");
   std::locale loc_2 = __gnu_test::try_named_locale("");
diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/8.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/8.cc
index 433fc1fe9ba1..5d4fd272f999 100644
--- a/libstdc++-v3/testsuite/22_locale/locale/cons/8.cc
+++ b/libstdc++-v3/testsuite/22_locale/locale/cons/8.cc
@@ -28,7 +28,7 @@ void
 test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   const locale l1("C");
   const locale l2 =
diff --git a/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/1.cc b/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/1.cc
index 3d2c931ec6d8..e5524dd04c9c 100644
--- a/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/1.cc
@@ -30,7 +30,7 @@ class gnu_codecvt: public ccodecvt { };
 void test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   string str1, str2;
 
diff --git a/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/2.cc b/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/2.cc
index 81b06ee0ecdd..653eaaf99d6d 100644
--- a/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/2.cc
@@ -28,7 +28,7 @@
 void test02()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   
   const string ph("en_PH");
   const string mx("es_MX");
diff --git a/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/3.cc b/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/3.cc
index 87d8193051ea..5e3ecedee425 100644
--- a/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/3.cc
@@ -43,7 +43,7 @@ typedef surf facet_type;
 void test03()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   string name;
   locale global_orig;
diff --git a/libstdc++-v3/testsuite/22_locale/locale/operations/1.cc b/libstdc++-v3/testsuite/22_locale/locale/operations/1.cc
index 8fe6aa7ea3d1..003da9a35d49 100644
--- a/libstdc++-v3/testsuite/22_locale/locale/operations/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/locale/operations/1.cc
@@ -31,7 +31,7 @@ void test01()
 {
   using namespace std;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   string str1, str2;
 
   // construct a locale object with the C facet
diff --git a/libstdc++-v3/testsuite/22_locale/locale/operations/2.cc b/libstdc++-v3/testsuite/22_locale/locale/operations/2.cc
index ed06e10a6359..aa5db2ac520f 100644
--- a/libstdc++-v3/testsuite/22_locale/locale/operations/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/locale/operations/2.cc
@@ -38,7 +38,7 @@ protected:
 void test02()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   
   // Sanity check.
   locale loc_c = locale::classic();
diff --git a/libstdc++-v3/testsuite/22_locale/messages/1.cc b/libstdc++-v3/testsuite/22_locale/messages/1.cc
index 6eb593239b13..c1281eda3ac5 100644
--- a/libstdc++-v3/testsuite/22_locale/messages/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/messages/1.cc
@@ -30,8 +30,8 @@ void test01()
   typedef std::locale::facet base_type1;
   typedef std::messages_base base_type2;
   const test_type& obj = std::use_facet<test_type>(std::locale()); 
-  const base_type1* base1 = &obj;
-  const base_type2* base2 = &obj;
+  const base_type1* base1 __attribute__((unused)) = &obj;
+  const base_type2* base2 __attribute__((unused)) = &obj;
 
   // Check for required typedefs
   typedef test_type::char_type char_type;
diff --git a/libstdc++-v3/testsuite/22_locale/messages/members/char/1.cc b/libstdc++-v3/testsuite/22_locale/messages/members/char/1.cc
index 5b360b15a21d..9a3a1c93ab18 100644
--- a/libstdc++-v3/testsuite/22_locale/messages/members/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/messages/members/char/1.cc
@@ -29,7 +29,7 @@ void test01()
   typedef std::messages<char>::catalog catalog;
   typedef std::messages<char>::string_type string_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   // This is defined through CXXFLAGS in scripts/testsuite_flags[.in].
   const char* dir = LOCALEDIR;
 
@@ -44,9 +44,6 @@ void test01()
   VERIFY( loc_de != loc_fr );
 
   // cache the messages facets
-  const messages<char>& mssg_c = use_facet<messages<char> >(loc_c); 
-  const messages<char>& mssg_us = use_facet<messages<char> >(loc_us); 
-  const messages<char>& mssg_fr = use_facet<messages<char> >(loc_fr); 
   const messages<char>& mssg_de = use_facet<messages<char> >(loc_de); 
 
   // catalog open(const string&, const locale&) const;
diff --git a/libstdc++-v3/testsuite/22_locale/messages/members/char/2.cc b/libstdc++-v3/testsuite/22_locale/messages/members/char/2.cc
index 389d3721a1bb..c9cae5053f37 100644
--- a/libstdc++-v3/testsuite/22_locale/messages/members/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/messages/members/char/2.cc
@@ -29,7 +29,7 @@ void test02()
   typedef std::messages<char>::catalog catalog;
   typedef std::messages<char>::string_type string_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   // This is defined through CXXFLAGS in scripts/testsuite_flags[.in].
   const char* dir = LOCALEDIR;
 
@@ -44,10 +44,7 @@ void test02()
   VERIFY( loc_de != loc_fr );
 
   // cache the messages facets
-  const messages<char>& mssg_c = use_facet<messages<char> >(loc_c); 
-  const messages<char>& mssg_us = use_facet<messages<char> >(loc_us); 
   const messages<char>& mssg_fr = use_facet<messages<char> >(loc_fr); 
-  const messages<char>& mssg_de = use_facet<messages<char> >(loc_de); 
 
   // catalog open(const string&, const locale&) const;
   // string_type get(catalog, int, int, const string_type& ) const; 
diff --git a/libstdc++-v3/testsuite/22_locale/messages/members/char/3.cc b/libstdc++-v3/testsuite/22_locale/messages/members/char/3.cc
index d4abacc99ed2..8d00eb5a8828 100644
--- a/libstdc++-v3/testsuite/22_locale/messages/members/char/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/messages/members/char/3.cc
@@ -29,7 +29,7 @@ void test03()
   typedef std::messages<char>::catalog catalog;
   typedef std::messages<char>::string_type string_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   // This is defined through CXXFLAGS in scripts/testsuite_flags[.in].
   const char* dir = LOCALEDIR;
 
@@ -44,10 +44,8 @@ void test03()
   VERIFY( loc_de != loc_fr );
 
   // cache the messages facets
-  const messages<char>& mssg_c = use_facet<messages<char> >(loc_c); 
   const messages<char>& mssg_us = use_facet<messages<char> >(loc_us); 
   const messages<char>& mssg_fr = use_facet<messages<char> >(loc_fr); 
-  const messages<char>& mssg_de = use_facet<messages<char> >(loc_de); 
 
   // catalog open(const string&, const locale&) const;
   // string_type get(catalog, int, int, const string_type& ) const; 
diff --git a/libstdc++-v3/testsuite/22_locale/messages_byname/1.cc b/libstdc++-v3/testsuite/22_locale/messages_byname/1.cc
index cc8860bef9de..3072383a9883 100644
--- a/libstdc++-v3/testsuite/22_locale/messages_byname/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/messages_byname/1.cc
@@ -29,7 +29,7 @@ void test01()
   typedef std::messages<char>::catalog catalog;
   typedef std::messages<char>::string_type string_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   string str;
   // This is defined through CXXFLAGS in scripts/testsuite_flags[.in].
   const char* dir = LOCALEDIR;
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/1.cc b/libstdc++-v3/testsuite/22_locale/money_get/1.cc
index 86fcd18b5016..f3b7232f6302 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/1.cc
@@ -29,7 +29,7 @@ void test01()
   typedef std::money_get<char> test_type;
   typedef std::locale::facet base_type;
   const test_type& obj = std::use_facet<test_type>(std::locale()); 
-  const base_type* base = &obj;
+  const base_type* base __attribute__((unused)) = &obj;
   
   // Check for required typedefs
   typedef test_type::char_type char_type;
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/1.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/1.cc
index ed0d19e46ec6..39dca1df9091 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/1.cc
@@ -32,7 +32,7 @@ void test01()
   typedef money_base::pattern pattern;
   typedef istreambuf_iterator<char> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -47,12 +47,6 @@ void test01()
   // cache the moneypunct facets
   typedef moneypunct<char, true> __money_true;
   typedef moneypunct<char, false> __money_false;
-  const __money_true& monpunct_c_t = use_facet<__money_true>(loc_c); 
-  const __money_true& monpunct_de_t = use_facet<__money_true>(loc_de); 
-  const __money_false& monpunct_c_f = use_facet<__money_false>(loc_c); 
-  const __money_false& monpunct_de_f = use_facet<__money_false>(loc_de); 
-  const __money_true& monpunct_hk_t = use_facet<__money_true>(loc_hk); 
-  const __money_false& monpunct_hk_f = use_facet<__money_false>(loc_hk); 
 
   // sanity check the data is correct.
   const string empty;
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/11528.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/11528.cc
index c4f00f7add98..17825d546b22 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/11528.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/11528.cc
@@ -27,7 +27,7 @@ void test01()
   using namespace std;
   typedef istreambuf_iterator<char> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   locale loc_us = __gnu_test::try_named_locale("en_US");
 
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/2.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/2.cc
index ddb2c3f5d6fb..422a53340eb8 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/2.cc
@@ -32,7 +32,7 @@ void test02()
   typedef money_base::pattern pattern;
   typedef istreambuf_iterator<char> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -47,12 +47,6 @@ void test02()
   // cache the moneypunct facets
   typedef moneypunct<char, true> __money_true;
   typedef moneypunct<char, false> __money_false;
-  const __money_true& monpunct_c_t = use_facet<__money_true>(loc_c); 
-  const __money_true& monpunct_de_t = use_facet<__money_true>(loc_de); 
-  const __money_false& monpunct_c_f = use_facet<__money_false>(loc_c); 
-  const __money_false& monpunct_de_f = use_facet<__money_false>(loc_de); 
-  const __money_true& monpunct_hk_t = use_facet<__money_true>(loc_hk); 
-  const __money_false& monpunct_hk_f = use_facet<__money_false>(loc_hk); 
 
   // sanity check the data is correct.
   const string empty;
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/3.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/3.cc
index 91ca66fb64cc..5904ee112d87 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/3.cc
@@ -32,7 +32,7 @@ void test03()
   typedef money_base::pattern pattern;
   typedef istreambuf_iterator<char> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -47,12 +47,6 @@ void test03()
   // cache the moneypunct facets
   typedef moneypunct<char, true> __money_true;
   typedef moneypunct<char, false> __money_false;
-  const __money_true& monpunct_c_t = use_facet<__money_true>(loc_c); 
-  const __money_true& monpunct_de_t = use_facet<__money_true>(loc_de); 
-  const __money_false& monpunct_c_f = use_facet<__money_false>(loc_c); 
-  const __money_false& monpunct_de_f = use_facet<__money_false>(loc_de); 
-  const __money_true& monpunct_hk_t = use_facet<__money_true>(loc_hk); 
-  const __money_false& monpunct_hk_f = use_facet<__money_false>(loc_hk); 
 
   // sanity check the data is correct.
   const string empty;
@@ -60,12 +54,6 @@ void test03()
   // total EPA budget FY 2002
   const long double  digits1 = 720000000000.0;
 
-  // est. cost, national missile "defense", expressed as a loss in USD 2001
-  const long double digits2 = -10000000000000.0;  
-
-  // input less than frac_digits
-  const long double digits4 = -1.0;
-  
   iterator_type end;
   istringstream iss;
   iss.imbue(loc_de);
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/4.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/4.cc
index d3c8359b5280..a80060aebe0a 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/4.cc
@@ -32,7 +32,7 @@ void test04()
   typedef money_base::pattern pattern;
   typedef istreambuf_iterator<char> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -47,22 +47,10 @@ void test04()
   // cache the moneypunct facets
   typedef moneypunct<char, true> __money_true;
   typedef moneypunct<char, false> __money_false;
-  const __money_true& monpunct_c_t = use_facet<__money_true>(loc_c); 
-  const __money_true& monpunct_de_t = use_facet<__money_true>(loc_de); 
-  const __money_false& monpunct_c_f = use_facet<__money_false>(loc_c); 
-  const __money_false& monpunct_de_f = use_facet<__money_false>(loc_de); 
-  const __money_true& monpunct_hk_t = use_facet<__money_true>(loc_hk); 
-  const __money_false& monpunct_hk_f = use_facet<__money_false>(loc_hk); 
 
   // sanity check the data is correct.
   const string empty;
 
-  // total EPA budget FY 2002
-  const long double  digits1 = 720000000000.0;
-
-  // est. cost, national missile "defense", expressed as a loss in USD 2001
-  const long double digits2 = -10000000000000.0;  
-
   // input less than frac_digits
   const long double digits4 = -1.0;
   
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/5.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/5.cc
index f886c887ebdc..e51d4464de50 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/5.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/5.cc
@@ -27,14 +27,13 @@
 void test05()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // Check money_get works with other iterators besides streambuf
   // input iterators.
   typedef string::const_iterator iter_type;
   typedef money_get<char, iter_type> mon_get_type;
   const ios_base::iostate goodbit = ios_base::goodbit;
-  const ios_base::iostate eofbit = ios_base::eofbit;
   ios_base::iostate err = goodbit;
   const locale loc_c = locale::classic();
   const string str = "0.01Eleanor Roosevelt";
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/6.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/6.cc
index f9afb1e1fa4a..8c03e8245ffc 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/6.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/6.cc
@@ -54,7 +54,7 @@ void test06()
   using namespace std;
   typedef istreambuf_iterator<char> InIt;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   locale loc(locale::classic(), new My_money_io);
 
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/7.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/7.cc
index f275d4e59d43..c21a9dfad747 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/7.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/7.cc
@@ -30,7 +30,7 @@
 void test07()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   typedef istreambuf_iterator<char> InIt;
   InIt iend1, iend2, iend3;
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/8.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/8.cc
index 8c811e99a635..01a93381557d 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/8.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/8.cc
@@ -68,7 +68,7 @@ void test08()
   typedef istreambuf_iterator<char> InIt;
 
   bool intl = false;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   ios_base::iostate err;
 
   locale loc_a(locale::classic(), new My_money_io_a);
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/1.cc
index a3965f79a6a1..0a7f90b63663 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/1.cc
@@ -32,7 +32,7 @@ void test01()
   typedef money_base::pattern pattern;
   typedef istreambuf_iterator<wchar_t> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -47,12 +47,6 @@ void test01()
   // cache the moneypunct facets
   typedef moneypunct<wchar_t, true> __money_true;
   typedef moneypunct<wchar_t, false> __money_false;
-  const __money_true& monpunct_c_t = use_facet<__money_true>(loc_c); 
-  const __money_true& monpunct_de_t = use_facet<__money_true>(loc_de); 
-  const __money_false& monpunct_c_f = use_facet<__money_false>(loc_c); 
-  const __money_false& monpunct_de_f = use_facet<__money_false>(loc_de); 
-  const __money_true& monpunct_hk_t = use_facet<__money_true>(loc_hk); 
-  const __money_false& monpunct_hk_f = use_facet<__money_false>(loc_hk); 
 
   // sanity check the data is correct.
   const wstring empty;
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/11528.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/11528.cc
index 5c0036162fc5..8649db411878 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/11528.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/11528.cc
@@ -27,7 +27,7 @@ void test01()
   using namespace std;
   typedef istreambuf_iterator<wchar_t> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   locale loc_us = __gnu_test::try_named_locale("en_US");
 
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/2.cc
index a3959df32185..f59cef7a9294 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/2.cc
@@ -32,7 +32,7 @@ void test02()
   typedef money_base::pattern pattern;
   typedef istreambuf_iterator<wchar_t> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -47,12 +47,6 @@ void test02()
   // cache the moneypunct facets
   typedef moneypunct<wchar_t, true> __money_true;
   typedef moneypunct<wchar_t, false> __money_false;
-  const __money_true& monpunct_c_t = use_facet<__money_true>(loc_c); 
-  const __money_true& monpunct_de_t = use_facet<__money_true>(loc_de); 
-  const __money_false& monpunct_c_f = use_facet<__money_false>(loc_c); 
-  const __money_false& monpunct_de_f = use_facet<__money_false>(loc_de); 
-  const __money_true& monpunct_hk_t = use_facet<__money_true>(loc_hk); 
-  const __money_false& monpunct_hk_f = use_facet<__money_false>(loc_hk); 
 
   // sanity check the data is correct.
   const wstring empty;
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/3.cc
index 2883e7a4d434..d0c8b06b6f33 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/3.cc
@@ -32,7 +32,7 @@ void test03()
   typedef money_base::pattern pattern;
   typedef istreambuf_iterator<wchar_t> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -47,24 +47,12 @@ void test03()
   // cache the moneypunct facets
   typedef moneypunct<wchar_t, true> __money_true;
   typedef moneypunct<wchar_t, false> __money_false;
-  const __money_true& monpunct_c_t = use_facet<__money_true>(loc_c); 
-  const __money_true& monpunct_de_t = use_facet<__money_true>(loc_de); 
-  const __money_false& monpunct_c_f = use_facet<__money_false>(loc_c); 
-  const __money_false& monpunct_de_f = use_facet<__money_false>(loc_de); 
-  const __money_true& monpunct_hk_t = use_facet<__money_true>(loc_hk); 
-  const __money_false& monpunct_hk_f = use_facet<__money_false>(loc_hk); 
 
   // sanity check the data is correct.
   const wstring empty;
 
   // total EPA budget FY 2002
   const long double  digits1 = 720000000000.0;
-
-  // est. cost, national missile "defense", expressed as a loss in USD 2001
-  const long double digits2 = -10000000000000.0;  
-
-  // input less than frac_digits
-  const long double digits4 = -1.0;
   
   iterator_type end;
   wistringstream iss;
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/4.cc
index 94c27aa7cf94..8861ce46cf55 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/4.cc
@@ -32,7 +32,7 @@ void test04()
   typedef money_base::pattern pattern;
   typedef istreambuf_iterator<wchar_t> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -47,22 +47,10 @@ void test04()
   // cache the moneypunct facets
   typedef moneypunct<wchar_t, true> __money_true;
   typedef moneypunct<wchar_t, false> __money_false;
-  const __money_true& monpunct_c_t = use_facet<__money_true>(loc_c); 
-  const __money_true& monpunct_de_t = use_facet<__money_true>(loc_de); 
-  const __money_false& monpunct_c_f = use_facet<__money_false>(loc_c); 
-  const __money_false& monpunct_de_f = use_facet<__money_false>(loc_de); 
-  const __money_true& monpunct_hk_t = use_facet<__money_true>(loc_hk); 
-  const __money_false& monpunct_hk_f = use_facet<__money_false>(loc_hk); 
 
   // sanity check the data is correct.
   const wstring empty;
 
-  // total EPA budget FY 2002
-  const long double  digits1 = 720000000000.0;
-
-  // est. cost, national missile "defense", expressed as a loss in USD 2001
-  const long double digits2 = -10000000000000.0;  
-
   // input less than frac_digits
   const long double digits4 = -1.0;
   
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/5.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/5.cc
index fd0c53ef3136..89b724c0307c 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/5.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/5.cc
@@ -27,14 +27,13 @@
 void test05()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // Check money_get works with other iterators besides streambuf
   // input iterators.
   typedef wstring::const_iterator iter_type;
   typedef money_get<wchar_t, iter_type> mon_get_type;
   const ios_base::iostate goodbit = ios_base::goodbit;
-  const ios_base::iostate eofbit = ios_base::eofbit;
   ios_base::iostate err = goodbit;
   const locale loc_c = locale::classic();
   const wstring str = L"0.01Eleanor Roosevelt";
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/6.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/6.cc
index 0015cd92ca60..5d40fab761fe 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/6.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/6.cc
@@ -54,7 +54,7 @@ void test06()
   using namespace std;
   typedef istreambuf_iterator<wchar_t> InIt;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   locale loc(locale::classic(), new My_money_io);
 
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/7.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/7.cc
index bf8615f1748e..c9cf0662e25e 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/7.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/7.cc
@@ -30,7 +30,7 @@
 void test07()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   typedef istreambuf_iterator<wchar_t> InIt;
   InIt iend1, iend2, iend3;
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/8.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/8.cc
index ab1de4d3e100..aeaa25737805 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/8.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/8.cc
@@ -68,7 +68,7 @@ void test08()
   typedef istreambuf_iterator<wchar_t> InIt;
 
   bool intl = false;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   ios_base::iostate err;
 
   locale loc_a(locale::classic(), new My_money_io_a);
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/1.cc b/libstdc++-v3/testsuite/22_locale/money_put/1.cc
index e4f27c723db6..ed6c58c54087 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/1.cc
@@ -29,7 +29,7 @@ void test01()
   typedef std::money_put<char> test_type;
   typedef std::locale::facet base_type;
   const test_type& obj = std::use_facet<test_type>(std::locale()); 
-  const base_type* base = &obj;
+  const base_type* base __attribute__((unused)) = &obj;
   
   // Check for required typedefs
   typedef test_type::char_type char_type;
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/char/1.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/char/1.cc
index 12192f5bcabd..2692bb4d196d 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/char/1.cc
@@ -32,7 +32,7 @@ void test01()
   typedef money_base::pattern pattern;
   typedef ostreambuf_iterator<char> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -47,12 +47,6 @@ void test01()
   // cache the moneypunct facets
   typedef moneypunct<char, true> __money_true;
   typedef moneypunct<char, false> __money_false;
-  const __money_true& monpunct_c_t = use_facet<__money_true>(loc_c); 
-  const __money_true& monpunct_de_t = use_facet<__money_true>(loc_de); 
-  const __money_false& monpunct_c_f = use_facet<__money_false>(loc_c); 
-  const __money_false& monpunct_de_f = use_facet<__money_false>(loc_de); 
-  const __money_true& monpunct_hk_t = use_facet<__money_true>(loc_hk); 
-  const __money_false& monpunct_hk_f = use_facet<__money_false>(loc_hk); 
 
   // sanity check the data is correct.
   const string empty;
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/char/2.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/char/2.cc
index 044ea1174bce..35882b64d5d1 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/char/2.cc
@@ -32,7 +32,7 @@ void test02()
   typedef money_base::pattern pattern;
   typedef ostreambuf_iterator<char> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -47,12 +47,6 @@ void test02()
   // cache the moneypunct facets
   typedef moneypunct<char, true> __money_true;
   typedef moneypunct<char, false> __money_false;
-  const __money_true& monpunct_c_t = use_facet<__money_true>(loc_c); 
-  const __money_true& monpunct_de_t = use_facet<__money_true>(loc_de); 
-  const __money_false& monpunct_c_f = use_facet<__money_false>(loc_c); 
-  const __money_false& monpunct_de_f = use_facet<__money_false>(loc_de); 
-  const __money_true& monpunct_hk_t = use_facet<__money_true>(loc_hk); 
-  const __money_false& monpunct_hk_f = use_facet<__money_false>(loc_hk); 
 
   // sanity check the data is correct.
   const string empty;
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/char/3.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/char/3.cc
index ead1aff1b724..1a1ca33d7a94 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/char/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/char/3.cc
@@ -32,7 +32,7 @@ void test03()
   typedef money_base::pattern pattern;
   typedef ostreambuf_iterator<char> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -47,24 +47,12 @@ void test03()
   // cache the moneypunct facets
   typedef moneypunct<char, true> __money_true;
   typedef moneypunct<char, false> __money_false;
-  const __money_true& monpunct_c_t = use_facet<__money_true>(loc_c); 
-  const __money_true& monpunct_de_t = use_facet<__money_true>(loc_de); 
-  const __money_false& monpunct_c_f = use_facet<__money_false>(loc_c); 
-  const __money_false& monpunct_de_f = use_facet<__money_false>(loc_de); 
-  const __money_true& monpunct_hk_t = use_facet<__money_true>(loc_hk); 
-  const __money_false& monpunct_hk_f = use_facet<__money_false>(loc_hk); 
 
   // sanity check the data is correct.
   const string empty;
 
   // total EPA budget FY 2002
   const long double  digits1 = 720000000000.0;
-
-  // est. cost, national missile "defense", expressed as a loss in USD 2001
-  const long double digits2 = -10000000000000.0;  
-
-  // input less than frac_digits
-  const long double digits4 = -1.0;
   
   // cache the money_put facet
   ostringstream oss;
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/char/4.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/char/4.cc
index 4d4518fb7767..0790ac60f4a3 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/char/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/char/4.cc
@@ -27,14 +27,13 @@
 void test04()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // Check money_put works with other iterators besides streambuf
   // output iterators. (As long as output_iterator requirements are met.)
   typedef string::iterator iter_type;
   typedef money_put<char, iter_type> mon_put_type;
   const ios_base::iostate goodbit = ios_base::goodbit;
-  const ios_base::iostate eofbit = ios_base::eofbit;
   ios_base::iostate err = goodbit;
   const locale loc_c = locale::classic();
   // woman, art, thief (stole the blues)
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/char/5.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/char/5.cc
index 86a006d00231..4554d72c8d53 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/char/5.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/char/5.cc
@@ -45,7 +45,7 @@ struct My_money_io : public std::moneypunct<char,false>
 void test05()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef ostreambuf_iterator<char> OutIt;
 
   locale loc(locale::classic(), new My_money_io);
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/char/6.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/char/6.cc
index b663d76bbe22..5177c76744a2 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/char/6.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/char/6.cc
@@ -34,7 +34,7 @@ struct My_money_io_2 : public std::moneypunct<char,false>
 void test06()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef ostreambuf_iterator<char> OutIt;
 
   locale loc(locale::classic(), new My_money_io_2);
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/1.cc
index 942589bb540b..f8f97fa691a3 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/1.cc
@@ -32,7 +32,7 @@ void test01()
   typedef money_base::pattern pattern;
   typedef ostreambuf_iterator<wchar_t> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -47,12 +47,6 @@ void test01()
   // cache the moneypunct facets
   typedef moneypunct<wchar_t, true> __money_true;
   typedef moneypunct<wchar_t, false> __money_false;
-  const __money_true& monpunct_c_t = use_facet<__money_true>(loc_c); 
-  const __money_true& monpunct_de_t = use_facet<__money_true>(loc_de); 
-  const __money_false& monpunct_c_f = use_facet<__money_false>(loc_c); 
-  const __money_false& monpunct_de_f = use_facet<__money_false>(loc_de); 
-  const __money_true& monpunct_hk_t = use_facet<__money_true>(loc_hk); 
-  const __money_false& monpunct_hk_f = use_facet<__money_false>(loc_hk); 
 
   // sanity check the data is correct.
   const wstring empty;
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/2.cc
index 2f32240bd3f6..f0e7ea1aabe3 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/2.cc
@@ -32,7 +32,7 @@ void test02()
   typedef money_base::pattern pattern;
   typedef ostreambuf_iterator<wchar_t> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -47,12 +47,6 @@ void test02()
   // cache the moneypunct facets
   typedef moneypunct<wchar_t, true> __money_true;
   typedef moneypunct<wchar_t, false> __money_false;
-  const __money_true& monpunct_c_t = use_facet<__money_true>(loc_c); 
-  const __money_true& monpunct_de_t = use_facet<__money_true>(loc_de); 
-  const __money_false& monpunct_c_f = use_facet<__money_false>(loc_c); 
-  const __money_false& monpunct_de_f = use_facet<__money_false>(loc_de); 
-  const __money_true& monpunct_hk_t = use_facet<__money_true>(loc_hk); 
-  const __money_false& monpunct_hk_f = use_facet<__money_false>(loc_hk); 
 
   // sanity check the data is correct.
   const wstring empty;
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/3.cc
index de5f5db79d63..cd79e54d66d5 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/3.cc
@@ -32,7 +32,7 @@ void test03()
   typedef money_base::pattern pattern;
   typedef ostreambuf_iterator<wchar_t> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -47,24 +47,12 @@ void test03()
   // cache the moneypunct facets
   typedef moneypunct<wchar_t, true> __money_true;
   typedef moneypunct<wchar_t, false> __money_false;
-  const __money_true& monpunct_c_t = use_facet<__money_true>(loc_c); 
-  const __money_true& monpunct_de_t = use_facet<__money_true>(loc_de); 
-  const __money_false& monpunct_c_f = use_facet<__money_false>(loc_c); 
-  const __money_false& monpunct_de_f = use_facet<__money_false>(loc_de); 
-  const __money_true& monpunct_hk_t = use_facet<__money_true>(loc_hk); 
-  const __money_false& monpunct_hk_f = use_facet<__money_false>(loc_hk); 
 
   // sanity check the data is correct.
   const wstring empty;
 
   // total EPA budget FY 2002
   const long double  digits1 = 720000000000.0;
-
-  // est. cost, national missile "defense", expressed as a loss in USD 2001
-  const long double digits2 = -10000000000000.0;  
-
-  // input less than frac_digits
-  const long double digits4 = -1.0;
   
   // cache the money_put facet
   wostringstream oss;
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/4.cc
index 397fd2ea7fe5..d288dee60abd 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/4.cc
@@ -27,14 +27,13 @@
 void test04()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // Check money_put works with other iterators besides streambuf
   // output iterators. (As long as output_iterator requirements are met.)
   typedef wstring::iterator iter_type;
   typedef money_put<wchar_t, iter_type> mon_put_type;
   const ios_base::iostate goodbit = ios_base::goodbit;
-  const ios_base::iostate eofbit = ios_base::eofbit;
   ios_base::iostate err = goodbit;
   const locale loc_c = locale::classic();
   // woman, art, thief (stole the blues)
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/5.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/5.cc
index aa5a18c93d90..40b4092eb5fb 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/5.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/5.cc
@@ -45,7 +45,7 @@ struct My_money_io : public std::moneypunct<wchar_t,false>
 void test05()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef ostreambuf_iterator<wchar_t> OutIt;
 
   locale loc(locale::classic(), new My_money_io);
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/6.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/6.cc
index d92619c554df..255aa6e56fc1 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/6.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/6.cc
@@ -34,7 +34,7 @@ struct My_money_io_2 : public std::moneypunct<wchar_t,false>
 void test06()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef ostreambuf_iterator<wchar_t> OutIt;
 
   locale loc(locale::classic(), new My_money_io_2);
diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct/1.cc b/libstdc++-v3/testsuite/22_locale/moneypunct/1.cc
index 6ab09c61a613..d74b1d69b4d9 100644
--- a/libstdc++-v3/testsuite/22_locale/moneypunct/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/moneypunct/1.cc
@@ -30,7 +30,7 @@ void test01()
   typedef std::moneypunct<char, true> test_type;
   typedef std::locale::facet base_type;
   const test_type& obj = std::use_facet<test_type>(std::locale()); 
-  const base_type* base = &obj;
+  const base_type* base __attribute__((unused)) = &obj;
   
   // Check for required typedefs
   typedef test_type::char_type char_type;
diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct/2.cc b/libstdc++-v3/testsuite/22_locale/moneypunct/2.cc
index edfefbbf89b1..e00a427a2bec 100644
--- a/libstdc++-v3/testsuite/22_locale/moneypunct/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/moneypunct/2.cc
@@ -30,7 +30,7 @@ void test02()
   typedef std::moneypunct<char, false> test_type;
   typedef std::locale::facet base_type;
   const test_type& obj = std::use_facet<test_type>(std::locale()); 
-  const base_type* base = &obj;
+  const base_type* base __attribute__((unused)) = &obj;
   
   // Check for required typedefs
   typedef test_type::char_type char_type;
diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/1.cc b/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/1.cc
index c8d7b9949040..7c8ca599f625 100644
--- a/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/1.cc
@@ -30,7 +30,7 @@ void test01()
   typedef money_base::part part;
   typedef money_base::pattern pattern;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/2.cc b/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/2.cc
index 833995ba35ab..70e4516d0ff7 100644
--- a/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/2.cc
@@ -30,7 +30,7 @@ void test02()
   typedef money_base::part part;
   typedef money_base::pattern pattern;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -42,7 +42,6 @@ void test02()
   const __money_true& monp_c_t = use_facet<__money_true>(loc_c); 
   const __money_false& monp_c_f = use_facet<__money_false>(loc_c); 
   const __money_true& monp_de_t = use_facet<__money_true>(loc_de); 
-  const __money_false& monp_de_f = use_facet<__money_false>(loc_de); 
 
   // quick sanity check for data.
   char q1 = monp_c_t.decimal_point();
diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/1.cc
index 7f0d017bf1d3..2d26611c6465 100644
--- a/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/1.cc
@@ -30,7 +30,7 @@ void test01()
   typedef money_base::part part;
   typedef money_base::pattern pattern;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/2.cc
index d3bbc39da18a..dc1d9706123d 100644
--- a/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/2.cc
@@ -30,7 +30,7 @@ void test02()
   typedef money_base::part part;
   typedef money_base::pattern pattern;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -42,7 +42,6 @@ void test02()
   const __money_true& monp_c_t = use_facet<__money_true>(loc_c); 
   const __money_false& monp_c_f = use_facet<__money_false>(loc_c); 
   const __money_true& monp_de_t = use_facet<__money_true>(loc_de); 
-  const __money_false& monp_de_f = use_facet<__money_false>(loc_de); 
 
   // quick sanity check for data.
   wchar_t q1 = monp_c_t.decimal_point();
diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct_byname/1.cc b/libstdc++-v3/testsuite/22_locale/moneypunct_byname/1.cc
index ea0857a5736e..2cdef4b1abc1 100644
--- a/libstdc++-v3/testsuite/22_locale/moneypunct_byname/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/moneypunct_byname/1.cc
@@ -29,7 +29,7 @@ void test01()
   typedef money_base::part part;
   typedef money_base::pattern pattern;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   string str;
 
   locale loc_de = __gnu_test::try_named_locale("de_DE");
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/1.cc b/libstdc++-v3/testsuite/22_locale/num_get/1.cc
index 4a3ced974cf1..a9081bbf5704 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/1.cc
@@ -29,7 +29,7 @@ void test01()
   typedef std::num_get<char> test_type;
   typedef std::locale::facet base_type;
   const test_type& obj = std::use_facet<test_type>(std::locale()); 
-  const base_type* base = &obj;
+  const base_type* base __attribute__((unused)) = &obj;
   
   // Check for required typedefs
   typedef test_type::char_type char_type;
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc
index 190f9921aefd..e42e7b4ce744 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc
@@ -29,7 +29,7 @@ void test01()
   using namespace std;
   typedef istreambuf_iterator<char> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -41,20 +41,11 @@ void test01()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the numpunct facets
-  const numpunct<char>& numpunct_c = use_facet<numpunct<char> >(loc_c); 
-  const numpunct<char>& numpunct_de = use_facet<numpunct<char> >(loc_de); 
-  const numpunct<char>& numpunct_hk = use_facet<numpunct<char> >(loc_hk); 
-
   // sanity check the data is correct.
   const string empty;
-  char c;
 
   bool b1 = true;
   bool b0 = false;
-  long l1 = 2147483647;
-  long l2 = -2147483647;
-  long l;
   unsigned long ul1 = 1294967294;
   unsigned long ul2 = 0;
   unsigned long ul;
@@ -62,7 +53,6 @@ void test01()
   double d2 = 3.15e-308;
   double d;
   long double ld1 = 6.630025e+4;
-  long double ld2 = 0.0;
   long double ld;
   void* v;
   const void* cv = &ul2;
@@ -148,7 +138,6 @@ void test01()
 
 #ifdef _GLIBCXX_USE_LONG_LONG
   long long ll1 = 9223372036854775807LL;
-  long long ll2 = -9223372036854775807LL;
   long long ll;
 
   iss.str("9.223.372.036.854.775.807");
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/2.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/2.cc
index 8d0ce69e2547..35200f8762fa 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/2.cc
@@ -29,7 +29,7 @@ void test02()
   using namespace std;
   typedef istreambuf_iterator<char> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -41,31 +41,17 @@ void test02()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the numpunct facets
-  const numpunct<char>& numpunct_c = use_facet<numpunct<char> >(loc_c); 
-  const numpunct<char>& numpunct_de = use_facet<numpunct<char> >(loc_de); 
-  const numpunct<char>& numpunct_hk = use_facet<numpunct<char> >(loc_hk); 
-
   // sanity check the data is correct.
   const string empty;
-  char c;
 
   bool b1 = true;
   bool b0 = false;
-  long l1 = 2147483647;
-  long l2 = -2147483647;
-  long l;
   unsigned long ul1 = 1294967294;
   unsigned long ul2 = 0;
   unsigned long ul;
   double d1 =  1.02345e+308;
   double d2 = 3.15e-308;
   double d;
-  long double ld1 = 6.630025e+4;
-  long double ld2 = 0.0;
-  long double ld;
-  void* v;
-  const void* cv = &ul2;
 
   // cache the num_get facet
   istringstream iss;
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/3.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/3.cc
index 43e16c2d2c4e..8048dd39a750 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/3.cc
@@ -29,7 +29,7 @@ void test03()
   using namespace std;
   typedef istreambuf_iterator<char> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -41,38 +41,18 @@ void test03()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the numpunct facets
-  const numpunct<char>& numpunct_c = use_facet<numpunct<char> >(loc_c); 
-  const numpunct<char>& numpunct_de = use_facet<numpunct<char> >(loc_de); 
-  const numpunct<char>& numpunct_hk = use_facet<numpunct<char> >(loc_hk); 
-
   // sanity check the data is correct.
   const string empty;
-  char c;
 
-  bool b1 = true;
-  bool b0 = false;
   long l1 = 2147483647;
   long l2 = -2147483647;
   long l;
-  unsigned long ul1 = 1294967294;
-  unsigned long ul2 = 0;
-  unsigned long ul;
-  double d1 =  1.02345e+308;
-  double d2 = 3.15e-308;
-  double d;
-  long double ld1 = 6.630025e+4;
-  long double ld2 = 0.0;
-  long double ld;
-  void* v;
-  const void* cv = &ul2;
 
   // cache the num_get facet
   istringstream iss;
   iss.imbue(loc_hk);
   const num_get<char>& ng = use_facet<num_get<char> >(iss.getloc()); 
   const ios_base::iostate goodbit = ios_base::goodbit;
-  const ios_base::iostate eofbit = ios_base::eofbit;
   ios_base::iostate err = ios_base::goodbit;
 
   // HK
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/4.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/4.cc
index aed5fcb43709..f7c4cb044dc8 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/4.cc
@@ -29,14 +29,13 @@
 void test04()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // Check num_get works with other iterators besides streambuf
   // output iterators. (As long as output_iterator requirements are met.)
   typedef string::const_iterator iter_type;
   typedef num_get<char, iter_type> num_get_type;
   const ios_base::iostate goodbit = ios_base::goodbit;
-  const ios_base::iostate eofbit = ios_base::eofbit;
   ios_base::iostate err = ios_base::goodbit;
   const locale loc_c = locale::classic();
   const string str("20000106 Elizabeth Durack");
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/5.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/5.cc
index e170931d060a..ad43c9d79cf7 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/5.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/5.cc
@@ -29,7 +29,7 @@ void test05()
 {
   using namespace std;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
  
   unsigned long ul;
 
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/6.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/6.cc
index 52722d1acb89..ccf51d3dbd61 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/6.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/6.cc
@@ -28,7 +28,7 @@
 void test06()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   double d = 0.0;
 
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc
index 952651d883ca..79fc4291c1cd 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc
@@ -29,7 +29,7 @@ void test01()
   using namespace std;
   typedef istreambuf_iterator<wchar_t> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -41,20 +41,11 @@ void test01()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the numpunct facets
-  const numpunct<wchar_t>& numpunct_c = use_facet<numpunct<wchar_t> >(loc_c); 
-  const numpunct<wchar_t>& numpunct_de = use_facet<numpunct<wchar_t> >(loc_de); 
-  const numpunct<wchar_t>& numpunct_hk = use_facet<numpunct<wchar_t> >(loc_hk); 
-
   // sanity check the data is correct.
   const wstring empty;
-  char c;
 
   bool b1 = true;
   bool b0 = false;
-  long l1 = 2147483647;
-  long l2 = -2147483647;
-  long l;
   unsigned long ul1 = 1294967294;
   unsigned long ul2 = 0;
   unsigned long ul;
@@ -62,7 +53,6 @@ void test01()
   double d2 = 3.15e-308;
   double d;
   long double ld1 = 6.630025e+4;
-  long double ld2 = 0.0;
   long double ld;
   void* v;
   const void* cv = &ul2;
@@ -147,7 +137,6 @@ void test01()
 
 #ifdef _GLIBCXX_USE_LONG_LONG
   long long ll1 = 9223372036854775807LL;
-  long long ll2 = -9223372036854775807LL;
   long long ll;
 
   iss.str(L"9.223.372.036.854.775.807");
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/2.cc
index 6f52860f3bfe..ec1b338b1da0 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/2.cc
@@ -29,7 +29,7 @@ void test02()
   using namespace std;
   typedef istreambuf_iterator<wchar_t> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -41,31 +41,17 @@ void test02()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the numpunct facets
-  const numpunct<wchar_t>& numpunct_c = use_facet<numpunct<wchar_t> >(loc_c); 
-  const numpunct<wchar_t>& numpunct_de = use_facet<numpunct<wchar_t> >(loc_de); 
-  const numpunct<wchar_t>& numpunct_hk = use_facet<numpunct<wchar_t> >(loc_hk); 
-
   // sanity check the data is correct.
   const wstring empty;
-  char c;
 
   bool b1 = true;
   bool b0 = false;
-  long l1 = 2147483647;
-  long l2 = -2147483647;
-  long l;
   unsigned long ul1 = 1294967294;
   unsigned long ul2 = 0;
   unsigned long ul;
   double d1 =  1.02345e+308;
   double d2 = 3.15e-308;
   double d;
-  long double ld1 = 6.630025e+4;
-  long double ld2 = 0.0;
-  long double ld;
-  void* v;
-  const void* cv = &ul2;
 
   // cache the num_get facet
   wistringstream iss;
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/3.cc
index 3a775682a2b9..fbe887bee908 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/3.cc
@@ -29,7 +29,7 @@ void test03()
   using namespace std;
   typedef istreambuf_iterator<wchar_t> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -41,38 +41,18 @@ void test03()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the numpunct facets
-  const numpunct<wchar_t>& numpunct_c = use_facet<numpunct<wchar_t> >(loc_c); 
-  const numpunct<wchar_t>& numpunct_de = use_facet<numpunct<wchar_t> >(loc_de); 
-  const numpunct<wchar_t>& numpunct_hk = use_facet<numpunct<wchar_t> >(loc_hk); 
-
   // sanity check the data is correct.
   const wstring empty;
-  char c;
 
-  bool b1 = true;
-  bool b0 = false;
   long l1 = 2147483647;
   long l2 = -2147483647;
   long l;
-  unsigned long ul1 = 1294967294;
-  unsigned long ul2 = 0;
-  unsigned long ul;
-  double d1 =  1.02345e+308;
-  double d2 = 3.15e-308;
-  double d;
-  long double ld1 = 6.630025e+4;
-  long double ld2 = 0.0;
-  long double ld;
-  void* v;
-  const void* cv = &ul2;
 
   // cache the num_get facet
   wistringstream iss;
   iss.imbue(loc_hk);
   const num_get<wchar_t>& ng = use_facet<num_get<wchar_t> >(iss.getloc()); 
   const ios_base::iostate goodbit = ios_base::goodbit;
-  const ios_base::iostate eofbit = ios_base::eofbit;
   ios_base::iostate err = ios_base::goodbit;
 
   // HK
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/4.cc
index f23aa0f1555c..9b956571d02f 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/4.cc
@@ -29,14 +29,13 @@
 void test04()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // Check num_get works with other iterators besides streambuf
   // output iterators. (As long as output_iterator requirements are met.)
   typedef wstring::const_iterator iter_type;
   typedef num_get<wchar_t, iter_type> num_get_type;
   const ios_base::iostate goodbit = ios_base::goodbit;
-  const ios_base::iostate eofbit = ios_base::eofbit;
   ios_base::iostate err = ios_base::goodbit;
   const locale loc_c = locale::classic();
   const wstring str(L"20000106 Elizabeth Durack");
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/5.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/5.cc
index 09f12be587bd..618b74ceaa0d 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/5.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/5.cc
@@ -29,7 +29,7 @@ void test05()
 {
   using namespace std;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
  
   unsigned long ul;
 
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/6.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/6.cc
index e2aeb184b235..fac26fe173aa 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/6.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/6.cc
@@ -28,7 +28,7 @@
 void test06()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   double d = 0.0;
 
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/1.cc b/libstdc++-v3/testsuite/22_locale/num_put/1.cc
index 2dabe86d8304..b520007f740f 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/1.cc
@@ -29,7 +29,7 @@ void test01()
   typedef std::num_put<char> test_type;
   typedef std::locale::facet base_type;
   const test_type& obj = std::use_facet<test_type>(std::locale()); 
-  const base_type* base = &obj;
+  const base_type* base __attribute__((unused)) = &obj;
   
   // Check for required typedefs
   typedef test_type::char_type char_type;
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/1.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/1.cc
index cc1759129c69..879337a0d625 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/1.cc
@@ -29,7 +29,7 @@ void test01()
   using namespace std;
   typedef ostreambuf_iterator<char> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -42,22 +42,16 @@ void test01()
   VERIFY( loc_de != loc_fr );
 
   // cache the numpunct facets
-  const numpunct<char>& numpunct_c = use_facet<numpunct<char> >(loc_c); 
   const numpunct<char>& numpunct_de = use_facet<numpunct<char> >(loc_de); 
-  const numpunct<char>& numpunct_hk = use_facet<numpunct<char> >(loc_hk); 
 
   // sanity check the data is correct.
   const string empty;
   string result1;
   string result2;
-  char c;
 
   bool b1 = true;
   bool b0 = false;
-  long l1 = 2147483647;
-  long l2 = -2147483647;
   unsigned long ul1 = 1294967294;
-  unsigned long ul2 = 0;
   double d1 =  1.7976931348623157e+308;
   double d2 = 2.2250738585072014e-308;
   long double ld1 = 1.7976931348623157e+308;
@@ -157,7 +151,6 @@ void test01()
 
 #ifdef _GLIBCXX_USE_LONG_LONG
   long long ll1 = 9223372036854775807LL;
-  long long ll2 = -9223372036854775807LL;
 
   oss.str(empty);
   oss.clear();
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/2.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/2.cc
index 5f783320c5f1..6b6eb3e3f122 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/2.cc
@@ -29,7 +29,7 @@ void test02()
   using namespace std;
   typedef ostreambuf_iterator<char> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -41,28 +41,15 @@ void test02()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the numpunct facets
-  const numpunct<char>& numpunct_c = use_facet<numpunct<char> >(loc_c); 
-  const numpunct<char>& numpunct_de = use_facet<numpunct<char> >(loc_de); 
-  const numpunct<char>& numpunct_hk = use_facet<numpunct<char> >(loc_hk); 
-
   // sanity check the data is correct.
   const string empty;
   string result1;
   string result2;
-  char c;
 
   bool b1 = true;
   bool b0 = false;
-  long l1 = 2147483647;
-  long l2 = -2147483647;
   unsigned long ul1 = 1294967294;
   unsigned long ul2 = 0;
-  double d1 =  1.7976931348623157e+308;
-  double d2 = 2.2250738585072014e-308;
-  long double ld1 = 1.7976931348623157e+308;
-  long double ld2 = 2.2250738585072014e-308;
-  const void* cv = &ld1;
 
   // cache the num_put facet
   ostringstream oss;
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/3.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/3.cc
index cae87474f298..064e2d79dcb7 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/3.cc
@@ -29,7 +29,7 @@ void test03()
   using namespace std;
   typedef ostreambuf_iterator<char> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -41,28 +41,13 @@ void test03()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the numpunct facets
-  const numpunct<char>& numpunct_c = use_facet<numpunct<char> >(loc_c); 
-  const numpunct<char>& numpunct_de = use_facet<numpunct<char> >(loc_de); 
-  const numpunct<char>& numpunct_hk = use_facet<numpunct<char> >(loc_hk); 
-
   // sanity check the data is correct.
   const string empty;
   string result1;
   string result2;
-  char c;
 
-  bool b1 = true;
-  bool b0 = false;
   long l1 = 2147483647;
   long l2 = -2147483647;
-  unsigned long ul1 = 1294967294;
-  unsigned long ul2 = 0;
-  double d1 =  1.7976931348623157e+308;
-  double d2 = 2.2250738585072014e-308;
-  long double ld1 = 1.7976931348623157e+308;
-  long double ld2 = 2.2250738585072014e-308;
-  const void* cv = &ld1;
 
   // cache the num_put facet
   ostringstream oss;
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/4.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/4.cc
index 7ce358311fef..e7b139b0270f 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/4.cc
@@ -27,15 +27,13 @@
 void test04()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // Check num_put works with other iterators besides streambuf
   // output iterators. (As long as output_iterator requirements are met.)
   typedef string::iterator iter_type;
   typedef char_traits<char> traits;
   typedef num_put<char, iter_type> num_put_type;
-  const ios_base::iostate goodbit = ios_base::goodbit;
-  const ios_base::iostate eofbit = ios_base::eofbit;
   const locale loc_c = locale::classic();
   const string str("1798 Lady Elgin");
   const string str2("0 true 0xbffff74c Mary Nisbet");
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/5.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/5.cc
index ce590ea57e81..467ecf9e43f4 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/5.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/5.cc
@@ -30,7 +30,7 @@
 void test05()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // A locale that expects grouping.
   locale loc_de = __gnu_test::try_named_locale("de_DE");
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/6.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/6.cc
index 3cc550710bb1..4675fc421113 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/6.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/6.cc
@@ -28,7 +28,7 @@
 void test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   ostringstream oss1, oss2;
   const num_put<char>& np1 = use_facet<num_put<char> >(oss1.getloc());
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/7.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/7.cc
index d5586cc3adae..8299be9d8ab9 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/7.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/7.cc
@@ -28,7 +28,7 @@
 void test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   typedef num_put<char> np_t;
 
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/1.cc
index 379a1379d510..86a02a6e4083 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/1.cc
@@ -29,7 +29,7 @@ void test01()
   using namespace std;
   typedef ostreambuf_iterator<wchar_t> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -42,22 +42,16 @@ void test01()
   VERIFY( loc_de != loc_fr );
 
   // cache the numpunct facets
-  const numpunct<wchar_t>& numpunct_c = use_facet<numpunct<wchar_t> >(loc_c); 
-  const numpunct<wchar_t>& numpunct_de = use_facet<numpunct<wchar_t> >(loc_de); 
-  const numpunct<wchar_t>& numpunct_hk = use_facet<numpunct<wchar_t> >(loc_hk); 
-
+  const numpunct<wchar_t>& numpunct_de = use_facet<numpunct<wchar_t> >(loc_de);
+ 
   // sanity check the data is correct.
   const wstring empty;
   wstring result1;
   wstring result2;
-  char c;
 
   bool b1 = true;
   bool b0 = false;
-  long l1 = 2147483647;
-  long l2 = -2147483647;
   unsigned long ul1 = 1294967294;
-  unsigned long ul2 = 0;
   double d1 =  1.7976931348623157e+308;
   double d2 = 2.2250738585072014e-308;
   long double ld1 = 1.7976931348623157e+308;
@@ -157,7 +151,6 @@ void test01()
 
 #ifdef _GLIBCXX_USE_LONG_LONG
   long long ll1 = 9223372036854775807LL;
-  long long ll2 = -9223372036854775807LL;
 
   oss.str(empty);
   oss.clear();
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/2.cc
index 30faf63f6497..563bf96c8257 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/2.cc
@@ -29,7 +29,7 @@ void test02()
   using namespace std;
   typedef ostreambuf_iterator<wchar_t> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -41,28 +41,15 @@ void test02()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the numpunct facets
-  const numpunct<wchar_t>& numpunct_c = use_facet<numpunct<wchar_t> >(loc_c); 
-  const numpunct<wchar_t>& numpunct_de = use_facet<numpunct<wchar_t> >(loc_de); 
-  const numpunct<wchar_t>& numpunct_hk = use_facet<numpunct<wchar_t> >(loc_hk); 
-
   // sanity check the data is correct.
   const wstring empty;
   wstring result1;
   wstring result2;
-  char c;
 
   bool b1 = true;
   bool b0 = false;
-  long l1 = 2147483647;
-  long l2 = -2147483647;
   unsigned long ul1 = 1294967294;
   unsigned long ul2 = 0;
-  double d1 =  1.7976931348623157e+308;
-  double d2 = 2.2250738585072014e-308;
-  long double ld1 = 1.7976931348623157e+308;
-  long double ld2 = 2.2250738585072014e-308;
-  const void* cv = &ld1;
 
   // cache the num_put facet
   wostringstream oss;
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/3.cc
index 5115355969fc..3c4728ce46c7 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/3.cc
@@ -29,7 +29,7 @@ void test03()
   using namespace std;
   typedef ostreambuf_iterator<wchar_t> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -41,28 +41,13 @@ void test03()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the numpunct facets
-  const numpunct<wchar_t>& numpunct_c = use_facet<numpunct<wchar_t> >(loc_c); 
-  const numpunct<wchar_t>& numpunct_de = use_facet<numpunct<wchar_t> >(loc_de); 
-  const numpunct<wchar_t>& numpunct_hk = use_facet<numpunct<wchar_t> >(loc_hk); 
-
   // sanity check the data is correct.
   const wstring empty;
   wstring result1;
   wstring result2;
-  char c;
 
-  bool b1 = true;
-  bool b0 = false;
   long l1 = 2147483647;
   long l2 = -2147483647;
-  unsigned long ul1 = 1294967294;
-  unsigned long ul2 = 0;
-  double d1 =  1.7976931348623157e+308;
-  double d2 = 2.2250738585072014e-308;
-  long double ld1 = 1.7976931348623157e+308;
-  long double ld2 = 2.2250738585072014e-308;
-  const void* cv = &ld1;
 
   // cache the num_put facet
   wostringstream oss;
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/4.cc
index 1057a85f42d3..3fc65175492e 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/4.cc
@@ -27,15 +27,13 @@
 void test04()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // Check num_put works with other iterators besides streambuf
   // output iterators. (As long as output_iterator requirements are met.)
   typedef wstring::iterator iter_type;
   typedef char_traits<wchar_t> traits;
   typedef num_put<wchar_t, iter_type> num_put_type;
-  const ios_base::iostate goodbit = ios_base::goodbit;
-  const ios_base::iostate eofbit = ios_base::eofbit;
   const locale loc_c = locale::classic();
   const wstring str(L"1798 Lady Elgin");
   const wstring str2(L"0 true 0xbffff74c Mary Nisbet");
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/5.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/5.cc
index ea9e39f231b9..51bcbff6c86f 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/5.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/5.cc
@@ -30,7 +30,7 @@
 void test05()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // A locale that expects grouping.
   locale loc_de = __gnu_test::try_named_locale("de_DE");
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/6.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/6.cc
index 01733603cfc1..88ceb0d97827 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/6.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/6.cc
@@ -28,7 +28,7 @@
 void test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   wostringstream woss1, woss2;
   const num_put<wchar_t>& np1 = use_facet<num_put<wchar_t> >(woss1.getloc());
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/7.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/7.cc
index 3b181456f297..d8cee64f68fd 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/7.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/7.cc
@@ -27,7 +27,7 @@
 void test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   typedef num_put<wchar_t> npw_t;
 
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/1.cc b/libstdc++-v3/testsuite/22_locale/numpunct/1.cc
index f2f94273b9fb..955eaef45f1c 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct/1.cc
@@ -29,7 +29,7 @@ void test01()
   typedef std::numpunct<char> test_type;
   typedef std::locale::facet base_type;
   const test_type& obj = std::use_facet<test_type>(std::locale()); 
-  const base_type* base = &obj;
+  const base_type* base __attribute__((unused)) = &obj;
 }
 
 int main()
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/1.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/1.cc
index b57ecb21fac2..111ad527a742 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/1.cc
@@ -27,7 +27,7 @@ void test01()
 {
   using namespace std;
   
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -41,9 +41,6 @@ void test01()
 
   // cache the numpunct facets
   const numpunct<char>& nump_c = use_facet<numpunct<char> >(loc_c); 
-  const numpunct<char>& nump_us = use_facet<numpunct<char> >(loc_us); 
-  const numpunct<char>& nump_fr = use_facet<numpunct<char> >(loc_fr); 
-  const numpunct<char>& nump_de = use_facet<numpunct<char> >(loc_de); 
 
   // sanity check the data is correct.
   char dp1 = nump_c.decimal_point();
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/2.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/2.cc
index 0ff21db6dce5..cbff78e57409 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/2.cc
@@ -27,7 +27,7 @@ void test02()
 {
   using namespace std;
   
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -46,8 +46,6 @@ void test02()
   const numpunct<char>& nump_de = use_facet<numpunct<char> >(loc_de); 
 
   // sanity check the data is correct.
-  char dp1 = nump_c.decimal_point();
-  char th1 = nump_c.thousands_sep();
   string g1 = nump_c.grouping();
   string t1 = nump_c.truename();
   string f1 = nump_c.falsename();
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/cache_1.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/cache_1.cc
index 002b0c47e377..57a6de733e8b 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/cache_1.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/cache_1.cc
@@ -47,7 +47,7 @@ void test01()
 {
   using namespace std;
 
-  bool 		test = true;
+  bool test __attribute__((unused)) = true;
   const string 	basestr("true");
   const string 	derivedstr("truest");
 
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/cache_2.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/cache_2.cc
index 729e82a64bd1..6be2ec04f883 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/cache_2.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/cache_2.cc
@@ -46,7 +46,7 @@ void test01()
 {
   using namespace std;
 
-  bool 		test = true;
+  bool test __attribute__((unused)) = true;
   const string 	empty;
   const string 	basestr("true");
   const string 	derivedstr("truest");
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/pod/1.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/pod/1.cc
index c0cf534af7bb..da6a149d3073 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct/members/pod/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/pod/1.cc
@@ -36,7 +36,7 @@ namespace std
 {
   template<>
     void
-    numpunct<podchar_type>::_M_initialize_numpunct(__c_locale __cloc)
+    numpunct<podchar_type>::_M_initialize_numpunct(__c_locale)
     {
       if (!_M_data)
 	_M_data = new __numpunct_cache<podchar_type>;
@@ -92,7 +92,7 @@ void test01()
   typedef basic_stringbuf<podchar_type> 	stringbuf_type;
   typedef basic_ostream<podchar_type> 		ostream_type;
   
-  bool 		test = true;
+  bool test __attribute__((unused)) = true;
 
   // Pre-cache sanity check.
   const locale 	loc(locale::classic(), new numpunct<podchar_type>);
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/pod/2.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/pod/2.cc
index 32b26eda0cdc..10b5dedfe0cf 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct/members/pod/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/pod/2.cc
@@ -37,24 +37,24 @@ namespace std
   template<>
     bool 
     ctype<podchar_type>::
-    do_is(mask __m, char_type __c) const { return true; }
+    do_is(mask, char_type) const { return true; }
 
   template<>
     const podchar_type*
     ctype<podchar_type>::
-    do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const
+    do_is(const char_type* __lo, const char_type*, mask*) const
     { return __lo; }
 
   template<>
     const podchar_type*
     ctype<podchar_type>::
-    do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const
+    do_scan_is(mask, const char_type* __lo, const char_type*) const
     { return __lo; }
 
   template<>
     const podchar_type*
     ctype<podchar_type>::
-    do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
+    do_scan_not(mask, const char_type* __lo, const char_type*) const
     { return __lo; }
 
   template<>
@@ -66,7 +66,7 @@ namespace std
   template<>
     const podchar_type*
     ctype<podchar_type>::
-    do_toupper(char_type* __lo, const char_type* __hi) const
+    do_toupper(char_type*, const char_type* __hi) const
     { return __hi; }
 
   template<>
@@ -78,7 +78,7 @@ namespace std
   template<>
     const podchar_type*
     ctype<podchar_type>::
-    do_tolower(char_type* __lo, const char_type* __hi) const
+    do_tolower(char_type*, const char_type* __hi) const
     { return __hi; }
 
   template<>
@@ -114,7 +114,7 @@ namespace std
     const podchar_type*
     ctype<podchar_type>::
     do_narrow(const podchar_type* __lo, const podchar_type* __hi, 
-	      char __dfault, char* __dest) const
+	      char, char* __dest) const
     {
       while (__lo < __hi)
 	{
@@ -130,7 +130,7 @@ namespace std
 
   template<>
     void
-    numpunct<podchar_type>::_M_initialize_numpunct(__c_locale __cloc)
+    numpunct<podchar_type>::_M_initialize_numpunct(__c_locale)
     {
       if (!_M_data)
 	_M_data = new __numpunct_cache<podchar_type>;
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/1.cc
index ef1c9f0af7d0..5d60b6cb7e02 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/1.cc
@@ -27,7 +27,7 @@ void test01()
 {
   using namespace std;
   
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -41,9 +41,6 @@ void test01()
 
   // cache the numpunct facets
   const numpunct<wchar_t>& nump_c = use_facet<numpunct<wchar_t> >(loc_c); 
-  const numpunct<wchar_t>& nump_us = use_facet<numpunct<wchar_t> >(loc_us); 
-  const numpunct<wchar_t>& nump_fr = use_facet<numpunct<wchar_t> >(loc_fr); 
-  const numpunct<wchar_t>& nump_de = use_facet<numpunct<wchar_t> >(loc_de); 
 
   // sanity check the data is correct.
   wchar_t dp1 = nump_c.decimal_point();
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/2.cc
index fce8fa2c6d7e..94e4b1d341f8 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/2.cc
@@ -27,7 +27,7 @@ void test02()
 {
   using namespace std;
   
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction
   locale loc_c = locale::classic();
@@ -46,8 +46,6 @@ void test02()
   const numpunct<wchar_t>& nump_de = use_facet<numpunct<wchar_t> >(loc_de); 
 
   // sanity check the data is correct.
-  wchar_t dp1 = nump_c.decimal_point();
-  wchar_t th1 = nump_c.thousands_sep();
   string g1 = nump_c.grouping();
   wstring t1 = nump_c.truename();
   wstring f1 = nump_c.falsename();
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/cache_1.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/cache_1.cc
index 0b41e963f50c..fc96d05c54f3 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/cache_1.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/cache_1.cc
@@ -47,7 +47,7 @@ void test01()
 {
   using namespace std;
 
-  bool 		test = true;
+  bool test __attribute__((unused)) = true;
   const wstring 	basestr(L"true");
   const wstring 	derivedstr(L"truest");
 
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/cache_2.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/cache_2.cc
index 9a3c4872e5c2..09661c9482d5 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/cache_2.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/cache_2.cc
@@ -46,7 +46,7 @@ void test01()
 {
   using namespace std;
 
-  bool 		test = true;
+  bool test __attribute__((unused)) = true;
   const wstring 	empty;
   const wstring 	basestr(L"true");
   const wstring 	derivedstr(L"truest");
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct_byname/1.cc b/libstdc++-v3/testsuite/22_locale/numpunct_byname/1.cc
index a3fcaf268f43..171149ec7675 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct_byname/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct_byname/1.cc
@@ -27,7 +27,7 @@ void test01()
 {
   using namespace std;
   
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   string str;
 
   locale loc_de = __gnu_test::try_named_locale("de_DE");
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct_byname/2.cc b/libstdc++-v3/testsuite/22_locale/numpunct_byname/2.cc
index 4e6c9d68e628..57e7f3019845 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct_byname/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct_byname/2.cc
@@ -27,7 +27,7 @@ void test02()
 {
   using namespace std;
   
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   locale loc_it = __gnu_test::try_named_locale("it_IT");
 
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/1.cc
index 04d4aa84ce0e..d6de6422c3ac 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/1.cc
@@ -30,8 +30,8 @@ void test01()
   typedef std::locale::facet base_type1;
   typedef std::time_base base_type2;
   const test_type& obj = std::use_facet<test_type>(std::locale()); 
-  const base_type1* base1 = &obj;
-  const base_type2* base2 = &obj;
+  const base_type1* base1 __attribute__((unused)) = &obj;
+  const base_type2* base2 __attribute__((unused)) = &obj;
   
   // Check for required typedefs
   typedef test_type::char_type char_type;
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/1.cc
index f4f0b88502cb..4eb2a3149e00 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/1.cc
@@ -1,5 +1,4 @@
 // 2001-09-21 Benjamin Kosnik  <bkoz@redhat.com>
-
 // Copyright (C) 2001, 2002, 2003 Free Software Foundation
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -27,7 +26,7 @@
 void test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef time_base::dateorder dateorder;
   typedef istreambuf_iterator<char> iterator_type;
 
@@ -41,13 +40,7 @@ void test01()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); 
-  const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); 
-  const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); 
-  const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); 
-
-  const string empty;
+   const string empty;
 
   // create an ostream-derived object, cache the time_get facet
   iterator_type end;
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/1.cc
index c9c19dfc29ae..3916275ae736 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/1.cc
@@ -27,7 +27,7 @@
 void test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef time_base::dateorder dateorder;
   typedef istreambuf_iterator<wchar_t> iterator_type;
 
@@ -41,12 +41,6 @@ void test01()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); 
-  const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); 
-  const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); 
-  const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); 
-
   const string empty;
 
   // create an ostream-derived object, cache the time_get facet
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/1.cc
index 7c54955a76ef..0aa5ddcc0fad 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/1.cc
@@ -30,7 +30,7 @@ void test01()
   typedef time_base::dateorder dateorder;
   typedef istreambuf_iterator<char> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
@@ -42,12 +42,6 @@ void test01()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); 
-  const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); 
-  const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); 
-  const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); 
-
   const string empty;
 
   // create an ostream-derived object, cache the time_get facet
@@ -61,11 +55,7 @@ void test01()
   ios_base::iostate errorstate = good;
 
   // create "C" time objects
-  const tm time_bday = { 0, 0, 12, 4, 3, 71 };
-  const char* all = "%a %A %b %B %c %d %H %I %j %m %M %p %s %U "
-                    "%w %W %x %X %y %Y %Z %%";
-  const char* date = "%A, the second of %B";
-  const char* date_ex = "%Ex";
+  const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
 
   // iter_type 
   // get_date(iter_type, iter_type, ios_base&, ios_base::iostate&, tm*) const
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/2.cc
index 63d2602272a6..9860b43a6151 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/2.cc
@@ -30,7 +30,7 @@ void test02()
   typedef time_base::dateorder dateorder;
   typedef istreambuf_iterator<char> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
@@ -42,12 +42,6 @@ void test02()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); 
-  const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); 
-  const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); 
-  const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); 
-
   const string empty;
 
   // create an ostream-derived object, cache the time_get facet
@@ -60,11 +54,7 @@ void test02()
   ios_base::iostate errorstate = good;
 
   // create "C" time objects
-  const tm time_bday = { 0, 0, 12, 4, 3, 71 };
-  const char* all = "%a %A %b %B %c %d %H %I %j %m %M %p %s %U "
-                    "%w %W %x %X %y %Y %Z %%";
-  const char* date = "%A, the second of %B";
-  const char* date_ex = "%Ex";
+  const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
 
   // iter_type 
   // get_date(iter_type, iter_type, ios_base&, ios_base::iostate&, tm*) const
@@ -73,7 +63,6 @@ void test02()
   iss.imbue(loc_c);
   iss.str("04/04/71");
   iterator_type is_it01(iss);
-  tm time01;
   errorstate = good;
 
   // inspection of named locales, de_DE
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/3.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/3.cc
index 249b5e8001f6..3c786116bc31 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/3.cc
@@ -27,19 +27,18 @@
 void test03()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // Check time_get works with other iterators besides streambuf
   // input iterators.
   typedef string::const_iterator iter_type;
   typedef time_get<char, iter_type> time_get_type;
   const ios_base::iostate goodbit = ios_base::goodbit;
-  const ios_base::iostate eofbit = ios_base::eofbit;
   ios_base::iostate err = goodbit;
   const locale loc_c = locale::classic();
 
   // Create "C" time objects
-  const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2 };
+  const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2, 0, 0 };
   tm tm1;
 
   istringstream iss; 
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/1.cc
index aedf8817d8ca..4affdf1796a9 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/1.cc
@@ -30,7 +30,7 @@ void test01()
   typedef time_base::dateorder dateorder;
   typedef istreambuf_iterator<wchar_t> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
@@ -42,12 +42,6 @@ void test01()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); 
-  const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); 
-  const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); 
-  const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); 
-
   const wstring empty;
 
   // create an ostream-derived object, cache the time_get facet
@@ -61,11 +55,7 @@ void test01()
   ios_base::iostate errorstate = good;
 
   // create "C" time objects
-  const tm time_bday = { 0, 0, 12, 4, 3, 71 };
-  const wchar_t* all = L"%a %A %b %B %c %d %H %I %j %m %M %p %s %U "
-                    L"%w %W %x %X %y %Y %Z %%";
-  const wchar_t* date = L"%A, the second of %B";
-  const wchar_t* date_ex = L"%Ex";
+  const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
 
   // iter_type 
   // get_date(iter_type, iter_type, ios_base&, ios_base::iostate&, tm*) const
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/2.cc
index aff0d1e74e73..59695724138a 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/2.cc
@@ -30,7 +30,7 @@ void test02()
   typedef time_base::dateorder dateorder;
   typedef istreambuf_iterator<wchar_t> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
@@ -42,12 +42,6 @@ void test02()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); 
-  const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); 
-  const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); 
-  const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); 
-
   const wstring empty;
 
   // create an ostream-derived object, cache the time_get facet
@@ -60,11 +54,7 @@ void test02()
   ios_base::iostate errorstate = good;
 
   // create "C" time objects
-  const tm time_bday = { 0, 0, 12, 4, 3, 71 };
-  const wchar_t* all = L"%a %A %b %B %c %d %H %I %j %m %M %p %s %U "
-                    L"%w %W %x %X %y %Y %Z %%";
-  const wchar_t* date = L"%A, the second of %B";
-  const wchar_t* date_ex = L"%Ex";
+  const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
 
   // iter_type 
   // get_date(iter_type, iter_type, ios_base&, ios_base::iostate&, tm*) const
@@ -73,7 +63,6 @@ void test02()
   iss.imbue(loc_c);
   iss.str(L"04/04/71");
   iterator_type is_it01(iss);
-  tm time01;
   errorstate = good;
 
   // inspection of named locales, de_DE
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/3.cc
index b02049fcb465..6b4facc99f0e 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/3.cc
@@ -27,19 +27,18 @@
 void test03()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // Check time_get works with other iterators besides streambuf
   // input iterators.
   typedef wstring::const_iterator iter_type;
   typedef time_get<wchar_t, iter_type> time_get_type;
   const ios_base::iostate goodbit = ios_base::goodbit;
-  const ios_base::iostate eofbit = ios_base::eofbit;
   ios_base::iostate err = goodbit;
   const locale loc_c = locale::classic();
 
   // Create "C" time objects
-  const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2 };
+  const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2, 0, 0 };
   tm tm1;
 
   istringstream iss; 
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/1.cc
index 17f52a563858..cf948c3d0d58 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/1.cc
@@ -33,7 +33,7 @@ void test01()
   const ios_base::iostate good = ios_base::goodbit;
   ios_base::iostate errorstate = good;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
@@ -45,14 +45,8 @@ void test01()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); 
-  const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); 
-  const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); 
-  const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); 
-
   // create "C" time objects
-  const tm time_bday = { 0, 0, 12, 4, 3, 71 };
+  const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
 
   // iter_type 
   // get_monthname(iter_type, iter_type, ios_base&, 
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/2.cc
index f9d79a434404..5f183b59fd56 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/2.cc
@@ -30,7 +30,7 @@ void test02()
   typedef time_base::dateorder dateorder;
   typedef istreambuf_iterator<char> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
@@ -42,13 +42,7 @@ void test02()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); 
-  const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); 
-  const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); 
-  const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); 
-
-  const tm time_bday = { 0, 0, 12, 4, 3, 71 };
+  const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
 
   const string empty;
 
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/3.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/3.cc
index c876f5c364b9..970e43197068 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/3.cc
@@ -27,19 +27,17 @@
 void test03()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // Check time_get works with other iterators besides streambuf
   // input iterators.
   typedef string::const_iterator iter_type;
   typedef time_get<char, iter_type> time_get_type;
   const ios_base::iostate goodbit = ios_base::goodbit;
-  const ios_base::iostate eofbit = ios_base::eofbit;
   ios_base::iostate err = goodbit;
   const locale loc_c = locale::classic();
 
   // Create "C" time objects
-  const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2 };
   tm tm1;
 
   istringstream iss; 
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc
index 0b86d74f9961..47f5c48188a7 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc
@@ -33,7 +33,7 @@ void test01()
   const ios_base::iostate good = ios_base::goodbit;
   ios_base::iostate errorstate = good;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
@@ -45,14 +45,8 @@ void test01()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); 
-  const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); 
-  const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); 
-  const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); 
-
   // create "C" time objects
-  const tm time_bday = { 0, 0, 12, 4, 3, 71 };
+  const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
 
   // iter_type 
   // get_monthname(iter_type, iter_type, ios_base&, 
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc
index 63689eefca37..af861cb7bfeb 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc
@@ -30,7 +30,7 @@ void test02()
   typedef time_base::dateorder dateorder;
   typedef istreambuf_iterator<wchar_t> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
@@ -42,13 +42,7 @@ void test02()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); 
-  const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); 
-  const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); 
-  const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); 
-
-  const tm time_bday = { 0, 0, 12, 4, 3, 71 };
+  const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
 
   const wstring empty;
 
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/3.cc
index 5cb2b651a9c3..24007fa36213 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/3.cc
@@ -27,19 +27,17 @@
 void test03()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // Check time_get works with other iterators besides streambuf
   // input iterators.
   typedef wstring::const_iterator iter_type;
   typedef time_get<wchar_t, iter_type> time_get_type;
   const ios_base::iostate goodbit = ios_base::goodbit;
-  const ios_base::iostate eofbit = ios_base::eofbit;
   ios_base::iostate err = goodbit;
   const locale loc_c = locale::classic();
 
   // Create "C" time objects
-  const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2 };
   tm tm1;
 
   istringstream iss; 
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc
index 1517fe2e138b..c3b3bb1c015b 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc
@@ -27,7 +27,7 @@
 void test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef time_base::dateorder dateorder;
   typedef istreambuf_iterator<char> iterator_type;
 
@@ -41,12 +41,6 @@ void test01()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); 
-  const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); 
-  const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); 
-  const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); 
-
   const string empty;
 
   // create an ostream-derived object, cache the time_get facet
@@ -59,11 +53,7 @@ void test01()
   ios_base::iostate errorstate = good;
 
   // create "C" time objects
-  const tm time_bday = { 0, 0, 12, 4, 3, 71 };
-  const char* all = "%a %A %b %B %c %d %H %I %j %m %M %p %s %U "
-                    "%w %W %x %X %y %Y %Z %%";
-  const char* date = "%A, the second of %B";
-  const char* date_ex = "%Ex";
+  const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
 
   // 2
   // iter_type 
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc
index 9b307d7535c9..7341274182e4 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc
@@ -27,7 +27,7 @@
 void test02()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef time_base::dateorder dateorder;
   typedef istreambuf_iterator<char> iterator_type;
 
@@ -41,14 +41,8 @@ void test02()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); 
-  const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); 
-  const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); 
-  const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); 
-
   const string empty;
-  const tm time_bday = { 0, 0, 12, 4, 3, 71 };
+  const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
 
   // create an ostream-derived object, cache the time_get facet
   iterator_type end;
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/3.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/3.cc
index 01a06cacc288..d04ebdb72149 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/3.cc
@@ -27,19 +27,18 @@
 void test03()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // Check time_get works with other iterators besides streambuf
   // input iterators.
   typedef string::const_iterator iter_type;
   typedef time_get<char, iter_type> time_get_type;
   const ios_base::iostate goodbit = ios_base::goodbit;
-  const ios_base::iostate eofbit = ios_base::eofbit;
   ios_base::iostate err = goodbit;
   const locale loc_c = locale::classic();
 
   // Create "C" time objects
-  const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2 };
+  const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2, 0, 0 };
   tm tm1;
 
   istringstream iss; 
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc
index 00ee21e680a8..bc9b3a12734c 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc
@@ -27,7 +27,7 @@
 void test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef time_base::dateorder dateorder;
   typedef istreambuf_iterator<wchar_t> iterator_type;
 
@@ -41,12 +41,6 @@ void test01()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); 
-  const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); 
-  const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); 
-  const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); 
-
   const wstring empty;
 
   // create an ostream-derived object, cache the time_get facet
@@ -59,11 +53,7 @@ void test01()
   ios_base::iostate errorstate = good;
 
   // create "C" time objects
-  const tm time_bday = { 0, 0, 12, 4, 3, 71 };
-  const wchar_t* all = L"%a %A %b %B %c %d %H %I %j %m %M %p %s %U "
-                    L"%w %W %x %X %y %Y %Z %%";
-  const wchar_t* date = L"%A, the second of %B";
-  const wchar_t* date_ex = L"%Ex";
+  const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
 
   // 2
   // iter_type 
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc
index a412cf01011c..8c75a6fd76c6 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc
@@ -27,7 +27,7 @@
 void test02()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef time_base::dateorder dateorder;
   typedef istreambuf_iterator<wchar_t> iterator_type;
 
@@ -41,14 +41,8 @@ void test02()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); 
-  const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); 
-  const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); 
-  const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); 
-
   const wstring empty;
-  const tm time_bday = { 0, 0, 12, 4, 3, 71 };
+  const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
 
   // create an ostream-derived object, cache the time_get facet
   iterator_type end;
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/3.cc
index bb9c2e0b46fd..f9ebf1bd0bfd 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/3.cc
@@ -27,19 +27,18 @@
 void test03()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // Check time_get works with other iterators besides streambuf
   // input iterators.
   typedef wstring::const_iterator iter_type;
   typedef time_get<wchar_t, iter_type> time_get_type;
   const ios_base::iostate goodbit = ios_base::goodbit;
-  const ios_base::iostate eofbit = ios_base::eofbit;
   ios_base::iostate err = goodbit;
   const locale loc_c = locale::classic();
 
   // Create "C" time objects
-  const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2 };
+  const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2, 0, 0 };
   tm tm1;
 
   wistringstream iss; 
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/1.cc
index ecbe8ecc2d89..993592158e4d 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/1.cc
@@ -30,7 +30,7 @@ void test01()
   typedef time_base::dateorder dateorder;
   typedef istreambuf_iterator<char> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
@@ -42,12 +42,6 @@ void test01()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); 
-  const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); 
-  const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); 
-  const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); 
-
   const string empty;
 
   // create an ostream-derived object, cache the time_get facet
@@ -61,11 +55,7 @@ void test01()
   ios_base::iostate errorstate = good;
 
   // create "C" time objects
-  const tm time_bday = { 0, 0, 12, 4, 3, 71 };
-  const char* all = "%a %A %b %B %c %d %H %I %j %m %M %p %s %U "
-                    "%w %W %x %X %y %Y %Z %%";
-  const char* date = "%A, the second of %B";
-  const char* date_ex = "%Ex";
+  const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
 
   // iter_type 
   // get_weekday(iter_type, iter_type, ios_base&, 
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/2.cc
index e423be625721..93151dfa3242 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/2.cc
@@ -30,7 +30,7 @@ void test02()
   typedef time_base::dateorder dateorder;
   typedef istreambuf_iterator<char> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
@@ -42,12 +42,6 @@ void test02()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); 
-  const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); 
-  const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); 
-  const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); 
-
   const string empty;
 
   // create an ostream-derived object, cache the time_get facet
@@ -60,7 +54,7 @@ void test02()
   ios_base::iostate errorstate = good;
 
   // create "C" time objects
-  const tm time_bday = { 0, 0, 12, 4, 3, 71 };
+  const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
 
   // inspection of named locales, de_DE
   iss.imbue(loc_de);
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/3.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/3.cc
index 59dde862a35e..09a969a1f1d2 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/3.cc
@@ -27,19 +27,18 @@
 void test03()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // Check time_get works with other iterators besides streambuf
   // input iterators.
   typedef string::const_iterator iter_type;
   typedef time_get<char, iter_type> time_get_type;
   const ios_base::iostate goodbit = ios_base::goodbit;
-  const ios_base::iostate eofbit = ios_base::eofbit;
   ios_base::iostate err = goodbit;
   const locale loc_c = locale::classic();
 
   // Create "C" time objects
-  const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2 };
+  const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2, 0, 0 };
   tm tm1;
 
   istringstream iss; 
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc
index dca85d24fd21..065b13cf7887 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc
@@ -30,7 +30,7 @@ void test01()
   typedef time_base::dateorder dateorder;
   typedef istreambuf_iterator<wchar_t> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
@@ -42,12 +42,6 @@ void test01()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); 
-  const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); 
-  const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); 
-  const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); 
-
   const wstring empty;
 
   // create an ostream-derived object, cache the time_get facet
@@ -61,11 +55,7 @@ void test01()
   ios_base::iostate errorstate = good;
 
   // create "C" time objects
-  const tm time_bday = { 0, 0, 12, 4, 3, 71 };
-  const wchar_t* all = L"%a %A %b %B %c %d %H %I %j %m %M %p %s %U "
-                    L"%w %W %x %X %y %Y %Z %%";
-  const wchar_t* date = L"%A, the second of %B";
-  const wchar_t* date_ex = L"%Ex";
+  const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
 
   // iter_type 
   // get_weekday(iter_type, iter_type, ios_base&, 
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc
index 1ca267440e7e..1bf989712143 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc
@@ -30,7 +30,7 @@ void test02()
   typedef time_base::dateorder dateorder;
   typedef istreambuf_iterator<wchar_t> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
@@ -42,12 +42,6 @@ void test02()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); 
-  const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); 
-  const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); 
-  const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); 
-
   const wstring empty;
 
   // create an ostream-derived object, cache the time_get facet
@@ -60,7 +54,7 @@ void test02()
   ios_base::iostate errorstate = good;
 
   // create "C" time objects
-  const tm time_bday = { 0, 0, 12, 4, 3, 71 };
+  const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
 
   // inspection of named locales, de_DE
   iss.imbue(loc_de);
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/3.cc
index eab0343be37c..83b8579f2701 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/3.cc
@@ -27,19 +27,18 @@
 void test03()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // Check time_get works with other iterators besides streambuf
   // input iterators.
   typedef wstring::const_iterator iter_type;
   typedef time_get<wchar_t, iter_type> time_get_type;
   const ios_base::iostate goodbit = ios_base::goodbit;
-  const ios_base::iostate eofbit = ios_base::eofbit;
   ios_base::iostate err = goodbit;
   const locale loc_c = locale::classic();
 
   // Create "C" time objects
-  const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2 };
+  const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2, 0, 0 };
   tm tm1;
 
   wistringstream iss; 
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc
index d0aea858ae74..1ae3d4ee3fcd 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc
@@ -30,7 +30,7 @@ void test01()
   typedef time_base::dateorder dateorder;
   typedef istreambuf_iterator<char> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
@@ -42,12 +42,6 @@ void test01()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); 
-  const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); 
-  const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); 
-  const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); 
-
   const string empty;
 
   // create an ostream-derived object, cache the time_get facet
@@ -61,11 +55,7 @@ void test01()
   ios_base::iostate errorstate = good;
 
   // create "C" time objects
-  const tm time_bday = { 0, 0, 12, 4, 3, 71 };
-  const char* all = "%a %A %b %B %c %d %H %I %j %m %M %p %s %U "
-                    "%w %W %x %X %y %Y %Z %%";
-  const char* date = "%A, the second of %B";
-  const char* date_ex = "%Ex";
+  const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
 
   // iter_type 
   // get_year(iter_type, iter_type, ios_base&, ios_base::iostate&, tm*) const
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/3.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/3.cc
index 1c38fcb3884e..4efb3ac6500b 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/3.cc
@@ -27,19 +27,18 @@
 void test03()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // Check time_get works with other iterators besides streambuf
   // input iterators.
   typedef string::const_iterator iter_type;
   typedef time_get<char, iter_type> time_get_type;
   const ios_base::iostate goodbit = ios_base::goodbit;
-  const ios_base::iostate eofbit = ios_base::eofbit;
   ios_base::iostate err = goodbit;
   const locale loc_c = locale::classic();
 
   // Create "C" time objects
-  const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2 };
+  const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2, 0, 0 };
   tm tm1;
 
   istringstream iss; 
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc
index f81589572729..5aa77c9519fb 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc
@@ -30,7 +30,7 @@ void test01()
   typedef time_base::dateorder dateorder;
   typedef istreambuf_iterator<wchar_t> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
@@ -42,12 +42,6 @@ void test01()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); 
-  const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); 
-  const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); 
-  const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); 
-
   const wstring empty;
 
   // create an ostream-derived object, cache the time_get facet
@@ -61,11 +55,7 @@ void test01()
   ios_base::iostate errorstate = good;
 
    // create "C" time objects
-  const tm time_bday = { 0, 0, 12, 4, 3, 71 };
-  const wchar_t* all = L"%a %A %b %B %c %d %H %I %j %m %M %p %s %U "
-                    L"%w %W %x %X %y %Y %Z %%";
-  const wchar_t* date = L"%A, the second of %B";
-  const wchar_t* date_ex = L"%Ex";
+  const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
 
   // iter_type 
   // get_year(iter_type, iter_type, ios_base&, ios_base::iostate&, tm*) const
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/3.cc
index 0f61392df09f..8377b463f2d5 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/3.cc
@@ -27,19 +27,18 @@
 void test03()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // Check time_get works with other iterators besides streambuf
   // input iterators.
   typedef wstring::const_iterator iter_type;
   typedef time_get<wchar_t, iter_type> time_get_type;
   const ios_base::iostate goodbit = ios_base::goodbit;
-  const ios_base::iostate eofbit = ios_base::eofbit;
   ios_base::iostate err = goodbit;
   const locale loc_c = locale::classic();
 
   // Create "C" time objects
-  const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2 };
+  const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2, 0, 0 };
   tm tm1;
 
   istringstream iss; 
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/1.cc b/libstdc++-v3/testsuite/22_locale/time_put/1.cc
index a1ce9ac60fa9..0606521abe58 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/1.cc
@@ -29,7 +29,7 @@ void test01()
   typedef std::time_put<char> test_type;
   typedef std::locale::facet base_type;
   const test_type& obj = std::use_facet<test_type>(std::locale()); 
-  const base_type* base = &obj;
+  const base_type* base __attribute__((unused)) = &obj;
   
   // Check for required typedefs
   typedef test_type::char_type char_type;
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/1.cc
index b547034f7a08..471806cea5fb 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/1.cc
@@ -29,14 +29,10 @@ void test01()
   using namespace std;
   typedef ostreambuf_iterator<char> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // create "C" time objects
-  tm time1 = { 0, 0, 12, 4, 3, 71 };
-  const char* all = "%a %A %b %B %c %d %H %I %j %m %M %p %s %U "
-    "%w %W %x %X %y %Y %Z %%";
-  const char* date = "%A, the second of %B";
-  const char* date_ex = "%Ex";
+  tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
@@ -48,12 +44,6 @@ void test01()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); 
-  const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); 
-  const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); 
-  const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); 
-
   // create an ostream-derived object, cache the time_put facet
   const string empty;
   ostringstream oss;
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/10.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/10.cc
index 82d00538ed82..c637b829d61c 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/10.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/10.cc
@@ -27,7 +27,7 @@
 void test10()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // Check time_put works with other iterators besides streambuf
   // output iterators. (As long as output_iterator requirements are met.)
@@ -41,7 +41,6 @@ void test10()
   const string x(50, 'x'); // have to have allocated string!
   string res;
   const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2 };
-  const char* date = "%X, %A, the second of %B, %Y";
 
   ostringstream oss; 
   oss.imbue(locale(loc_c, new time_put_type));
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/2.cc
index eb844f162091..c09c11ec6080 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/2.cc
@@ -29,14 +29,10 @@ void test02()
   using namespace std;
   typedef ostreambuf_iterator<char> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // create "C" time objects
-  tm time1 = { 0, 0, 12, 4, 3, 71 };
-  const char* all = "%a %A %b %B %c %d %H %I %j %m %M %p %s %U "
-    "%w %W %x %X %y %Y %Z %%";
-  const char* date = "%A, the second of %B";
-  const char* date_ex = "%Ex";
+  tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
@@ -48,12 +44,6 @@ void test02()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); 
-  const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); 
-  const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); 
-  const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); 
-
   // create an ostream-derived object, cache the time_put facet
   const string empty;
   ostringstream oss;
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/3.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/3.cc
index 522a899ef38e..126337425052 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/3.cc
@@ -29,14 +29,10 @@ void test03()
   using namespace std;
   typedef ostreambuf_iterator<char> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // create "C" time objects
-  tm time1 = { 0, 0, 12, 4, 3, 71 };
-  const char* all = "%a %A %b %B %c %d %H %I %j %m %M %p %s %U "
-    "%w %W %x %X %y %Y %Z %%";
-  const char* date = "%A, the second of %B";
-  const char* date_ex = "%Ex";
+  tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
@@ -48,12 +44,6 @@ void test03()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); 
-  const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); 
-  const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); 
-  const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); 
-
   // create an ostream-derived object, cache the time_put facet
   const string empty;
   ostringstream oss;
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc
index 8c9b1e0f4921..3a99df30979e 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc
@@ -29,14 +29,10 @@ void test04()
   using namespace std;
   typedef ostreambuf_iterator<char> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // create "C" time objects
-  tm time1 = { 0, 0, 12, 4, 3, 71 };
-  const char* all = "%a %A %b %B %c %d %H %I %j %m %M %p %s %U "
-    "%w %W %x %X %y %Y %Z %%";
-  const char* date = "%A, the second of %B";
-  const char* date_ex = "%Ex";
+  tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
@@ -48,12 +44,6 @@ void test04()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); 
-  const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); 
-  const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); 
-  const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); 
-
   // create an ostream-derived object, cache the time_put facet
   const string empty;
   ostringstream oss;
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc
index 9376987050e1..64ca142fa093 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc
@@ -30,12 +30,10 @@ void test05()
   typedef ostreambuf_iterator<char> iterator_type;
   typedef char_traits<char> traits;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
    // create "C" time objects
-  tm time1 = { 0, 0, 12, 4, 3, 71 };
-  const char* all = "%a %A %b %B %c %d %H %I %j %m %M %p %s %U "
-    "%w %W %x %X %y %Y %Z %%";
+  tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
   const char* date = "%A, the second of %B";
   const char* date_ex = "%Ex";
 
@@ -49,12 +47,6 @@ void test05()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); 
-  const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); 
-  const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); 
-  const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); 
-
   // create an ostream-derived object, cache the time_put facet
   const string empty;
   ostringstream oss;
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc
index e0ea595f08d3..53baf21afd4b 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc
@@ -30,12 +30,10 @@ void test06()
   typedef ostreambuf_iterator<char> iterator_type;
   typedef char_traits<char> traits;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // create "C" time objects
-  tm time1 = { 0, 0, 12, 4, 3, 71 };
-  const char* all = "%a %A %b %B %c %d %H %I %j %m %M %p %s %U "
-    "%w %W %x %X %y %Y %Z %%";
+  tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
   const char* date = "%A, the second of %B";
   const char* date_ex = "%Ex";
 
@@ -49,12 +47,6 @@ void test06()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); 
-  const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); 
-  const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); 
-  const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); 
-
   // create an ostream-derived object, cache the time_put facet
   const string empty;
   ostringstream oss;
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc
index 1f37a24a16f9..e8aeea2e6231 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc
@@ -30,12 +30,10 @@ void test07()
   typedef ostreambuf_iterator<char> iterator_type;
   typedef char_traits<char> traits;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // create "C" time objects
-  tm time1 = { 0, 0, 12, 4, 3, 71 };
-  const char* all = "%a %A %b %B %c %d %H %I %j %m %M %p %s %U "
-    "%w %W %x %X %y %Y %Z %%";
+  tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
   const char* date = "%A, the second of %B";
   const char* date_ex = "%Ex";
 
@@ -50,12 +48,6 @@ void test07()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); 
-  const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); 
-  const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); 
-  const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); 
-
   // create an ostream-derived object, cache the time_put facet
   const string empty;
   ostringstream oss;
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc
index b047ed965472..b940f2aa0c4a 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc
@@ -30,12 +30,10 @@ void test08()
   typedef ostreambuf_iterator<char> iterator_type;
   typedef char_traits<char> traits;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // create "C" time objects
-  tm time1 = { 0, 0, 12, 4, 3, 71 };
-  const char* all = "%a %A %b %B %c %d %H %I %j %m %M %p %s %U "
-    "%w %W %x %X %y %Y %Z %%";
+  tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
   const char* date = "%A, the second of %B";
   const char* date_ex = "%Ex";
 
@@ -49,12 +47,6 @@ void test08()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<char>& time_c = use_facet<__timepunct<char> >(loc_c); 
-  const __timepunct<char>& time_de = use_facet<__timepunct<char> >(loc_de); 
-  const __timepunct<char>& time_hk = use_facet<__timepunct<char> >(loc_hk); 
-  const __timepunct<char>& time_fr = use_facet<__timepunct<char> >(loc_fr); 
-
   // create an ostream-derived object, cache the time_put facet
   const string empty;
   ostringstream oss;
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/9.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/9.cc
index 42cfb34b0535..9e43b85fc8e6 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/9.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/9.cc
@@ -27,7 +27,7 @@
 void test09()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // Check time_put works with other iterators besides streambuf
   // output iterators. (As long as output_iterator requirements are met.)
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/1.cc
index c6f36b732f03..9f1b11d76aa3 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/1.cc
@@ -29,14 +29,10 @@ void test01()
   using namespace std;
   typedef ostreambuf_iterator<wchar_t> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // create "C" time objects
-  tm time1 = { 0, 0, 12, 4, 3, 71 };
-  const wchar_t* all = L"%a %A %b %B %c %d %H %I %j %m %M %p %s %U "
-    L"%w %W %x %X %y %Y %Z %%";
-  const wchar_t* date = L"%A, the second of %B";
-  const wchar_t* date_ex = L"%Ex";
+  tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
@@ -48,12 +44,6 @@ void test01()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); 
-  const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); 
-  const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); 
-  const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); 
-
   // create an ostream-derived object, cache the time_put facet
   const wstring empty;
   wostringstream oss;
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/10.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/10.cc
index 9cd5db73a5f9..c16555f89ee2 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/10.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/10.cc
@@ -27,7 +27,7 @@
 void test10()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // Check time_put works with other iterators besides streambuf
   // output iterators. (As long as output_iterator requirements are met.)
@@ -41,7 +41,6 @@ void test10()
   const wstring x(50, 'x'); // have to have allocated wstring!
   wstring res;
   const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2 };
-  const wchar_t* date = L"%X, %A, the second of %B, %Y";
 
   wostringstream oss; 
   oss.imbue(locale(loc_c, new time_put_type));
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/2.cc
index 67ce4a344d1f..62751ffc4579 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/2.cc
@@ -29,14 +29,10 @@ void test02()
   using namespace std;
   typedef ostreambuf_iterator<wchar_t> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // create "C" time objects
-  tm time1 = { 0, 0, 12, 4, 3, 71 };
-  const wchar_t* all = L"%a %A %b %B %c %d %H %I %j %m %M %p %s %U "
-    L"%w %W %x %X %y %Y %Z %%";
-  const wchar_t* date = L"%A, the second of %B";
-  const wchar_t* date_ex = L"%Ex";
+  tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
@@ -48,12 +44,6 @@ void test02()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); 
-  const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); 
-  const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); 
-  const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); 
-
   // create an ostream-derived object, cache the time_put facet
   const wstring empty;
   wostringstream oss;
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/3.cc
index c0ecf6acef3e..06d51d96297e 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/3.cc
@@ -29,14 +29,10 @@ void test03()
   using namespace std;
   typedef ostreambuf_iterator<wchar_t> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
    // create "C" time objects
-  tm time1 = { 0, 0, 12, 4, 3, 71 };
-  const wchar_t* all = L"%a %A %b %B %c %d %H %I %j %m %M %p %s %U "
-    L"%w %W %x %X %y %Y %Z %%";
-  const wchar_t* date = L"%A, the second of %B";
-  const wchar_t* date_ex = L"%Ex";
+  tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
@@ -48,12 +44,6 @@ void test03()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); 
-  const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); 
-  const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); 
-  const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); 
-
   // create an ostream-derived object, cache the time_put facet
   const wstring empty;
   wostringstream oss;
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc
index 6206ff57734c..4a8b27b5adfd 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc
@@ -29,14 +29,10 @@ void test04()
   using namespace std;
   typedef ostreambuf_iterator<wchar_t> iterator_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   
   // create "C" time objects
-  tm time1 = { 0, 0, 12, 4, 3, 71 };
-  const wchar_t* all = L"%a %A %b %B %c %d %H %I %j %m %M %p %s %U "
-    L"%w %W %x %X %y %Y %Z %%";
-  const wchar_t* date = L"%A, the second of %B";
-  const wchar_t* date_ex = L"%Ex";
+  tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
@@ -48,12 +44,6 @@ void test04()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); 
-  const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); 
-  const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); 
-  const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); 
-
   // create an ostream-derived object, cache the time_put facet
   const wstring empty;
   wostringstream oss;
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc
index b017d420549f..0a65f3a4d432 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc
@@ -30,12 +30,10 @@ void test05()
   typedef ostreambuf_iterator<wchar_t> iterator_type;
   typedef char_traits<wchar_t> traits;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // create "C" time objects
-  tm time1 = { 0, 0, 12, 4, 3, 71 };
-  const wchar_t* all = L"%a %A %b %B %c %d %H %I %j %m %M %p %s %U "
-    L"%w %W %x %X %y %Y %Z %%";
+  tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
   const wchar_t* date = L"%A, the second of %B";
   const wchar_t* date_ex = L"%Ex";
 
@@ -49,12 +47,6 @@ void test05()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); 
-  const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); 
-  const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); 
-  const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); 
-
   // create an ostream-derived object, cache the time_put facet
   const wstring empty;
   wostringstream oss;
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/6.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/6.cc
index 8bb5b237d66b..f4755bd19626 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/6.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/6.cc
@@ -30,12 +30,10 @@ void test06()
   typedef ostreambuf_iterator<wchar_t> iterator_type;
   typedef char_traits<wchar_t> traits;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // create "C" time objects
-  tm time1 = { 0, 0, 12, 4, 3, 71 };
-  const wchar_t* all = L"%a %A %b %B %c %d %H %I %j %m %M %p %s %U "
-    L"%w %W %x %X %y %Y %Z %%";
+  tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
   const wchar_t* date = L"%A, the second of %B";
   const wchar_t* date_ex = L"%Ex";
 
@@ -49,12 +47,6 @@ void test06()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); 
-  const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); 
-  const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); 
-  const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); 
-
   // create an ostream-derived object, cache the time_put facet
   const wstring empty;
   wostringstream oss;
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/7.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/7.cc
index 354285e35cab..99faf619886e 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/7.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/7.cc
@@ -30,12 +30,10 @@ void test07()
   typedef ostreambuf_iterator<wchar_t> iterator_type;
   typedef char_traits<wchar_t> traits;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // create "C" time objects
-  tm time1 = { 0, 0, 12, 4, 3, 71 };
-  const wchar_t* all = L"%a %A %b %B %c %d %H %I %j %m %M %p %s %U "
-    L"%w %W %x %X %y %Y %Z %%";
+  tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
   const wchar_t* date = L"%A, the second of %B";
   const wchar_t* date_ex = L"%Ex";
 
@@ -49,12 +47,6 @@ void test07()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); 
-  const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); 
-  const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); 
-  const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); 
-
   // create an ostream-derived object, cache the time_put facet
   const wstring empty;
   wostringstream oss;
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/8.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/8.cc
index 6367a8edd273..0a7ff3c4372b 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/8.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/8.cc
@@ -30,12 +30,10 @@ void test08()
   typedef ostreambuf_iterator<wchar_t> iterator_type;
   typedef char_traits<wchar_t> traits;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // create "C" time objects
-  tm time1 = { 0, 0, 12, 4, 3, 71 };
-  const wchar_t* all = L"%a %A %b %B %c %d %H %I %j %m %M %p %s %U "
-    L"%w %W %x %X %y %Y %Z %%";
+  tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 };
   const wchar_t* date = L"%A, the second of %B";
   const wchar_t* date_ex = L"%Ex";
 
@@ -49,12 +47,6 @@ void test08()
   VERIFY( loc_hk != loc_de );
   VERIFY( loc_de != loc_fr );
 
-  // cache the __timepunct facets, for quicker gdb inspection
-  const __timepunct<wchar_t>& time_c = use_facet<__timepunct<wchar_t> >(loc_c); 
-  const __timepunct<wchar_t>& time_de = use_facet<__timepunct<wchar_t> >(loc_de); 
-  const __timepunct<wchar_t>& time_hk = use_facet<__timepunct<wchar_t> >(loc_hk); 
-  const __timepunct<wchar_t>& time_fr = use_facet<__timepunct<wchar_t> >(loc_fr); 
-
   // create an ostream-derived object, cache the time_put facet
   const wstring empty;
   wostringstream oss;
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/9.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/9.cc
index 072e4c38e02c..ca6676acf63c 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/9.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/9.cc
@@ -27,7 +27,7 @@
 void test09()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // Check time_put works with other iterators besides streambuf
   // output iterators. (As long as output_iterator requirements are met.)
diff --git a/libstdc++-v3/testsuite/23_containers/bitset/cons/1.cc b/libstdc++-v3/testsuite/23_containers/bitset/cons/1.cc
index 5d5064de4d6e..9c802d322ab1 100644
--- a/libstdc++-v3/testsuite/23_containers/bitset/cons/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/bitset/cons/1.cc
@@ -27,12 +27,12 @@
 
 bool test01(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // bitset()
   const size_t n1 = 5;
   std::bitset<n1> bit01;
-  for (int i = 0; i < n1; ++i)
+  for (size_t i = 0; i < n1; ++i)
     VERIFY( !bit01.test(i) );
 
   // bitset(unsigned long)
diff --git a/libstdc++-v3/testsuite/23_containers/bitset/cons/6282.cc b/libstdc++-v3/testsuite/23_containers/bitset/cons/6282.cc
index 92f9695ab47e..929ed4bda2cc 100644
--- a/libstdc++-v3/testsuite/23_containers/bitset/cons/6282.cc
+++ b/libstdc++-v3/testsuite/23_containers/bitset/cons/6282.cc
@@ -30,7 +30,7 @@
 bool test02(void)
 {
   using std::char_traits;  using std::allocator;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::bitset<0>  z1;
   VERIFY( z1.any() == false );
diff --git a/libstdc++-v3/testsuite/23_containers/bitset/operations/1.cc b/libstdc++-v3/testsuite/23_containers/bitset/operations/1.cc
index 8d21a9f5521f..ea3da885eb66 100644
--- a/libstdc++-v3/testsuite/23_containers/bitset/operations/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/bitset/operations/1.cc
@@ -58,7 +58,7 @@ shift_arrays(size_t shift_step, size_t size) {
 template <size_t size>
   bool
   do_test() {
-    bool test = true;
+    bool test __attribute__((unused)) = true;
 
     std::bitset<size> shifted;
     std::bitset<size> correct;
@@ -89,7 +89,7 @@ template <size_t size>
 
 bool
 test01() {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   VERIFY( do_test<32>() );
   VERIFY( do_test<48>() );
diff --git a/libstdc++-v3/testsuite/23_containers/bitset/operations/2.cc b/libstdc++-v3/testsuite/23_containers/bitset/operations/2.cc
index fd5c1929b13a..14910637482b 100644
--- a/libstdc++-v3/testsuite/23_containers/bitset/operations/2.cc
+++ b/libstdc++-v3/testsuite/23_containers/bitset/operations/2.cc
@@ -26,7 +26,7 @@
 bool
 test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::bitset<66>  b;
   b <<= 400;
diff --git a/libstdc++-v3/testsuite/23_containers/bitset/test/1.cc b/libstdc++-v3/testsuite/23_containers/bitset/test/1.cc
index 40f4f42d8ea6..6e945d69768e 100644
--- a/libstdc++-v3/testsuite/23_containers/bitset/test/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/bitset/test/1.cc
@@ -28,13 +28,13 @@
 void 
 test01(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const size_t n1 = 5;
 
   // the other 22 member functions should be in here too...
   try {
     std::bitset<n1> five_bits;
-    bool unused = five_bits.test(n1);   // should throw
+    bool unused __attribute__((unused)) = five_bits.test(n1);   // should throw
     VERIFY( false );
   }
   catch(std::out_of_range& fail) {
diff --git a/libstdc++-v3/testsuite/23_containers/bitset/to_ulong/1.cc b/libstdc++-v3/testsuite/23_containers/bitset/to_ulong/1.cc
index 40e54efbde60..3536b9dd7d34 100644
--- a/libstdc++-v3/testsuite/23_containers/bitset/to_ulong/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/bitset/to_ulong/1.cc
@@ -27,7 +27,7 @@
 
 void test03()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::bitset<5>      b;
   std::stringstream   ss("101");
   ss.exceptions(std::ios_base::eofbit);
diff --git a/libstdc++-v3/testsuite/23_containers/deque/cons/1.cc b/libstdc++-v3/testsuite/23_containers/deque/cons/1.cc
index 92e94057a98b..566461b7d101 100644
--- a/libstdc++-v3/testsuite/23_containers/deque/cons/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/deque/cons/1.cc
@@ -28,7 +28,7 @@
 
 typedef std::deque<__gnu_test::counter>   gdeque;
 
-bool test = true;
+bool test __attribute__((unused)) = true;
 
 // see http://gcc.gnu.org/ml/libstdc++/2001-11/msg00139.html
 void
diff --git a/libstdc++-v3/testsuite/23_containers/deque/cons/2.cc b/libstdc++-v3/testsuite/23_containers/deque/cons/2.cc
index bc5a180fc19a..e0e7108d20b5 100644
--- a/libstdc++-v3/testsuite/23_containers/deque/cons/2.cc
+++ b/libstdc++-v3/testsuite/23_containers/deque/cons/2.cc
@@ -36,7 +36,7 @@ using __gnu_test::destructor;
 
 typedef std::deque<counter>   gdeque;
 
-bool test = true;
+bool test __attribute__((unused)) = true;
 
 // 23.2.1     required types
 //
@@ -169,10 +169,10 @@ copyConstructorCheck()
   typedef copy_tracker  T;
   typedef std::deque<T>     X;
 
-  const int copyBaseSize = 17;  // arbitrary
+  const std::size_t copyBaseSize = 17;  // arbitrary
 
   X a;
-  for (int i = 0; i < copyBaseSize; ++i)
+  for (std::size_t i = 0; i < copyBaseSize; ++i)
     a.push_back(i);
   copy_tracker::reset();
 
@@ -180,7 +180,7 @@ copyConstructorCheck()
   VERIFY(!a.empty());
   VERIFY(copyBaseSize == a.size());
   VERIFY(a.begin() != a.end());
-  VERIFY(copyBaseSize == std::distance(a.begin(), a.end()));
+  VERIFY( copyBaseSize == static_cast<std::size_t>(std::distance(a.begin(), a.end())) );
 
   // run test
   X u = a;
@@ -237,8 +237,8 @@ fillConstructorCheck2()
   typedef copy_tracker  T;
   typedef std::deque<T>   X;
 
-  const int f = 23;  
-  const int l = 111;
+  const std::size_t f = 23;  
+  const std::size_t l = 111;
 
   copy_tracker::reset();
 
@@ -455,7 +455,7 @@ test_default_ctor_exception_safety()
   try
   {
     X a(7);
-    VERIFY(("no exception thrown", false));
+    VERIFY( false );
   }
   catch (...)
   {
@@ -486,7 +486,7 @@ test_copy_ctor_exception_safety()
     try
     {
       X u(a);
-      VERIFY(("no exception thrown", false));
+      VERIFY(false);
     }
     catch (...)
     {
diff --git a/libstdc++-v3/testsuite/23_containers/deque/operators/1.cc b/libstdc++-v3/testsuite/23_containers/deque/operators/1.cc
index 5463b47f1cb1..4b7aac9ab601 100644
--- a/libstdc++-v3/testsuite/23_containers/deque/operators/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/deque/operators/1.cc
@@ -26,7 +26,7 @@
 // libstdc++/6503
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::deque<int> d(2);       
   typedef std::deque<int>::iterator iter;         
@@ -59,7 +59,7 @@ void test01()
 // libstdc++/7186
 void test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::deque<int> d(2);       
   typedef std::deque<int>::iterator iter;         
diff --git a/libstdc++-v3/testsuite/23_containers/list/capacity/1.cc b/libstdc++-v3/testsuite/23_containers/list/capacity/1.cc
index e675760cb933..609b92c82522 100644
--- a/libstdc++-v3/testsuite/23_containers/list/capacity/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/capacity/1.cc
@@ -21,7 +21,7 @@
 #include <list>
 #include <testsuite_hooks.h>
 
-bool test = true;
+bool test __attribute__((unused)) = true;
 
 // This test verifies the following.
 //
@@ -60,7 +60,7 @@ test01()
 }
 
 int
-main(int argc, char* argv[])
+main()
 {
   test01();
   return 0;
diff --git a/libstdc++-v3/testsuite/23_containers/list/cons/1.cc b/libstdc++-v3/testsuite/23_containers/list/cons/1.cc
index dfa8ce2bfa05..1d2f5662f02d 100644
--- a/libstdc++-v3/testsuite/23_containers/list/cons/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/cons/1.cc
@@ -21,7 +21,7 @@
 #include <list>
 #include <testsuite_hooks.h>
 
-bool test = true;
+bool test __attribute__((unused)) = true;
 
 // A nontrivial type.
 template<typename T>
diff --git a/libstdc++-v3/testsuite/23_containers/list/cons/2.cc b/libstdc++-v3/testsuite/23_containers/list/cons/2.cc
index 50dc68e38d37..090c7f3d66d5 100644
--- a/libstdc++-v3/testsuite/23_containers/list/cons/2.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/cons/2.cc
@@ -21,7 +21,7 @@
 #include <list>
 #include <testsuite_hooks.h>
 
-bool test = true;
+bool test __attribute__((unused)) = true;
 
 // A nontrivial type.
 template<typename T>
@@ -48,9 +48,9 @@ struct C {
 void
 test02()
 {
-  const int LIST_SIZE = 5;
+  const std::size_t LIST_SIZE = 5;
   const int INIT_VALUE = 7;
-  int count;
+  std::size_t count;
   std::list<int>::const_iterator i;
 
   // nontrivial value_type
diff --git a/libstdc++-v3/testsuite/23_containers/list/cons/3.cc b/libstdc++-v3/testsuite/23_containers/list/cons/3.cc
index 8baa8627c58f..5115dc0abedd 100644
--- a/libstdc++-v3/testsuite/23_containers/list/cons/3.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/cons/3.cc
@@ -21,7 +21,7 @@
 #include <list>
 #include <testsuite_hooks.h>
 
-bool test = true;
+bool test __attribute__((unused)) = true;
 
 // A nontrivial type.
 template<typename T>
@@ -41,9 +41,9 @@ struct C {
 void
 test02D()
 {
-  const int LIST_SIZE = 5;
+  const std::size_t LIST_SIZE = 5;
   const int INIT_VALUE = 7;
-  int count = 0;
+  std::size_t count = 0;
   std::list<C> list0204(LIST_SIZE, INIT_VALUE);
   std::list<C>::iterator i = list0204.begin();
   for (; i != list0204.end(); ++i, ++count)
diff --git a/libstdc++-v3/testsuite/23_containers/list/cons/4.cc b/libstdc++-v3/testsuite/23_containers/list/cons/4.cc
index 30395671cbb4..68b8d439cf8a 100644
--- a/libstdc++-v3/testsuite/23_containers/list/cons/4.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/cons/4.cc
@@ -21,7 +21,7 @@
 #include <list>
 #include <testsuite_hooks.h>
 
-bool test = true;
+bool test __attribute__((unused)) = true;
 
 // Range constructor
 //
@@ -35,8 +35,8 @@ void
 test03()
 {
   const int A[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17};
-  const int N = sizeof(A) / sizeof(int);
-  int count;
+  const std::size_t N = sizeof(A) / sizeof(int);
+  std::size_t count;
   std::list<int>::const_iterator i;
 
   // construct from a dissimilar range
diff --git a/libstdc++-v3/testsuite/23_containers/list/cons/5.cc b/libstdc++-v3/testsuite/23_containers/list/cons/5.cc
index 64f17118a479..7bc925a64afc 100644
--- a/libstdc++-v3/testsuite/23_containers/list/cons/5.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/cons/5.cc
@@ -21,7 +21,7 @@
 #include <list>
 #include <testsuite_hooks.h>
 
-bool test = true;
+bool test __attribute__((unused)) = true;
 
 // Copy constructor
 //
@@ -35,7 +35,7 @@ void
 test04()
 {
   const int A[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17};
-  const int N = sizeof(A) / sizeof(int);
+  const std::size_t N = sizeof(A) / sizeof(int);
   int count;
   std::list<int>::reverse_iterator i;
   std::list<int> list0401(A, A + N);
diff --git a/libstdc++-v3/testsuite/23_containers/list/cons/6.cc b/libstdc++-v3/testsuite/23_containers/list/cons/6.cc
index 6742c75e1b46..9cdec8b40f73 100644
--- a/libstdc++-v3/testsuite/23_containers/list/cons/6.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/cons/6.cc
@@ -21,7 +21,7 @@
 #include <list>
 #include <testsuite_hooks.h>
 
-bool test = true;
+bool test __attribute__((unused)) = true;
 
 // Range assign
 //
@@ -36,9 +36,9 @@ test05()
 {
   const int A[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17};
   const int B[] = {101, 102, 103, 104, 105};
-  const int N = sizeof(A) / sizeof(int);
-  const int M = sizeof(B) / sizeof(int);
-  int count;
+  const std::size_t N = sizeof(A) / sizeof(int);
+  const std::size_t M = sizeof(B) / sizeof(int);
+  std::size_t count;
   std::list<int>::const_iterator i;
 
   std::list<int> list0501;
diff --git a/libstdc++-v3/testsuite/23_containers/list/cons/7.cc b/libstdc++-v3/testsuite/23_containers/list/cons/7.cc
index f600fbbcbdca..650c82b133fd 100644
--- a/libstdc++-v3/testsuite/23_containers/list/cons/7.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/cons/7.cc
@@ -21,7 +21,7 @@
 #include <list>
 #include <testsuite_hooks.h>
 
-bool test = true;
+bool test __attribute__((unused)) = true;
 
 // Fill assign
 //
@@ -34,11 +34,11 @@ bool test = true;
 void
 test06()
 {
-  const int BIG_LIST_SIZE = 11;
+  const std::size_t BIG_LIST_SIZE = 11;
   const int BIG_INIT_VALUE = 7;
-  const int SMALL_LIST_SIZE = 5;
+  const std::size_t SMALL_LIST_SIZE = 5;
   const int SMALL_INIT_VALUE = 17;
-  int count;
+  std::size_t count;
   std::list<int>::const_iterator i;
 
   std::list<int> list0601;
diff --git a/libstdc++-v3/testsuite/23_containers/list/cons/8.cc b/libstdc++-v3/testsuite/23_containers/list/cons/8.cc
index 17eb0c48ade8..66b59a00d03c 100644
--- a/libstdc++-v3/testsuite/23_containers/list/cons/8.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/cons/8.cc
@@ -21,7 +21,7 @@
 #include <list>
 #include <testsuite_hooks.h>
 
-bool test = true;
+bool test __attribute__((unused)) = true;
 
 
 // A nontrivial type.
@@ -42,9 +42,9 @@ struct C {
 void
 test06D()
 {
-  const int LIST_SIZE = 5;
+  const std::size_t LIST_SIZE = 5;
   const int INIT_VALUE = 7;
-  int count = 0;
+  std::size_t count = 0;
   std::list<C> list0604;
   VERIFY(list0604.size() == 0);
   
diff --git a/libstdc++-v3/testsuite/23_containers/list/cons/9.cc b/libstdc++-v3/testsuite/23_containers/list/cons/9.cc
index 0fa066aabdfc..1f26213d8aed 100644
--- a/libstdc++-v3/testsuite/23_containers/list/cons/9.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/cons/9.cc
@@ -21,7 +21,7 @@
 #include <list>
 #include <testsuite_hooks.h>
 
-bool test = true;
+bool test __attribute__((unused)) = true;
 
 // Assignment operator
 //
@@ -36,8 +36,8 @@ void
 test07()
 {
   const int A[] = {701, 702, 703, 704, 705};
-  const int N = sizeof(A) / sizeof(int);
-  int count;
+  const std::size_t N = sizeof(A) / sizeof(int);
+  std::size_t count;
   std::list<int>::iterator i;
 
   std::list<int> list0701(A, A + N);
diff --git a/libstdc++-v3/testsuite/23_containers/list/modifiers/1.cc b/libstdc++-v3/testsuite/23_containers/list/modifiers/1.cc
index c5bb6d7dad0d..2e75dcabb31e 100644
--- a/libstdc++-v3/testsuite/23_containers/list/modifiers/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/modifiers/1.cc
@@ -23,7 +23,7 @@
 
 typedef __gnu_test::copy_tracker  T;
 
-bool test = true;
+bool test __attribute__((unused)) = true;
 
 // range and fill insert/erase + clear
 // missing: o  fill insert disguised as a range insert in all its variants
diff --git a/libstdc++-v3/testsuite/23_containers/list/modifiers/2.cc b/libstdc++-v3/testsuite/23_containers/list/modifiers/2.cc
index 24eff6707507..66c5c12ccc6e 100644
--- a/libstdc++-v3/testsuite/23_containers/list/modifiers/2.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/modifiers/2.cc
@@ -23,7 +23,7 @@
 
 typedef __gnu_test::copy_tracker  T;
 
-bool test = true;
+bool test __attribute__((unused)) = true;
 
 // general single insert/erase + swap
 void
diff --git a/libstdc++-v3/testsuite/23_containers/list/modifiers/3.cc b/libstdc++-v3/testsuite/23_containers/list/modifiers/3.cc
index ee4a93c6f0aa..dfbc46cb4063 100644
--- a/libstdc++-v3/testsuite/23_containers/list/modifiers/3.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/modifiers/3.cc
@@ -23,7 +23,7 @@
 
 typedef __gnu_test::copy_tracker  T;
 
-bool test = true;
+bool test __attribute__((unused)) = true;
 
 
 // This test verifies the following.
@@ -79,7 +79,7 @@ test01()
   try
   {
     list0101.push_back(T(4, true));
-    VERIFY(("no exception thrown", false));
+    VERIFY(false);
   }
   catch (...)
   {
diff --git a/libstdc++-v3/testsuite/23_containers/list/operators/1.cc b/libstdc++-v3/testsuite/23_containers/list/operators/1.cc
index a695b28f8bcc..663ff1c81c90 100644
--- a/libstdc++-v3/testsuite/23_containers/list/operators/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/operators/1.cc
@@ -21,7 +21,7 @@
 #include <list>
 #include <testsuite_hooks.h>
 
-bool test = true;
+bool test __attribute__((unused)) = true;
 
 // splice(p, x) + remove + reverse
 void
@@ -30,8 +30,8 @@ test01()
   const int K = 417;
   const int A[] = {1, 2, 3, 4, 5};
   const int B[] = {K, K, K, K, K};
-  const int N = sizeof(A) / sizeof(int);
-  const int M = sizeof(B) / sizeof(int);
+  const std::size_t N = sizeof(A) / sizeof(int);
+  const std::size_t M = sizeof(B) / sizeof(int);
 
   std::list<int> list0101(A, A + N);
   std::list<int> list0102(B, B + M);
@@ -66,7 +66,7 @@ test01()
   VERIFY(p == list0101.end());
 }
 
-main(int argc, char* argv[])
+int main(void)
 {
   test01();
   return 0;
diff --git a/libstdc++-v3/testsuite/23_containers/list/operators/2.cc b/libstdc++-v3/testsuite/23_containers/list/operators/2.cc
index 09dc0f1c74f5..726c4bfcab4c 100644
--- a/libstdc++-v3/testsuite/23_containers/list/operators/2.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/operators/2.cc
@@ -21,7 +21,7 @@
 #include <list>
 #include <testsuite_hooks.h>
 
-bool test = true;
+bool test __attribute__((unused)) = true;
 
 // splice(p, x, i) + remove_if + operator==
 void
@@ -52,7 +52,7 @@ test02()
   VERIFY(list0201 == list0204);
 }
 
-main(int argc, char* argv[])
+int main()
 {
   test02();
   return 0;
diff --git a/libstdc++-v3/testsuite/23_containers/list/operators/3.cc b/libstdc++-v3/testsuite/23_containers/list/operators/3.cc
index c12286c62441..8b9c537a0643 100644
--- a/libstdc++-v3/testsuite/23_containers/list/operators/3.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/operators/3.cc
@@ -21,7 +21,7 @@
 #include <list>
 #include <testsuite_hooks.h>
 
-bool test = true;
+bool test __attribute__((unused)) = true;
 
 // splice(p, x, f, l) + sort + merge + unique
 void
@@ -66,7 +66,7 @@ test03()
   VERIFY(list0301 == list0304);
 }
 
-main(int argc, char* argv[])
+int main(void)
 {
   test03();
   return 0;
diff --git a/libstdc++-v3/testsuite/23_containers/list/operators/4.cc b/libstdc++-v3/testsuite/23_containers/list/operators/4.cc
index 6a0b36e38797..5de95b9eb5e8 100644
--- a/libstdc++-v3/testsuite/23_containers/list/operators/4.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/operators/4.cc
@@ -21,7 +21,7 @@
 #include <list>
 #include <testsuite_hooks.h>
 
-bool test = true;
+bool test __attribute__((unused)) = true;
 
 // A comparison predicate to order by rightmost digit.  Tracks call counts for
 // performance checks.
@@ -86,7 +86,7 @@ test04()
   VERIFY(eq.count() == (N + M - 1));
 }
 
-main(int argc, char* argv[])
+int main()
 {
   test04();
   return 0;
diff --git a/libstdc++-v3/testsuite/23_containers/map/insert/1.cc b/libstdc++-v3/testsuite/23_containers/map/insert/1.cc
index 67c838f993ae..404f3c35cabf 100644
--- a/libstdc++-v3/testsuite/23_containers/map/insert/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/map/insert/1.cc
@@ -29,7 +29,7 @@
 // http://gcc.gnu.org/ml/gcc-patches/2001-08/msg01375.html
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::map<int, int>   Map;
   Map             M;
   Map::iterator   hint;
diff --git a/libstdc++-v3/testsuite/23_containers/map/operators/1_neg.cc b/libstdc++-v3/testsuite/23_containers/map/operators/1_neg.cc
index 75b604c80c24..f105f9b91a57 100644
--- a/libstdc++-v3/testsuite/23_containers/map/operators/1_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/map/operators/1_neg.cc
@@ -28,7 +28,7 @@
 // libstdc++/86: map & set iterator comparisons are not type-safe
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::map<unsigned int, int> mapByIndex;
   std::map<std::string, unsigned> mapByName;
   
diff --git a/libstdc++-v3/testsuite/23_containers/set/operators/1_neg.cc b/libstdc++-v3/testsuite/23_containers/set/operators/1_neg.cc
index c3c23741e2e6..0c620a18b9d6 100644
--- a/libstdc++-v3/testsuite/23_containers/set/operators/1_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/set/operators/1_neg.cc
@@ -28,7 +28,7 @@
 // libstdc++/86: map & set iterator comparisons are not type-safe
 int main(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::set<unsigned int> setByIndex;
   std::set<std::string> setByName;
diff --git a/libstdc++-v3/testsuite/23_containers/vector/bool/6886.cc b/libstdc++-v3/testsuite/23_containers/vector/bool/6886.cc
index acc6e45f5453..f56c21dd5447 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/bool/6886.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/bool/6886.cc
@@ -26,7 +26,7 @@
 // libstdc++/6886
 void test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::vector<bool>  bvec;
   int  i, num = 0;
   bvec v;
diff --git a/libstdc++-v3/testsuite/23_containers/vector/capacity/1.cc b/libstdc++-v3/testsuite/23_containers/vector/capacity/1.cc
index af0eb93c9df1..797a2fc0f8a4 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/capacity/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/capacity/1.cc
@@ -34,7 +34,7 @@ struct B { };
 void test01()
 {
   // non POD types
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::vector< A<B> > vec01;
   typedef std::vector< A<B> >::size_type size_type;
 
diff --git a/libstdc++-v3/testsuite/23_containers/vector/capacity/2.cc b/libstdc++-v3/testsuite/23_containers/vector/capacity/2.cc
index 49cfbfa30bd6..293ca5945bfb 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/capacity/2.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/capacity/2.cc
@@ -37,7 +37,7 @@ using __gnu_test::destructor;
 void
 test_reserve()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef copy_tracker T;
   typedef std::vector<T, tracker_alloc<T> > X;
 
@@ -67,14 +67,14 @@ test_reserve()
 void
 test_reserve_exception_guarantee()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef copy_tracker T;
   typedef std::vector<T, tracker_alloc<T> > X;
 
   allocation_tracker::resetCounts();
   {
     X a(7);
-    const X::size_type old_size     = a.size();
+    const X::size_type old_size __attribute__((unused)) = a.size();
     const X::size_type old_capacity = a.capacity();
     const X::size_type new_capacity = old_capacity + 10;
     T::reset();
@@ -83,7 +83,7 @@ test_reserve_exception_guarantee()
     try
     {
       a.reserve(new_capacity);
-      VERIFY(("no exception thrown", false));
+      VERIFY(false);
     }
     catch (...)
     {
diff --git a/libstdc++-v3/testsuite/23_containers/vector/capacity/8230.cc b/libstdc++-v3/testsuite/23_containers/vector/capacity/8230.cc
index df7e4b20b440..fe706a4b56aa 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/capacity/8230.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/capacity/8230.cc
@@ -29,7 +29,7 @@
 // libstdc++/8230
 void test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   {
     std::vector<int>  array;
     const std::size_t size = array.max_size();
diff --git a/libstdc++-v3/testsuite/23_containers/vector/cons/3.cc b/libstdc++-v3/testsuite/23_containers/vector/cons/3.cc
index 53afe8f7fdb3..5c41e654833c 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/cons/3.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/cons/3.cc
@@ -29,7 +29,7 @@
 void
 test03()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const int A[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17};
   const int B[] = {7, 7, 7, 7, 7};
   const int N = sizeof(A) / sizeof(int);
diff --git a/libstdc++-v3/testsuite/23_containers/vector/cons/4.cc b/libstdc++-v3/testsuite/23_containers/vector/cons/4.cc
index af7556517f60..12564b9ef535 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/cons/4.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/cons/4.cc
@@ -40,7 +40,7 @@ void
 test_default_ctor_exception_gurantee()
 {
   // setup
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef copy_tracker T;
   typedef std::vector<T, tracker_alloc<T> > X;
 
@@ -52,15 +52,14 @@ test_default_ctor_exception_gurantee()
   try
   {
     X a(7);
-    VERIFY(("no exception thrown", false));
+    VERIFY(false);
   }
   catch (...)
   {
   }
 
   // assert postconditions
-  VERIFY(("memory leak detected:",
-          allocation_tracker::allocationTotal() == allocation_tracker::deallocationTotal()));
+  VERIFY( allocation_tracker::allocationTotal() == allocation_tracker::deallocationTotal() );
 
   // teardown
 }
@@ -73,7 +72,7 @@ void
 test_copy_ctor_exception_gurantee()
 {
   // setup
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef copy_tracker T;
   typedef std::vector<T, tracker_alloc<T> > X;
 
@@ -87,7 +86,7 @@ test_copy_ctor_exception_gurantee()
     try
     {
       X u(a);
-      VERIFY(("no exception thrown", false));
+      VERIFY(false);
     }
     catch (...)
     {
@@ -112,7 +111,7 @@ void
 test_assignment_operator_1()
 {
   // setup
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef copy_tracker T;
   typedef std::vector<T, tracker_alloc<T> > X;
 
@@ -140,7 +139,7 @@ void
 test_assignment_operator_2()
 {
   // setup
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef copy_tracker T;
   typedef std::vector<T, tracker_alloc<T> > X;
 
@@ -170,7 +169,7 @@ void
 test_assignment_operator_3()
 {
   // setup
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef copy_tracker T;
   typedef std::vector<T, tracker_alloc<T> > X;
 
@@ -200,7 +199,7 @@ void
 test_assignment_operator_3_exception_guarantee()
 {
   // setup
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef copy_tracker T;
   typedef std::vector<T, tracker_alloc<T> > X;
 
@@ -218,7 +217,7 @@ test_assignment_operator_3_exception_guarantee()
     try
     {
       r = a;
-      VERIFY(("no exception thrown", false));
+      VERIFY(false);
     }
     catch (...)
     {
@@ -245,7 +244,7 @@ void
 test_fill_assign_1()
 {
   // setup
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef copy_tracker T;
   typedef std::vector<T, tracker_alloc<T> > X;
 
@@ -273,7 +272,7 @@ void
 test_fill_assign_2()
 {
   // setup
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef copy_tracker T;
   typedef std::vector<T, tracker_alloc<T> > X;
 
@@ -307,14 +306,13 @@ void
 test_fill_assign_3()
 {
   // setup
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef copy_tracker T;
   typedef std::vector<T, tracker_alloc<T> > X;
 
   allocation_tracker::resetCounts();
   {
     X a(7);
-    X::size_type old_size     = a.size();
     X::size_type old_capacity = a.capacity();
     X::size_type new_size     = old_capacity + 4;
     const T t;
@@ -343,7 +341,7 @@ void
 test_fill_assign_3_exception_guarantee()
 {
   // setup
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef copy_tracker T;
   typedef std::vector<T, tracker_alloc<T> > X;
 
@@ -365,7 +363,7 @@ test_fill_assign_3_exception_guarantee()
     try
     {
       a.assign(new_size, t);
-      VERIFY(("no exception thrown", false));
+      VERIFY(false);
     }
     catch (...)
     {
@@ -388,7 +386,7 @@ void
 test_fill_assign_4()
 {
   // setup
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef copy_tracker T;
   typedef std::vector<T, tracker_alloc<T> > X;
 
@@ -432,13 +430,12 @@ void
 test_range_assign_2()
 {
   // setup
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef copy_tracker T;
   typedef std::vector<T, tracker_alloc<T> > X;
 
   X a(7);
   X b(3);
-  X::size_type old_size = a.size();
 
   copy_tracker::reset();
   allocation_tracker::resetCounts();
@@ -463,14 +460,13 @@ void
 test_range_assign_3()
 {
   // setup
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef copy_tracker T;
   typedef std::vector<T, tracker_alloc<T> > X;
 
   X a(7);
   a.reserve(a.size() + 7);
   X b(a.size() + 3);
-  X::size_type old_size = a.size();
 
   copy_tracker::reset();
   allocation_tracker::resetCounts();
@@ -496,7 +492,7 @@ void
 test_range_assign_4()
 {
   // setup
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef copy_tracker T;
   typedef std::vector<T, tracker_alloc<T> > X;
 
@@ -504,7 +500,6 @@ test_range_assign_4()
   {
     X a(7);
     X b(a.capacity() + 7);
-    X::size_type old_size = a.size();
 
     copy_tracker::reset();
 
@@ -530,7 +525,7 @@ void
 test_range_assign_4_exception_guarantee()
 {
   // setup
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef copy_tracker T;
   typedef std::vector<T, tracker_alloc<T> > X;
 
@@ -538,7 +533,6 @@ test_range_assign_4_exception_guarantee()
   {
     X a(7);
     X b(a.capacity() + 7);
-    X::size_type old_size = a.size();
 
     copy_tracker::reset();
     copy_constructor::throw_on(3);
@@ -550,7 +544,7 @@ test_range_assign_4_exception_guarantee()
     try
     {
       a.assign(b.begin(), b.end());
-      VERIFY(("no exception thrown", false));
+      VERIFY(false);
     }
     catch (...)
     {
diff --git a/libstdc++-v3/testsuite/23_containers/vector/element_access/1.cc b/libstdc++-v3/testsuite/23_containers/vector/element_access/1.cc
index 8171715dddb4..89026225f9ab 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/element_access/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/element_access/1.cc
@@ -33,7 +33,7 @@ struct B { };
 // http://gcc.gnu.org/ml/libstdc++/2000-09/msg00002.html
 bool test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::vector< A<B> > vec01;
   std::vector< A<B> > vec02(5);
   typedef std::vector< A<B> >::size_type size_type;
@@ -41,7 +41,7 @@ bool test01()
 
   try
     { 
-      reference r01 = vec01.at(6); 
+      reference r01 __attribute__((unused)) = vec01.at(6); 
       VERIFY( false ); // Should not get here, as exception thrown.
     }
   catch(std::out_of_range& err)
diff --git a/libstdc++-v3/testsuite/23_containers/vector/modifiers/1.cc b/libstdc++-v3/testsuite/23_containers/vector/modifiers/1.cc
index c8321b3bd0ff..20fb52d317ae 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/modifiers/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/modifiers/1.cc
@@ -23,7 +23,7 @@
 #include <vector>
 #include "testsuite_hooks.h"
 
-bool test = true;
+bool test __attribute__((unused)) = true;
 
 template<typename T>
   struct A { };
diff --git a/libstdc++-v3/testsuite/23_containers/vector/modifiers/2.cc b/libstdc++-v3/testsuite/23_containers/vector/modifiers/2.cc
index cc8d36d41088..b6d37396e020 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/modifiers/2.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/modifiers/2.cc
@@ -23,7 +23,7 @@
 #include <vector>
 #include "testsuite_hooks.h"
 
-bool test = true;
+bool test __attribute__((unused)) = true;
 
 // test the assign() function
 void
@@ -32,9 +32,9 @@ test03()
   const int K = 417;
   const int A[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17};
   const int B[] = {K, K, K, K, K};
-  const int N = sizeof(A) / sizeof(int);
-  const int M = sizeof(B) / sizeof(int);
-  bool test = true;
+  const std::size_t N = sizeof(A) / sizeof(int);
+  const std::size_t M = sizeof(B) / sizeof(int);
+  bool test __attribute__((unused)) = true;
 
   // assign from pointer range
   std::vector<int> v3;
diff --git a/libstdc++-v3/testsuite/23_containers/vector/resize/1.cc b/libstdc++-v3/testsuite/23_containers/vector/resize/1.cc
index 3cc6c57ed425..5f8a9de547fa 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/resize/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/resize/1.cc
@@ -32,7 +32,7 @@
 
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::vector<int> v;
   try
     {
diff --git a/libstdc++-v3/testsuite/24_iterators/back_insert_iterator.cc b/libstdc++-v3/testsuite/24_iterators/back_insert_iterator.cc
index 63f64ea08e8a..678feb8b2453 100644
--- a/libstdc++-v3/testsuite/24_iterators/back_insert_iterator.cc
+++ b/libstdc++-v3/testsuite/24_iterators/back_insert_iterator.cc
@@ -32,7 +32,7 @@ void test01()
   typedef back_insert_iterator<list<int> > test_iterator;
   typedef iterator<output_iterator_tag, void, void, void, void> base_iterator;
   test_iterator  r_it(l);
-  base_iterator* base = &r_it;
+  base_iterator* base __attribute__((unused)) = &r_it;
 
   // Check for required typedefs
   typedef test_iterator::value_type value_type;
diff --git a/libstdc++-v3/testsuite/24_iterators/front_insert_iterator.cc b/libstdc++-v3/testsuite/24_iterators/front_insert_iterator.cc
index cf446f63ddb2..32a694e3acf9 100644
--- a/libstdc++-v3/testsuite/24_iterators/front_insert_iterator.cc
+++ b/libstdc++-v3/testsuite/24_iterators/front_insert_iterator.cc
@@ -32,7 +32,7 @@ void test01()
   typedef front_insert_iterator<list<int> > test_iterator;
   typedef iterator<output_iterator_tag, void, void, void, void> base_iterator;
   test_iterator  r_it(l);
-  base_iterator* base = &r_it;
+  base_iterator* base __attribute__((unused)) = &r_it;
 
   // Check for required typedefs
   typedef test_iterator::value_type value_type;
diff --git a/libstdc++-v3/testsuite/24_iterators/insert_iterator.cc b/libstdc++-v3/testsuite/24_iterators/insert_iterator.cc
index 0cb2d8782a7e..7fca06092d8a 100644
--- a/libstdc++-v3/testsuite/24_iterators/insert_iterator.cc
+++ b/libstdc++-v3/testsuite/24_iterators/insert_iterator.cc
@@ -34,7 +34,7 @@ void test01()
   typedef insert_iterator<list<int> > test_iterator;
   typedef iterator<output_iterator_tag, void, void, void, void> base_iterator;
   test_iterator  r_it(l, li);
-  base_iterator* base = &r_it;
+  base_iterator* base __attribute__((unused)) = &r_it;
 
   // Check for required typedefs
   typedef test_iterator::value_type value_type;
diff --git a/libstdc++-v3/testsuite/24_iterators/istream_iterator.cc b/libstdc++-v3/testsuite/24_iterators/istream_iterator.cc
index d278e1994b4e..3f097d512bf1 100644
--- a/libstdc++-v3/testsuite/24_iterators/istream_iterator.cc
+++ b/libstdc++-v3/testsuite/24_iterators/istream_iterator.cc
@@ -33,7 +33,7 @@ void test01()
   typedef iterator<input_iterator_tag, long, ptrdiff_t, const long*, 
     		   const long&> base_iterator;
   test_iterator  r_it;
-  base_iterator* base = &r_it;
+  base_iterator* base __attribute__((unused)) = &r_it;
 
   // Check for required typedefs
   typedef test_iterator::value_type value_type;
@@ -53,7 +53,7 @@ template class std::istream_iterator<char>;
 void test02()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   string st("R.Rorty");
 
diff --git a/libstdc++-v3/testsuite/24_iterators/istreambuf_iterator.cc b/libstdc++-v3/testsuite/24_iterators/istreambuf_iterator.cc
index 2f97f8973cfa..8683de6e463e 100644
--- a/libstdc++-v3/testsuite/24_iterators/istreambuf_iterator.cc
+++ b/libstdc++-v3/testsuite/24_iterators/istreambuf_iterator.cc
@@ -35,7 +35,7 @@ void test01()
 
   istringstream isstream("this tag");
   test_iterator  r_it(isstream);
-  base_iterator* base = &r_it;
+  base_iterator* base __attribute__((unused)) = &r_it;
 
   // Check for required typedefs
   typedef test_iterator::value_type value_type;
@@ -55,7 +55,7 @@ bool test02(void)
 
   typedef std::istreambuf_iterator<char> cistreambuf_iter;
   typedef cistreambuf_iter::streambuf_type cstreambuf_type;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char slit01[] = "playa hermosa, liberia, guanacaste";
   std::string str01(slit01);
   std::istringstream istrs00(str01);
@@ -120,7 +120,7 @@ bool test02(void)
   // istreambuf_iterator& operator++(int);
   cistreambuf_iter istrb_it27(istrs01.rdbuf());
   char c;
-  for (int i = 0; i < sizeof(slit01) - 2; ++i)
+  for (std::size_t i = 0; i < sizeof(slit01) - 2; ++i)
     {
       c = *istrb_it27++;
       VERIFY( c == slit01[i] );
@@ -128,7 +128,7 @@ bool test02(void)
 
   std::istringstream istrs02(str01);
   cistreambuf_iter istrb_it28(istrs02);
-  for (int i = 0; i < sizeof(slit01) - 2;)
+  for (std::size_t i = 0; i < sizeof(slit01) - 2;)
     {
       c = *++istrb_it28;
       VERIFY( c == slit01[++i] );
@@ -139,28 +139,28 @@ bool test02(void)
 // libstdc++/2627
 void test03()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const std::string s("free the vieques");
 
   // 1
   std::string res_postfix;
   std::istringstream iss01(s);
   std::istreambuf_iterator<char> isbufit01(iss01);
-  for (int j = 0; j < s.size(); ++j, isbufit01++)
+  for (std::size_t j = 0; j < s.size(); ++j, isbufit01++)
     res_postfix += *isbufit01;
 
   // 2
   std::string res_prefix;
   std::istringstream iss02(s);
   std::istreambuf_iterator<char> isbufit02(iss02);
-  for (int j = 0; j < s.size(); ++j, ++isbufit02)
+  for (std::size_t j = 0; j < s.size(); ++j, ++isbufit02)
     res_prefix += *isbufit02;
 
   // 3 mixed
   std::string res_mixed;
   std::istringstream iss03(s);
   std::istreambuf_iterator<char> isbufit03(iss03);
-  for (int j = 0; j < int(s.size() / 2); ++j)
+  for (std::size_t j = 0; j < (s.size() / 2); ++j)
     {
       res_mixed += *isbufit03;
       ++isbufit03;
diff --git a/libstdc++-v3/testsuite/24_iterators/iterator.cc b/libstdc++-v3/testsuite/24_iterators/iterator.cc
index db8b63369a50..51360b09cdb2 100644
--- a/libstdc++-v3/testsuite/24_iterators/iterator.cc
+++ b/libstdc++-v3/testsuite/24_iterators/iterator.cc
@@ -589,7 +589,7 @@ test6642()
 }
 
 int
-main(int argc, char **argv)
+main()
 {
    int failures(0);
 
diff --git a/libstdc++-v3/testsuite/24_iterators/ostream_iterator.cc b/libstdc++-v3/testsuite/24_iterators/ostream_iterator.cc
index 53fee23e1a1f..546685725038 100644
--- a/libstdc++-v3/testsuite/24_iterators/ostream_iterator.cc
+++ b/libstdc++-v3/testsuite/24_iterators/ostream_iterator.cc
@@ -33,7 +33,7 @@ void test01()
   typedef iterator<output_iterator_tag, void, void, void, void> base_iterator;
   ostringstream osstream("this tag");
   test_iterator  r_it(osstream);
-  base_iterator* base = &r_it;
+  base_iterator* base __attribute__((unused)) = &r_it;
 
   // Check for required typedefs
   typedef test_iterator::value_type value_type;
diff --git a/libstdc++-v3/testsuite/24_iterators/ostreambuf_iterator.cc b/libstdc++-v3/testsuite/24_iterators/ostreambuf_iterator.cc
index 6fbfe6d51440..3bc6bbbcf982 100644
--- a/libstdc++-v3/testsuite/24_iterators/ostreambuf_iterator.cc
+++ b/libstdc++-v3/testsuite/24_iterators/ostreambuf_iterator.cc
@@ -33,7 +33,7 @@ void test01()
   typedef iterator<output_iterator_tag, void, void, void, void> base_iterator;
   ostringstream osstream("this tag");
   test_iterator  r_it(osstream);
-  base_iterator* base = &r_it;
+  base_iterator* base __attribute__((unused)) = &r_it;
 
   // Check for required typedefs
   typedef test_iterator::value_type value_type;
@@ -52,7 +52,7 @@ bool test02(void)
 {
   typedef std::ostreambuf_iterator<char> costreambuf_iter;
   typedef costreambuf_iter::streambuf_type cstreambuf_type;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char slit01[] = "playa hermosa, liberia, guanacaste";
   const char slit02[] = "bodega bay, lost coast, california";
   std::string str01(slit01);
diff --git a/libstdc++-v3/testsuite/24_iterators/reverse_iterator/1.cc b/libstdc++-v3/testsuite/24_iterators/reverse_iterator/1.cc
index 1278a21e8bb3..2852d87bb683 100644
--- a/libstdc++-v3/testsuite/24_iterators/reverse_iterator/1.cc
+++ b/libstdc++-v3/testsuite/24_iterators/reverse_iterator/1.cc
@@ -36,7 +36,7 @@ void test01()
                    iterator_traits<long*>::reference>
     base_iterator;
   test_iterator  r_it(&l);
-  base_iterator* base = &r_it;
+  base_iterator* base __attribute__((unused)) = &r_it;
 
   // Check for required typedefs
   typedef test_iterator::value_type value_type;
diff --git a/libstdc++-v3/testsuite/24_iterators/reverse_iterator/3.cc b/libstdc++-v3/testsuite/24_iterators/reverse_iterator/3.cc
index ffb6e779db07..138d41cd5bc9 100644
--- a/libstdc++-v3/testsuite/24_iterators/reverse_iterator/3.cc
+++ b/libstdc++-v3/testsuite/24_iterators/reverse_iterator/3.cc
@@ -27,7 +27,7 @@
 // libstdc++/10783
 void test03()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   typedef std::vector<int> V;
   VERIFY( sizeof(V::iterator) == sizeof(V::reverse_iterator) );
diff --git a/libstdc++-v3/testsuite/25_algorithms/binary_search.cc b/libstdc++-v3/testsuite/25_algorithms/binary_search.cc
index fda74d2a7062..37019f84edef 100644
--- a/libstdc++-v3/testsuite/25_algorithms/binary_search.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/binary_search.cc
@@ -21,7 +21,7 @@
 #include <algorithm>
 #include <testsuite_hooks.h>
 
-bool test = true;
+bool test __attribute__((unused)) = true;
 
 const int A[] = {1, 2, 3, 3, 3, 5, 8};
 const int C[] = {8, 5, 3, 3, 3, 2, 1};
@@ -172,12 +172,12 @@ test04()
 }
 
 int
-main(int argc, char* argv[])
+main()
 {
-    test01();
-    test02();
-    test03();
-    test04();
-
-    return !test;
+  test01();
+  test02();
+  test03();
+  test04();
+  
+  return 0;
 }
diff --git a/libstdc++-v3/testsuite/25_algorithms/copy.cc b/libstdc++-v3/testsuite/25_algorithms/copy.cc
index d8fbb9d2b00d..6e699113b580 100644
--- a/libstdc++-v3/testsuite/25_algorithms/copy.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/copy.cc
@@ -21,7 +21,7 @@
 #include <algorithm>
 #include <testsuite_hooks.h>
 
-bool test = true;
+bool test __attribute__((unused)) = true;
 
 const int A[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17};
 const int N = sizeof(A) / sizeof(int);
@@ -49,10 +49,10 @@ test02()
 }
 
 int
-main(int argc, char* argv[])
+main()
 {
-    test01();
-    test02();
+  test01();
+  test02();
 
-    return !test;
+  return 0;
 }
diff --git a/libstdc++-v3/testsuite/25_algorithms/heap.cc b/libstdc++-v3/testsuite/25_algorithms/heap.cc
index e78fae8477d7..a62a9a819b62 100644
--- a/libstdc++-v3/testsuite/25_algorithms/heap.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/heap.cc
@@ -22,7 +22,7 @@
 //#include <cmath>
 #include <testsuite_hooks.h>
 
-bool test = true;
+bool test __attribute__((unused)) = true;
 
 const int A[] = {1, 11, 12, 3, 10, 6, 17, 4, 8, 2, 5, 13, 9, 15, 14, 16, 7};
 const int B[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17};
@@ -123,10 +123,10 @@ test02()
 }
 
 int
-main(int argc, char* argv[])
+main()
 {
-    test01();
-    test02();
+  test01();
+  test02();
 
-    return !test;
+  return 0;
 }
diff --git a/libstdc++-v3/testsuite/25_algorithms/lower_bound.cc b/libstdc++-v3/testsuite/25_algorithms/lower_bound.cc
index a3a230501656..6afb28fffbc1 100644
--- a/libstdc++-v3/testsuite/25_algorithms/lower_bound.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/lower_bound.cc
@@ -28,5 +28,5 @@ bool operator< (const foo&, const foo&) { return true; };
 
 void bar(foo* a, foo* b, foo& x)
 {
-  foo* c = std::lower_bound(a, b, x);
+  foo* c __attribute__((unused)) = std::lower_bound(a, b, x);
 }
diff --git a/libstdc++-v3/testsuite/25_algorithms/min_max.cc b/libstdc++-v3/testsuite/25_algorithms/min_max.cc
index ef8acfd249f4..bd07009c015b 100644
--- a/libstdc++-v3/testsuite/25_algorithms/min_max.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/min_max.cc
@@ -24,7 +24,7 @@
 
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   const int& x = std::max(1, 2);
   const int& y = std::max(4, 3);
@@ -74,7 +74,7 @@ template int A<long double>::a;
 
 void test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   VERIFY( 2 == std::min(A<int>::a, 2) );
   VERIFY( 3 == std::min(A<int>::a, 4) );
diff --git a/libstdc++-v3/testsuite/25_algorithms/partition.cc b/libstdc++-v3/testsuite/25_algorithms/partition.cc
index 3424dcf80fde..b05c203bd326 100644
--- a/libstdc++-v3/testsuite/25_algorithms/partition.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/partition.cc
@@ -22,7 +22,7 @@
 #include <functional>
 #include <testsuite_hooks.h>
 
-bool test = true;
+bool test __attribute__((unused)) = true;
 
 const int A[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17};
 const int B[] = {2, 4, 6, 8, 10, 12, 14, 16, 1, 3, 5, 7, 9, 11, 13, 15, 17};
@@ -64,10 +64,10 @@ test02()
 }
 
 int
-main(int argc, char* argv[])
+main()
 {
-    test01();
-    test02();
+  test01();
+  test02();
 
-    return !test;
+  return 0;
 }
diff --git a/libstdc++-v3/testsuite/25_algorithms/rotate.cc b/libstdc++-v3/testsuite/25_algorithms/rotate.cc
index 5102a649fdc1..2c0487706ea8 100644
--- a/libstdc++-v3/testsuite/25_algorithms/rotate.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/rotate.cc
@@ -22,7 +22,7 @@
 #include <testsuite_hooks.h>
 #include <list>
 
-bool test = true;
+bool test __attribute__((unused)) = true;
 
 int A[] = {1, 2, 3, 4, 5, 6, 7};
 int B[] = {2, 3, 4, 5, 6, 7, 1};
@@ -72,9 +72,9 @@ test03()
 }
 
 int
-main(int argc, char* argv[])
+main()
 {
-    test02();
-    test03();
-    return !test;
+  test02();
+  test03();
+  return 0;
 }
diff --git a/libstdc++-v3/testsuite/25_algorithms/sort.cc b/libstdc++-v3/testsuite/25_algorithms/sort.cc
index 2fcc6384ccf5..f1fa87cd42b9 100644
--- a/libstdc++-v3/testsuite/25_algorithms/sort.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/sort.cc
@@ -21,7 +21,7 @@
 #include <algorithm>
 #include <testsuite_hooks.h>
 
-bool test = true;
+bool test __attribute__((unused)) = true;
 
 const int A[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20};
 const int B[] = {10, 20, 1, 11, 2, 12, 3, 13, 4, 14, 5, 15, 6, 16, 7, 17, 8, 18, 9, 19};
@@ -159,13 +159,13 @@ test05()
 }
 
 int
-main(int argc, char* argv[])
+main()
 {
-    test01();
-    test02();
-    test03();
-    test04();
-    test05();
-
-    return !test;
+  test01();
+  test02();
+  test03();
+  test04();
+  test05();
+  
+  return 0;
 }
diff --git a/libstdc++-v3/testsuite/26_numerics/c99_classification_macros_c++.cc b/libstdc++-v3/testsuite/26_numerics/c99_classification_macros_c++.cc
index 095a7bc990e5..543f3d43fc90 100644
--- a/libstdc++-v3/testsuite/26_numerics/c99_classification_macros_c++.cc
+++ b/libstdc++-v3/testsuite/26_numerics/c99_classification_macros_c++.cc
@@ -59,7 +59,7 @@ void isunordered() { }
 template <typename _Tp>
   void test_c99_classify()
   {
-    bool test = true;
+    bool test __attribute__((unused)) = true;
 
     typedef _Tp fp_type;
     fp_type f1 = 1.0;
diff --git a/libstdc++-v3/testsuite/26_numerics/c_math.cc b/libstdc++-v3/testsuite/26_numerics/c_math.cc
index f01e4868b44d..60cb5d05a01b 100644
--- a/libstdc++-v3/testsuite/26_numerics/c_math.cc
+++ b/libstdc++-v3/testsuite/26_numerics/c_math.cc
@@ -44,7 +44,7 @@ test02()
 int
 test03()
 {
-  double powtest = std::pow(2., 0);
+  double powtest __attribute__((unused)) = std::pow(2., 0);
   return 0;
 }
 
@@ -52,7 +52,7 @@ test03()
 int
 test04()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   float x[2] = {1, 2};
   float y = 3.4;
   std::modf(y, &x[0]);
diff --git a/libstdc++-v3/testsuite/26_numerics/c_math_dynamic.cc b/libstdc++-v3/testsuite/26_numerics/c_math_dynamic.cc
index 25efa10a192a..86a6f930f725 100644
--- a/libstdc++-v3/testsuite/26_numerics/c_math_dynamic.cc
+++ b/libstdc++-v3/testsuite/26_numerics/c_math_dynamic.cc
@@ -45,7 +45,7 @@ int
 test02 ()
 {
   float a = 0.0f;
-  float b = std::acos(b);
+  float b __attribute__((unused)) = std::acos(a);
   return 0;
 }
 
diff --git a/libstdc++-v3/testsuite/26_numerics/complex_inserters_extractors.cc b/libstdc++-v3/testsuite/26_numerics/complex_inserters_extractors.cc
index f285fb70fec5..b7059f7e864b 100644
--- a/libstdc++-v3/testsuite/26_numerics/complex_inserters_extractors.cc
+++ b/libstdc++-v3/testsuite/26_numerics/complex_inserters_extractors.cc
@@ -38,7 +38,7 @@ template<typename R>
 int
 test_good(std::string str, R x, R y)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::complex<R> z;
   char ch;
   std::istringstream iss(str);
@@ -54,7 +54,7 @@ template<typename R>
 int
 test_fail(std::string str)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::complex<R> z;
   std::istringstream iss(str);
   iss >> z;
@@ -87,7 +87,7 @@ testall()
 void test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   
   complex<float> cf01(-1.1, -333.2);
   stringstream ss;
@@ -105,7 +105,7 @@ template class std::basic_string<char, gnu_char_traits, std::allocator<char> >;
 
 void test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // Construct locale with specialized facets.
   typedef gnu_sstream::__num_put_type numput_type;
@@ -117,7 +117,6 @@ void test02()
   VERIFY( std::has_facet<numget_type>(loc_2) );
 
   gnu_sstream sstr;
-  std::basic_ios<char, gnu_char_traits>* pios = &sstr;
   sstr.imbue(loc_2);
 
 
diff --git a/libstdc++-v3/testsuite/26_numerics/complex_value.cc b/libstdc++-v3/testsuite/26_numerics/complex_value.cc
index ebdd71a2c71a..62720c621f3d 100644
--- a/libstdc++-v3/testsuite/26_numerics/complex_value.cc
+++ b/libstdc++-v3/testsuite/26_numerics/complex_value.cc
@@ -26,7 +26,7 @@
 void test01()
 {
  using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
  typedef complex<double> complex_type;
  const double cd1 = -11.451;
  const double cd2 = -442.1533;
diff --git a/libstdc++-v3/testsuite/26_numerics/slice.cc b/libstdc++-v3/testsuite/26_numerics/slice.cc
index a02c1f5801b3..a7278edfc903 100644
--- a/libstdc++-v3/testsuite/26_numerics/slice.cc
+++ b/libstdc++-v3/testsuite/26_numerics/slice.cc
@@ -25,14 +25,14 @@
 #include <testsuite_hooks.h>
 
 bool
-construction(int start, int size, int stride)
+construction(std::size_t start, std::size_t size, std::size_t stride)
 {
   std::slice s(start, size, stride);
   return s.start() == start && s.size() == size && s.stride() == stride;
 }
 
 bool
-copy(int start, int size, int stride)
+copy(std::size_t start, std::size_t size, std::size_t stride)
 {
   std::slice s(start, size, stride);
   std::slice t = s;
@@ -40,7 +40,7 @@ copy(int start, int size, int stride)
 }
 
 bool
-assignment(int start, int size, int stride)
+assignment(std::size_t start, std::size_t size, std::size_t stride)
 {
   std::slice s(start, size, stride);
   std::slice t;
@@ -51,8 +51,9 @@ assignment(int start, int size, int stride)
 
 int main()
 {
-  bool test = true;
-  std::srand(20020717);         using std::rand;
+  bool test __attribute__((unused)) = true;
+  std::srand(20020717);         
+  using std::rand;
   VERIFY(construction(rand(), rand(), rand()));
 
   VERIFY(copy(rand(), rand(), rand()));
diff --git a/libstdc++-v3/testsuite/26_numerics/slice_array_assignment.cc b/libstdc++-v3/testsuite/26_numerics/slice_array_assignment.cc
index a637b872b2ef..2d5af920735b 100644
--- a/libstdc++-v3/testsuite/26_numerics/slice_array_assignment.cc
+++ b/libstdc++-v3/testsuite/26_numerics/slice_array_assignment.cc
@@ -34,7 +34,7 @@
 
 int main()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   using std::valarray;
   using std::slice;
   valarray<int> v(1, 10), w(2, 10);
diff --git a/libstdc++-v3/testsuite/26_numerics/sum_diff.cc b/libstdc++-v3/testsuite/26_numerics/sum_diff.cc
index ffc4e639c1c9..9a4cf68c1d5b 100644
--- a/libstdc++-v3/testsuite/26_numerics/sum_diff.cc
+++ b/libstdc++-v3/testsuite/26_numerics/sum_diff.cc
@@ -40,7 +40,7 @@ test01()
 }
 
 int
-main(int argc, char* argv[])
+main()
 {
     test01();
     return 0;
diff --git a/libstdc++-v3/testsuite/26_numerics/valarray.cc b/libstdc++-v3/testsuite/26_numerics/valarray.cc
index f2348f018abe..37c9e0286e48 100644
--- a/libstdc++-v3/testsuite/26_numerics/valarray.cc
+++ b/libstdc++-v3/testsuite/26_numerics/valarray.cc
@@ -37,7 +37,7 @@ int main()
   // 02: algo
   using std::valarray;
   valarray<double> b, c;
-  double m = std::abs(b - c).max();
+  double m __attribute__((unused)) = std::abs(b - c).max();
 
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/26_numerics/valarray_operators.cc b/libstdc++-v3/testsuite/26_numerics/valarray_operators.cc
index 84c072a4895b..16479a512414 100644
--- a/libstdc++-v3/testsuite/26_numerics/valarray_operators.cc
+++ b/libstdc++-v3/testsuite/26_numerics/valarray_operators.cc
@@ -24,7 +24,7 @@
 
 void test01() // check unary operators
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::valarray<int> u(1);
   u[0]=1;
 
@@ -36,7 +36,7 @@ void test01() // check unary operators
 
 void test02() // check binary operators
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::valarray<int> u(1), v(1);
   u[0]=1;
   v[0]=3;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/3.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/3.cc
index 54cfba150bd8..6cb9e6e8b3f4 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/3.cc
@@ -115,7 +115,7 @@ struct gnu_char_traits
 
 void test07()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::basic_filebuf<gnu_char_type, gnu_char_traits> gnu_filebuf;
   
   try
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/4.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/4.cc
index 9516cb2eccba..e330430973c6 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/4.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/4.cc
@@ -28,7 +28,7 @@ void test01()
   typedef std::filebuf test_type;
   typedef std::streambuf base_type;
   const test_type& obj = test_type();
-  const base_type* base = &obj;
+  const base_type* base __attribute__((unused)) = &obj;
 }
 
 int main()
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/1.cc
index 5b2f484a0f97..5d87cabc1ea8 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/1.cc
@@ -32,7 +32,7 @@ const char name_02[] = "filebuf_members-1.txt";
 // Test member functions.
 void test_01() 
 {
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const char* name_03 = "filebuf_members-3"; // empty file, need to create
 
   std::filebuf fb_01; // in 
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/2.cc
index b0ebd5817c67..0657ed8218ce 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/2.cc
@@ -42,7 +42,7 @@ const char name_02[] = "filebuf_virtuals-2.txt"; // empty file, need to create
 
 void test_02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   int close_num;
 
   // read (ext)
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/3.cc
index 3f6dfd56b3a2..6fc4bc502088 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/3.cc
@@ -65,11 +65,8 @@ void test05()
   typedef std::filebuf::off_type 	off_type;
   typedef size_t 			size_type;
 
-  bool 					test = true;
+  bool test __attribute__((unused)) = true;
   std::filebuf 				f_tmp;
-  std::streamsize 			strmsz_1, strmsz_2;
-  std::streamoff  			strmof_1, strmof_2;
-  int 					i = 0, j = 0, k = 0;
 
   fb_01.open(name_01, std::ios_base::in);
   fb_02.open(name_02, std::ios_base::out | std::ios_base::trunc);
@@ -85,7 +82,7 @@ void test05()
   VERIFY( !fb_03.is_open() );
 }
 
-main() 
+int main() 
 {
   test03();
   test05();
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/4.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/4.cc
index 2992a4225f1c..6222874f9cf4 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/4.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/4.cc
@@ -34,7 +34,7 @@ void test_04()
 {
   typedef std::filebuf::traits_type 	traits_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::filebuf fb_01, fb_02;
   char buffer[] = "xxxxxxxxxx";
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/4879.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/4879.cc
index cd95bc653b43..90107cd72a90 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/4879.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/4879.cc
@@ -40,7 +40,7 @@
 void
 test_04()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* name = "tmp_fifo1";
   signal(SIGPIPE, SIG_IGN);
   
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/5.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/5.cc
index 02496d6a0e9d..cfac4a7a3847 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/5.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/5.cc
@@ -58,7 +58,7 @@ public:
 
 void test_05()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   Close_filebuf fb_01, fb_02;
   char buffer[] = "xxxxxxxxxx";
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/9964.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/9964.cc
index c61530b1dff1..895c0956e234 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/9964.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/9964.cc
@@ -38,7 +38,7 @@
 void test_07()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   const char* name = "tmp_fifo3";
 
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/cons/wchar_t/10132-1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/cons/wchar_t/10132-1.cc
index c25e0021532c..04f4b44358e6 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/cons/wchar_t/10132-1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/cons/wchar_t/10132-1.cc
@@ -34,7 +34,7 @@ protected:
 int main()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   locale loc = locale(locale::classic(), new Cvt);
   wfilebuf* fb = new wfilebuf;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/2.cc
index 434f1e2312d6..f10ff4f8c40d 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/2.cc
@@ -27,7 +27,7 @@
 void test02()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char name_01[] = "filebuf_virtuals-1.txt"; // file with data in it
 
   locale loc;
@@ -47,7 +47,7 @@ void test02()
   VERIFY( ob.getloc() == loc );
 }
 
-main() 
+int main() 
 {
   test02();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/3.cc
index 1899278d415a..0cd5d0f27fd3 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/3.cc
@@ -35,7 +35,7 @@ protected:
 void test03()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   locale loc_s(locale::classic(), new state_codecvt);
   filebuf ob;
@@ -48,7 +48,7 @@ void test03()
   VERIFY( ob.getloc() == loc_s );
 }
 
-main() 
+int main() 
 {
   test03();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/9322.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/9322.cc
index efe8cbbeea0d..6cddf0190d07 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/9322.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/9322.cc
@@ -28,7 +28,7 @@
 void test07()
 {
   using std::locale;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   locale loc;
   std::filebuf ob;
@@ -46,7 +46,7 @@ void test07()
   VERIFY( ob.getloc() == loc_de );
 }
 
-main() 
+int main() 
 {
   test07();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/2.cc
index 7fe0d4cc65b4..c47a6faac518 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/2.cc
@@ -27,7 +27,7 @@
 void test02()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char name_01[] = "filebuf_virtuals-1.txt"; // file with data in it
 
   locale loc;
@@ -47,7 +47,7 @@ void test02()
   VERIFY( ob.getloc() == loc );
 }
 
-main() 
+int main() 
 {
   test02();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/3.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/3.cc
index 393732bee365..067e48784b25 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/3.cc
@@ -35,7 +35,7 @@ protected:
 void test03()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   locale loc_s(locale::classic(), new state_codecvt);
   wfilebuf ob;
@@ -48,7 +48,7 @@ void test03()
   VERIFY( ob.getloc() == loc_s );
 }
 
-main() 
+int main() 
 {
   test03();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/9322.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/9322.cc
index 8a76a997c9a6..9cf3d5bd4d3b 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/9322.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/9322.cc
@@ -28,7 +28,7 @@
 void test07()
 {
   using std::locale;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   locale loc;
   std::wfilebuf ob;
@@ -46,7 +46,7 @@ void test07()
   VERIFY( ob.getloc() == loc_de );
 }
 
-main() 
+int main() 
 {
   test07();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/in_avail/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/in_avail/char/1.cc
index d8ec0a3546e9..6f6879b127c6 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/in_avail/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/in_avail/char/1.cc
@@ -65,11 +65,9 @@ void test05()
   typedef std::filebuf::off_type 	off_type;
   typedef size_t 			size_type;
 
-  bool 					test = true;
+  bool test __attribute__((unused)) = true;
   std::filebuf 				f_tmp;
-  std::streamsize 			strmsz_1, strmsz_2;
   std::streamoff  			strmof_1, strmof_2;
-  int 					i = 0, j = 0, k = 0;
 
   // GET
   // int in_avail()
@@ -93,7 +91,7 @@ void test05()
   VERIFY( strmof_1  == 0 ); // empty file
 }
 
-main() 
+int main() 
 {
   test03();
   test05();
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/is_open/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/is_open/char/1.cc
index 4b4c022a1c28..b4569bbb22db 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/is_open/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/is_open/char/1.cc
@@ -32,7 +32,7 @@ const char name_02[] = "filebuf_members-1.txt";
 // Test member functions.
 void test_01() 
 {
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const char* name_03 = "filebuf_members-3"; // empty file, need to create
 
   std::filebuf fb_01; // in 
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/1.cc
index 424d4b63eb52..dffdc748dbc0 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/1.cc
@@ -32,7 +32,7 @@ const char name_02[] = "filebuf_members-1.txt";
 // Test member functions.
 void test_01() 
 {
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   const char* name_03 = "filebuf_members-3"; // empty file, need to create
 
   std::filebuf fb_01; // in 
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/2.cc
index cf0ffa94c87e..b50208db3639 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/2.cc
@@ -36,7 +36,7 @@ const char name_01[] = "filebuf_virtuals-1.txt"; // file with data in it
 
 void test_03()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   int first_fd = ::open(name_01, O_RDONLY);
   VERIFY( first_fd != -1 );
   FILE* first_file = ::fdopen(first_fd, "r");
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/3.cc
index c08817f7eabb..db8f2d7bc573 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/3.cc
@@ -29,7 +29,7 @@
 // Charles Leggett <CGLeggett@lbl.gov>
 void test_05()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* name = "tmp_file5";
 
   std::fstream scratch_file;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/9507.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/9507.cc
index 99c70a9cd1e2..85eeededdd21 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/9507.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/9507.cc
@@ -37,7 +37,7 @@
 // libstdc++/9507
 void test_06()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* name = "tmp_fifo2";
 
   signal(SIGPIPE, SIG_IGN);
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/1.cc
index fd960e455112..d66fb1442a8e 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/1.cc
@@ -58,7 +58,7 @@ template<typename T>
 
 void test03() 
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const std::string control01("11111");
   std::string test01;
 
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/2-unbuf.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/2-unbuf.cc
index 9c5da4485cf6..661bd1d30848 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/2-unbuf.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/2-unbuf.cc
@@ -36,7 +36,7 @@ public:
 void test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef OverBuf::traits_type  traits_type;
 
   OverBuf fb;
@@ -47,7 +47,7 @@ void test01()
   fb.close();
 }
 
-main() 
+int main() 
 {
   test01();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/2.cc
index 4984602703aa..f9c69f84e867 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/2.cc
@@ -36,7 +36,7 @@ public:
 void test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef OverBuf::traits_type  traits_type;
 
   OverBuf fb;
@@ -46,7 +46,7 @@ void test01()
   fb.close();
 }
 
-main() 
+int main() 
 {
   test01();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/3599.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/3599.cc
index 795c58ccf3e6..6684d5dea5bf 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/3599.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/3599.cc
@@ -41,14 +41,14 @@ public:
  
 protected:
   int_type 
-  overflow(int_type c = traits_type::eof()) 
+  overflow(int_type c __attribute__((unused)) = traits_type::eof()) 
   { return traits_type::not_eof(0); }
 };
 
 void
 test07()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   testbuf ob;
   std::ostream out(&ob); 
 
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/9169.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/9169.cc
index 18ed29d328c4..dc163bae1a0b 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/9169.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/9169.cc
@@ -39,7 +39,7 @@ class Cvt_to_upper : public std::codecvt<char, char, mbstate_t>
 void test10()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   locale c_loc = locale::classic();
   locale loc(c_loc, new Cvt_to_upper);
@@ -65,7 +65,7 @@ void test10()
   VERIFY( tmp == str );
 }
 
-main() 
+int main() 
 {
   test10();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/9182-2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/9182-2.cc
index b752bce8a492..9904f194109c 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/9182-2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/9182-2.cc
@@ -51,7 +51,7 @@ protected:
 void test14()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   
   locale loc =  locale::classic();
   loc = locale(loc, new errorcvt);
@@ -65,7 +65,7 @@ void test14()
   fbuf1.close();
 }
 
-main() 
+int main() 
 {
   test14();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/9988.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/9988.cc
index 2c8d078f0e44..8133045afe52 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/9988.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/char/9988.cc
@@ -37,7 +37,7 @@ public:
 void test15()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   
   OverBuf fb;
   fb.open(name_08, ios_base::out | ios_base::trunc);
@@ -62,7 +62,7 @@ void test15()
   fbin.close();
 }
 
-main() 
+int main() 
 {
   test15();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-1.cc
index fc96a047fdfd..70788e31aaa3 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-1.cc
@@ -25,7 +25,7 @@
 void test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   wfilebuf fb;
   locale loc(__gnu_test::try_named_locale("en_US.UTF-8"));
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-2.cc
index 2415a2edcfbb..0e6297a0adda 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-2.cc
@@ -25,7 +25,7 @@
 void test02()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   wfilebuf fb;
   locale loc(__gnu_test::try_named_locale("en_US.UTF-8"));
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-3.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-3.cc
index fc0092df09cb..9558393d4846 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-3.cc
@@ -25,7 +25,7 @@
 void test03()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   wfilebuf fb;
   locale loc(__gnu_test::try_named_locale("en_US.UTF-8"));
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-4.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-4.cc
index 1886f8e630f7..7e6010d57378 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-4.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-4.cc
@@ -25,7 +25,7 @@
 void test04()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   wfilebuf fb;
   locale loc(__gnu_test::try_named_locale("en_US.UTF-8"));
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/pbackfail/char/9761.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/pbackfail/char/9761.cc
index 07e1ddad810c..6bf975193015 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/pbackfail/char/9761.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/pbackfail/char/9761.cc
@@ -29,7 +29,7 @@ const char name_01[] = "filebuf_virtuals-1.txt"; // file with data in it
 void test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   filebuf fbuf;
   filebuf::int_type r1, r2;
@@ -48,7 +48,7 @@ void test01()
   VERIFY( r2 == filebuf::traits_type::eof() );
 }
 
-main() 
+int main() 
 {
   test01();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-in.cc
index f1b30d8de1ab..14cc40f01529 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-in.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-in.cc
@@ -36,7 +36,7 @@ void test05()
   typedef filebuf::int_type 	int_type;
   typedef filebuf::traits_type 	traits_type;
 
-  bool 					test = true;
+  bool test __attribute__((unused)) = true;
 
   // int_type sbumpc()
   // if read_cur not avail returns uflow(), else return *read_cur & increment
@@ -72,7 +72,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-io.cc
index f649ef87dc6e..7236e939a35c 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-io.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-io.cc
@@ -37,7 +37,7 @@ void test05()
   typedef filebuf::int_type 	int_type;
   typedef filebuf::traits_type 	traits_type;
 
-  bool 					test = true;
+  bool test __attribute__((unused)) = true;
 
   // int_type sbumpc()
   // if read_cur not avail returns uflow(), else return *read_cur & increment
@@ -85,7 +85,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-out.cc
index 1a43f327dca6..107af85e16f1 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-out.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/1-out.cc
@@ -36,7 +36,7 @@ void test05()
   typedef filebuf::int_type 	int_type;
   typedef filebuf::traits_type 	traits_type;
 
-  bool 					test = true;
+  bool test __attribute__((unused)) = true;
 
   // int_type sbumpc()
   // if read_cur not avail returns uflow(), else return *read_cur & increment
@@ -56,7 +56,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-in.cc
index e06e0625efbb..f57578d29f9e 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-in.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-in.cc
@@ -36,7 +36,7 @@ void test05()
   typedef filebuf::int_type 	int_type;
   typedef filebuf::traits_type 	traits_type;
 
-  bool 					test = true;
+  bool test __attribute__((unused)) = true;
 
   // int_type sbumpc()
   // if read_cur not avail returns uflow(), else return *read_cur & increment
@@ -72,7 +72,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-io.cc
index 54a3047ad003..a2804584a0b8 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-io.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-io.cc
@@ -37,7 +37,7 @@ void test05()
   typedef filebuf::int_type 	int_type;
   typedef filebuf::traits_type 	traits_type;
 
-  bool 					test = true;
+  bool test __attribute__((unused)) = true;
 
   // int_type sbumpc()
   // if read_cur not avail returns uflow(), else return *read_cur & increment
@@ -84,7 +84,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-out.cc
index a650e8eab962..37048f2dc82a 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-out.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/2-out.cc
@@ -36,7 +36,7 @@ void test05()
   typedef filebuf::int_type 	int_type;
   typedef filebuf::traits_type 	traits_type;
 
-  bool 					test = true;
+  bool test __attribute__((unused)) = true;
 
   // int_type sbumpc()
   // if read_cur not avail returns uflow(), else return *read_cur & increment
@@ -57,7 +57,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/9825.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/9825.cc
index 8e419432ad8d..e4468b23b901 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/9825.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sbumpc/char/9825.cc
@@ -30,7 +30,7 @@ const char name_06[] = "filebuf_virtuals-6.txt"; // empty file, need to create
 void test12()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   filebuf fbuf;
 
@@ -48,7 +48,7 @@ void test12()
   fbuf.close();  
 }
 
-main() 
+int main() 
 {
   test12();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/10132-2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/10132-2.cc
index a391d22fc033..0d218a60aa6d 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/10132-2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/10132-2.cc
@@ -113,7 +113,7 @@ struct gnu_char_traits
 
 void test07()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::basic_filebuf<gnu_char_type, gnu_char_traits> gnu_filebuf;
   
   try
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-in.cc
index 2da27f13dcd4..e5f6f99b1875 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-in.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-in.cc
@@ -39,9 +39,8 @@ void test05()
   typedef filebuf::off_type 	off_type;
   typedef filebuf::traits_type 	traits_type;
 
-  bool 				test = true;
+  bool test __attribute__((unused)) = true;
   streamsize 			strmsz_1, strmsz_2;
-  streamoff  			strmof_1, strmof_2;
 
   int_type c1;
   int_type c2;
@@ -117,7 +116,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-io.cc
index a655fd81ab76..248f819cc8f8 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-io.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-io.cc
@@ -38,9 +38,8 @@ void test05()
   typedef filebuf::pos_type 	pos_type;
   typedef filebuf::off_type 	off_type;
 
-  bool 				test = true;
+  bool test __attribute__((unused)) = true;
   streamsize 			strmsz_1, strmsz_2;
-  streamoff  			strmof_1, strmof_2;
 
   int_type c1;
   int_type c2;
@@ -116,7 +115,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-out.cc
index 40c62aafe25d..f83af783d3c2 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-out.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/1-out.cc
@@ -39,9 +39,8 @@ void test05()
   typedef filebuf::off_type 	off_type;
   typedef filebuf::traits_type 	traits_type;
 
-  bool 				test = true;
+  bool test __attribute__((unused)) = true;
   streamsize 			strmsz_1, strmsz_2;
-  streamoff  			strmof_1, strmof_2;
 
   int_type c1;
   int_type c2;
@@ -117,7 +116,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-in.cc
index a1adf32b8be7..84a52a741006 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-in.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-in.cc
@@ -39,9 +39,8 @@ void test05()
   typedef filebuf::off_type 	off_type;
   typedef filebuf::traits_type 	traits_type;
 
-  bool 				test = true;
+  bool test __attribute__((unused)) = true;
   streamsize 			strmsz_1, strmsz_2;
-  streamoff  			strmof_1, strmof_2;
 
   int_type c1;
   int_type c2;
@@ -118,7 +117,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-io.cc
index fd30a33007df..9fc418f830eb 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-io.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-io.cc
@@ -38,9 +38,8 @@ void test05()
   typedef filebuf::pos_type 	pos_type;
   typedef filebuf::off_type 	off_type;
 
-  bool 				test = true;
+  bool test __attribute__((unused)) = true;
   streamsize 			strmsz_1, strmsz_2;
-  streamoff  			strmof_1, strmof_2;
 
   int_type c1;
   int_type c2;
@@ -115,7 +114,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-out.cc
index 786fb245a16a..cae238940cd4 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-out.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/2-out.cc
@@ -39,9 +39,8 @@ void test05()
   typedef filebuf::off_type 	off_type;
   typedef filebuf::traits_type 	traits_type;
 
-  bool 				test = true;
+  bool test __attribute__((unused)) = true;
   streamsize 			strmsz_1, strmsz_2;
-  streamoff  			strmof_1, strmof_2;
 
   int_type c1;
   int_type c2;
@@ -116,7 +115,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/3-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/3-in.cc
index b0a192d23379..2a798dbbf16c 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/3-in.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/3-in.cc
@@ -25,7 +25,7 @@
 
 void test02(std::filebuf& in, bool pass)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   using namespace std;
   typedef streambuf::pos_type pos_type;
   typedef streambuf::off_type off_type;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/3-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/3-io.cc
index df03ad6cae2a..e78abf1ad7db 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/3-io.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/3-io.cc
@@ -25,7 +25,7 @@
 
 void test02(std::filebuf& in, bool pass)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   using namespace std;
   typedef streambuf::pos_type pos_type;
   typedef streambuf::off_type off_type;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/3-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/3-out.cc
index 8749ff0bea4c..d803e5551fff 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/3-out.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/char/3-out.cc
@@ -25,7 +25,7 @@
 
 void test02(std::filebuf& in, bool pass)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   using namespace std;
   typedef streambuf::pos_type pos_type;
   typedef streambuf::off_type off_type;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/wchar_t/1.cc
index f3f3cc712d48..003f28165881 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/wchar_t/1.cc
@@ -32,7 +32,7 @@ void test01()
   typedef wfilebuf::pos_type pos_type;
   typedef wfilebuf::int_type int_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char name[] = "tmp_seekoff-1.tst";
   const int_type eof = wfilebuf::traits_type::eof();
 
@@ -117,7 +117,7 @@ void test01()
 	}
       int_type c1 = fb.sbumpc();
       VERIFY( c1 != eof );
-      VERIFY( c1 == wstr[index % wlen] );
+      VERIFY( static_cast<wchar_t>(c1) == wstr[index % wlen] );
     }
 
   pos_type p3 = fb.pubseekoff(0, ios_base::cur);
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/wchar_t/2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/wchar_t/2.cc
index 9ad978bee9f0..91412bcf4ca6 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/wchar_t/2.cc
@@ -31,7 +31,7 @@ void test02()
 {
   using namespace std;
   typedef wfilebuf::int_type int_type;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char name[] = "tmp_seekoff-2.tst";
 
   locale loc = __gnu_test::try_named_locale("se_NO.UTF-8");
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/wchar_t/9875_seekoff.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/wchar_t/9875_seekoff.cc
index adec7b2130fa..e48b6704bbb6 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/wchar_t/9875_seekoff.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekoff/wchar_t/9875_seekoff.cc
@@ -79,7 +79,7 @@ protected:
 void test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   
   // seekoff
   wfilebuf fb;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/10132-3.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/10132-3.cc
index 02f7b67047cd..fdb817dce2af 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/10132-3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/10132-3.cc
@@ -113,7 +113,7 @@ struct gnu_char_traits
 
 void test07()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::basic_filebuf<gnu_char_type, gnu_char_traits> gnu_filebuf;
   
   try
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-in.cc
index 3230e121ed25..55345b9748a7 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-in.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-in.cc
@@ -39,9 +39,7 @@ void test05()
   typedef filebuf::off_type 	off_type;
   typedef filebuf::traits_type 	traits_type;
 
-  bool 				test = true;
-  streamsize 			strmsz_1, strmsz_2;
-  streamoff  			strmof_1, strmof_2;
+  bool test __attribute__((unused)) = true;
 
   int_type c1;
   int_type c2;
@@ -97,7 +95,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-io.cc
index ecaa19fb2d8f..23f663cda0a4 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-io.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-io.cc
@@ -38,9 +38,7 @@ void test05()
   typedef filebuf::pos_type 	pos_type;
   typedef filebuf::off_type 	off_type;
 
-  bool 				test = true;
-  streamsize 			strmsz_1, strmsz_2;
-  streamoff  			strmof_1, strmof_2;
+  bool test __attribute__((unused)) = true;
 
   int_type c1;
   int_type c2;
@@ -97,7 +95,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc
index e3c9ac3f3f3d..8773f6e00bb9 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc
@@ -39,9 +39,7 @@ void test05()
   typedef filebuf::off_type 	off_type;
   typedef filebuf::traits_type 	traits_type;
 
-  bool 				test = true;
-  streamsize 			strmsz_1, strmsz_2;
-  streamoff  			strmof_1, strmof_2;
+  bool test __attribute__((unused)) = true;
 
   int_type c1;
   int_type c2;
@@ -99,7 +97,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-in.cc
index 2fde41aed9e5..cec2cdf748f5 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-in.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-in.cc
@@ -39,9 +39,7 @@ void test05()
   typedef filebuf::off_type 	off_type;
   typedef filebuf::traits_type 	traits_type;
 
-  bool 				test = true;
-  streamsize 			strmsz_1, strmsz_2;
-  streamoff  			strmof_1, strmof_2;
+  bool test __attribute__((unused)) = true;
 
   int_type c1;
   int_type c2;
@@ -98,7 +96,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-io.cc
index 71fb68bf3ff3..c564e1bda288 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-io.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-io.cc
@@ -38,9 +38,7 @@ void test05()
   typedef filebuf::pos_type 	pos_type;
   typedef filebuf::off_type 	off_type;
 
-  bool 				test = true;
-  streamsize 			strmsz_1, strmsz_2;
-  streamoff  			strmof_1, strmof_2;
+  bool test __attribute__((unused)) = true;
 
   int_type c1;
   int_type c2;
@@ -96,7 +94,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-out.cc
index ee8c65f51543..a919f4fc32ed 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-out.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/2-out.cc
@@ -39,9 +39,7 @@ void test05()
   typedef filebuf::off_type 	off_type;
   typedef filebuf::traits_type 	traits_type;
 
-  bool 				test = true;
-  streamsize 			strmsz_1, strmsz_2;
-  streamoff  			strmof_1, strmof_2;
+  bool test __attribute__((unused)) = true;
 
   int_type c1;
   int_type c2;
@@ -98,7 +96,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/3-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/3-in.cc
index 70585273b011..39f18de3b05e 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/3-in.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/3-in.cc
@@ -25,7 +25,7 @@
 
 void test02(std::filebuf& in, bool pass)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   using namespace std;
   typedef streambuf::pos_type pos_type;
   typedef streambuf::off_type off_type;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/3-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/3-io.cc
index d0cc3b1f80c9..2bf1b831b00c 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/3-io.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/3-io.cc
@@ -25,7 +25,7 @@
 
 void test02(std::filebuf& in, bool pass)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   using namespace std;
   typedef streambuf::pos_type pos_type;
   typedef streambuf::off_type off_type;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/3-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/3-out.cc
index 35e5a4f0db2e..9dd1ab8a0669 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/3-out.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/char/3-out.cc
@@ -25,7 +25,7 @@
 
 void test02(std::filebuf& in, bool pass)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   using namespace std;
   typedef streambuf::pos_type pos_type;
   typedef streambuf::off_type off_type;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/wchar_t/9875_seekpos.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/wchar_t/9875_seekpos.cc
index fc03e0b431a8..37ae534eecc2 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/wchar_t/9875_seekpos.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/seekpos/wchar_t/9875_seekpos.cc
@@ -79,7 +79,7 @@ protected:
 void test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // seekpos
   wfilebuf fb;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/setbuf/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/setbuf/char/1.cc
index 25511d93ea63..e0113c9594f4 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/setbuf/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/setbuf/char/1.cc
@@ -38,7 +38,7 @@ public:
   bool
   check_pointers()
   { 
-    bool test = true;
+    bool test __attribute__((unused)) = true;
     test = (this->pbase() == NULL);
     test &= (this->pptr() == NULL);
     return test;
@@ -57,9 +57,7 @@ void test05()
   typedef std::filebuf::off_type 	off_type;
   typedef size_t 			size_type;
 
-  bool 					test = true;
-
-  int_type c1;
+  bool test __attribute__((unused)) = true;
 
   {
     testbuf 				f_tmp;
@@ -74,7 +72,7 @@ void test05()
     testbuf 				f_tmp;
     
     f_tmp.open(name_01, ios_base::out | ios_base::in);
-    int_type c1 = f_tmp.sbumpc();
+    f_tmp.sbumpc();
     
     // setbuf
     // pubsetbuf(char_type* s, streamsize n)
@@ -83,7 +81,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/setbuf/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/setbuf/char/2.cc
index 6261c999c37b..7cca957e17f7 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/setbuf/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/setbuf/char/2.cc
@@ -27,7 +27,7 @@ void test01()
 {
   using namespace std;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   char buf[512];
   const char* strlit = "how to tell a story and other essays: mark twain";
   const size_t strlitsize = std::strlen(strlit);
@@ -38,7 +38,7 @@ void test01()
   VERIFY( std::strncmp(strlit, buf, strlitsize) == 0 );
 }
 
-main() 
+int main() 
 {
   test01();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/setbuf/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/setbuf/char/3.cc
index f7a65870df4b..b5512d765347 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/setbuf/char/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/setbuf/char/3.cc
@@ -27,7 +27,7 @@ void test02()
 {
   using namespace std;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   char buf[512];
   const char* strlit = "how to tell a story and other essays: mark twain";
   const size_t strlitsize = std::strlen(strlit);
@@ -41,7 +41,7 @@ void test02()
   VERIFY( std::strncmp(strlit, buf, strlitsize) == 0 );
 }
 
-main() 
+int main() 
 {
   test02();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-in.cc
index 2a1012d812e5..9b7a942b206f 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-in.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-in.cc
@@ -37,7 +37,7 @@ void test05()
   typedef std::filebuf::int_type 	int_type;
   typedef filebuf::traits_type 		traits_type;
 
-  bool 					test = true;
+  bool test __attribute__((unused)) = true;
   int_type 			c1, c2, c3;
 
   // int_type sgetc()
@@ -64,7 +64,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-io.cc
index ca92295456ee..0395682dec36 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-io.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-io.cc
@@ -38,7 +38,7 @@ void test05()
   typedef std::filebuf::int_type 	int_type;
   typedef filebuf::traits_type 		traits_type;
 
-  bool 					test = true;
+  bool test __attribute__((unused)) = true;
   int_type 			c1, c2, c3;
 
   // int_type sgetc()
@@ -79,7 +79,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-out.cc
index cdd9bf470516..a663de2409ca 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-out.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/1-out.cc
@@ -37,8 +37,8 @@ void test05()
   typedef std::filebuf::int_type 	int_type;
   typedef filebuf::traits_type 		traits_type;
 
-  bool 					test = true;
-  int_type 			c1, c2, c3;
+  bool test __attribute__((unused)) = true;
+  int_type 			c1, c2;
 
   // int_type sgetc()
   // if read_cur not avail, return uflow(), else return *read_cur  
@@ -62,7 +62,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-in.cc
index 3c539de18402..bb08c18636d2 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-in.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-in.cc
@@ -37,7 +37,7 @@ void test05()
   typedef std::filebuf::int_type 	int_type;
   typedef filebuf::traits_type 		traits_type;
 
-  bool 					test = true;
+  bool test __attribute__((unused)) = true;
   int_type 			c1, c2, c3;
 
   // int_type sgetc()
@@ -64,7 +64,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-io.cc
index 09b6e8a7f0af..1e4bb4ea0919 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-io.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-io.cc
@@ -38,7 +38,7 @@ void test05()
   typedef std::filebuf::int_type 	int_type;
   typedef filebuf::traits_type 		traits_type;
 
-  bool 					test = true;
+  bool test __attribute__((unused)) = true;
   int_type 			c1, c2, c3;
 
   // int_type sgetc()
@@ -78,7 +78,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-out.cc
index 1db40febda2b..0357a0ba4fae 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-out.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetc/char/2-out.cc
@@ -37,8 +37,8 @@ void test05()
   typedef std::filebuf::int_type 	int_type;
   typedef filebuf::traits_type 		traits_type;
 
-  bool 					test = true;
-  int_type 			c1, c2, c3;
+  bool test __attribute__((unused)) = true;
+  int_type 			c1, c2;
 
   // int_type sgetc()
   // if read_cur not avail, return uflow(), else return *read_cur  
@@ -63,7 +63,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-in.cc
index 523bdeac34b7..8f6d83c05979 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-in.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-in.cc
@@ -37,13 +37,13 @@ void test05()
   typedef filebuf::int_type 	int_type;
   typedef filebuf::traits_type 	traits_type;
 
-  bool 				test = true;
+  bool test __attribute__((unused)) = true;
 
-  streamsize 			strmsz_1, strmsz_2, strmsz_3;
+  streamsize 			strmsz_1, strmsz_2;
   char carray1[13] = "";
   char carray2[8192] = "";
   char buffer[8192] = "";
-  int_type 			c1, c2, c3, c4;
+  int_type 			c1, c4;
   
   // streamsize sgetn(char_type *s, streamsize n)
   // streamsize xsgetn(char_type *s, streamsize n)
@@ -79,7 +79,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc
index 9942a822b264..dd2ea4736f41 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-io.cc
@@ -38,13 +38,13 @@ void test05()
   typedef filebuf::int_type 	int_type;
   typedef filebuf::traits_type 	traits_type;
 
-  bool 				test = true;
+  bool test __attribute__((unused)) = true;
 
-  streamsize 			strmsz_1, strmsz_2, strmsz_3;
+  streamsize 			strmsz_1, strmsz_2;
   char carray1[13] = "";
   char carray2[8192] = "";
   char buffer[8192] = "";
-  int_type 			c1, c2, c3, c4;
+  int_type 			c1, c4;
   
   // streamsize sgetn(char_type *s, streamsize n)
   // streamsize xsgetn(char_type *s, streamsize n)
@@ -92,7 +92,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-out.cc
index 1039c397303c..9865b7745e7c 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-out.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1-out.cc
@@ -37,12 +37,11 @@ void test05()
   typedef filebuf::int_type 	int_type;
   typedef filebuf::traits_type 	traits_type;
 
-  bool 				test = true;
+  bool test __attribute__((unused)) = true;
 
-  streamsize 			strmsz_1, strmsz_2, strmsz_3;
-  char carray1[13] = "";
+  streamsize 			strmsz_1, strmsz_2;
   char carray2[8192] = "";
-  int_type 			c1, c2, c3, c4;
+  int_type 			c2, c4;
   
   // streamsize sgetn(char_type *s, streamsize n)
   // streamsize xsgetn(char_type *s, streamsize n)
@@ -71,7 +70,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-in.cc
index 451e6dcfee33..e77cfee94d77 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-in.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-in.cc
@@ -37,13 +37,12 @@ void test05()
   typedef filebuf::int_type 	int_type;
   typedef filebuf::traits_type 	traits_type;
 
-  bool 					test = true;
+  bool test __attribute__((unused)) = true;
 
-  streamsize 			strmsz_1, strmsz_2, strmsz_3;
-  int 					i = 0, j = 0, k = 0;
+  streamsize 			strmsz_1, strmsz_2;
   char carray1[13] = "";
   char carray2[8192] = "";
-  int_type 			c1, c2, c3, c4;
+  int_type 			c1, c4;
   
   // streamsize sgetn(char_type *s, streamsize n)
   // streamsize xsgetn(char_type *s, streamsize n)
@@ -76,7 +75,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-io.cc
index a3fd754e36dc..90f00879132a 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-io.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-io.cc
@@ -38,13 +38,12 @@ void test05()
   typedef filebuf::int_type 	int_type;
   typedef filebuf::traits_type 	traits_type;
 
-  bool 					test = true;
+  bool test __attribute__((unused)) = true;
 
-  streamsize 			strmsz_1, strmsz_2, strmsz_3;
-  int 					i = 0, j = 0, k = 0;
+  streamsize 			strmsz_1, strmsz_2;
   char carray1[13] = "";
   char carray2[8192] = "";
-  int_type 			c1, c2, c3, c4;
+  int_type 			c1, c4;
   
   // streamsize sgetn(char_type *s, streamsize n)
   // streamsize xsgetn(char_type *s, streamsize n)
@@ -88,7 +87,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-out.cc
index c0e6be074433..e94de1c9378c 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-out.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/2-out.cc
@@ -37,13 +37,11 @@ void test05()
   typedef filebuf::int_type 	int_type;
   typedef filebuf::traits_type 	traits_type;
 
-  bool 					test = true;
+  bool test __attribute__((unused)) = true;
 
-  streamsize 			strmsz_1, strmsz_2, strmsz_3;
-  int 					i = 0, j = 0, k = 0;
-  char carray1[13] = "";
+  streamsize 			strmsz_1, strmsz_2;
   char carray2[8192] = "";
-  int_type 			c1, c2, c3, c4;
+  int_type 			c2, c4;
   
   // streamsize sgetn(char_type *s, streamsize n)
   // streamsize xsgetn(char_type *s, streamsize n)
@@ -72,7 +70,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/3.cc
index d3e41805938d..517d35e64ee5 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/3.cc
@@ -29,7 +29,7 @@ void test06()
 {
   using namespace std;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   char buffer[] = "xxxxxxxxxx";
   typedef filebuf::int_type	int_type;
   filebuf fbuf01;
@@ -39,7 +39,7 @@ void test06()
   VERIFY( buffer[0] == '/' );
 }
 
-main() 
+int main() 
 {
   test06();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/showmanyc/char/9533-1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/showmanyc/char/9533-1.cc
index 3c740216876e..057f72de32cf 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/showmanyc/char/9533-1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/showmanyc/char/9533-1.cc
@@ -33,7 +33,7 @@
 void test_01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* name = "tmp_fifo1";
 
   const int count = 10000;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/showmanyc/char/9533-2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/showmanyc/char/9533-2.cc
index 3a6aa302cce4..1e62cf2389e3 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/showmanyc/char/9533-2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/showmanyc/char/9533-2.cc
@@ -25,7 +25,7 @@
 void test_02()
 {
   using namespace std;
-  bool test = true;  
+  bool test __attribute__((unused)) = true;  
   const char* name = "tmp_file1";
   const char* strlit = "0123456789";
   
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-in.cc
index d2d9d3b1c55d..1d22aa5c693f 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-in.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-in.cc
@@ -38,8 +38,8 @@ void test05()
   typedef filebuf::int_type 	int_type;
   typedef filebuf::traits_type 	traits_type;
 
-  bool 					test = true;
-  int_type 			c1, c2, c3;
+  bool test __attribute__((unused)) = true;
+  int_type 			c1;
 
   // int_type snextc()
   // calls sbumpc and if sbumpc != eof, return sgetc
@@ -77,7 +77,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-io.cc
index 973d89b41f32..93764d9d7ece 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-io.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-io.cc
@@ -38,8 +38,8 @@ void test05()
   typedef filebuf::int_type 	int_type;
   typedef filebuf::traits_type 	traits_type;
 
-  bool 					test = true;
-  int_type 			c1, c2, c3;
+  bool test __attribute__((unused)) = true;
+  int_type 			c1, c3;
 
   // int_type snextc()
   // calls sbumpc and if sbumpc != eof, return sgetc
@@ -76,7 +76,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-out.cc
index fd7124a14481..6d26eac49cf9 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-out.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/1-out.cc
@@ -38,8 +38,8 @@ void test05()
   typedef filebuf::int_type 	int_type;
   typedef filebuf::traits_type 	traits_type;
 
-  bool 					test = true;
-  int_type 			c1, c2, c3;
+  bool test __attribute__((unused)) = true;
+  int_type 			c2;
 
   // int_type snextc()
   // calls sbumpc and if sbumpc != eof, return sgetc
@@ -59,7 +59,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-in.cc
index fc89dd5e644a..e30a2c6416e0 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-in.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-in.cc
@@ -36,8 +36,8 @@ void test05()
   typedef filebuf::int_type 	int_type;
   typedef filebuf::traits_type 	traits_type;
 
-  bool 					test = true;
-  int_type 			c1, c2, c3;
+  bool test __attribute__((unused)) = true;
+  int_type 			c1;
 
   // int_type snextc()
   // calls sbumpc and if sbumpc != eof, return sgetc
@@ -75,7 +75,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-io.cc
index 8c2c0e868e5c..151b6367b14b 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-io.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-io.cc
@@ -37,8 +37,8 @@ void test05()
   typedef filebuf::int_type 	int_type;
   typedef filebuf::traits_type 	traits_type;
 
-  bool 					test = true;
-  int_type 			c1, c2, c3;
+  bool test __attribute__((unused)) = true;
+  int_type 			c1, c3;
 
   // int_type snextc()
   // calls sbumpc and if sbumpc != eof, return sgetc
@@ -74,7 +74,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-out.cc
index 816c3f85406b..9627d2ac665e 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-out.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/snextc/char/2-out.cc
@@ -36,8 +36,8 @@ void test05()
   typedef filebuf::int_type 	int_type;
   typedef filebuf::traits_type 	traits_type;
 
-  bool 					test = true;
-  int_type 			c1, c2, c3;
+  bool test __attribute__((unused)) = true;
+  int_type 			c2;
 
   // int_type snextc()
   // calls sbumpc and if sbumpc != eof, return sgetc
@@ -56,7 +56,7 @@ void test05()
  }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-in.cc
index 1d216e8ec207..35665f55e3b7 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-in.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-in.cc
@@ -37,7 +37,7 @@ void test01()
   typedef std::filebuf::int_type 	int_type;
   typedef filebuf::traits_type 		traits_type;
 
-  bool 					test = true;
+  bool test __attribute__((unused)) = true;
   int_type 			c1, c2, c3;
 
   // int_type sputbackc(char_type c)
@@ -85,7 +85,7 @@ void test01()
   }
 }
 
-main() 
+int main() 
 {
   test01();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-io.cc
index d867e5b87a27..27c50b22a98e 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-io.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-io.cc
@@ -38,7 +38,7 @@ void test01()
   typedef filebuf::traits_type 	traits_type;
   typedef size_t 			size_type;
 
-  bool 					test = true;
+  bool test __attribute__((unused)) = true;
   streamsize 			strmsz_1, strmsz_2;
   int_type 			c1, c2, c3;
 
@@ -95,7 +95,7 @@ void test01()
   }
 }
 
-main() 
+int main() 
 {
   test01();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-out.cc
index 5b5dbb557c1a..1f20f19901df 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-out.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/1-out.cc
@@ -37,8 +37,8 @@ void test01()
   typedef std::filebuf::int_type 	int_type;
   typedef filebuf::traits_type 		traits_type;
 
-  bool 					test = true;
-  int_type 			c1, c2, c3;
+  bool test __attribute__((unused)) = true;
+  int_type 			c1, c2;
 
   // int_type sputbackc(char_type c)
   // if in_cur not avail || ! traits::eq(c, gptr() [-1]), return pbfail
@@ -63,7 +63,7 @@ void test01()
   }
 }
 
-main() 
+int main() 
 {
   test01();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-in.cc
index a9267cf00343..52900e84eb3f 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-in.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-in.cc
@@ -37,7 +37,7 @@ void test01()
   typedef std::filebuf::int_type 	int_type;
   typedef filebuf::traits_type 		traits_type;
 
-  bool 					test = true;
+  bool test __attribute__((unused)) = true;
   int_type 			c1, c2, c3;
 
   // int_type sputbackc(char_type c)
@@ -85,7 +85,7 @@ void test01()
   }
 }
 
-main() 
+int main() 
 {
   test01();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-io.cc
index e7166106d59e..0174a928e89d 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-io.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-io.cc
@@ -38,7 +38,7 @@ void test01()
   typedef filebuf::traits_type 	traits_type;
   typedef size_t 			size_type;
 
-  bool 					test = true;
+  bool test __attribute__((unused)) = true;
   streamsize 			strmsz_1, strmsz_2;
   int_type 			c1, c2, c3;
 
@@ -94,7 +94,7 @@ void test01()
   }
 }
 
-main() 
+int main() 
 {
   test01();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-out.cc
index 2ff9a6c5aad4..ce6de8ec0768 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-out.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/2-out.cc
@@ -37,8 +37,8 @@ void test01()
   typedef std::filebuf::int_type 	int_type;
   typedef filebuf::traits_type 		traits_type;
 
-  bool 					test = true;
-  int_type 			c1, c2, c3;
+  bool test __attribute__((unused)) = true;
+  int_type 			c1, c2;
 
   // int_type sputbackc(char_type c)
   // if in_cur not avail || ! traits::eq(c, gptr() [-1]), return pbfail
@@ -64,7 +64,7 @@ void test01()
   }
 }
 
-main() 
+int main() 
 {
   test01();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/9425.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/9425.cc
index b5e470f332a5..5ad5aeea235c 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/9425.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputbackc/char/9425.cc
@@ -31,7 +31,7 @@ const char name_01[] = "filebuf_virtuals-1.txt"; // file with data in it
 void test09()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   filebuf fbuf;
   fbuf.open(name_01, ios_base::in);
@@ -41,7 +41,7 @@ void test09()
   VERIFY( r == filebuf::traits_type::eof() );
 }
 
-main() 
+int main() 
 {
   test09();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-in.cc
index 31b176bcbf6a..e331e69b07d3 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-in.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-in.cc
@@ -37,10 +37,8 @@ void test05()
   typedef filebuf::int_type 	int_type;
   typedef filebuf::traits_type 	traits_type;
 
-  bool 					test = true;
-  streamsize 			strmsz_1, strmsz_2;
-  int 					i = 0, j = 0, k = 0;
-  int_type 			c1, c2, c3;
+  bool test __attribute__((unused)) = true;
+  int_type 			c3;
 
   // int_type sputc(char_type c)
   // if out_cur not avail, return overflow(traits_type::to_int_type(c)) 
@@ -58,7 +56,7 @@ void test05()
    }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-io.cc
index 275def183973..94b4c624ae5c 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-io.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-io.cc
@@ -38,10 +38,8 @@ void test05()
   typedef filebuf::int_type 	int_type;
   typedef filebuf::traits_type 	traits_type;
 
-  bool 					test = true;
-  streamsize 			strmsz_1, strmsz_2;
-  int 					i = 0, j = 0, k = 0;
-  int_type 			c1, c2, c3;
+  bool test __attribute__((unused)) = true;
+  int_type 			c1, c2;
 
   // int_type sputc(char_type c)
   // if out_cur not avail, return overflow(traits_type::to_int_type(c)) 
@@ -65,7 +63,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-out.cc
index 09086b07d60f..6219b34062e5 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-out.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1-out.cc
@@ -37,10 +37,8 @@ void test05()
   typedef filebuf::int_type 	int_type;
   typedef filebuf::traits_type 	traits_type;
 
-  bool 					test = true;
-  streamsize 			strmsz_1, strmsz_2;
-  int 					i = 0, j = 0, k = 0;
-  int_type 			c1, c2, c3;
+  bool test __attribute__((unused)) = true;
+  int_type 			c1, c2;
 
   // int_type sputc(char_type c)
   // if out_cur not avail, return overflow(traits_type::to_int_type(c)) 
@@ -64,7 +62,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-in.cc
index 680e058a9049..70ef74bf1c0a 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-in.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-in.cc
@@ -37,10 +37,8 @@ void test05()
   typedef filebuf::int_type 	int_type;
   typedef filebuf::traits_type 	traits_type;
 
-  bool 					test = true;
-  streamsize 			strmsz_1, strmsz_2;
-  int 					i = 0, j = 0, k = 0;
-  int_type 			c1, c2, c3;
+  bool test __attribute__((unused)) = true;
+  int_type 			c3;
 
   // int_type sputc(char_type c)
   // if out_cur not avail, return overflow(traits_type::to_int_type(c)) 
@@ -59,7 +57,7 @@ void test05()
    }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-io.cc
index abbdea55fbd6..069982adae9d 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-io.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-io.cc
@@ -38,10 +38,8 @@ void test05()
   typedef filebuf::int_type 	int_type;
   typedef filebuf::traits_type 	traits_type;
 
-  bool 					test = true;
-  streamsize 			strmsz_1, strmsz_2;
-  int 					i = 0, j = 0, k = 0;
-  int_type 			c1, c2, c3;
+  bool test __attribute__((unused)) = true;
+  int_type 			c1, c2;
 
   // int_type sputc(char_type c)
   // if out_cur not avail, return overflow(traits_type::to_int_type(c)) 
@@ -64,7 +62,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-out.cc
index 78e2b4eb3d6f..d0a24ddb60de 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-out.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/2-out.cc
@@ -37,10 +37,8 @@ void test05()
   typedef filebuf::int_type 	int_type;
   typedef filebuf::traits_type 	traits_type;
 
-  bool 					test = true;
-  streamsize 			strmsz_1, strmsz_2;
-  int 					i = 0, j = 0, k = 0;
-  int_type 			c1, c2, c3;
+  bool test __attribute__((unused)) = true;
+  int_type 			c1, c2;
 
   // int_type sputc(char_type c)
   // if out_cur not avail, return overflow(traits_type::to_int_type(c)) 
@@ -65,7 +63,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/9701-2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/9701-2.cc
index 1d100dd3ede0..85941c81b2d9 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/9701-2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/9701-2.cc
@@ -46,7 +46,7 @@ public:
 // libstdc++/9701 (partial)
 void test11()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   bool over_expected;
 
@@ -64,7 +64,7 @@ void test11()
   dfbuf_01.close();
 }
 
-main() 
+int main() 
 {
   test11();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-in.cc
index 4888f23bb162..c5a860db60de 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-in.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-in.cc
@@ -38,8 +38,8 @@ void test05()
   typedef filebuf::traits_type 	traits_type;
   typedef size_t 			size_type;
 
-  bool 					test = true;
-  streamsize 			strmsz_1, strmsz_2;
+  bool test __attribute__((unused)) = true;
+  streamsize 			strmsz_1;
 
   // streamsize sputn(const char_typs* s, streamsize n)
   // write up to n chars to out_cur from s, returning number assigned
@@ -56,7 +56,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-io.cc
index 7f32662d315c..84eb9f81cc1f 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-io.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-io.cc
@@ -39,7 +39,7 @@ void test05()
   typedef filebuf::traits_type 	traits_type;
   typedef size_t 			size_type;
 
-  bool 					test = true;
+  bool test __attribute__((unused)) = true;
   streamsize 			strmsz_1, strmsz_2;
 
   // streamsize sputn(const char_typs* s, streamsize n)
@@ -62,7 +62,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-out.cc
index d17db7abf3b1..3753a4be2622 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-out.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1-out.cc
@@ -38,8 +38,8 @@ void test05()
   typedef filebuf::traits_type 	traits_type;
   typedef size_t 			size_type;
 
-  bool 					test = true;
-  streamsize 			strmsz_1, strmsz_2;
+  bool test __attribute__((unused)) = true;
+  streamsize 			strmsz_1;
 
   // streamsize sputn(const char_typs* s, streamsize n)
   // write up to n chars to out_cur from s, returning number assigned
@@ -58,7 +58,7 @@ void test05()
    }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-in.cc
index a9f188cf410e..a2a2322dd865 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-in.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-in.cc
@@ -38,8 +38,8 @@ void test05()
   typedef filebuf::traits_type 	traits_type;
   typedef size_t 			size_type;
 
-  bool 					test = true;
-  streamsize 			strmsz_1, strmsz_2;
+  bool test __attribute__((unused)) = true;
+  streamsize 			strmsz_1;
 
   // streamsize sputn(const char_typs* s, streamsize n)
   // write up to n chars to out_cur from s, returning number assigned
@@ -57,7 +57,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-io.cc
index 2dc0204c94e5..fce28d32ce37 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-io.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-io.cc
@@ -39,7 +39,7 @@ void test05()
   typedef filebuf::traits_type 	traits_type;
   typedef size_t 			size_type;
 
-  bool 					test = true;
+  bool test __attribute__((unused)) = true;
   streamsize 			strmsz_1, strmsz_2;
 
   // streamsize sputn(const char_typs* s, streamsize n)
@@ -61,7 +61,7 @@ void test05()
   }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-out.cc
index 26046b17a350..9a4fa156b424 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-out.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/2-out.cc
@@ -38,8 +38,8 @@ void test05()
   typedef filebuf::traits_type 	traits_type;
   typedef size_t 			size_type;
 
-  bool 					test = true;
-  streamsize 			strmsz_1, strmsz_2;
+  bool test __attribute__((unused)) = true;
+  streamsize 			strmsz_1;
 
   // streamsize sputn(const char_typs* s, streamsize n)
   // write up to n chars to out_cur from s, returning number assigned
@@ -59,7 +59,7 @@ void test05()
    }
 }
 
-main() 
+int main() 
 {
   test05();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/9339.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/9339.cc
index fb9313986201..4fd774ee4a1a 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/9339.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/9339.cc
@@ -23,7 +23,7 @@
 void test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   filebuf fbuf01;
   int len = 35;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/9701-1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/9701-1.cc
index b675d79d0bb8..7335ca799926 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/9701-1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/9701-1.cc
@@ -50,7 +50,7 @@ public:
 // libstdc++/9701 (partial)
 void test11()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   bool over_expected;
 
@@ -68,7 +68,7 @@ void test11()
   dfbuf_02.close();
 }
 
-main() 
+int main() 
 {
   test11();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-in.cc
index 7e3b9c076219..873efa1c27ff 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-in.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-in.cc
@@ -37,7 +37,7 @@ void test01()
   typedef std::filebuf::int_type 	int_type;
   typedef filebuf::traits_type 		traits_type;
 
-  bool 					test = true;
+  bool test __attribute__((unused)) = true;
   int_type 			        c1, c2, c3;
 
   // int_type sungetc()
@@ -64,7 +64,7 @@ void test01()
   }
 }
 
-main() 
+int main() 
 {
   test01();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-io.cc
index 5cbaf1b8db22..fb45945119b7 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-io.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-io.cc
@@ -38,7 +38,7 @@ void test01()
   typedef filebuf::traits_type 	traits_type;
   typedef size_t 		size_type;
 
-  bool 				test = true;
+  bool test __attribute__((unused)) = true;
   streamsize 			strmsz_1, strmsz_2;
   int_type 			c1, c2, c3;
 
@@ -76,7 +76,7 @@ void test01()
   }
 }
 
-main() 
+int main() 
 {
   test01();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-out.cc
index daefb70b9975..8c8737d601e2 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-out.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/1-out.cc
@@ -37,8 +37,8 @@ void test01()
   typedef std::filebuf::int_type 	int_type;
   typedef filebuf::traits_type 		traits_type;
 
-  bool 					test = true;
-  int_type 			c1, c2, c3;
+  bool test __attribute__((unused)) = true;
+  int_type 			c1, c2;
 
   // int_type sungetc()
   // if in_cur not avail, return pbackfail(), else decrement and
@@ -63,7 +63,7 @@ void test01()
   }
 }
 
-main() 
+int main() 
 {
   test01();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-in.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-in.cc
index d35a3f2ae8b0..d0bbb5b21dbf 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-in.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-in.cc
@@ -37,7 +37,7 @@ void test01()
   typedef std::filebuf::int_type 	int_type;
   typedef filebuf::traits_type 		traits_type;
 
-  bool 					test = true;
+  bool test __attribute__((unused)) = true;
   int_type 			        c1, c2, c3;
 
   // int_type sungetc()
@@ -65,7 +65,7 @@ void test01()
   }
 }
 
-main() 
+int main() 
 {
   test01();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-io.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-io.cc
index b45ba2676bfa..72f90ed08a44 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-io.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-io.cc
@@ -38,7 +38,7 @@ void test01()
   typedef filebuf::traits_type 	traits_type;
   typedef size_t 		size_type;
 
-  bool 				test = true;
+  bool test __attribute__((unused)) = true;
   streamsize 			strmsz_1, strmsz_2;
   int_type 			c1, c2, c3;
 
@@ -75,7 +75,7 @@ void test01()
   }
 }
 
-main() 
+int main() 
 {
   test01();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-out.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-out.cc
index f08df15e7b83..73718d9fa457 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-out.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sungetc/char/2-out.cc
@@ -37,8 +37,8 @@ void test01()
   typedef std::filebuf::int_type 	int_type;
   typedef filebuf::traits_type 		traits_type;
 
-  bool 					test = true;
-  int_type 			c1, c2, c3;
+  bool test __attribute__((unused)) = true;
+  int_type 			c1, c2;
 
   // int_type sungetc()
   // if in_cur not avail, return pbackfail(), else decrement and
@@ -64,7 +64,7 @@ void test01()
   }
 }
 
-main() 
+int main() 
 {
   test01();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sync/char/1057.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sync/char/1057.cc
index 02feef5a6e8c..a3071b787bd3 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sync/char/1057.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sync/char/1057.cc
@@ -80,7 +80,7 @@ public:
 // libstdc++/1057
 void test04()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::string text = "abcdefghijklmn";
   
   // 01
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sync/char/9182-1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sync/char/9182-1.cc
index a0411e2fff30..9448c8490c7f 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sync/char/9182-1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sync/char/9182-1.cc
@@ -51,7 +51,7 @@ protected:
 void test13()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   locale loc =  locale::classic();
   loc = locale(loc, new errorcvt);
@@ -65,7 +65,7 @@ void test13()
   fbuf1.close();
 }
 
-main() 
+int main() 
 {
   test13();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/1.cc
index 40e51371c9c9..60d5d38d78d3 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/1.cc
@@ -47,7 +47,7 @@ protected:
 void test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* name = "filebuf_virtuals-1.txt";
 
   string str;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/10097.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/10097.cc
index 695ca8221b52..156421092dd0 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/10097.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/10097.cc
@@ -48,7 +48,7 @@ public:
 void test16()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   const char* name = "tmp_fifo1";
   
@@ -97,7 +97,7 @@ void test16()
   fb.close();
 }
 
-main() 
+int main() 
 {
   test16();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/2.cc
index 8032a42f6c84..da498f2112c3 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/2.cc
@@ -25,7 +25,7 @@
 
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   using namespace std;
 
   filebuf fb_out, fb_in_out;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/9027.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/9027.cc
index 0e4c077bc214..768cba16172d 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/9027.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/9027.cc
@@ -62,7 +62,7 @@ void test01()
 {
   using namespace std;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* name = "filebuf_virtuals-1.txt";
   locale loc (locale::classic(), new Cvt_to_upper);	
 
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/1.cc
index d55b89c90ac1..8afb2b6621af 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/1.cc
@@ -29,7 +29,7 @@
 void test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char name[] = "tmp_underflow-1.tst";
 
   const char cstr[] =
@@ -99,7 +99,7 @@ void test01()
   streamsize n = fb.sgetn(wbuf, wlen + 1);
   fb.close();
 
-  VERIFY( n == wlen );
+  VERIFY( n == static_cast<streamsize>(wlen) );
   VERIFY( !wmemcmp(wbuf, wstr, wlen) );
 }
 
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-1.cc
index d0753650d120..ba59cb0d7c7b 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-1.cc
@@ -26,7 +26,7 @@ const char name_01[] = "tmp_11389-1";
 void test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   filebuf fbout;
   fbout.open(name_01, ios_base::out);
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-2.cc
index 1717f2a5aeb7..3917ca5a8462 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-2.cc
@@ -26,7 +26,7 @@ const char name_02[] = "tmp_11389-2";
 void test02()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   filebuf fbout;
   fbout.open(name_02, ios_base::out);
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-3.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-3.cc
index c23cb56f26b4..dcf164bb37df 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-3.cc
@@ -26,7 +26,7 @@ const char name_03[] = "tmp_11389-3";
 void test03()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   filebuf fbout;
   fbout.open(name_03, ios_base::out);
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-4.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-4.cc
index ec2f0f892455..5b4ebe4f6efa 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-4.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/11389-4.cc
@@ -26,7 +26,7 @@ const char name_04[] = "tmp_11389-4";
 void test04()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   filebuf fbout;
   fbout.open(name_04, ios_base::out);
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/2.cc
index 77616ed5d91e..5f255b2dc224 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/2.cc
@@ -29,7 +29,7 @@
 void test02()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char name[] = "tmp_underflow-2.tst";
 
   const char cstr[] =
@@ -100,7 +100,7 @@ void test02()
   streamsize n = fb.sgetn(wbuf, wlen + 1);
   fb.close();
 
-  VERIFY( n == wlen );
+  VERIFY( n == static_cast<streamsize>(wlen) );
   VERIFY( !wmemcmp(wbuf, wstr, wlen) );
 }
 
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/3.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/3.cc
index 169d3ebfa25f..8812f1e38280 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/3.cc
@@ -29,7 +29,7 @@
 void test03()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char name[] = "tmp_underflow-3.tst";
 
   const char cstr[] =
@@ -101,7 +101,7 @@ void test03()
   for (int i = 0; i < loops; ++i)
     {
       streamsize n = fb.sgetn(wbuf, wlen);
-      VERIFY( n == wlen );
+      VERIFY( n == static_cast<streamsize>(wlen) );
       VERIFY( !wmemcmp(wbuf, wstr, wlen) );
     }
 
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/4.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/4.cc
index 00fb3774489b..753015900503 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/4.cc
@@ -27,7 +27,7 @@
 
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   using namespace std;
 
   locale loc (__gnu_test::try_named_locale("se_NO.UTF-8"));
@@ -41,7 +41,7 @@ void test01()
   fb_out.close();
 
   fb_in_out.open("tmp_underflow.tst", ios::in | ios::out);
-  while (fb_in_out.sbumpc() != filebuf::traits_type::eof());
+  while (fb_in_out.sbumpc() != wfilebuf::traits_type::eof());
 
   VERIFY( fb_in_out.sputc(L'x') == L'x' );
   fb_in_out.close();
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/5.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/5.cc
index f8636b0cc303..5d8e25e5325e 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/5.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/5.cc
@@ -29,7 +29,7 @@
 void test05()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* name = "tmp_underflow-5";
 
   wfilebuf fb;
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/9178.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/9178.cc
index 8a5797053fb8..3059724b44e6 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/9178.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/9178.cc
@@ -162,7 +162,7 @@ protected:
 void test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   locale loc;
   loc = locale(loc, new checksumcvt<wchar_t>);
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/9520.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/9520.cc
index 5bd831378d7d..f1fd8ef412c5 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/9520.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/9520.cc
@@ -27,7 +27,7 @@ void test01()
 {
   using namespace std;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* name = "tmp_9520";
 
   FILE* file = fopen(name, "w");
diff --git a/libstdc++-v3/testsuite/27_io/basic_fstream/3.cc b/libstdc++-v3/testsuite/27_io/basic_fstream/3.cc
index 4f78ed0d1939..c71e0e86b94c 100644
--- a/libstdc++-v3/testsuite/27_io/basic_fstream/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_fstream/3.cc
@@ -117,7 +117,7 @@ struct gnu_char_traits
 
 void test07()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::basic_fstream<gnu_char_type, gnu_char_traits> gnu_fstr;
 
   try
diff --git a/libstdc++-v3/testsuite/27_io/basic_fstream/4.cc b/libstdc++-v3/testsuite/27_io/basic_fstream/4.cc
index a7f46d61d8a3..cf838faab05c 100644
--- a/libstdc++-v3/testsuite/27_io/basic_fstream/4.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_fstream/4.cc
@@ -29,7 +29,7 @@ void test01()
   typedef std::fstream test_type;
   typedef std::iostream base_type;
   const test_type& obj = test_type();
-  const base_type* base = &obj;
+  const base_type* base __attribute__((unused)) = &obj;
 }
 
 int main()
diff --git a/libstdc++-v3/testsuite/27_io/basic_fstream/rdbuf/char/2832.cc b/libstdc++-v3/testsuite/27_io/basic_fstream/rdbuf/char/2832.cc
index 136252b8efb3..b5606c0169fd 100644
--- a/libstdc++-v3/testsuite/27_io/basic_fstream/rdbuf/char/2832.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_fstream/rdbuf/char/2832.cc
@@ -34,9 +34,8 @@ active_buffer(std::ios& stream)
 // libstdc++/2832
 void test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* strlit01 = "fuck war";
-  const char* strlit02 = "two less cars abstract riot crew, critical mass/SF";
   const std::string str00;
   const std::string str01(strlit01);
   std::string str02;
diff --git a/libstdc++-v3/testsuite/27_io/basic_ifstream/3.cc b/libstdc++-v3/testsuite/27_io/basic_ifstream/3.cc
index dd38b252c656..7ffd7b3b9af3 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ifstream/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ifstream/3.cc
@@ -117,7 +117,7 @@ struct gnu_char_traits
 
 void test07()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::basic_ifstream<gnu_char_type, gnu_char_traits> gnu_ifstr;
 
   try
diff --git a/libstdc++-v3/testsuite/27_io/basic_ifstream/4.cc b/libstdc++-v3/testsuite/27_io/basic_ifstream/4.cc
index 08827c3aec6f..3c6efe85d5f8 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ifstream/4.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ifstream/4.cc
@@ -29,7 +29,7 @@ void test01()
   typedef std::ifstream test_type;
   typedef std::istream base_type;
   const test_type& obj = test_type();
-  const base_type* base = &obj;
+  const base_type* base __attribute__((unused)) = &obj;
 }
 
 int main()
diff --git a/libstdc++-v3/testsuite/27_io/basic_ifstream/cons/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ifstream/cons/char/1.cc
index e211d0cc6437..43ef6ccf91c6 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ifstream/cons/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ifstream/cons/char/1.cc
@@ -29,7 +29,7 @@ const char name_01[] = "ifstream_members-1.tst";
 // http://gcc.gnu.org/ml/libstdc++/2000-07/msg00004.html
 void test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const int more_than_max_open_files = 8200;
   
   for (int i = 0; ++i < more_than_max_open_files;)
diff --git a/libstdc++-v3/testsuite/27_io/basic_ifstream/open/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ifstream/open/char/1.cc
index 5a8b6f8b3a4f..dcb89a6dfa2b 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ifstream/open/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ifstream/open/char/1.cc
@@ -29,7 +29,7 @@ const char name_01[] = "ifstream_members-1.tst";
 // http://gcc.gnu.org/ml/libstdc++/2000-06/msg00136.html
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::ifstream ifs1;
   ifs1.close();
   
diff --git a/libstdc++-v3/testsuite/27_io/basic_ifstream/rdbuf/char/2832.cc b/libstdc++-v3/testsuite/27_io/basic_ifstream/rdbuf/char/2832.cc
index 947a77dce2be..c07bea1cd3e4 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ifstream/rdbuf/char/2832.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ifstream/rdbuf/char/2832.cc
@@ -38,9 +38,8 @@ active_buffer(std::ios& stream)
 // libstdc++/2832
 void test03()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* strlit01 = "fuck war";
-  const char* strlit02 = "two less cars abstract riot crew, critical mass/SF";
   const std::string str00;
   const std::string str01(strlit01);
   std::string str02;
diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/3.cc b/libstdc++-v3/testsuite/27_io/basic_ios/3.cc
index fd3742bf8abc..f724788deb40 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ios/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ios/3.cc
@@ -118,7 +118,7 @@ class gnu_ios: public std::basic_ios<gnu_char_type, gnu_char_traits>
 
 void test07()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   
   try
     { gnu_ios obj; }
diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/4.cc b/libstdc++-v3/testsuite/27_io/basic_ios/4.cc
index b527499dcb40..517799e861be 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ios/4.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ios/4.cc
@@ -31,7 +31,7 @@ void test01()
   
   std::stringbuf buf;
   const test_type& obj = test_type(&buf);
-  const base_type* base = &obj;
+  const base_type* base __attribute__((unused)) = &obj;
 }
 
 int main()
diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/clear/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ios/clear/char/1.cc
index 6629371ed039..71b0e1705778 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ios/clear/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ios/clear/char/1.cc
@@ -36,7 +36,7 @@
 // 27.4.4.3 basic_ios iostate flags function
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   typedef std::ios_base::fmtflags fmtflags;
   typedef std::ios_base::iostate iostate;
@@ -44,11 +44,7 @@ void test01()
 
   iostate iostate02, iostate03;
   const iostate iostate01 = std::ios_base::badbit | std::ios_base::eofbit;
-  const iostate iostate04 = std::ios_base::badbit;
-
   std::ios ios_01(NULL);
-  std::ios::char_type ct01;
-  std::ios::char_type ct02('x');;
 
   // bool fail() const
   VERIFY( ios_01.fail() );
diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/cons/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ios/cons/char/1.cc
index 2c8993afd7e3..b3e0624a5deb 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ios/cons/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ios/cons/char/1.cc
@@ -35,7 +35,7 @@
 
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::string str_01("jade cove, big sur");
   std::string str_05;
   std::stringbuf strb_01;
@@ -43,7 +43,7 @@ void test01()
   std::stringbuf strb_03(str_01, std::ios_base::out);
   const std::ios_base::fmtflags flag01 = std::ios_base::skipws | 
     					 std::ios_base::dec;
-  std::ios_base::fmtflags flag02, flag03;
+  std::ios_base::fmtflags flag02;
   const std::locale glocale = std::locale();
 
   // explicit basic_ios(streambuf* sb)
diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/cons/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_ios/cons/char/2.cc
index 84808f8b14fd..6cf94cbc79c3 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ios/cons/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ios/cons/char/2.cc
@@ -39,7 +39,7 @@ class gnu_ios: public std::basic_ios<char> { };
 
 void test01() 
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // 01: Doesn't call basic_ios::init, which uses ctype<char_type>..
   // This should be unambiguously correct.
diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/cons/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_ios/cons/char/3.cc
index a0f7afa42870..0db96304d0fb 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ios/cons/char/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ios/cons/char/3.cc
@@ -125,7 +125,7 @@ namespace std
 
 void test02() 
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // 02: Calls basic_ios::init, which may call ctype<char_type>...
   try
diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/1.cc
index 191cbb608307..edc407fd55ac 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/1.cc
@@ -36,16 +36,12 @@
 // 27.4.4.3 basic_ios iostate flags function
 void test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   typedef std::ios_base::fmtflags fmtflags;
   typedef std::ios_base::iostate iostate;
   using std::ios_base;
 
-  iostate iostate02, iostate03;
-  const iostate iostate01 = std::ios_base::badbit | std::ios_base::eofbit;
-  const iostate iostate04 = std::ios_base::badbit;
-
   // basic_ios& copyfmt(const basic_ios& rhs)
   {
     std::ios ios_01(NULL);
diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/2.cc
index 3286411eb628..638bd46e141e 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/2.cc
@@ -36,7 +36,7 @@
 // copyfmt and locales.
 void test03()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   using namespace std;
 
diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/exceptions/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ios/exceptions/char/1.cc
index f593b90259d8..4c3352fba80a 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ios/exceptions/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ios/exceptions/char/1.cc
@@ -35,17 +35,14 @@
 
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   typedef std::ios_base::fmtflags fmtflags;
   typedef std::ios_base::iostate iostate;
   using std::ios_base;
 
-  iostate iostate02, iostate03;
-  const iostate iostate01 = std::ios_base::badbit | std::ios_base::eofbit;
-  const iostate iostate04 = std::ios_base::badbit;
-
   // iostate exceptions() const
+  iostate iostate02;
   {
     std::ios ios_01(NULL);
     VERIFY( ios_01.exceptions() == std::ios_base::goodbit );
diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/locales/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ios/locales/char/1.cc
index a95bd99c4dc7..81779bae62f1 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ios/locales/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ios/locales/char/1.cc
@@ -35,12 +35,7 @@
 
 void test01()
 {
-  bool test = true;
-
-  std::ios_base::fmtflags flag02, flag03;
-  const std::ios_base::fmtflags flag01 = std::ios_base::skipws 
-                                         | std::ios_base::dec;
- 
+  bool test __attribute__((unused)) = true;
   const std::locale c_loc = std::locale::classic();
 
   std::ios ios_01(NULL);
diff --git a/libstdc++-v3/testsuite/27_io/basic_iostream/3.cc b/libstdc++-v3/testsuite/27_io/basic_iostream/3.cc
index 004a363063de..2c539cf0de08 100644
--- a/libstdc++-v3/testsuite/27_io/basic_iostream/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_iostream/3.cc
@@ -117,7 +117,7 @@ struct gnu_char_traits
 
 void test07()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::basic_iostream<gnu_char_type, gnu_char_traits> gnu_iostr;
 
   try
diff --git a/libstdc++-v3/testsuite/27_io/basic_iostream/4.cc b/libstdc++-v3/testsuite/27_io/basic_iostream/4.cc
index dbcf83037461..0c47e675162d 100644
--- a/libstdc++-v3/testsuite/27_io/basic_iostream/4.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_iostream/4.cc
@@ -32,8 +32,8 @@ void test01()
 
   std::stringbuf buf;
   const test_type& obj = test_type(&buf);
-  const base_type1* base1 = &obj;
-  const base_type2* base2 = &obj;
+  const base_type1* base1 __attribute__((unused)) = &obj;
+  const base_type2* base2 __attribute__((unused)) = &obj;
 }
 
 int main()
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/3.cc b/libstdc++-v3/testsuite/27_io/basic_istream/3.cc
index 8bd7b8a72268..d9f8570bbdbf 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/3.cc
@@ -117,7 +117,7 @@ struct gnu_char_traits
 
 void test07()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::basic_istream<gnu_char_type, gnu_char_traits> gnu_istr;
 
   try
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/4.cc b/libstdc++-v3/testsuite/27_io/basic_istream/4.cc
index 4282fef84b2e..fe7a394691a3 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/4.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/4.cc
@@ -31,7 +31,7 @@ void test01()
   
   std::stringbuf buf;
   const test_type& obj = test_type(&buf);
-  const base_type* base = &obj;
+  const base_type* base __attribute__((unused)) = &obj;
 }
 
 int main()
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/exceptions/char/9561.cc b/libstdc++-v3/testsuite/27_io/basic_istream/exceptions/char/9561.cc
index 055c4fb02c52..315b651c93c3 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/exceptions/char/9561.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/exceptions/char/9561.cc
@@ -40,7 +40,7 @@ struct buf: std::streambuf
 void test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   buf b;
   std::istream strm (&b);
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/01.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/01.cc
index 9c3b3605cb89..ef4e6ada684b 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/01.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/01.cc
@@ -46,11 +46,10 @@ std::stringstream ss_01(str_01);
 // minimal sanity check
 bool test01() {
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // Integral Types:
   bool 			b1  = false;
-  bool 			b2  = false;
   short 		s1  = 0;
   int	 		i1  = 0;
   long	 		l1  = 0;
@@ -117,7 +116,7 @@ bool test01() {
 
   ss_01 << po;
   ss_01 >> pi;
-  std::printf ("%x %x\n", pi, po);
+  std::printf ("%p %p\n", pi, po);
   VERIFY( po == pi );
   return test;
 }
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/02.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/02.cc
index 94136d2e1687..7a5e44502618 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/02.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/02.cc
@@ -46,7 +46,7 @@ std::stringstream ss_01(str_01);
 // elaborated test for ints
 bool test02() {
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const std::string str_01("20000AB");
   std::stringbuf strb_01(str_01, std::ios_base::in);
   std::istream is(&strb_01);
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/03.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/03.cc
index 65306c4d6e34..9b467d374878 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/03.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/03.cc
@@ -49,7 +49,7 @@ bool test03()
   std::istream istr(&sbuf);
   std::ostream ostr(&sbuf);
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   long l01;
   ostr <<  "12220101";
   istr >>  l01; // _M_in_end set completely incorrectly here.
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/06.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/06.cc
index 206c81e506b7..5c615aaebb68 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/06.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/06.cc
@@ -48,8 +48,8 @@ std::stringstream ss_01(str_01);
 void test06()
 {
   // default locale, grouping is turned off
-  bool test = true;
-  unsigned int h4, h3, h2;
+  bool test __attribute__((unused)) = true;
+  unsigned int h4;
   char c;
   std::string s("205,199,144");
   std::istringstream is(s);
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/07.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/07.cc
index 6167471ba49c..5efff5744a67 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/07.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/07.cc
@@ -56,7 +56,7 @@ namespace std {
 void test07()
 {
   // manufactured locale, grouping is turned on
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   unsigned int h4 = 0, h3 = 0, h2 = 0;
   float f1 = 0.0;
   const std::string s1("205,199 23,445.25 1,024,365 123,22,24");
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/08.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/08.cc
index 2a2c3cc1ff7a..276fd913dfc6 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/08.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/08.cc
@@ -56,9 +56,8 @@ namespace std {
 void test08()
 {
   // manufactured locale, grouping is turned on
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   unsigned int h4 = 0, h3 = 0, h2 = 0;
-  float f1 = 0.0;
   const std::string s1("1,22 205,19 22,123,22");
   const std::string s2("1,220 2050,19 202,123,22");
 
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/09.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/09.cc
index 67d98d53de8e..23e68a7629b8 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/09.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/09.cc
@@ -45,7 +45,7 @@ std::stringstream ss_01(str_01);
  
 bool test09()
 {
-   bool test = true;
+   bool test __attribute__((unused)) = true;
 
    std::string st("2.456e3-+0.567e-2");
    std::stringbuf sb(st);
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/10.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/10.cc
index de7bbf9ada88..5df68d5845de 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/10.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/10.cc
@@ -48,7 +48,7 @@ bool test10() {
   std::stringbuf isbuf_01(str_01);
   std::istream is_01(&isbuf_01);
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   int n = 365;
   is_01 >> n;
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/11.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/11.cc
index 309875dfc54a..fc7d25e6ae27 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/11.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/11.cc
@@ -48,7 +48,7 @@ std::stringstream ss_01(str_01);
 // libstdc++/90
 bool test11()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* cstrlit = "0x2a";
 
   // sanity check via 'C' library call
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc
index 4d7a7fe68256..93952bc9e370 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc
@@ -50,7 +50,7 @@ std::stringstream ss_01(str_01);
 template<typename T>
 bool test12_aux(bool integer_type)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   
   int digits_overflow;
   if (integer_type)
@@ -62,7 +62,7 @@ bool test12_aux(bool integer_type)
   
   std::string st;
   std::string part = "1234567890123456789012345678901234567890";
-  for (int i = 0; i < digits_overflow / part.size() + 1; ++i)
+  for (std::size_t i = 0; i < digits_overflow / part.size() + 1; ++i)
     st += part;
   std::stringbuf sb(st);
   std::istream is(&sb);
@@ -74,7 +74,7 @@ bool test12_aux(bool integer_type)
 
 bool test12()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   VERIFY(test12_aux<short>(true));
   VERIFY(test12_aux<int>(true));
   VERIFY(test12_aux<long>(true));
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/13.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/13.cc
index 935d456f448a..22896df79f37 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/13.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/13.cc
@@ -47,8 +47,7 @@ std::stringstream ss_01(str_01);
 void test13()
 {
   using namespace std;
-  bool test = true;
-  const char* l1 = "12345678901234567890123456789012345678901234567890123456";
+  bool test __attribute__((unused)) = true;
   const char* l2 = "1.2345678901234567890123456789012345678901234567890123456"
                    "  "
                    "1246.9";
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/9555-ia.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/9555-ia.cc
index 5a87fb985827..20476a96e541 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/9555-ia.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/9555-ia.cc
@@ -38,7 +38,7 @@ struct buf: std::streambuf
 template<typename T>
 void testthrow(T arg)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   buf b;
   std::istream is(&b);
   is.exceptions(std::ios::badbit);
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/1.cc
index 0a235bbe819b..f17fd0595935 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/1.cc
@@ -26,7 +26,7 @@
 
 void test01() 
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::string str_01;
   const std::string str_02("coltrane playing 'softly as a morning sunrise'");
   const std::string str_03("coltrane");
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/11095-i.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/11095-i.cc
index ec25ebcaa4d3..0e7e364b819e 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/11095-i.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/11095-i.cc
@@ -28,7 +28,7 @@
 // operator>>(basic_istream&, _CharT*)
 void test01() 
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const std::string str_01("Consoli ");
 
   std::stringbuf isbuf_01(str_01, std::ios_base::in);
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/2.cc
index d48072cd329d..f1469217efca 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/2.cc
@@ -28,7 +28,7 @@ void test02()
 {
   typedef std::ios::traits_type ctraits_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::string str_01;
   const std::string str_02("or coltrane playing tunji with jimmy garrison");
   const std::string str_03("coltrane");
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/3.cc
index 1ab02a1990e9..5e0ca5583eaf 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/3.cc
@@ -26,7 +26,7 @@
 
 void test01() 
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::string str_01;
   const std::string str_02("coltrane playing 'softly as a morning sunrise'");
   const std::string str_03("coltrane");
@@ -44,7 +44,6 @@ void test01()
   int n = 20;
   char array1[n];
   typedef std::ios::traits_type ctraits_type;
-  ctraits_type::int_type i1, i2;
 
   // testing with width() control enabled.
   is_02.width(8);
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc
index ba2e8d3c5f4d..1900236c1f30 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc
@@ -39,7 +39,7 @@ struct buf: std::streambuf
 template<typename T>
 void testthrow(T arg)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   buf b;
   std::istream is(&b);
   is.exceptions(std::ios::badbit);
@@ -55,7 +55,7 @@ void testthrow(T arg)
       }
   catch(...) 
     {
-      VERIFY( false );
+      VERIFY( test = false );
     }    
 }
 
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/9826.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/9826.cc
index 157084167f54..bb4f3efe225e 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/9826.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/9826.cc
@@ -45,9 +45,11 @@ void test02()
   // 1
   basic_string<pod_char, char_traits<pod_char> > str;
   sstr >> str;
+
   // 2
-  pod_char*  chr;
+  pod_char*  chr = NULL;
   sstr >> chr;
+
   // 3
   sstr >> ws;
 }
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/1.cc
index c2afc80348ca..01426e75259a 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/1.cc
@@ -32,7 +32,7 @@ void test01()
 {
   typedef std::ios::traits_type ctraits_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const std::string str_01;
   const std::string str_02("art taylor kickin it on DAKAR");
   std::string strtmp;
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/2.cc
index 3492a1e11588..2fd1cd03bc4e 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/2.cc
@@ -30,7 +30,7 @@
 // filebufs.
 void test02() 
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::ios::traits_type ctraits_type;
   const char name_01[] = "istream_extractor_other-1.txt"; //read 
   const char name_02[] = "istream_extractor_other-2.txt"; //write
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/3.cc
index 9182033937d3..1e1953231971 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/3.cc
@@ -30,7 +30,7 @@
 void test03() 
 {
   using namespace std;  
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // template<_CharT, _Traits>
   //  basic_istream& operator>>(ios_base& (*pf) (ios_base&))
@@ -38,7 +38,6 @@ void test03()
     int i = 0;
     std::istringstream iss(" 43");
     iss >> std::noskipws >> i;
-    std::ios::iostate i3 = iss.rdstate();
     VERIFY ( !iss ); //should set failbit
   }
 
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/9318-in.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/9318-in.cc
index 6251a381575f..f8110dbf0eef 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/9318-in.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/9318-in.cc
@@ -57,7 +57,7 @@ private:
 
 void test09()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   
   std::istringstream stream("Bad Moon Rising");
   Outbuf buf;
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/9424-in.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/9424-in.cc
index 3c9266b498b2..591aac680cb7 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/9424-in.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/9424-in.cc
@@ -96,7 +96,7 @@ const char Inbuf_2::buf[] = "Atteivlis";
 
 void test11()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   Inbuf_2 inbuf1;
   std::istream is(&inbuf1);
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/9555-io.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/9555-io.cc
index 50ba27c15f84..a5ced0342ef4 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/9555-io.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/9555-io.cc
@@ -38,7 +38,7 @@ struct buf: std::streambuf
 template<typename T>
 void testthrow(T arg)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   buf b;
   std::istream is(&b);
   is.exceptions(std::ios::badbit);
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/get/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/get/char/1.cc
index 446b6d9c94ce..4cc8f35952b7 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/get/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/get/char/1.cc
@@ -33,7 +33,7 @@ test03()
 {
   typedef std::char_traits<char>	traits_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char str_lit01[] = 
   "   sun*ra \n\t\t\t   & his arkestra, featuring john gilmore: \n"
   "                         "
@@ -49,10 +49,9 @@ test03()
   std::istream is_00(NULL);
   std::istream is_04(&sbuf_04);
   std::istream is_05(&sbuf_05);
-  std::ios_base::iostate state1, state2, statefail, stateeof;
+  std::ios_base::iostate statefail, stateeof;
   statefail = std::ios_base::failbit;
   stateeof = std::ios_base::eofbit;
-  std::streamsize count1, count2;
   char carray1[400] = "";
 
   // int_type get()
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/get/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_istream/get/char/2.cc
index fa351444fb47..8317e1aee81f 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/get/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/get/char/2.cc
@@ -34,7 +34,7 @@
 void
 test07()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* tfn = "istream_unformatted-1.txt";
   std::ifstream infile;
   infile.open(tfn);
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/1.cc
index 6df68c78460d..ccde173c62be 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/1.cc
@@ -33,7 +33,7 @@ test02()
 {
   typedef std::char_traits<char>	traits_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char str_lit01[] = "\t\t\t    sun*ra \n"
   "                            "
   "and his myth science arkestra present\n"
@@ -51,7 +51,6 @@ test02()
   std::ios_base::iostate state1, state2, statefail, stateeof;
   statefail = std::ios_base::failbit;
   stateeof = std::ios_base::eofbit;
-  std::streamsize count1, count2;
   char carray1[400] = "";
 
   // istream& getline(char* s, streamsize n, char delim)
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/2.cc
index 53b14a985f52..543d7cbba47c 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/2.cc
@@ -49,7 +49,7 @@ test05()
 "aaaaaaaaaaaaa\n"
 "aaaaaaaaaaaaaa\n";
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const std::streamsize it = 5;
   std::streamsize br = 0;
   char tmp[it];
@@ -89,7 +89,7 @@ test05()
 	  //
 	  // -> strlen(__s) < n - 1 
 	  // -> delimiter was seen -> gcount() > strlen(__s)
-          VERIFY(ifs.gcount() == std::strlen(tmp) + 1);
+          VERIFY(ifs.gcount() == static_cast<std::streamsize>(std::strlen(tmp) + 1) );
           continue;
         }
     }
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/3.cc
index f4627ef7e291..0d640de02b8f 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/3.cc
@@ -36,7 +36,7 @@ test06()
 {
   using namespace std;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const streamsize it = 5;
   char tmp[it];
   const char* str_lit = "abcd\n";
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/1.cc
index cc6a9a564dc5..c0a753e26d77 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/1.cc
@@ -33,7 +33,7 @@ test01()
 {
   typedef std::ios::traits_type traits_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const std::string str_01;
   const std::string str_02("soul eyes: john coltrane quartet");
   std::string strtmp;
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/6360.cc b/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/6360.cc
index 8e79620aafea..38c40cea24ba 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/6360.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/6360.cc
@@ -33,7 +33,7 @@ void
 test08()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   stringstream ss("abcd" "\xFF" "1234ina donna coolbrith");  
   char c;
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/7220.cc b/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/7220.cc
index 87ac36ab6593..6e0c9151e693 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/7220.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/7220.cc
@@ -33,12 +33,11 @@ void
 test10()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef string string_type;
   typedef stringbuf stringbuf_type;
   typedef istream istream_type;
 
-  int res = 0;
   streamsize n;
   string_type  input("abcdefg\n");
   stringbuf_type sbuf(input);
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/peek/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/peek/char/1.cc
index 53317ede0dbc..be4b0700d102 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/peek/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/peek/char/1.cc
@@ -33,7 +33,7 @@ test01()
 {
   typedef std::ios::traits_type traits_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const std::string str_01;
   const std::string str_02("soul eyes: john coltrane quartet");
   std::string strtmp;
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/peek/char/6414.cc b/libstdc++-v3/testsuite/27_io/basic_istream/peek/char/6414.cc
index 4fbd5cc8499e..e060ff2716de 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/peek/char/6414.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/peek/char/6414.cc
@@ -31,7 +31,7 @@
 // fstreams
 void test04(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::istream::pos_type pos01, pos02, pos03, pos04, pos05, pos06;
   const char str_lit01[] = "istream_seeks-1.txt";
   std::ifstream if01(str_lit01, std::ios_base::in | std::ios_base::out);
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/putback/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/putback/char/1.cc
index 0213e3dfac06..47fcd0136f23 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/putback/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/putback/char/1.cc
@@ -32,7 +32,7 @@ test01()
 {
   typedef std::ios::traits_type traits_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const std::string str_01;
   const std::string str_02("soul eyes: john coltrane quartet");
   std::string strtmp;
@@ -48,8 +48,6 @@ test01()
   statefail = std::ios_base::failbit;
   stateeof = std::ios_base::eofbit;
 
-  char carray[60] = "";
-
   // istream& putback(char c)
   is_04.ignore(30);
   is_04.clear();
@@ -72,7 +70,7 @@ test01()
   // int sync()
   is_00.ignore(10);
   int count1 = is_00.gcount();
-  int i = is_00.sync();
+  is_00.sync();
   int count2 = is_00.gcount();
   VERIFY (count1 == count2 );     // DR 60
 }
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/read/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/read/char/1.cc
index e79e4a206c06..0ece0a5d596e 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/read/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/read/char/1.cc
@@ -33,7 +33,7 @@ test01()
 {
   typedef std::ios::traits_type traits_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const std::string str_01;
   const std::string str_02("soul eyes: john coltrane quartet");
   std::string strtmp;
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/read/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_istream/read/char/2.cc
index 4133e1a8588a..6779c2b7d324 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/read/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/read/char/2.cc
@@ -33,7 +33,7 @@
 void
 test04()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   const std::string str_00("Red_Garland_Qunitet-Soul_Junction");
   std::string strtmp;
@@ -41,14 +41,14 @@ test04()
 
   std::stringbuf isbuf_00(str_00, std::ios_base::in);
   std::istream is_00(&isbuf_00);
-  std::ios_base::iostate state1, state2, statefail, stateeof;
+  std::ios_base::iostate state1, statefail, stateeof;
   statefail = std::ios_base::failbit;
   stateeof = std::ios_base::eofbit;
 
   state1 = stateeof | statefail;
   VERIFY( is_00.gcount() == 0 );
   is_00.read(c_array, str_00.size() + 1);
-  VERIFY( is_00.gcount() == str_00.size() );
+  VERIFY( is_00.gcount() == static_cast<std::streamsize>(str_00.size()) );
   VERIFY( is_00.rdstate() == state1 );
 
   is_00.read(c_array, str_00.size());
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/read/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_istream/read/char/3.cc
index 3c418e943b07..b66f730ed011 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/read/char/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/read/char/3.cc
@@ -33,7 +33,7 @@ void
 test09()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   istringstream iss("Juana Briones");
   char tab[13];
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/readsome/char/6746-1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/readsome/char/6746-1.cc
index f0109b0a661a..6a42fd32cfb0 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/readsome/char/6746-1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/readsome/char/6746-1.cc
@@ -32,7 +32,7 @@
 void test12()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   streamsize sum = 0;
   istringstream iss("shamma shamma");
       
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/readsome/char/6746-2.cc b/libstdc++-v3/testsuite/27_io/basic_istream/readsome/char/6746-2.cc
index 6d87a2959a3e..bf25632f9673 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/readsome/char/6746-2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/readsome/char/6746-2.cc
@@ -32,7 +32,7 @@
 void test13()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   streamsize sum = 0;
   ifstream ifs("istream_unformatted-1.tst");
       
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/readsome/char/8258.cc b/libstdc++-v3/testsuite/27_io/basic_istream/readsome/char/8258.cc
index fdb412ca1255..67596719dc35 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/readsome/char/8258.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/readsome/char/8258.cc
@@ -34,7 +34,7 @@ class mybuf : public std::basic_streambuf<char>
 
 void test11()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   using namespace std;
   char arr[10];
   mybuf sbuf;
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/2.cc
index 04078dbafeb8..e20854c3f82b 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/2.cc
@@ -28,7 +28,7 @@
 void test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   istringstream ist("the lamb lies down on broadway");
   ios::pos_type pos = ist.tellg();
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/2346-fstream.cc b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/2346-fstream.cc
index 4c4b25c57b45..af2b81668b5e 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/2346-fstream.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/2346-fstream.cc
@@ -35,7 +35,7 @@ void write_rewind(std::iostream& stream)
 {
   for (int j = 0; j < times; j++) 
     {
-      bool test = true;
+      bool test __attribute__((unused)) = true;
       std::streampos begin = stream.tellg();
       
       for (int i = 0; i < times; ++i)
@@ -49,7 +49,7 @@ void write_rewind(std::iostream& stream)
 
 void check_contents(std::iostream& stream)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   stream.clear();
   stream.seekg(0, std::ios::beg);
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/2346-sstream.cc b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/2346-sstream.cc
index ab35ddba34fa..6a8f5d72c0d0 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/2346-sstream.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/2346-sstream.cc
@@ -35,7 +35,7 @@ void write_rewind(std::iostream& stream)
 {
   for (int j = 0; j < times; j++) 
     {
-      bool test = true;
+      bool test __attribute__((unused)) = true;
       std::streampos begin = stream.tellg();
       
       for (int i = 0; i < times; ++i)
@@ -49,7 +49,7 @@ void write_rewind(std::iostream& stream)
 
 void check_contents(std::iostream& stream)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   stream.clear();
   stream.seekg(0, std::ios::beg);
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/8348-1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/8348-1.cc
index 823e237930aa..273855a0b64a 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/8348-1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/8348-1.cc
@@ -32,7 +32,7 @@
 void test06(void)
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   string num1("555");
 
   // seekg
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/8348-2.cc b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/8348-2.cc
index aeed5325134f..233773193ee6 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/8348-2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/8348-2.cc
@@ -32,7 +32,7 @@
 void test06(void)
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   string num1("555");
 
   // seekg
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/fstream.cc b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/fstream.cc
index 27dca74fa5d0..00df7cfac89b 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/fstream.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/fstream.cc
@@ -33,7 +33,7 @@ void test04(void)
 {
   typedef std::istream::off_type off_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::istream::pos_type pos01, pos02, pos03, pos04, pos05, pos06;
   std::ios_base::iostate state01, state02;
   const char str_lit01[] = "istream_seeks-1.txt";
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/sstream.cc b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/sstream.cc
index cf1455fa0d4c..286d3a23ecad 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/sstream.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/sstream.cc
@@ -33,7 +33,7 @@ void test05(void)
 {
   typedef std::istream::off_type off_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::istream::pos_type pos01, pos02, pos03, pos04, pos05, pos06;
   std::ios_base::iostate state01, state02;
   const char str_lit01[] = "istream_seeks-1.tst";
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/1.cc
index 1bc58ad20e7e..61db9001211b 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/1.cc
@@ -35,7 +35,7 @@
 
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* lit01 = "stereolab on the bolsinga tip";
   const std::string str01(lit01);
 
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/2.cc
index 1e42d18ed83a..4a25cd5a5204 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/2.cc
@@ -39,7 +39,7 @@ test02()
 {
   using namespace std;
   istringstream in("80.21 56.89 12.3");
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   int i = 0;
   double x;
 
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3.cc
index 9f9e06a03d1e..527f3920aa84 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3.cc
@@ -37,7 +37,7 @@
 void
 test03()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::stringbuf strbuf01;
   std::istream strm1(&strbuf01);
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-fstream.cc b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-fstream.cc
index 27e1e3667ffb..e9e302bf7ee6 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-fstream.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-fstream.cc
@@ -125,7 +125,7 @@ namespace std
 void test03()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // input streams
   basic_ifstream<unsigned char> ifs_uc;
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-sstream.cc b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-sstream.cc
index 4e928fad62b3..77bf598ec89f 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-sstream.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/3983-sstream.cc
@@ -125,7 +125,7 @@ namespace std
 void test03()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // input streams
   basic_istringstream<unsigned char> iss_uc;
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/1.cc
index 6ec4d69f3fcb..d213d040a11e 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/1.cc
@@ -33,7 +33,7 @@ void test01()
   using namespace std;
   typedef ios::pos_type pos_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char str_lit01[] = "istream_seeks-1.tst";
 
   // in
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/2.cc
index b9af611c0447..1afd1a0745ce 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/2.cc
@@ -28,7 +28,7 @@
 void test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   istringstream ist("three sides live");
   ist.ignore(4);
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/8348.cc b/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/8348.cc
index 771d25bfe9a9..2cb9ea7fe937 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/8348.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/8348.cc
@@ -32,7 +32,7 @@
 void test06(void)
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   string num1("555");
 
   // tellg
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/fstream.cc b/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/fstream.cc
index d9d2f02dbb93..dffa89872df2 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/fstream.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/fstream.cc
@@ -33,7 +33,7 @@ void test04(void)
 {
   typedef std::istream::off_type off_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::istream::pos_type pos01, pos02, pos03, pos04, pos05, pos06;
   std::ios_base::iostate state01, state02;
   const char str_lit01[] = "istream_seeks-1.txt";
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/sstream.cc b/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/sstream.cc
index abc99f8bd6b6..4d9e3a9d8801 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/sstream.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/tellg/char/sstream.cc
@@ -33,7 +33,7 @@ void test05(void)
 {
   typedef std::istream::off_type off_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::istream::pos_type pos01, pos02, pos03, pos04, pos05, pos06;
   std::ios_base::iostate state01, state02;
   const char str_lit01[] = "istream_seeks-1.tst";
diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/ws/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/ws/char/1.cc
index 3761e948617e..00f5798ef5a3 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istream/ws/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istream/ws/char/1.cc
@@ -27,14 +27,14 @@
 
 void test01(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   const char str_lit01[] = "  venice ";
   const std::string str01(" santa barbara ");
   std::string str02(str_lit01);
   std::string str04;
   std::string str05;
-  std::ios_base::iostate flag1, flag2, flag3, flag4, flag5;
+  std::ios_base::iostate flag3, flag4, flag5;
 
   // template<_CharT, _Traits>
   //  basic_istream<_CharT, _Traits>& ws(basic_istream<_Char, _Traits>& is)
diff --git a/libstdc++-v3/testsuite/27_io/basic_istringstream/3.cc b/libstdc++-v3/testsuite/27_io/basic_istringstream/3.cc
index 0b051e972001..8bdbfc6f655e 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istringstream/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istringstream/3.cc
@@ -59,7 +59,7 @@ struct gnu_char_traits
   typedef gnu_char_type	char_type;
   typedef long  		int_type;
   typedef long 		pos_type;
-  typedef unsigned long 	off_type;
+  typedef long 	off_type;
   typedef long   		state_type;
   
   static void 
@@ -117,7 +117,7 @@ struct gnu_char_traits
 
 void test07()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::basic_istringstream<gnu_char_type, gnu_char_traits> gnu_isstr;
 
   try
diff --git a/libstdc++-v3/testsuite/27_io/basic_istringstream/4.cc b/libstdc++-v3/testsuite/27_io/basic_istringstream/4.cc
index 764dd1404f42..4d212dac7499 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istringstream/4.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istringstream/4.cc
@@ -29,7 +29,7 @@ void test01()
   typedef std::istringstream test_type;
   typedef std::istream base_type;
   const test_type& obj = test_type();
-  const base_type* base = &obj;
+  const base_type* base __attribute__((unused)) = &obj;
 }
 
 int main()
diff --git a/libstdc++-v3/testsuite/27_io/basic_istringstream/rdbuf/char/2832.cc b/libstdc++-v3/testsuite/27_io/basic_istringstream/rdbuf/char/2832.cc
index 59b601eef038..7e30ccd34293 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istringstream/rdbuf/char/2832.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istringstream/rdbuf/char/2832.cc
@@ -34,9 +34,8 @@ active_buffer(std::ios& stream)
 // libstdc++/2832
 void test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* strlit01 = "fuck war";
-  const char* strlit02 = "two less cars abstract riot crew, critical mass/SF";
   const std::string str00;
   const std::string str01(strlit01);
   std::string str02;
diff --git a/libstdc++-v3/testsuite/27_io/basic_istringstream/str/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_istringstream/str/char/1.cc
index 32acd5b183cc..509386e2a11a 100644
--- a/libstdc++-v3/testsuite/27_io/basic_istringstream/str/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_istringstream/str/char/1.cc
@@ -25,7 +25,7 @@
 
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::istringstream is01;
   const std::string str00; 
   const std::string str01 = "123";
diff --git a/libstdc++-v3/testsuite/27_io/basic_ofstream/3.cc b/libstdc++-v3/testsuite/27_io/basic_ofstream/3.cc
index 3bba780a4c6b..3cba2191ced6 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ofstream/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ofstream/3.cc
@@ -117,7 +117,7 @@ struct gnu_char_traits
 
 void test07()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::basic_ofstream<gnu_char_type, gnu_char_traits> gnu_ofstr;
 
   try
diff --git a/libstdc++-v3/testsuite/27_io/basic_ofstream/4.cc b/libstdc++-v3/testsuite/27_io/basic_ofstream/4.cc
index 9d58396d1930..47d7c928f890 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ofstream/4.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ofstream/4.cc
@@ -29,7 +29,7 @@ void test01()
   typedef std::ofstream test_type;
   typedef std::ostream base_type;
   const test_type& obj = test_type();
-  const base_type* base = &obj;
+  const base_type* base __attribute__((unused)) = &obj;
 }
 
 int main()
diff --git a/libstdc++-v3/testsuite/27_io/basic_ofstream/cons/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_ofstream/cons/char/2.cc
index 14e217ec9c07..accf3e51c1f7 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ofstream/cons/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ofstream/cons/char/2.cc
@@ -29,7 +29,7 @@ const char name_02[] = "ofstream_members-1.txt";
 // http://gcc.gnu.org/ml/libstdc++/2000-07/msg00004.html
 void test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const int more_than_max_open_files = 8200;
   
   for(int i = 0; ++i < more_than_max_open_files;)
diff --git a/libstdc++-v3/testsuite/27_io/basic_ofstream/open/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ofstream/open/char/1.cc
index f97eec10454d..5bb02d4eb3ca 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ofstream/open/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ofstream/open/char/1.cc
@@ -30,7 +30,7 @@ const char name_02[] = "ofstream_members-1.txt";
 // http://gcc.gnu.org/ml/libstdc++/2000-06/msg00136.html
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::ofstream ofs1;
   ofs1.close();
   
diff --git a/libstdc++-v3/testsuite/27_io/basic_ofstream/rdbuf/char/2832.cc b/libstdc++-v3/testsuite/27_io/basic_ofstream/rdbuf/char/2832.cc
index 7e897efdfafd..9ca7b900dd66 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ofstream/rdbuf/char/2832.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ofstream/rdbuf/char/2832.cc
@@ -37,9 +37,8 @@ active_buffer(std::ios& stream)
 // libstdc++/2832
 void test03()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* strlit01 = "fuck war";
-  const char* strlit02 = "two less cars abstract riot crew, critical mass/SF";
   const std::string str00;
   const std::string str01(strlit01);
   std::string str02;
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/3.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/3.cc
index 09eb94c8b1b9..7ec77fb16c5e 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/3.cc
@@ -117,7 +117,7 @@ struct gnu_char_traits
 
 void test07()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::basic_ostream<gnu_char_type, gnu_char_traits> gnu_ostr;
 
   try
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/4.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/4.cc
index b1b669c942f4..c945539a3b76 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/4.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/4.cc
@@ -31,7 +31,7 @@ void test01()
   
   std::stringbuf buf;
   const test_type& obj = test_type(&buf);
-  const base_type* base = &obj;
+  const base_type* base __attribute__((unused)) = &obj;
 }
 
 int main()
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/cons/char/9827.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/cons/char/9827.cc
index 7a4f26396d81..309d6f09ba1a 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/cons/char/9827.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/cons/char/9827.cc
@@ -30,7 +30,7 @@ class Buf : public std::streambuf
 void test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   Buf buf;
   ostream stream(&buf);
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/endl/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/endl/char/1.cc
index 8e69c421dd1f..6c866ff83bae 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/endl/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/endl/char/1.cc
@@ -27,18 +27,16 @@
 
 void test01(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   const char str_lit01[] = "  venice ";
   const std::string str01(" santa barbara ");
   std::string str02(str_lit01);
   std::string str04;
   std::string str05;
-  std::ios_base::iostate flag1, flag2, flag3, flag4, flag5;
 
   std::ostringstream oss01(str01);
   std::ostringstream oss02;
-  std::ostringstream::int_type i01, i02;
   typedef std::ostringstream::traits_type traits_type;
 
   // template<_CharT, _Traits>
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/ends/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/ends/char/1.cc
index a3c11791737d..3725fd8f00ed 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/ends/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/ends/char/1.cc
@@ -28,18 +28,16 @@
 
 void test01(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   const char str_lit01[] = "  venice ";
   const std::string str01(" santa barbara ");
   std::string str02(str_lit01);
   std::string str04;
   std::string str05;
-  std::ios_base::iostate flag1, flag2, flag3, flag4, flag5;
 
   std::ostringstream oss01(str01);
   std::ostringstream oss02;
-  std::ostringstream::int_type i01, i02;
   typedef std::ostringstream::traits_type traits_type;
 
   // template<_CharT, _Traits>
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/ends/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/ends/char/2.cc
index 34de949e4bb2..fb5f8ccaaff9 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/ends/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/ends/char/2.cc
@@ -32,12 +32,12 @@ void test02()
   using namespace std;
   typedef ostringstream::int_type int_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   ostringstream osst_01;
   const string str_00("herbie_hancock");
   int_type len1 = str_00.size();
   osst_01 << str_00;
-  VERIFY( osst_01.str().size() == len1 );
+  VERIFY( static_cast<int_type>(osst_01.str().size()) == len1 );
 
   osst_01 << ends;
 
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/exceptions/char/9561.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/exceptions/char/9561.cc
index 3e3726cd3986..a1746fbc797f 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/exceptions/char/9561.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/exceptions/char/9561.cc
@@ -36,7 +36,7 @@ struct buf: std::streambuf
 void test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   buf b;
   std::ostream strm (&b);
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/flush/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/flush/char/1.cc
index 3d9098f53d17..2b05fd8f1f79 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/flush/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/flush/char/1.cc
@@ -27,18 +27,16 @@
 
 void test01(void)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   const char str_lit01[] = "  venice ";
   const std::string str01(" santa barbara ");
   std::string str02(str_lit01);
   std::string str04;
   std::string str05;
-  std::ios_base::iostate flag1, flag2, flag3, flag4, flag5;
 
   std::ostringstream oss01(str01);
   std::ostringstream oss02;
-  std::ostringstream::int_type i01, i02;
   typedef std::ostringstream::traits_type traits_type;
 
   // template<_CharT, _Traits>
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc
index f49f60405f8d..8b8da8a1e80a 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc
@@ -150,8 +150,8 @@ void apply_formatting(const _TestCase & tc, basic_ostream<_CharT> & os)
 void
 test01()
 {
-  bool test = true;
-  for (int j=0; j<sizeof(testcases)/sizeof(testcases[0]); j++)
+  bool test __attribute__((unused)) = true;
+  for (std::size_t j = 0; j<sizeof(testcases)/sizeof(testcases[0]); j++)
     {
       _TestCase & tc = testcases[j];
 #ifdef TEST_NUMPUT_VERBOSE
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc
index 2cf4021108fd..c1d41ca35acc 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc
@@ -32,7 +32,7 @@ using namespace std;
 void
 test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // Make sure we can output a long float in fixed format
   // without seg-faulting (libstdc++/4402)
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/3.cc
index d26463b525d5..fed2696cc1bf 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/3.cc
@@ -32,7 +32,7 @@ test03_check(T n)
   stringbuf strbuf;
   ostream o(&strbuf);
   const char *expect;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   if (numeric_limits<T>::digits + 1 == 16)
     expect = "177777 ffff";
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/4.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/4.cc
index 445f884a6aed..304fc40c11f3 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/4.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/4.cc
@@ -31,7 +31,7 @@ test04()
 {
   stringbuf strbuf1, strbuf2;
   ostream o1(&strbuf1), o2(&strbuf2);
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   o1 << hex << showbase << setw(6) << internal << 0xff;
   VERIFY( strbuf1.str() == "0x  ff" );
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/4402.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/4402.cc
index 67eeecc2b6e6..1d17b205717b 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/4402.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/4402.cc
@@ -31,7 +31,7 @@ using namespace std;
 void
 test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   // make sure we can output a very long float
   long double val = 1.2345678901234567890123456789e+1000L;
   int prec = numeric_limits<long double>::digits10;
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/5.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/5.cc
index 647f87146292..ce521e235d47 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/5.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/5.cc
@@ -30,7 +30,7 @@ using namespace std;
 void
 test05()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   double pi = 3.14159265358979323846;
   ostringstream ostr;
   ostr.precision(20);
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/6.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/6.cc
index d3f0499c3bb6..36b67f2a0baf 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/6.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/6.cc
@@ -31,7 +31,7 @@ using namespace std;
 int
 test06()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   int prec = numeric_limits<double>::digits10 + 2;
   double oval = numeric_limits<double>::min();
 
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/9555-oa.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/9555-oa.cc
index caf716061d9c..a63710d69565 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/9555-oa.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/9555-oa.cc
@@ -38,7 +38,7 @@ struct buf: std::streambuf
 template<typename T>
 void testthrow(T arg)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   buf b;
   std::ostream os(&b);
   os.exceptions(std::ios::badbit);
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc
index 484e66b8c153..0f8848b40089 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc
@@ -151,8 +151,8 @@ void apply_formatting(const _TestCase & tc, basic_ostream<_CharT> & os)
 void
 test01()
 {
-  bool test = true;
-  for (int j=0; j<sizeof(testcases)/sizeof(testcases[0]); j++)
+  bool test __attribute__((unused)) = true;
+  for (std::size_t j = 0; j<sizeof(testcases)/sizeof(testcases[0]); j++)
     {
       _TestCase & tc = testcases[j];
 #ifdef TEST_NUMPUT_VERBOSE
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/11095-oa.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/11095-oa.cc
index d9158f534f0e..856b955f2ef4 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/11095-oa.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/11095-oa.cc
@@ -29,7 +29,7 @@
 void
 test01() 
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::ostringstream oss_01;
 
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/11095-ob.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/11095-ob.cc
index f208723de8a2..e2f9861b9ea3 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/11095-ob.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/11095-ob.cc
@@ -29,7 +29,7 @@
 void
 test02() 
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::ostringstream oss_01;
 
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/11095-oc.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/11095-oc.cc
index 204089df14fa..4c8de7c625f2 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/11095-oc.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/11095-oc.cc
@@ -29,7 +29,7 @@
 void
 test03() 
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::ostringstream oss_01;
 
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/2.cc
index 9ffc492586ec..1fdbe376ae2b 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/2.cc
@@ -31,7 +31,7 @@
 void
 test02(void) 
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::string tmp;
   
   std::string str01 = "";
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/3.cc
index 5b95862b2b97..fedab18c0533 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/3.cc
@@ -30,7 +30,7 @@
 // right
 void test03(void) 
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::string tmp;
 
   std::string str01 = "";
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/4.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/4.cc
index 52d92ecb2eb7..e10380c8331a 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/4.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/4.cc
@@ -30,7 +30,7 @@
 void
 test04() 
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::string str_01;
   const std::string str_02("coltrane playing 'softly as a morning sunrise'");
   const std::string str_03("coltrane");
@@ -40,7 +40,7 @@ test04()
   std::ostringstream oss_01(std::ios_base::out);
   std::ostringstream oss_02(str_01, std::ios_base::out);
 
-  std::ios_base::iostate state1, state2, statefail;
+  std::ios_base::iostate statefail;
   statefail = std::ios_base::failbit;
 
   // template<_CharT, _Traits>
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/5.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/5.cc
index c68f227bfc27..a4e14534457e 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/5.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/5.cc
@@ -30,7 +30,7 @@
 void
 test05()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::string str05, str10;
 
   typedef std::ostream::pos_type	pos_type;
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/6.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/6.cc
index a73329c819ce..72393d7356b1 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/6.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/6.cc
@@ -30,7 +30,7 @@
 // http://gcc.gnu.org/ml/libstdc++/2000-q1/msg00326.html
 void test06()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char carray01[] = "mos def & talib kweli are black star";
 
   // normal
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/8.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/8.cc
index 244ee7529196..c4dc96cf19ab 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/8.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/8.cc
@@ -28,7 +28,7 @@
 
 void test08()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   char* pt = NULL;
 
   // 1
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/9555-oc.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/9555-oc.cc
index f1e24f35bd23..2e932753fdb1 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/9555-oc.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/9555-oc.cc
@@ -38,7 +38,7 @@ struct buf: std::streambuf
 template<typename T>
 void testthrow(T arg)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   buf b;
   std::ostream os(&b);
   os.exceptions(std::ios::badbit);
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/11095-od.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/11095-od.cc
index bd4d1840fd73..0c38d4ea5d74 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/11095-od.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/11095-od.cc
@@ -29,7 +29,7 @@
 void
 test01() 
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::wostringstream oss_01;
 
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/11095-oe.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/11095-oe.cc
index 4be5d86feb98..f93fe260c35d 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/11095-oe.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/11095-oe.cc
@@ -29,7 +29,7 @@
 void
 test02() 
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::wostringstream oss_01;
 
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/11095-of.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/11095-of.cc
index 34695a4314fd..76d20ceb1b32 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/11095-of.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/11095-of.cc
@@ -29,7 +29,7 @@
 void
 test03() 
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::wostringstream oss_01;
 
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/7.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/7.cc
index 6344dd4d5a03..722ec06e8ae6 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/7.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/7.cc
@@ -52,7 +52,7 @@ protected:
 void test07()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   const char* buffer = "SFPL 5th floor, outside carrol, the Asian side";
 
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/8.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/8.cc
index bf4480db26e2..8b2c9d8c1858 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/8.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/8.cc
@@ -28,7 +28,7 @@
 
 void test08()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   char* pt = NULL;
 
   // 2
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/1.cc
index 3fa9e68fe56e..00fef8ac37ae 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/1.cc
@@ -39,7 +39,7 @@ void
 test02() 
 {
   typedef std::ios_base::iostate iostate;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // basic_ostream<_CharT, _Traits>::operator<<(__streambuf_type* __sb)
   // filebuf-> NULL 
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/3.cc
index 89dca57cd54c..5f054fb8cd75 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/3.cc
@@ -31,7 +31,7 @@
 void test04()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   istringstream istr("inside betty carter");
   ostringstream ostr;
   ostr << istr.rdbuf() << endl;
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/4.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/4.cc
index 1ba200aaca71..949448e83722 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/4.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/4.cc
@@ -101,7 +101,7 @@ private:
 
 void test(const std::string& str, std::streambuf& buf)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::ostringstream out;
   std::istream in(&buf);
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/9318-out.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/9318-out.cc
index fcacbcb64837..d495e01bf150 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/9318-out.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/9318-out.cc
@@ -56,7 +56,7 @@ private:
 
 void test10()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::stringbuf sbuf("Bad Moon Rising", std::ios::in);
   Outbuf buf;
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/9424-out.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/9424-out.cc
index 61ec1a71eaff..5824caa7dd1f 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/9424-out.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/9424-out.cc
@@ -96,7 +96,7 @@ const char Inbuf_2::buf[] = "Atteivlis";
 
 void test12()
 { 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
  
   Outbuf_2 outbuf2;
   std::ostream os (&outbuf2);
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/9555-oo.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/9555-oo.cc
index 42ad89cbd1d5..6b02aeb19039 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/9555-oo.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/9555-oo.cc
@@ -38,7 +38,7 @@ struct buf: std::streambuf
 template<typename T>
 void testthrow(T arg)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   buf b;
   std::ostream os(&b);
   os.exceptions(std::ios::badbit);
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/1.cc
index cba75f250fa5..40cfdb726156 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/1.cc
@@ -37,7 +37,7 @@
 void
 test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::stringbuf strbuf01;
   std::ostream strm1(&strbuf01);
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/2.cc
index 4e7562cfd123..72ba932efe66 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/2.cc
@@ -50,7 +50,7 @@ struct buf: std::streambuf
 void
 test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   buf b(0);
   std::ostream strm(&b);
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-fstream.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-fstream.cc
index 2c8f6c674635..e3af42e3b628 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-fstream.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-fstream.cc
@@ -125,7 +125,7 @@ namespace std
 void test03()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // output streams
   basic_ofstream<unsigned char> ofs_uc;
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-sstream.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-sstream.cc
index 141548ad10a9..fe1a9473c2c3 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-sstream.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/char/3983-sstream.cc
@@ -125,7 +125,7 @@ namespace std
 void test03()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // output streams
   basic_ostringstream<unsigned char> oss_uc;
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/tellp/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/tellp/char/1.cc
index 05884fc123dd..5c8caced6f3e 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/tellp/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/tellp/char/1.cc
@@ -31,7 +31,7 @@ void test01()
   using namespace std;
   typedef ios::pos_type pos_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char str_lit01[] = "ostream_seeks-1.txt";
 
   // out
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/tellp/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/tellp/char/2.cc
index e278daec21af..f82df5d4bb03 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/tellp/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/tellp/char/2.cc
@@ -27,7 +27,7 @@ void test01()
   using namespace std;
   typedef std::stringbuf::pos_type        pos_type;
   typedef std::stringbuf::off_type        off_type;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // tellp
   ostringstream ost;
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostringstream/3.cc b/libstdc++-v3/testsuite/27_io/basic_ostringstream/3.cc
index f7e96885ea3f..8593d6e6f603 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostringstream/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostringstream/3.cc
@@ -59,7 +59,7 @@ struct gnu_char_traits
   typedef gnu_char_type	char_type;
   typedef long  		int_type;
   typedef long 		pos_type;
-  typedef unsigned long 	off_type;
+  typedef long 	off_type;
   typedef long   		state_type;
   
   static void 
@@ -117,7 +117,7 @@ struct gnu_char_traits
 
 void test07()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::basic_ostringstream<gnu_char_type, gnu_char_traits> gnu_osstr;
 
   try
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostringstream/4.cc b/libstdc++-v3/testsuite/27_io/basic_ostringstream/4.cc
index 48c56383e4c6..aafd2bcd6cd5 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostringstream/4.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostringstream/4.cc
@@ -29,7 +29,7 @@ void test01()
   typedef std::ostringstream test_type;
   typedef std::ostream base_type;
   const test_type& obj = test_type();
-  const base_type* base = &obj;
+  const base_type* base __attribute__((unused)) = &obj;
 }
 
 int main()
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostringstream/cons/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_ostringstream/cons/char/3.cc
index 3edad1a50800..37b5da232676 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostringstream/cons/char/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostringstream/cons/char/3.cc
@@ -27,7 +27,7 @@
 void
 test03()
 {
-  bool test = false;
+  bool test __attribute__((unused)) = false;
 
   // Empty string sanity check.
   std::string str01;
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostringstream/rdbuf/char/2832.cc b/libstdc++-v3/testsuite/27_io/basic_ostringstream/rdbuf/char/2832.cc
index 8019bba06f29..826ee5ac26b8 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostringstream/rdbuf/char/2832.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostringstream/rdbuf/char/2832.cc
@@ -34,9 +34,8 @@ active_buffer(std::ios& stream)
 // libstdc++/2832
 void test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* strlit01 = "fuck war";
-  const char* strlit02 = "two less cars abstract riot crew, critical mass/SF";
   const std::string str00;
   const std::string str01(strlit01);
   std::string str02;
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostringstream/str/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ostringstream/str/char/1.cc
index 7a3b758ae729..db3f57860b12 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostringstream/str/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostringstream/str/char/1.cc
@@ -25,15 +25,13 @@
 
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::ostringstream os01;
   const std::string str00; 
   const std::string str01 = "123";
   std::string str02;
-  const int i01 = 123;
-  int a,b;
 
-  std::ios_base::iostate state1, state2, statefail, stateeof;
+  std::ios_base::iostate statefail, stateeof;
   statefail = std::ios_base::failbit;
   stateeof = std::ios_base::eofbit;
 
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostringstream/str/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_ostringstream/str/char/2.cc
index 310b298152b3..b9564ec9dc00 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostringstream/str/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostringstream/str/char/2.cc
@@ -33,7 +33,7 @@ public:
 void
 test04()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   derived_oss yy;
   yy << "buena vista social club\n";
   VERIFY( yy.str() == std::string("buena vista social club\n") );
diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/3.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/3.cc
index c599985d43f2..318ff033ef79 100644
--- a/libstdc++-v3/testsuite/27_io/basic_streambuf/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/3.cc
@@ -118,7 +118,7 @@ class gnu_sbuf: public std::basic_streambuf<gnu_char_type, gnu_char_traits>
 
 void test07()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   
   try
     { gnu_sbuf obj; }
diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/cons/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/cons/char/1.cc
index c48ecbcc43d5..9400a599bfcd 100644
--- a/libstdc++-v3/testsuite/27_io/basic_streambuf/cons/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/cons/char/1.cc
@@ -46,7 +46,7 @@ public:
   bool
   check_pointers()
   { 
-    bool test = true;
+    bool test __attribute__((unused)) = true;
     VERIFY( this->eback() == NULL );
     VERIFY( this->gptr() == NULL );
     VERIFY( this->egptr() == NULL );
@@ -92,8 +92,7 @@ void test01()
   typedef testbuf::traits_type traits_type;
   typedef testbuf::int_type int_type;
 
-  bool test = true;
-  char* lit01 = "chicago underground trio/possible cube on delmark";
+  bool test __attribute__((unused)) = true;
   testbuf buf01;
 
   // 27.5.2.1 basic_streambuf ctors
diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/char/9322.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/char/9322.cc
index 7dbfdc755624..17d94af7001e 100644
--- a/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/char/9322.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/char/9322.cc
@@ -47,7 +47,7 @@ public:
 void test08()
 {
   using std::locale;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   locale loc;
   testbuf ob;
diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/in_avail/char/9701-3.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/in_avail/char/9701-3.cc
index 4f98839d9072..5dc68c62b9a8 100644
--- a/libstdc++-v3/testsuite/27_io/basic_streambuf/in_avail/char/9701-3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/in_avail/char/9701-3.cc
@@ -35,7 +35,7 @@ public:
 void test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* name = "tmp_file1";
 
   Derived_fbuf df2;
diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/overflow/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/overflow/char/1.cc
index 2a3a4be1a25a..d2a42effc6b9 100644
--- a/libstdc++-v3/testsuite/27_io/basic_streambuf/overflow/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/overflow/char/1.cc
@@ -46,7 +46,7 @@ public:
   bool
   check_pointers()
   { 
-    bool test = true;
+    bool test __attribute__((unused)) = true;
     VERIFY( this->eback() == NULL );
     VERIFY( this->gptr() == NULL );
     VERIFY( this->egptr() == NULL );
@@ -92,8 +92,9 @@ void test01()
   typedef testbuf::traits_type traits_type;
   typedef testbuf::int_type int_type;
 
-  bool test = true;
-  char* lit01 = "chicago underground trio/possible cube on delmark";
+  bool test __attribute__((unused)) = true;
+  char lit01[52];
+  strcpy(lit01, "chicago underground trio/possible cube on delmark");
   testbuf buf01;
 
   // pbackfail
diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/overflow/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/overflow/char/2.cc
index dcee654b213e..a62155292511 100644
--- a/libstdc++-v3/testsuite/27_io/basic_streambuf/overflow/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/overflow/char/2.cc
@@ -60,7 +60,7 @@ template<typename T>
 
 void test03() 
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const std::string control01("11111");
   std::string test01;
 
diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/overflow/char/3599.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/overflow/char/3599.cc
index 1b6cf0cf332f..145e4eb3ec66 100644
--- a/libstdc++-v3/testsuite/27_io/basic_streambuf/overflow/char/3599.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/overflow/char/3599.cc
@@ -43,14 +43,14 @@ public:
  
 protected:
   int_type 
-  overflow(int_type c = traits_type::eof()) 
+  overflow(int_type c __attribute__((unused)) = traits_type::eof()) 
   { return traits_type::not_eof(0); }
 };
 
 void
 test07()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   testbuf ob;
   std::ostream out(&ob); 
 
diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/char/1.cc
index d2833831e725..72a67de7135e 100644
--- a/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/char/1.cc
@@ -46,7 +46,7 @@ public:
   bool
   check_pointers()
   { 
-    bool test = true;
+    bool test __attribute__((unused)) = true;
     VERIFY( this->eback() == NULL );
     VERIFY( this->gptr() == NULL );
     VERIFY( this->egptr() == NULL );
@@ -92,8 +92,9 @@ void test01()
   typedef testbuf::traits_type traits_type;
   typedef testbuf::int_type int_type;
 
-  bool test = true;
-  char* lit01 = "chicago underground trio/possible cube on delmark";
+  bool test __attribute__((unused)) = true;
+  char lit01[52];
+  strcpy(lit01, "chicago underground trio/possible cube on delmark");
   testbuf buf01;
 
   // 27.5.2.3.1 get area
diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetn/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetn/char/1.cc
index f1392dc631da..f4c67c8389ca 100644
--- a/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetn/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetn/char/1.cc
@@ -46,7 +46,7 @@ public:
   bool
   check_pointers()
   { 
-    bool test = true;
+    bool test __attribute__((unused)) = true;
     VERIFY( this->eback() == NULL );
     VERIFY( this->gptr() == NULL );
     VERIFY( this->egptr() == NULL );
@@ -92,8 +92,13 @@ void test02()
   typedef testbuf::traits_type traits_type;
   typedef testbuf::int_type int_type;
 
-  bool test = true;
-  char* lit01 = "chicago underground trio/possible cube on delmark";
+  bool test __attribute__((unused)) = true;
+
+  const char* lit00 = "chicago underground trio/possible cube on delmark";
+  size_t i01 = traits_type::length(lit00);
+  char lit01[i01];
+  strcpy(lit01, lit00);
+
   testbuf buf01;
 
   // 27.5.2.1 basic_streambuf ctors
@@ -104,7 +109,7 @@ void test02()
   VERIFY( buf01.getloc() == std::locale() );
 
   // 27.5.2.2.5 Put area
-  size_t i01 = traits_type::length(lit01);
+
   char carray01[i01];
   std::memset(carray01, 0, i01);
   
diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/sputbackc/char/9538.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/sputbackc/char/9538.cc
index b90e3d508588..e9c6e2aa6a6b 100644
--- a/libstdc++-v3/testsuite/27_io/basic_streambuf/sputbackc/char/9538.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/sputbackc/char/9538.cc
@@ -29,7 +29,7 @@ class MyTraits : public std::char_traits<char>
 public:
   static bool eq(char c1, char c2)
   {
-    bool test = true;
+    bool test __attribute__((unused)) = true;
     VERIFY( c1 != 'X' );
     VERIFY( c2 != 'X' );
     return std::char_traits<char>::eq(c1, c2);
@@ -52,13 +52,13 @@ public:
 // libstdc++/9538
 void test08()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   MyBuf mb;
   mb.sputbackc('a');  
 }
 
-main() 
+int main() 
 {
   test08();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/sputn/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/sputn/char/1.cc
index 0feabcd08cd8..7859b3f3029a 100644
--- a/libstdc++-v3/testsuite/27_io/basic_streambuf/sputn/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/sputn/char/1.cc
@@ -46,7 +46,7 @@ public:
   bool
   check_pointers()
   { 
-    bool test = true;
+    bool test __attribute__((unused)) = true;
     VERIFY( this->eback() == NULL );
     VERIFY( this->gptr() == NULL );
     VERIFY( this->egptr() == NULL );
@@ -92,14 +92,15 @@ void test01()
   typedef testbuf::traits_type traits_type;
   typedef testbuf::int_type int_type;
 
-  bool test = true;
-  char* lit01 = "chicago underground trio/possible cube on delmark";
+  bool test __attribute__((unused)) = true;
   testbuf buf01;
-  int i01 = 3;
 
   // sputn/xsputn
-  char* lit02 = "isotope 217: the unstable molecule on thrill jockey";
-  int i02 = std::strlen(lit02);
+  const char* lit01 = "isotope 217: the unstable molecule on thrill jockey";
+  const int i02 = std::strlen(lit01);
+  char lit02[i02];
+  std::strcpy(lit02, lit01);
+
   char carray[i02 + 1];
   std::memset(carray, 0, i02 + 1);
 
diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/sync/char/1057.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/sync/char/1057.cc
index 8e2d3c0aef7e..5c75185774b5 100644
--- a/libstdc++-v3/testsuite/27_io/basic_streambuf/sync/char/1057.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/sync/char/1057.cc
@@ -76,7 +76,7 @@ public:
 // libstdc++/1057
 void test04()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::string text = "abcdefghijklmn";
   
   // 01
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/3.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/3.cc
index 14275c2e64ad..39a5e90e3be2 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/3.cc
@@ -57,7 +57,7 @@ struct gnu_char_traits
   typedef gnu_char_type	char_type;
   typedef long  		int_type;
   typedef long 		pos_type;
-  typedef unsigned long 	off_type;
+  typedef long 	off_type;
   typedef long   		state_type;
   
   static void 
@@ -115,7 +115,7 @@ struct gnu_char_traits
 
 void test07()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::basic_stringbuf<gnu_char_type, gnu_char_traits> gnu_ssbuf;
   
   try
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/5.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/5.cc
index 4f308b98cb78..b09e94d1a9fe 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/5.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/5.cc
@@ -28,7 +28,7 @@ void test01()
   typedef std::stringbuf test_type;
   typedef std::streambuf base_type;
   const test_type& obj = test_type();
-  const base_type* base = &obj;
+  const base_type* base __attribute__((unused)) = &obj;
 }
 
 int main()
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/imbue/char/9322.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/imbue/char/9322.cc
index 549e59ef8417..552888fba7f1 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/imbue/char/9322.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/imbue/char/9322.cc
@@ -27,7 +27,7 @@
 void test03()
 {
   using std::locale;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   locale loc =  std::locale::classic();
   std::stringbuf ob;
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/in_avail/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/in_avail/char/1.cc
index 928f9457cb48..e8e8dc9972e5 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/in_avail/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/in_avail/char/1.cc
@@ -32,10 +32,9 @@ std::stringbuf strb_03(str_03, std::ios_base::out);
 // test overloaded virtual functions
 void test04() 
 {
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   std::string 		str_tmp;
   std::stringbuf 		strb_tmp;
-  std::streamsize 		strmsz_1, strmsz_2;
   std::streamoff  		strmof_1(-1), strmof_2;
   typedef std::stringbuf::int_type int_type;
   typedef std::stringbuf::traits_type traits_type;
@@ -47,8 +46,8 @@ void test04()
   strmof_1 = strb_01.in_avail();
   strmof_2 = strb_02.in_avail();
   VERIFY( strmof_1 != strmof_2 );
-  VERIFY( strmof_1 == str_01.length() );
-  VERIFY( strmof_2 == str_02.length() );
+  VERIFY( strmof_1 == static_cast<std::streamoff>(str_01.length()) );
+  VERIFY( strmof_2 == static_cast<std::streamoff>(str_02.length()) );
   strmof_1 = strb_03.in_avail(); 
   // zero cuz write-only, or eof()? zero, from showmany
   VERIFY( strmof_1 == 0 ); 
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/overflow/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/overflow/char/2.cc
index 90845d0ad47b..38b72b51e6eb 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/overflow/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/overflow/char/2.cc
@@ -60,7 +60,7 @@ template<typename T>
 
 void test03() 
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const std::string control01("11111");
   std::string test01;
 
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/overflow/char/3599.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/overflow/char/3599.cc
index a8e3a287464a..ad79cfcac655 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/overflow/char/3599.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/overflow/char/3599.cc
@@ -41,14 +41,14 @@ public:
  
 protected:
   int_type 
-  overflow(int_type c = traits_type::eof()) 
+  overflow(int_type c __attribute__((unused)) = traits_type::eof()) 
   { return traits_type::not_eof(0); }
 };
 
 void
 test07()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   testbuf ob;
   std::ostream out(&ob); 
 
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/overflow/char/9988.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/overflow/char/9988.cc
index abdd4def261f..f9646cade91f 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/overflow/char/9988.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/overflow/char/9988.cc
@@ -35,7 +35,7 @@ public:
 void test15()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   
   OverBuf sb;
 
@@ -56,7 +56,7 @@ void test15()
   VERIFY( c == stringbuf::traits_type::eof() );
 }
 
-main() 
+int main() 
 {
   test15();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/char/1.cc
index f075f9db759f..df5173ae2b28 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/char/1.cc
@@ -32,10 +32,9 @@ std::stringbuf strb_03(str_03, std::ios_base::out);
 // test overloaded virtual functions
 void test04() 
 {
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   std::string 		str_tmp;
   std::stringbuf 		strb_tmp;
-  std::streamsize 		strmsz_1, strmsz_2;
   std::streamoff  		strmof_1(-1), strmof_2;
   typedef std::stringbuf::int_type int_type;
   typedef std::stringbuf::traits_type traits_type;
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/char/9825.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/char/9825.cc
index df6fa264d0e4..d49016af8822 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/char/9825.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sbumpc/char/9825.cc
@@ -28,7 +28,7 @@
 void test12()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   stringbuf sbuf;
   sbuf.sputn("crazy bees!", 11);
@@ -43,7 +43,7 @@ void test12()
   VERIFY( c == 'a' );
 }
 
-main() 
+int main() 
 {
   test12();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/char/1.cc
index 579206ff160d..aa32edde22dd 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/char/1.cc
@@ -32,11 +32,10 @@ std::stringbuf strb_03(str_03, std::ios_base::out);
 // test overloaded virtual functions
 void test04() 
 {
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   std::string 		str_tmp;
   std::stringbuf 		strb_tmp;
   std::streamsize 		strmsz_1, strmsz_2;
-  std::streamoff  		strmof_1(-1), strmof_2;
   typedef std::stringbuf::int_type int_type;
   typedef std::stringbuf::traits_type traits_type;
   typedef std::stringbuf::pos_type pos_type;
@@ -45,8 +44,6 @@ void test04()
   int_type c1 = strb_01.sbumpc();
   int_type c2 = strb_02.sbumpc();
   int_type c3 = strb_01.sbumpc();
-  int_type c4 = strb_02.sbumpc();
-  int_type c5 = strb_03.sbumpc();
 
   // PUT
   strb_03.str(str_01); //reset
@@ -108,7 +105,7 @@ void test04()
   strb_01.pubseekoff(0, std::ios_base::end);
   strb_01.sputc('<');
   str_tmp = strb_01.str();
-  VERIFY( str_tmp.size() == strmsz_1 + strmsz_2 + 1 );
+  VERIFY(static_cast<std::streamsize>(str_tmp.size()) == strmsz_1 + strmsz_2 + 1);
   // IN
   // OUT
 }
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/char/2.cc
index 869cd46f56a1..984e6303183c 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekoff/char/2.cc
@@ -25,7 +25,7 @@
 
 void test02(std::stringbuf& in, bool pass)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   using namespace std;
   typedef streambuf::pos_type pos_type;
   typedef streambuf::off_type off_type;
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/char/1.cc
index 12143c5add72..9ed89f9da3ed 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/char/1.cc
@@ -32,11 +32,9 @@ std::stringbuf strb_03(str_03, std::ios_base::out);
 // test overloaded virtual functions
 void test04() 
 {
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   std::string 		str_tmp;
   std::stringbuf 		strb_tmp;
-  std::streamsize 		strmsz_1, strmsz_2;
-  std::streamoff  		strmof_1(-1), strmof_2;
   typedef std::stringbuf::int_type int_type;
   typedef std::stringbuf::traits_type traits_type;
   typedef std::stringbuf::pos_type pos_type;
@@ -45,8 +43,6 @@ void test04()
   int_type c1 = strb_01.sbumpc();
   int_type c2 = strb_02.sbumpc();
   int_type c3 = strb_01.sbumpc();
-  int_type c4 = strb_02.sbumpc();
-  int_type c5 = strb_03.sbumpc();
 
   pos_type pt_1(off_type(-1));
   pos_type pt_2(off_type(0));
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/char/2.cc
index c3c6a8ad6839..7a8389a8b9bc 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/char/2.cc
@@ -25,7 +25,7 @@
 
 void test02(std::stringbuf& in, bool pass)
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   using namespace std;
   typedef streambuf::pos_type pos_type;
   typedef streambuf::off_type off_type;
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/char/3.cc
index 46cbcedf5475..0e952d755c44 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/char/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/seekpos/char/3.cc
@@ -23,7 +23,7 @@
 
 void test01() 
 {
-  bool 	test = true;
+  bool test __attribute__((unused)) = true;
   using namespace std;
   typedef stringbuf::pos_type pos_type;
   typedef stringbuf::off_type off_type;
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/setbuf/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/setbuf/char/1.cc
index e79da0eda3ae..cfed7cb319f9 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/setbuf/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/setbuf/char/1.cc
@@ -32,22 +32,14 @@ std::stringbuf strb_03(str_03, std::ios_base::out);
 // test overloaded virtual functions
 void test04() 
 {
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   std::string 		str_tmp;
   std::stringbuf 		strb_tmp;
-  std::streamsize 		strmsz_1, strmsz_2;
-  std::streamoff  		strmof_1(-1), strmof_2;
   typedef std::stringbuf::int_type int_type;
   typedef std::stringbuf::traits_type traits_type;
   typedef std::stringbuf::pos_type pos_type;
   typedef std::stringbuf::off_type off_type;
 
-  int_type c1 = strb_01.sbumpc();
-  int_type c2 = strb_02.sbumpc();
-  int_type c3 = strb_01.sbumpc();
-  int_type c4 = strb_02.sbumpc();
-  int_type c5 = strb_03.sbumpc();
-
   // PUT
   strb_03.str(str_01); //reset
   
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/setbuf/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/setbuf/char/2.cc
index 0eade15314a0..145141e8d67e 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/setbuf/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/setbuf/char/2.cc
@@ -27,7 +27,7 @@ void test01()
 {
   using namespace std;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   char buf[512];
   const char* strlit = "how to tell a story and other essays: mark twain";
   const size_t strlitsize = std::strlen(strlit);
@@ -38,7 +38,7 @@ void test01()
   VERIFY( std::strncmp(strlit, buf, strlitsize) == 0 );
 }
 
-main() 
+int main() 
 {
   test01();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/setbuf/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/setbuf/char/3.cc
index 6a8d0b462e45..02782c526cb9 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/setbuf/char/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/setbuf/char/3.cc
@@ -27,7 +27,7 @@ void test02()
 {
   using namespace std;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   char buf[512];
   const char* strlit = "how to tell a story and other essays: mark twain";
   const size_t strlitsize = std::strlen(strlit);
@@ -38,7 +38,7 @@ void test02()
   VERIFY( std::strncmp(strlit, buf, strlitsize) == 0 );
 }
 
-main() 
+int main() 
 {
   test02();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetc/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetc/char/1.cc
index c34109df6b1a..274cd6159e36 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetc/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetc/char/1.cc
@@ -32,10 +32,9 @@ std::stringbuf strb_03(str_03, std::ios_base::out);
 // test overloaded virtual functions
 void test04() 
 {
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   std::string 		str_tmp;
   std::stringbuf 		strb_tmp;
-  std::streamsize 		strmsz_1, strmsz_2;
   std::streamoff  		strmof_1(-1), strmof_2;
   typedef std::stringbuf::int_type int_type;
   typedef std::stringbuf::traits_type traits_type;
@@ -47,8 +46,6 @@ void test04()
   strmof_2 = strb_02.in_avail();
   strmof_1 = strb_03.in_avail(); 
 
-  int_type c1 = strb_01.sbumpc();
-  int_type c2 = strb_02.sbumpc();
   int_type c3 = strb_01.sbumpc();
   int_type c4 = strb_02.sbumpc();
   int_type c5 = strb_03.sbumpc();
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/char/1.cc
index 420a318c86b5..c68ad1424b52 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sgetn/char/1.cc
@@ -32,7 +32,7 @@ std::stringbuf strb_03(str_03, std::ios_base::out);
 // test overloaded virtual functions
 void test04() 
 {
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   std::string 		str_tmp;
   std::stringbuf 		strb_tmp;
   std::streamsize 		strmsz_1, strmsz_2;
@@ -49,7 +49,7 @@ void test04()
 
   int_type c1 = strb_01.sbumpc();
   int_type c2 = strb_02.sbumpc();
-  int_type c3 = strb_01.sbumpc();
+  strb_01.sbumpc();
   int_type c4 = strb_02.sbumpc();
   int_type c5 = strb_03.sbumpc();
 
@@ -57,9 +57,9 @@ void test04()
   // if read_cur not avail, return uflow(), else return *read_cur  
   int_type c6 = strb_01.sgetc();
   int_type c7 = strb_02.sgetc();
-  int_type c8 = strb_01.sgetc();
-  int_type c9 = strb_02.sgetc();
-  c5 = strb_03.sgetc();
+  strb_01.sgetc();
+  strb_02.sgetc();
+   c5 = strb_03.sgetc();
 
   // int_type snextc()
   // calls sbumpc and if sbumpc != eof, return sgetc
@@ -74,8 +74,9 @@ void test04()
   strmsz_1 = strb_01.in_avail();
   strmsz_2 = strb_02.in_avail();
   test = strmsz_1 != strmsz_2;
-  VERIFY( strmsz_1 != str_01.length() );
-  VERIFY( strmsz_2 != str_02.length() ); //because now we've moved into string
+  VERIFY( strmsz_1 != static_cast<std::streamsize>(str_01.length()) );
+  // because now we've moved into string
+  VERIFY( strmsz_2 != static_cast<std::streamsize>(str_02.length()) ); 
   char carray1[11] = "";
   strmsz_1 = strb_01.sgetn(carray1, 10);
   char carray2[20] = "";
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/char/1.cc
index 63e3515c8026..c94342143a01 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/snextc/char/1.cc
@@ -32,10 +32,9 @@ std::stringbuf strb_03(str_03, std::ios_base::out);
 // test overloaded virtual functions
 void test04() 
 {
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   std::string 		str_tmp;
   std::stringbuf 		strb_tmp;
-  std::streamsize 		strmsz_1, strmsz_2;
   std::streamoff  		strmof_1(-1), strmof_2;
   typedef std::stringbuf::int_type int_type;
   typedef std::stringbuf::traits_type traits_type;
@@ -47,10 +46,10 @@ void test04()
   strmof_2 = strb_02.in_avail();
   strmof_1 = strb_03.in_avail(); 
 
-  int_type c1 = strb_01.sbumpc();
-  int_type c2 = strb_02.sbumpc();
-  int_type c3 = strb_01.sbumpc();
-  int_type c4 = strb_02.sbumpc();
+  strb_01.sbumpc();
+  strb_02.sbumpc();
+  strb_01.sbumpc();
+  strb_02.sbumpc();
   int_type c5 = strb_03.sbumpc();
 
   // int_type sgetc()
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputbackc/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputbackc/char/1.cc
index ef7c68f72c05..853339e23c12 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputbackc/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputbackc/char/1.cc
@@ -32,11 +32,10 @@ std::stringbuf strb_03(str_03, std::ios_base::out);
 // test overloaded virtual functions
 void test04() 
 {
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   std::string 		str_tmp, str_tmp2;
   std::stringbuf 		strb_tmp;
   std::streamsize 		strmsz_1, strmsz_2;
-  std::streamoff  		strmof_1(-1), strmof_2;
   typedef std::stringbuf::int_type int_type;
   typedef std::stringbuf::traits_type traits_type;
   typedef std::stringbuf::pos_type pos_type;
@@ -46,7 +45,6 @@ void test04()
   int_type c2 = strb_02.sbumpc();
   int_type c3 = strb_01.sbumpc();
   int_type c4 = strb_02.sbumpc();
-  int_type c5 = strb_03.sbumpc();
 
   // PUT
   strb_03.str(str_01); //reset
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputbackc/char/9425.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputbackc/char/9425.cc
index e7dcaa1dbb92..6a05d89b10dd 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputbackc/char/9425.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputbackc/char/9425.cc
@@ -29,14 +29,14 @@
 void test09()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   stringbuf sbuf;
   stringbuf::int_type r = sbuf.sputbackc('a');
   VERIFY( r == stringbuf::traits_type::eof() );
 }
 
-main() 
+int main() 
 {
   test09();
   return 0;
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputc/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputc/char/1.cc
index 8e4864248405..5fc08f2ba9b1 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputc/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputc/char/1.cc
@@ -32,11 +32,9 @@ std::stringbuf strb_03(str_03, std::ios_base::out);
 // test overloaded virtual functions
 void test04() 
 {
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   std::string 		str_tmp;
   std::stringbuf 		strb_tmp;
-  std::streamsize 		strmsz_1, strmsz_2;
-  std::streamoff  		strmof_1(-1), strmof_2;
   typedef std::stringbuf::int_type int_type;
   typedef std::stringbuf::traits_type traits_type;
   typedef std::stringbuf::pos_type pos_type;
@@ -45,8 +43,6 @@ void test04()
   int_type c1 = strb_01.sbumpc();
   int_type c2 = strb_02.sbumpc();
   int_type c3 = strb_01.sbumpc();
-  int_type c4 = strb_02.sbumpc();
-  int_type c5 = strb_03.sbumpc();
 
   // PUT
   // int_type sputc(char_type c)
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputc/char/9404-1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputc/char/9404-1.cc
index 6d4019295d2b..38f7ed92c489 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputc/char/9404-1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputc/char/9404-1.cc
@@ -48,7 +48,7 @@ public:
 // libstdc++/9404
 void test04()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   bool over_expected;
 
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputn/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputn/char/1.cc
index 525014c2a02b..801ae7f44bd7 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputn/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputn/char/1.cc
@@ -32,22 +32,15 @@ std::stringbuf strb_03(str_03, std::ios_base::out);
 // test overloaded virtual functions
 void test04() 
 {
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   std::string 		str_tmp;
   std::stringbuf 		strb_tmp;
   std::streamsize 		strmsz_1, strmsz_2;
-  std::streamoff  		strmof_1(-1), strmof_2;
   typedef std::stringbuf::int_type int_type;
   typedef std::stringbuf::traits_type traits_type;
   typedef std::stringbuf::pos_type pos_type;
   typedef std::stringbuf::off_type off_type;
 
-  int_type c1 = strb_01.sbumpc();
-  int_type c2 = strb_02.sbumpc();
-  int_type c3 = strb_01.sbumpc();
-  int_type c4 = strb_02.sbumpc();
-  int_type c5 = strb_03.sbumpc();
-
   // PUT
   strb_03.str(str_01); //reset
   std::string::size_type sz1 = strb_03.str().length();
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputn/char/9404-2.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputn/char/9404-2.cc
index 3cb743cc6999..fe26854c6833 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputn/char/9404-2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputn/char/9404-2.cc
@@ -48,7 +48,7 @@ public:
 // libstdc++/9404
 void test04()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   bool over_expected;
   Derived_stringbuf dsbuf_01;
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/1.cc
index 8de264b08e8f..2f9a5cf176f1 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/1.cc
@@ -32,7 +32,7 @@ std::stringbuf strb_03(str_03, std::ios_base::out);
 // test member functions
 void test03() 
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   //stringbuf::str()
   VERIFY( strb_01.str() == str_01 );
@@ -47,7 +47,7 @@ void test03()
   VERIFY( d1 ); // non-zero
   VERIFY( !d2 ); // zero, cuz ios_base::out
   VERIFY( d1 != d2 ); //these should be the same
-  VERIFY( str_01.length() == d1 );  
+  VERIFY( static_cast<std::streamsize>(str_01.length()) == d1 );  
   VERIFY( strb_01.str() == strb_03.str() ); //ditto
 
   // stringbuf::str(string&) and stringbuf::stringbuf(string&), where the
@@ -58,9 +58,9 @@ void test03()
   std::stringbuf strb_nulls (str_nulls);
   strb_normal.str(str_nulls);  // tried using 'strb_01' rather than declaring
                                // another variable, but then test04 broke!
-  VERIFY( strb_nulls.in_avail() == str_nulls.size()  );
-  VERIFY( strb_nulls.str().size() == 20              );
-  VERIFY( strb_normal.in_avail() == str_nulls.size() );
+  VERIFY( strb_nulls.in_avail() == static_cast<std::streamsize>(str_nulls.size())  );
+  VERIFY( strb_nulls.str().size() == 20 );
+  VERIFY( strb_normal.in_avail() == static_cast<std::streamsize>(str_nulls.size()) );
 }
 
 int main()
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/2.cc
index feabe74e1aeb..f6dda2f19a27 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/2.cc
@@ -27,7 +27,7 @@
 // which didn't notice the grow.
 void test07()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::stringbuf strb_01;
   strb_01.sputc('s');
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/3.cc
index 7fa42a6d1fd6..038c9a7d884c 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/3.cc
@@ -24,7 +24,7 @@
 
 void test06()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::ostringstream os ("foo", std::ios_base::app);
   os << "bar";
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/3955.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/3955.cc
index d43fd89345a7..82e613d504df 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/3955.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/3955.cc
@@ -25,7 +25,7 @@
 // libstdc++/3955 -- ios_base::app overwrites from the beginning
 void test05()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::ostringstream os ("foo");
   os << "bar";
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sungetc/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sungetc/char/1.cc
index c7bb35240bd1..a90885a1c6ce 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sungetc/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sungetc/char/1.cc
@@ -32,11 +32,10 @@ std::stringbuf strb_03(str_03, std::ios_base::out);
 // test overloaded virtual functions
 void test04() 
 {
-  bool 			test = true;
+  bool test __attribute__((unused)) = true;
   std::string 		str_tmp;
   std::stringbuf 		strb_tmp;
   std::streamsize 		strmsz_1, strmsz_2;
-  std::streamoff  		strmof_1(-1), strmof_2;
   typedef std::stringbuf::int_type int_type;
   typedef std::stringbuf::traits_type traits_type;
   typedef std::stringbuf::pos_type pos_type;
@@ -46,7 +45,6 @@ void test04()
   int_type c2 = strb_02.sbumpc();
   int_type c3 = strb_01.sbumpc();
   int_type c4 = strb_02.sbumpc();
-  int_type c5 = strb_03.sbumpc();
 
   // PUT
   strb_03.str(str_01); //reset
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sync/char/1057.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sync/char/1057.cc
index 85717200d88a..f33e39aa5f2b 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sync/char/1057.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sync/char/1057.cc
@@ -76,7 +76,7 @@ public:
 // libstdc++/1057
 void test04()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::string text = "abcdefghijklmn";
   
   // 01
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringstream/3.cc b/libstdc++-v3/testsuite/27_io/basic_stringstream/3.cc
index 036d7e59bdb8..896c35c6104b 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringstream/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringstream/3.cc
@@ -59,7 +59,7 @@ struct gnu_char_traits
   typedef gnu_char_type	char_type;
   typedef long  		int_type;
   typedef long 		pos_type;
-  typedef unsigned long 	off_type;
+  typedef long 	off_type;
   typedef long   		state_type;
   
   static void 
@@ -117,7 +117,7 @@ struct gnu_char_traits
 
 void test07()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   typedef std::basic_stringstream<gnu_char_type, gnu_char_traits> gnu_sstr;
 
   try
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringstream/4.cc b/libstdc++-v3/testsuite/27_io/basic_stringstream/4.cc
index dcd5dc3dc642..6189c2677847 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringstream/4.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringstream/4.cc
@@ -29,7 +29,7 @@ void test01()
   typedef std::stringstream test_type;
   typedef std::iostream base_type;
   const test_type& obj = test_type();
-  const base_type* base = &obj;
+  const base_type* base __attribute__((unused)) = &obj;
 }
 
 int main()
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringstream/rdbuf/char/2832.cc b/libstdc++-v3/testsuite/27_io/basic_stringstream/rdbuf/char/2832.cc
index 5e4fe022e753..9a0b6685560a 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringstream/rdbuf/char/2832.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringstream/rdbuf/char/2832.cc
@@ -34,9 +34,8 @@ active_buffer(std::ios& stream)
 // libstdc++/2832
 void test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* strlit01 = "fuck war";
-  const char* strlit02 = "two less cars abstract riot crew, critical mass/SF";
   const std::string str00;
   const std::string str01(strlit01);
   std::string str02;
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/1.cc
index 79b1e9cb35ee..45c78cdafacc 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/1.cc
@@ -25,7 +25,7 @@
 
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::stringstream is01;
   const std::string str00; 
   const std::string str01 = "123";
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/2.cc
index 04f2746bcdee..397de5f1b862 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/2.cc
@@ -34,9 +34,8 @@ active_buffer(std::ios& stream)
 // libstdc++/2832
 void test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* strlit01 = "fuck war";
-  const char* strlit02 = "two less cars abstract riot crew, critical mass/SF";
   const std::string str00;
   const std::string str01(strlit01);
   std::string str02;
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/3.cc
index 47901a6e4980..2d24f6b79221 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/3.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/3.cc
@@ -26,7 +26,7 @@
 void
 test03()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   //
   // 1: Automatic formatting of a compound string
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/4.cc b/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/4.cc
index 7d77fc2c63cd..8dfe9b5d53b9 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/4.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/4.cc
@@ -26,7 +26,7 @@
 // libstdc++/8466
 void test04()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   const char* strlit00 = "orvieto";
   const std::string str00 = strlit00;
diff --git a/libstdc++-v3/testsuite/27_io/fpos/mbstate_t/1.cc b/libstdc++-v3/testsuite/27_io/fpos/mbstate_t/1.cc
index 3a8fef7722f6..dc25b78fa5d3 100644
--- a/libstdc++-v3/testsuite/27_io/fpos/mbstate_t/1.cc
+++ b/libstdc++-v3/testsuite/27_io/fpos/mbstate_t/1.cc
@@ -35,7 +35,7 @@
 
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   typedef std::mbstate_t state_type;
   state_type state01 = state_type();
@@ -44,12 +44,6 @@ void test01()
   std::streampos pos01(0);
   std::streampos pos02(0);
 
-  std::streamoff off01;
-  std::streamoff off02;
-  
-  std::streamsize size01;
-  std::streamsize size02;
-
   // 27.4.3.1 fpos members
   // void state(state_type s);
   // state_type state();
diff --git a/libstdc++-v3/testsuite/27_io/fpos/mbstate_t/2.cc b/libstdc++-v3/testsuite/27_io/fpos/mbstate_t/2.cc
index 46c64b8bef5a..32699b97e57e 100644
--- a/libstdc++-v3/testsuite/27_io/fpos/mbstate_t/2.cc
+++ b/libstdc++-v3/testsuite/27_io/fpos/mbstate_t/2.cc
@@ -36,16 +36,12 @@
 // 27.4.3.2 fpos requirements/invariants
 void test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   typedef std::mbstate_t state_type;
-  state_type state01;
-  state_type state02;
 
   std::streamoff off01;
   std::streamoff off02 = 997;
-  
-  int i01 = 0;
   int i02 = 999;
 
   // p(i), p = i
diff --git a/libstdc++-v3/testsuite/27_io/fpos/mbstate_t/3.cc b/libstdc++-v3/testsuite/27_io/fpos/mbstate_t/3.cc
index 777de9e7ad07..4b79950fa8cc 100644
--- a/libstdc++-v3/testsuite/27_io/fpos/mbstate_t/3.cc
+++ b/libstdc++-v3/testsuite/27_io/fpos/mbstate_t/3.cc
@@ -35,18 +35,11 @@
 
 void test03()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   typedef std::mbstate_t state_type;
-  state_type state01;
-  state_type state02;
-
   std::streamoff off01;
-  std::streamoff off02 = 997;
   
-  int i01 = 0;
-  int i02 = 999;
-
   // casts to const streamoff
   // (yes, I know this is weak code)
   const std::streampos pos01 = 0;
diff --git a/libstdc++-v3/testsuite/27_io/ios_base/callbacks/1.cc b/libstdc++-v3/testsuite/27_io/ios_base/callbacks/1.cc
index 09cfee4affd0..001d8fab825f 100644
--- a/libstdc++-v3/testsuite/27_io/ios_base/callbacks/1.cc
+++ b/libstdc++-v3/testsuite/27_io/ios_base/callbacks/1.cc
@@ -28,20 +28,20 @@ const std::string str01("the nubians of plutonia");
 std::string str02;
 
 void 
-callb01(std::ios_base::event e,  std::ios_base& b, int i)
+callb01(std::ios_base::event,  std::ios_base&, int)
 { str02 += "the nubians"; }
 
 void 
-callb02(std::ios_base::event e,  std::ios_base& b, int i)
+callb02(std::ios_base::event,  std::ios_base&, int)
 { str02 += " of "; }
 
 void 
-callb03(std::ios_base::event e,  std::ios_base& b, int i)
+callb03(std::ios_base::event,  std::ios_base&, int)
 { str02 += "plutonia"; }
 
 void test01() 
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::locale loc("C");
   std::stringbuf 	strbuf01;
   std::ios		ios01(&strbuf01);
diff --git a/libstdc++-v3/testsuite/27_io/ios_base/state/1.cc b/libstdc++-v3/testsuite/27_io/ios_base/state/1.cc
index bc6a356edd30..0dcae30c218a 100644
--- a/libstdc++-v3/testsuite/27_io/ios_base/state/1.cc
+++ b/libstdc++-v3/testsuite/27_io/ios_base/state/1.cc
@@ -33,7 +33,7 @@
 void
 test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const std::string strue("true");
   const std::string sfalse("false");
   std::string str01;
@@ -42,7 +42,7 @@ test02()
   std::locale loc_c = std::locale::classic();
   std::ostringstream ostr01;
   ostr01.imbue(loc_c);
-  std::ios_base::fmtflags ff = ostr01.flags(std::ios_base::boolalpha);
+  ostr01.flags(std::ios_base::boolalpha);
 
   ostr01 << true;
   str02 = ostr01.str();
diff --git a/libstdc++-v3/testsuite/27_io/ios_base/storage/1.cc b/libstdc++-v3/testsuite/27_io/ios_base/storage/1.cc
index ee27d44788c1..ce5303111acf 100644
--- a/libstdc++-v3/testsuite/27_io/ios_base/storage/1.cc
+++ b/libstdc++-v3/testsuite/27_io/ios_base/storage/1.cc
@@ -33,13 +33,13 @@
 // http://gcc.gnu.org/ml/gcc-bugs/2000-12/msg00413.html
 void test01() 
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   
   using namespace std;
 
-  long x1 = ios::xalloc();
-  long x2 = ios::xalloc();
-  long x3 = ios::xalloc();
+  ios::xalloc();
+  ios::xalloc();
+  ios::xalloc();
   long x4 = ios::xalloc();
 
   ostringstream out("the element of crime, lars von trier");
diff --git a/libstdc++-v3/testsuite/27_io/ios_base/storage/2.cc b/libstdc++-v3/testsuite/27_io/ios_base/storage/2.cc
index 7df7eb965b48..960669e4804e 100644
--- a/libstdc++-v3/testsuite/27_io/ios_base/storage/2.cc
+++ b/libstdc++-v3/testsuite/27_io/ios_base/storage/2.cc
@@ -33,7 +33,7 @@
 // libstdc++/3129
 void test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   int max = std::numeric_limits<int>::max() - 1;
   std::stringbuf        strbuf;
   std::ios              ios(&strbuf);
diff --git a/libstdc++-v3/testsuite/27_io/ios_base/sync_with_stdio/2.cc b/libstdc++-v3/testsuite/27_io/ios_base/sync_with_stdio/2.cc
index b645b4a98fd2..0976192fc9f7 100644
--- a/libstdc++-v3/testsuite/27_io/ios_base/sync_with_stdio/2.cc
+++ b/libstdc++-v3/testsuite/27_io/ios_base/sync_with_stdio/2.cc
@@ -33,7 +33,7 @@
 
 void test02() 
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   
   std::stringbuf 	strbuf01;
   std::ios		ios01(&strbuf01);
diff --git a/libstdc++-v3/testsuite/27_io/manipulators/adjustfield/char/1.cc b/libstdc++-v3/testsuite/27_io/manipulators/adjustfield/char/1.cc
index b3901d8f7b85..ce69fc26d64d 100644
--- a/libstdc++-v3/testsuite/27_io/manipulators/adjustfield/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/manipulators/adjustfield/char/1.cc
@@ -54,7 +54,7 @@ std::string MyNP::do_falsename() const
 void
 test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char lit[] = "1 0\ntrue false\n:  true:\n:true  :\n: false:\n:  1:"
     		     "\n:1  :\n:  0:\nyea nay\n:   yea:\n:yea   :\n:   nay:\n";
   std::ostringstream oss;
diff --git a/libstdc++-v3/testsuite/27_io/manipulators/adjustfield/char/2.cc b/libstdc++-v3/testsuite/27_io/manipulators/adjustfield/char/2.cc
index 12b52aa01347..cf2253c0d61e 100644
--- a/libstdc++-v3/testsuite/27_io/manipulators/adjustfield/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/manipulators/adjustfield/char/2.cc
@@ -32,7 +32,7 @@
 
 void test02()
 {
-  bool 		test = true;
+  bool test __attribute__((unused)) = true;
   const std::string 	str_blank;
   std::string 	str_tmp;
   std::stringbuf 	strbuf;
diff --git a/libstdc++-v3/testsuite/27_io/manipulators/basefield/char/1.cc b/libstdc++-v3/testsuite/27_io/manipulators/basefield/char/1.cc
index 10336f50f1ce..f16eb1a9c6c8 100644
--- a/libstdc++-v3/testsuite/27_io/manipulators/basefield/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/manipulators/basefield/char/1.cc
@@ -44,7 +44,7 @@ char   MyNP::do_thousands_sep() const { return ' '; }
 
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   const char lit[] = "0123 456\n: 01 234 567:\n:0123 456   :\n"
                      ":    012 345:\n:     01 234:\n:0726 746 425:\n"
diff --git a/libstdc++-v3/testsuite/27_io/manipulators/standard/char/1.cc b/libstdc++-v3/testsuite/27_io/manipulators/standard/char/1.cc
index 71822372fc83..d2d6b82dd09c 100644
--- a/libstdc++-v3/testsuite/27_io/manipulators/standard/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/manipulators/standard/char/1.cc
@@ -26,7 +26,7 @@ void
 test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   string s("john coltrane, a love supreme");
   istringstream  iss(s);
diff --git a/libstdc++-v3/testsuite/27_io/manipulators/standard/char/2.cc b/libstdc++-v3/testsuite/27_io/manipulators/standard/char/2.cc
index b7ee2b4b6f53..be6c22deb05d 100644
--- a/libstdc++-v3/testsuite/27_io/manipulators/standard/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/manipulators/standard/char/2.cc
@@ -35,7 +35,7 @@ void
 test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   string x ("   this is text");
   istringstream  sin (x);
   ostringstream  sout;
diff --git a/libstdc++-v3/testsuite/27_io/objects/char/1.cc b/libstdc++-v3/testsuite/27_io/objects/char/1.cc
index 6ab05e861f13..78e58cf9bf01 100644
--- a/libstdc++-v3/testsuite/27_io/objects/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/char/1.cc
@@ -75,7 +75,7 @@
 // Make sure all the standard streams are defined.
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   char array1[20];
   typedef std::ios::traits_type ctraits_type;
diff --git a/libstdc++-v3/testsuite/27_io/objects/char/10.cc b/libstdc++-v3/testsuite/27_io/objects/char/10.cc
index 4990a58857dd..57188ca10d33 100644
--- a/libstdc++-v3/testsuite/27_io/objects/char/10.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/char/10.cc
@@ -26,7 +26,7 @@ void test10()
 {
   using namespace std;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* name = "filebuf_virtuals-1.txt";
 
   FILE* ret = freopen(name, "r", stdin);
diff --git a/libstdc++-v3/testsuite/27_io/objects/char/3045.cc b/libstdc++-v3/testsuite/27_io/objects/char/3045.cc
index ad190d0f2b5c..a65eff54b510 100644
--- a/libstdc++-v3/testsuite/27_io/objects/char/3045.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/char/3045.cc
@@ -46,7 +46,7 @@ gnu_filebuf buf(initial);
 // libstdc++/3045, in a vague way.
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   int k1;
 
   // 1 normal
diff --git a/libstdc++-v3/testsuite/27_io/objects/char/5.cc b/libstdc++-v3/testsuite/27_io/objects/char/5.cc
index aa15e936363c..da93e83e1271 100644
--- a/libstdc++-v3/testsuite/27_io/objects/char/5.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/char/5.cc
@@ -69,7 +69,7 @@ int use_standard_streams()
 
 void test05()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   int i = static_ob.i;
 
   VERIFY( std::cin.iword(i) == i + 1 );
diff --git a/libstdc++-v3/testsuite/27_io/objects/char/6.cc b/libstdc++-v3/testsuite/27_io/objects/char/6.cc
index af3aa8c0b479..df86b33c26a7 100644
--- a/libstdc++-v3/testsuite/27_io/objects/char/6.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/char/6.cc
@@ -37,7 +37,7 @@ protected:
 
 void test06()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   try
     {
diff --git a/libstdc++-v3/testsuite/27_io/objects/char/6548_xin.cc b/libstdc++-v3/testsuite/27_io/objects/char/6548_xin.cc
index ce6133bc39b3..e29b2082152d 100644
--- a/libstdc++-v3/testsuite/27_io/objects/char/6548_xin.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/char/6548_xin.cc
@@ -24,7 +24,7 @@
 // libstdc++/6548
 void test07()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::cout << "Enter 'test':";
   std::string s;
   std::getline(std::cin, s, '\n');
diff --git a/libstdc++-v3/testsuite/27_io/objects/char/6648-1_xin.cc b/libstdc++-v3/testsuite/27_io/objects/char/6648-1_xin.cc
index 9802f092a1fa..f6d8dd8638bb 100644
--- a/libstdc++-v3/testsuite/27_io/objects/char/6648-1_xin.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/char/6648-1_xin.cc
@@ -24,7 +24,7 @@
 // Interactive tests: each one (run alone) must terminate upon a single '\n'.
 void test08()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   char buff[2048];
   std::cout << "Enter name: ";
   std::cin.getline(buff, 2048);
diff --git a/libstdc++-v3/testsuite/27_io/objects/char/6648-2_xin.cc b/libstdc++-v3/testsuite/27_io/objects/char/6648-2_xin.cc
index e25a8c3e765f..efe4e65bec45 100644
--- a/libstdc++-v3/testsuite/27_io/objects/char/6648-2_xin.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/char/6648-2_xin.cc
@@ -22,7 +22,7 @@
 
 void test09()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::cout << "Enter favorite beach: ";
   std::cin.ignore(2048, '\n');
 }
diff --git a/libstdc++-v3/testsuite/27_io/objects/char/7.cc b/libstdc++-v3/testsuite/27_io/objects/char/7.cc
index 3e3e7232f032..21a7b49c4796 100644
--- a/libstdc++-v3/testsuite/27_io/objects/char/7.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/char/7.cc
@@ -36,7 +36,7 @@
 void test07()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   const char* name = "tmp_fifo4";
 
diff --git a/libstdc++-v3/testsuite/27_io/objects/char/7744_xin.cc b/libstdc++-v3/testsuite/27_io/objects/char/7744_xin.cc
index 977af9a44291..a3dc9805a451 100644
--- a/libstdc++-v3/testsuite/27_io/objects/char/7744_xin.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/char/7744_xin.cc
@@ -24,7 +24,7 @@
 // libstdc++/7744
 void test11()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::ios::sync_with_stdio(false);
 
   std::cout << "Type in the characters 'abc' and press <ENTER>: ";
diff --git a/libstdc++-v3/testsuite/27_io/objects/char/8.cc b/libstdc++-v3/testsuite/27_io/objects/char/8.cc
index 28a06a10ad39..7f39c3132287 100644
--- a/libstdc++-v3/testsuite/27_io/objects/char/8.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/char/8.cc
@@ -25,7 +25,7 @@
 
 void test02() 
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   
   // 27.3 - Standard iostream objects p 2
   // The objects are not destroyed during program execution.
diff --git a/libstdc++-v3/testsuite/27_io/objects/char/9.cc b/libstdc++-v3/testsuite/27_io/objects/char/9.cc
index faa05e65ebfe..32424133d408 100644
--- a/libstdc++-v3/testsuite/27_io/objects/char/9.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/char/9.cc
@@ -26,7 +26,7 @@ void test09()
 {
   using namespace std;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* name = "tmp_09";
 
   FILE* fout = fopen(name, "w");
diff --git a/libstdc++-v3/testsuite/27_io/objects/char/9661-1.cc b/libstdc++-v3/testsuite/27_io/objects/char/9661-1.cc
index c4890cc5d19e..61855064277b 100644
--- a/libstdc++-v3/testsuite/27_io/objects/char/9661-1.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/char/9661-1.cc
@@ -37,7 +37,7 @@ void test01()
 {
   using namespace std;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   const char* name = "tmp_fifo5";
 
diff --git a/libstdc++-v3/testsuite/27_io/objects/char/9661-2_xin.cc b/libstdc++-v3/testsuite/27_io/objects/char/9661-2_xin.cc
index 6b617463608b..f88ab64d6216 100644
--- a/libstdc++-v3/testsuite/27_io/objects/char/9661-2_xin.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/char/9661-2_xin.cc
@@ -26,7 +26,7 @@ void test02()
 {
   using namespace std;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   int c1 = fgetc(stdin);
   int c2 = cin.rdbuf()->sputbackc(c1);
diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/1.cc
index c766cd6fa5b9..61b654833ab9 100644
--- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/1.cc
@@ -78,7 +78,7 @@
 void
 test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   wchar_t array2[20];
   typedef std::wios::traits_type wtraits_type;
diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/10.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/10.cc
index f797380836f4..3c576530b315 100644
--- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/10.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/10.cc
@@ -27,7 +27,7 @@ void test10()
 {
   using namespace std;
   
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* name = "tmp_10";
 
   locale loc(__gnu_test::try_named_locale("se_NO.UTF-8"));
diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/11.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/11.cc
index d538612a60d1..576b6107882f 100644
--- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/11.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/11.cc
@@ -27,7 +27,7 @@ void test11()
 {
   using namespace std;
   
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* name = "tmp_11";
 
   locale loc(__gnu_test::try_named_locale("se_NO.UTF-8"));
diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/12.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/12.cc
index 50e4e78cd8c7..c5c70450ba78 100644
--- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/12.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/12.cc
@@ -32,7 +32,7 @@ void test12()
 {
   using namespace std;
   
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* name = "tmp_12";
 
   locale loc(__gnu_test::try_named_locale("se_NO.UTF-8"));
diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/13.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/13.cc
index b974b4afb858..b4f735101d70 100644
--- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/13.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/13.cc
@@ -32,7 +32,7 @@ void test13()
 {
   using namespace std;
   
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* name = "tmp_13";
 
   locale loc(__gnu_test::try_named_locale("se_NO.UTF-8"));
@@ -104,7 +104,7 @@ void test13()
   wchar_t wbuf[wlen + 10];
   wcin.read(wbuf, wlen + 10);
   streamsize n = wcin.gcount();
-  VERIFY( n == wlen );
+  VERIFY( n == static_cast<streamsize>(wlen) );
   VERIFY( !wmemcmp(wbuf, wstr, wlen) );
   VERIFY( wcin.eof() );
   VERIFY( wcin.fail() );
diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/3045.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/3045.cc
index acc45b25b77f..9f266f26bd0d 100644
--- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/3045.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/3045.cc
@@ -46,7 +46,7 @@ gnu_filebuf buf(initial);
 // libstdc++/3045, in a vague way.
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   int k1;
 
   // 1 normal
diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/5.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/5.cc
index 267bc792acd2..318598f5e9d9 100644
--- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/5.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/5.cc
@@ -69,7 +69,7 @@ int use_standard_streams()
 
 void test05()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   int i = static_ob.i;
 
   VERIFY( std::wcin.iword(i) == i + 1 );
diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/6548_xin.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/6548_xin.cc
index 0466b6754771..8bec16fd77ee 100644
--- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/6548_xin.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/6548_xin.cc
@@ -24,7 +24,7 @@
 // libstdc++/6548
 void test07()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::wcout << L"Enter 'test':";
   std::wstring s;
   std::getline(std::wcin, s, L'\n');
diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/6648-1_xin.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/6648-1_xin.cc
index 4db05d1e06fd..7417f883d107 100644
--- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/6648-1_xin.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/6648-1_xin.cc
@@ -24,7 +24,7 @@
 // Interactive tests: each one (run alone) must terminate upon a single '\n'.
 void test08()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   wchar_t buff[2048];
   std::wcout << "Enter name: ";
   std::wcin.getline(buff, 2048);
diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/6648-2_xin.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/6648-2_xin.cc
index 778c58f07b45..13cd6a5d423f 100644
--- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/6648-2_xin.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/6648-2_xin.cc
@@ -22,7 +22,7 @@
 
 void test09()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::wcout << L"Enter favorite beach: ";
   std::wcin.ignore(2048, '\n');
 }
diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/7.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/7.cc
index fcdeaba2ff5a..004687af01f9 100644
--- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/7.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/7.cc
@@ -33,7 +33,7 @@
 void test07()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   const char* name = "tmp_fifo4";
 
diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/7744_xin.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/7744_xin.cc
index e4ca3b95d46b..0bcb122cd370 100644
--- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/7744_xin.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/7744_xin.cc
@@ -24,7 +24,7 @@
 // libstdc++/7744
 void test11()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   std::ios::sync_with_stdio(false);
 
   std::wcout << "Type in the characters 'abc' and press <ENTER>: ";
diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/8.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/8.cc
index 346d0fc81d41..b1427f3cf52c 100644
--- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/8.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/8.cc
@@ -25,7 +25,7 @@
 
 void test02() 
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   
   // 27.3 - Standard iostream objects p 2
   // The objects are not destroyed during program execution.
diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/9520.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/9520.cc
index 79d087840c52..6d41e9b5e5e1 100644
--- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/9520.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/9520.cc
@@ -26,7 +26,7 @@ void test01()
 {
   using namespace std;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* name = "tmp_9520";
 
   FILE* file = fopen(name, "w");
diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/9661-1.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/9661-1.cc
index 0d8d6283521c..9c9d082546d5 100644
--- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/9661-1.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/9661-1.cc
@@ -34,7 +34,7 @@ void test01()
 {
   using namespace std;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   const char* name = "tmp_fifo5";
 
diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/9661-2_xin.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/9661-2_xin.cc
index 351a91b6f035..40e2151565fe 100644
--- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/9661-2_xin.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/9661-2_xin.cc
@@ -27,7 +27,7 @@ void test02()
 {
   using namespace std;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   wint_t c1 = fgetwc(stdin);
   wint_t c2 = wcin.rdbuf()->sputbackc(c1);
diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/9662.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/9662.cc
index 27c7ff7f7cdb..15d6c513f16c 100644
--- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/9662.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/9662.cc
@@ -27,7 +27,7 @@
 // on stdout.
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   std::wcout << L"Hello, ";
   VERIFY( std::fwide(stdout, 0) >= 0 );
diff --git a/libstdc++-v3/testsuite/27_io/types/2.cc b/libstdc++-v3/testsuite/27_io/types/2.cc
index c64e20b78fbd..6e0cb502220b 100644
--- a/libstdc++-v3/testsuite/27_io/types/2.cc
+++ b/libstdc++-v3/testsuite/27_io/types/2.cc
@@ -27,7 +27,7 @@ void test01()
   std::streamoff soff;
 
   // No signed/unsigned warnings.
-  long l = ssize;
+  long l __attribute__((unused)) = ssize;
 
   // Wrapped in pos_type is EOF.
   soff = -1;
diff --git a/libstdc++-v3/testsuite/backward/strstream_members.cc b/libstdc++-v3/testsuite/backward/strstream_members.cc
index 107041041f7b..906201c8967a 100644
--- a/libstdc++-v3/testsuite/backward/strstream_members.cc
+++ b/libstdc++-v3/testsuite/backward/strstream_members.cc
@@ -23,17 +23,16 @@
 
 // { dg-options "-Wno-deprecated" }
 
-int test01()
+void test01()
 {
    std::strstream s;
    for (unsigned i=0 ; i!= 1000 ; ++i)
       s << i << std::endl;
    s << std::ends;
-   return 0;
 }
 
 
-int test02()
+void test02()
 {
   std::ostrstream buf;
   buf << std::ends;
diff --git a/libstdc++-v3/testsuite/ext/allocators.cc b/libstdc++-v3/testsuite/ext/allocators.cc
index 34188c47328a..85205d53a7bb 100644
--- a/libstdc++-v3/testsuite/ext/allocators.cc
+++ b/libstdc++-v3/testsuite/ext/allocators.cc
@@ -64,7 +64,7 @@ operator delete(void *v) throw()
 template<typename Alloc, bool uses_global_new_and_delete>
 void check_allocator()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   new_called = false;
   delete_called = false;
   requested = 0;
diff --git a/libstdc++-v3/testsuite/ext/hash_map.cc b/libstdc++-v3/testsuite/ext/hash_map.cc
index 55b740f3ee8e..9911968c0272 100644
--- a/libstdc++-v3/testsuite/ext/hash_map.cc
+++ b/libstdc++-v3/testsuite/ext/hash_map.cc
@@ -68,7 +68,7 @@ const int Size = 5;
 
 void test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   for (int i = 0; i < 10; i++)
   {
diff --git a/libstdc++-v3/testsuite/ext/hash_set.cc b/libstdc++-v3/testsuite/ext/hash_set.cc
index 068bdcd2e763..de0020dd626f 100644
--- a/libstdc++-v3/testsuite/ext/hash_set.cc
+++ b/libstdc++-v3/testsuite/ext/hash_set.cc
@@ -26,7 +26,7 @@
 void
 test01()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const int werte[] = { 1, 25, 9, 16, -36};
   const int anzahl = sizeof(werte) / sizeof(int);
   __gnu_cxx::hash_set<int> intTable(werte, werte + anzahl);
diff --git a/libstdc++-v3/testsuite/ext/pod_char_traits.cc b/libstdc++-v3/testsuite/ext/pod_char_traits.cc
index 0a6934830d71..d18afde8a0c4 100644
--- a/libstdc++-v3/testsuite/ext/pod_char_traits.cc
+++ b/libstdc++-v3/testsuite/ext/pod_char_traits.cc
@@ -41,7 +41,7 @@ int main()
   typedef character<value_type, int_type>	char_type;
   typedef std::char_traits<char_type> 		traits_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   // 1 char_type <-> value_type conversions
   value_type uc1 = 'c';
@@ -70,8 +70,8 @@ int main()
   str += c7;
   str += c8;
   str += c9;
-  string_type::size_type len = str.size();
-  const char_type* arr = str.c_str();
+  string_type::size_type len __attribute__((unused)) = str.size();
+  const char_type* arr __attribute__((unused)) = str.c_str();
 
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/ext/stdio_filebuf_2.cc b/libstdc++-v3/testsuite/ext/stdio_filebuf_2.cc
index a46f2399b427..1ef57eecb21a 100644
--- a/libstdc++-v3/testsuite/ext/stdio_filebuf_2.cc
+++ b/libstdc++-v3/testsuite/ext/stdio_filebuf_2.cc
@@ -30,7 +30,7 @@
 void test01()
 {
   using namespace std;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
 
   const char* name = "tmp_file1";
   FILE* file = fopen(name, "w");
diff --git a/libstdc++-v3/testsuite/ext/stdio_sync_filebuf_char.cc b/libstdc++-v3/testsuite/ext/stdio_sync_filebuf_char.cc
index 095829621fbb..5134cadfbe9c 100644
--- a/libstdc++-v3/testsuite/ext/stdio_sync_filebuf_char.cc
+++ b/libstdc++-v3/testsuite/ext/stdio_sync_filebuf_char.cc
@@ -25,7 +25,7 @@ void test01()
 {
   using namespace std;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* c_lit = "black pearl jasmine tea";
   int size = strlen(c_lit);
   const char* name = "stdiobuf-1.txt";
@@ -59,7 +59,7 @@ void test01()
 // libstdc++/12048
 void test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* name = "cin_unget-1.txt";
 
   std::FILE* file = std::fopen(name, "r");
@@ -77,7 +77,7 @@ void test02()
 // libstdc++/12048
 void test03()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* name = "cin_unget-1.txt";
 
   std::FILE* file = std::fopen(name, "r");
@@ -95,7 +95,7 @@ void test03()
 // libstdc++/12048
 void test04()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* name = "cin_unget-1.txt";
 
   std::FILE* file = std::fopen(name, "r");
@@ -113,7 +113,7 @@ void test04()
 // libstdc++/12048
 void test05()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* name = "cin_unget-1.txt";
 
   std::FILE* file = std::fopen(name, "r");
diff --git a/libstdc++-v3/testsuite/ext/stdio_sync_filebuf_wchar_t.cc b/libstdc++-v3/testsuite/ext/stdio_sync_filebuf_wchar_t.cc
index 25276a2d6777..96831c3c2f4a 100644
--- a/libstdc++-v3/testsuite/ext/stdio_sync_filebuf_wchar_t.cc
+++ b/libstdc++-v3/testsuite/ext/stdio_sync_filebuf_wchar_t.cc
@@ -24,8 +24,9 @@
 void test01()
 {
   using namespace std;
+  typedef char_traits<wchar_t> traits_type;
 
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* c_lit = "black pearl jasmine tea";
   const wchar_t* w_lit = L"black pearl jasmine tea";
   int size = strlen(c_lit);
@@ -38,13 +39,13 @@ void test01()
   FILE* fin = fopen(name, "r");
   __gnu_cxx::stdio_sync_filebuf<wchar_t> wsbuf(fin);
 
-  VERIFY( wsbuf.sgetc() == w_lit[0] );
-  VERIFY( getwc(fin) == w_lit[0] );
-  VERIFY( wsbuf.sgetc() == w_lit[1] );
-  VERIFY( wsbuf.sbumpc() == w_lit[1] );
+  VERIFY( traits_type::to_char_type(wsbuf.sgetc()) == w_lit[0] );
+  VERIFY( traits_type::to_char_type(getwc(fin)) == w_lit[0] );
+  VERIFY( traits_type::to_char_type(wsbuf.sgetc()) == w_lit[1] );
+  VERIFY( traits_type::to_char_type(wsbuf.sbumpc()) == w_lit[1] );
   VERIFY( ungetwc(L'Z', fin) == L'Z' );
   VERIFY( wsbuf.sbumpc() == L'Z' );
-  VERIFY( getwc(fin) == w_lit[2] );
+  VERIFY( traits_type::to_char_type(getwc(fin)) == w_lit[2] );
   VERIFY( wsbuf.sputbackc(L'X') == L'X' );
   VERIFY( getwc(fin) == L'X' );
 
@@ -52,7 +53,7 @@ void test01()
   wmemset(buf, 0xdeadbeef, 5);
   VERIFY( wsbuf.sgetn(buf, 5) == 5 );
   VERIFY( !wmemcmp(buf, w_lit + 3, 5) );
-  VERIFY( getwc(fin) == w_lit[8] );
+  VERIFY( traits_type::to_char_type(getwc(fin)) == w_lit[8] );
 
   fclose(fin);
 }
@@ -60,7 +61,7 @@ void test01()
 // libstdc++/12048
 void test02()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* name = "cin_unget-1.txt";
 
   std::FILE* file = std::fopen(name, "r");
@@ -78,7 +79,7 @@ void test02()
 // libstdc++/12048
 void test03()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* name = "cin_unget-1.txt";
 
   std::FILE* file = std::fopen(name, "r");
@@ -96,7 +97,7 @@ void test03()
 // libstdc++/12048
 void test04()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* name = "cin_unget-1.txt";
 
   std::FILE* file = std::fopen(name, "r");
@@ -114,7 +115,7 @@ void test04()
 // libstdc++/12048
 void test05()
 {
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   const char* name = "cin_unget-1.txt";
 
   std::FILE* file = std::fopen(name, "r");
diff --git a/libstdc++-v3/testsuite/performance/map_create_fill.cc b/libstdc++-v3/testsuite/performance/map_create_fill.cc
index b2f525541430..0e675d00ffb7 100644
--- a/libstdc++-v3/testsuite/performance/map_create_fill.cc
+++ b/libstdc++-v3/testsuite/performance/map_create_fill.cc
@@ -26,7 +26,7 @@ static void create_and_fill(const unsigned int n)
 {
   typedef std::map<int, int>  Map;
   Map                         m;
-  bool test = true;
+  bool test __attribute__((unused)) = true;
   
   for (unsigned int i = 0; i < n; ++i)
     m[i] = i;
diff --git a/libstdc++-v3/testsuite/testsuite_hooks.h b/libstdc++-v3/testsuite/testsuite_hooks.h
index 698433582cf7..e68850979ee2 100644
--- a/libstdc++-v3/testsuite/testsuite_hooks.h
+++ b/libstdc++-v3/testsuite/testsuite_hooks.h
@@ -337,7 +337,7 @@ namespace std
       typedef __gnu_test::pod_char	char_type;
       typedef __gnu_test::pod_int  	int_type;
       typedef long 			pos_type;
-      typedef unsigned long 		off_type;
+      typedef long 			off_type;
       typedef __gnu_test::state   	state_type;
       
       static void 
diff --git a/libstdc++-v3/testsuite/thread/pthread1.cc b/libstdc++-v3/testsuite/thread/pthread1.cc
index 1283a75119a0..92a5f312842b 100644
--- a/libstdc++-v3/testsuite/thread/pthread1.cc
+++ b/libstdc++-v3/testsuite/thread/pthread1.cc
@@ -100,7 +100,7 @@ consume (void* t)
 }
 
 int
-main (int argc, char** argv)
+main ()
 {
   pthread_t prod[thread_pairs];
   pthread_t cons[thread_pairs];
diff --git a/libstdc++-v3/testsuite/thread/pthread5.cc b/libstdc++-v3/testsuite/thread/pthread5.cc
index cc556046d4d6..262796e0ba79 100644
--- a/libstdc++-v3/testsuite/thread/pthread5.cc
+++ b/libstdc++-v3/testsuite/thread/pthread5.cc
@@ -50,7 +50,7 @@ struct tt_t
 void*
 thread_function (void* arg)
 {
-  int myid = *(int*) arg;
+  int myid __attribute__((unused)) = *(int*) arg;
   for (int i = 0; i < LOOPS; i++)
     {
       vector<tt_t> myvect1;
@@ -88,7 +88,7 @@ thread_function (void* arg)
 }
 
 int
-main (int argc, char *argv[])
+main ()
 {
   int worker;
   pthread_t threads[NTHREADS];
diff --git a/libstdc++-v3/testsuite/thread/pthread6.cc b/libstdc++-v3/testsuite/thread/pthread6.cc
index d88f77e77e1d..c72acb539851 100644
--- a/libstdc++-v3/testsuite/thread/pthread6.cc
+++ b/libstdc++-v3/testsuite/thread/pthread6.cc
@@ -37,8 +37,8 @@ const int loops = 100000;
 
 const char* my_default = "Hallo Welt!";
 
-const int upper_limit = 2500;
-const int lower_limit = 1000;
+const std::size_t upper_limit = 2500;
+const std::size_t lower_limit = 1000;
 
 typedef char charT;
 
diff --git a/libstdc++-v3/testsuite/thread/pthread7-rope.cc b/libstdc++-v3/testsuite/thread/pthread7-rope.cc
index 716ba00ccab9..36acd461e873 100644
--- a/libstdc++-v3/testsuite/thread/pthread7-rope.cc
+++ b/libstdc++-v3/testsuite/thread/pthread7-rope.cc
@@ -36,7 +36,7 @@ const int max_loop_count = 10000;
 
 __gnu_cxx::crope foo4;
 
-void* thread_main (void *)
+void* thread_main(void *) 
 {
   // To see a problem with gcc 3.3 and before, set a break point here.
   // Single step through c_str implementation, call sched_yield after
@@ -48,13 +48,16 @@ void* thread_main (void *)
 
   // Please note that the memory leak in the rope implementation with
   // this test case, existed before and after fixing this bug...
-
+  bool test __attribute__((unused)) = true;
   VERIFY( !std::strcmp (data4, "barbazbonglehellohellohello") );
+  return 0;
 }
 
 int
 main()
 {
+  bool test __attribute__((unused)) = true;
+
   pthread_t tid[max_thread_count];
 
 #if defined(__sun) && defined(__svr4__)
-- 
GitLab