PR libstdc++/12736
* bits/demangle.h (qualifier_list<Allocator>::decode_KVrA): Added.
(qualifier_list<Allocator>::decode_qualifiers): Collect concatenated
K, V, r and A qualifiers before processing them as a group.
* testsuite/demangle/abi_text/01.cc: Reordered CV-qualifiers.
* testsuite/demangle/regression/cw-16.cc: New.
From-SVN: r73339
* include/bits/demangle.h
(qualifier_list<Allocator>::decode_qualifiers(string_type&,
string_type&, bool member_function_pointer_qualifiers):
Always seperate the '[' of an array type with a space from
what is left of it, except when that is the closing bracket
of another array dimension.
From-SVN: r73328
2003-11-04 Jeffrey D. Oldham <oldham@codesourcery.com>
* libsupc++/vec.cc (__cxa_vec_delete2): If given a NULL pointer,
immediately return. This reflects a C++ ABI change 2003 Nov 03.
(__cxa_vec_delete3): Likewise.
From-SVN: r73263
2003-11-03 Petur Runolfsson <peturr02@ru.is>
PR libstdc++/12790
* include/bits/fstream.tcc: Delete _M_last_overflowed.
(basic_filebuf::basic_filebuf): Initialize _M_state_last.
(basic_filebuf::open, basic_filebuf::close): Assign
_M_state_beg to _M_state_cur and _M_state_last.
(basic_filebuf::close): Call _M_terminate_output to handle
unshift and flushing.
(basic_filebuf::underflow): Assign _M_state_last, throw
exception instead of calling abort when codecvt::max_length()
is bad.
(basic_filebuf::seekoff): Use _M_state_last when calling
codecvt::length(), pass correct state to _M_seek.
(basic_filebuf::seekpos): Pass __pos.state() to _M_seek.
(basic_filebuf::_M_seek): Add __state_type parameter,
set _M_state_cur correctly, store the resulting state in
the return value and use _M_terminate_output to handle
flushing and unshift.
(basic_filebuf::_M_terminate_output): Flush contents of
output buffer, if any, then call codecvt::unshift as
needed and output the result.
(basic_filebuf::sync): Move here, don't modify _M_writing
or _M_reading.
* include/std/std_fstream.h
(basic_filebuf::_M_state_last): Declare it.
(basic_filebuf::_M_last_overflowed): Delete.
(basic_filebuf::_M_seek): Add __state_type parameter.
(basic_filebuf::sync): Declare only.
(basic_filebuf::_M_output_unshift): Delete.
(basic_filebuf::_M_terminate_output): Declare it.
* testsuite/testsuite_character.h:
Define character class and state class plus char_traits and
codecvt specializations for same for testing support for
stateful encodings.
* testsuite/27_io/basic_filebuf/close/12790-1.cc,
* testsuite/27_io/basic_filebuf/close/char/12790-1.cc,
* testsuite/27_io/basic_filebuf/close/char/12790-2.cc,
* testsuite/27_io/basic_filebuf/close/char/12790-3.cc,
* testsuite/27_io/basic_filebuf/close/char/12790-4.cc,
* testsuite/27_io/basic_filebuf/close/wchar_t/12790-1.cc,
* testsuite/27_io/basic_filebuf/close/wchar_t/12790-2.cc,
* testsuite/27_io/basic_filebuf/close/wchar_t/12790-3.cc,
* testsuite/27_io/basic_filebuf/close/wchar_t/12790-4.cc,
* testsuite/27_io/basic_filebuf/open/12790-1.cc,
* testsuite/27_io/basic_filebuf/seekoff/12790-1.cc,
* testsuite/27_io/basic_filebuf/seekoff/12790-2.cc,
* testsuite/27_io/basic_filebuf/seekoff/12790-3.cc,
* testsuite/27_io/basic_filebuf/seekoff/12790-4.cc,
* testsuite/27_io/basic_filebuf/seekoff/char/12790-1.cc,
* testsuite/27_io/basic_filebuf/seekoff/char/12790-2.cc,
* testsuite/27_io/basic_filebuf/seekoff/char/12790-3.cc,
* testsuite/27_io/basic_filebuf/seekoff/char/12790-4.cc,
* testsuite/27_io/basic_filebuf/seekoff/wchar_t/12790-1.cc,
* testsuite/27_io/basic_filebuf/seekoff/wchar_t/12790-2.cc,
* testsuite/27_io/basic_filebuf/seekoff/wchar_t/12790-3.cc,
* testsuite/27_io/basic_filebuf/seekoff/wchar_t/12790-4.cc,
* testsuite/27_io/basic_filebuf/seekoff/wchar_t/3.cc,
* testsuite/27_io/basic_filebuf/seekpos/12790-1.cc,
* testsuite/27_io/basic_filebuf/seekpos/12790-2.cc,
* testsuite/27_io/basic_filebuf/seekpos/12790-3.cc,
* testsuite/27_io/basic_filebuf/seekpos/char/12790-1.cc,
* testsuite/27_io/basic_filebuf/seekpos/char/12790-2.cc,
* testsuite/27_io/basic_filebuf/seekpos/char/12790-3.cc,
* testsuite/27_io/basic_filebuf/seekpos/char/12790-4.cc,
* testsuite/27_io/basic_filebuf/seekpos/wchar_t/1.cc,
* testsuite/27_io/basic_filebuf/seekpos/wchar_t/12790-1.cc,
* testsuite/27_io/basic_filebuf/seekpos/wchar_t/12790-2.cc,
* testsuite/27_io/basic_filebuf/seekpos/wchar_t/12790-3.cc,
* testsuite/27_io/basic_filebuf/seekpos/wchar_t/12790-4.cc,
* testsuite/27_io/basic_filebuf/sync/char/1.cc,
* testsuite/27_io/basic_filebuf/sync/wchar_t/1.cc:
New tests.
* testsuite/27_io/basic_filebuf/3.cc,
* testsuite/27_io/basic_filebuf/seekoff/10132-2.cc,
* testsuite/27_io/basic_filebuf/seekpos/10132-3.cc,
* testsuite/27_io/basic_fstream/3.cc,
* testsuite/27_io/basic_ifstream/3.cc,
* testsuite/27_io/basic_ofstream/3.cc:
Use streamoff as off_type and fpos<state_type> as pos_type.
* testsuite/27_io/basic_filebuf/seekpos/char/1-io.cc,
* testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc:
Check that sync does *not* set _M_writing to false.
From-SVN: r73245
2003-10-30 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc (time_get::_M_extract_via_format):
__mod is only assigned, never used its value, remove it.
From-SVN: r73081
2003-10-29 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc (num_get::_M_extract_float):
Revert the last commit, is incorrect, sorry.
From-SVN: r73042
2003-10-28 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc (time_get::_M_extract_num):
Absolutely avoid dereferencing end iterators.
(time_get::_M_extract_name): Likewise.
* include/bits/locale_facets.tcc
(time_get::_M_extract_via_format, case 'e'): Don't try to
be smart wrt returning the right __beg in case of parse
error, time_get::_M_extract_num must be fixed instead.
From-SVN: r73004
2003-10-27 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/12750
* include/bits/locale_facets.tcc
(time_get::_M_extract_via_format): Deal with code 'e'.
* testsuite/22_locale/time_get/get_date/char/12750.cc: New.
* testsuite/22_locale/time_get/get_date/wchar_t/12750.cc: Ditto.
* include/bits/locale_facets.tcc
(time_get::_M_extract_via_format): Tweak to absolutely avoid
dereferencing end iterators.
* include/bits/locale_facets.h (__verify_grouping):
Const-ify second parameter.
* include/bits/locale_facets.tcc (__verify_grouping): Ditto.
* src/locale-inst.cc (__verify_grouping): Ditto.
2003-10-27 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc (num_get::_M_extract_float):
Various things: 1- Avoid absolutely end iterator dereferences;
2- Improve performance-wise the code skipping leading zeros;
3- Fix two bugs wrt early bail out in case of parsing errors
(see testcases); 4- General clean up.
(num_get::_M_extract_int): Likewise, except 3-. Additionally,
use __builtin_expect to favor base 10 inputs.
* testsuite/22_locale/num_get/get/char/7.cc: New.
* testsuite/22_locale/num_get/get/wchar_t/7.cc: Ditto.
From-SVN: r72987
2003-10-25 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc (num_get::_M_extract_int):
__pos in only incremented, never used its value, remove it.
From-SVN: r72922
2003-10-24 Paolo Carlini <pcarlini@suse.de>
* include/bits/basic_ios.tcc (copyfmt(const basic_ios&)):
Tweak my fix for libstdc++/12657.
From-SVN: r72895
2003-10-24 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc (money_get::do_get(...,
string_type&): Minor tweak to the previous commit.
From-SVN: r72892
2003-10-24 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc (money_get::do_get(...,
string_type&): Disregard the previous commit: doesn't hurt but
doesn't accomplish anything useful either. This is the right
one, speeding up greatly the function in case of early fail.
From-SVN: r72888
2003-10-24 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc (money_get::do_get(...,
string_type&): Move an if block, thus minimizing the amount
of code processed anyway when __tmp_units.size() == 0.
From-SVN: r72887
2003-10-23 Benjamin Kosnik <bkoz@redhat.com>
* docs/html/documentation.html: Add a pointer to the doxygen style
guide.
* docs/html/17_intro/TODO: Update.
* docs/html/test.html: Add instructions for running a subset of
tests, update.
From-SVN: r72867
2003-10-23 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc (money_get<>::do_get(...,
string_type&)): Use find_first_not_of to strip leading
zeros; if __tmp_units == "0" never prefix it with '-';
always fail if __tmp_units is empty.
* testsuite/22_locale/money_get/get/char/10.cc: New.
* testsuite/22_locale/money_get/get/wchar_t/10.cc: Ditto.
From-SVN: r72860
2003-10-22 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/8610
* acinclude.m4 (GLIBCXX_CHECK_INT64_T): New macro,
checking for the availability of int64_t.
(GLIBCXX_CHECK_LFS): New macro, checking for LFS support.
* configure.ac: Call here.
* acconfig.h: Add undef for the corresponding symbols.
* config/io/basic_file_stdio.cc (__basic_file<char>::open):
Depending on _GLIBCXX_USE_LFS, call fopen64 or fopen.
(__basic_file<char>::seekoff): Likewise, call lseek64 when
available, otherwise lseek, checking the __off parameter.
* include/bits/postypes.h: Typedef __streamoff_base_type
to int64_t if available, otherwise long long.
* aclocal.m4: Regenerate.
* config.h.in: Likewise.
* configure: Likewise.
* acinclude.m4 (GLIBCXX_CHECK_POLL, GLIBCXX_CHECK_WRITEV):
Use AC_TRY_LINK instead of AC_TRY_COMPILE.
From-SVN: r72806
2003-10-22 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/12657
* include/bits/basic_ios.tcc (copyfmt(const basic_ios&)):
Implement resolution of DR 292 (WP).
* docs/html/ext/howto.html: Add entry for DR 292.
From-SVN: r72803
2003-10-18 Andreas Tobler <a.tobler@schweiz.ch>
* src/locale.cc (locale::_S_initialize): Re-apply workaround a
confusion of the use of the gthr API when __gthread_active_p()
returns true.
From-SVN: r72679
2003-10-16 Paolo Carlini <pcarlini@suse.de>
* src/locale.cc (locale::locale(const char*)): ... one
more comparison missed in the previous commit.
From-SVN: r72574
* config/cpu/m68k/atomicity.h (__exchange_and_add): Use TAS on
__mcf5400__. Don't rely on __mc68000__ to detect a bare 68000.
Document SMP safeness of asm macros.
From-SVN: r72570
2003-10-16 Paolo Carlini <pcarlini@suse.de>
* src/locale.cc (locale::locale(const char*)): Tweak
a couple of comparisons to use basic_string operators.
From-SVN: r72554
2003-10-16 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/12540
* config/locale/gnu/monetary_members.cc
(moneypunct<wchar_t, true/false>::_M_initialize_moneypunct):
Don't leak memory if new throws.
* src/locale.cc (locale::locale(const char*)): In order not
to leak memory in case new throws, use a basic_string type
for __res too and avoid strdup.
From-SVN: r72553
2003-10-14 Jeff Bailey <jbailey@nisa.net>
PR libstdc++/12562
* crossconfig.m4: Share the config between *-linux* and *-gnu*.
* configure: Regenerate.
From-SVN: r72510
2003-10-14 Paolo Carlini <pcarlini@unitus.it>
* src/localename.cc (_M_replace_categories, M_replace_facet):
Const-ify a couple of variables.
From-SVN: r72472
2003-10-14 Petur Runolfsson <peturr02@ru.is>
Andreas Tobler <a.tobler@schweiz.ch>
* src/locale.cc (locale::_S_initialize): Workaround a confusion
of the use of the gthr API when __gthread_active_p() returns true.
Co-Authored-By: Andreas Tobler <a.tobler@schweiz.ch>
From-SVN: r72458
2003-10-12 Petur Runolfsson <peturr02@ru.is>
Paolo Carlini <pcarlini@unitus.it>
PR libstdc++/11460
* src/strstream.cc (pbackfail): Fix to use to_int_type.
* testsuite/backward/11460.cc: New, from the PR.
Co-Authored-By: Paolo Carlini <pcarlini@unitus.it>
From-SVN: r72405
2003-10-12 Andreas Tobler <a.tobler@schweiz.ch>
Paolo Carlini <pcarlini@unitus.it>
PR libstdc++/11844/11740 (cont)
* config/os/generic/ctype_inline.h (ctype<char>::is):
Generically, use a bitmasksize of 15 (instead of 10);
Fix the logic to actually return (M & m) != 0 as per
22.2.1.1.2.
Co-Authored-By: Paolo Carlini <pcarlini@unitus.it>
From-SVN: r72389
2003-10-09 Benjamin Kosnik <bkoz@redhat.com>
* config/linker-map.gnu: Make more *_type_info bits visible.
Move new/delete bits back into GLIBCXX space.
* include/bits/locale_classes.h: Move _M_id out of line, so that
locale:🆔:_S_highwater can be removed from the export list.
* src/locale.cc (locale:🆔:_M_id): Define.
From-SVN: r72287