2007-04-11 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc (num_get<>::do_get(iter_type,
ios_base&, ios_base::iostate&, void*&)): Fix for sizeof(void*)
> sizeof(unsigned long).
* testsuite/22_locale/num_get/get/char/1.cc: Fix void* test.
* testsuite/22_locale/num_get/get/wchar_t/1.cc: Likewise.
* testsuite/22_locale/num_put/put/char/1.cc: Tweak comment.
* testsuite/22_locale/num_put/put/wchar_t/1.cc: Likewise.
From-SVN: r123716
+2007-04-11 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/locale_facets.tcc (num_get<>::do_get(iter_type,
+ ios_base&, ios_base::iostate&, void*&)): Fix for sizeof(void*)
+ > sizeof(unsigned long).
+
+ * testsuite/22_locale/num_get/get/char/1.cc: Fix void* test.
+ * testsuite/22_locale/num_get/get/wchar_t/1.cc: Likewise.
+
+ * testsuite/22_locale/num_put/put/char/1.cc: Tweak comment.
+ * testsuite/22_locale/num_put/put/wchar_t/1.cc: Likewise.
+
2007-04-11 Zack Weinberg <zack@mrtock.ucsd.edu>
* include/std/iosfwd: Do not include <bits/c++locale.h> and
2007-04-11 Zack Weinberg <zack@mrtock.ucsd.edu>
* include/std/iosfwd: Do not include <bits/c++locale.h> and
const fmtflags __fmt = __io.flags();
__io.flags((__fmt & ~ios_base::basefield) | ios_base::hex);
const fmtflags __fmt = __io.flags();
__io.flags((__fmt & ~ios_base::basefield) | ios_base::hex);
+ typedef __gnu_cxx::__conditional_type<(sizeof(void*)
+ <= sizeof(unsigned long)),
+ unsigned long, unsigned long long>::__type _UIntPtrType;
+
+ _UIntPtrType __ul;
__beg = _M_extract_int(__beg, __end, __io, __err, __ul);
// Reset from hex formatted input.
__beg = _M_extract_int(__beg, __end, __io, __err, __ul);
// Reset from hex formatted input.
// 2001-11-21 Benjamin Kosnik <bkoz@redhat.com>
// 2001-11-21 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// 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
//
// 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
double d;
long double ld1 = 6.630025e+4;
long double ld;
double d;
long double ld1 = 6.630025e+4;
long double ld;
- void* v;
- const void* cv = &ul2;
// cache the num_get facet
istringstream iss;
// cache the num_get facet
istringstream iss;
VERIFY( ld == 0 );
VERIFY( err == goodbit );
VERIFY( ld == 0 );
VERIFY( err == goodbit );
iss.str("0xbffff74c,");
iss.clear();
err = goodbit;
ng.get(iss.rdbuf(), 0, iss, err, v);
iss.str("0xbffff74c,");
iss.clear();
err = goodbit;
ng.get(iss.rdbuf(), 0, iss, err, v);
VERIFY( err == goodbit );
#ifdef _GLIBCXX_USE_LONG_LONG
VERIFY( err == goodbit );
#ifdef _GLIBCXX_USE_LONG_LONG
// 2001-11-21 Benjamin Kosnik <bkoz@redhat.com>
// 2001-11-21 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// 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
//
// 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
long double ld1 = 6.630025e+4;
long double ld;
void* v;
long double ld1 = 6.630025e+4;
long double ld;
void* v;
// cache the num_get facet
wistringstream iss;
// cache the num_get facet
wistringstream iss;
VERIFY( ld == 0 );
VERIFY( err == goodbit );
VERIFY( ld == 0 );
VERIFY( err == goodbit );
iss.str(L"0xbffff74c,");
iss.clear();
err = goodbit;
ng.get(iss.rdbuf(), 0, iss, err, v);
iss.str(L"0xbffff74c,");
iss.clear();
err = goodbit;
ng.get(iss.rdbuf(), 0, iss, err, v);
VERIFY( err == goodbit );
#ifdef _GLIBCXX_USE_LONG_LONG
VERIFY( err == goodbit );
#ifdef _GLIBCXX_USE_LONG_LONG
iterator_type os_it01 = np.put(os_it00, oss, '+', b1);
result1 = oss.str();
VERIFY( result1 == "1" );
iterator_type os_it01 = np.put(os_it00, oss, '+', b1);
result1 = oss.str();
VERIFY( result1 == "1" );
- // VERIFY( os_it00 != os_it01 );
oss.str(empty);
np.put(oss.rdbuf(), oss, '+', b0);
oss.str(empty);
np.put(oss.rdbuf(), oss, '+', b0);
result1 = oss.str();
VERIFY( result1 == "0" );
result1 = oss.str();
VERIFY( result1 == "0" );
oss.str(empty);
oss.clear();
np.put(oss.rdbuf(), oss, '+', cv);
oss.str(empty);
oss.clear();
np.put(oss.rdbuf(), oss, '+', cv);
// 2001-11-19 Benjamin Kosnik <bkoz@redhat.com>
// 2001-11-19 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// 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
//
// 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
iterator_type os_it01 = np.put(os_it00, oss, L'+', b1);
result1 = oss.str();
VERIFY( result1 == L"1" );
iterator_type os_it01 = np.put(os_it00, oss, L'+', b1);
result1 = oss.str();
VERIFY( result1 == L"1" );
- // VERIFY( os_it00 != os_it01 );
oss.str(empty);
np.put(oss.rdbuf(), oss, L'+', b0);
oss.str(empty);
np.put(oss.rdbuf(), oss, L'+', b0);
result1 = oss.str();
VERIFY( result1 == L"0" );
result1 = oss.str();
VERIFY( result1 == L"0" );
oss.str(empty);
oss.clear();
np.put(oss.rdbuf(), oss, L'+', cv);
oss.str(empty);
oss.clear();
np.put(oss.rdbuf(), oss, L'+', cv);