diff options
author | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-09-23 20:03:30 +0000 |
---|---|---|
committer | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-09-23 20:03:30 +0000 |
commit | f8ef786cfd35341f4c3d1742375e22f829a0876f (patch) | |
tree | 743380001d2341c199e3740ca7296f1783cef17c /libstdc++-v3/testsuite/22_locale/codecvt | |
parent | 33020648811e6f8f2313712ecb0e7ba99e2653b7 (diff) | |
download | gcc-f8ef786cfd35341f4c3d1742375e22f829a0876f.tar.gz |
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
Diffstat (limited to 'libstdc++-v3/testsuite/22_locale/codecvt')
51 files changed, 55 insertions, 70 deletions
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/1.cc b/libstdc++-v3/testsuite/22_locale/codecvt/1.cc index fa285752871..1c46d583c41 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 523322ece87..060b3683a52 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 6b57c89232f..13fc3838c73 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 1a933f8fd3b..da377b57a45 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 9e98f53f88b..6830d301036 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 0929676270f..ecb00753175 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 9ac07c5f044..76428bff180 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 d2fa938e892..1b86fb7a8dd 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 c103b2e41c5..815cfd3ec28 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 9cc921c7bce..d456868b85d 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 68972e7ab32..d996797a8be 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 71f6ac77498..bbc6397ce37 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 d5a410a7741..d8c2e8fe42a 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 51739b6ae3b..c1e025cff4b 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 118462d618b..361f2c7c418 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 c08ee55efea..14b67284b8c 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 ec65f60c692..aa0879d393d 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 1be30323b8b..1eed2880dbc 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 7d14ab4cfb5..8689be233fa 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 296f2eb3171..ee4d82bae63 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 7ba367b1327..ed6e68849a7 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 3ea244dcbb0..085952863c2 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 6e0a7e96f2e..5e5023af850 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 100de8567fc..bc228755a0d 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 6f92b6ce093..a969ef61235 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 8aec29d580b..3512e8ce265 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 0b7b87c2643..ca742c30240 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 284233e7b6b..2921a9d9bfd 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 76c151edf05..a0700c18920 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 7d8ff4a1d80..5f35a0f2b1a 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 789007ae905..2880ec52636 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 5ecc99e0c6a..ad8cc24c60c 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 c99c823fbe2..57d471e7798 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 27f67a4f117..229692b5f73 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 8ab6828ddb5..7533e4c0659 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 f0ef0a5da63..1dddbb207c7 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 82a57c6fdbd..75eb2ff0817 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 ff413d5ac8a..cffff049c28 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 b1fa9fa4f22..c421488d1c4 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 4fd193e3055..fabb941b021 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 13ca4b28719..55ba7eff900 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 9ee2770bafd..a44746ff02d 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 3c069c8bb84..2a469c65c30 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 b1dc652d6d4..705f43afd6f 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 1fa9648f5e8..ad31f9ae2fc 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 5f3d76cfe64..5793b33aa77 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 1a6eadd82fe..25a36ef5ee9 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 65aaea05056..8410a358c4c 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 a6d107cacb6..dce60f81a26 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 7ca700764c3..e327ef86731 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 234a4b63f46..d4dc56051af 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, |