2004-04-06 Benjamin Kosnik Fixups for EDG front end. * include/ext/rope: Instead of non-existent function _Data_allocate, use allocator's allocate. Use this. (namespace _Rope_constants): Move _S_max_rope_depth, and _Tag enumerations from _Rope_RopeRep here. * include/ext/ropeimpl.h: Same. * src/ext-inst.cc (_S_min_len): Fix up definition. * config/locale/gnu/ctype_members.cc: Qualify base class members with this. * config/locale/generic/ctype_members.cc: Same. * config/locale/gnu/messages_members.h: Same. * config/locale/generic/messages_members.h: Same. * src/ctype.cc: Same. * include/bits/codecvt.h: Same. * include/bits/boost_concept_check.h: Declare. (__error_type_must_be_an_unsigned_integer_type): Remove this. (__error_type_must_be_an_integer_type): Remove this. (__error_type_must_be_a_signed_integer_type): Remove this. * config/io/basic_file_stdio.cc (__basic_file::sys_open): Remove cast. * libsupc++/eh_alloc.cc (__cxa_free_exception): Add exception specification to definition. (__cxa_allocate_exception): Same. * libsupc++/eh_catch.cc (__cxa_begin_catch): Same. * libsupc++/eh_globals.cc (__cxa_get_globals_fast): Same. (__cxa_get_globals): Same. * libsupc++/del_op.cc: Add comment about freestanding. Index: config/io/basic_file_stdio.cc =================================================================== RCS file: /cvs/gcc/gcc/libstdc++-v3/config/io/basic_file_stdio.cc,v retrieving revision 1.30 diff -c -p -r1.30 basic_file_stdio.cc *** config/io/basic_file_stdio.cc 18 Feb 2004 08:36:27 -0000 1.30 --- config/io/basic_file_stdio.cc 7 Apr 2004 03:28:43 -0000 *************** namespace std *** 202,213 **** { __basic_file* __ret = NULL; const char* __c_mode = __gnu_internal::fopen_mode(__mode); ! if (__c_mode && !this->is_open() ! && (_M_cfile = fdopen(__fd, __c_mode))) { _M_cfile_created = true; if (__fd == 0) ! setvbuf(_M_cfile, reinterpret_cast(NULL), _IONBF, 0); __ret = this; } return __ret; --- 202,213 ---- { __basic_file* __ret = NULL; const char* __c_mode = __gnu_internal::fopen_mode(__mode); ! if (__c_mode && !this->is_open() && (_M_cfile = fdopen(__fd, __c_mode))) { + char* __buf = NULL; _M_cfile_created = true; if (__fd == 0) ! setvbuf(_M_cfile, __buf, _IONBF, 0); __ret = this; } return __ret; Index: config/locale/generic/ctype_members.cc =================================================================== RCS file: /cvs/gcc/gcc/libstdc++-v3/config/locale/generic/ctype_members.cc,v retrieving revision 1.11 diff -c -p -r1.11 ctype_members.cc *** config/locale/generic/ctype_members.cc 16 Dec 2003 11:00:52 -0000 1.11 --- config/locale/generic/ctype_members.cc 7 Apr 2004 03:28:43 -0000 *************** *** 1,6 **** // std::ctype implementation details, generic version -*- C++ -*- ! // Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. // // 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 --- 1,6 ---- // std::ctype implementation details, generic version -*- C++ -*- ! // Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. // // 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 *************** namespace std *** 45,52 **** { if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) { ! _S_destroy_c_locale(_M_c_locale_ctype); ! _S_create_c_locale(_M_c_locale_ctype, __s); } } --- 45,52 ---- { if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) { ! this->_S_destroy_c_locale(this->_M_c_locale_ctype); ! this->_S_create_c_locale(this->_M_c_locale_ctype, __s); } } Index: config/locale/generic/messages_members.h =================================================================== RCS file: /cvs/gcc/gcc/libstdc++-v3/config/locale/generic/messages_members.h,v retrieving revision 1.7 diff -c -p -r1.7 messages_members.h *** config/locale/generic/messages_members.h 22 Oct 2003 18:58:30 -0000 1.7 --- config/locale/generic/messages_members.h 7 Apr 2004 03:28:43 -0000 *************** *** 1,6 **** // std::messages implementation details, generic version -*- C++ -*- ! // Copyright (C) 2001, 2003 Free Software Foundation, Inc. // // 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 --- 1,6 ---- // std::messages implementation details, generic version -*- C++ -*- ! // Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc. // // 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 *************** *** 78,84 **** { if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) { ! _S_destroy_c_locale(this->_M_c_locale_messages); ! _S_create_c_locale(this->_M_c_locale_messages, __s); } } --- 78,84 ---- { if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) { ! this->_S_destroy_c_locale(this->_M_c_locale_messages); ! this->_S_create_c_locale(this->_M_c_locale_messages, __s); } } Index: config/locale/gnu/ctype_members.cc =================================================================== RCS file: /cvs/gcc/gcc/libstdc++-v3/config/locale/gnu/ctype_members.cc,v retrieving revision 1.16 diff -c -p -r1.16 ctype_members.cc *** config/locale/gnu/ctype_members.cc 16 Dec 2003 11:00:51 -0000 1.16 --- config/locale/gnu/ctype_members.cc 7 Apr 2004 03:28:43 -0000 *************** *** 1,6 **** // std::ctype implementation details, GNU version -*- C++ -*- ! // Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. // // 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 --- 1,6 ---- // std::ctype implementation details, GNU version -*- C++ -*- ! // Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. // // 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 *************** namespace std *** 46,56 **** { if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) { ! _S_destroy_c_locale(_M_c_locale_ctype); ! _S_create_c_locale(_M_c_locale_ctype, __s); ! _M_toupper = _M_c_locale_ctype->__ctype_toupper; ! _M_tolower = _M_c_locale_ctype->__ctype_tolower; ! _M_table = _M_c_locale_ctype->__ctype_b; } } --- 46,56 ---- { if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) { ! this->_S_destroy_c_locale(this->_M_c_locale_ctype); ! this->_S_create_c_locale(this->_M_c_locale_ctype, __s); ! this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper; ! this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower; ! this->_M_table = this->_M_c_locale_ctype->__ctype_b; } } Index: config/locale/gnu/messages_members.h =================================================================== RCS file: /cvs/gcc/gcc/libstdc++-v3/config/locale/gnu/messages_members.h,v retrieving revision 1.11 diff -c -p -r1.11 messages_members.h *** config/locale/gnu/messages_members.h 22 Oct 2003 18:58:30 -0000 1.11 --- config/locale/gnu/messages_members.h 7 Apr 2004 03:28:43 -0000 *************** *** 1,6 **** // std::messages implementation details, GNU version -*- C++ -*- ! // Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. // // 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 --- 1,6 ---- // std::messages implementation details, GNU version -*- C++ -*- ! // Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. // // 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 *************** *** 108,114 **** #endif if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) { ! _S_destroy_c_locale(this->_M_c_locale_messages); ! _S_create_c_locale(this->_M_c_locale_messages, __s); } } --- 108,114 ---- #endif if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) { ! this->_S_destroy_c_locale(this->_M_c_locale_messages); ! this->_S_create_c_locale(this->_M_c_locale_messages, __s); } } Index: include/bits/boost_concept_check.h =================================================================== RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/boost_concept_check.h,v retrieving revision 1.14 diff -c -p -r1.14 boost_concept_check.h *** include/bits/boost_concept_check.h 8 Feb 2004 04:46:40 -0000 1.14 --- include/bits/boost_concept_check.h 7 Apr 2004 03:28:44 -0000 *************** inline void __function_requires() *** 36,41 **** --- 36,47 ---- void (_Concept::*__x)() _IsUnused = &_Concept::__constraints; } + // No definition: if this is referenced, there's a problem with + // the instantiating type not being one of the required integer types. + // Unfortunately, this results in a link-time error, not a compile-time error. + void __error_type_must_be_an_integer_type(); + void __error_type_must_be_an_unsigned_integer_type(); + void __error_type_must_be_a_signed_integer_type(); // ??? Should the "concept_checking*" structs begin with more than _ ? #define _GLIBCXX_CLASS_REQUIRES(_type_var, _ns, _concept) \ *************** struct _Aux_require_same<_Tp,_Tp> { type *** 88,94 **** template struct _IntegerConcept { void __constraints() { ! this->__error_type_must_be_an_integer_type(); } }; template <> struct _IntegerConcept { void __constraints() {} }; --- 94,100 ---- template struct _IntegerConcept { void __constraints() { ! __error_type_must_be_an_integer_type(); } }; template <> struct _IntegerConcept { void __constraints() {} }; *************** struct _Aux_require_same<_Tp,_Tp> { type *** 104,110 **** template struct _SignedIntegerConcept { void __constraints() { ! this->__error_type_must_be_a_signed_integer_type(); } }; template <> struct _SignedIntegerConcept { void __constraints() {} }; --- 110,116 ---- template struct _SignedIntegerConcept { void __constraints() { ! __error_type_must_be_a_signed_integer_type(); } }; template <> struct _SignedIntegerConcept { void __constraints() {} }; *************** struct _Aux_require_same<_Tp,_Tp> { type *** 115,121 **** template struct _UnsignedIntegerConcept { void __constraints() { ! this->__error_type_must_be_an_unsigned_integer_type(); } }; template <> struct _UnsignedIntegerConcept --- 121,127 ---- template struct _UnsignedIntegerConcept { void __constraints() { ! __error_type_must_be_an_unsigned_integer_type(); } }; template <> struct _UnsignedIntegerConcept Index: include/bits/codecvt.h =================================================================== RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/codecvt.h,v retrieving revision 1.27 diff -c -p -r1.27 codecvt.h *** include/bits/codecvt.h 8 Feb 2004 04:46:40 -0000 1.27 --- include/bits/codecvt.h 7 Apr 2004 03:28:44 -0000 *************** *** 459,466 **** { if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) { ! _S_destroy_c_locale(this->_M_c_locale_codecvt); ! _S_create_c_locale(this->_M_c_locale_codecvt, __s); } } --- 459,466 ---- { if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) { ! this->_S_destroy_c_locale(this->_M_c_locale_codecvt); ! this->_S_create_c_locale(this->_M_c_locale_codecvt, __s); } } Index: include/ext/rope =================================================================== RCS file: /cvs/gcc/gcc/libstdc++-v3/include/ext/rope,v retrieving revision 1.15 diff -c -p -r1.15 rope *** include/ext/rope 13 Jan 2004 11:46:50 -0000 1.15 --- include/ext/rope 7 Apr 2004 03:28:45 -0000 *************** class _Rope_char_consumer { *** 234,240 **** // First a lot of forward declarations. The standard seems to require // much stricter "declaration before use" than many of the implementations // that preceded it. ! template > class rope; template struct _Rope_RopeConcatenation; template struct _Rope_RopeLeaf; template struct _Rope_RopeFunction; --- 234,240 ---- // First a lot of forward declarations. The standard seems to require // much stricter "declaration before use" than many of the implementations // that preceded it. ! template > class rope; template struct _Rope_RopeConcatenation; template struct _Rope_RopeLeaf; template struct _Rope_RopeFunction; *************** struct _Rope_rep_base *** 459,464 **** --- 459,469 ---- # undef __ROPE_DEFINE_ALLOC }; + namespace _Rope_constants + { + enum { _S_max_rope_depth = 45 }; + enum _Tag {_S_leaf, _S_concat, _S_substringfn, _S_function}; + } template struct _Rope_RopeRep : public _Rope_rep_base<_CharT,_Alloc> *************** struct _Rope_RopeRep : public _Rope_rep_ *** 467,475 **** # endif { public: ! enum { _S_max_rope_depth = 45 }; ! enum _Tag {_S_leaf, _S_concat, _S_substringfn, _S_function}; ! _Tag _M_tag:8; bool _M_is_balanced:8; unsigned char _M_depth; __GC_CONST _CharT* _M_c_string; --- 472,478 ---- # endif { public: ! _Rope_constants::_Tag _M_tag:8; bool _M_is_balanced:8; unsigned char _M_depth; __GC_CONST _CharT* _M_c_string; *************** struct _Rope_RopeRep : public _Rope_rep_ *** 483,489 **** typedef typename _Rope_rep_base<_CharT,_Alloc>::allocator_type allocator_type; using _Rope_rep_base<_CharT,_Alloc>::get_allocator; ! _Rope_RopeRep(_Tag __t, int __d, bool __b, size_t __size, allocator_type __a) : _Rope_rep_base<_CharT,_Alloc>(__size, __a), # ifndef __GC --- 486,492 ---- typedef typename _Rope_rep_base<_CharT,_Alloc>::allocator_type allocator_type; using _Rope_rep_base<_CharT,_Alloc>::get_allocator; ! _Rope_RopeRep(_Rope_constants::_Tag __t, int __d, bool __b, size_t __size, allocator_type __a) : _Rope_rep_base<_CharT,_Alloc>(__size, __a), # ifndef __GC *************** struct _Rope_RopeLeaf : public _Rope_Rop *** 579,587 **** typedef typename _Rope_rep_base<_CharT,_Alloc>::allocator_type allocator_type; _Rope_RopeLeaf(__GC_CONST _CharT* __d, size_t __size, allocator_type __a) ! : _Rope_RopeRep<_CharT,_Alloc>(_Rope_RopeRep<_CharT,_Alloc>::_S_leaf, ! 0, true, __size, __a), ! _M_data(__d) { if (_S_is_basic_char_type((_CharT *)0)) { // already eos terminated. --- 582,588 ---- typedef typename _Rope_rep_base<_CharT,_Alloc>::allocator_type allocator_type; _Rope_RopeLeaf(__GC_CONST _CharT* __d, size_t __size, allocator_type __a) ! : _Rope_RopeRep<_CharT,_Alloc>(_Rope_constants::_S_leaf, 0, true, __size, __a), _M_data(__d) { if (_S_is_basic_char_type((_CharT *)0)) { // already eos terminated. *************** struct _Rope_RopeConcatenation : public *** 612,618 **** _Rope_RopeRep<_CharT,_Alloc>* __r, allocator_type __a) ! : _Rope_RopeRep<_CharT,_Alloc>(_Rope_RopeRep<_CharT,_Alloc>::_S_concat, std::max(__l->_M_depth, __r->_M_depth) + 1, false, __l->_M_size + __r->_M_size, __a), --- 613,619 ---- _Rope_RopeRep<_CharT,_Alloc>* __r, allocator_type __a) ! : _Rope_RopeRep<_CharT,_Alloc>(_Rope_constants::_S_concat, std::max(__l->_M_depth, __r->_M_depth) + 1, false, __l->_M_size + __r->_M_size, __a), *************** struct _Rope_RopeFunction : public _Rope *** 650,656 **** allocator_type; _Rope_RopeFunction(char_producer<_CharT>* __f, size_t __size, bool __d, allocator_type __a) ! : _Rope_RopeRep<_CharT,_Alloc>(_Rope_RopeRep<_CharT,_Alloc>::_S_function, 0, true, __size, __a) , _M_fn(__f) # ifndef __GC --- 651,657 ---- allocator_type; _Rope_RopeFunction(char_producer<_CharT>* __f, size_t __size, bool __d, allocator_type __a) ! : _Rope_RopeRep<_CharT,_Alloc>(_Rope_constants::_S_function, 0, true, __size, __a) , _M_fn(__f) # ifndef __GC *************** struct _Rope_RopeSubstring : public _Rop *** 690,704 **** virtual void operator()(size_t __start_pos, size_t __req_len, _CharT* __buffer) { switch(_M_base->_M_tag) { ! case _Rope_RopeFunction<_CharT,_Alloc>::_S_function: ! case _Rope_RopeFunction<_CharT,_Alloc>::_S_substringfn: { char_producer<_CharT>* __fn = ((_Rope_RopeFunction<_CharT,_Alloc>*)_M_base)->_M_fn; (*__fn)(__start_pos + _M_start, __req_len, __buffer); } break; ! case _Rope_RopeFunction<_CharT,_Alloc>::_S_leaf: { __GC_CONST _CharT* __s = ((_Rope_RopeLeaf<_CharT,_Alloc>*)_M_base)->_M_data; --- 691,705 ---- virtual void operator()(size_t __start_pos, size_t __req_len, _CharT* __buffer) { switch(_M_base->_M_tag) { ! case _Rope_constants::_S_function: ! case _Rope_constants::_S_substringfn: { char_producer<_CharT>* __fn = ((_Rope_RopeFunction<_CharT,_Alloc>*)_M_base)->_M_fn; (*__fn)(__start_pos + _M_start, __req_len, __buffer); } break; ! case _Rope_constants::_S_leaf: { __GC_CONST _CharT* __s = ((_Rope_RopeLeaf<_CharT,_Alloc>*)_M_base)->_M_data; *************** struct _Rope_RopeSubstring : public _Rop *** 722,728 **** # ifndef __GC _M_base->_M_ref_nonnil(); # endif ! this->_M_tag = _Rope_RopeFunction<_CharT,_Alloc>::_S_substringfn; } virtual ~_Rope_RopeSubstring() { --- 723,729 ---- # ifndef __GC _M_base->_M_ref_nonnil(); # endif ! this->_M_tag = _Rope_constants::_S_substringfn; } virtual ~_Rope_RopeSubstring() { *************** class rope : public _Rope_base<_CharT,_A *** 1426,1432 **** _CharT* __buffer); static const unsigned long ! _S_min_len[_RopeRep::_S_max_rope_depth + 1]; static bool _S_is_balanced(_RopeRep* __r) { return (__r->_M_size >= _S_min_len[__r->_M_depth]); } --- 1427,1433 ---- _CharT* __buffer); static const unsigned long ! _S_min_len[_Rope_constants::_S_max_rope_depth + 1]; static bool _S_is_balanced(_RopeRep* __r) { return (__r->_M_size >= _S_min_len[__r->_M_depth]); } *************** class rope : public _Rope_base<_CharT,_A *** 1511,1517 **** rope(_CharT __c, const allocator_type& __a = allocator_type()) : _Base(__a) { ! _CharT* __buf = _Data_allocate(_S_rounded_up_size(1)); std::_Construct(__buf, __c); try { --- 1512,1518 ---- rope(_CharT __c, const allocator_type& __a = allocator_type()) : _Base(__a) { ! _CharT* __buf = __a.allocate(_S_rounded_up_size(1)); std::_Construct(__buf, __c); try { *************** class rope : public _Rope_base<_CharT,_A *** 1664,1670 **** // is safe for multiple threads. void delete_c_str () { if (0 == this->_M_tree_ptr) return; ! if (_RopeRep::_S_leaf == this->_M_tree_ptr->_M_tag && ((_RopeLeaf*)this->_M_tree_ptr)->_M_data == this->_M_tree_ptr->_M_c_string) { // Representation shared --- 1665,1671 ---- // is safe for multiple threads. void delete_c_str () { if (0 == this->_M_tree_ptr) return; ! if (_Rope_constants::_S_leaf == this->_M_tree_ptr->_M_tag && ((_RopeLeaf*)this->_M_tree_ptr)->_M_data == this->_M_tree_ptr->_M_c_string) { // Representation shared *************** class rope : public _Rope_base<_CharT,_A *** 1711,1717 **** } size_type max_size() const { ! return _S_min_len[_RopeRep::_S_max_rope_depth-1] - 1; // Guarantees that the result can be sufficirntly // balanced. Longer ropes will probably still work, // but it's harder to make guarantees. --- 1712,1718 ---- } size_type max_size() const { ! return _S_min_len[_Rope_constants::_S_max_rope_depth - 1] - 1; // Guarantees that the result can be sufficirntly // balanced. Longer ropes will probably still work, // but it's harder to make guarantees. Index: include/ext/ropeimpl.h =================================================================== RCS file: /cvs/gcc/gcc/libstdc++-v3/include/ext/ropeimpl.h,v retrieving revision 1.26 diff -c -p -r1.26 ropeimpl.h *** include/ext/ropeimpl.h 19 Mar 2004 16:08:15 -0000 1.26 --- include/ext/ropeimpl.h 7 Apr 2004 03:28:45 -0000 *************** template *** 116,122 **** void _Rope_iterator_base<_CharT,_Alloc>::_S_setcache (_Rope_iterator_base<_CharT,_Alloc>& __x) { ! const _RopeRep* __path[_RopeRep::_S_max_rope_depth+1]; const _RopeRep* __curr_rope; int __curr_depth = -1; /* index into path */ size_t __curr_start_pos = 0; --- 116,122 ---- void _Rope_iterator_base<_CharT,_Alloc>::_S_setcache (_Rope_iterator_base<_CharT,_Alloc>& __x) { ! const _RopeRep* __path[_Rope_constants::_S_max_rope_depth + 1]; const _RopeRep* __curr_rope; int __curr_depth = -1; /* index into path */ size_t __curr_start_pos = 0; *************** template *** 351,357 **** void _Rope_RopeRep<_CharT,_Alloc>::_M_free_tree() { switch(_M_tag) { ! case _S_leaf: { _Rope_RopeLeaf<_CharT,_Alloc>* __l = (_Rope_RopeLeaf<_CharT,_Alloc>*)this; --- 351,357 ---- void _Rope_RopeRep<_CharT,_Alloc>::_M_free_tree() { switch(_M_tag) { ! case _Rope_constants::_S_leaf: { _Rope_RopeLeaf<_CharT,_Alloc>* __l = (_Rope_RopeLeaf<_CharT,_Alloc>*)this; *************** void _Rope_RopeRep<_CharT,_Alloc>::_M_fr *** 359,365 **** _L_deallocate(__l, 1); break; } ! case _S_concat: { _Rope_RopeConcatenation<_CharT,_Alloc>* __c = (_Rope_RopeConcatenation<_CharT,_Alloc>*)this; --- 359,365 ---- _L_deallocate(__l, 1); break; } ! case _Rope_constants::_S_concat: { _Rope_RopeConcatenation<_CharT,_Alloc>* __c = (_Rope_RopeConcatenation<_CharT,_Alloc>*)this; *************** void _Rope_RopeRep<_CharT,_Alloc>::_M_fr *** 368,374 **** _C_deallocate(__c, 1); break; } ! case _S_function: { _Rope_RopeFunction<_CharT,_Alloc>* __f = (_Rope_RopeFunction<_CharT,_Alloc>*)this; --- 368,374 ---- _C_deallocate(__c, 1); break; } ! case _Rope_constants::_S_function: { _Rope_RopeFunction<_CharT,_Alloc>* __f = (_Rope_RopeFunction<_CharT,_Alloc>*)this; *************** void _Rope_RopeRep<_CharT,_Alloc>::_M_fr *** 376,382 **** _F_deallocate(__f, 1); break; } ! case _S_substringfn: { _Rope_RopeSubstring<_CharT,_Alloc>* __ss = (_Rope_RopeSubstring<_CharT,_Alloc>*)this; --- 376,382 ---- _F_deallocate(__f, 1); break; } ! case _Rope_constants::_S_substringfn: { _Rope_RopeSubstring<_CharT,_Alloc>* __ss = (_Rope_RopeSubstring<_CharT,_Alloc>*)this; *************** rope<_CharT,_Alloc>::_S_leaf_concat_char *** 406,412 **** { size_t __old_len = __r->_M_size; _CharT* __new_data = (_CharT*) ! _Data_allocate(_S_rounded_up_size(__old_len + __len)); _RopeLeaf* __result; uninitialized_copy_n(__r->_M_data, __old_len, __new_data); --- 406,412 ---- { size_t __old_len = __r->_M_size; _CharT* __new_data = (_CharT*) ! __r->get_allocator().allocate(_S_rounded_up_size(__old_len + __len)); _RopeLeaf* __result; uninitialized_copy_n(__r->_M_data, __old_len, __new_data); *************** rope<_CharT,_Alloc>::_S_tree_concat (_Ro *** 467,473 **** size_t __depth = __result->_M_depth; if (__depth > 20 && (__result->_M_size < 1000 || ! __depth > _RopeRep::_S_max_rope_depth)) { _RopeRep* __balanced; --- 467,473 ---- size_t __depth = __result->_M_depth; if (__depth > 20 && (__result->_M_size < 1000 || ! __depth > _Rope_constants::_S_max_rope_depth)) { _RopeRep* __balanced; *************** rope<_CharT,_Alloc>::_RopeRep* rope<_Cha *** 504,516 **** if (0 == __r) return __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, __r->get_allocator()); ! if (_RopeRep::_S_leaf == __r->_M_tag && __r->_M_size + __slen <= _S_copy_max) { __result = _S_leaf_concat_char_iter((_RopeLeaf*)__r, __s, __slen); return __result; } ! if (_RopeRep::_S_concat == __r->_M_tag ! && _RopeRep::_S_leaf == ((_RopeConcatenation*)__r)->_M_right->_M_tag) { _RopeLeaf* __right = (_RopeLeaf* )(((_RopeConcatenation* )__r)->_M_right); if (__right->_M_size + __slen <= _S_copy_max) { --- 504,516 ---- if (0 == __r) return __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, __r->get_allocator()); ! if (_Rope_constants::_S_leaf == __r->_M_tag && __r->_M_size + __slen <= _S_copy_max) { __result = _S_leaf_concat_char_iter((_RopeLeaf*)__r, __s, __slen); return __result; } ! if (_Rope_constants::_S_concat == __r->_M_tag ! && _Rope_constants::_S_leaf == ((_RopeConcatenation*)__r)->_M_right->_M_tag) { _RopeLeaf* __right = (_RopeLeaf* )(((_RopeConcatenation* )__r)->_M_right); if (__right->_M_size + __slen <= _S_copy_max) { *************** rope<_CharT,_Alloc>::_S_destr_concat_cha *** 563,575 **** return __r; } if (__orig_size + __slen <= _S_copy_max && ! _RopeRep::_S_leaf == __r->_M_tag) { __result = _S_destr_leaf_concat_char_iter((_RopeLeaf*)__r, __s, __slen); return __result; } ! if (_RopeRep::_S_concat == __r->_M_tag) { _RopeLeaf* __right = (_RopeLeaf*)(((_RopeConcatenation*)__r)->_M_right); ! if (_RopeRep::_S_leaf == __right->_M_tag && __right->_M_size + __slen <= _S_copy_max) { _RopeRep* __new_right = _S_destr_leaf_concat_char_iter(__right, __s, __slen); --- 563,575 ---- return __r; } if (__orig_size + __slen <= _S_copy_max && ! _Rope_constants::_S_leaf == __r->_M_tag) { __result = _S_destr_leaf_concat_char_iter((_RopeLeaf*)__r, __s, __slen); return __result; } ! if (_Rope_constants::_S_concat == __r->_M_tag) { _RopeLeaf* __right = (_RopeLeaf*)(((_RopeConcatenation*)__r)->_M_right); ! if (_Rope_constants::_S_leaf == __right->_M_tag && __right->_M_size + __slen <= _S_copy_max) { _RopeRep* __new_right = _S_destr_leaf_concat_char_iter(__right, __s, __slen); *************** rope<_CharT,_Alloc>::_S_concat(_RopeRep* *** 615,629 **** __left->_M_ref_nonnil(); return __left; } ! if (_RopeRep::_S_leaf == __right->_M_tag) { ! if (_RopeRep::_S_leaf == __left->_M_tag) { if (__right->_M_size + __left->_M_size <= _S_copy_max) { return _S_leaf_concat_char_iter((_RopeLeaf*)__left, ((_RopeLeaf*)__right)->_M_data, __right->_M_size); } ! } else if (_RopeRep::_S_concat == __left->_M_tag ! && _RopeRep::_S_leaf == ((_RopeConcatenation*)__left)->_M_right->_M_tag) { _RopeLeaf* __leftright = (_RopeLeaf*)(((_RopeConcatenation*)__left)->_M_right); --- 615,629 ---- __left->_M_ref_nonnil(); return __left; } ! if (_Rope_constants::_S_leaf == __right->_M_tag) { ! if (_Rope_constants::_S_leaf == __left->_M_tag) { if (__right->_M_size + __left->_M_size <= _S_copy_max) { return _S_leaf_concat_char_iter((_RopeLeaf*)__left, ((_RopeLeaf*)__right)->_M_data, __right->_M_size); } ! } else if (_Rope_constants::_S_concat == __left->_M_tag ! && _Rope_constants::_S_leaf == ((_RopeConcatenation*)__left)->_M_right->_M_tag) { _RopeLeaf* __leftright = (_RopeLeaf*)(((_RopeConcatenation*)__left)->_M_right); *************** rope<_CharT,_Alloc>::_S_substring(_RopeR *** 748,754 **** if (__result_len > __lazy_threshold) goto lazy; __section = (_CharT*) ! _Data_allocate(_S_rounded_up_size(__result_len)); try { (*(__f->_M_fn))(__start, __result_len, __section); } --- 748,754 ---- if (__result_len > __lazy_threshold) goto lazy; __section = (_CharT*) ! __base->get_allocator().allocate(_S_rounded_up_size(__result_len)); try { (*(__f->_M_fn))(__start, __result_len, __section); } *************** bool rope<_CharT, _Alloc>::_S_apply_to_p *** 841,847 **** { if (0 == __r) return true; switch(__r->_M_tag) { ! case _RopeRep::_S_concat: { _RopeConcatenation* __conc = (_RopeConcatenation*)__r; _RopeRep* __left = __conc->_M_left; --- 841,847 ---- { if (0 == __r) return true; switch(__r->_M_tag) { ! case _Rope_constants::_S_concat: { _RopeConcatenation* __conc = (_RopeConcatenation*)__r; _RopeRep* __left = __conc->_M_left; *************** bool rope<_CharT, _Alloc>::_S_apply_to_p *** 862,874 **** } } return true; ! case _RopeRep::_S_leaf: { _RopeLeaf* __l = (_RopeLeaf*)__r; return __c(__l->_M_data + __begin, __end - __begin); } ! case _RopeRep::_S_function: ! case _RopeRep::_S_substringfn: { _RopeFunction* __f = (_RopeFunction*)__r; size_t __len = __end - __begin; --- 862,874 ---- } } return true; ! case _Rope_constants::_S_leaf: { _RopeLeaf* __l = (_RopeLeaf*)__r; return __c(__l->_M_data + __begin, __end - __begin); } ! case _Rope_constants::_S_function: ! case _Rope_constants::_S_substringfn: { _RopeFunction* __f = (_RopeFunction*)__r; size_t __len = __end - __begin; *************** rope<_CharT,_Alloc>::_S_flatten(_RopeRep *** 973,979 **** { if (0 == __r) return __buffer; switch(__r->_M_tag) { ! case _RopeRep::_S_concat: { _RopeConcatenation* __c = (_RopeConcatenation*)__r; _RopeRep* __left = __c->_M_left; --- 973,979 ---- { if (0 == __r) return __buffer; switch(__r->_M_tag) { ! case _Rope_constants::_S_concat: { _RopeConcatenation* __c = (_RopeConcatenation*)__r; _RopeRep* __left = __c->_M_left; *************** rope<_CharT,_Alloc>::_S_flatten(_RopeRep *** 981,993 **** _CharT* __rest = _S_flatten(__left, __buffer); return _S_flatten(__right, __rest); } ! case _RopeRep::_S_leaf: { _RopeLeaf* __l = (_RopeLeaf*)__r; return copy_n(__l->_M_data, __l->_M_size, __buffer).second; } ! case _RopeRep::_S_function: ! case _RopeRep::_S_substringfn: // We don't yet do anything with substring nodes. // This needs to be fixed before ropefiles will work well. { --- 981,993 ---- _CharT* __rest = _S_flatten(__left, __buffer); return _S_flatten(__right, __rest); } ! case _Rope_constants::_S_leaf: { _RopeLeaf* __l = (_RopeLeaf*)__r; return copy_n(__l->_M_data, __l->_M_size, __buffer).second; } ! case _Rope_constants::_S_function: ! case _Rope_constants::_S_substringfn: // We don't yet do anything with substring nodes. // This needs to be fixed before ropefiles will work well. { *************** rope<_CharT,_Alloc>::_S_dump(_RopeRep* _ *** 1068,1075 **** template const unsigned long ! rope<_CharT,_Alloc>::_S_min_len[ ! _Rope_RopeRep<_CharT,_Alloc>::_S_max_rope_depth + 1] = { /* 0 */1, /* 1 */2, /* 2 */3, /* 3 */5, /* 4 */8, /* 5 */13, /* 6 */21, /* 7 */34, /* 8 */55, /* 9 */89, /* 10 */144, /* 11 */233, /* 12 */377, /* 13 */610, /* 14 */987, /* 15 */1597, /* 16 */2584, /* 17 */4181, --- 1068,1074 ---- template const unsigned long ! rope<_CharT,_Alloc>::_S_min_len[_Rope_constants::_S_max_rope_depth + 1] = { /* 0 */1, /* 1 */2, /* 2 */3, /* 3 */5, /* 4 */8, /* 5 */13, /* 6 */21, /* 7 */34, /* 8 */55, /* 9 */89, /* 10 */144, /* 11 */233, /* 12 */377, /* 13 */610, /* 14 */987, /* 15 */1597, /* 16 */2584, /* 17 */4181, *************** template *** 1087,1093 **** typename rope<_CharT,_Alloc>::_RopeRep* rope<_CharT,_Alloc>::_S_balance(_RopeRep* __r) { ! _RopeRep* __forest[_RopeRep::_S_max_rope_depth + 1]; _RopeRep* __result = 0; int __i; // Invariant: --- 1086,1092 ---- typename rope<_CharT,_Alloc>::_RopeRep* rope<_CharT,_Alloc>::_S_balance(_RopeRep* __r) { ! _RopeRep* __forest[_Rope_constants::_S_max_rope_depth + 1]; _RopeRep* __result = 0; int __i; // Invariant: *************** rope<_CharT,_Alloc>::_S_balance(_RopeRep *** 1096,1106 **** // __forest[__i]._M_depth = __i // References from forest are included in refcount. ! for (__i = 0; __i <= _RopeRep::_S_max_rope_depth; ++__i) __forest[__i] = 0; try { _S_add_to_forest(__r, __forest); ! for (__i = 0; __i <= _RopeRep::_S_max_rope_depth; ++__i) if (0 != __forest[__i]) { # ifndef __GC _Self_destruct_ptr __old(__result); --- 1095,1105 ---- // __forest[__i]._M_depth = __i // References from forest are included in refcount. ! for (__i = 0; __i <= _Rope_constants::_S_max_rope_depth; ++__i) __forest[__i] = 0; try { _S_add_to_forest(__r, __forest); ! for (__i = 0; __i <= _Rope_constants::_S_max_rope_depth; ++__i) if (0 != __forest[__i]) { # ifndef __GC _Self_destruct_ptr __old(__result); *************** rope<_CharT,_Alloc>::_S_balance(_RopeRep *** 1114,1125 **** } catch(...) { ! for(__i = 0; __i <= _RopeRep::_S_max_rope_depth; __i++) _S_unref(__forest[__i]); __throw_exception_again; } ! if (__result->_M_depth > _RopeRep::_S_max_rope_depth) __throw_length_error(__N("rope::_S_balance")); return(__result); } --- 1113,1124 ---- } catch(...) { ! for(__i = 0; __i <= _Rope_constants::_S_max_rope_depth; __i++) _S_unref(__forest[__i]); __throw_exception_again; } ! if (__result->_M_depth > _Rope_constants::_S_max_rope_depth) __throw_length_error(__N("rope::_S_balance")); return(__result); } *************** rope<_CharT,_Alloc>::_S_add_leaf_to_fore *** 1179,1185 **** __forest[__i]->_M_unref_nonnil(); __forest[__i] = 0; } ! if (__i == _RopeRep::_S_max_rope_depth || __insertee->_M_size < _S_min_len[__i+1]) { __forest[__i] = __insertee; // refcount is OK since __insertee is now dead. --- 1178,1184 ---- __forest[__i]->_M_unref_nonnil(); __forest[__i] = 0; } ! if (__i == _Rope_constants::_S_max_rope_depth || __insertee->_M_size < _S_min_len[__i+1]) { __forest[__i] = __insertee; // refcount is OK since __insertee is now dead. *************** rope<_CharT,_Alloc>::_S_fetch(_RopeRep* *** 1197,1203 **** if (0 != __cstr) return __cstr[__i]; for(;;) { switch(__r->_M_tag) { ! case _RopeRep::_S_concat: { _RopeConcatenation* __c = (_RopeConcatenation*)__r; _RopeRep* __left = __c->_M_left; --- 1196,1202 ---- if (0 != __cstr) return __cstr[__i]; for(;;) { switch(__r->_M_tag) { ! case _Rope_constants::_S_concat: { _RopeConcatenation* __c = (_RopeConcatenation*)__r; _RopeRep* __left = __c->_M_left; *************** rope<_CharT,_Alloc>::_S_fetch(_RopeRep* *** 1211,1223 **** } } break; ! case _RopeRep::_S_leaf: { _RopeLeaf* __l = (_RopeLeaf*)__r; return __l->_M_data[__i]; } ! case _RopeRep::_S_function: ! case _RopeRep::_S_substringfn: { _RopeFunction* __f = (_RopeFunction*)__r; _CharT __result; --- 1210,1222 ---- } } break; ! case _Rope_constants::_S_leaf: { _RopeLeaf* __l = (_RopeLeaf*)__r; return __l->_M_data[__i]; } ! case _Rope_constants::_S_function: ! case _Rope_constants::_S_substringfn: { _RopeFunction* __f = (_RopeFunction*)__r; _CharT __result; *************** template *** 1236,1242 **** _CharT* rope<_CharT,_Alloc>::_S_fetch_ptr(_RopeRep* __r, size_type __i) { ! _RopeRep* __clrstack[_RopeRep::_S_max_rope_depth]; size_t __csptr = 0; for(;;) { --- 1235,1241 ---- _CharT* rope<_CharT,_Alloc>::_S_fetch_ptr(_RopeRep* __r, size_type __i) { ! _RopeRep* __clrstack[_Rope_constants::_S_max_rope_depth]; size_t __csptr = 0; for(;;) { *************** rope<_CharT, _Alloc>::rope(size_t __n, _ *** 1392,1398 **** if (0 == __rest) { __remainder = 0; } else { ! __rest_buffer = _Data_allocate(_S_rounded_up_size(__rest)); uninitialized_fill_n(__rest_buffer, __rest, __c); _S_cond_store_eos(__rest_buffer[__rest]); try { --- 1391,1397 ---- if (0 == __rest) { __remainder = 0; } else { ! __rest_buffer = __a.allocate(_S_rounded_up_size(__rest)); uninitialized_fill_n(__rest_buffer, __rest, __c); _S_cond_store_eos(__rest_buffer[__rest]); try { *************** rope<_CharT, _Alloc>::rope(size_t __n, _ *** 1407,1413 **** __remainder_rope._M_tree_ptr = __remainder; if (__exponent != 0) { _CharT* __base_buffer = ! _Data_allocate(_S_rounded_up_size(__exponentiate_threshold)); _RopeLeaf* __base_leaf; rope __base_rope; uninitialized_fill_n(__base_buffer, __exponentiate_threshold, __c); --- 1406,1412 ---- __remainder_rope._M_tree_ptr = __remainder; if (__exponent != 0) { _CharT* __base_buffer = ! __a.allocate(_S_rounded_up_size(__exponentiate_threshold)); _RopeLeaf* __base_leaf; rope __base_rope; uninitialized_fill_n(__base_buffer, __exponentiate_threshold, __c); *************** const _CharT* rope<_CharT,_Alloc>::c_str *** 1454,1460 **** if (0 == __result) { size_t __s = size(); ! __result = this->_Data_allocate(__s + 1); _S_flatten(this->_M_tree_ptr, __result); __result[__s] = _S_eos((_CharT*)0); this->_M_tree_ptr->_M_c_string = __result; --- 1453,1459 ---- if (0 == __result) { size_t __s = size(); ! __result = this->get_allocator().allocate(__s + 1); _S_flatten(this->_M_tree_ptr, __result); __result[__s] = _S_eos((_CharT*)0); this->_M_tree_ptr->_M_c_string = __result; *************** const _CharT* rope<_CharT,_Alloc>::repla *** 1475,1481 **** return(__old_c_string); } size_t __s = size(); ! _CharT* __result = _Data_allocate(_S_rounded_up_size(__s)); _S_flatten(this->_M_tree_ptr, __result); __result[__s] = _S_eos((_CharT*)0); this->_M_tree_ptr->_M_unref_nonnil(); --- 1474,1480 ---- return(__old_c_string); } size_t __s = size(); ! _CharT* __result = get_allocator().allocate(_S_rounded_up_size(__s)); _S_flatten(this->_M_tree_ptr, __result); __result[__s] = _S_eos((_CharT*)0); this->_M_tree_ptr->_M_unref_nonnil(); Index: libsupc++/del_op.cc =================================================================== RCS file: /cvs/gcc/gcc/libstdc++-v3/libsupc++/del_op.cc,v retrieving revision 1.3 diff -c -p -r1.3 del_op.cc *** libsupc++/del_op.cc 24 May 2003 16:22:03 -0000 1.3 --- libsupc++/del_op.cc 7 Apr 2004 03:28:45 -0000 *************** *** 30,35 **** --- 30,36 ---- #include "new" + // We can't rely on having stdlib.h if we're freestanding. extern "C" void free (void *); void Index: libsupc++/eh_alloc.cc =================================================================== RCS file: /cvs/gcc/gcc/libstdc++-v3/libsupc++/eh_alloc.cc,v retrieving revision 1.8 diff -c -p -r1.8 eh_alloc.cc *** libsupc++/eh_alloc.cc 24 May 2003 16:22:03 -0000 1.8 --- libsupc++/eh_alloc.cc 7 Apr 2004 03:28:45 -0000 *************** *** 1,5 **** // -*- C++ -*- Allocate exception objects. ! // Copyright (C) 2001 Free Software Foundation, Inc. // // This file is part of GCC. // --- 1,5 ---- // -*- C++ -*- Allocate exception objects. ! // Copyright (C) 2001, 2004 Free Software Foundation, Inc. // // This file is part of GCC. // *************** emergency_mutex_init () *** 94,100 **** extern "C" void * ! __cxa_allocate_exception(std::size_t thrown_size) { void *ret; --- 94,100 ---- extern "C" void * ! __cxa_allocate_exception(std::size_t thrown_size) throw() { void *ret; *************** __cxa_allocate_exception(std::size_t thr *** 141,147 **** extern "C" void ! __cxa_free_exception(void *vptr) { char *ptr = (char *) vptr; if (ptr >= &emergency_buffer[0][0] --- 141,147 ---- extern "C" void ! __cxa_free_exception(void *vptr) throw() { char *ptr = (char *) vptr; if (ptr >= &emergency_buffer[0][0] Index: libsupc++/eh_aux_runtime.cc =================================================================== RCS file: /cvs/gcc/gcc/libstdc++-v3/libsupc++/eh_aux_runtime.cc,v retrieving revision 1.3 diff -c -p -r1.3 eh_aux_runtime.cc *** libsupc++/eh_aux_runtime.cc 24 May 2003 16:22:03 -0000 1.3 --- libsupc++/eh_aux_runtime.cc 7 Apr 2004 03:28:45 -0000 *************** *** 34,40 **** #include "unwind-cxx.h" #include "exception_defines.h" - extern "C" void __cxa_bad_cast () { --- 34,39 ---- Index: libsupc++/eh_catch.cc =================================================================== RCS file: /cvs/gcc/gcc/libstdc++-v3/libsupc++/eh_catch.cc,v retrieving revision 1.6 diff -c -p -r1.6 eh_catch.cc *** libsupc++/eh_catch.cc 8 Feb 2004 18:01:23 -0000 1.6 --- libsupc++/eh_catch.cc 7 Apr 2004 03:28:45 -0000 *************** using namespace __cxxabiv1; *** 35,41 **** extern "C" void * ! __cxa_begin_catch (void *exc_obj_in) { _Unwind_Exception *exceptionObject = reinterpret_cast <_Unwind_Exception *>(exc_obj_in); --- 35,41 ---- extern "C" void * ! __cxa_begin_catch (void *exc_obj_in) throw() { _Unwind_Exception *exceptionObject = reinterpret_cast <_Unwind_Exception *>(exc_obj_in); Index: libsupc++/eh_globals.cc =================================================================== RCS file: /cvs/gcc/gcc/libstdc++-v3/libsupc++/eh_globals.cc,v retrieving revision 1.4 diff -c -p -r1.4 eh_globals.cc *** libsupc++/eh_globals.cc 24 May 2003 16:22:03 -0000 1.4 --- libsupc++/eh_globals.cc 7 Apr 2004 03:28:45 -0000 *************** *** 1,5 **** // -*- C++ -*- Manage the thread-local exception globals. ! // Copyright (C) 2001 Free Software Foundation, Inc. // // This file is part of GCC. // --- 1,5 ---- // -*- C++ -*- Manage the thread-local exception globals. ! // Copyright (C) 2001, 2004 Free Software Foundation, Inc. // // This file is part of GCC. // *************** get_globals_init_once () *** 69,75 **** #endif extern "C" __cxa_eh_globals * ! __cxa_get_globals_fast () { #if __GTHREADS if (use_thread_key) --- 69,75 ---- #endif extern "C" __cxa_eh_globals * ! __cxa_get_globals_fast () throw() { #if __GTHREADS if (use_thread_key) *************** __cxa_get_globals_fast () *** 82,88 **** } extern "C" __cxa_eh_globals * ! __cxa_get_globals () { #if __GTHREADS __cxa_eh_globals *g; --- 82,88 ---- } extern "C" __cxa_eh_globals * ! __cxa_get_globals () throw() { #if __GTHREADS __cxa_eh_globals *g; Index: src/codecvt.cc =================================================================== RCS file: /cvs/gcc/gcc/libstdc++-v3/src/codecvt.cc,v retrieving revision 1.19 diff -c -p -r1.19 codecvt.cc *** src/codecvt.cc 2 Oct 2003 16:56:39 -0000 1.19 --- src/codecvt.cc 7 Apr 2004 03:28:45 -0000 *************** *** 1,4 **** ! // Copyright (C) 2000, 2002 Free Software Foundation, Inc. // // 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 --- 1,4 ---- ! // Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc. // // 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 *************** namespace std *** 85,92 **** codecvt:: do_in(state_type&, const extern_type* __from, const extern_type*, const extern_type*& __from_next, ! intern_type* __to, intern_type*, ! intern_type*& __to_next) const { // _GLIBCXX_RESOLVE_LIB_DEFECTS // According to the resolution of DR19, "If returns noconv [...] --- 85,91 ---- codecvt:: do_in(state_type&, const extern_type* __from, const extern_type*, const extern_type*& __from_next, ! intern_type* __to, intern_type*, intern_type*& __to_next) const { // _GLIBCXX_RESOLVE_LIB_DEFECTS // According to the resolution of DR19, "If returns noconv [...] *************** namespace std *** 110,116 **** codecvt:: do_length (state_type&, const extern_type* __from, const extern_type* __end, size_t __max) const ! { return std::min(__max, static_cast(__end - __from)); } int codecvt:: --- 109,118 ---- codecvt:: do_length (state_type&, const extern_type* __from, const extern_type* __end, size_t __max) const ! { ! size_t __d = static_cast(__end - __from); ! return std::min(__max, __d); ! } int codecvt:: Index: src/ctype.cc =================================================================== RCS file: /cvs/gcc/gcc/libstdc++-v3/src/ctype.cc,v retrieving revision 1.7 diff -c -p -r1.7 ctype.cc *** src/ctype.cc 12 Dec 2003 19:44:15 -0000 1.7 --- src/ctype.cc 7 Apr 2004 03:28:45 -0000 *************** *** 1,4 **** ! // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free --- 1,4 ---- ! // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free *************** namespace std *** 108,116 **** { if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) { ! _S_destroy_c_locale(_M_c_locale_ctype); ! _S_create_c_locale(_M_c_locale_ctype, __s); ! _M_initialize_ctype(); } } #endif --- 108,116 ---- { if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) { ! this->_S_destroy_c_locale(this->_M_c_locale_ctype); ! this->_S_create_c_locale(this->_M_c_locale_ctype, __s); ! this->_M_initialize_ctype(); } } #endif Index: src/ext-inst.cc =================================================================== RCS file: /cvs/gcc/gcc/libstdc++-v3/src/ext-inst.cc,v retrieving revision 1.6 diff -c -p -r1.6 ext-inst.cc *** src/ext-inst.cc 5 Jul 2003 04:05:42 -0000 1.6 --- src/ext-inst.cc 7 Apr 2004 03:28:45 -0000 *************** *** 1,6 **** // Explicit instantiation file. ! // Copyright (C) 2001, 2002 Free Software Foundation, Inc. // // 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 --- 1,6 ---- // Explicit instantiation file. ! // Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. // // 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 *************** *** 34,44 **** #include #include namespace __gnu_cxx { template const unsigned long ! rope >::_S_min_len; template char --- 34,51 ---- #include #include + namespace __gnu_internal + { + const int min_len = __gnu_cxx::_Rope_constants::_S_max_rope_depth + 1; + } + namespace __gnu_cxx { + using namespace __gnu_internal; + template const unsigned long ! rope >::_S_min_len[min_len]; template char *************** namespace __gnu_cxx *** 49,56 **** #ifdef _GLIBCXX_USE_WCHAR_T template ! const unsigned long ! rope >::_S_min_len; template wchar_t --- 56,63 ---- #ifdef _GLIBCXX_USE_WCHAR_T template ! const unsigned long ! rope >::_S_min_len[min_len]; template wchar_t