2003-12-15 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc (num_get::do_get(bool&)):
Fail as soon as the begins of both truename and falsename
stop to match; always leave __beg one position beyond the
last char successfully matched.
* testsuite/22_locale/num_get/get/char/8.cc: New.
* testsuite/22_locale/num_get/get/wchar_t/8.cc: Likewise.
2003-12-15 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.h (_M_widen): Reserve space
for all the possible widened chars.
* config/locale/generic/ctype_members.cc (_M_initialize_ctype):
Compute at construction time all the possible widened chars.
(do_widen): Tweak, simplify.
* config/locale/gnu/ctype_members.cc: Likewise.
* testsuite/performance/narrow_widen_wchar_t.cc: Add tests
for the array versions.
From-SVN: r74636
2003-12-12 Paolo Carlini <pcarlini@suse.de>
Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/13341
* include/bits/locale_facets.h (ctype<wchar_t>): Declare
_M_initialize_ctype() and _M_narrow_ok, _M_narrow and _M_widen.
* src/ctype.cc (ctype<wchar_t>::ctype(size_t),
ctype<wchar_t>::ctype(__c_locale, size_t)): Use
_M_initialize_ctype to fill _M_narrow and _M_widen.
(ctype_byname<wchar_t>::ctype_byname(const char*, size_t)):
Likewise.
* config/locale/generic/ctype_members.cc (do_narrow, do_widen)
Use _M_narrow and _M_widen when possible, instead of calling
wctob and btowc, respectively.
(_M_initialize_ctype): Define, it fills at construction time
_M_narrow and _M_widen.
* config/locale/gnu/ctype_members.cc: Likewise.
* testsuite/performance/narrow_widen_wchar_t.cc: New.
Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com>
From-SVN: r74580
2003-12-10 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/6243
* testsuite/lib/libstdc++.exp (v3-init): Add
original_ld_library_path, calculate ld_library path, set
LD_LIBRARY_PATH to both. Based on libjava.exp.
From-SVN: r74521
2003-12-10 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc (num_put::do_put(void*)):
Remove the try/catch, not necessary.
From-SVN: r74493
2003-12-10 Paolo Carlini <pcarlini@suse.de>
* testsuite/22_locale/locale/cons/12438.cc: Tweak memory
limit and iterations to avoid spurious failures on some
64 bit machines.
From-SVN: r74489
2003-12-09 Paolo Carlini <pcaelini@suse.de>
* include/bits/demangle.h (struct implementation_details):
Keep in comments the names of the unused parameters.
From-SVN: r74478
2003-12-09 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc (num_get::_M_extract_int):
Slightly streamline the code dealing with overflows and the
parsing of the sign.
From-SVN: r74476
2003-12-08 Paolo Carlini <pcarlini@suse.de>
* config/locale/generic/c_locale.cc (__convert_to_v(long&),
__convert_to_v(unsigned long&), __convert_to_v(long long&),
__convert_to_v(unsigned long long&): Remove.
(__convert_to_v(float&), __convert_to_v(double&),
__convert_to_v(long double&)): Remove last unused parameter.
* config/locale/gnu/c_locale.cc: Likewise.
* include/bits/locale_facets.h: Likewise.
(num_get::_M_extract_int): Update declaration.
(class __num_base): Tweak _S_ie and _S_iE according to the
_S_atoms_in changes.
* include/bits/locale_facets.tcc (num_get::_M_extract_int):
Provide directly the final _ValueT, not a string: accumulate
the result checking for overflow at each digit.
(num_get::do_get(bool&), num_get::do_get(long&),
num_get::do_get(unsigned short&), num_get::do_get(unsigned int&),
num_get::do_get(unsigned long&), num_get::do_get(long long&),
num_get::do_get(unsigned long long&), num_get::do_get(void*&)):
Use the new _M_extract_int, simplify.
* src/locale-inst.cc (num_get::_M_extract_int(long&),
num_get::_M_extract_int(unsigned short&),
num_get::_M_extract_int(unsigned int&),
num_get::_M_extract_int(unsigned long&),
num_get::_M_extract_int(long long&),
num_get::_M_extract_int(unsigned long long&): Instantiate.
* src/locale_facets.cc (__num_base::_S_atoms_in): Reorder
the chars in the natural order: abcdefABCDEF.
From-SVN: r74423
2003-12-08 David S. Miller <davem@redhat.com>
PR libstdc++/12496
* config/cpu/sparc/atomicity.h (__exchange_and_add, __atomic_add):
Extend increment to _Atomic_word before giving to assembler.
From-SVN: r74409
PR libstdc++/13045
* bits/demangle.h
namespace __gnu_cxx::demangler
(enum substitution_nt): Removed trailing comma.
(implementation_details): Added.
(session<Allocator>::M_implementation_details): Added.
(session<Allocator>::session): Pass implementation_details.
(session<Allocator>::decode_encoding): Same.
(session<Allocator>::decode_real): Added.
(_GLIBCXX_DEMANGLER_STYLE_VOID _GLIBCXX_DEMANGLER_STYLE_LITERAL
_GLIBCXX_DEMANGLER_STYLE_LITERAL_INT
_GLIBCXX_DEMANGLER_STYLE_COMPACT_EXPR_OPS
_GLIBCXX_DEMANGLER_STYLE_SIZEOF_TYPENAME): Replaced with
implementation_details equivalent.
(session<Allocator>::decode_expression):
Use M_implementation_details instead of macros. Add extra parentheses
around 'larger than' operator in expressions in template arguments.
(session<Allocator>::decode_bare_function_type): Idem.
(session<Allocator>::decode_literal):
Idem, and call decode_real for floating literals.
(session<Allocator>::decode_type_with_postfix): Put the postfix
of the return type of (member) functions after the function
instead of after the return type. Also, put a space after the
prefix of qualified function pointers: "int (* const<space>".
* src/demangle.cc: include most dependent header file first.
* testsuite/demangle/regression/cw-16.cc: Updated two
and added three tests.
From-SVN: r74304
2003-12-04 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/12653
* include/std/std_bitset.h (operator>>): Implement resolution
of DR 303 [WP]: use widen('0') and widen('1').
* docs/html/ext/howto.html: Add an entry for DR 303.
* include/std/std_bitset.h (operator>>): Implement the common
requirements of formatted input functions (27.6.1.2.1).
* include/std/std_bitset.h (operator>>): Set the failbit when
nothing was extracted and _Nb != 0.
* testsuite/23_containers/bitset/input/1.cc: New.
From-SVN: r74276
2003-12-03 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/12791
* include/bits/locale_facets.tcc (time_get::_M_extract_num):
Rewrite, stop the parsing as soon as a digit cannot possibly
lead to a final number within the bounds; otherwise, simplify,
avoiding __ctype.is() and atoi().
* testsuite/22_locale/time_get/get_date/char/12791.cc: New.
* testsuite/22_locale/time_get/get_date/wchar_t/12791.cc: New.
* include/bits/locale_facets.tcc (time_get::_M_extract_via_format):
Minor tweak: a 4-digit integer cannot be bigger than 9999.
* testsuite/22_locale/time_get/get_date/wchar_t/1.cc: Use
type-correct wchar_t string literals.
* testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc: Ditto.
* testsuite/22_locale/time_get/get_time/wchar_t/1.cc: Ditto.
* testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc: Ditto.
* testsuite/22_locale/time_get/get_year/wchar_t/1.cc: Ditto.
From-SVN: r74220
2003-12-02 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc (time_get::do_get_year):
Avoid using a basic_string and calling a full blown strtol
(via __convert_to_v) for simple 2 or 4 digits, base 10,
positive integers; simplify.
From-SVN: r74193
* config/locale/gnu/monetary_members.cc
(money_base::_S_construct_pattern): For case 3: and 4:
exchanging 'if (__precedes)' and 'if (__space)' allows
to factor out a few more assignments.
From-SVN: r74168
2003-11-30 Paolo Carlini <pcarlini@suse.de>
* config/locale/gnu/codecvt_members.cc (codecvt::do_in,
codecvt::do_length): More minor tweaks.
From-SVN: r74069
2003-11-30 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc (num_put::do_put(..., bool)):
Minor tweaks, consistent with the style used in other facets.
From-SVN: r74056
2003-11-29 Paolo Carlini <pcarlini@suse.de>
* testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc:
Tweak for a few small problems (fix timings, use VERIFY..)
From-SVN: r74034
2003-11-28 Paolo Carlini <pcarlini@suse.de>
* testsuite/27_io/basic_filebuf/imbue/char/13171-3.cc: Remove.
* testsuite/27_io/basic_filebuf/imbue/wchar_t/13171-3.cc: New,
the original third testcase for libstdc++/13171 belong here.
From-SVN: r74017