diff options
Diffstat (limited to 'libstdc++-v3/testsuite/22_locale/num_get')
13 files changed, 13 insertions, 105 deletions
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/1.cc b/libstdc++-v3/testsuite/22_locale/num_get/1.cc index 4a3ced974cf..a9081bbf570 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 190f9921aef..e42e7b4ce74 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 8d0ce69e254..35200f8762f 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 43e16c2d2c4..8048dd39a75 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 aed5fcb4370..f7c4cb044dc 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 e170931d060..ad43c9d79cf 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 52722d1acb8..ccf51d3dbd6 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 952651d883c..79fc4291c1c 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 6f52860f3bf..ec1b338b1da 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 3a775682a2b..fbe887bee90 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 f23aa0f1555..9b956571d02 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 09f12be587b..618b74ceaa0 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 e2aeb184b23..fac26fe173a 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; |