re PR libstdc++/21209 (signed integer overflow in num_get<>::_M_extract_int)
authorPaolo Carlini <pcarlini@suse.de>
Tue, 26 Apr 2005 09:31:07 +0000 (09:31 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 26 Apr 2005 09:31:07 +0000 (09:31 +0000)
commit44ecf603649098d1d89bd855155a215507bf9e86
tree90e9886d6ee581f71733aa43b16029cbbf1fb27a
parentc579626684c724b226892b0869316fd1ed7ad350
re PR libstdc++/21209 (signed integer overflow in num_get<>::_M_extract_int)

2005-04-26  Paolo Carlini  <pcarlini@suse.de>

PR libstdc++/21209
* include/bits/locale_facets.tcc (_M_extract_int): Avoid signed
integer overflow, always use a suited unsigned type in the main
parsing loop.
(struct __to_unsigned_type): New.
* testsuite/22_locale/num_get/get/char/16.cc: New.
* testsuite/22_locale/num_get/get/wchar_t/16.cc: Likewise.

From-SVN: r98768
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/locale_facets.tcc
libstdc++-v3/testsuite/22_locale/num_get/get/char/16.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/16.cc [new file with mode: 0644]