mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-26 21:33:59 +08:00
locale_facets.tcc: Tweak to avoid warnings.
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. From-SVN: r71693
This commit is contained in:
parent
1593ad2edd
commit
11f10e6b1f
@ -1,3 +1,9 @@
|
||||
2003-09-23 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
* include/bits/locale_facets.tcc: Tweak to avoid warnings.
|
||||
* testsuite/testsuite_hooks.h: Same.
|
||||
* testsuite/*/*.cc: Same.
|
||||
|
||||
2003-09-22 Petur Runolfsson <peturr02@ru.is>
|
||||
|
||||
* include/bits/istream.tcc (basic_istream::read,
|
||||
|
@ -105,7 +105,7 @@ namespace std
|
||||
const locale::facet** __caches = __loc._M_impl->_M_caches;
|
||||
if (!__caches[__i])
|
||||
{
|
||||
__numpunct_cache<_CharT>* __tmp;
|
||||
__numpunct_cache<_CharT>* __tmp = NULL;
|
||||
try
|
||||
{
|
||||
__tmp = new __numpunct_cache<_CharT>;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// 2001-02-06 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
// Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2001, 2003 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
@ -24,12 +24,13 @@
|
||||
|
||||
namespace gnu
|
||||
{
|
||||
void test01()
|
||||
int test01()
|
||||
{
|
||||
int i = errno;
|
||||
#ifndef errno
|
||||
#error "errno_must_be_a_macro"
|
||||
#endif
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,119 +0,0 @@
|
||||
// 1999-05-20 bkoz
|
||||
|
||||
// Copyright (C) 1999, 2003 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 2, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License along
|
||||
// with this library; see the file COPYING. If not, write to the Free
|
||||
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
// USA.
|
||||
|
||||
// 17.4.1.2 Headers, ciso646
|
||||
|
||||
// { dg-do link }
|
||||
|
||||
#include <ciso646>
|
||||
#include <testsuite_hooks.h>
|
||||
|
||||
|
||||
// 2.11 Keywords
|
||||
// alternative representations
|
||||
// and, and_eq, bitand, bitor, compl, not, not_eq, or, or_eq, xor, xor_eq
|
||||
|
||||
// C 2.2.2 Header <iso646.h>
|
||||
// The tokens (as above) are keywords and do not appear as macros in <ciso646>.
|
||||
|
||||
// Test for macros.
|
||||
bool test01()
|
||||
{
|
||||
bool test = true;
|
||||
|
||||
#if 0
|
||||
|
||||
#ifdef and
|
||||
test = false;
|
||||
#endif
|
||||
|
||||
#ifdef and_eq
|
||||
test = false;
|
||||
#endif
|
||||
|
||||
#ifdef bitand
|
||||
test = false;
|
||||
#endif
|
||||
|
||||
#ifdef bitor
|
||||
test = false;
|
||||
#endif
|
||||
|
||||
#ifdef compl
|
||||
test = false;
|
||||
#endif
|
||||
|
||||
#ifdef not_eq
|
||||
test = false;
|
||||
#endif
|
||||
|
||||
#ifdef not_or
|
||||
test = false;
|
||||
#endif
|
||||
|
||||
#ifdef or
|
||||
test = false;
|
||||
#endif
|
||||
|
||||
#ifdef or_eq
|
||||
test = false;
|
||||
#endif
|
||||
|
||||
#ifdef xor
|
||||
test = false;
|
||||
#endif
|
||||
|
||||
#ifdef xor_eq
|
||||
test = false;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
return test;
|
||||
}
|
||||
|
||||
|
||||
// Equivalance in usage.
|
||||
bool test02()
|
||||
{
|
||||
bool test = true;
|
||||
|
||||
bool arg1 = true;
|
||||
bool arg2 = false;
|
||||
int int1 = 45;
|
||||
int int2 = 0;
|
||||
|
||||
VERIFY( arg1 && int1 );
|
||||
VERIFY( arg1 and int1 );
|
||||
|
||||
VERIFY( (arg1 && arg2) == (arg1 and arg2) );
|
||||
VERIFY( (arg1 && int1) == (arg1 and int1) );
|
||||
|
||||
return test;
|
||||
}
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
test01();
|
||||
test02();
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
// 2001-02-06 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
// Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2001, 2003 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
@ -27,7 +27,7 @@ namespace gnu
|
||||
void test01()
|
||||
{
|
||||
std::jmp_buf env;
|
||||
int i = setjmp(env);
|
||||
int i __attribute__((unused)) = setjmp(env);
|
||||
#ifndef setjmp
|
||||
#error "setjmp_must_be_a_macro"
|
||||
#endif
|
||||
|
@ -1,6 +1,6 @@
|
||||
// 2001-02-06 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
// Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2001, 2003 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
@ -26,7 +26,7 @@ namespace gnu
|
||||
{
|
||||
void test01()
|
||||
{
|
||||
std::va_list list;
|
||||
std::va_list __attribute__((unused)) list;
|
||||
#ifndef va_arg
|
||||
#error "va_arg_must_be_a_macro"
|
||||
#endif
|
||||
|
@ -1,6 +1,6 @@
|
||||
// 2001-02-06 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
// Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2001, 2003 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
@ -32,7 +32,7 @@ namespace gnu
|
||||
|
||||
void test01()
|
||||
{
|
||||
std::size_t i = offsetof(struct test_type, i);
|
||||
std::size_t i __attribute__((unused)) = offsetof(struct test_type, i);
|
||||
#ifndef offsetof
|
||||
#error "offsetof_must_be_a_macro"
|
||||
#endif
|
||||
|
@ -1,6 +1,6 @@
|
||||
// 2000-01-01 bkoz
|
||||
|
||||
// Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2001, 2003 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
@ -25,6 +25,6 @@
|
||||
int main(void)
|
||||
{
|
||||
// Make sure size_t is in namespace std
|
||||
std::size_t i = 5;
|
||||
std::size_t i __attribute__((unused)) = 5;
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
// 2000-01-01 bkoz
|
||||
|
||||
// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
@ -25,15 +25,15 @@
|
||||
// libstdc++/2190
|
||||
void test01()
|
||||
{
|
||||
long a = std::abs(1L);
|
||||
long a __attribute__((unused)) = std::abs(1L);
|
||||
std::div(2L, 1L);
|
||||
std::ldiv_t b;
|
||||
std::ldiv_t b __attribute__((unused));
|
||||
}
|
||||
|
||||
void test02()
|
||||
{
|
||||
// Make sure size_t is in namespace std.
|
||||
std::size_t i = 5;
|
||||
std::size_t i __attribute__((unused)) = 5;
|
||||
}
|
||||
|
||||
int main()
|
||||
|
@ -1,6 +1,6 @@
|
||||
// 2000-01-01 bkoz
|
||||
|
||||
// Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2001, 2003 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
@ -26,6 +26,6 @@
|
||||
int main(void)
|
||||
{
|
||||
// Make sure size_t is in namespace std
|
||||
std::size_t i = std::strlen("tibet shop/san francisco (415) 982-0326");
|
||||
std::size_t i __attribute__((unused)) = std::strlen("tibet shop/san francisco (415) 982-0326");
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
// 2000-01-01 bkoz
|
||||
|
||||
// Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2001, 2003 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
@ -22,10 +22,9 @@
|
||||
|
||||
#include <ctime>
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
// Make sure size_t is in namespace std
|
||||
std::size_t i = 5;
|
||||
std::size_t i __attribute__((unused)) = 5;
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
// 2000-01-01 bkoz
|
||||
|
||||
// Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2001, 2003 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
@ -25,9 +25,9 @@
|
||||
int main(void)
|
||||
{
|
||||
// Make sure size_t is in namespace std
|
||||
std::size_t i = 5;
|
||||
std::size_t i __attribute__((unused)) = 5;
|
||||
|
||||
std::tm mytime;
|
||||
std::tm __attribute__((unused)) mytime;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ DEFINE_EXTREMA(long double, LDBL_MIN, LDBL_MAX);
|
||||
template<typename T>
|
||||
void test_extrema()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
T limits_min = std::numeric_limits<T>::min();
|
||||
T limits_max = std::numeric_limits<T>::max();
|
||||
T extrema_min = extrema<T>::min;
|
||||
@ -74,7 +74,7 @@ void test_extrema()
|
||||
template<typename T>
|
||||
void test_epsilon()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
T epsilon = std::numeric_limits<T>::epsilon();
|
||||
T one = 1;
|
||||
|
||||
@ -89,7 +89,7 @@ void test_epsilon()
|
||||
|
||||
void test_sign()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
VERIFY( std::numeric_limits<char>::is_signed == char_is_signed );
|
||||
VERIFY( std::numeric_limits<signed char>::is_signed == true );
|
||||
VERIFY( std::numeric_limits<unsigned char>::is_signed == false );
|
||||
@ -200,7 +200,7 @@ struct B
|
||||
|
||||
bool test01()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
std::numeric_limits< A<B> > obj;
|
||||
|
||||
VERIFY( !obj.is_specialized );
|
||||
@ -244,16 +244,16 @@ void test02()
|
||||
typedef std::numeric_limits<B> b_nl_type;
|
||||
|
||||
// Should probably do all of them...
|
||||
const int* pi1 = &b_nl_type::digits;
|
||||
const int* pi2 = &b_nl_type::digits10;
|
||||
const int* pi3 = &b_nl_type::max_exponent10;
|
||||
const bool* pb1 = &b_nl_type::traps;
|
||||
const int* __attribute__((unused)) pi1 = &b_nl_type::digits;
|
||||
const int* __attribute__((unused)) pi2 = &b_nl_type::digits10;
|
||||
const int* __attribute__((unused)) pi3 = &b_nl_type::max_exponent10;
|
||||
const bool* __attribute__((unused)) pb1 = &b_nl_type::traps;
|
||||
}
|
||||
|
||||
// libstdc++/5045
|
||||
bool test03()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
VERIFY( std::numeric_limits<bool>::digits10 == 0 );
|
||||
if (__CHAR_BIT__ == 8)
|
||||
@ -282,7 +282,7 @@ bool test03()
|
||||
// libstdc++/8949
|
||||
bool test04()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
VERIFY( !std::numeric_limits<short>::is_iec559 );
|
||||
VERIFY( !std::numeric_limits<unsigned short>::is_iec559 );
|
||||
|
@ -27,7 +27,7 @@
|
||||
// libstdc++/1972
|
||||
void test01()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
std::string s("lack of sunlight, no water error");
|
||||
|
||||
// 1
|
||||
@ -41,7 +41,7 @@ void test01()
|
||||
|
||||
void test02()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
std::string s("lack of sunlight error");
|
||||
std::domain_error x(s);
|
||||
|
||||
@ -57,7 +57,7 @@ public:
|
||||
|
||||
void test03()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
try
|
||||
{ throw fuzzy_logic(); }
|
||||
catch(const fuzzy_logic& obj)
|
||||
@ -78,7 +78,7 @@ void allocate_on_stack(void)
|
||||
}
|
||||
void test04()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
const std::string s("CA ISO emergency once again:immediate power down");
|
||||
const char* strlit1 = "wish I lived in Palo Alto";
|
||||
const char* strlit2 = "...or Santa Barbara";
|
||||
|
@ -45,7 +45,7 @@ void operator delete(void *v) throw()
|
||||
|
||||
void test01()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
std::allocator<gnu> obj;
|
||||
|
||||
// XXX These should work for various size allocation and
|
||||
@ -61,7 +61,7 @@ void test01()
|
||||
// libstdc++/8230
|
||||
void test02()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
try
|
||||
{
|
||||
std::allocator<int> alloc;
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2000, 2002 Free Software Foundation
|
||||
// Copyright (C) 2000, 2002, 2003 Free Software Foundation
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
@ -60,8 +60,8 @@ struct reset_count_struct
|
||||
int
|
||||
test01()
|
||||
{
|
||||
reset_count_struct reset;
|
||||
bool test = true;
|
||||
reset_count_struct __attribute__((unused)) reset;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
std::auto_ptr<A> A_default;
|
||||
VERIFY( A_default.get() == 0 );
|
||||
@ -91,8 +91,8 @@ test01()
|
||||
int
|
||||
test02()
|
||||
{
|
||||
reset_count_struct reset;
|
||||
bool test = true;
|
||||
reset_count_struct __attribute__((unused)) reset;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
std::auto_ptr<A> A_from_A(new A);
|
||||
std::auto_ptr<B> B_from_B(new B);
|
||||
@ -115,8 +115,8 @@ test02()
|
||||
int
|
||||
test03()
|
||||
{
|
||||
reset_count_struct reset;
|
||||
bool test = true;
|
||||
reset_count_struct __attribute__((unused)) reset;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
std::auto_ptr<A> A_from_ptr_A;
|
||||
std::auto_ptr<A> A_from_ptr_B;
|
||||
@ -141,8 +141,8 @@ test03()
|
||||
int
|
||||
test04()
|
||||
{
|
||||
reset_count_struct reset;
|
||||
bool test = true;
|
||||
reset_count_struct __attribute__((unused)) reset;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
{/*lifetine scope*/
|
||||
std::auto_ptr<A> A_from_A(new A);
|
||||
@ -171,8 +171,8 @@ private:
|
||||
int
|
||||
test05()
|
||||
{
|
||||
bool test = true;
|
||||
reset_count_struct reset;
|
||||
bool test __attribute__((unused)) = true;
|
||||
reset_count_struct __attribute__((unused)) reset;
|
||||
|
||||
pimpl<A>();
|
||||
pimpl<B>();
|
||||
@ -190,8 +190,8 @@ test05()
|
||||
int
|
||||
test06()
|
||||
{
|
||||
reset_count_struct reset;
|
||||
bool test = true;
|
||||
reset_count_struct __attribute__((unused)) reset;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
std::auto_ptr<A> A_from_A(new A);
|
||||
std::auto_ptr<A> A_from_A_ptr(A_from_A.release());
|
||||
@ -231,8 +231,8 @@ static void drain(std::auto_ptr<T>)
|
||||
int
|
||||
test07()
|
||||
{
|
||||
bool test = true;
|
||||
reset_count_struct reset;
|
||||
bool test __attribute__((unused)) = true;
|
||||
reset_count_struct __attribute__((unused)) reset;
|
||||
|
||||
drain(source<A>());
|
||||
// The resolution of core issue 84, now a DR, breaks this call.
|
||||
|
@ -1,6 +1,6 @@
|
||||
// 2001-06-11 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
// Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2001, 2003 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
@ -27,8 +27,8 @@
|
||||
class Elem
|
||||
{
|
||||
public:
|
||||
void print(int i) const { }
|
||||
void modify(int i) { }
|
||||
void print(int) const { }
|
||||
void modify(int) { }
|
||||
};
|
||||
|
||||
// libstdc++/3113
|
||||
|
@ -46,7 +46,7 @@ template<typename T>
|
||||
// heterogeneous
|
||||
void test01()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
std::pair<bool, long> p_bl_1(true, 433);
|
||||
std::pair<bool, long> p_bl_2 = std::make_pair(true, 433);
|
||||
@ -75,7 +75,7 @@ void test01()
|
||||
// homogeneous
|
||||
void test02()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
std::pair<bool, bool> p_bb_1(true, false);
|
||||
std::pair<bool, bool> p_bb_2 = std::make_pair(true, false);
|
||||
@ -87,7 +87,7 @@ void test02()
|
||||
// const
|
||||
void test03()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
const std::pair<bool, long> p_bl_1(true, 433);
|
||||
const std::pair<bool, long> p_bl_2 = std::make_pair(true, 433);
|
||||
@ -116,7 +116,7 @@ void test03()
|
||||
// const&
|
||||
void test04()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
const gnu_obj& obj1 = gnu_obj(5);
|
||||
const std::pair<const char*, gnu_obj> p_sg_1("enlightenment", obj1);
|
||||
const std::pair<const char*, gnu_obj> p_sg_2 =
|
||||
|
@ -1,6 +1,6 @@
|
||||
// 2001-06-18 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
// Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2001, 2003 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
@ -31,7 +31,7 @@ void test01()
|
||||
typedef raw_storage_iterator<long*, long> test_iterator;
|
||||
typedef iterator<output_iterator_tag, void, void, void, void> base_iterator;
|
||||
test_iterator rs_it(&l);
|
||||
base_iterator* base = &rs_it;
|
||||
base_iterator* base __attribute__((unused)) = &rs_it;
|
||||
|
||||
// Check for required typedefs
|
||||
typedef test_iterator::value_type value_type;
|
||||
|
@ -27,7 +27,7 @@ struct junk { char j[12]; };
|
||||
|
||||
int main(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
std::pair<junk*,ptrdiff_t> results = std::get_temporary_buffer<junk>(5);
|
||||
|
||||
|
@ -26,12 +26,11 @@
|
||||
|
||||
bool test01(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
typedef std::string::size_type csize_type;
|
||||
typedef std::string::const_reference cref;
|
||||
typedef std::string::reference ref;
|
||||
csize_type npos = std::string::npos;
|
||||
csize_type csz01, csz02;
|
||||
csize_type csz01;
|
||||
|
||||
const char str_lit01[] = "point bolivar, texas";
|
||||
const std::string str01(str_lit01);
|
||||
|
@ -26,12 +26,11 @@
|
||||
|
||||
bool test01(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
typedef std::wstring::size_type csize_type;
|
||||
typedef std::wstring::const_reference cref;
|
||||
typedef std::wstring::reference ref;
|
||||
csize_type npos = std::wstring::npos;
|
||||
csize_type csz01, csz02;
|
||||
csize_type csz01;
|
||||
|
||||
const wchar_t str_lit01[] = L"point bolivar, texas";
|
||||
const std::wstring str01(str_lit01);
|
||||
|
@ -27,7 +27,7 @@
|
||||
void
|
||||
test01()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
void
|
||||
test02()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
void
|
||||
test03()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
void
|
||||
test01()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
void
|
||||
test02()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
void
|
||||
test03()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -125,7 +125,7 @@ namespace std
|
||||
|
||||
void test01()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
// non POD types : resize, capacity, reserve
|
||||
std::basic_string< A<B> > str02;
|
||||
@ -140,7 +140,7 @@ void test01()
|
||||
VERIFY( sz04 >= 100 );
|
||||
str02.reserve();
|
||||
sz03 = str02.capacity();
|
||||
VERIFY( sz03 >= 0 );
|
||||
VERIFY( sz03 > 0 );
|
||||
|
||||
sz03 = str02.size() + 5;
|
||||
str02.resize(sz03);
|
||||
|
@ -26,7 +26,7 @@
|
||||
void test01()
|
||||
{
|
||||
// POD types : resize, capacity, reserve
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
std::string str01;
|
||||
typedef std::string::size_type size_type_s;
|
||||
|
||||
@ -37,7 +37,7 @@ void test01()
|
||||
VERIFY( sz02 >= 100 );
|
||||
str01.reserve();
|
||||
sz01 = str01.capacity();
|
||||
VERIFY( sz01 >= 0 );
|
||||
VERIFY( sz01 > 0 );
|
||||
|
||||
sz01 = str01.size() + 5;
|
||||
str01.resize(sz01);
|
||||
@ -79,9 +79,7 @@ void test01()
|
||||
|
||||
// trickster allocator issues involved with these:
|
||||
std::string str3 = "8-chars_8-chars_";
|
||||
const char* p3 = str3.c_str();
|
||||
std::string str4 = str3 + "7-chars";
|
||||
const char* p4 = str3.c_str();
|
||||
|
||||
sz01 = str01.size();
|
||||
sz02 = str01.max_size();
|
||||
|
@ -27,7 +27,7 @@
|
||||
// http://gcc.gnu.org/ml/libstdc++/2001-11/msg00150.html
|
||||
void test02()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
std::string str01 = "twelve chars";
|
||||
// str01 becomes shared
|
||||
|
@ -26,7 +26,7 @@
|
||||
void test01()
|
||||
{
|
||||
// POD types : resize, capacity, reserve
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
std::wstring str01;
|
||||
typedef std::wstring::size_type size_type_s;
|
||||
|
||||
@ -37,7 +37,7 @@ void test01()
|
||||
VERIFY( sz02 >= 100 );
|
||||
str01.reserve();
|
||||
sz01 = str01.capacity();
|
||||
VERIFY( sz01 >= 0 );
|
||||
VERIFY( sz01 > 0 );
|
||||
|
||||
sz01 = str01.size() + 5;
|
||||
str01.resize(sz01);
|
||||
@ -79,9 +79,7 @@ void test01()
|
||||
|
||||
// trickster allocator issues involved with these:
|
||||
std::wstring str3 = L"8-chars_8-chars_";
|
||||
const wchar_t* p3 = str3.c_str();
|
||||
std::wstring str4 = str3 + L"7-chars";
|
||||
const wchar_t* p4 = str3.c_str();
|
||||
|
||||
sz01 = str01.size();
|
||||
sz02 = str01.max_size();
|
||||
|
@ -27,7 +27,7 @@
|
||||
// http://gcc.gnu.org/ml/libstdc++/2001-11/msg00150.html
|
||||
void test02()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
std::wstring str01 = L"twelve chars";
|
||||
// str01 becomes shared
|
||||
|
@ -27,11 +27,11 @@
|
||||
|
||||
void test01(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
typedef std::string::size_type csize_type;
|
||||
typedef std::string::iterator citerator;
|
||||
csize_type npos = std::string::npos;
|
||||
csize_type csz01, csz02;
|
||||
csize_type csz01;
|
||||
|
||||
const char str_lit01[] = "rodeo beach, marin";
|
||||
const std::string str01(str_lit01);
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
void test02()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
// template<typename _InputIter>
|
||||
// basic_string(_InputIter begin, _InputIter end, const allocator& a)
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
void test03()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
const char* with_nulls = "This contains \0 a zero byte.";
|
||||
|
||||
// These are tests to see how basic_string handles data with NUL
|
||||
|
@ -26,7 +26,7 @@
|
||||
// http://gcc.gnu.org/ml/libstdc++/2002-06/msg00025.html
|
||||
void test04()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
std::string str01("portofino");
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
// libstdc++/8347
|
||||
void test05()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
std::vector<char> empty;
|
||||
std::string empty2(empty.begin(), empty.end());
|
||||
|
@ -27,11 +27,11 @@
|
||||
|
||||
void test01(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
typedef std::wstring::size_type csize_type;
|
||||
typedef std::wstring::iterator citerator;
|
||||
csize_type npos = std::wstring::npos;
|
||||
csize_type csz01, csz02;
|
||||
csize_type csz01;
|
||||
|
||||
const wchar_t str_lit01[] = L"rodeo beach, marin";
|
||||
const std::wstring str01(str_lit01);
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
void test02()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
// template<typename _InputIter>
|
||||
// basic_string(_InputIter begin, _InputIter end, const allocator& a)
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
void test03()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
const wchar_t* with_nulls = L"This contains \0 a zero byte.";
|
||||
|
||||
// These are tests to see how basic_string handles data with NUL
|
||||
|
@ -26,7 +26,7 @@
|
||||
// http://gcc.gnu.org/ml/libstdc++/2002-06/msg00025.html
|
||||
void test04()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
std::wstring str01(L"portofino");
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
// libstdc++/8347
|
||||
void test05()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
std::vector<wchar_t> empty;
|
||||
std::wstring empty2(empty.begin(), empty.end());
|
||||
|
@ -26,11 +26,10 @@
|
||||
|
||||
bool test01(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
typedef std::string::size_type csize_type;
|
||||
typedef std::string::const_reference cref;
|
||||
typedef std::string::reference ref;
|
||||
csize_type npos = std::string::npos;
|
||||
csize_type csz01, csz02;
|
||||
|
||||
const std::string str01("tamarindo, costa rica");
|
||||
@ -56,7 +55,7 @@ bool test01(void)
|
||||
cref cref3 = str01.at(csz01 - 1);
|
||||
VERIFY( cref3 == 'a' );
|
||||
try {
|
||||
cref cref4 = str01.at(csz01);
|
||||
str01.at(csz01);
|
||||
VERIFY( false ); // Should not get here, as exception thrown.
|
||||
}
|
||||
catch(std::out_of_range& fail) {
|
||||
@ -71,7 +70,7 @@ bool test01(void)
|
||||
ref ref3 = str02.at(csz02 - 1);
|
||||
VERIFY( ref3 == 'a' );
|
||||
try {
|
||||
ref ref4 = str02.at(csz02);
|
||||
str02.at(csz02);
|
||||
VERIFY( false ); // Should not get here, as exception thrown.
|
||||
}
|
||||
catch(std::out_of_range& fail) {
|
||||
|
@ -29,11 +29,10 @@
|
||||
// underlying string implementation, of course.
|
||||
bool test01(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
typedef std::string::size_type csize_type;
|
||||
typedef std::string::iterator siterator;
|
||||
typedef std::string::reverse_iterator sriterator;
|
||||
csize_type npos = std::string::npos;
|
||||
csize_type csz01, csz02;
|
||||
siterator it1;
|
||||
sriterator rit1;
|
||||
|
@ -28,12 +28,10 @@
|
||||
// iterators, namely insert and erase.
|
||||
bool test02(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
typedef std::string::size_type csize_type;
|
||||
typedef std::string::iterator siterator;
|
||||
typedef std::string::reverse_iterator sriterator;
|
||||
csize_type npos = std::string::npos;
|
||||
csize_type csz01, csz02;
|
||||
siterator it1;
|
||||
sriterator rit1;
|
||||
|
||||
|
@ -26,11 +26,10 @@
|
||||
|
||||
bool test01(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
typedef std::wstring::size_type csize_type;
|
||||
typedef std::wstring::const_reference cref;
|
||||
typedef std::wstring::reference ref;
|
||||
csize_type npos = std::wstring::npos;
|
||||
csize_type csz01, csz02;
|
||||
|
||||
const std::wstring str01(L"tamarindo, costa rica");
|
||||
@ -56,7 +55,7 @@ bool test01(void)
|
||||
cref cref3 = str01.at(csz01 - 1);
|
||||
VERIFY( cref3 == L'a' );
|
||||
try {
|
||||
cref cref4 = str01.at(csz01);
|
||||
str01.at(csz01);
|
||||
VERIFY( false ); // Should not get here, as exception thrown.
|
||||
}
|
||||
catch(std::out_of_range& fail) {
|
||||
@ -71,7 +70,7 @@ bool test01(void)
|
||||
ref ref3 = str02.at(csz02 - 1);
|
||||
VERIFY( ref3 == L'a' );
|
||||
try {
|
||||
ref ref4 = str02.at(csz02);
|
||||
str02.at(csz02);
|
||||
VERIFY( false ); // Should not get here, as exception thrown.
|
||||
}
|
||||
catch(std::out_of_range& fail) {
|
||||
|
@ -29,11 +29,10 @@
|
||||
// underlying string implementation, of course.
|
||||
bool test01(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
typedef std::wstring::size_type csize_type;
|
||||
typedef std::wstring::iterator siterator;
|
||||
typedef std::wstring::reverse_iterator sriterator;
|
||||
csize_type npos = std::wstring::npos;
|
||||
csize_type csz01, csz02;
|
||||
siterator it1;
|
||||
sriterator rit1;
|
||||
|
@ -28,12 +28,10 @@
|
||||
// iterators, namely insert and erase.
|
||||
bool test02(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
typedef std::wstring::size_type csize_type;
|
||||
typedef std::wstring::iterator siterator;
|
||||
typedef std::wstring::reverse_iterator sriterator;
|
||||
csize_type npos = std::wstring::npos;
|
||||
csize_type csz01, csz02;
|
||||
siterator it1;
|
||||
sriterator rit1;
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
bool test01(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
typedef std::string::size_type csize_type;
|
||||
typedef std::string::const_reference cref;
|
||||
typedef std::string::reference ref;
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
bool test02(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
typedef std::string::size_type csize_type;
|
||||
csize_type npos = std::string::npos;
|
||||
csize_type csz01, csz02;
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
bool test03(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
typedef std::string::size_type csize_type;
|
||||
csize_type npos = std::string::npos;
|
||||
csize_type csz01;
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
bool test01(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
typedef std::wstring::size_type csize_type;
|
||||
typedef std::wstring::const_reference cref;
|
||||
typedef std::wstring::reference ref;
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
bool test02(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
typedef std::wstring::size_type csize_type;
|
||||
csize_type npos = std::wstring::npos;
|
||||
csize_type csz01, csz02;
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
bool test03(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
typedef std::wstring::size_type csize_type;
|
||||
csize_type npos = std::wstring::npos;
|
||||
csize_type csz01;
|
||||
|
@ -26,10 +26,9 @@
|
||||
|
||||
int test01(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
typedef std::string::size_type csize_type;
|
||||
typedef std::string::iterator citerator;
|
||||
csize_type npos = std::string::npos;
|
||||
csize_type csz01, csz02;
|
||||
|
||||
const std::string str01("rodeo beach, marin");
|
||||
|
@ -29,7 +29,7 @@
|
||||
// but now s points inside the _Rep
|
||||
int test02(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
std::string str01;
|
||||
const char* title = "Everything was beautiful, and nothing hurt";
|
||||
|
@ -26,10 +26,9 @@
|
||||
|
||||
int test01(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
typedef std::wstring::size_type csize_type;
|
||||
typedef std::wstring::iterator citerator;
|
||||
csize_type npos = std::wstring::npos;
|
||||
csize_type csz01, csz02;
|
||||
|
||||
const std::wstring str01(L"rodeo beach, marin");
|
||||
|
@ -29,7 +29,7 @@
|
||||
// but now s points inside the _Rep
|
||||
int test02(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
std::wstring str01;
|
||||
const wchar_t* title = L"Everything was beautiful, and nothing hurt";
|
||||
|
@ -33,12 +33,10 @@
|
||||
|
||||
bool test01(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
typedef std::string::size_type csize_type;
|
||||
typedef std::string::const_reference cref;
|
||||
typedef std::string::reference ref;
|
||||
csize_type npos = std::string::npos;
|
||||
csize_type csz01, csz02;
|
||||
|
||||
const std::string str01("sailing grand traverse bay\n"
|
||||
"\t\t\t from Elk Rapids to the point reminds me of miles");
|
||||
|
@ -30,11 +30,11 @@
|
||||
|
||||
// testing basic_stringbuf::xsputn via stress testing with large strings
|
||||
// based on a bug report libstdc++ 9
|
||||
void test04(int size)
|
||||
void test04(std::size_t size)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
std::string str(size, 's');
|
||||
int expected_size = 2 * (size + 1);
|
||||
std::size_t expected_size = 2 * (size + 1);
|
||||
std::ostringstream oss(str);
|
||||
|
||||
// sanity checks
|
||||
|
@ -32,9 +32,9 @@
|
||||
// testing basic_filebuf::xsputn via stress testing with large strings
|
||||
// based on a bug report libstdc++ 9
|
||||
// mode == out
|
||||
void test05(int size)
|
||||
void test05(std::size_t size)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
const char filename[] = "inserters_extractors-1.txt";
|
||||
const char fillc = 'f';
|
||||
std::ofstream ofs(filename);
|
||||
@ -60,7 +60,7 @@ void test05(int size)
|
||||
|
||||
// sanity check on the written file
|
||||
std::ifstream ifs(filename);
|
||||
int count = 0;
|
||||
std::size_t count = 0;
|
||||
char c;
|
||||
while (count <= (2 * size) + 4)
|
||||
{
|
||||
|
@ -33,7 +33,7 @@
|
||||
// http://gcc.gnu.org/ml/libstdc++/1999-q4/msg00049.html
|
||||
void test06(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
typedef std::string::size_type size_type;
|
||||
std::string str01("@silent");
|
||||
|
@ -34,7 +34,7 @@
|
||||
// NB: this is a defect in the standard.
|
||||
void test07(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
const std::string name("z6.cc");
|
||||
std::istringstream iss (name);
|
||||
int i = 0;
|
||||
|
@ -34,7 +34,7 @@ void test08()
|
||||
{
|
||||
using namespace std;
|
||||
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
istringstream istrm("enero:2001");
|
||||
int year;
|
||||
char sep;
|
||||
|
@ -32,7 +32,7 @@
|
||||
// libstdc++/2830
|
||||
void test09()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
std::string blanks( 3, '\0');
|
||||
std::string foo = "peace";
|
||||
foo += blanks;
|
||||
|
@ -33,12 +33,10 @@
|
||||
|
||||
bool test01(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
typedef std::wstring::size_type csize_type;
|
||||
typedef std::wstring::const_reference cref;
|
||||
typedef std::wstring::reference ref;
|
||||
csize_type npos = std::wstring::npos;
|
||||
csize_type csz01, csz02;
|
||||
|
||||
const std::wstring str01(L"sailing grand traverse bay\n"
|
||||
L"\t\t\t from Elk Rapids to the point reminds me of miles");
|
||||
|
@ -30,11 +30,11 @@
|
||||
|
||||
// testing basic_stringbuf::xsputn via stress testing with large strings
|
||||
// based on a bug report libstdc++ 9
|
||||
void test04(int size)
|
||||
void test04(std::size_t size)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
std::wstring str(size, L's');
|
||||
int expected_size = 2 * (size + 1);
|
||||
std::size_t expected_size = 2 * (size + 1);
|
||||
std::wostringstream oss(str);
|
||||
|
||||
// sanity checks
|
||||
|
@ -32,9 +32,9 @@
|
||||
// testing basic_filebuf::xsputn via stress testing with large strings
|
||||
// based on a bug report libstdc++ 9
|
||||
// mode == out
|
||||
void test05(int size)
|
||||
void test05(std::size_t size)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
const char filename[] = "inserters_extractors-1.txt";
|
||||
const wchar_t fillc = L'f';
|
||||
std::wofstream ofs(filename);
|
||||
@ -60,7 +60,7 @@ void test05(int size)
|
||||
|
||||
// sanity check on the written file
|
||||
std::wifstream ifs(filename);
|
||||
int count = 0;
|
||||
std::size_t count = 0;
|
||||
wchar_t c;
|
||||
while (count <= (2 * size) + 4)
|
||||
{
|
||||
|
@ -33,7 +33,7 @@
|
||||
// http://gcc.gnu.org/ml/libstdc++/1999-q4/msg00049.html
|
||||
void test06(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
typedef std::wstring::size_type size_type;
|
||||
std::wstring str01(L"@silent");
|
||||
|
@ -34,7 +34,7 @@
|
||||
// NB: this is a defect in the standard.
|
||||
void test07(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
const std::wstring name(L"z6.cc");
|
||||
std::wistringstream iss(name);
|
||||
int i = 0;
|
||||
|
@ -34,7 +34,7 @@ void test08()
|
||||
{
|
||||
using namespace std;
|
||||
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
wistringstream istrm(L"enero:2001");
|
||||
int year;
|
||||
wchar_t sep;
|
||||
|
@ -32,7 +32,7 @@
|
||||
// libstdc++/2830
|
||||
void test09()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
std::wstring blanks(3, L'\0');
|
||||
std::wstring foo = L"peace";
|
||||
foo += blanks;
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
int test01(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
std::string str1;
|
||||
std::string str2;
|
||||
@ -35,11 +35,11 @@ int test01(void)
|
||||
// 1:8-chars_8-chars_
|
||||
// 2:8-chars_8-chars_
|
||||
str1 = std::string("8-chars_") + "8-chars_";
|
||||
const char* p1 = str1.c_str();
|
||||
str1.c_str();
|
||||
// printf("1:%s\n", str1.c_str());
|
||||
str2 = str1 + "7-chars";
|
||||
// printf("2:%s\n", str1.c_str()); //str1 is gone
|
||||
const char* p2 = str1.c_str();
|
||||
str1.c_str();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ template<class charT, class traits, class Allocator>
|
||||
|
||||
int test01(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
std::string str_0("costa rica");
|
||||
std::string str_1("costa marbella");
|
||||
std::string str_2("cost");
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
int test01(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
std::wstring str1;
|
||||
std::wstring str2;
|
||||
@ -35,11 +35,11 @@ int test01(void)
|
||||
// 1:8-chars_8-chars_
|
||||
// 2:8-chars_8-chars_
|
||||
str1 = std::wstring(L"8-chars_") + L"8-chars_";
|
||||
const wchar_t* p1 = str1.c_str();
|
||||
str1.c_str();
|
||||
// wprintf("1:%s\n", str1.c_str());
|
||||
str2 = str1 + L"7-chars";
|
||||
// wprintf("2:%s\n", str1.c_str()); //str1 is gone
|
||||
const wchar_t* p2 = str1.c_str();
|
||||
str1.c_str();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ template<class charT, class traits, class Allocator>
|
||||
|
||||
int test01(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
std::wstring str_0(L"costa rica");
|
||||
std::wstring str_1(L"costa marbella");
|
||||
std::wstring str_2(L"cost");
|
||||
|
@ -25,12 +25,10 @@
|
||||
|
||||
bool test01(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
typedef std::string::size_type csize_type;
|
||||
typedef std::string::const_reference cref;
|
||||
typedef std::string::reference ref;
|
||||
csize_type npos = std::string::npos;
|
||||
csize_type csz01, csz02;
|
||||
|
||||
const char str_lit01[] = "ventura, california";
|
||||
const std::string str01(str_lit01);
|
||||
|
@ -26,7 +26,7 @@
|
||||
void
|
||||
test02()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
const char* strlit = "../the long pier/Hanalei Bay/Kauai/Hawaii";
|
||||
std::string aux = strlit;
|
||||
aux.replace(aux.begin()+5, aux.begin()+20,
|
||||
|
@ -27,7 +27,7 @@
|
||||
void
|
||||
test03()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
const char* title01 = "nine types of ambiguity";
|
||||
const char* title02 = "ultra";
|
||||
std::string str01 = title01;
|
||||
|
@ -29,7 +29,7 @@
|
||||
void
|
||||
test04()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
std::string str01 = "geogaddi";
|
||||
std::string str02;
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
void
|
||||
test05()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
std::string str01 = "londinium";
|
||||
std::string str02 = "cydonia";
|
||||
|
||||
|
@ -25,12 +25,10 @@
|
||||
|
||||
bool test01(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
typedef std::wstring::size_type csize_type;
|
||||
typedef std::wstring::const_reference cref;
|
||||
typedef std::wstring::reference ref;
|
||||
csize_type npos = std::wstring::npos;
|
||||
csize_type csz01, csz02;
|
||||
|
||||
const wchar_t str_lit01[] = L"ventura, california";
|
||||
const std::wstring str01(str_lit01);
|
||||
|
@ -27,7 +27,7 @@
|
||||
void
|
||||
test02()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
const wchar_t* strlit = L"../the long pier/Hanalei Bay/Kauai/Hawaii";
|
||||
std::wstring aux = strlit;
|
||||
aux.replace(aux.begin()+5, aux.begin()+20,
|
||||
|
@ -27,7 +27,7 @@
|
||||
void
|
||||
test03()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
const wchar_t* title01 = L"nine types of ambiguity";
|
||||
const wchar_t* title02 = L"ultra";
|
||||
std::wstring str01 = title01;
|
||||
|
@ -29,7 +29,7 @@
|
||||
void
|
||||
test04()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
std::wstring str01 = L"geogaddi";
|
||||
std::wstring str02;
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
void
|
||||
test05()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
std::wstring str01 = L"londinium";
|
||||
std::wstring str02 = L"cydonia";
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
// 21.3.6.2 basic_string rfind
|
||||
bool test01(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
typedef std::string::size_type csize_type;
|
||||
typedef std::string::const_reference cref;
|
||||
typedef std::string::reference ref;
|
||||
|
@ -24,7 +24,7 @@
|
||||
// 21.3.6.4 basic_string::find_last_of
|
||||
bool test02()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
std::string z("ab");
|
||||
std::string::size_type pos;
|
||||
pos = z.find_last_of("ab");
|
||||
|
@ -24,7 +24,7 @@
|
||||
// 21.3.6.6 basic_string::find_last_not_of
|
||||
bool test03()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
typedef std::string::size_type csize_type;
|
||||
std::string::size_type pos;
|
||||
csize_type npos = std::string::npos;
|
||||
|
@ -24,7 +24,7 @@
|
||||
// 21.3.6.2 basic_string rfind
|
||||
bool test01(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
typedef std::wstring::size_type csize_type;
|
||||
typedef std::wstring::const_reference cref;
|
||||
typedef std::wstring::reference ref;
|
||||
|
@ -24,7 +24,7 @@
|
||||
// 21.3.6.4 basic_string::find_last_of
|
||||
bool test02()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
std::wstring::size_type pos;
|
||||
std::wstring z(L"ab");
|
||||
pos = z.find_last_of(L"ab");
|
||||
|
@ -24,7 +24,7 @@
|
||||
// 21.3.6.6 basic_string::find_last_not_of
|
||||
bool test03()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
typedef std::wstring::size_type csize_type;
|
||||
std::wstring::size_type pos;
|
||||
csize_type npos = std::wstring::npos;
|
||||
|
@ -26,12 +26,11 @@
|
||||
|
||||
bool test01(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
typedef std::string::size_type csize_type;
|
||||
typedef std::string::const_reference cref;
|
||||
typedef std::string::reference ref;
|
||||
csize_type npos = std::string::npos;
|
||||
csize_type csz01, csz02;
|
||||
csize_type csz01;
|
||||
|
||||
const char str_lit01[] = "rockaway, pacifica";
|
||||
const std::string str01(str_lit01);
|
||||
|
@ -26,12 +26,11 @@
|
||||
|
||||
bool test01(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
typedef std::wstring::size_type csize_type;
|
||||
typedef std::wstring::const_reference cref;
|
||||
typedef std::wstring::reference ref;
|
||||
csize_type npos = std::wstring::npos;
|
||||
csize_type csz01, csz02;
|
||||
csize_type csz01;
|
||||
|
||||
const wchar_t str_lit01[] = L"rockaway, pacifica";
|
||||
const std::wstring str01(str_lit01);
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
void test01()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
char c = 'a';
|
||||
const char cc = 'b';
|
||||
char* c1 = &c;
|
||||
|
@ -31,14 +31,15 @@ void test02()
|
||||
const char* ccarray2 = "san francisco sunny-day park inspectors";
|
||||
char carray[50];
|
||||
strcpy(carray, ccarray1);
|
||||
void* v = carray;
|
||||
const void* cv = ccarray1;
|
||||
|
||||
memchr(cv, '/', 3);
|
||||
strchr(ccarray1, '/');
|
||||
strpbrk(ccarray1, ccarray2);
|
||||
strrchr(ccarray1, 'c');
|
||||
strstr(carray, carray);
|
||||
void* v;
|
||||
char* c;
|
||||
|
||||
v = memchr(cv, '/', 3);
|
||||
c = strchr(ccarray1, '/');
|
||||
c = strrchr(ccarray1, 'c');
|
||||
c = strpbrk(ccarray1, ccarray2);
|
||||
c = strstr(carray, carray);
|
||||
}
|
||||
|
||||
int main()
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
void test01()
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
wchar_t c = L'a';
|
||||
const wchar_t cc = L'b';
|
||||
wchar_t* c1 = &c;
|
||||
|
@ -32,12 +32,13 @@ void test02()
|
||||
const wchar_t* ccarray2 = L"san francisco sunny-day park inspectors";
|
||||
wchar_t carray[50];
|
||||
wcscpy(carray, ccarray1);
|
||||
|
||||
wmemchr(ccarray1, L'/', 3);
|
||||
wcschr(ccarray1, L'/');
|
||||
wcspbrk(ccarray1, ccarray2);
|
||||
wcsrchr(ccarray1, L'c');
|
||||
wcsstr(carray, carray);
|
||||
wchar_t* w;
|
||||
|
||||
w = wmemchr(ccarray1, L'/', 3);
|
||||
w = wcschr(ccarray1, L'/');
|
||||
w = wcspbrk(ccarray1, ccarray2);
|
||||
w = wcsrchr(ccarray1, L'c');
|
||||
w = wcsstr(carray, carray);
|
||||
}
|
||||
|
||||
int main()
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
void test01(void)
|
||||
{
|
||||
bool test = true;
|
||||
bool test __attribute__((unused)) = true;
|
||||
const std::string str_01("zuma beach");
|
||||
const std::string str_02("montara and ocean beach");
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user