summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/include
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-11 15:19:15 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-11 15:19:15 +0000
commitcbb49c45ba298ef9286b850853389762b2f54e23 (patch)
tree990efb8ae32702ecec0ecea8294040b6d340f442 /libstdc++-v3/include
parent516aa37deb121650b6787d53cb1831119cff3e60 (diff)
downloadppe42-gcc-cbb49c45ba298ef9286b850853389762b2f54e23.tar.gz
ppe42-gcc-cbb49c45ba298ef9286b850853389762b2f54e23.zip
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123716 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r--libstdc++-v3/include/bits/locale_facets.tcc6
1 files changed, 5 insertions, 1 deletions
diff --git a/libstdc++-v3/include/bits/locale_facets.tcc b/libstdc++-v3/include/bits/locale_facets.tcc
index fa3ce4e3b14..64f148513bf 100644
--- a/libstdc++-v3/include/bits/locale_facets.tcc
+++ b/libstdc++-v3/include/bits/locale_facets.tcc
@@ -890,7 +890,11 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE
const fmtflags __fmt = __io.flags();
__io.flags((__fmt & ~ios_base::basefield) | ios_base::hex);
- unsigned long __ul;
+ 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.
OpenPOWER on IntegriCloud