+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,
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>;
// 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
namespace gnu
{
- void test01()
+ int test01()
{
int i = errno;
#ifndef errno
#error "errno_must_be_a_macro"
#endif
+ return i;
}
}
+++ /dev/null
-// 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;
-}
// 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
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
// 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
{
void test01()
{
- std::va_list list;
+ std::va_list __attribute__((unused)) list;
#ifndef va_arg
#error "va_arg_must_be_a_macro"
#endif
// 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
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
// 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
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;
}
// 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
// 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()
// 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
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;
}
// 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
#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;
}
// 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
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;
}
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;
template<typename T>
void test_epsilon()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
T epsilon = std::numeric_limits<T>::epsilon();
T one = 1;
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 );
bool test01()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::numeric_limits< A<B> > obj;
VERIFY( !obj.is_specialized );
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)
// 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 );
// libstdc++/1972
void test01()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::string s("lack of sunlight, no water error");
// 1
void test02()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::string s("lack of sunlight error");
std::domain_error x(s);
void test03()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
try
{ throw fuzzy_logic(); }
catch(const fuzzy_logic& obj)
}
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";
void test01()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::allocator<gnu> obj;
// XXX These should work for various size allocation and
// libstdc++/8230
void test02()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
try
{
std::allocator<int> alloc;
-// 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
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 );
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);
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;
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);
int
test05()
{
- bool test = true;
- reset_count_struct reset;
+ bool test __attribute__((unused)) = true;
+ reset_count_struct __attribute__((unused)) reset;
pimpl<A>();
pimpl<B>();
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());
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.
// 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
class Elem
{
public:
- void print(int i) const { }
- void modify(int i) { }
+ void print(int) const { }
+ void modify(int) { }
};
// libstdc++/3113
// 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);
// 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);
// 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);
// 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 =
// 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
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;
int main(void)
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::pair<junk*,ptrdiff_t> results = std::get_temporary_buffer<junk>(5);
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);
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);
void
test01()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
using namespace std;
void
test02()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
using namespace std;
void
test03()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
using namespace std;
void
test01()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
using namespace std;
void
test02()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
using namespace std;
void
test03()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
using namespace std;
void test01()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
// non POD types : resize, capacity, reserve
std::basic_string< A<B> > str02;
VERIFY( sz04 >= 100 );
str02.reserve();
sz03 = str02.capacity();
- VERIFY( sz03 >= 0 );
+ VERIFY( sz03 > 0 );
sz03 = str02.size() + 5;
str02.resize(sz03);
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;
VERIFY( sz02 >= 100 );
str01.reserve();
sz01 = str01.capacity();
- VERIFY( sz01 >= 0 );
+ VERIFY( sz01 > 0 );
sz01 = str01.size() + 5;
str01.resize(sz01);
// 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();
// 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
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;
VERIFY( sz02 >= 100 );
str01.reserve();
sz01 = str01.capacity();
- VERIFY( sz01 >= 0 );
+ VERIFY( sz01 > 0 );
sz01 = str01.size() + 5;
str01.resize(sz01);
// 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();
// 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
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);
void test02()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
// template<typename _InputIter>
// basic_string(_InputIter begin, _InputIter end, const allocator& a)
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
// http://gcc.gnu.org/ml/libstdc++/2002-06/msg00025.html
void test04()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::string str01("portofino");
// libstdc++/8347
void test05()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::vector<char> empty;
std::string empty2(empty.begin(), empty.end());
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);
void test02()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
// template<typename _InputIter>
// basic_string(_InputIter begin, _InputIter end, const allocator& a)
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
// 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");
// libstdc++/8347
void test05()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::vector<wchar_t> empty;
std::wstring empty2(empty.begin(), empty.end());
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");
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) {
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) {
// 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;
// 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;
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");
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) {
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) {
// 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;
// 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;
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;
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;
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;
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;
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;
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;
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");
// 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";
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");
// 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";
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");
// 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
// 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);
// 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)
{
// 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");
// 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;
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
istringstream istrm("enero:2001");
int year;
char sep;
// libstdc++/2830
void test09()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::string blanks( 3, '\0');
std::string foo = "peace";
foo += blanks;
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");
// 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
// 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);
// 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)
{
// 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");
// 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;
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
wistringstream istrm(L"enero:2001");
int year;
wchar_t sep;
// 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;
int test01(void)
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::string str1;
std::string str2;
// 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;
}
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");
int test01(void)
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::wstring str1;
std::wstring str2;
// 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;
}
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");
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);
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,
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;
void
test04()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::string str01 = "geogaddi";
std::string str02;
void
test05()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::string str01 = "londinium";
std::string str02 = "cydonia";
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);
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,
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;
void
test04()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::wstring str01 = L"geogaddi";
std::wstring str02;
void
test05()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::wstring str01 = L"londinium";
std::wstring str02 = L"cydonia";
// 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;
// 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");
// 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;
// 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;
// 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");
// 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;
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);
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);
void test01()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
char c = 'a';
const char cc = 'b';
char* c1 = &c;
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()
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;
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()
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");
void test02(void)
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
// 21.1.1 character traits requirements
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");
// 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;
}
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;
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
void test01()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
typedef codecvt<wchar_t, char, mbstate_t> w_codecvt;
locale loc;
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");
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");
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");
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
{
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);
{
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);
{
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);
{
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);
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;
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";
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!\"#$%&"
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!\"#$%&"
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!\"#$%&"
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' };
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";
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";
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!\"#$%&"
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!\"#$%&"
// in
w_codecvt::state_type state01;
zero_state(state01);
- result r1;
+ result r1 = codecvt_base::error;
for (int i = 0; i <= esize; ++i)
{
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;
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;
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);
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!\"#$%&"
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!\"#$%&"
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!\"#$%&"
"\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,
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);
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);
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");
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
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();
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");
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");
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");
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;
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;
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!\"#$%&"
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!\"#$%&"
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!\"#$%&"
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;
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;
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;
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);
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);
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);
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)))) =
{
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 );
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;
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];
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!\"#$%&"
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,
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,
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;
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();
// 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
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();
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;
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();
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();
// 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
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();
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;
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();
// Check "C" locale.
void test01()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::string str1("fffff");
std::string str2("ffffffffffff");
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();
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;
{
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");
{
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();
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;
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();
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"
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();
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();
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"
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();
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();
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.
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;
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();
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 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;
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);
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;
// 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;
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 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;
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);
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;
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;
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);
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] );
// 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] );
}
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);
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] );
// 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] );
}
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);
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] );
// 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] );
}
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);
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] );
// 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] );
}
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);
// 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";
// 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";
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;
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);
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;
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);
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);
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] );
// 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] );
}
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);
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] );
// 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] );
}
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);
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);
void test01()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
const std::string name_no("*");
const std::string name_c("C");
void test02()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
// 1: Destroyed when out of scope.
VERIFY( counter == 0 );
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
// construct a locale object with the C facet
const locale& cloc = locale::classic();
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(...)
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
// 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))
// More tests for locale("") == POSIX locale::name.
void test04()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
using namespace std;
#ifdef _GLIBCXX_HAVE_SETENV
test01()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
const string name_c("C");
const string str_unnamed("*");
string str;
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 );
test02()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
const string name_c("C");
const string name_no("*");
string str;
// libstdc++/7222
void test02()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::locale loc_c1("C");
std::locale loc_c2("C");
// 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("");
test01()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
const locale l1("C");
const locale l2 =
void test01()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
string str1, str2;
void test02()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
const string ph("en_PH");
const string mx("es_MX");
void test03()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
string name;
locale global_orig;
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
string str1, str2;
// construct a locale object with the C facet
void test02()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
// Sanity check.
locale loc_c = locale::classic();
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;
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;
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;
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;
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;
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;
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;
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;
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;
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();
// 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;
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");
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();
// 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;
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();
// 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;
-
iterator_type end;
istringstream iss;
iss.imbue(loc_de);
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();
// 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;
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";
using namespace std;
typedef istreambuf_iterator<char> InIt;
- bool test = true;
+ bool test __attribute__((unused)) = true;
locale loc(locale::classic(), new My_money_io);
void test07()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
typedef istreambuf_iterator<char> InIt;
InIt iend1, iend2, iend3;
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);
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();
// 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;
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");
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();
// 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;
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();
// 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;
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();
// 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;
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";
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);
void test07()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
typedef istreambuf_iterator<wchar_t> InIt;
InIt iend1, iend2, iend3;
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);
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;
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();
// 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;
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();
// 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;
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();
// 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;
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)
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);
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);
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();
// 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;
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();
// 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;
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();
// 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;
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)
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);
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);
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;
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;
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();
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();
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();
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();
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();
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();
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");
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;
using namespace std;
typedef istreambuf_iterator<char> iterator_type;
- bool test = true;
+ bool test __attribute__((unused)) = true;
// basic construction
locale loc_c = locale::classic();
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 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;
#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");
using namespace std;
typedef istreambuf_iterator<char> iterator_type;
- bool test = true;
+ bool test __attribute__((unused)) = true;
// basic construction
locale loc_c = locale::classic();
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;
using namespace std;
typedef istreambuf_iterator<char> iterator_type;
- bool test = true;
+ bool test __attribute__((unused)) = true;
// basic construction
locale loc_c = locale::classic();
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
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");
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
unsigned long ul;
void test06()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
double d = 0.0;
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();
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 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;
#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");
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();
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;
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();
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
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");
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
unsigned long ul;
void test06()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
double d = 0.0;
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;
using namespace std;
typedef ostreambuf_iterator<char> iterator_type;
- bool test = true;
+ bool test __attribute__((unused)) = true;
// basic construction
locale loc_c = locale::classic();
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;
#ifdef _GLIBCXX_USE_LONG_LONG
long long ll1 = 9223372036854775807LL;
- long long ll2 = -9223372036854775807LL;
oss.str(empty);
oss.clear();
using namespace std;
typedef ostreambuf_iterator<char> iterator_type;
- bool test = true;
+ bool test __attribute__((unused)) = true;
// basic construction
locale loc_c = locale::classic();
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;
using namespace std;
typedef ostreambuf_iterator<char> iterator_type;
- bool test = true;
+ bool test __attribute__((unused)) = true;
// basic construction
locale loc_c = locale::classic();
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;
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");
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");
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());
void test01()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
typedef num_put<char> np_t;
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();
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;
#ifdef _GLIBCXX_USE_LONG_LONG
long long ll1 = 9223372036854775807LL;
- long long ll2 = -9223372036854775807LL;
oss.str(empty);
oss.clear();
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();
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;
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();
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;
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");
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");
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());
void test01()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
typedef num_put<wchar_t> npw_t;
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()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
// basic construction
locale loc_c = locale::classic();
// 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();
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
// basic construction
locale loc_c = locale::classic();
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();
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
const string basestr("true");
const string derivedstr("truest");
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
const string empty;
const string basestr("true");
const string derivedstr("truest");
{
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>;
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>);
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<>
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<>
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<>
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)
{
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>;
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
// basic construction
locale loc_c = locale::classic();
// 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();
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
// basic construction
locale loc_c = locale::classic();
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();
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
const wstring basestr(L"true");
const wstring derivedstr(L"truest");
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
const wstring empty;
const wstring basestr(L"true");
const wstring derivedstr(L"truest");
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
string str;
locale loc_de = __gnu_test::try_named_locale("de_DE");
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
locale loc_it = __gnu_test::try_named_locale("it_IT");
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;
// 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
void test01()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
typedef time_base::dateorder dateorder;
typedef istreambuf_iterator<char> iterator_type;
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;
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;
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
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();
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
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
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();
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
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
iss.imbue(loc_c);
iss.str("04/04/71");
iterator_type is_it01(iss);
- tm time01;
errorstate = good;
// inspection of named locales, de_DE
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;
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();
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
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
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();
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
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
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
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;
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();
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&,
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();
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;
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;
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();
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&,
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();
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;
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;
void test01()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
typedef time_base::dateorder dateorder;
typedef istreambuf_iterator<char> iterator_type;
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
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
void test02()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
typedef time_base::dateorder dateorder;
typedef istreambuf_iterator<char> iterator_type;
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;
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;
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;
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
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
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;
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;
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;
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();
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
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&,
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();
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
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);
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;
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();
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
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&,
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();
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
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);
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;
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();
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
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
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;
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();
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
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
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;
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;
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();
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;
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.)
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));
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();
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;
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();
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;
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();
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;
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";
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;
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";
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;
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";
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;
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";
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;
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.)
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();
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;
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.)
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));
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();
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;
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();
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;
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();
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;
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";
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;
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";
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;
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";
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;
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";
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;
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.)
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)
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 );
template <size_t size>
bool
do_test() {
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::bitset<size> shifted;
std::bitset<size> correct;
bool
test01() {
- bool test = true;
+ bool test __attribute__((unused)) = true;
VERIFY( do_test<32>() );
VERIFY( do_test<48>() );
bool
test02()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::bitset<66> b;
b <<= 400;
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) {
void test03()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::bitset<5> b;
std::stringstream ss("101");
ss.exceptions(std::ios_base::eofbit);
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
typedef std::deque<counter> gdeque;
-bool test = true;
+bool test __attribute__((unused)) = true;
// 23.2.1 required types
//
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();
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;
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();
try
{
X a(7);
- VERIFY(("no exception thrown", false));
+ VERIFY( false );
}
catch (...)
{
try
{
X u(a);
- VERIFY(("no exception thrown", false));
+ VERIFY(false);
}
catch (...)
{
// libstdc++/6503
void test01()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::deque<int> d(2);
typedef std::deque<int>::iterator iter;
// libstdc++/7186
void test02()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::deque<int> d(2);
typedef std::deque<int>::iterator iter;
#include <list>
#include <testsuite_hooks.h>
-bool test = true;
+bool test __attribute__((unused)) = true;
// This test verifies the following.
//
}
int
-main(int argc, char* argv[])
+main()
{
test01();
return 0;
#include <list>
#include <testsuite_hooks.h>
-bool test = true;
+bool test __attribute__((unused)) = true;
// A nontrivial type.
template<typename T>
#include <list>
#include <testsuite_hooks.h>
-bool test = true;
+bool test __attribute__((unused)) = true;
// A nontrivial type.
template<typename T>
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
#include <list>
#include <testsuite_hooks.h>
-bool test = true;
+bool test __attribute__((unused)) = true;
// A nontrivial type.
template<typename T>
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)
#include <list>
#include <testsuite_hooks.h>
-bool test = true;
+bool test __attribute__((unused)) = true;
// Range constructor
//
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
#include <list>
#include <testsuite_hooks.h>
-bool test = true;
+bool test __attribute__((unused)) = true;
// Copy constructor
//
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);
#include <list>
#include <testsuite_hooks.h>
-bool test = true;
+bool test __attribute__((unused)) = true;
// Range assign
//
{
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;
#include <list>
#include <testsuite_hooks.h>
-bool test = true;
+bool test __attribute__((unused)) = true;
// Fill assign
//
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;
#include <list>
#include <testsuite_hooks.h>
-bool test = true;
+bool test __attribute__((unused)) = true;
// A nontrivial type.
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);
#include <list>
#include <testsuite_hooks.h>
-bool test = true;
+bool test __attribute__((unused)) = true;
// Assignment operator
//
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);
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
typedef __gnu_test::copy_tracker T;
-bool test = true;
+bool test __attribute__((unused)) = true;
// general single insert/erase + swap
void
typedef __gnu_test::copy_tracker T;
-bool test = true;
+bool test __attribute__((unused)) = true;
// This test verifies the following.
try
{
list0101.push_back(T(4, true));
- VERIFY(("no exception thrown", false));
+ VERIFY(false);
}
catch (...)
{
#include <list>
#include <testsuite_hooks.h>
-bool test = true;
+bool test __attribute__((unused)) = true;
// splice(p, x) + remove + reverse
void
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);
VERIFY(p == list0101.end());
}
-main(int argc, char* argv[])
+int main(void)
{
test01();
return 0;
#include <list>
#include <testsuite_hooks.h>
-bool test = true;
+bool test __attribute__((unused)) = true;
// splice(p, x, i) + remove_if + operator==
void
VERIFY(list0201 == list0204);
}
-main(int argc, char* argv[])
+int main()
{
test02();
return 0;
#include <list>
#include <testsuite_hooks.h>
-bool test = true;
+bool test __attribute__((unused)) = true;
// splice(p, x, f, l) + sort + merge + unique
void
VERIFY(list0301 == list0304);
}
-main(int argc, char* argv[])
+int main(void)
{
test03();
return 0;
#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.
VERIFY(eq.count() == (N + M - 1));
}
-main(int argc, char* argv[])
+int main()
{
test04();
return 0;
// 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;
// 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;
// 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;
// libstdc++/6886
void test02()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
typedef std::vector<bool> bvec;
int i, num = 0;
bvec v;
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;
void
test_reserve()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
typedef copy_tracker T;
typedef std::vector<T, tracker_alloc<T> > X;
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();
try
{
a.reserve(new_capacity);
- VERIFY(("no exception thrown", false));
+ VERIFY(false);
}
catch (...)
{
// libstdc++/8230
void test02()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
{
std::vector<int> array;
const std::size_t size = array.max_size();
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);
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;
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
}
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;
try
{
X u(a);
- VERIFY(("no exception thrown", false));
+ VERIFY(false);
}
catch (...)
{
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;
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;
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;
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;
try
{
r = a;
- VERIFY(("no exception thrown", false));
+ VERIFY(false);
}
catch (...)
{
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;
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;
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;
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;
try
{
a.assign(new_size, t);
- VERIFY(("no exception thrown", false));
+ VERIFY(false);
}
catch (...)
{
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;
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();
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();
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;
{
X a(7);
X b(a.capacity() + 7);
- X::size_type old_size = a.size();
copy_tracker::reset();
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;
{
X a(7);
X b(a.capacity() + 7);
- X::size_type old_size = a.size();
copy_tracker::reset();
copy_constructor::throw_on(3);
try
{
a.assign(b.begin(), b.end());
- VERIFY(("no exception thrown", false));
+ VERIFY(false);
}
catch (...)
{
// 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;
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)
#include <vector>
#include "testsuite_hooks.h"
-bool test = true;
+bool test __attribute__((unused)) = true;
template<typename T>
struct A { };
#include <vector>
#include "testsuite_hooks.h"
-bool test = true;
+bool test __attribute__((unused)) = true;
// test the assign() function
void
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;
void test01()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::vector<int> v;
try
{
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;
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;
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;
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;
void test02()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
string st("R.Rorty");
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;
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);
// 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] );
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] );
// 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;
}
int
-main(int argc, char **argv)
+main()
{
int failures(0);
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;
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;
{
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);
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;
// 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) );
#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};
}
int
-main(int argc, char* argv[])
+main()
{
- test01();
- test02();
- test03();
- test04();
-
- return !test;
+ test01();
+ test02();
+ test03();
+ test04();
+
+ return 0;
}
#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);
}
int
-main(int argc, char* argv[])
+main()
{
- test01();
- test02();
+ test01();
+ test02();
- return !test;
+ return 0;
}
//#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};
}
int
-main(int argc, char* argv[])
+main()
{
- test01();
- test02();
+ test01();
+ test02();
- return !test;
+ return 0;
}
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);
}
void test01()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
const int& x = std::max(1, 2);
const int& y = std::max(4, 3);
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) );
#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};
}
int
-main(int argc, char* argv[])
+main()
{
- test01();
- test02();
+ test01();
+ test02();
- return !test;
+ return 0;
}
#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};
}
int
-main(int argc, char* argv[])
+main()
{
- test02();
- test03();
- return !test;
+ test02();
+ test03();
+ return 0;
}
#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};
}
int
-main(int argc, char* argv[])
+main()
{
- test01();
- test02();
- test03();
- test04();
- test05();
-
- return !test;
+ test01();
+ test02();
+ test03();
+ test04();
+ test05();
+
+ return 0;
}
template <typename _Tp>
void test_c99_classify()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
typedef _Tp fp_type;
fp_type f1 = 1.0;
int
test03()
{
- double powtest = std::pow(2., 0);
+ double powtest __attribute__((unused)) = std::pow(2., 0);
return 0;
}
int
test04()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
float x[2] = {1, 2};
float y = 3.4;
std::modf(y, &x[0]);
test02 ()
{
float a = 0.0f;
- float b = std::acos(b);
+ float b __attribute__((unused)) = std::acos(a);
return 0;
}
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);
int
test_fail(std::string str)
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::complex<R> z;
std::istringstream iss(str);
iss >> z;
void test01()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
complex<float> cf01(-1.1, -333.2);
stringstream ss;
void test02()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
// Construct locale with specialized facets.
typedef gnu_sstream::__num_put_type numput_type;
VERIFY( std::has_facet<numget_type>(loc_2) );
gnu_sstream sstr;
- std::basic_ios<char, gnu_char_traits>* pios = &sstr;
sstr.imbue(loc_2);
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;
#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;
}
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;
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()));
int main()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
using std::valarray;
using std::slice;
valarray<int> v(1, 10), w(2, 10);
}
int
-main(int argc, char* argv[])
+main()
{
test01();
return 0;
// 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;
}
void test01() // check unary operators
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::valarray<int> u(1);
u[0]=1;
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;
void test07()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
typedef std::basic_filebuf<gnu_char_type, gnu_char_traits> gnu_filebuf;
try
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()
// 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
void test_02()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
int close_num;
// read (ext)
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);
VERIFY( !fb_03.is_open() );
}
-main()
+int main()
{
test03();
test05();
{
typedef std::filebuf::traits_type traits_type;
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::filebuf fb_01, fb_02;
char buffer[] = "xxxxxxxxxx";
void
test_04()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
const char* name = "tmp_fifo1";
signal(SIGPIPE, SIG_IGN);
void test_05()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
Close_filebuf fb_01, fb_02;
char buffer[] = "xxxxxxxxxx";
void test_07()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
const char* name = "tmp_fifo3";
int main()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
locale loc = locale(locale::classic(), new Cvt);
wfilebuf* fb = new wfilebuf;
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;
VERIFY( ob.getloc() == loc );
}
-main()
+int main()
{
test02();
return 0;
void test03()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
locale loc_s(locale::classic(), new state_codecvt);
filebuf ob;
VERIFY( ob.getloc() == loc_s );
}
-main()
+int main()
{
test03();
return 0;
void test07()
{
using std::locale;
- bool test = true;
+ bool test __attribute__((unused)) = true;
locale loc;
std::filebuf ob;
VERIFY( ob.getloc() == loc_de );
}
-main()
+int main()
{
test07();
return 0;
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;
VERIFY( ob.getloc() == loc );
}
-main()
+int main()
{
test02();
return 0;
void test03()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
locale loc_s(locale::classic(), new state_codecvt);
wfilebuf ob;
VERIFY( ob.getloc() == loc_s );
}
-main()
+int main()
{
test03();
return 0;
void test07()
{
using std::locale;
- bool test = true;
+ bool test __attribute__((unused)) = true;
locale loc;
std::wfilebuf ob;
VERIFY( ob.getloc() == loc_de );
}
-main()
+int main()
{
test07();
return 0;
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()
VERIFY( strmof_1 == 0 ); // empty file
}
-main()
+int main()
{
test03();
test05();
// 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
// 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
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");
// 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;
// libstdc++/9507
void test_06()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
const char* name = "tmp_fifo2";
signal(SIGPIPE, SIG_IGN);
void test03()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
const std::string control01("11111");
std::string test01;
void test01()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
typedef OverBuf::traits_type traits_type;
OverBuf fb;
fb.close();
}
-main()
+int main()
{
test01();
return 0;
void test01()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
typedef OverBuf::traits_type traits_type;
OverBuf fb;
fb.close();
}
-main()
+int main()
{
test01();
return 0;
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);
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);
VERIFY( tmp == str );
}
-main()
+int main()
{
test10();
return 0;
void test14()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
locale loc = locale::classic();
loc = locale(loc, new errorcvt);
fbuf1.close();
}
-main()
+int main()
{
test14();
return 0;
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);
fbin.close();
}
-main()
+int main()
{
test15();
return 0;
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"));
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"));
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"));
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"));
void test01()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
filebuf fbuf;
filebuf::int_type r1, r2;
VERIFY( r2 == filebuf::traits_type::eof() );
}
-main()
+int main()
{
test01();
return 0;
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
}
}
-main()
+int main()
{
test05();
return 0;
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
}
}
-main()
+int main()
{
test05();
return 0;
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
}
}
-main()
+int main()
{
test05();
return 0;
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
}
}
-main()
+int main()
{
test05();
return 0;
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
}
}
-main()
+int main()
{
test05();
return 0;
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
}
}
-main()
+int main()
{
test05();
return 0;
void test12()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
filebuf fbuf;
fbuf.close();
}
-main()
+int main()
{
test12();
return 0;
void test07()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
typedef std::basic_filebuf<gnu_char_type, gnu_char_traits> gnu_filebuf;
try
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;
}
}
-main()
+int main()
{
test05();
return 0;
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;
}
}
-main()
+int main()
{
test05();
return 0;
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;
}
}
-main()
+int main()
{
test05();
return 0;
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;
}
}
-main()
+int main()
{
test05();
return 0;
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;
}
}
-main()
+int main()
{
test05();
return 0;
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;
}
}
-main()
+int main()
{
test05();
return 0;
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;
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;
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;
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();
}
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);
{
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");
void test01()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
// seekoff
wfilebuf fb;
void test07()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
typedef std::basic_filebuf<gnu_char_type, gnu_char_traits> gnu_filebuf;
try
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;
}
}
-main()
+int main()
{
test05();
return 0;
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;
}
}
-main()
+int main()
{
test05();
return 0;
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;
}
}
-main()
+int main()
{
test05();
return 0;
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;
}
}
-main()
+int main()
{
test05();
return 0;
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;
}
}
-main()
+int main()
{
test05();
return 0;
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;
}
}
-main()
+int main()
{
test05();
return 0;
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;
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;
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;
void test01()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
// seekpos
wfilebuf fb;
bool
check_pointers()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
test = (this->pbase() == NULL);
test &= (this->pptr() == NULL);
return test;
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;
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)
}
}
-main()
+int main()
{
test05();
return 0;
{
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);
VERIFY( std::strncmp(strlit, buf, strlitsize) == 0 );
}
-main()
+int main()
{
test01();
return 0;
{
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);
VERIFY( std::strncmp(strlit, buf, strlitsize) == 0 );
}
-main()
+int main()
{
test02();
return 0;
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()
}
}
-main()
+int main()
{
test05();
return 0;
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()
}
}
-main()
+int main()
{
test05();
return 0;
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
}
}
-main()
+int main()
{
test05();
return 0;
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()
}
}
-main()
+int main()
{
test05();
return 0;
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()
}
}
-main()
+int main()
{
test05();
return 0;
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
}
}
-main()
+int main()
{
test05();
return 0;
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)
}
}
-main()
+int main()
{
test05();
return 0;
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)
}
}
-main()
+int main()
{
test05();
return 0;
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)
}
}
-main()
+int main()
{
test05();
return 0;
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)
}
}
-main()
+int main()
{
test05();
return 0;
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)
}
}
-main()
+int main()
{
test05();
return 0;
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)
}
}
-main()
+int main()
{
test05();
return 0;
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
char buffer[] = "xxxxxxxxxx";
typedef filebuf::int_type int_type;
filebuf fbuf01;
VERIFY( buffer[0] == '/' );
}
-main()
+int main()
{
test06();
return 0;
void test_01()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
const char* name = "tmp_fifo1";
const int count = 10000;
void test_02()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
const char* name = "tmp_file1";
const char* strlit = "0123456789";
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
}
}
-main()
+int main()
{
test05();
return 0;
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
}
}
-main()
+int main()
{
test05();
return 0;
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
}
}
-main()
+int main()
{
test05();
return 0;
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
}
}
-main()
+int main()
{
test05();
return 0;
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
}
}
-main()
+int main()
{
test05();
return 0;
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
}
}
-main()
+int main()
{
test05();
return 0;
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)
}
}
-main()
+int main()
{
test01();
return 0;
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;
}
}
-main()
+int main()
{
test01();
return 0;
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
}
}
-main()
+int main()
{
test01();
return 0;
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)
}
}
-main()
+int main()
{
test01();
return 0;
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;
}
}
-main()
+int main()
{
test01();
return 0;
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
}
}
-main()
+int main()
{
test01();
return 0;
void test09()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
filebuf fbuf;
fbuf.open(name_01, ios_base::in);
VERIFY( r == filebuf::traits_type::eof() );
}
-main()
+int main()
{
test09();
return 0;
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))
}
}
-main()
+int main()
{
test05();
return 0;
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))
}
}
-main()
+int main()
{
test05();
return 0;
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))
}
}
-main()
+int main()
{
test05();
return 0;
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))
}
}
-main()
+int main()
{
test05();
return 0;
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))
}
}
-main()
+int main()
{
test05();
return 0;
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))
}
}
-main()
+int main()
{
test05();
return 0;
// libstdc++/9701 (partial)
void test11()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
bool over_expected;
dfbuf_01.close();
}
-main()
+int main()
{
test11();
return 0;
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
}
}
-main()
+int main()
{
test05();
return 0;
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)
}
}
-main()
+int main()
{
test05();
return 0;
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
}
}
-main()
+int main()
{
test05();
return 0;
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
}
}
-main()
+int main()
{
test05();
return 0;
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)
}
}
-main()
+int main()
{
test05();
return 0;
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
}
}
-main()
+int main()
{
test05();
return 0;
void test01()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
filebuf fbuf01;
int len = 35;
// libstdc++/9701 (partial)
void test11()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
bool over_expected;
dfbuf_02.close();
}
-main()
+int main()
{
test11();
return 0;
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()
}
}
-main()
+int main()
{
test01();
return 0;
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;
}
}
-main()
+int main()
{
test01();
return 0;
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
}
}
-main()
+int main()
{
test01();
return 0;
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()
}
}
-main()
+int main()
{
test01();
return 0;
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;
}
}
-main()
+int main()
{
test01();
return 0;
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
}
}
-main()
+int main()
{
test01();
return 0;
// libstdc++/1057
void test04()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::string text = "abcdefghijklmn";
// 01
void test13()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
locale loc = locale::classic();
loc = locale(loc, new errorcvt);
fbuf1.close();
}
-main()
+int main()
{
test13();
return 0;
void test01()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
const char* name = "filebuf_virtuals-1.txt";
string str;
void test16()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
const char* name = "tmp_fifo1";
fb.close();
}
-main()
+int main()
{
test16();
return 0;
void test01()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
using namespace std;
filebuf fb_out, fb_in_out;
{
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);
void test01()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
const char name[] = "tmp_underflow-1.tst";
const char cstr[] =
streamsize n = fb.sgetn(wbuf, wlen + 1);
fb.close();
- VERIFY( n == wlen );
+ VERIFY( n == static_cast<streamsize>(wlen) );
VERIFY( !wmemcmp(wbuf, wstr, wlen) );
}
void test01()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
filebuf fbout;
fbout.open(name_01, ios_base::out);
void test02()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
filebuf fbout;
fbout.open(name_02, ios_base::out);
void test03()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
filebuf fbout;
fbout.open(name_03, ios_base::out);
void test04()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
filebuf fbout;
fbout.open(name_04, ios_base::out);
void test02()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
const char name[] = "tmp_underflow-2.tst";
const char cstr[] =
streamsize n = fb.sgetn(wbuf, wlen + 1);
fb.close();
- VERIFY( n == wlen );
+ VERIFY( n == static_cast<streamsize>(wlen) );
VERIFY( !wmemcmp(wbuf, wstr, wlen) );
}
void test03()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
const char name[] = "tmp_underflow-3.tst";
const char cstr[] =
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) );
}
void test01()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
using namespace std;
locale loc (__gnu_test::try_named_locale("se_NO.UTF-8"));
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();
void test05()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
const char* name = "tmp_underflow-5";
wfilebuf fb;
void test01()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
locale loc;
loc = locale(loc, new checksumcvt<wchar_t>);
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
const char* name = "tmp_9520";
FILE* file = fopen(name, "w");
void test07()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
typedef std::basic_fstream<gnu_char_type, gnu_char_traits> gnu_fstr;
try
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()
// 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;
void test07()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
typedef std::basic_ifstream<gnu_char_type, gnu_char_traits> gnu_ifstr;
try
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()
// 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;)
// 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();
// 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;
void test07()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
try
{ gnu_ios obj; }
std::stringbuf buf;
const test_type& obj = test_type(&buf);
- const base_type* base = &obj;
+ const base_type* base __attribute__((unused)) = &obj;
}
int main()
// 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;
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() );
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;
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)
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.
void test02()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
// 02: Calls basic_ios::init, which may call ctype<char_type>...
try
// 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);
// copyfmt and locales.
void test03()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
using namespace std;
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 );
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);
void test07()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
typedef std::basic_iostream<gnu_char_type, gnu_char_traits> gnu_iostr;
try
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()
void test07()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
typedef std::basic_istream<gnu_char_type, gnu_char_traits> gnu_istr;
try
std::stringbuf buf;
const test_type& obj = test_type(&buf);
- const base_type* base = &obj;
+ const base_type* base __attribute__((unused)) = &obj;
}
int main()
void test01()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
buf b;
std::istream strm (&b);
// 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;
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;
}
// 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);
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.
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);
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");
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");
bool test09()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::string st("2.456e3-+0.567e-2");
std::stringbuf sb(st);
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;
// libstdc++/90
bool test11()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
const char* cstrlit = "0x2a";
// sanity check via 'C' library call
template<typename T>
bool test12_aux(bool integer_type)
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
int digits_overflow;
if (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);
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));
void test13()
{
using namespace std;
- bool test = true;
- const char* l1 = "12345678901234567890123456789012345678901234567890123456";
+ bool test __attribute__((unused)) = true;
const char* l2 = "1.2345678901234567890123456789012345678901234567890123456"
" "
"1246.9";
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);
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");
// 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);
{
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");
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");
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);
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);
}
catch(...)
{
- VERIFY( false );
+ VERIFY( test = false );
}
}
// 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;
}
{
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;
// 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
void test03()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
// template<_CharT, _Traits>
// basic_istream& operator>>(ios_base& (*pf) (ios_base&))
int i = 0;
std::istringstream iss(" 43");
iss >> std::noskipws >> i;
- std::ios::iostate i3 = iss.rdstate();
VERIFY ( !iss ); //should set failbit
}
void test09()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::istringstream stream("Bad Moon Rising");
Outbuf buf;
void test11()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
Inbuf_2 inbuf1;
std::istream is(&inbuf1);
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);
{
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"
" "
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()
void
test07()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
const char* tfn = "istream_unformatted-1.txt";
std::ifstream infile;
infile.open(tfn);
{
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"
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)
"aaaaaaaaaaaaa\n"
"aaaaaaaaaaaaaa\n";
- bool test = true;
+ bool test __attribute__((unused)) = true;
const std::streamsize it = 5;
std::streamsize br = 0;
char tmp[it];
//
// -> 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;
}
}
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
const streamsize it = 5;
char tmp[it];
const char* str_lit = "abcd\n";
{
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;
test08()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
stringstream ss("abcd" "\xFF" "1234ina donna coolbrith");
char c;
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);
{
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;
// 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);
{
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;
statefail = std::ios_base::failbit;
stateeof = std::ios_base::eofbit;
- char carray[60] = "";
-
// istream& putback(char c)
is_04.ignore(30);
is_04.clear();
// 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
}
{
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;
void
test04()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
const std::string str_00("Red_Garland_Qunitet-Soul_Junction");
std::string strtmp;
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());
test09()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
istringstream iss("Juana Briones");
char tab[13];
void test12()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
streamsize sum = 0;
istringstream iss("shamma shamma");
void test13()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
streamsize sum = 0;
ifstream ifs("istream_unformatted-1.tst");
void test11()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
using namespace std;
char arr[10];
mybuf sbuf;
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();
{
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)
void check_contents(std::iostream& stream)
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
stream.clear();
stream.seekg(0, std::ios::beg);
{
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)
void check_contents(std::iostream& stream)
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
stream.clear();
stream.seekg(0, std::ios::beg);
void test06(void)
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
string num1("555");
// seekg
void test06(void)
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
string num1("555");
// seekg
{
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";
{
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";
void test01()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
const char* lit01 = "stereolab on the bolsinga tip";
const std::string str01(lit01);
{
using namespace std;
istringstream in("80.21 56.89 12.3");
- bool test = true;
+ bool test __attribute__((unused)) = true;
int i = 0;
double x;
void
test03()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::stringbuf strbuf01;
std::istream strm1(&strbuf01);
void test03()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
// input streams
basic_ifstream<unsigned char> ifs_uc;
void test03()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
// input streams
basic_istringstream<unsigned char> iss_uc;
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
void test01()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
istringstream ist("three sides live");
ist.ignore(4);
void test06(void)
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
string num1("555");
// tellg
{
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";
{
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";
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)
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
void test07()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
typedef std::basic_istringstream<gnu_char_type, gnu_char_traits> gnu_isstr;
try
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()
// 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;
void test01()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::istringstream is01;
const std::string str00;
const std::string str01 = "123";
void test07()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
typedef std::basic_ofstream<gnu_char_type, gnu_char_traits> gnu_ofstr;
try
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()
// 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;)
// 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();
// 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;
void test07()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
typedef std::basic_ostream<gnu_char_type, gnu_char_traits> gnu_ostr;
try
std::stringbuf buf;
const test_type& obj = test_type(&buf);
- const base_type* base = &obj;
+ const base_type* base __attribute__((unused)) = &obj;
}
int main()
void test01()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
Buf buf;
ostream stream(&buf);
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>
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>
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;
void test01()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
buf b;
std::ostream strm (&b);
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>
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
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)
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";
{
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" );
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;
void
test05()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
double pi = 3.14159265358979323846;
ostringstream ostr;
ostr.precision(20);
int
test06()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
int prec = numeric_limits<double>::digits10 + 2;
double oval = numeric_limits<double>::min();
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);
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
void
test01()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::ostringstream oss_01;
void
test02()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::ostringstream oss_01;
void
test03()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::ostringstream oss_01;
void
test02(void)
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::string tmp;
std::string str01 = "";
// right
void test03(void)
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::string tmp;
std::string str01 = "";
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");
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>
void
test05()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::string str05, str10;
typedef std::ostream::pos_type pos_type;
// 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
void test08()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
char* pt = NULL;
// 1
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);
void
test01()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::wostringstream oss_01;
void
test02()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::wostringstream oss_01;
void
test03()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::wostringstream oss_01;
void test07()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
const char* buffer = "SFPL 5th floor, outside carrol, the Asian side";
void test08()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
char* pt = NULL;
// 2
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
void test04()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
istringstream istr("inside betty carter");
ostringstream ostr;
ostr << istr.rdbuf() << endl;
void test(const std::string& str, std::streambuf& buf)
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::ostringstream out;
std::istream in(&buf);
void test10()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::stringbuf sbuf("Bad Moon Rising", std::ios::in);
Outbuf buf;
void test12()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
Outbuf_2 outbuf2;
std::ostream os (&outbuf2);
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);
void
test01()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::stringbuf strbuf01;
std::ostream strm1(&strbuf01);
void
test02()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
buf b(0);
std::ostream strm(&b);
void test03()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
// output streams
basic_ofstream<unsigned char> ofs_uc;
void test03()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
// output streams
basic_ostringstream<unsigned char> oss_uc;
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
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;
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
void test07()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
typedef std::basic_ostringstream<gnu_char_type, gnu_char_traits> gnu_osstr;
try
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()
void
test03()
{
- bool test = false;
+ bool test __attribute__((unused)) = false;
// Empty string sanity check.
std::string str01;
// 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;
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;
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") );
void test07()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
try
{ gnu_sbuf obj; }
bool
check_pointers()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
VERIFY( this->eback() == NULL );
VERIFY( this->gptr() == NULL );
VERIFY( this->egptr() == NULL );
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
void test08()
{
using std::locale;
- bool test = true;
+ bool test __attribute__((unused)) = true;
locale loc;
testbuf ob;
void test01()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
const char* name = "tmp_file1";
Derived_fbuf df2;
bool
check_pointers()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
VERIFY( this->eback() == NULL );
VERIFY( this->gptr() == NULL );
VERIFY( this->egptr() == NULL );
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
void test03()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
const std::string control01("11111");
std::string test01;
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);
bool
check_pointers()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
VERIFY( this->eback() == NULL );
VERIFY( this->gptr() == NULL );
VERIFY( this->egptr() == NULL );
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
bool
check_pointers()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
VERIFY( this->eback() == NULL );
VERIFY( this->gptr() == NULL );
VERIFY( this->egptr() == NULL );
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
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);
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);
// libstdc++/9538
void test08()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
MyBuf mb;
mb.sputbackc('a');
}
-main()
+int main()
{
test08();
return 0;
bool
check_pointers()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
VERIFY( this->eback() == NULL );
VERIFY( this->gptr() == NULL );
VERIFY( this->egptr() == NULL );
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);
// libstdc++/1057
void test04()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::string text = "abcdefghijklmn";
// 01
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
void test07()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
typedef std::basic_stringbuf<gnu_char_type, gnu_char_traits> gnu_ssbuf;
try
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()
void test03()
{
using std::locale;
- bool test = true;
+ bool test __attribute__((unused)) = true;
locale loc = std::locale::classic();
std::stringbuf ob;
// 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;
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 );
void test03()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
const std::string control01("11111");
std::string test01;
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);
void test15()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
OverBuf sb;
VERIFY( c == stringbuf::traits_type::eof() );
}
-main()
+int main()
{
test15();
return 0;
// 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;
void test12()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
stringbuf sbuf;
sbuf.sputn("crazy bees!", 11);
VERIFY( c == 'a' );
}
-main()
+int main()
{
test12();
return 0;
// 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;
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
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
}
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;
// 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;
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));
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;
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;
// 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
{
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);
VERIFY( std::strncmp(strlit, buf, strlitsize) == 0 );
}
-main()
+int main()
{
test01();
return 0;
{
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);
VERIFY( std::strncmp(strlit, buf, strlitsize) == 0 );
}
-main()
+int main()
{
test02();
return 0;
// 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;
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();
// 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;
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();
// 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
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] = "";
// 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;
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()
// 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;
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
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;
// 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;
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)
// libstdc++/9404
void test04()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
bool over_expected;
// 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();
// libstdc++/9404
void test04()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
bool over_expected;
Derived_stringbuf dsbuf_01;
// test member functions
void test03()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
//stringbuf::str()
VERIFY( strb_01.str() == str_01 );
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
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()
// which didn't notice the grow.
void test07()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::stringbuf strb_01;
strb_01.sputc('s');
void test06()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::ostringstream os ("foo", std::ios_base::app);
os << "bar";
// 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";
// 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;
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
// libstdc++/1057
void test04()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::string text = "abcdefghijklmn";
// 01
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
void test07()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
typedef std::basic_stringstream<gnu_char_type, gnu_char_traits> gnu_sstr;
try
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()
// 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;
void test01()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::stringstream is01;
const std::string str00;
const std::string str01 = "123";
// 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;
void
test03()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
//
// 1: Automatic formatting of a compound string
// libstdc++/8466
void test04()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
const char* strlit00 = "orvieto";
const std::string str00 = strlit00;
void test01()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
typedef std::mbstate_t state_type;
state_type state01 = state_type();
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();
// 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
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;
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);
void
test02()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
const std::string strue("true");
const std::string sfalse("false");
std::string str01;
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();
// 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");
// 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);
void test02()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::stringbuf strbuf01;
std::ios ios01(&strbuf01);
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;
void test02()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
const std::string str_blank;
std::string str_tmp;
std::stringbuf strbuf;
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"
test01()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
string s("john coltrane, a love supreme");
istringstream iss(s);
test01()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
string x (" this is text");
istringstream sin (x);
ostringstream sout;
// 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;
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
const char* name = "filebuf_virtuals-1.txt";
FILE* ret = freopen(name, "r", stdin);
// libstdc++/3045, in a vague way.
void test01()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
int k1;
// 1 normal
void test05()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
int i = static_ob.i;
VERIFY( std::cin.iword(i) == i + 1 );
void test06()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
try
{
// 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');
// 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);
void test09()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::cout << "Enter favorite beach: ";
std::cin.ignore(2048, '\n');
}
void test07()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
const char* name = "tmp_fifo4";
// 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>: ";
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.
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
const char* name = "tmp_09";
FILE* fout = fopen(name, "w");
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
const char* name = "tmp_fifo5";
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
int c1 = fgetc(stdin);
int c2 = cin.rdbuf()->sputbackc(c1);
void
test01()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
wchar_t array2[20];
typedef std::wios::traits_type wtraits_type;
{
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"));
{
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"));
{
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"));
{
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"));
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() );
// libstdc++/3045, in a vague way.
void test01()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
int k1;
// 1 normal
void test05()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
int i = static_ob.i;
VERIFY( std::wcin.iword(i) == i + 1 );
// 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');
// 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);
void test09()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::wcout << L"Enter favorite beach: ";
std::wcin.ignore(2048, '\n');
}
void test07()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
const char* name = "tmp_fifo4";
// 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>: ";
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.
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
const char* name = "tmp_9520";
FILE* file = fopen(name, "w");
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
const char* name = "tmp_fifo5";
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
wint_t c1 = fgetwc(stdin);
wint_t c2 = wcin.rdbuf()->sputbackc(c1);
// on stdout.
void test01()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
std::wcout << L"Hello, ";
VERIFY( std::fwide(stdout, 0) >= 0 );
std::streamoff soff;
// No signed/unsigned warnings.
- long l = ssize;
+ long l __attribute__((unused)) = ssize;
// Wrapped in pos_type is EOF.
soff = -1;
// { 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;
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;
void test01()
{
- bool test = true;
+ bool test __attribute__((unused)) = true;
for (int i = 0; i < 10; i++)
{
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);
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';
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;
}
void test01()
{
using namespace std;
- bool test = true;
+ bool test __attribute__((unused)) = true;
const char* name = "tmp_file1";
FILE* file = fopen(name, "w");
{
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";
// 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");
// 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");
// 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");
// 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");
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);
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' );
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);
}
// 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");
// 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");
// 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");
// 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");
{
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;
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
}
int
-main (int argc, char** argv)
+main ()
{
pthread_t prod[thread_pairs];
pthread_t cons[thread_pairs];
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;
}
int
-main (int argc, char *argv[])
+main ()
{
int worker;
pthread_t threads[NTHREADS];
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;
__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
// 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__)