diff -Nrc3pad gcc-3.4.0/gcc/cp/call.c gcc-3.4.1/gcc/cp/call.c *** gcc-3.4.0/gcc/cp/call.c 2004-03-20 00:13:07.000000000 +0000 --- gcc-3.4.1/gcc/cp/call.c 2004-06-28 10:44:10.000000000 +0000 *************** static tree direct_reference_binding (tr *** 103,114 **** static bool promoted_arithmetic_type_p (tree); static tree conditional_conversion (tree, tree); static char *name_as_c_string (tree, tree, bool *); ! static tree call_builtin_trap (tree); static tree prep_operand (tree); static void add_candidates (tree, tree, tree, bool, tree, tree, int, struct z_candidate **); static tree merge_conversion_sequences (tree, tree); static bool magic_varargs_p (tree); tree build_vfield_ref (tree datum, tree type) --- 103,116 ---- static bool promoted_arithmetic_type_p (tree); static tree conditional_conversion (tree, tree); static char *name_as_c_string (tree, tree, bool *); ! static tree call_builtin_trap (void); static tree prep_operand (tree); static void add_candidates (tree, tree, tree, bool, tree, tree, int, struct z_candidate **); static tree merge_conversion_sequences (tree, tree); static bool magic_varargs_p (tree); + static tree build_temp (tree, tree, int, void (**)(const char *, ...)); + static void check_constructor_callable (tree, tree); tree build_vfield_ref (tree datum, tree type) *************** reference_binding (tree rto, tree rfrom, *** 1052,1058 **** { conv = build1 (IDENTITY_CONV, from, expr); conv = direct_reference_binding (rto, conv); ! CHECK_COPY_CONSTRUCTOR_P (TREE_OPERAND (conv, 0)) = 1; return conv; } --- 1054,1061 ---- { conv = build1 (IDENTITY_CONV, from, expr); conv = direct_reference_binding (rto, conv); ! if (!(flags & LOOKUP_CONSTRUCTOR_CALLABLE)) ! CHECK_COPY_CONSTRUCTOR_P (TREE_OPERAND (conv, 0)) = 1; return conv; } *************** enforce_access (tree basetype_path, tree *** 3857,3862 **** --- 3860,3879 ---- return true; } + /* Check that a callable constructor to initialize a temporary of + TYPE from an EXPR exists. */ + + static void + check_constructor_callable (tree type, tree expr) + { + build_special_member_call (NULL_TREE, + complete_ctor_identifier, + build_tree_list (NULL_TREE, expr), + TYPE_BINFO (type), + LOOKUP_NORMAL | LOOKUP_ONLYCONVERTING + | LOOKUP_CONSTRUCTOR_CALLABLE); + } + /* Initialize a temporary of type TYPE with EXPR. The FLAGS are a bitwise or of LOOKUP_* values. If any errors are warnings are generated, set *DIAGNOSTIC_FN to "error" or "warning", *************** build_temp (tree expr, tree type, int fl *** 3868,3876 **** void (**diagnostic_fn)(const char *, ...)) { int savew, savee; ! savew = warningcount, savee = errorcount; ! expr = build_special_member_call (NULL_TREE, complete_ctor_identifier, build_tree_list (NULL_TREE, expr), TYPE_BINFO (type), --- 3885,3893 ---- void (**diagnostic_fn)(const char *, ...)) { int savew, savee; ! savew = warningcount, savee = errorcount; ! expr = build_special_member_call (NULL_TREE, complete_ctor_identifier, build_tree_list (NULL_TREE, expr), TYPE_BINFO (type), *************** convert_like_real (tree convs, tree expr *** 4003,4015 **** && TREE_CODE (TREE_TYPE (expr)) != ARRAY_TYPE) expr = decl_constant_value (expr); if (CHECK_COPY_CONSTRUCTOR_P (convs)) ! /* Generate a temporary copy purely to generate the required ! diagnostics. */ ! build_temp ! (build_dummy_object ! (build_qualified_type (totype, TYPE_QUAL_CONST)), ! totype, LOOKUP_NORMAL|LOOKUP_ONLYCONVERTING, &diagnostic_fn); ! return expr; case AMBIG_CONV: /* Call build_user_type_conversion again for the error. */ return build_user_type_conversion --- 4020,4028 ---- && TREE_CODE (TREE_TYPE (expr)) != ARRAY_TYPE) expr = decl_constant_value (expr); if (CHECK_COPY_CONSTRUCTOR_P (convs)) ! check_constructor_callable (totype, expr); ! ! return expr; case AMBIG_CONV: /* Call build_user_type_conversion again for the error. */ return build_user_type_conversion *************** convert_like_real (tree convs, tree expr *** 4037,4048 **** /* We are going to bind a reference directly to a base-class subobject of EXPR. */ if (CHECK_COPY_CONSTRUCTOR_P (convs)) ! /* Generate a temporary copy purely to generate the required ! diagnostics. */ ! build_temp (build_dummy_object (TREE_TYPE (expr)), ! TREE_TYPE (expr), ! LOOKUP_NORMAL|LOOKUP_ONLYCONVERTING, ! &diagnostic_fn); /* Build an expression for `*((base*) &expr)'. */ expr = build_unary_op (ADDR_EXPR, expr, 0); expr = perform_implicit_conversion (build_pointer_type (totype), --- 4050,4056 ---- /* We are going to bind a reference directly to a base-class subobject of EXPR. */ if (CHECK_COPY_CONSTRUCTOR_P (convs)) ! check_constructor_callable (TREE_TYPE (expr), expr); /* Build an expression for `*((base*) &expr)'. */ expr = build_unary_op (ADDR_EXPR, expr, 0); expr = perform_implicit_conversion (build_pointer_type (totype), *************** convert_like_real (tree convs, tree expr *** 4118,4135 **** LOOKUP_NORMAL|LOOKUP_NO_CONVERSION); } ! /* Build a call to __builtin_trap which can be used as an expression of ! type TYPE. */ static tree ! call_builtin_trap (tree type) { tree fn = IDENTIFIER_GLOBAL_VALUE (get_identifier ("__builtin_trap")); my_friendly_assert (fn != NULL, 20030927); fn = build_call (fn, NULL_TREE); - fn = build (COMPOUND_EXPR, type, fn, error_mark_node); - fn = force_target_expr (type, fn); return fn; } --- 4126,4140 ---- LOOKUP_NORMAL|LOOKUP_NO_CONVERSION); } ! /* Build a call to __builtin_trap. */ static tree ! call_builtin_trap (void) { tree fn = IDENTIFIER_GLOBAL_VALUE (get_identifier ("__builtin_trap")); my_friendly_assert (fn != NULL, 20030927); fn = build_call (fn, NULL_TREE); return fn; } *************** convert_arg_to_ellipsis (tree arg) *** 4172,4178 **** if (!skip_evaluation) warning ("cannot pass objects of non-POD type `%#T' through `...'; " "call will abort at runtime", TREE_TYPE (arg)); ! arg = call_builtin_trap (TREE_TYPE (arg)); } return arg; --- 4177,4185 ---- if (!skip_evaluation) warning ("cannot pass objects of non-POD type `%#T' through `...'; " "call will abort at runtime", TREE_TYPE (arg)); ! arg = call_builtin_trap (); ! arg = build (COMPOUND_EXPR, integer_type_node, arg, ! integer_zero_node); } return arg; *************** build_x_va_arg (tree expr, tree type) *** 4197,4203 **** warning ("cannot receive objects of non-POD type `%#T' through `...'; \ call will abort at runtime", type); ! return call_builtin_trap (type); } return build_va_arg (expr, type); --- 4204,4214 ---- warning ("cannot receive objects of non-POD type `%#T' through `...'; \ call will abort at runtime", type); ! expr = convert (build_pointer_type (type), null_node); ! expr = build (COMPOUND_EXPR, TREE_TYPE (expr), ! call_builtin_trap (), expr); ! expr = build_indirect_ref (expr, NULL); ! return expr; } return build_va_arg (expr, type); *************** build_over_call (struct z_candidate *can *** 4353,4358 **** --- 4364,4371 ---- tree return_type; return_type = TREE_TYPE (TREE_TYPE (fn)); expr = build (CALL_EXPR, return_type, fn, args); + if (TREE_THIS_VOLATILE (fn) && cfun) + current_function_returns_abnormally = 1; if (!VOID_TYPE_P (return_type)) require_complete_type (return_type); return convert_from_reference (expr); *************** initialize_reference (tree type, tree ex *** 6156,6169 **** remember that the conversion was required. */ if (TREE_CODE (conv) == BASE_CONV && !NEED_TEMPORARY_P (conv)) { - void (*diagnostic_fn) (const char *, ...); if (CHECK_COPY_CONSTRUCTOR_P (conv)) ! /* Generate a temporary copy purely to generate the required ! diagnostics. */ ! build_temp (build_dummy_object (TREE_TYPE (expr)), ! TREE_TYPE (expr), ! LOOKUP_NORMAL|LOOKUP_ONLYCONVERTING, ! &diagnostic_fn); base_conv_type = TREE_TYPE (conv); conv = TREE_OPERAND (conv, 0); } --- 6169,6176 ---- remember that the conversion was required. */ if (TREE_CODE (conv) == BASE_CONV && !NEED_TEMPORARY_P (conv)) { if (CHECK_COPY_CONSTRUCTOR_P (conv)) ! check_constructor_callable (TREE_TYPE (expr), expr); base_conv_type = TREE_TYPE (conv); conv = TREE_OPERAND (conv, 0); } diff -Nrc3pad gcc-3.4.0/gcc/cp/ChangeLog gcc-3.4.1/gcc/cp/ChangeLog *** gcc-3.4.0/gcc/cp/ChangeLog 2004-04-19 01:58:35.000000000 +0000 --- gcc-3.4.1/gcc/cp/ChangeLog 2004-07-01 18:49:01.000000000 +0000 *************** *** 1,3 **** --- 1,269 ---- + 2004-07-01 Release Manager + + * GCC 3.4.1 released. + + 2004-06-28 Nathan Sidwell + + PR C++/16174 + * call.c (build_temp): Declare. + (check_constructor_callable): New. + (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for + CONSTRUCTOR_CALLABLE. + (convert_like_real, initialize_reference): Use + check_constructor_callable. + * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New. + (LOOKUP_*): Renumber. + + 2004-06-25 Jan Hubicka + + PR C++/14865 + * decl2.c (maybe_emit_vtables): Always import_export_vtable for the + reachability analysis. + + 2004-06-22 Jan Hubicka + + PR C++/14950 + * pt.c (instantiate_decl): Clean TI_PENDING_TEMPLATE_FLAG before + expanding the function. + + 2004-06-21 Nathan Sidwell + + PR c++/3518 + * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer + level. + + PR c++/14007 + * pt.c (check_cv_quals_for_unify): Correct logic for disallowed + cv-qualifier unification. + * tree.c (cp_build_qualified_type_real): Renable DR295 logic. + + 2004-06-15 Giovanni Bajo + + PR c++/15967 + * search.c (build_new_1): Robustify. + + 2004-06-14 Giovanni Bajo + + PR c++/15947 + * parser.c (cp_parser_template_name): Ctors/dtors never need a + template keyword to disambiguate. + + 2004-06-14 Mark Mitchell + + PR c++/15096 + * decl.c (grokdeclarator): Ignore pointer-to-members when + computing template depth. + + PR c++/14930 + * name-lookup.c (pushtag): Do not try to put class declarations in + explicit specialization scopes. + + i2004-06-11 Mark Mitchell + + PR c++/15862 + * name-lookup.c (unqualified_namespace_lookup): Do not ignore type + bindings for undeclared built-ins. + + 2004-06-10 Jason Merrill + + PR c++/15875 + Revert: + 2004-06-01 Kriang Lerdsuwanakij + * init.c (build_offset_ref): Build SCOPE_REF with non-null + TREE_TYPE for non-dependent names. + * pt.c (type_dependent_expression_p): Handle SCOPE_REF with + unknown_type_node as its TREE_TYPE. + * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK. + * error.c (dump_decl) : Use pp_expression. + (dump_expr) : Likewise. + + 2004-06-10 Mark Mitchell + + PR c++/15227 + * parser.c (cp_parser_direct_declarator): Robustify. + + PR c++/15877 + * pt.c (tsubst_copy): Use decl_constant_value on enumeration + constants in non-dependent contexts. + + PR c++/14211 + PR c++/15076 + * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when + necessary. + + 2004-06-09 Mark Mitchell + + Revert: + PR c++/15815 + 2004-06-07 Mark Mitchell + * lex.c (handle_pragma_interface): Deprecate. + (handle_pragma_implementation): Likewise. + + 2004-06-07 Dan Kegel + + PR c++/14808 + * method.c (make_alias_for_thunk, use_thunk): Use TARGET_IS_PE_COFF + instead of __CYWGIN__ and __MINGW32__. + + 2004-06-07 Mark Mitchell + + PR c++/15815 + * lex.c (handle_pragma_interface): Deprecate. + (handle_pragma_implementation): Likewise. + + PR c++/15766 + * parser.c (cp_parser_iteration_statement): Fix typo in error + message. + + PR c++/14777 + * pt.c (tsubst_default_argument): Do not defer access checks + while substituting into the default argument. + + PR c++/15554 + * pt.c (tsubst_copy): Do not try to substitute for an enumeration + constant in a non-dependent context. + + PR c++/15057 + * except.c (build_throw): Ensure that temp_expr has been + initialized. + + 2004-06-06 Giovanni Bajo + + PR c++/15503 + * parser.c (cp_parser_mem_initializer_id): Gracefully reject + 'typename', and accept 'template'. + + 2004-06-01 Jason Merrill + + PR c++/15142 + * call.c (call_builtin_trap): Remove type parm. + (convert_arg_to_ellipsis): Change a non-POD argument to integer type. + (build_x_va_arg): Dereference a null pointer for a non-POD argument. + + 2004-06-01 Kriang Lerdsuwanakij + + PR c++/13092 + * init.c (build_offset_ref): Build SCOPE_REF with non-null + TREE_TYPE for non-dependent names. + * pt.c (type_dependent_expression_p): Handle SCOPE_REF with + unknown_type_node as its TREE_TYPE. + * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK. + * error.c (dump_decl) : Use pp_expression. + (dump_expr) : Likewise. + + 2004-06-01 Giovanni Bajo + + PR c++/14932 + * parser.c (cp_parser_postfix_expression): Allow subscript + operator in offsetof. + + 2004-05-31 Mark Mitchell + + PR c++/15701 + * friend.c (add_friend): Do not try to perform access checks for + functions from dependent classes. + + PR c++/15742 + * call.c (build_over_call): Set + current_function_returns_abnormally even in template functions. + + PR c++/15696 + * cp-tree.h (invalid_nonstatic_memfn_p): New function. + * cvt.c (convert_to_void): Use it. + * typeck.c (invalid_nonstatic_memfn_p): New function. + (decay_conversion): Use it. + + PR c++/15625 + * pt.c (tsubst_decl): Set DECL_FRIEND_CONTEXT for instantiated + templates. + + PR c++/15629 + * name-lookup.c (arg_assoc_class): Do not find template + specializations. + + PR c++/15209 + * tree.c (lvalue_p_1): Only consider the right-hand side of "." + expressions when determining whether or not an express is packed. + + 2004-05-28 Mark Mitchell + + PR c++/15083 + * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR, + even in a templat.e + * init.c (build_new): Likewise. + + PR c++/15640 + * name-lookup.c (arg_assoc): Robustify. + + PR c++/15471 + * typeck.c (unary_complex_lvalue): Use context_for_name_lookup + when determining the scope to use for a pointer to member. + (lookup_anon_field): Give it external linkage. + * cp-tree.h (lookup_anon_field): Declare it. + * expr.c (cplus_expand_constant): Use it. + + PR c++/14668 + * parser.c (cp_parser_simple_type_specifier): Call + maybe_note_name_used_in_class. + + 2004-05-23 Mark Mitchell + + PR c++/15044 + * parser.c (cp_parser_class_head): Robustify. + + PR c++/15317 + * parser.c (cp_parser_decl_specifier_seq): Correct error in + comment. + (cp_parser_constructor_declarator_p): Treat attributes + as decl-specifiers. + + PR c++/15329 + * typeck.c (build_unary_op): Do not attempt to resolve casts to + base classes in templates. + + PR c++/15165 + * pt.c (instantiate_template): Robustify. + + PR c++/15025 + * decl.c (xref_tag): Issue errors about redeclaring template + classes as non-template classes. + + PR c++/14821 + * name-lookup.c (supplement_binding): Allow redefinitions of + namespace aliases. + + PR c++/14883 + * parser.c (cp_parser_template_argument): Robustify. + + 2004-05-22 Mark Mitchell + + PR c++/15285 + PR c++/15299 + * pt.c (build_non_dependent_expr): Expand the set of tree nodes + recognized as overloaded functions. + + PR c++/15507 + * class.c (layout_nonempty_base_or_field): Do not try to avoid + layout conflicts for unions. + + PR c++/15542 + * typeck.c (build_x_unary_op): Instantiate template class + specializations before looking for "operator &". + + PR c++/15427 + * typeck.c (complete_type): Layout non-dependent array types, even + in templates. + + PR c++/15287 + * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a + template. + + 2004-04-23 Giovanni Bajo + + PR c++/15064 + * parser.c (cp_parser_postfix_expression): typeid operator cannot be + used in integral constant expressions. + 2004-04-18 Release Manager * GCC 3.4.0 released. diff -Nrc3pad gcc-3.4.0/gcc/cp/class.c gcc-3.4.1/gcc/cp/class.c *** gcc-3.4.0/gcc/cp/class.c 2004-03-09 07:27:23.000000000 +0000 --- gcc-3.4.1/gcc/cp/class.c 2004-05-22 19:16:48.000000000 +0000 *************** layout_nonempty_base_or_field (record_la *** 3423,3436 **** /* Place this field. */ place_field (rli, decl); offset = byte_position (decl); ! /* We have to check to see whether or not there is already something of the same type at the offset we're about to use. ! For example: ! struct S {}; ! struct T : public S { int i; }; ! struct U : public S, public T {}; Here, we put S at offset zero in U. Then, we can't put T at offset zero -- its S component would be at the same address --- 3423,3436 ---- /* Place this field. */ place_field (rli, decl); offset = byte_position (decl); ! /* We have to check to see whether or not there is already something of the same type at the offset we're about to use. ! For example, consider: ! struct S {}; ! struct T : public S { int i; }; ! struct U : public S, public T {}; Here, we put S at offset zero in U. Then, we can't put T at offset zero -- its S component would be at the same address *************** layout_nonempty_base_or_field (record_la *** 3439,3444 **** --- 3439,3448 ---- empty class, have nonzero size, any overlap can happen only with a direct or indirect base-class -- it can't happen with a data member. */ + /* In a union, overlap is permitted; all members are placed at + offset zero. */ + if (TREE_CODE (rli->t) == UNION_TYPE) + break; /* G++ 3.2 did not check for overlaps when placing a non-empty virtual base. */ if (!abi_version_at_least (2) && binfo && TREE_VIA_VIRTUAL (binfo)) diff -Nrc3pad gcc-3.4.0/gcc/cp/cp-tree.h gcc-3.4.1/gcc/cp/cp-tree.h *** gcc-3.4.0/gcc/cp/cp-tree.h 2004-03-20 00:13:08.000000000 +0000 --- gcc-3.4.1/gcc/cp/cp-tree.h 2004-06-28 10:44:10.000000000 +0000 *************** enum overload_flags { NO_SPECIAL = 0, DT *** 3332,3351 **** LOOKUP_PREFER_NAMESPACES means not to accept objects, and possibly types. LOOKUP_PREFER_BOTH means class-or-namespace-name. */ ! #define LOOKUP_PROTECT (1) ! #define LOOKUP_COMPLAIN (2) ! #define LOOKUP_NORMAL (3) ! #define LOOKUP_NONVIRTUAL (8) ! #define LOOKUP_GLOBAL (16) ! #define LOOKUP_SPECULATIVELY (64) ! #define LOOKUP_ONLYCONVERTING (128) ! #define DIRECT_BIND (256) ! #define LOOKUP_NO_CONVERSION (512) ! #define LOOKUP_DESTRUCTOR (512) ! #define LOOKUP_NO_TEMP_BIND (1024) ! #define LOOKUP_PREFER_TYPES (2048) ! #define LOOKUP_PREFER_NAMESPACES (4096) ! #define LOOKUP_PREFER_BOTH (6144) #define LOOKUP_NAMESPACES_ONLY(F) \ (((F) & LOOKUP_PREFER_NAMESPACES) && !((F) & LOOKUP_PREFER_TYPES)) --- 3332,3352 ---- LOOKUP_PREFER_NAMESPACES means not to accept objects, and possibly types. LOOKUP_PREFER_BOTH means class-or-namespace-name. */ ! #define LOOKUP_PROTECT (1 << 0) ! #define LOOKUP_COMPLAIN (1 << 1) ! #define LOOKUP_NORMAL (LOOKUP_PROTECT | LOOKUP_COMPLAIN) ! #define LOOKUP_NONVIRTUAL (1 << 2) ! #define LOOKUP_GLOBAL (1 << 3) ! #define LOOKUP_SPECULATIVELY (1 << 4) ! #define LOOKUP_ONLYCONVERTING (1 << 5) ! #define DIRECT_BIND (1 << 6) ! #define LOOKUP_NO_CONVERSION (1 << 7) ! #define LOOKUP_DESTRUCTOR (1 << 8) ! #define LOOKUP_NO_TEMP_BIND (1 << 9) ! #define LOOKUP_PREFER_TYPES (1 << 10) ! #define LOOKUP_PREFER_NAMESPACES (1 << 11) ! #define LOOKUP_PREFER_BOTH (LOOKUP_PREFER_TYPES | LOOKUP_PREFER_NAMESPACES) ! #define LOOKUP_CONSTRUCTOR_CALLABLE (1 << 12) #define LOOKUP_NAMESPACES_ONLY(F) \ (((F) & LOOKUP_PREFER_NAMESPACES) && !((F) & LOOKUP_PREFER_TYPES)) *************** extern tree build_ptrmemfunc_access_expr *** 4247,4252 **** --- 4248,4255 ---- extern tree build_address (tree); extern tree build_nop (tree, tree); extern tree non_reference (tree); + extern tree lookup_anon_field (tree, tree); + extern bool invalid_nonstatic_memfn_p (tree); /* in typeck2.c */ extern void require_complete_eh_spec_types (tree, tree); diff -Nrc3pad gcc-3.4.0/gcc/cp/cvt.c gcc-3.4.1/gcc/cp/cvt.c *** gcc-3.4.0/gcc/cp/cvt.c 2004-02-23 12:46:37.000000000 +0000 --- gcc-3.4.1/gcc/cp/cvt.c 2004-05-31 21:04:10.000000000 +0000 *************** convert_to_void (tree expr, const char * *** 791,796 **** --- 791,798 ---- return error_mark_node; if (!TREE_TYPE (expr)) return expr; + if (invalid_nonstatic_memfn_p (expr)) + return error_mark_node; if (VOID_TYPE_P (TREE_TYPE (expr))) return expr; switch (TREE_CODE (expr)) diff -Nrc3pad gcc-3.4.0/gcc/cp/decl2.c gcc-3.4.1/gcc/cp/decl2.c *** gcc-3.4.0/gcc/cp/decl2.c 2004-04-08 13:37:10.000000000 +0000 --- gcc-3.4.1/gcc/cp/decl2.c 2004-06-25 21:58:54.000000000 +0000 *************** delete_sanity (tree exp, tree size, bool *** 449,454 **** --- 449,455 ---- t = build_min (DELETE_EXPR, void_type_node, exp, size); DELETE_EXPR_USE_GLOBAL (t) = use_global_delete; DELETE_EXPR_USE_VEC (t) = doing_vec; + TREE_SIDE_EFFECTS (t) = 1; return t; } *************** maybe_emit_vtables (tree ctype) *** 1565,1576 **** return false; import_export_class (ctype); - import_export_vtable (primary_vtbl, ctype, 1); /* See if any of the vtables are needed. */ for (vtbl = CLASSTYPE_VTABLES (ctype); vtbl; vtbl = TREE_CHAIN (vtbl)) ! if (!DECL_EXTERNAL (vtbl) && DECL_NEEDED_P (vtbl)) ! break; if (!vtbl) { /* If the references to this class' vtables are optimized away, --- 1566,1579 ---- return false; import_export_class (ctype); /* See if any of the vtables are needed. */ for (vtbl = CLASSTYPE_VTABLES (ctype); vtbl; vtbl = TREE_CHAIN (vtbl)) ! { ! import_export_vtable (vtbl, ctype, 1); ! if (!DECL_EXTERNAL (vtbl) && DECL_NEEDED_P (vtbl)) ! break; ! } if (!vtbl) { /* If the references to this class' vtables are optimized away, diff -Nrc3pad gcc-3.4.0/gcc/cp/decl.c gcc-3.4.1/gcc/cp/decl.c *** gcc-3.4.0/gcc/cp/decl.c 2004-04-01 20:47:21.000000000 +0000 --- gcc-3.4.1/gcc/cp/decl.c 2004-06-14 15:52:24.000000000 +0000 *************** grokdeclarator (tree declarator, *** 7612,7638 **** ctype = TREE_OPERAND (declarator, 0); t = ctype; ! while (t != NULL_TREE && CLASS_TYPE_P (t)) ! { ! /* You're supposed to have one `template <...>' ! for every template class, but you don't need one ! for a full specialization. For example: ! template struct S{}; template <> struct S { void f(); }; void S::f () {} ! ! is correct; there shouldn't be a `template <>' for ! the definition of `S::f'. */ ! if (CLASSTYPE_TEMPLATE_INFO (t) ! && (CLASSTYPE_TEMPLATE_INSTANTIATION (t) ! || uses_template_parms (CLASSTYPE_TI_ARGS (t))) ! && PRIMARY_TEMPLATE_P (CLASSTYPE_TI_TEMPLATE (t))) ! template_count += 1; ! ! t = TYPE_MAIN_DECL (t); ! t = DECL_CONTEXT (t); ! } if (sname == NULL_TREE) goto done_scoping; --- 7612,7639 ---- ctype = TREE_OPERAND (declarator, 0); t = ctype; ! if (TREE_CODE (TREE_OPERAND (declarator, 1)) != INDIRECT_REF) ! while (t != NULL_TREE && CLASS_TYPE_P (t)) ! { ! /* You're supposed to have one `template <...>' ! for every template class, but you don't need one ! for a full specialization. For example: ! template struct S{}; template <> struct S { void f(); }; void S::f () {} ! ! is correct; there shouldn't be a `template <>' for ! the definition of `S::f'. */ ! if (CLASSTYPE_TEMPLATE_INFO (t) ! && (CLASSTYPE_TEMPLATE_INSTANTIATION (t) ! || uses_template_parms (CLASSTYPE_TI_ARGS (t))) ! && PRIMARY_TEMPLATE_P (CLASSTYPE_TI_TEMPLATE (t))) ! template_count += 1; ! ! t = TYPE_MAIN_DECL (t); ! t = DECL_CONTEXT (t); ! } if (sname == NULL_TREE) goto done_scoping; *************** xref_tag (enum tag_types tag_code, tree *** 9463,9468 **** --- 9464,9476 ---- { if (!globalize && processing_template_decl && IS_AGGR_TYPE (t)) redeclare_class_template (t, current_template_parms); + else if (!processing_template_decl + && CLASS_TYPE_P (t) + && CLASSTYPE_IS_TEMPLATE (t)) + { + error ("redeclaration of `%T' as a non-template", t); + t = error_mark_node; + } } POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, t); diff -Nrc3pad gcc-3.4.0/gcc/cp/except.c gcc-3.4.1/gcc/cp/except.c *** gcc-3.4.0/gcc/cp/except.c 2004-03-10 21:04:13.000000000 +0000 --- gcc-3.4.1/gcc/cp/except.c 2004-06-07 15:52:15.000000000 +0000 *************** build_throw (tree exp) *** 684,689 **** --- 684,690 ---- because it will only return false in cases where elided is true, and therefore we don't need to work around the failure to preevaluate. */ + temp_expr = NULL_TREE; stabilize_init (exp, &temp_expr); if (elided) diff -Nrc3pad gcc-3.4.0/gcc/cp/expr.c gcc-3.4.1/gcc/cp/expr.c *** gcc-3.4.0/gcc/cp/expr.c 2004-01-25 02:52:31.000000000 +0000 --- gcc-3.4.1/gcc/cp/expr.c 2004-05-28 23:33:35.000000000 +0000 *************** cplus_expand_constant (tree cst) *** 51,58 **** member = PTRMEM_CST_MEMBER (cst); if (TREE_CODE (member) == FIELD_DECL) ! /* Find the offset for the field. */ ! cst = fold (build_nop (type, byte_position (member))); else { tree delta; --- 51,71 ---- member = PTRMEM_CST_MEMBER (cst); if (TREE_CODE (member) == FIELD_DECL) ! { ! /* Find the offset for the field. */ ! cst = byte_position (member); ! while (!same_type_p (DECL_CONTEXT (member), ! TYPE_PTRMEM_CLASS_TYPE (type))) ! { ! /* The MEMBER must have been nestled within an ! anonymous aggregate contained in TYPE. Find the ! anonymous aggregate. */ ! member = lookup_anon_field (TYPE_PTRMEM_CLASS_TYPE (type), ! DECL_CONTEXT (member)); ! cst = size_binop (PLUS_EXPR, cst, byte_position (member)); ! } ! cst = fold (build_nop (type, cst)); ! } else { tree delta; diff -Nrc3pad gcc-3.4.0/gcc/cp/friend.c gcc-3.4.1/gcc/cp/friend.c *** gcc-3.4.0/gcc/cp/friend.c 2004-03-20 00:13:14.000000000 +0000 --- gcc-3.4.1/gcc/cp/friend.c 2004-05-31 22:47:15.000000000 +0000 *************** add_friend (tree type, tree decl, bool c *** 164,170 **** } if (DECL_CLASS_SCOPE_P (decl)) ! perform_or_defer_access_check (TYPE_BINFO (DECL_CONTEXT (decl)), decl); maybe_add_class_template_decl_list (type, decl, /*friend_p=*/1); --- 164,174 ---- } if (DECL_CLASS_SCOPE_P (decl)) ! { ! tree class_binfo = TYPE_BINFO (DECL_CONTEXT (decl)); ! if (!uses_template_parms (BINFO_TYPE (class_binfo))) ! perform_or_defer_access_check (class_binfo, decl); ! } maybe_add_class_template_decl_list (type, decl, /*friend_p=*/1); diff -Nrc3pad gcc-3.4.0/gcc/cp/init.c gcc-3.4.1/gcc/cp/init.c *** gcc-3.4.0/gcc/cp/init.c 2004-03-10 21:04:13.000000000 +0000 --- gcc-3.4.1/gcc/cp/init.c 2004-06-15 03:14:13.000000000 +0000 *************** build_new (tree placement, tree decl, tr *** 1797,1802 **** --- 1797,1803 ---- rval = build_min (NEW_EXPR, build_pointer_type (type), placement, t, init); NEW_EXPR_USE_GLOBAL (rval) = use_global_new; + TREE_SIDE_EFFECTS (rval) = 1; return rval; } *************** build_new_1 (tree exp) *** 2068,2073 **** --- 2069,2083 ---- args = tree_cons (NULL_TREE, size, placement); /* Do name-lookup to find the appropriate operator. */ fns = lookup_fnfields (true_type, fnname, /*protect=*/2); + if (!fns) + { + /* See PR 15967. This should never happen (and it is + fixed correctly in mainline), but on the release branch + we prefer this less-intrusive approacch. */ + error ("no suitable or ambiguous `%D' found in class `%T'", + fnname, true_type); + return error_mark_node; + } if (TREE_CODE (fns) == TREE_LIST) { error ("request for member `%D' is ambiguous", fnname); *************** build_delete (tree type, tree addr, spec *** 2885,2892 **** warning ("possible problem detected in invocation of " "delete operator:"); cxx_incomplete_type_diagnostic (addr, type, 1); ! inform ("neither the destructor nor the class-specific " ! "operator delete will be called, even if they are " "declared when the class is defined."); complete_p = false; } --- 2895,2902 ---- warning ("possible problem detected in invocation of " "delete operator:"); cxx_incomplete_type_diagnostic (addr, type, 1); ! inform ("neither the destructor nor the class-specific " ! "operator delete will be called, even if they are " "declared when the class is defined."); complete_p = false; } diff -Nrc3pad gcc-3.4.0/gcc/cp/method.c gcc-3.4.1/gcc/cp/method.c *** gcc-3.4.0/gcc/cp/method.c 2004-04-08 22:15:58.000000000 +0000 --- gcc-3.4.1/gcc/cp/method.c 2004-06-08 06:30:32.000000000 +0000 *************** make_alias_for_thunk (tree function) *** 286,292 **** tree alias; char buf[256]; ! #if defined (__CYGWIN__) || defined (__MINGW32__) if (DECL_ONE_ONLY (function)) return function; #endif --- 286,292 ---- tree alias; char buf[256]; ! #if defined (TARGET_IS_PE_COFF) if (DECL_ONE_ONLY (function)) return function; #endif *************** use_thunk (tree thunk_fndecl, bool emit_ *** 404,410 **** push_to_top_level (); #if defined (ASM_OUTPUT_DEF) \ ! && !(defined (__CYGWIN__) || defined (__MINGW32__)) if (targetm.have_named_sections) { resolve_unique_section (function, 0, flag_function_sections); --- 404,410 ---- push_to_top_level (); #if defined (ASM_OUTPUT_DEF) \ ! && !defined (TARGET_IS_PE_COFF) if (targetm.have_named_sections) { resolve_unique_section (function, 0, flag_function_sections); diff -Nrc3pad gcc-3.4.0/gcc/cp/name-lookup.c gcc-3.4.1/gcc/cp/name-lookup.c *** gcc-3.4.0/gcc/cp/name-lookup.c 2004-04-01 20:03:06.000000000 +0000 --- gcc-3.4.1/gcc/cp/name-lookup.c 2004-06-14 15:52:29.000000000 +0000 *************** supplement_binding (cxx_binding *binding *** 497,507 **** duplicate_decls (decl, binding->value); ok = false; } else { error ("declaration of `%#D'", decl); ! cp_error_at ("conflicts with previous declaration `%#D'", ! binding->value); ok = false; } --- 497,518 ---- duplicate_decls (decl, binding->value); ok = false; } + else if (TREE_CODE (decl) == NAMESPACE_DECL + && TREE_CODE (bval) == NAMESPACE_DECL + && DECL_NAMESPACE_ALIAS (decl) + && DECL_NAMESPACE_ALIAS (bval) + && ORIGINAL_NAMESPACE (bval) == ORIGINAL_NAMESPACE (decl)) + /* [namespace.alias] + + In a declarative region, a namespace-alias-definition can be + used to redefine a namespace-alias declared in that declarative + region to refer only to the namespace to which it already + refers. */ + ok = false; else { error ("declaration of `%#D'", decl); ! cp_error_at ("conflicts with previous declaration `%#D'", bval); ok = false; } *************** unqualified_namespace_lookup (tree name, *** 3732,3747 **** cxx_binding *b = cxx_scope_find_binding_for_name (NAMESPACE_LEVEL (scope), name); ! /* Ignore anticipated built-in functions. */ ! if (b && b->value && DECL_P (b->value) ! && DECL_LANG_SPECIFIC (b->value) && DECL_ANTICIPATED (b->value)) ! /* Keep binding cleared. */; ! else if (b) ! { ! /* Initialize binding for this context. */ ! binding.value = b->value; ! binding.type = b->type; ! } /* Add all _DECLs seen through local using-directives. */ for (level = current_binding_level; --- 3743,3759 ---- cxx_binding *b = cxx_scope_find_binding_for_name (NAMESPACE_LEVEL (scope), name); ! if (b) ! { ! if (b->value && DECL_P (b->value) ! && DECL_LANG_SPECIFIC (b->value) ! && DECL_ANTICIPATED (b->value)) ! /* Ignore anticipated built-in functions. */ ! ; ! else ! binding.value = b->value; ! binding.type = b->type; ! } /* Add all _DECLs seen through local using-directives. */ for (level = current_binding_level; *************** arg_assoc_class (struct arg_lookup *k, t *** 4278,4288 **** if (k->name == FRIEND_NAME (list)) for (friends = FRIEND_DECLS (list); friends; friends = TREE_CHAIN (friends)) ! /* Only interested in global functions with potentially hidden ! (i.e. unqualified) declarations. */ ! if (CP_DECL_CONTEXT (TREE_VALUE (friends)) == context) ! if (add_function (k, TREE_VALUE (friends))) return true; /* Process template arguments. */ if (CLASSTYPE_TEMPLATE_INFO (type)) --- 4290,4310 ---- if (k->name == FRIEND_NAME (list)) for (friends = FRIEND_DECLS (list); friends; friends = TREE_CHAIN (friends)) ! { ! tree fn = TREE_VALUE (friends); ! ! /* Only interested in global functions with potentially hidden ! (i.e. unqualified) declarations. */ ! if (CP_DECL_CONTEXT (fn) != context) ! continue; ! /* Template specializations are never found by name lookup. ! (Templates themselves can be found, but not template ! specializations.) */ ! if (TREE_CODE (fn) == FUNCTION_DECL && DECL_USE_TEMPLATE (fn)) ! continue; ! if (add_function (k, fn)) return true; + } /* Process template arguments. */ if (CLASSTYPE_TEMPLATE_INFO (type)) *************** arg_assoc (struct arg_lookup *k, tree n) *** 4435,4444 **** if (arg_assoc_template_arg (k, TREE_VEC_ELT (args, ix)) == 1) return true; } ! else { - my_friendly_assert (TREE_CODE (n) == OVERLOAD, 980715); - for (; n; n = OVL_CHAIN (n)) if (arg_assoc_type (k, TREE_TYPE (OVL_FUNCTION (n)))) return true; --- 4457,4464 ---- if (arg_assoc_template_arg (k, TREE_VEC_ELT (args, ix)) == 1) return true; } ! else if (TREE_CODE (n) == OVERLOAD) { for (; n; n = OVL_CHAIN (n)) if (arg_assoc_type (k, TREE_TYPE (OVL_FUNCTION (n)))) return true; *************** pushtag (tree name, tree type, int globa *** 4597,4603 **** timevar_push (TV_NAME_LOOKUP); b = current_binding_level; ! while (b->kind == sk_cleanup || (b->kind == sk_class && (globalize /* We may be defining a new type in the initializer --- 4617,4632 ---- timevar_push (TV_NAME_LOOKUP); b = current_binding_level; ! while (/* Cleanup scopes are not scopes from the point of view of ! the language. */ ! b->kind == sk_cleanup ! /* Neither are the scopes used to hold template parameters ! for an explicit specialization. For an ordinary template ! declaration, these scopes are not scopes from the point of ! view of the language -- but we need a place to stash ! things that will go in the containing namespace when the ! template is instantiated. */ ! || (b->kind == sk_template_parms && b->explicit_spec_p) || (b->kind == sk_class && (globalize /* We may be defining a new type in the initializer diff -Nrc3pad gcc-3.4.0/gcc/cp/parser.c gcc-3.4.1/gcc/cp/parser.c *** gcc-3.4.0/gcc/cp/parser.c 2004-03-19 11:41:15.000000000 +0000 --- gcc-3.4.1/gcc/cp/parser.c 2004-06-15 00:29:34.000000000 +0000 *************** cp_parser_postfix_expression (cp_parser *** 3520,3526 **** /* Look for the `)' token. */ cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'"); } ! /* Restore the saved message. */ parser->type_definition_forbidden_message = saved_message; } --- 3520,3529 ---- /* Look for the `)' token. */ cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'"); } ! /* `typeid' may not appear in an integral constant expression. */ ! if (cp_parser_non_integral_constant_expression(parser, ! "`typeid' operator")) ! return error_mark_node; /* Restore the saved message. */ parser->type_definition_forbidden_message = saved_message; } *************** cp_parser_postfix_expression (cp_parser *** 3704,3712 **** = grok_array_decl (postfix_expression, index); idk = CP_ID_KIND_NONE; /* Array references are not permitted in ! constant-expressions. */ ! if (cp_parser_non_integral_constant_expression ! (parser, "an array reference")) postfix_expression = error_mark_node; } break; --- 3707,3717 ---- = grok_array_decl (postfix_expression, index); idk = CP_ID_KIND_NONE; /* Array references are not permitted in ! constant-expressions (but they are allowed ! in offsetof). */ ! if (!parser->in_offsetof_p ! && cp_parser_non_integral_constant_expression ! (parser, "an array reference")) postfix_expression = error_mark_node; } break; *************** cp_parser_iteration_statement (cp_parser *** 5953,5960 **** expression = cp_parser_expression (parser); finish_for_expr (expression, statement); /* Look for the `)'. */ ! cp_parser_require (parser, CPP_CLOSE_PAREN, "`;'"); ! /* Parse the body of the for-statement. */ parser->in_iteration_statement_p = true; cp_parser_already_scoped_statement (parser); --- 5958,5965 ---- expression = cp_parser_expression (parser); finish_for_expr (expression, statement); /* Look for the `)'. */ ! cp_parser_require (parser, CPP_CLOSE_PAREN, "`)'"); ! /* Parse the body of the for-statement. */ parser->in_iteration_statement_p = true; cp_parser_already_scoped_statement (parser); *************** cp_parser_simple_declaration (cp_parser* *** 6567,6574 **** GNU Extension: ! decl-specifier-seq: ! decl-specifier-seq [opt] attributes Returns a TREE_LIST, giving the decl-specifiers in the order they appear in the source code. The TREE_VALUE of each node is the --- 6572,6579 ---- GNU Extension: ! decl-specifier: ! attributes Returns a TREE_LIST, giving the decl-specifiers in the order they appear in the source code. The TREE_VALUE of each node is the *************** cp_parser_mem_initializer_id (cp_parser* *** 7187,7194 **** --- 7192,7207 ---- { bool global_scope_p; bool nested_name_specifier_p; + bool template_p = false; tree id; + /* `typename' is not allowed in this context ([temp.res]). */ + if (cp_lexer_next_token_is_keyword (parser->lexer, RID_TYPENAME)) + { + error ("keyword `typename' not allowed in this context (a qualified " + "member initializer is implicitly a type)"); + cp_lexer_consume_token (parser->lexer); + } /* Look for the optional `::' operator. */ global_scope_p = (cp_parser_global_scope_opt (parser, *************** cp_parser_mem_initializer_id (cp_parser* *** 7213,7224 **** /*type_p=*/true, /*is_declaration=*/true) != NULL_TREE); /* If there is a `::' operator or a nested-name-specifier, then we are definitely looking for a class-name. */ if (global_scope_p || nested_name_specifier_p) return cp_parser_class_name (parser, /*typename_keyword_p=*/true, ! /*template_keyword_p=*/false, /*type_p=*/false, /*check_dependency_p=*/true, /*class_head_p=*/false, --- 7226,7239 ---- /*type_p=*/true, /*is_declaration=*/true) != NULL_TREE); + if (nested_name_specifier_p) + template_p = cp_parser_optional_template_keyword (parser); /* If there is a `::' operator or a nested-name-specifier, then we are definitely looking for a class-name. */ if (global_scope_p || nested_name_specifier_p) return cp_parser_class_name (parser, /*typename_keyword_p=*/true, ! /*template_keyword_p=*/template_p, /*type_p=*/false, /*check_dependency_p=*/true, /*class_head_p=*/false, *************** cp_parser_template_name (cp_parser* pars *** 8080,8093 **** if (is_declaration && !template_keyword_p && parser->scope && TYPE_P (parser->scope) ! && dependent_type_p (parser->scope)) { ptrdiff_t start; cp_token* token; /* Explain what went wrong. */ error ("non-template `%D' used as template", identifier); ! error ("(use `%T::template %D' to indicate that it is a template)", ! parser->scope, identifier); /* If parsing tentatively, find the location of the "<" token. */ if (cp_parser_parsing_tentatively (parser) --- 8095,8111 ---- if (is_declaration && !template_keyword_p && parser->scope && TYPE_P (parser->scope) ! && dependent_type_p (parser->scope) ! /* Do not do this for dtors (or ctors), since they never ! need the template keyword before their name. */ ! && !constructor_name_p (identifier, parser->scope)) { ptrdiff_t start; cp_token* token; /* Explain what went wrong. */ error ("non-template `%D' used as template", identifier); ! inform ("use `%T::template %D' to indicate that it is a template", ! parser->scope, identifier); /* If parsing tentatively, find the location of the "<" token. */ if (cp_parser_parsing_tentatively (parser) *************** cp_parser_template_argument (cp_parser* *** 8325,8336 **** cp_parser_error (parser, "expected template-argument"); if (!cp_parser_error_occurred (parser)) { ! /* Figure out what is being referred to. */ ! argument = cp_parser_lookup_name (parser, argument, ! /*is_type=*/false, ! /*is_template=*/template_p, ! /*is_namespace=*/false, ! /*check_dependency=*/true); if (TREE_CODE (argument) != TEMPLATE_DECL && TREE_CODE (argument) != UNBOUND_CLASS_TEMPLATE) cp_parser_error (parser, "expected template-name"); --- 8343,8358 ---- cp_parser_error (parser, "expected template-argument"); if (!cp_parser_error_occurred (parser)) { ! /* Figure out what is being referred to. If the id-expression ! was for a class template specialization, then we will have a ! TYPE_DECL at this point. There is no need to do name lookup ! at this point in that case. */ ! if (TREE_CODE (argument) != TYPE_DECL) ! argument = cp_parser_lookup_name (parser, argument, ! /*is_type=*/false, ! /*is_template=*/template_p, ! /*is_namespace=*/false, ! /*check_dependency=*/true); if (TREE_CODE (argument) != TEMPLATE_DECL && TREE_CODE (argument) != UNBOUND_CLASS_TEMPLATE) cp_parser_error (parser, "expected template-name"); *************** cp_parser_simple_type_specifier (cp_pars *** 8848,8853 **** --- 8870,8877 ---- /* The type-specifier must be a user-defined type. */ if (!(flags & CP_PARSER_FLAGS_NO_USER_DEFINED_TYPES)) { + bool qualified_p; + /* Don't gobble tokens or issue error messages if this is an optional type-specifier. */ if (flags & CP_PARSER_FLAGS_OPTIONAL) *************** cp_parser_simple_type_specifier (cp_pars *** 8857,8867 **** cp_parser_global_scope_opt (parser, /*current_scope_valid_p=*/false); /* Look for the nested-name specifier. */ ! cp_parser_nested_name_specifier_opt (parser, ! /*typename_keyword_p=*/false, ! /*check_dependency_p=*/true, ! /*type_p=*/false, ! /*is_declaration=*/false); /* If we have seen a nested-name-specifier, and the next token is `template', then we are using the template-id production. */ if (parser->scope --- 8881,8893 ---- cp_parser_global_scope_opt (parser, /*current_scope_valid_p=*/false); /* Look for the nested-name specifier. */ ! qualified_p ! = (cp_parser_nested_name_specifier_opt (parser, ! /*typename_keyword_p=*/false, ! /*check_dependency_p=*/true, ! /*type_p=*/false, ! /*is_declaration=*/false) ! != NULL_TREE); /* If we have seen a nested-name-specifier, and the next token is `template', then we are using the template-id production. */ if (parser->scope *************** cp_parser_simple_type_specifier (cp_pars *** 8883,8888 **** --- 8909,8920 ---- /* Otherwise, look for a type-name. */ else type = cp_parser_type_name (parser); + /* Keep track of all name-lookups performed in class scopes. */ + if (type + && !qualified_p + && TREE_CODE (type) == TYPE_DECL + && TREE_CODE (DECL_NAME (type)) == IDENTIFIER_NODE) + maybe_note_name_used_in_class (DECL_NAME (type), type); /* If it didn't work out, we don't have a TYPE. */ if ((flags & CP_PARSER_FLAGS_OPTIONAL) && !cp_parser_parse_definitely (parser)) *************** cp_parser_direct_declarator (cp_parser* *** 10502,10514 **** /* Resolve the TYPENAME_TYPE. */ type = resolve_typename_type (scope, ! /*only_current_p=*/false); /* If that failed, the declarator is invalid. */ ! if (type != error_mark_node) ! scope = type; /* Build a new DECLARATOR. */ declarator = build_nt (SCOPE_REF, ! scope, TREE_OPERAND (declarator, 1)); } } --- 10534,10548 ---- /* Resolve the TYPENAME_TYPE. */ type = resolve_typename_type (scope, ! /*only_current_p=*/false); /* If that failed, the declarator is invalid. */ ! if (type == error_mark_node) ! error ("`%T::%D' is not a type", ! TYPE_CONTEXT (scope), ! TYPE_IDENTIFIER (scope)); /* Build a new DECLARATOR. */ declarator = build_nt (SCOPE_REF, ! type, TREE_OPERAND (declarator, 1)); } } *************** cp_parser_class_head (cp_parser* parser, *** 12007,12013 **** pop_deferring_access_checks (); ! cp_parser_check_for_invalid_template_id (parser, id); /* If it's not a `:' or a `{' then we can't really be looking at a class-head, since a class-head only appears as part of a --- 12041,12048 ---- pop_deferring_access_checks (); ! if (id) ! cp_parser_check_for_invalid_template_id (parser, id); /* If it's not a `:' or a `{' then we can't really be looking at a class-head, since a class-head only appears as part of a *************** cp_parser_constructor_declarator_p (cp_p *** 14054,14059 **** --- 14089,14098 ---- { if (cp_lexer_next_token_is_not (parser->lexer, CPP_CLOSE_PAREN) && cp_lexer_next_token_is_not (parser->lexer, CPP_ELLIPSIS) + /* A parameter declaration begins with a decl-specifier, + which is either the "attribute" keyword, a storage class + specifier, or (usually) a type-specifier. */ + && !cp_lexer_next_token_is_keyword (parser->lexer, RID_ATTRIBUTE) && !cp_parser_storage_class_specifier_opt (parser)) { tree type; diff -Nrc3pad gcc-3.4.0/gcc/cp/pt.c gcc-3.4.1/gcc/cp/pt.c *** gcc-3.4.0/gcc/cp/pt.c 2004-04-14 19:45:16.000000000 +0000 --- gcc-3.4.1/gcc/cp/pt.c 2004-06-22 10:36:15.000000000 +0000 *************** tsubst_default_argument (tree fn, tree t *** 5883,5904 **** }; we must be careful to do name lookup in the scope of S, ! rather than in the current class. ! ! ??? current_class_type affects a lot more than name lookup. This is ! very fragile. Fortunately, it will go away when we do 2-phase name ! binding properly. */ ! ! /* FN is already the desired FUNCTION_DECL. */ push_access_scope (fn); /* The default argument expression should not be considered to be within the scope of FN. Since push_access_scope sets current_function_decl, we must explicitly clear it here. */ current_function_decl = NULL_TREE; arg = tsubst_expr (arg, DECL_TI_ARGS (fn), tf_error | tf_warning, NULL_TREE); ! pop_access_scope (fn); /* Make sure the default argument is reasonable. */ --- 5883,5900 ---- }; we must be careful to do name lookup in the scope of S, ! rather than in the current class. */ push_access_scope (fn); /* The default argument expression should not be considered to be within the scope of FN. Since push_access_scope sets current_function_decl, we must explicitly clear it here. */ current_function_decl = NULL_TREE; + push_deferring_access_checks(dk_no_deferred); arg = tsubst_expr (arg, DECL_TI_ARGS (fn), tf_error | tf_warning, NULL_TREE); ! pop_deferring_access_checks(); ! pop_access_scope (fn); /* Make sure the default argument is reasonable. */ *************** tsubst_decl (tree t, tree args, tree typ *** 6261,6266 **** --- 6257,6267 ---- else if (IDENTIFIER_OPNAME_P (DECL_NAME (r))) grok_op_properties (r, DECL_FRIEND_P (r), (complain & tf_error) != 0); + + if (DECL_FRIEND_P (t) && DECL_FRIEND_CONTEXT (t)) + SET_DECL_FRIEND_CONTEXT (r, + tsubst (DECL_FRIEND_CONTEXT (t), + args, complain, in_decl)); } break; *************** tsubst_copy (tree t, tree args, tsubst_f *** 7406,7411 **** --- 7407,7415 ---- enumerators. */ if (DECL_NAMESPACE_SCOPE_P (t)) return t; + /* If ARGS is NULL, then T is known to be non-dependent. */ + if (args == NULL_TREE) + return decl_constant_value (t); /* Unfortunately, we cannot just call lookup_name here. Consider: *************** instantiate_template (tree tmpl, tree ta *** 8654,8663 **** /* If this function is a clone, handle it specially. */ if (DECL_CLONED_FUNCTION_P (tmpl)) { ! tree spec = instantiate_template (DECL_CLONED_FUNCTION (tmpl), targ_ptr, ! complain); tree clone; /* Look for the clone. */ for (clone = TREE_CHAIN (spec); clone && DECL_CLONED_FUNCTION_P (clone); --- 8658,8671 ---- /* If this function is a clone, handle it specially. */ if (DECL_CLONED_FUNCTION_P (tmpl)) { ! tree spec; tree clone; + spec = instantiate_template (DECL_CLONED_FUNCTION (tmpl), targ_ptr, + complain); + if (spec == error_mark_node) + return error_mark_node; + /* Look for the clone. */ for (clone = TREE_CHAIN (spec); clone && DECL_CLONED_FUNCTION_P (clone); *************** template_decl_level (tree decl) *** 9532,9538 **** /* Decide whether ARG can be unified with PARM, considering only the cv-qualifiers of each type, given STRICT as documented for unify. ! Returns nonzero iff the unification is OK on that basis.*/ static int check_cv_quals_for_unify (int strict, tree arg, tree parm) --- 9540,9546 ---- /* Decide whether ARG can be unified with PARM, considering only the cv-qualifiers of each type, given STRICT as documented for unify. ! Returns nonzero iff the unification is OK on that basis. */ static int check_cv_quals_for_unify (int strict, tree arg, tree parm) *************** check_cv_quals_for_unify (int strict, tr *** 9540,9556 **** int arg_quals = cp_type_quals (arg); int parm_quals = cp_type_quals (parm); ! if (TREE_CODE (parm) == TEMPLATE_TYPE_PARM) { ! /* If the cvr quals of parm will not unify with ARG, they'll be ! ignored in instantiation, so we have to do the same here. */ ! if (TREE_CODE (arg) == REFERENCE_TYPE) ! parm_quals &= ~(TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE); ! if (!POINTER_TYPE_P (arg) && ! TREE_CODE (arg) != TEMPLATE_TYPE_PARM) ! parm_quals &= ~TYPE_QUAL_RESTRICT; } ! if (!(strict & (UNIFY_ALLOW_MORE_CV_QUAL | UNIFY_ALLOW_OUTER_MORE_CV_QUAL)) && (arg_quals & parm_quals) != parm_quals) return 0; --- 9548,9573 ---- int arg_quals = cp_type_quals (arg); int parm_quals = cp_type_quals (parm); ! if (TREE_CODE (parm) == TEMPLATE_TYPE_PARM ! && !(strict & UNIFY_ALLOW_OUTER_MORE_CV_QUAL)) { ! /* Although a CVR qualifier is ignored when being applied to a ! substituted template parameter ([8.3.2]/1 for example), that ! does not apply during deduction [14.8.2.4]/1, (even though ! that is not explicitly mentioned, [14.8.2.4]/9 indicates ! this). Except when we're allowing additional CV qualifiers ! at the outer level [14.8.2.1]/3,1st bullet. */ ! if ((TREE_CODE (arg) == REFERENCE_TYPE ! || TREE_CODE (arg) == FUNCTION_TYPE ! || TREE_CODE (arg) == METHOD_TYPE) ! && (parm_quals & (TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE))) ! return 0; ! ! if ((!POINTER_TYPE_P (arg) && TREE_CODE (arg) != TEMPLATE_TYPE_PARM) ! && (parm_quals & TYPE_QUAL_RESTRICT)) ! return 0; } ! if (!(strict & (UNIFY_ALLOW_MORE_CV_QUAL | UNIFY_ALLOW_OUTER_MORE_CV_QUAL)) && (arg_quals & parm_quals) != parm_quals) return 0; *************** instantiate_decl (tree d, int defer_ok) *** 11179,11184 **** --- 11196,11203 ---- if (!COMPLETE_TYPE_P (DECL_CONTEXT (d))) pop_nested_class (); } + /* We're not deferring instantiation any more. */ + TI_PENDING_TEMPLATE_FLAG (DECL_TEMPLATE_INFO (d)) = 0; } else if (TREE_CODE (d) == FUNCTION_DECL) { *************** instantiate_decl (tree d, int defer_ok) *** 11231,11244 **** htab_delete (local_specializations); local_specializations = saved_local_specializations; /* Finish the function. */ d = finish_function (0); expand_or_defer_fn (d); } - /* We're not deferring instantiation any more. */ - TI_PENDING_TEMPLATE_FLAG (DECL_TEMPLATE_INFO (d)) = 0; - if (need_push) pop_from_top_level (); --- 11250,11263 ---- htab_delete (local_specializations); local_specializations = saved_local_specializations; + /* We're not deferring instantiation any more. */ + TI_PENDING_TEMPLATE_FLAG (DECL_TEMPLATE_INFO (d)) = 0; + /* Finish the function. */ d = finish_function (0); expand_or_defer_fn (d); } if (need_push) pop_from_top_level (); *************** resolve_typename_type (tree type, bool o *** 12116,12130 **** tree build_non_dependent_expr (tree expr) { /* Preserve null pointer constants so that the type of things like "p == 0" where "p" is a pointer can be determined. */ if (null_ptr_cst_p (expr)) return expr; /* Preserve OVERLOADs; the functions must be available to resolve types. */ ! if (TREE_CODE (expr) == OVERLOAD ! || TREE_CODE (expr) == FUNCTION_DECL ! || TREE_CODE (expr) == TEMPLATE_DECL) return expr; /* Preserve string constants; conversions from string constants to "char *" are allowed, even though normally a "const char *" --- 12135,12154 ---- tree build_non_dependent_expr (tree expr) { + tree inner_expr; + /* Preserve null pointer constants so that the type of things like "p == 0" where "p" is a pointer can be determined. */ if (null_ptr_cst_p (expr)) return expr; /* Preserve OVERLOADs; the functions must be available to resolve types. */ ! inner_expr = (TREE_CODE (expr) == ADDR_EXPR ? ! TREE_OPERAND (expr, 0) : expr); ! if (TREE_CODE (inner_expr) == OVERLOAD ! || TREE_CODE (inner_expr) == FUNCTION_DECL ! || TREE_CODE (inner_expr) == TEMPLATE_DECL ! || TREE_CODE (inner_expr) == TEMPLATE_ID_EXPR) return expr; /* Preserve string constants; conversions from string constants to "char *" are allowed, even though normally a "const char *" diff -Nrc3pad gcc-3.4.0/gcc/cp/tree.c gcc-3.4.1/gcc/cp/tree.c *** gcc-3.4.0/gcc/cp/tree.c 2004-03-19 07:13:37.000000000 +0000 --- gcc-3.4.1/gcc/cp/tree.c 2004-06-21 12:46:22.000000000 +0000 *************** lvalue_p_1 (tree ref, *** 90,95 **** --- 90,99 ---- case COMPONENT_REF: op1_lvalue_kind = lvalue_p_1 (TREE_OPERAND (ref, 0), treat_class_rvalues_as_lvalues); + /* In an expression of the form "X.Y", the packed-ness of the + expression does not depend on "X". */ + op1_lvalue_kind &= ~clk_packed; + /* Look at the member designator. */ if (!op1_lvalue_kind /* The "field" can be a FUNCTION_DECL or an OVERLOAD in some situations. */ *************** cp_build_qualified_type_real (tree type, *** 427,437 **** { tree result; int bad_quals = TYPE_UNQUALIFIED; - /* We keep bad function qualifiers separate, so that we can decide - whether to implement DR 295 or not. DR 295 break existing code, - unfortunately. Remove this variable to implement the defect - report. */ - int bad_func_quals = TYPE_UNQUALIFIED; if (type == error_mark_node) return type; --- 431,436 ---- *************** cp_build_qualified_type_real (tree type, *** 501,508 **** || TREE_CODE (type) == METHOD_TYPE)) { bad_quals |= type_quals & (TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE); - if (TREE_CODE (type) != REFERENCE_TYPE) - bad_func_quals |= type_quals & (TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE); type_quals &= ~(TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE); } --- 500,505 ---- *************** cp_build_qualified_type_real (tree type, *** 521,541 **** /*OK*/; else if (!(complain & (tf_error | tf_ignore_bad_quals))) return error_mark_node; - else if (bad_func_quals && !(complain & tf_error)) - return error_mark_node; else { if (complain & tf_ignore_bad_quals) /* We're not going to warn about constifying things that can't be constified. */ bad_quals &= ~TYPE_QUAL_CONST; - bad_quals |= bad_func_quals; if (bad_quals) { tree bad_type = build_qualified_type (ptr_type_node, bad_quals); ! if (!(complain & tf_ignore_bad_quals) ! || bad_func_quals) error ("`%V' qualifiers cannot be applied to `%T'", bad_type, type); } --- 518,534 ---- /*OK*/; else if (!(complain & (tf_error | tf_ignore_bad_quals))) return error_mark_node; else { if (complain & tf_ignore_bad_quals) /* We're not going to warn about constifying things that can't be constified. */ bad_quals &= ~TYPE_QUAL_CONST; if (bad_quals) { tree bad_type = build_qualified_type (ptr_type_node, bad_quals); ! if (!(complain & tf_ignore_bad_quals)) error ("`%V' qualifiers cannot be applied to `%T'", bad_type, type); } diff -Nrc3pad gcc-3.4.0/gcc/cp/typeck.c gcc-3.4.1/gcc/cp/typeck.c *** gcc-3.4.0/gcc/cp/typeck.c 2004-04-01 23:18:14.000000000 +0000 --- gcc-3.4.1/gcc/cp/typeck.c 2004-06-10 14:26:49.000000000 +0000 *************** static int comp_ptr_ttypes_const (tree, *** 54,60 **** static bool comp_except_types (tree, tree, bool); static bool comp_array_types (tree, tree, bool); static tree common_base_type (tree, tree); - static tree lookup_anon_field (tree, tree); static tree pointer_diff (tree, tree, tree); static tree get_delta_difference (tree, tree, int); static void casts_away_constness_r (tree *, tree *); --- 54,59 ---- *************** complete_type (tree type) *** 124,130 **** else if (TREE_CODE (type) == ARRAY_TYPE && TYPE_DOMAIN (type)) { tree t = complete_type (TREE_TYPE (type)); ! if (COMPLETE_TYPE_P (t) && ! processing_template_decl) layout_type (type); TYPE_NEEDS_CONSTRUCTING (type) = TYPE_NEEDS_CONSTRUCTING (TYPE_MAIN_VARIANT (t)); --- 123,129 ---- else if (TREE_CODE (type) == ARRAY_TYPE && TYPE_DOMAIN (type)) { tree t = complete_type (TREE_TYPE (type)); ! if (COMPLETE_TYPE_P (t) && !dependent_type_p (type)) layout_type (type); TYPE_NEEDS_CONSTRUCTING (type) = TYPE_NEEDS_CONSTRUCTING (TYPE_MAIN_VARIANT (t)); *************** cxx_sizeof_or_alignof_expr (tree e, enum *** 1285,1290 **** --- 1284,1316 ---- } + /* EXPR is being used in a context that is not a function call. + Enforce: + + [expr.ref] + + The expression can be used only as the left-hand operand of a + member function call. + + [expr.mptr.operator] + + If the result of .* or ->* is a function, then that result can be + used only as the operand for the function call operator (). + + by issuing an error message if appropriate. Returns true iff EXPR + violates these rules. */ + + bool + invalid_nonstatic_memfn_p (tree expr) + { + if (TREE_CODE (TREE_TYPE (expr)) == METHOD_TYPE) + { + error ("invalid use of non-static member function"); + return true; + } + return false; + } + /* Perform the conversions in [expr] that apply when an lvalue appears in an rvalue context: the lvalue-to-rvalue, array-to-pointer, and function-to-pointer conversions. *************** decay_conversion (tree exp) *** 1337,1347 **** error ("void value not ignored as it ought to be"); return error_mark_node; } ! if (code == METHOD_TYPE) ! { ! error ("invalid use of non-static member function"); ! return error_mark_node; ! } if (code == FUNCTION_TYPE || is_overloaded_fn (exp)) return build_unary_op (ADDR_EXPR, exp, 0); if (code == ARRAY_TYPE) --- 1363,1370 ---- error ("void value not ignored as it ought to be"); return error_mark_node; } ! if (invalid_nonstatic_memfn_p (exp)) ! return error_mark_node; if (code == FUNCTION_TYPE || is_overloaded_fn (exp)) return build_unary_op (ADDR_EXPR, exp, 0); if (code == ARRAY_TYPE) *************** rationalize_conditional_expr (enum tree_ *** 1510,1516 **** anonymous unions can nest, we must also search all anonymous unions that are directly reachable. */ ! static tree lookup_anon_field (tree t, tree type) { tree field; --- 1533,1539 ---- anonymous unions can nest, we must also search all anonymous unions that are directly reachable. */ ! tree lookup_anon_field (tree t, tree type) { tree field; *************** build_x_unary_op (enum tree_code code, t *** 3530,3541 **** exp = NULL_TREE; ! /* & rec, on incomplete RECORD_TYPEs is the simple opr &, not an ! error message. */ if (code == ADDR_EXPR && TREE_CODE (xarg) != TEMPLATE_ID_EXPR ! && ((IS_AGGR_TYPE_CODE (TREE_CODE (TREE_TYPE (xarg))) ! && !COMPLETE_TYPE_P (TREE_TYPE (xarg))) || (TREE_CODE (xarg) == OFFSET_REF))) /* Don't look for a function. */; else --- 3553,3570 ---- exp = NULL_TREE; ! /* [expr.unary.op] says: ! ! The address of an object of incomplete type can be taken. ! ! (And is just the ordinary address operator, not an overloaded ! "operator &".) However, if the type is a template ! specialization, we must complete the type at this point so that ! an overloaded "operator &" will be available if required. */ if (code == ADDR_EXPR && TREE_CODE (xarg) != TEMPLATE_ID_EXPR ! && ((CLASS_TYPE_P (TREE_TYPE (xarg)) ! && !COMPLETE_TYPE_P (complete_type (TREE_TYPE (xarg)))) || (TREE_CODE (xarg) == OFFSET_REF))) /* Don't look for a function. */; else *************** build_unary_op (enum tree_code code, tre *** 3944,3951 **** return arg; } ! /* For &x[y], return x+y. */ ! if (TREE_CODE (arg) == ARRAY_REF) { if (!cxx_mark_addressable (TREE_OPERAND (arg, 0))) return error_mark_node; --- 3973,3984 ---- return arg; } ! /* For &x[y], return x+y. But, in a template, ARG may be an ! ARRAY_REF representing a non-dependent expression. In that ! case, there may be an overloaded "operator []" that will be ! chosen at instantiation time; we must not try to optimize ! here. */ ! if (TREE_CODE (arg) == ARRAY_REF && !processing_template_decl) { if (!cxx_mark_addressable (TREE_OPERAND (arg, 0))) return error_mark_node; *************** build_unary_op (enum tree_code code, tre *** 4053,4059 **** { tree addr; ! if (TREE_CODE (arg) != COMPONENT_REF) addr = build_address (arg); else if (TREE_CODE (TREE_OPERAND (arg, 1)) == BASELINK) { --- 4086,4096 ---- { tree addr; ! if (TREE_CODE (arg) != COMPONENT_REF ! /* Inside a template, we are processing a non-dependent ! expression so we can just form an ADDR_EXPR with the ! correct type. */ ! || processing_template_decl) addr = build_address (arg); else if (TREE_CODE (TREE_OPERAND (arg, 1)) == BASELINK) { *************** unary_complex_lvalue (enum tree_code cod *** 4212,4218 **** return error_mark_node; } ! type = build_ptrmem_type (DECL_FIELD_CONTEXT (t), TREE_TYPE (t)); t = make_ptrmem_cst (type, TREE_OPERAND (arg, 1)); return t; } --- 4249,4256 ---- return error_mark_node; } ! type = build_ptrmem_type (context_for_name_lookup (t), ! TREE_TYPE (t)); t = make_ptrmem_cst (type, TREE_OPERAND (arg, 1)); return t; } *************** build_static_cast (tree type, tree expr) *** 4514,4520 **** t. */ result = perform_direct_initialization_if_possible (type, expr); if (result) ! return convert_from_reference (result); /* [expr.static.cast] --- 4552,4568 ---- t. */ result = perform_direct_initialization_if_possible (type, expr); if (result) ! { ! result = convert_from_reference (result); ! /* [expr.static.cast] ! ! If T is a reference type, the result is an lvalue; otherwise, ! the result is an rvalue. */ ! if (TREE_CODE (type) != REFERENCE_TYPE ! && real_lvalue_p (result)) ! result = build1 (NON_LVALUE_EXPR, TREE_TYPE (result), result); ! return result; ! } /* [expr.static.cast] diff -Nrc3pad gcc-3.4.0/libstdc++-v3/acconfig.h gcc-3.4.1/libstdc++-v3/acconfig.h *** gcc-3.4.0/libstdc++-v3/acconfig.h 2004-03-18 17:35:22.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/acconfig.h 2004-05-14 10:53:10.000000000 +0000 *************** *** 25,32 **** // Define if code specialized for wchar_t should be used. #undef _GLIBCXX_USE_WCHAR_T ! // Define if using setrlimit to limit memory usage during 'make check'. ! #undef _GLIBCXX_MEM_LIMITS // Define to use concept checking code from the boost libraries. #undef _GLIBCXX_CONCEPT_CHECKS --- 25,32 ---- // Define if code specialized for wchar_t should be used. #undef _GLIBCXX_USE_WCHAR_T ! // Define if using setrlimit to set resource limits during 'make check'. ! #undef _GLIBCXX_RES_LIMITS // Define to use concept checking code from the boost libraries. #undef _GLIBCXX_CONCEPT_CHECKS diff -Nrc3pad gcc-3.4.0/libstdc++-v3/acinclude.m4 gcc-3.4.1/libstdc++-v3/acinclude.m4 *** gcc-3.4.0/libstdc++-v3/acinclude.m4 2004-03-18 17:35:22.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/acinclude.m4 2004-05-14 10:53:11.000000000 +0000 *************** dnl Check for headers for, and arguments *** 451,458 **** dnl Used only in testsuite_hooks.h. Called from GLIBCXX_CONFIGURE_TESTSUITE. dnl dnl Defines: ! dnl _GLIBCXX_MEM_LIMITS if we can set artificial limits on memory ! dnl various HAVE_MEMLIMIT_* for individual limit names dnl AC_DEFUN([GLIBCXX_CHECK_SETRLIMIT_ancilliary], [ AC_TRY_COMPILE( --- 451,458 ---- dnl Used only in testsuite_hooks.h. Called from GLIBCXX_CONFIGURE_TESTSUITE. dnl dnl Defines: ! dnl _GLIBCXX_RES_LIMITS if we can set artificial resource limits ! dnl various HAVE_LIMIT_* for individual limit names dnl AC_DEFUN([GLIBCXX_CHECK_SETRLIMIT_ancilliary], [ AC_TRY_COMPILE( *************** AC_DEFUN([GLIBCXX_CHECK_SETRLIMIT_ancill *** 462,468 **** ], [ int f = RLIMIT_$1 ; ], [glibcxx_mresult=1], [glibcxx_mresult=0]) ! AC_DEFINE_UNQUOTED(HAVE_MEMLIMIT_$1, $glibcxx_mresult, [Only used in build directory testsuite_hooks.h.]) ]) --- 462,468 ---- ], [ int f = RLIMIT_$1 ; ], [glibcxx_mresult=1], [glibcxx_mresult=0]) ! AC_DEFINE_UNQUOTED(HAVE_LIMIT_$1, $glibcxx_mresult, [Only used in build directory testsuite_hooks.h.]) ]) *************** AC_DEFUN([GLIBCXX_CHECK_SETRLIMIT], [ *** 479,484 **** --- 479,485 ---- GLIBCXX_CHECK_SETRLIMIT_ancilliary(RSS) GLIBCXX_CHECK_SETRLIMIT_ancilliary(VMEM) GLIBCXX_CHECK_SETRLIMIT_ancilliary(AS) + GLIBCXX_CHECK_SETRLIMIT_ancilliary(FSIZE) # Check for rlimit, setrlimit. AC_CACHE_VAL(ac_setrlimit, [ *************** AC_DEFUN([GLIBCXX_CHECK_SETRLIMIT], [ *** 493,506 **** ]) fi ! AC_MSG_CHECKING([for testsuite memory limit support]) if test $setrlimit_have_headers = yes && test $ac_setrlimit = yes; then ! ac_mem_limits=yes ! AC_DEFINE(_GLIBCXX_MEM_LIMITS) else ! ac_mem_limits=no fi ! AC_MSG_RESULT($ac_mem_limits) ]) --- 494,507 ---- ]) fi ! AC_MSG_CHECKING([for testsuite resource limits support]) if test $setrlimit_have_headers = yes && test $ac_setrlimit = yes; then ! ac_res_limits=yes ! AC_DEFINE(_GLIBCXX_RES_LIMITS) else ! ac_res_limits=no fi ! AC_MSG_RESULT($ac_res_limits) ]) *************** dnl baseline_dir *** 631,637 **** dnl AC_DEFUN([GLIBCXX_CONFIGURE_TESTSUITE], [ if $GLIBCXX_IS_NATIVE && test $is_hosted = yes; then ! # Do checks for memory limit functions. GLIBCXX_CHECK_SETRLIMIT # Look for setenv, so that extended locale tests can be performed. --- 632,638 ---- dnl AC_DEFUN([GLIBCXX_CONFIGURE_TESTSUITE], [ if $GLIBCXX_IS_NATIVE && test $is_hosted = yes; then ! # Do checks for resource limit functions. GLIBCXX_CHECK_SETRLIMIT # Look for setenv, so that extended locale tests can be performed. *************** AC_DEFUN([GLIBCXX_ENABLE_ALLOCATOR], [ *** 1180,1186 **** AC_MSG_CHECKING([for std::allocator base class to use]) GLIBCXX_ENABLE(libstdcxx-allocator,auto,[=KIND], [use KIND for target std::allocator base], ! [permit new|malloc|mt|bitmap|yes|no|auto]) # If they didn't use this option switch, or if they specified --enable # with no specific model, we'll have to look for one. If they # specified --disable (???), do likewise. --- 1181,1187 ---- AC_MSG_CHECKING([for std::allocator base class to use]) GLIBCXX_ENABLE(libstdcxx-allocator,auto,[=KIND], [use KIND for target std::allocator base], ! [permit new|malloc|mt|bitmap|pool|yes|no|auto]) # If they didn't use this option switch, or if they specified --enable # with no specific model, we'll have to look for one. If they # specified --disable (???), do likewise. *************** AC_DEFUN([GLIBCXX_ENABLE_ALLOCATOR], [ *** 1221,1226 **** --- 1222,1231 ---- ALLOCATOR_H=config/allocator/new_allocator_base.h ALLOCATOR_NAME=__gnu_cxx::new_allocator ;; + pool) + ALLOCATOR_H=config/allocator/pool_allocator_base.h + ALLOCATOR_NAME=__gnu_cxx::__pool_alloc + ;; esac AC_SUBST(ALLOCATOR_H) diff -Nrc3pad gcc-3.4.0/libstdc++-v3/aclocal.m4 gcc-3.4.1/libstdc++-v3/aclocal.m4 *** gcc-3.4.0/libstdc++-v3/aclocal.m4 2004-03-18 17:35:23.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/aclocal.m4 2004-05-15 20:43:59.000000000 +0000 *************** dnl Check for headers for, and arguments *** 464,471 **** dnl Used only in testsuite_hooks.h. Called from GLIBCXX_CONFIGURE_TESTSUITE. dnl dnl Defines: ! dnl _GLIBCXX_MEM_LIMITS if we can set artificial limits on memory ! dnl various HAVE_MEMLIMIT_* for individual limit names dnl AC_DEFUN([GLIBCXX_CHECK_SETRLIMIT_ancilliary], [ AC_TRY_COMPILE( --- 464,471 ---- dnl Used only in testsuite_hooks.h. Called from GLIBCXX_CONFIGURE_TESTSUITE. dnl dnl Defines: ! dnl _GLIBCXX_RES_LIMITS if we can set artificial resource limits ! dnl various HAVE_LIMIT_* for individual limit names dnl AC_DEFUN([GLIBCXX_CHECK_SETRLIMIT_ancilliary], [ AC_TRY_COMPILE( *************** AC_DEFUN([GLIBCXX_CHECK_SETRLIMIT_ancill *** 475,481 **** ], [ int f = RLIMIT_$1 ; ], [glibcxx_mresult=1], [glibcxx_mresult=0]) ! AC_DEFINE_UNQUOTED(HAVE_MEMLIMIT_$1, $glibcxx_mresult, [Only used in build directory testsuite_hooks.h.]) ]) --- 475,481 ---- ], [ int f = RLIMIT_$1 ; ], [glibcxx_mresult=1], [glibcxx_mresult=0]) ! AC_DEFINE_UNQUOTED(HAVE_LIMIT_$1, $glibcxx_mresult, [Only used in build directory testsuite_hooks.h.]) ]) *************** AC_DEFUN([GLIBCXX_CHECK_SETRLIMIT], [ *** 492,497 **** --- 492,498 ---- GLIBCXX_CHECK_SETRLIMIT_ancilliary(RSS) GLIBCXX_CHECK_SETRLIMIT_ancilliary(VMEM) GLIBCXX_CHECK_SETRLIMIT_ancilliary(AS) + GLIBCXX_CHECK_SETRLIMIT_ancilliary(FSIZE) # Check for rlimit, setrlimit. AC_CACHE_VAL(ac_setrlimit, [ *************** AC_DEFUN([GLIBCXX_CHECK_SETRLIMIT], [ *** 506,519 **** ]) fi ! AC_MSG_CHECKING([for testsuite memory limit support]) if test $setrlimit_have_headers = yes && test $ac_setrlimit = yes; then ! ac_mem_limits=yes ! AC_DEFINE(_GLIBCXX_MEM_LIMITS) else ! ac_mem_limits=no fi ! AC_MSG_RESULT($ac_mem_limits) ]) --- 507,520 ---- ]) fi ! AC_MSG_CHECKING([for testsuite resource limits support]) if test $setrlimit_have_headers = yes && test $ac_setrlimit = yes; then ! ac_res_limits=yes ! AC_DEFINE(_GLIBCXX_RES_LIMITS) else ! ac_res_limits=no fi ! AC_MSG_RESULT($ac_res_limits) ]) *************** dnl baseline_dir *** 644,650 **** dnl AC_DEFUN([GLIBCXX_CONFIGURE_TESTSUITE], [ if $GLIBCXX_IS_NATIVE && test $is_hosted = yes; then ! # Do checks for memory limit functions. GLIBCXX_CHECK_SETRLIMIT # Look for setenv, so that extended locale tests can be performed. --- 645,651 ---- dnl AC_DEFUN([GLIBCXX_CONFIGURE_TESTSUITE], [ if $GLIBCXX_IS_NATIVE && test $is_hosted = yes; then ! # Do checks for resource limit functions. GLIBCXX_CHECK_SETRLIMIT # Look for setenv, so that extended locale tests can be performed. *************** AC_DEFUN([GLIBCXX_ENABLE_ALLOCATOR], [ *** 1193,1199 **** AC_MSG_CHECKING([for std::allocator base class to use]) GLIBCXX_ENABLE(libstdcxx-allocator,auto,[=KIND], [use KIND for target std::allocator base], ! [permit new|malloc|mt|bitmap|yes|no|auto]) # If they didn't use this option switch, or if they specified --enable # with no specific model, we'll have to look for one. If they # specified --disable (???), do likewise. --- 1194,1200 ---- AC_MSG_CHECKING([for std::allocator base class to use]) GLIBCXX_ENABLE(libstdcxx-allocator,auto,[=KIND], [use KIND for target std::allocator base], ! [permit new|malloc|mt|bitmap|pool|yes|no|auto]) # If they didn't use this option switch, or if they specified --enable # with no specific model, we'll have to look for one. If they # specified --disable (???), do likewise. *************** AC_DEFUN([GLIBCXX_ENABLE_ALLOCATOR], [ *** 1234,1239 **** --- 1235,1244 ---- ALLOCATOR_H=config/allocator/new_allocator_base.h ALLOCATOR_NAME=__gnu_cxx::new_allocator ;; + pool) + ALLOCATOR_H=config/allocator/pool_allocator_base.h + ALLOCATOR_NAME=__gnu_cxx::__pool_alloc + ;; esac AC_SUBST(ALLOCATOR_H) diff -Nrc3pad gcc-3.4.0/libstdc++-v3/ChangeLog gcc-3.4.1/libstdc++-v3/ChangeLog *** gcc-3.4.0/libstdc++-v3/ChangeLog 2004-04-19 02:00:03.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/ChangeLog 2004-07-01 18:49:44.000000000 +0000 *************** *** 1,3 **** --- 1,808 ---- + 2004-07-01 Release Manager + + * GCC 3.4.1 released. + + 2004-06-28 Benjamin Kosnik + + * include/debug/safe_base.h (__gnu_debug::_Safe_sequence_base): + Revert -Weffc++ changes that defined copy ctory and or assignment + operator. + * libsupc++/tinfo.cc (__upcast_result): Same. + + 2004-06-25 Benjamin Kosnik + + PR libstdc++/16182 + * linkage.m4 (GLIBCXX_CHECK_BUILTIN_MATH_DEC): Revert to + AC_DEFINE_UNQUOTED. + * configure: Regenerate. + + 2004-06-25 Benjamin Kosnik + + * include/debug/formatter.h (__gnu_debug::_Error_formatter): + Remove copy constructor and assignment operator. + + 2004-06-23 Paolo Carlini + + PR libstdc++/16154 + * include/bits/boost_concept_check.h (struct _TrivialIteratorConcept): + Don't require the _DefaultConstructibleConcept. + (struct _ForwardIteratorConcept): Require it here. + + 2004-06-21 Loren J. Rittle + + * config/linker-map.gnu: Use wildcards for + __basic_file::sys_open(FILE*, _Ios_Openmode). + + 2004-06-18 Paolo Carlini + + * include/ext/mt_allocator (__mt_alloc<>::_Tune): Add _M_align, + the alignment requested. + (__mt_alloc<>::_Tune::_Tune): Tweak consistently. + (__mt_alloc<>::allocate): Use it instead of sizeof(_Block_record). + (__mt_alloc<>::deallocate): Likewise. + + 2004-06-18 Paolo Carlini + + PR libstdc++/16020 + * include/debug/safe_base.h + (_Safe_sequence_base::_Safe_sequence_base(const _Safe_sequence_base&), + _Safe_sequence_base::operator=): Provide definitions. + * testsuite/23_containers/bitset/cons/16020.cc: New. + + 2004-06-18 Paolo Carlini + + * include/ext/rope (rope(_CharT, const allocator_type&)): Fix + to use _Data_allocate. + * include/ext/ropeimpl.h (rope<>::_S_leaf_concat_char_iter): Likewise. + (rope<>::_S_substring): Likewise. + (rope<>::rope(size_t, _CharT, const allocator_type&)): Likewise. + (rope<>::c_str()): Likewise. + (rope<>::replace_with_c_str()): Likewise. + + * include/ext/ropeimpl.h (_Rope_iterator_base<>::_S_setbuf): + Correctly qualify _S_leaf, _S_function, etc., with _Rope_constants::, + not _RopeRep. + (_Rope_iterator_base<>::_S_setcache): Likewise. + (_Rope_iterator_base<>::_S_setcache_for_incr): Likewise. + (rope<>::_S_substring): Likewise. + (rope<>::_S_dump): Likewise. + (rope<>::_S_fetch_ptr): Likewise. + (rope<>::_S_compare): Likewise. + (rope<>::replace_with_c_str()): Likewise. + + * testsuite/ext/rope.cc: Rename to testsuite/ext/rope/1.cc. + * testsuite/ext/rope/2.cc: New. + + 2004-06-18 Paolo Carlini + Matt Austern + + * testsuite/ext/rope/3.cc: New. + + 2004-06-17 Paolo Carlini + + * include/bits/locale_facets.tcc (time_get<>::_M_extract_name): + Don't use the 'magic number' 10 in the computation of __minlen; + never access __name past __minlen; in the loop over __i3, don't + decrease __nmatches and increase __i3 at once, only either of + the two; tidy. + + 2004-06-17 Paolo Carlini + + * include/ext/pool_allocator.h: Convert to a global free-list, + as per the original SGI/HP design: move the implementation + details to struct __pool_base, from which __pool_alloc derives. + * src/allocator.cc: Instantiate __pool_base. + + 2004-06-11 Paolo Carlini + + PR libstdc++/15775 + * include/bits/stl_deque.h: Consistently with stl_set.h, define + pointer as allocator's pointer, likewise for reference, + const_pointer, and const_reference. + * include/bits/stl_list.h: Likewise. + * include/bits/stl_map.h: Likewise. + * include/bits/stl_multimap.h: Likewise. + * include/bits/stl_vector.h: Likewise. + + 2004-06-11 Dhruv Matani + Paolo Carlini + + * testsuite/testsuite_performance.h + (resource_counter::allocated_memory): Make it return the right + number of bytes requested by the allocators/application. This is + the sbrk+mmaped memory. + + 2004-06-10 Benjamin Kosnik + + * crossconfig.m4: Remove signbit, signbitf, signbitl. + * linkage.m4: Comment LIBMATHOBJS, tweak others. AC_DEFINES for + builtin math functions instead of AC_DEFINE_UNQUOTED. + * configure: Regenerate. + + 2004-06-10 Benjamin Kosnik + + * docs/doxygen/filter.sed: Rename _GLIBCXX_STD to std. + * docs/doxygen/mainpage.html: Remove links. + + 2004-06-08 Jason Merrill + + * config/linker-map.gnu: Use wildcards for + __basic_file::{xsgetn,xsputn,seekoff,xsputn_2}. + + 2004-05-31 Benjamin Kosnik + + * config/linker-map.gnu (GLIBCXX_3.4.1): Add. + * testsuite/testsuite_abi.cc: Same. + * configure.ac (libtool_VERSION): Bump to 6:1:0. + * configure: Regenerate. + * aclocal.m4: Regenerate. + + 2004-05-31 Richard B. Kreckel + Benjamin Kosnik + + PR libstdc++/14600 + * include/ext/stdio_sync_filebuf.h (stdio_sync_filebuf::file): New. + * include/ext/stdio_filebuf.h (stdio_filebuf::file): New. + * config/io/basic_file_stdio.cc (__basic_file::file): New. + * config/io/basic_file_stdio.h: Define. + + 2004-05-30 Benjamin Kosnik + + PR libstdc++/15675 + * docs/html/documentation.html: Update doxygen links for 3.4.0. + + 2004-05-30 Jan Beulich + + * scripts/create_testsuite_files: Tweak. + + 2004-05-30 Paolo Carlini + + * include/ext/mt_allocator.h:(__mt_alloc::allocate): Minor + tweaks. + + 2004-05-30 Dhruv Matani + + * include/ext/mt_allocator.h:(__mt_alloc::allocate): Re-write + allocation loop which removes blocks from the global free list + from O(N) to O(1) when the required blocks are <= the number + available. + + 2004-05-30 Paolo Carlini + + * include/ext/mt_allocator.h (__mt_alloc<>::deallocate): + Consistently update __bin._M_free[0]. + (__mt_alloc<>::allocate): When __bin._M_first[0] != NULL use + __bin._M_free[0] to simplify the while loop (i.e., the number + of iterations becomes known at the outset). + + 2004-05-30 Paolo Carlini + + * include/ext/mt_allocator.h (__mt_alloc<>::deallocate): + The critical section is actually very small, only two assignments. + + 2004-05-30 Paolo Carlini + + * include/ext/mt_allocator.h (__mt_alloc<>::allocate): Factor out + some duplicated code. + (__mt_alloc<>::_Bin_record): Spare the space of _M_free and _M_used + in the single threaded case. + + 2004-05-30 Paolo Carlini + + * include/ext/mt_allocator.h (__mt_alloc<>::deallocate): + Rearrange arithmetic to avoid computing two divisions at + each deallocation. + + 2004-05-30 Paolo Carlini + + * include/ext/mt_allocator.h (__mt_alloc<>::_S_initialize): + Streamline the second half, wrapping it in a single + '#ifdef __GTHREADS if (__gthread_active_p())' and avoiding + conditionals inside loops. + + 2004-05-30 Paolo Carlini + + * include/ext/mt_allocator.h: Uglify consistently names of + variables, members and classes; tidy. + + 2004-05-30 Dhruv Matani + + * include/ext/mt_allocator.h (__mt_alloc<>::deallocate): + Deallocation loop rewrote. + + 2004-05-30 Paolo Carlini + + * include/ext/mt_allocator.h (__mt_alloc<>::allocate, + __mt_alloc<>::deallocate): Protect two instances of + block->thread_id with __GTHREADS. + + 2004-05-30 Paolo Carlini + + * include/ext/mt_allocator.h (__mt_alloc<>::tune): + Add _M_min_bin, the size in bytes of the smallest bin. + (__mt_alloc<>::tune()): Tweak accordingly. + (__mt_alloc<>::tune(size_t, ...)): Likewise. + (__mt_alloc<>::block_record): Change to a union: members next + and thread_id are never used at the same time. + (__mt_alloc<>::allocate): Update consistently. + (__mt_alloc<>::deallocate): Likewise. + (__mt_alloc<>::_S_initialize): Update setups of _S_binmap and + _S_bin_size for the configurable _M_min_size. + + 2004-05-30 Paolo Carlini + + * include/ext/mt_allocator.h (__mt_alloc<>::allocate, + __mt_alloc<>::deallocate): Avoid redundant conditionals. + + 2004-05-27 Paolo Carlini + + PR libstdc++/15565 + * include/bits/locale_facets.tcc (__int_to_char(unsigned long), + __int_to_char(unsigned long long)): Showpos is not relevant + for unsigned types. + * testsuite/22_locale/num_put/put/char/15565.cc: New. + * testsuite/22_locale/num_put/put/wchar_t/15565.cc: New. + + * testsuite/22_locale/num_put/put/wchar_t/1.cc: Use L for the fill + char. + * testsuite/22_locale/num_put/put/wchar_t/2.cc: Likewise. + * testsuite/22_locale/num_put/put/wchar_t/3.cc: Likewise. + * testsuite/22_locale/num_put/put/wchar_t/4.cc: Likewise. + * testsuite/22_locale/num_put/put/wchar_t/5.cc: Likewise. + * testsuite/22_locale/num_put/put/wchar_t/6.cc: Likewise. + * testsuite/22_locale/num_put/put/wchar_t/8.cc: Likewise. + + 2004-05-25 Paolo Carlini + + * include/bits/istream.tcc (ignore): Correctly deal with + n == numeric_limits::max(). + * testsuite/27_io/basic_istream/ignore/char/2.cc: New. + + * include/bits/istream.tcc (basic_istream<>::getline): Prefer + '_M_gcount + 1 < __n' to '--__n; _M_gcount < __n', just in case + __n == numeric_limits<>::min(). + + * include/bits/istream.tcc: Minor tweaks. + + * testsuite/21_strings/basic_string/inserters_extractors/char/10.cc: + Tighten. + * testsuite/21_strings/basic_string/inserters_extractors/char/11.cc: + Likewise. + * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/10.cc: + Likewise. + * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/11.cc: + Likewise. + * testsuite/27_io/basic_istream/getline/char/5.cc: Likewise. + + 2004-05-25 Paolo Carlini + + * include/bits/istream.tcc (ignore): Remove redundant line. + (readsome): Tidy, closely following 27.6.1.3, p30. + + 2004-05-25 Paolo Carlini + + * include/bits/istream.tcc (operator>>(basic_istream<>&, + basic_string<>&)): Use a temporary buffer, thus avoiding + reallocation for common case. + * testsuite/21_strings/basic_string/inserters_extractors/char/11.cc: + New. + * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/11.cc: + Likewise. + + * include/bits/istream.tcc: Const-ification of a few variables. + + * include/bits/ostream.tcc: Trivial formatting fixes and + const-ification of some variables. + + 2004-05-25 Benjamin Kosnik + + PR libstdc++/15489 + * scripts/create_testsuite_files: Revert xtype change, add + non-GNU bits to do the same thing. + + 2004-05-24 Benjamin Kosnik + + PR libstdc++/12854 + Fixups for -Weffc++. + * include/bits/basic_string.h (basic_string::operator=): Return + pointer to this instead of result of assign. Although redundant, + this doesn't impact resultant codegen. + + * include/bits/locale_facets.h (__numpunct_cache): Declare + assignment opxserator and copy constructor private. + (__timepunct_cache): Same. + (__moneypunct_cache): Same. + (collate): Use member initialization list for _M_c_locale_collate. + * config/locale/gnu/messages_members.h: Same. + * config/locale/gnu/time_members.h (__timepunct): Same. + * src/codecvt.cc: Use member initialization list to initialize + _M_c_locale_codecvt. + * src/ctype.cc: Same, with _M_c_locale_ctype and _M_narrow_ok. + * config/os/gnu-linux/ctype_noninline.h: Same. + * src/locale.cc (_Impl): Same. + * src/locale_init.cc: Same. + * src/localename.cc: Same. + + * include/bits/basic_ios.h (basic_ios): Complete member + initialization list. + * include/bits/istream.tcc (basic_istream::sentry): Same. + * include/bits/ostream.tcc (basic_ostream::sentry): Same. + * include/bits/fstream.tcc (basic_filebuf): Add _M_lock and + _M_pback to member initialization list. + * include/std/std_streambuf.h: Same. + * include/std/std_sstream.h: Same, for _M_mode. + * src/ios.cc (ios_base): Same. + + * include/ext/rope: Make derived classes match exception + + specifications. Add copy constructors and assignment operators. + + * include/debug/safe_base.h (_Safe_sequence_base): Declare copy + constructor and assignment operator protected. + (_Safe_iterator_base): Same. + * include/debug/formatter.h (_Error_formatter): Define copy + constructor and assignment operator. + + * include/backward/strstream: Declare assignment operator and copy + constructor private. + + 2004-05-24 Benjamin Kosnik + + * testsuite/testsuite_hooks.h (func_callback): Declare copy + constructor and assignment operator private. + * testsuite/23_containers/deque/cons/clear_allocator.cc: Match + exception specifications of base class. + * testsuite/23_containers/list/cons/clear_allocator.cc: Same. + * testsuite/23_containers/vector/cons/clear_allocator.cc: Same. + * testsuite/23_containers/vector/bool/clear_allocator.cc: New. + + 2004-05-24 Benjamin Kosnik + + * libsupc++/cxxabi.h: Remove duplicated and useless public and + private keywords in class declarations. Format. Use + stddef.h. Expose declarations to "C" compilation. + * libsupc++/tinfo.cc (__upcast_result): Add copy constructor and + assignment operator. + (__dyncast_result): Same. + * libsupc++/vec.cc (uncatch_exception): Same, use member + initialization list. + + 2004-05-22 Benjamin Kosnik + + * testsuite/abi_check.cc: Add unistd.h. + + 2004-05-21 Matthias Klose + + * docs/doxygen/run_doxygen: Bump required version. + + 2004-05-21 Benjamin Kosnik + + * docs/html/abi.html (libgcc_s): Additions suggested by Matthias Klose. + * docs/doxygen/Intro.3: Subtractions suggested by Phil Edwards. + + 2004-05-21 Benjamin Kosnik + + PR libstdc++/15123 + PR libstdc++/13928 + * docs/doxygen/Intro.3: Remove Allocators.3. + Add new extension headers, extension namespace list. + * docs/doxygen/run_doxygen (problematic): Remove Allocators.3 + Rename GLIBCXXSTD names to std::. Rename __gnu_debug to + __gnu_debug::. Remove __policy_ renames. + * docs/doxygen/guide.html: Add dot note. + * docs/doxygen/stdheader.cc: Edit, add files. + * docs/doxygen/user.cfg.in: Regenerate with Doxygen 1.3.7. + + 2004-05-19 Jan Beulich + + PR libstdc++/15489 + * scripts/create_testsuite_files: Also find source files through + symbolic links. + + 2004-05-19 Jan Beulich + + PR libstdc++/15488 + * testsuite/lib/libstdc++.exp: Make test files writable. + + 2004-05-18 Jonathan Wakely + + * include/ext/stdio_filebuf.h: Update comments to reflect PR 11691. + + 2004-05-18 Benjamin Kosnik + + * testsuite/testsuite_hooks.h (__gnu_test::conversion): New class. + * testsuite/23_containers/deque/14340.cc: New. + * testsuite/23_containers/list/14340.cc: New. + * testsuite/23_containers/map/14340.cc: New. + * testsuite/23_containers/multimap/14340.cc: New. + * testsuite/23_containers/multiset/14340.cc: New. + * testsuite/23_containers/set/14340.cc: New. + * testsuite/23_containers/vector/14340.cc: New. + + 2004-05-18 Douglas Gregor + + PR libstdc++/14340 + * include/debug/safe_iterator.h (_Safe_iterator converting + constructor): Only allow declaration to instantiate when the + incoming _Safe_iterator has exactly the right iterator type. + + 2004-05-18 Jonathan Wakely + + * include/ext/enc_filebuf.h: Move concept-check macro to class scope. + + 2004-05-17 Jonathan Wakely + + * include/bits/boost_concept_check.h: Fix old attribute syntax. + * testsuite/23_containers/map/modifiers/swap.cc: Define operator< + to pass concept-checks. + * testsuite/23_containers/multimap/modifiers/swap.cc: Same. + * testsuite/23_containers/set/modifiers/swap.cc: Same. + * testsuite/23_containers/multiset/modifiers/swap.cc: Same. + + 2004-05-15 Benjamin Kosnik + + PR libstdc++/15046 + * crossconfig.m4: Add C99 math bits for linux crosses. + * configure: Regenerate. + + 2004-05-15 Simon Marshall + Benjamin Kosnik + + PR libstdc++/15090 + * include/bits/locale_facets.h: Fix for -fno-for-scope. + * include/debug/safe_sequence.h: Same. + * include/debug/safe_iterator.tcc: Same. + * src/debug.cc: Same. + * src/locale.cc: Same. + * src/locale_init.cc: Same. + * src/localename.cc: Same. + * config/locale/gnu/ctype_members.cc: Same. + * config/locale/gnu/numeric_members.cc: Same. + * testsuite/testsuite_abi.cc: Same. + * testsuite/testsuite_hooks.cc: Same. + + 2004-05-15 Jonathan Wakely + + * docs/html/abi.html: Document effect of -fabi-version on value + of __GXX_ABI_VERSION, and that it's defined in c-cppbuiltin.c. + Fix markup. + + 2004-05-15 Benjamin Kosnik + + * docs/html/abi.html: New. + * docs/html/abi.txt: Remove. + * docs/html/documentation.html: Add link. + * testsuite/Makefile.am: Add files. + * testsuite/Makefile.in: Regenerated. + * testsuite/abi_check.cc: Move and modify code into... + * testsuite/testsuite_abi.cc: Add. + * testsuite/testsuite_abi.h: Add. + + * docs/html/17_intro/TODO: Update. + * include/bits/stl_pair.h: Format. + + 2004-05-14 Paolo Carlini + Ivan Godard + + PR libstdc++/15361 + * include/std/std_bitset.h (_Base_bitset<_Nw>::_M_do_find_next): Fix. + * testsuite/23_containers/bitset/ext/15361.cc: New. + + 2004-05-14 Paolo Carlini + + PR libstdc++/14775 + * acconfig.h: Rename _GLIBCXX_MEM_LIMITS to _GLIBCXX_RES_LIMITS. + * acinclude.m4 (GLIBCXX_CHECK_SETRLIMIT): Call + GLIBCXX_CHECK_SETRLIMIT_ancilliary for FSIZE too, adjust define + to _GLIBCXX_RES_LIMITS. + (GLIBCXX_CHECK_SETRLIMIT_ancilliary): Rename HAVE_MEMLIMIT_* to + HAVE_LIMIT_*. + * testsuite/testsuite_hooks.h: Declare set_file_limit. + * testsuite/testsuite_hooks.cc: Define it, using getrlimit + and setrlimit(RLIMIT_FSIZE). + * testsuite/27_io/fpos/14775.cc: New. + * config.h.in: Regenerate. + * configure: Likewise. + + 2004-05-13 Benjamin Kosnik + + PR libstdc++/15074 + * docs/html/faq/index.html: Update docs for libsupc++ usage. + + 2004-05-13 Benjamin Kosnik + + PR libstdc++/15412 + * include/bits/stl_threads.h (_GLIBCXX_mutex): Move to namespace + __gnu_internal. + (_GLIBCXX_mutex_address): Same. + (_GLIBCXX_once): Same. + (_GLIBCXX_mutex_init): Same. + (_GLIBCXX_mutex_address_init): Same. + + 2004-05-09 Paolo Carlini + + * testsuite/21_strings/basic_string/inserters_extractors/char/10.cc: + New. + * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/10.cc: + Likewise. + * testsuite/27_io/basic_istream/getline/char/5.cc: Likewise. + + 2004-05-09 Paolo Carlini + + PR libstdc++/15002 (continued again) + * include/bits/istream.tcc (getline(basic_istream<>&, + basic_string<>&, _CharT)): Use a temporary buffer, thus + avoiding reallocation for common case. + + * include/bits/basic_string.tcc (_S_construct(_InIterator, + _InIterator, const _Alloc&, input_iterator_tag)): Tweak size + of temporary buffer to a power of two. + + * testsuite/27_io/basic_istream/getline/char/4.cc: Add comment. + + 2004-05-09 Paolo Carlini + Petur Runolfsson + + PR libstdc++/15002 (continued) + * include/bits/istream.tcc (basic_istream<>::getline(char_type*, + streamsize, char_type)): Use traits::find/copy in a loop to speed + up greatly the function in the common case (I/O buffer size >> 1). + + 2004-05-09 Paolo Carlini + + * testsuite/27_io/basic_istream/getline/char/4.cc: New. + + * include/bits/istream.tcc (getline(basic_istream<>&, + basic_string<>&, _CharT)): Change to use sgetc()/snextc() instead + of sbumpc(), consistently with the other functions, thus also + dealing correctly with the case of exceeded string::max_size(). + + 2004-05-06 Matthias Klose + + * include/backward/iterator.h: Add GPL copyright info, + with exception clause. + * include/bits/boost_concept_check.h: Likewise. + * include + * libsupc++/tinfo.h: Likewise. + * po/string_literals.cc: Likewise. + + 2004-05-02 Paolo Carlini + + * acinclude.m4 (GLIBCXX_ENABLE_ALLOCATOR): Add pool_allocator. + * aclocal.m4: Regenerate. + * configure: Regenerate. + * config/allocator/pool_allocator_base.h: New. + * include/ext/pool_allocator.h: Convert to a standard-conforming + allocator. + * src/allocator.cc: Tweak instantiations. + * testsuite/performance/20_util/allocator/insert.cc: Add __pool_alloc. + * testsuite/performance/20_util/allocator/insert_insert.cc: Ditto. + * testsuite/performance/20_util/allocator/list_sort_search.cc: Ditto. + * testsuite/performance/20_util/allocator/map_mt_find.cc: Ditto. + * testsuite/performance/20_util/allocator/map_thread.cc: Ditto. + * testsuite/performance/20_util/allocator/producer_consumer.cc: Ditto. + + 2004-04-30 Paolo Carlini + + PR libstdc++/14220 + * include/bits/locale_facets.tcc (num_put<>::_M_insert_float): + Don't clip the precision passed down to __convert_from_v: + 22.2.2.2.2 nowhere says so. + * testsuite/22_locale/num_put/put/char/14220.cc: New. + * testsuite/22_locale/num_put/put/wchar_t/14220.c: Likewise. + + 2004-04-29 Benjamin Kosnik + + * testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc: + Clarify assertion, set test variable to false before assert. + * testsuite/27_io/basic_istringstream/str/char/1.cc: Same. + * testsuite/27_io/basic_stringstream/str/char/1.cc: Same. + * testsuite/27_io/ios_base/storage/2.cc: Same. + + * testsuite/27_io/basic_filebuf/imbue/char/13171-4.cc: Fix + function returns. + * testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-3.cc: Same. + * testsuite/27_io/fpos/14320-3.cc: Same. + + * testsuite/27_io/basic_filebuf/2.cc: Instantiate in namespace std. + * testsuite/27_io/fpos/1.cc: Same. + * testsuite/27_io/basic_stringstream/2.cc: Same. + * testsuite/27_io/basic_stringbuf/4.cc: Same. + * testsuite/27_io/basic_stringbuf/1.cc: Same. + * testsuite/27_io/basic_stringbuf/2.cc: Same. + * testsuite/27_io/basic_streambuf/2.cc: Same. + * testsuite/27_io/basic_ostringstream/2.cc: Same. + * testsuite/27_io/basic_ostream/2.cc: Same. + * testsuite/27_io/basic_ofstream/2.cc: Same. + * testsuite/27_io/basic_istringstream/2.cc: Same. + * testsuite/27_io/basic_istream/2.cc: Same. + * testsuite/27_io/basic_iostream/2.cc: Same. + * testsuite/27_io/basic_ios/2.cc: Same. + * testsuite/27_io/basic_ifstream/2.cc: Same. + * testsuite/27_io/basic_fstream/2.cc: Same. + * testsuite/ext/stdio_filebuf/char/1.cc: Same, in namespace __gnu_cxx. + + * testsuite/21_strings/basic_string/capacity/1.cc: Don't compare + unsigned against zero. + * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc: Same. + * testsuite/21_strings/basic_string/capacity/char/1.cc: Same. + + * testsuite/18_support/new_delete_placement.cc: Initialize + variables before first use. + * testsuite/21_strings/char_traits/requirements/wchar_t/1.cc: Same. + * testsuite/21_strings/char_traits/requirements/char/1.cc: Same. + * testsuite/21_strings/char_traits/requirements/short/1.cc: Same. + * testsuite/27_io/basic_istream/seekg/char/exceptions_badbit_throw.cc: + Same. + * testsuite/27_io/basic_ostream/inserters_arithmetic/char/exceptions_badbit_throw.cc: Same. + * testsuite/27_io/basic_ostream/seekp/char/exceptions_badbit_throw.cc: + Same. + * testsuite/27_io/basic_ostream/inserters_arithmetic/char/exceptions_failbit_throw.cc: Same. + * testsuite/27_io/types/2.cc: Same. + + * testsuite/ext/stdio_sync_filebuf/wchar_t/12077.cc: Fix temporary + file name. + + 2004-04-29 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. + + 2004-04-29 Dhruv Matani + + * include/ext/malloc_allocator.h: Fixed the construct function to + call global placement new instead of assignment. Added a check + after the return from malloc to check whether returned pointer is + NULL, and if so, throw std::bad_alloc(). + * include/ext/debug_allocator.h: Added a check in the deallocate + function to check whether the user has passed a NULL pointer or + not. + + 2004-04-29 Benjamin Kosnik + + * docs/html/20_util/allocator.html: Add bitmap_allocator links. + + 2004-04-29 Dhruv Matani + + * include/ext/bitmap_allocator.h: (_Bit_scan_forward) -> Made this + function call __builtin_ctz instead of the while loop. + (allocate) -> If condition has __builtin_expect. + (deallocate) -> Ditto. + Renamed a few left-over variables and typedefs according to the + C++STYLE mentioned in the documentation. + Protected calls to __gthread* by __gthread_active_p(), whose value + is cached in the local variable __threads_active. + + 2004-04-29 Felix Yen + + * testsuite/performance/20_util/allocator/producer_consumer.cc: + Use linear algorithm for producer. + + 2004-04-29 Paolo Carlini + + PR libstdc++/14975 + * include/bits/fstream.tcc (basic_filebuf::imbue): Zero _M_codecvt + in case of error. + * testsuite/27_io/basic_filebuf/imbue/char/14975-1.cc: New. + * testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc: New. + + 2004-04-26 Paolo Carlini + + * include/bits/istream.tcc: Fix comment. + + 2004-04-26 Paolo Carlini + + * src/locale.cc (locale::operator==): When _M_impl == __rhs._M_impl + avoid constructing unnecessarily this->name(). + + 2004-04-24 Loren J. Rittle + + * testsuite/thread/pthread7-rope.cc: Update comment to reflect test. + + 2004-04-24 Paolo Carlini + + * testsuite/thread/pthread7-rope.cc: Fix, unpredictably, depending + on allocator behavior, the memory pointed by data2 may well be not + trashed. + + 2004-04-24 Paolo Carlini + + * config/locale/generic/time_members.cc + (__timepunct::_M_initialize_timepunct, + __timepunct::_M_initialize_timepunct): The correct + _M_amonth07 in the "C" locale is "Jul" and L"Jul", respectively. + * config/locale/gnu/time_members.cc + (__timepunct::_M_initialize_timepunct, + __timepunct::_M_initialize_timepunct): Ditto. + * testsuite/22_locale/time_get/get_monthname/char/4.cc: New. + * testsuite/22_locale/time_get/get_monthname/wchar_t/4.cc: New. + + 2004-04-24 Paolo Carlini + Petur Runolfsson + + * testsuite/performance/27_io/filebuf_sputn_unbuf.cc: New, + adapted from libstdc++/11378. + + 2004-04-24 Paolo Carlini + Andrew Pinski + + * include/bits/basic_string.tcc (_M_mutate): Don't compute + __src unnecessarily. + + 2004-04-24 Paolo Carlini + + PR libstdc++/15002 (partial) + * include/bits/basic_string.h (_M_replace_aux, _M_replace_safe): + Special case __n2 == 1, not calling traits_type::assign/copy. + + 2004-04-24 Matthias Klose + + Jonathan Wakely + * docs/html/configopts.html: Fix reference to allocator config option. + + 2004-04-23 Daniel Jacobowitz + + PR libstdc++/15047, libstdc++/11610 + * testsuite/lib/libstdc++.exp (v3-copy-files): Use remote_download. + (libstdc++_init): Don't pass outdir to v3-copy-files. + + 2004-04-23 Paolo Carlini + + * config/locale/gnu/monetary_members.cc + (moneypunct::_M_initialize_moneypunct): Prefer + _NL_MONETARY_DECIMAL_POINT_WC, _NL_MONETARY_THOUSANDS_SEP_WC, + and __MON_GROUPING to _NL_NUMERIC_DECIMAL_POINT_WC, + _NL_NUMERIC_THOUSANDS_SEP_WC, and GROUPING. + * config/locale/gnu/numeric_members.cc + (numpunct::_M_initialize_numpunct): Prefer DECIMAL_POINT + and THOUSANDS_SEP to the deprecated RADIXCHAR and THOUSEP. + + 2004-04-21 Chavdar Botev + + PR libstdc++/14245 + * include/bits/basic_string.tcc + (basic_string::basic_string(const basic_string&)): Pass to + _Rep::_M_grab the actual allocator of the string being constructed + not the default constructed one. + + 2004-04-21 Paolo Carlini + Petur Runolfsson + + PR libstdc++/12077 + * include/ext/stdio_sync_filebuf.h (showmanyc): Remove, there's + no way to find out the conversion used by the underlying FILE*. + * testsuite/ext/stdio_sync_filebuf/wchar_t/12077.cc: New. + * testsuite/27_io/objects/char/9.cc: Tweak. + 2004-04-18 Release Manager * GCC 3.4.0 released. diff -Nrc3pad gcc-3.4.0/libstdc++-v3/config/allocator/pool_allocator_base.h gcc-3.4.1/libstdc++-v3/config/allocator/pool_allocator_base.h *** gcc-3.4.0/libstdc++-v3/config/allocator/pool_allocator_base.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/config/allocator/pool_allocator_base.h 2004-05-02 17:44:47.000000000 +0000 *************** *** 0 **** --- 1,37 ---- + // Base to std::allocator -*- C++ -*- + + // Copyright (C) 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + // As a special exception, you may use this file as part of a free software + // library without restriction. Specifically, if other files instantiate + // templates or use macros or inline functions from this file, or you compile + // this file and link it with other files to produce an executable, this + // file does not by itself cause the resulting executable to be covered by + // the GNU General Public License. This exception does not however + // invalidate any other reasons why the executable file might be covered by + // the GNU General Public License. + + #ifndef _CXX_ALLOCATOR_H + #define _CXX_ALLOCATOR_H 1 + + // Define new_allocator as the base class to std::allocator. + #include + #define ___glibcxx_base_allocator __gnu_cxx::__pool_alloc + + #endif diff -Nrc3pad gcc-3.4.0/libstdc++-v3/config/io/basic_file_stdio.cc gcc-3.4.1/libstdc++-v3/config/io/basic_file_stdio.cc *** gcc-3.4.0/libstdc++-v3/config/io/basic_file_stdio.cc 2004-03-18 17:36:31.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/config/io/basic_file_stdio.cc 2004-05-31 21:18:54.000000000 +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; *************** namespace std *** 240,246 **** int __basic_file::fd() ! { return fileno(_M_cfile) ; } __basic_file* __basic_file::close() --- 240,250 ---- int __basic_file::fd() ! { return fileno(_M_cfile); } ! ! __c_file* ! __basic_file::file() ! { return _M_cfile; } __basic_file* __basic_file::close() diff -Nrc3pad gcc-3.4.0/libstdc++-v3/config/io/basic_file_stdio.h gcc-3.4.1/libstdc++-v3/config/io/basic_file_stdio.h *** gcc-3.4.0/libstdc++-v3/config/io/basic_file_stdio.h 2004-02-05 05:54:13.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/config/io/basic_file_stdio.h 2004-05-31 21:18:55.000000000 +0000 *************** namespace std *** 81,86 **** --- 81,89 ---- int fd(); + __c_file* + file(); + ~__basic_file(); streamsize diff -Nrc3pad gcc-3.4.0/libstdc++-v3/config/linker-map.gnu gcc-3.4.1/libstdc++-v3/config/linker-map.gnu *** gcc-3.4.0/libstdc++-v3/config/linker-map.gnu 2004-04-16 19:08:33.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/config/linker-map.gnu 2004-06-22 00:25:57.000000000 +0000 *************** GLIBCXX_3.4 { *** 61,67 **** std::_List_node_base::reverse*; std::_List_node_base::transfer*; std::__throw_*; - std::__basic_file*; std::__timepunct*; std::__numeric_limits_base*; std::__num_base::_S_format_float*; --- 61,66 ---- *************** GLIBCXX_3.4 { *** 134,139 **** --- 133,154 ---- # std::__codecvt_abstract_base* _ZNStSt23__codecvt_abstract_base*; + # std::__basic_file + _ZNKSt12__basic_fileIcE7is_openEv; + _ZNSt12__basic_fileIcE2fdEv; + _ZNSt12__basic_fileIcE4openEPKcSt13_Ios_Openmodei; + _ZNSt12__basic_fileIcE4syncEv; + _ZNSt12__basic_fileIcE5closeEv; + _ZNSt12__basic_fileIcE6xsgetn*; + _ZNSt12__basic_fileIcE6xsputn*; + _ZNSt12__basic_fileIcE7seekoff*; + _ZNSt12__basic_fileIcE8sys_openE*St13_Ios_Openmode; + _ZNSt12__basic_fileIcE8sys_openEiSt13_Ios_Openmode; + _ZNSt12__basic_fileIcE8xsputn_2*; + _ZNSt12__basic_fileIcE9showmanycEv; + _ZNSt12__basic_fileIcEC*; + _ZNSt12__basic_fileIcED*; + # virtual table _ZTVNSt8ios_base7failureE; _ZTVNSt6locale5facetE; *************** GLIBCXX_3.4 { *** 234,239 **** --- 249,260 ---- *; }; + GLIBCXX_3.4.1 { + + _ZNSt12__basic_fileIcE4fileEv; + + } GLIBCXX_3.4; + # Symbols in the support library (libsupc++) have their own tag. CXXABI_1.3 { diff -Nrc3pad gcc-3.4.0/libstdc++-v3/config/locale/generic/ctype_members.cc gcc-3.4.1/libstdc++-v3/config/locale/generic/ctype_members.cc *** gcc-3.4.0/libstdc++-v3/config/locale/generic/ctype_members.cc 2003-12-16 11:00:52.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/config/locale/generic/ctype_members.cc 2004-04-30 04:20:22.000000000 +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); } } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/config/locale/generic/messages_members.h gcc-3.4.1/libstdc++-v3/config/locale/generic/messages_members.h *** gcc-3.4.0/libstdc++-v3/config/locale/generic/messages_members.h 2003-10-22 18:58:30.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/config/locale/generic/messages_members.h 2004-04-30 04:20:22.000000000 +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); } } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/config/locale/generic/time_members.cc gcc-3.4.1/libstdc++-v3/config/locale/generic/time_members.cc *** gcc-3.4.0/libstdc++-v3/config/locale/generic/time_members.cc 2003-07-18 02:27:14.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/config/locale/generic/time_members.cc 2004-04-24 18:43:49.000000000 +0000 *************** *** 1,6 **** // std::time_get, std::time_put implementation, 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::time_get, std::time_put implementation, 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 *** 108,114 **** _M_data->_M_amonth04 = "Apr"; _M_data->_M_amonth05 = "May"; _M_data->_M_amonth06 = "Jun"; ! _M_data->_M_amonth07 = "July"; _M_data->_M_amonth08 = "Aug"; _M_data->_M_amonth09 = "Sep"; _M_data->_M_amonth10 = "Oct"; --- 108,114 ---- _M_data->_M_amonth04 = "Apr"; _M_data->_M_amonth05 = "May"; _M_data->_M_amonth06 = "Jun"; ! _M_data->_M_amonth07 = "Jul"; _M_data->_M_amonth08 = "Aug"; _M_data->_M_amonth09 = "Sep"; _M_data->_M_amonth10 = "Oct"; *************** namespace std *** 187,193 **** _M_data->_M_amonth04 = L"Apr"; _M_data->_M_amonth05 = L"May"; _M_data->_M_amonth06 = L"Jun"; ! _M_data->_M_amonth07 = L"July"; _M_data->_M_amonth08 = L"Aug"; _M_data->_M_amonth09 = L"Sep"; _M_data->_M_amonth10 = L"Oct"; --- 187,193 ---- _M_data->_M_amonth04 = L"Apr"; _M_data->_M_amonth05 = L"May"; _M_data->_M_amonth06 = L"Jun"; ! _M_data->_M_amonth07 = L"Jul"; _M_data->_M_amonth08 = L"Aug"; _M_data->_M_amonth09 = L"Sep"; _M_data->_M_amonth10 = L"Oct"; diff -Nrc3pad gcc-3.4.0/libstdc++-v3/config/locale/gnu/ctype_members.cc gcc-3.4.1/libstdc++-v3/config/locale/gnu/ctype_members.cc *** gcc-3.4.0/libstdc++-v3/config/locale/gnu/ctype_members.cc 2003-12-16 11:00:51.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/config/locale/gnu/ctype_members.cc 2004-05-15 21:17:58.000000000 +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; } } *************** namespace std *** 272,285 **** _M_narrow_ok = true; else _M_narrow_ok = false; ! for (size_t __i = 0; ! __i < sizeof(_M_widen) / sizeof(wint_t); ++__i) ! _M_widen[__i] = btowc(__i); ! for (size_t __i = 0; __i <= 11; ++__i) { ! _M_bit[__i] = static_cast(_ISbit(__i)); ! _M_wmask[__i] = _M_convert_to_wmask(_M_bit[__i]); } #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) __uselocale(__old); --- 272,285 ---- _M_narrow_ok = true; else _M_narrow_ok = false; ! for (size_t __j = 0; ! __j < sizeof(_M_widen) / sizeof(wint_t); ++__j) ! _M_widen[__j] = btowc(__j); ! for (size_t __k = 0; __k <= 11; ++__k) { ! _M_bit[__k] = static_cast(_ISbit(__k)); ! _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]); } #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) __uselocale(__old); diff -Nrc3pad gcc-3.4.0/libstdc++-v3/config/locale/gnu/messages_members.h gcc-3.4.1/libstdc++-v3/config/locale/gnu/messages_members.h *** gcc-3.4.0/libstdc++-v3/config/locale/gnu/messages_members.h 2003-10-22 18:58:30.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/config/locale/gnu/messages_members.h 2004-05-24 20:49:47.000000000 +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 *************** *** 36,61 **** // Non-virtual member functions. template messages<_CharT>::messages(size_t __refs) ! : facet(__refs) ! { ! #if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)) ! _M_name_messages = _S_get_c_name(); ! #endif ! _M_c_locale_messages = _S_get_c_locale(); ! } template ! messages<_CharT>::messages(__c_locale __cloc, ! const char* __s __attribute__ ((__unused__)), size_t __refs) ! : facet(__refs) { - #if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)) char* __tmp = new char[std::strlen(__s) + 1]; std::strcpy(__tmp, __s); _M_name_messages = __tmp; - #endif - _M_c_locale_messages = _S_clone_c_locale(__cloc); } template --- 36,54 ---- // Non-virtual member functions. template messages<_CharT>::messages(size_t __refs) ! : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), ! _M_name_messages(_S_get_c_name()) ! { } template ! messages<_CharT>::messages(__c_locale __cloc, const char* __s, size_t __refs) ! : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)), ! _M_name_messages(__s) { char* __tmp = new char[std::strlen(__s) + 1]; std::strcpy(__tmp, __s); _M_name_messages = __tmp; } template *************** *** 71,80 **** template messages<_CharT>::~messages() { - #if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)) if (_M_name_messages != _S_get_c_name()) delete [] _M_name_messages; - #endif _S_destroy_c_locale(_M_c_locale_messages); } --- 64,71 ---- *************** *** 99,114 **** messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs) : messages<_CharT>(__refs) { - #if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)) if (this->_M_name_messages != locale::facet::_S_get_c_name()) delete [] this->_M_name_messages; char* __tmp = new char[std::strlen(__s) + 1]; std::strcpy(__tmp, __s); this->_M_name_messages = __tmp; ! #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); ! } } --- 90,104 ---- messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs) : messages<_CharT>(__refs) { if (this->_M_name_messages != locale::facet::_S_get_c_name()) delete [] this->_M_name_messages; char* __tmp = new char[std::strlen(__s) + 1]; std::strcpy(__tmp, __s); this->_M_name_messages = __tmp; ! ! 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); ! } } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/config/locale/gnu/monetary_members.cc gcc-3.4.1/libstdc++-v3/config/locale/gnu/monetary_members.cc *** gcc-3.4.0/libstdc++-v3/config/locale/gnu/monetary_members.cc 2004-03-18 17:36:33.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/config/locale/gnu/monetary_members.cc 2004-04-23 15:10:23.000000000 +0000 *************** namespace std *** 391,402 **** #endif union __s_and_w { const char *__s; unsigned int __w; } __u; ! __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc); _M_data->_M_decimal_point = static_cast(__u.__w); ! __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc); _M_data->_M_thousands_sep = static_cast(__u.__w); ! _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc); _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); --- 391,402 ---- #endif union __s_and_w { const char *__s; unsigned int __w; } __u; ! __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc); _M_data->_M_decimal_point = static_cast(__u.__w); ! __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc); _M_data->_M_thousands_sep = static_cast(__u.__w); ! _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); *************** namespace std *** 536,547 **** #endif union __s_and_w { const char *__s; unsigned int __w; } __u; ! __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc); _M_data->_M_decimal_point = static_cast(__u.__w); ! __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc); _M_data->_M_thousands_sep = static_cast(__u.__w); ! _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc); _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); --- 536,547 ---- #endif union __s_and_w { const char *__s; unsigned int __w; } __u; ! __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc); _M_data->_M_decimal_point = static_cast(__u.__w); ! __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc); _M_data->_M_thousands_sep = static_cast(__u.__w); ! _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); diff -Nrc3pad gcc-3.4.0/libstdc++-v3/config/locale/gnu/numeric_members.cc gcc-3.4.1/libstdc++-v3/config/locale/gnu/numeric_members.cc *** gcc-3.4.0/libstdc++-v3/config/locale/gnu/numeric_members.cc 2004-03-18 17:36:33.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/config/locale/gnu/numeric_members.cc 2004-05-15 21:17:58.000000000 +0000 *************** namespace std *** 58,71 **** for (size_t __i = 0; __i < __num_base::_S_oend; ++__i) _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i]; ! for (size_t __i = 0; __i < __num_base::_S_iend; ++__i) ! _M_data->_M_atoms_in[__i] = __num_base::_S_atoms_in[__i]; } else { // Named locale. ! _M_data->_M_decimal_point = *(__nl_langinfo_l(RADIXCHAR, __cloc)); ! _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSEP, __cloc)); // Check for NULL, which implies no grouping. if (_M_data->_M_thousands_sep == '\0') --- 58,73 ---- for (size_t __i = 0; __i < __num_base::_S_oend; ++__i) _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i]; ! for (size_t __j = 0; __j < __num_base::_S_iend; ++__j) ! _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j]; } else { // Named locale. ! _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT, ! __cloc)); ! _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP, ! __cloc)); // Check for NULL, which implies no grouping. if (_M_data->_M_thousands_sep == '\0') *************** namespace std *** 117,126 **** _M_data->_M_atoms_out[__i] = btowc(uc); } ! for (size_t __i = 0; __i < __num_base::_S_iend; ++__i) { ! uc = static_cast(__num_base::_S_atoms_in[__i]); ! _M_data->_M_atoms_in[__i] = btowc(uc); } #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) __uselocale(__old); --- 119,128 ---- _M_data->_M_atoms_out[__i] = btowc(uc); } ! for (size_t __j = 0; __j < __num_base::_S_iend; ++__j) { ! uc = static_cast(__num_base::_S_atoms_in[__j]); ! _M_data->_M_atoms_in[__j] = btowc(uc); } #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) __uselocale(__old); diff -Nrc3pad gcc-3.4.0/libstdc++-v3/config/locale/gnu/time_members.cc gcc-3.4.1/libstdc++-v3/config/locale/gnu/time_members.cc *** gcc-3.4.0/libstdc++-v3/config/locale/gnu/time_members.cc 2003-10-02 16:56:38.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/config/locale/gnu/time_members.cc 2004-04-24 18:43:50.000000000 +0000 *************** *** 1,6 **** // std::time_get, std::time_put implementation, 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::time_get, std::time_put implementation, 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 *** 117,123 **** _M_data->_M_amonth04 = "Apr"; _M_data->_M_amonth05 = "May"; _M_data->_M_amonth06 = "Jun"; ! _M_data->_M_amonth07 = "July"; _M_data->_M_amonth08 = "Aug"; _M_data->_M_amonth09 = "Sep"; _M_data->_M_amonth10 = "Oct"; --- 117,123 ---- _M_data->_M_amonth04 = "Apr"; _M_data->_M_amonth05 = "May"; _M_data->_M_amonth06 = "Jun"; ! _M_data->_M_amonth07 = "Jul"; _M_data->_M_amonth08 = "Aug"; _M_data->_M_amonth09 = "Sep"; _M_data->_M_amonth10 = "Oct"; *************** namespace std *** 265,271 **** _M_data->_M_amonth04 = L"Apr"; _M_data->_M_amonth05 = L"May"; _M_data->_M_amonth06 = L"Jun"; ! _M_data->_M_amonth07 = L"July"; _M_data->_M_amonth08 = L"Aug"; _M_data->_M_amonth09 = L"Sep"; _M_data->_M_amonth10 = L"Oct"; --- 265,271 ---- _M_data->_M_amonth04 = L"Apr"; _M_data->_M_amonth05 = L"May"; _M_data->_M_amonth06 = L"Jun"; ! _M_data->_M_amonth07 = L"Jul"; _M_data->_M_amonth08 = L"Aug"; _M_data->_M_amonth09 = L"Sep"; _M_data->_M_amonth10 = L"Oct"; diff -Nrc3pad gcc-3.4.0/libstdc++-v3/config/locale/gnu/time_members.h gcc-3.4.1/libstdc++-v3/config/locale/gnu/time_members.h *** gcc-3.4.0/libstdc++-v3/config/locale/gnu/time_members.h 2003-10-02 23:06:13.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/config/locale/gnu/time_members.h 2004-05-24 20:49:47.000000000 +0000 *************** *** 1,6 **** // std::time_get, std::time_put implementation, 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::time_get, std::time_put implementation, 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 *************** *** 36,80 **** template __timepunct<_CharT>::__timepunct(size_t __refs) ! : facet(__refs), _M_data(NULL) ! { ! #if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)) ! _M_name_timepunct = _S_get_c_name(); ! #endif ! _M_initialize_timepunct(); ! } template __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) ! : facet(__refs), _M_data(__cache) ! { ! #if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)) ! _M_name_timepunct = _S_get_c_name(); ! #endif ! _M_initialize_timepunct(); ! } template ! __timepunct<_CharT>::__timepunct(__c_locale __cloc, ! const char* __s __attribute__ ((__unused__)), size_t __refs) ! : facet(__refs), _M_data(NULL) { - #if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)) char* __tmp = new char[std::strlen(__s) + 1]; std::strcpy(__tmp, __s); _M_name_timepunct = __tmp; - #endif _M_initialize_timepunct(__cloc); } template __timepunct<_CharT>::~__timepunct() { - #if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)) if (_M_name_timepunct != _S_get_c_name()) delete [] _M_name_timepunct; - #endif delete _M_data; _S_destroy_c_locale(_M_c_locale_timepunct); } --- 36,68 ---- template __timepunct<_CharT>::__timepunct(size_t __refs) ! : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), ! _M_name_timepunct(_S_get_c_name()) ! { _M_initialize_timepunct(); } template __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) ! : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL), ! _M_name_timepunct(_S_get_c_name()) ! { _M_initialize_timepunct(); } template ! __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, size_t __refs) ! : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), ! _M_name_timepunct(__s) { char* __tmp = new char[std::strlen(__s) + 1]; std::strcpy(__tmp, __s); _M_name_timepunct = __tmp; _M_initialize_timepunct(__cloc); } template __timepunct<_CharT>::~__timepunct() { if (_M_name_timepunct != _S_get_c_name()) delete [] _M_name_timepunct; delete _M_data; _S_destroy_c_locale(_M_c_locale_timepunct); } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/config/os/gnu-linux/ctype_noninline.h gcc-3.4.1/libstdc++-v3/config/os/gnu-linux/ctype_noninline.h *** gcc-3.4.0/libstdc++-v3/config/os/gnu-linux/ctype_noninline.h 2003-12-16 01:56:59.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/config/os/gnu-linux/ctype_noninline.h 2004-05-24 20:49:47.000000000 +0000 *************** *** 1,6 **** // Locale support -*- C++ -*- ! // 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,6 ---- // Locale support -*- C++ -*- ! // 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 *************** *** 59,79 **** #if _GLIBCXX_C_LOCALE_GNU ctype::ctype(__c_locale __cloc, const mask* __table, bool __del, size_t __refs) ! : facet(__refs), _M_del(__table != 0 && __del) { - _M_c_locale_ctype = _S_clone_c_locale(__cloc); - _M_toupper = _M_c_locale_ctype->__ctype_toupper; - _M_tolower = _M_c_locale_ctype->__ctype_tolower; - _M_table = __table ? __table : _M_c_locale_ctype->__ctype_b; memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; } #else ctype::ctype(__c_locale, const mask* __table, bool __del, size_t __refs) ! : facet(__refs), _M_del(__table != 0 && __del) { char* __old=strdup(setlocale(LC_CTYPE, NULL)); setlocale(LC_CTYPE, "C"); --- 59,79 ---- #if _GLIBCXX_C_LOCALE_GNU ctype::ctype(__c_locale __cloc, const mask* __table, bool __del, size_t __refs) ! : facet(__refs), _M_c_locale_ctype(_S_clone_c_locale(__cloc)), ! _M_del(__table != 0 && __del), ! _M_toupper(_M_c_locale_ctype->__ctype_toupper), ! _M_tolower(_M_c_locale_ctype->__ctype_tolower), ! _M_table(__table ? __table : _M_c_locale_ctype->__ctype_b), ! _M_widen_ok(0), _M_narrow_ok(0) { memset(_M_widen, 0, sizeof(_M_widen)); memset(_M_narrow, 0, sizeof(_M_narrow)); } #else ctype::ctype(__c_locale, const mask* __table, bool __del, size_t __refs) ! : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), ! _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0) { char* __old=strdup(setlocale(LC_CTYPE, NULL)); setlocale(LC_CTYPE, "C"); *************** *** 88,117 **** #endif setlocale(LC_CTYPE, __old); free(__old); - _M_c_locale_ctype = _S_get_c_locale(); memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; } #endif #if _GLIBCXX_C_LOCALE_GNU ctype::ctype(const mask* __table, bool __del, size_t __refs) ! : facet(__refs), _M_del(__table != 0 && __del) { - _M_c_locale_ctype = _S_get_c_locale(); - _M_toupper = _M_c_locale_ctype->__ctype_toupper; - _M_tolower = _M_c_locale_ctype->__ctype_tolower; - _M_table = __table ? __table : _M_c_locale_ctype->__ctype_b; memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; } #else ctype::ctype(const mask* __table, bool __del, size_t __refs) ! : facet(__refs), _M_del(__table != 0 && __del) { char* __old=strdup(setlocale(LC_CTYPE, NULL)); setlocale(LC_CTYPE, "C"); --- 88,114 ---- #endif setlocale(LC_CTYPE, __old); free(__old); memset(_M_widen, 0, sizeof(_M_widen)); memset(_M_narrow, 0, sizeof(_M_narrow)); } #endif #if _GLIBCXX_C_LOCALE_GNU ctype::ctype(const mask* __table, bool __del, size_t __refs) ! : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), ! _M_del(__table != 0 && __del), ! _M_toupper(_M_c_locale_ctype->__ctype_toupper), ! _M_tolower(_M_c_locale_ctype->__ctype_tolower), ! _M_table(__table ? __table : _M_c_locale_ctype->__ctype_b), ! _M_widen_ok(0), _M_narrow_ok(0) { memset(_M_widen, 0, sizeof(_M_widen)); memset(_M_narrow, 0, sizeof(_M_narrow)); } #else ctype::ctype(const mask* __table, bool __del, size_t __refs) ! : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), ! _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0) { char* __old=strdup(setlocale(LC_CTYPE, NULL)); setlocale(LC_CTYPE, "C"); *************** *** 126,136 **** #endif setlocale(LC_CTYPE, __old); free(__old); - _M_c_locale_ctype = _S_get_c_locale(); memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; } #endif --- 123,130 ---- diff -Nrc3pad gcc-3.4.0/libstdc++-v3/config.h.in gcc-3.4.1/libstdc++-v3/config.h.in *** gcc-3.4.0/libstdc++-v3/config.h.in 2004-03-18 17:35:24.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/config.h.in 2004-05-14 10:53:11.000000000 +0000 *************** *** 26,33 **** // Define if code specialized for wchar_t should be used. #undef _GLIBCXX_USE_WCHAR_T ! // Define if using setrlimit to limit memory usage during 'make check'. ! #undef _GLIBCXX_MEM_LIMITS // Define to use concept checking code from the boost libraries. #undef _GLIBCXX_CONCEPT_CHECKS --- 26,33 ---- // Define if code specialized for wchar_t should be used. #undef _GLIBCXX_USE_WCHAR_T ! // Define if using setrlimit to set resource limits during 'make check'. ! #undef _GLIBCXX_RES_LIMITS // Define to use concept checking code from the boost libraries. #undef _GLIBCXX_CONCEPT_CHECKS *************** *** 362,367 **** --- 362,382 ---- /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM + /* Only used in build directory testsuite_hooks.h. */ + #undef HAVE_LIMIT_AS + + /* Only used in build directory testsuite_hooks.h. */ + #undef HAVE_LIMIT_DATA + + /* Only used in build directory testsuite_hooks.h. */ + #undef HAVE_LIMIT_FSIZE + + /* Only used in build directory testsuite_hooks.h. */ + #undef HAVE_LIMIT_RSS + + /* Only used in build directory testsuite_hooks.h. */ + #undef HAVE_LIMIT_VMEM + /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H *************** *** 395,412 **** /* Define to 1 if you have the `mbsrtowcs' function. */ #undef HAVE_MBSRTOWCS - /* Only used in build directory testsuite_hooks.h. */ - #undef HAVE_MEMLIMIT_AS - - /* Only used in build directory testsuite_hooks.h. */ - #undef HAVE_MEMLIMIT_DATA - - /* Only used in build directory testsuite_hooks.h. */ - #undef HAVE_MEMLIMIT_RSS - - /* Only used in build directory testsuite_hooks.h. */ - #undef HAVE_MEMLIMIT_VMEM - /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H --- 410,415 ---- diff -Nrc3pad gcc-3.4.0/libstdc++-v3/configure gcc-3.4.1/libstdc++-v3/configure *** gcc-3.4.0/libstdc++-v3/configure 2004-03-18 17:35:25.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/configure 2004-06-25 22:02:47.000000000 +0000 *************** ac_compiler_gnu=$ac_cv_c_compiler_gnu *** 1340,1346 **** ### am handles this now? ORIGINAL_LD_FOR_MULTILIBS=$LD # For libtool versioning info, format is CURRENT:REVISION:AGE ! libtool_VERSION=6:0:0 # Find the rest of the source tree framework. --- 1340,1346 ---- ### am handles this now? ORIGINAL_LD_FOR_MULTILIBS=$LD # For libtool versioning info, format is CURRENT:REVISION:AGE ! libtool_VERSION=6:1:0 # Find the rest of the source tree framework. *************** irix5* | irix6*) *** 3869,3875 **** # This must be Linux ELF. linux-gnu*) case $host_cpu in ! alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* ) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM --- 3869,3875 ---- # This must be Linux ELF. linux-gnu*) case $host_cpu in ! alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* ) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM *************** if test "${enable_libstdcxx_allocator+se *** 6061,6067 **** enableval="$enable_libstdcxx_allocator" case "$enableval" in ! new|malloc|mt|bitmap|yes|no|auto) ;; *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable libstdcxx-allocator" >&5 echo "$as_me: error: Unknown argument to enable/disable libstdcxx-allocator" >&2;} { (exit 1); exit 1; }; } ;; --- 6061,6067 ---- enableval="$enable_libstdcxx_allocator" case "$enableval" in ! new|malloc|mt|bitmap|pool|yes|no|auto) ;; *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable libstdcxx-allocator" >&5 echo "$as_me: error: Unknown argument to enable/disable libstdcxx-allocator" >&2;} { (exit 1); exit 1; }; } ;; *************** echo "${ECHO_T}$enable_libstdcxx_allocat *** 6112,6117 **** --- 6112,6121 ---- ALLOCATOR_H=config/allocator/new_allocator_base.h ALLOCATOR_NAME=__gnu_cxx::new_allocator ;; + pool) + ALLOCATOR_H=config/allocator/pool_allocator_base.h + ALLOCATOR_NAME=__gnu_cxx::__pool_alloc + ;; esac *************** fi *** 22440,22446 **** echo "${ECHO_T}$glibcxx_cv_func___builtin_abs_link" >&6 if test x$glibcxx_cv_func___builtin_abs_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_abs | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF --- 22444,22451 ---- echo "${ECHO_T}$glibcxx_cv_func___builtin_abs_link" >&6 if test x$glibcxx_cv_func___builtin_abs_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_abs | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF *************** fi *** 22568,22574 **** echo "${ECHO_T}$glibcxx_cv_func___builtin_fabsf_link" >&6 if test x$glibcxx_cv_func___builtin_fabsf_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_fabsf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF --- 22573,22580 ---- echo "${ECHO_T}$glibcxx_cv_func___builtin_fabsf_link" >&6 if test x$glibcxx_cv_func___builtin_fabsf_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_fabsf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF *************** fi *** 22696,22702 **** echo "${ECHO_T}$glibcxx_cv_func___builtin_fabs_link" >&6 if test x$glibcxx_cv_func___builtin_fabs_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_fabs | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF --- 22702,22709 ---- echo "${ECHO_T}$glibcxx_cv_func___builtin_fabs_link" >&6 if test x$glibcxx_cv_func___builtin_fabs_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_fabs | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF *************** fi *** 22824,22830 **** echo "${ECHO_T}$glibcxx_cv_func___builtin_fabsl_link" >&6 if test x$glibcxx_cv_func___builtin_fabsl_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_fabsl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF --- 22831,22838 ---- echo "${ECHO_T}$glibcxx_cv_func___builtin_fabsl_link" >&6 if test x$glibcxx_cv_func___builtin_fabsl_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_fabsl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF *************** fi *** 22952,22958 **** echo "${ECHO_T}$glibcxx_cv_func___builtin_labs_link" >&6 if test x$glibcxx_cv_func___builtin_labs_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_labs | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF --- 22960,22967 ---- echo "${ECHO_T}$glibcxx_cv_func___builtin_labs_link" >&6 if test x$glibcxx_cv_func___builtin_labs_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_labs | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF *************** fi *** 23081,23087 **** echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrtf_link" >&6 if test x$glibcxx_cv_func___builtin_sqrtf_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_sqrtf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF --- 23090,23097 ---- echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrtf_link" >&6 if test x$glibcxx_cv_func___builtin_sqrtf_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_sqrtf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF *************** fi *** 23209,23215 **** echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrt_link" >&6 if test x$glibcxx_cv_func___builtin_sqrt_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_sqrt | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF --- 23219,23226 ---- echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrt_link" >&6 if test x$glibcxx_cv_func___builtin_sqrt_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_sqrt | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF *************** fi *** 23337,23343 **** echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrtl_link" >&6 if test x$glibcxx_cv_func___builtin_sqrtl_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_sqrtl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF --- 23348,23355 ---- echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrtl_link" >&6 if test x$glibcxx_cv_func___builtin_sqrtl_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_sqrtl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF *************** fi *** 23466,23472 **** echo "${ECHO_T}$glibcxx_cv_func___builtin_sinf_link" >&6 if test x$glibcxx_cv_func___builtin_sinf_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_sinf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF --- 23478,23485 ---- echo "${ECHO_T}$glibcxx_cv_func___builtin_sinf_link" >&6 if test x$glibcxx_cv_func___builtin_sinf_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_sinf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF *************** fi *** 23594,23600 **** echo "${ECHO_T}$glibcxx_cv_func___builtin_sin_link" >&6 if test x$glibcxx_cv_func___builtin_sin_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_sin | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF --- 23607,23614 ---- echo "${ECHO_T}$glibcxx_cv_func___builtin_sin_link" >&6 if test x$glibcxx_cv_func___builtin_sin_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_sin | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF *************** fi *** 23722,23728 **** echo "${ECHO_T}$glibcxx_cv_func___builtin_sinl_link" >&6 if test x$glibcxx_cv_func___builtin_sinl_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_sinl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF --- 23736,23743 ---- echo "${ECHO_T}$glibcxx_cv_func___builtin_sinl_link" >&6 if test x$glibcxx_cv_func___builtin_sinl_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_sinl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF *************** fi *** 23851,23857 **** echo "${ECHO_T}$glibcxx_cv_func___builtin_cosf_link" >&6 if test x$glibcxx_cv_func___builtin_cosf_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_cosf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF --- 23866,23873 ---- echo "${ECHO_T}$glibcxx_cv_func___builtin_cosf_link" >&6 if test x$glibcxx_cv_func___builtin_cosf_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_cosf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF *************** fi *** 23979,23985 **** echo "${ECHO_T}$glibcxx_cv_func___builtin_cos_link" >&6 if test x$glibcxx_cv_func___builtin_cos_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_cos | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF --- 23995,24002 ---- echo "${ECHO_T}$glibcxx_cv_func___builtin_cos_link" >&6 if test x$glibcxx_cv_func___builtin_cos_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_cos | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF *************** fi *** 24107,24113 **** echo "${ECHO_T}$glibcxx_cv_func___builtin_cosl_link" >&6 if test x$glibcxx_cv_func___builtin_cosl_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_cosl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF --- 24124,24131 ---- echo "${ECHO_T}$glibcxx_cv_func___builtin_cosl_link" >&6 if test x$glibcxx_cv_func___builtin_cosl_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_cosl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF *************** _ACEOF *** 24115,24180 **** fi - dummyvar=no - if test x$dummyvar = x"yes"; then - cat >>confdefs.h <<\_ACEOF - #define HAVE___BUILTIN_ABS 1 - _ACEOF - - cat >>confdefs.h <<\_ACEOF - #define HAVE___BUILTIN_LABS 1 - _ACEOF - - cat >>confdefs.h <<\_ACEOF - #define HAVE___BUILTIN_COS 1 - _ACEOF - - cat >>confdefs.h <<\_ACEOF - #define HAVE___BUILTIN_COSF 1 - _ACEOF - - cat >>confdefs.h <<\_ACEOF - #define HAVE___BUILTIN_COSL 1 - _ACEOF - - cat >>confdefs.h <<\_ACEOF - #define HAVE___BUILTIN_FABS 1 - _ACEOF - - cat >>confdefs.h <<\_ACEOF - #define HAVE___BUILTIN_FABSF 1 - _ACEOF - - cat >>confdefs.h <<\_ACEOF - #define HAVE___BUILTIN_FABSL 1 - _ACEOF - - cat >>confdefs.h <<\_ACEOF - #define HAVE___BUILTIN_SIN 1 - _ACEOF - - cat >>confdefs.h <<\_ACEOF - #define HAVE___BUILTIN_SINF 1 - _ACEOF - - cat >>confdefs.h <<\_ACEOF - #define HAVE___BUILTIN_SINL 1 - _ACEOF - - cat >>confdefs.h <<\_ACEOF - #define HAVE___BUILTIN_SQRT 1 - _ACEOF - - cat >>confdefs.h <<\_ACEOF - #define HAVE___BUILTIN_SQRTF 1 - _ACEOF - - cat >>confdefs.h <<\_ACEOF - #define HAVE___BUILTIN_SQRTL 1 - _ACEOF - - fi - echo "$as_me:$LINENO: checking for main in -lm" >&5 --- 24133,24138 ---- *************** fi *** 24423,24428 **** --- 24381,24387 ---- done + for ac_func in __signbitf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` *************** done *** 24608,24614 **** fi ! # XXX Review this. Nothing uses it. if test -n "$LIBMATHOBJS"; then need_libmath=yes fi --- 24567,24573 ---- fi ! # Used in libmath/Makefile.am. if test -n "$LIBMATHOBJS"; then need_libmath=yes fi *************** fi *** 42463,42469 **** echo "${ECHO_T}$glibcxx_cv_func___builtin_abs_link" >&6 if test x$glibcxx_cv_func___builtin_abs_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_abs | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF --- 42422,42429 ---- echo "${ECHO_T}$glibcxx_cv_func___builtin_abs_link" >&6 if test x$glibcxx_cv_func___builtin_abs_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_abs | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF *************** fi *** 42591,42597 **** echo "${ECHO_T}$glibcxx_cv_func___builtin_fabsf_link" >&6 if test x$glibcxx_cv_func___builtin_fabsf_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_fabsf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF --- 42551,42558 ---- echo "${ECHO_T}$glibcxx_cv_func___builtin_fabsf_link" >&6 if test x$glibcxx_cv_func___builtin_fabsf_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_fabsf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF *************** fi *** 42719,42725 **** echo "${ECHO_T}$glibcxx_cv_func___builtin_fabs_link" >&6 if test x$glibcxx_cv_func___builtin_fabs_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_fabs | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF --- 42680,42687 ---- echo "${ECHO_T}$glibcxx_cv_func___builtin_fabs_link" >&6 if test x$glibcxx_cv_func___builtin_fabs_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_fabs | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF *************** fi *** 42847,42853 **** echo "${ECHO_T}$glibcxx_cv_func___builtin_fabsl_link" >&6 if test x$glibcxx_cv_func___builtin_fabsl_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_fabsl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF --- 42809,42816 ---- echo "${ECHO_T}$glibcxx_cv_func___builtin_fabsl_link" >&6 if test x$glibcxx_cv_func___builtin_fabsl_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_fabsl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF *************** fi *** 42975,42981 **** echo "${ECHO_T}$glibcxx_cv_func___builtin_labs_link" >&6 if test x$glibcxx_cv_func___builtin_labs_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_labs | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF --- 42938,42945 ---- echo "${ECHO_T}$glibcxx_cv_func___builtin_labs_link" >&6 if test x$glibcxx_cv_func___builtin_labs_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_labs | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF *************** fi *** 43104,43110 **** echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrtf_link" >&6 if test x$glibcxx_cv_func___builtin_sqrtf_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_sqrtf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF --- 43068,43075 ---- echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrtf_link" >&6 if test x$glibcxx_cv_func___builtin_sqrtf_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_sqrtf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF *************** fi *** 43232,43238 **** echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrt_link" >&6 if test x$glibcxx_cv_func___builtin_sqrt_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_sqrt | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF --- 43197,43204 ---- echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrt_link" >&6 if test x$glibcxx_cv_func___builtin_sqrt_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_sqrt | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF *************** fi *** 43360,43366 **** echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrtl_link" >&6 if test x$glibcxx_cv_func___builtin_sqrtl_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_sqrtl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF --- 43326,43333 ---- echo "${ECHO_T}$glibcxx_cv_func___builtin_sqrtl_link" >&6 if test x$glibcxx_cv_func___builtin_sqrtl_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_sqrtl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF *************** fi *** 43489,43495 **** echo "${ECHO_T}$glibcxx_cv_func___builtin_sinf_link" >&6 if test x$glibcxx_cv_func___builtin_sinf_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_sinf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF --- 43456,43463 ---- echo "${ECHO_T}$glibcxx_cv_func___builtin_sinf_link" >&6 if test x$glibcxx_cv_func___builtin_sinf_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_sinf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF *************** fi *** 43617,43623 **** echo "${ECHO_T}$glibcxx_cv_func___builtin_sin_link" >&6 if test x$glibcxx_cv_func___builtin_sin_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_sin | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF --- 43585,43592 ---- echo "${ECHO_T}$glibcxx_cv_func___builtin_sin_link" >&6 if test x$glibcxx_cv_func___builtin_sin_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_sin | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF *************** fi *** 43745,43751 **** echo "${ECHO_T}$glibcxx_cv_func___builtin_sinl_link" >&6 if test x$glibcxx_cv_func___builtin_sinl_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_sinl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF --- 43714,43721 ---- echo "${ECHO_T}$glibcxx_cv_func___builtin_sinl_link" >&6 if test x$glibcxx_cv_func___builtin_sinl_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_sinl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF *************** fi *** 43874,43880 **** echo "${ECHO_T}$glibcxx_cv_func___builtin_cosf_link" >&6 if test x$glibcxx_cv_func___builtin_cosf_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_cosf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF --- 43844,43851 ---- echo "${ECHO_T}$glibcxx_cv_func___builtin_cosf_link" >&6 if test x$glibcxx_cv_func___builtin_cosf_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_cosf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF *************** fi *** 44002,44008 **** echo "${ECHO_T}$glibcxx_cv_func___builtin_cos_link" >&6 if test x$glibcxx_cv_func___builtin_cos_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_cos | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF --- 43973,43980 ---- echo "${ECHO_T}$glibcxx_cv_func___builtin_cos_link" >&6 if test x$glibcxx_cv_func___builtin_cos_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_cos | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF *************** fi *** 44130,44136 **** echo "${ECHO_T}$glibcxx_cv_func___builtin_cosl_link" >&6 if test x$glibcxx_cv_func___builtin_cosl_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_cosl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF --- 44102,44109 ---- echo "${ECHO_T}$glibcxx_cv_func___builtin_cosl_link" >&6 if test x$glibcxx_cv_func___builtin_cosl_link = x"yes"; then ac_tr_func=HAVE_`echo __builtin_cosl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! ! cat >>confdefs.h <<_ACEOF #define ${ac_tr_func} 1 _ACEOF *************** _ACEOF *** 44138,44203 **** fi - dummyvar=no - if test x$dummyvar = x"yes"; then - cat >>confdefs.h <<\_ACEOF - #define HAVE___BUILTIN_ABS 1 - _ACEOF - - cat >>confdefs.h <<\_ACEOF - #define HAVE___BUILTIN_LABS 1 - _ACEOF - - cat >>confdefs.h <<\_ACEOF - #define HAVE___BUILTIN_COS 1 - _ACEOF - - cat >>confdefs.h <<\_ACEOF - #define HAVE___BUILTIN_COSF 1 - _ACEOF - - cat >>confdefs.h <<\_ACEOF - #define HAVE___BUILTIN_COSL 1 - _ACEOF - - cat >>confdefs.h <<\_ACEOF - #define HAVE___BUILTIN_FABS 1 - _ACEOF - - cat >>confdefs.h <<\_ACEOF - #define HAVE___BUILTIN_FABSF 1 - _ACEOF - - cat >>confdefs.h <<\_ACEOF - #define HAVE___BUILTIN_FABSL 1 - _ACEOF - - cat >>confdefs.h <<\_ACEOF - #define HAVE___BUILTIN_SIN 1 - _ACEOF - - cat >>confdefs.h <<\_ACEOF - #define HAVE___BUILTIN_SINF 1 - _ACEOF - - cat >>confdefs.h <<\_ACEOF - #define HAVE___BUILTIN_SINL 1 - _ACEOF - - cat >>confdefs.h <<\_ACEOF - #define HAVE___BUILTIN_SQRT 1 - _ACEOF - - cat >>confdefs.h <<\_ACEOF - #define HAVE___BUILTIN_SQRTF 1 - _ACEOF - - cat >>confdefs.h <<\_ACEOF - #define HAVE___BUILTIN_SQRTL 1 - _ACEOF - - fi - echo "$as_me:$LINENO: checking for main in -lm" >&5 --- 44111,44116 ---- *************** fi *** 44446,44451 **** --- 44359,44365 ---- done + for ac_func in __signbitf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` *************** done *** 44631,44637 **** fi ! # XXX Review this. Nothing uses it. if test -n "$LIBMATHOBJS"; then need_libmath=yes fi --- 44545,44551 ---- fi ! # Used in libmath/Makefile.am. if test -n "$LIBMATHOBJS"; then need_libmath=yes fi *************** fi *** 47308,47313 **** --- 47222,47228 ---- done + for ac_func in __signbitf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` *************** done *** 47493,47499 **** fi ! # XXX Review this. Nothing uses it. if test -n "$LIBMATHOBJS"; then need_libmath=yes fi --- 47408,47414 ---- fi ! # Used in libmath/Makefile.am. if test -n "$LIBMATHOBJS"; then need_libmath=yes fi *************** fi *** 49445,49450 **** --- 49360,49366 ---- done + for ac_func in __signbitf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` *************** done *** 49630,49636 **** fi ! # XXX Review this. Nothing uses it. if test -n "$LIBMATHOBJS"; then need_libmath=yes fi --- 49546,49552 ---- fi ! # Used in libmath/Makefile.am. if test -n "$LIBMATHOBJS"; then need_libmath=yes fi *************** _ACEOF *** 50948,50956 **** for ac_header in nan.h ieeefp.h endian.h sys/isa_defs.h \ machine/endian.h machine/param.h sys/machine.h sys/types.h \ ! fp.h locale.h float.h inttypes.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then --- 50864,50875 ---- + + + for ac_header in nan.h ieeefp.h endian.h sys/isa_defs.h \ machine/endian.h machine/param.h sys/machine.h sys/types.h \ ! fp.h float.h endian.h inttypes.h locale.h float.h stdint.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then *************** fi *** 51455,51460 **** --- 51374,51380 ---- done + for ac_func in __signbitf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` *************** done *** 51640,51646 **** fi ! # XXX Review this. Nothing uses it. if test -n "$LIBMATHOBJS"; then need_libmath=yes fi --- 51560,51566 ---- fi ! # Used in libmath/Makefile.am. if test -n "$LIBMATHOBJS"; then need_libmath=yes fi *************** _ACEOF *** 53435,53440 **** --- 53355,53380 ---- cat >>confdefs.h <<\_ACEOF + #define HAVE_ACOSF 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_ASINF 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_ATANF 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_ATAN2F 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_CEILF 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF #define HAVE_COPYSIGN 1 _ACEOF *************** _ACEOF *** 53443,53448 **** --- 53383,53404 ---- _ACEOF cat >>confdefs.h <<\_ACEOF + #define HAVE_COSF 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_COSHF 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_EXPF 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_FABSF 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF #define HAVE_FINITE 1 _ACEOF *************** _ACEOF *** 53451,53460 **** --- 53407,53428 ---- _ACEOF cat >>confdefs.h <<\_ACEOF + #define HAVE_FLOORF 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_FMODF 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF #define HAVE_FREXPF 1 _ACEOF cat >>confdefs.h <<\_ACEOF + #define HAVE_HYPOT 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF #define HAVE_HYPOTF 1 _ACEOF *************** _ACEOF *** 53475,53480 **** --- 53443,53468 ---- _ACEOF cat >>confdefs.h <<\_ACEOF + #define HAVE_LOGF 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_LOG10F 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_MODFF 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_SINF 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_SINHF 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF #define HAVE_SINCOS 1 _ACEOF *************** _ACEOF *** 53482,53493 **** --- 53470,53545 ---- #define HAVE_SINCOSF 1 _ACEOF + cat >>confdefs.h <<\_ACEOF + #define HAVE_SQRTF 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_TANF 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_TANHF 1 + _ACEOF + if test x"long_double_math_on_this_cpu" = x"yes"; then cat >>confdefs.h <<\_ACEOF + #define HAVE_ACOSL 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_ASINL 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_ATANL 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_ATAN2L 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_CEILL 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_COPYSIGNL 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_COSL 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_COSHL 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_EXPL 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_FABSL 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF #define HAVE_FINITEL 1 _ACEOF cat >>confdefs.h <<\_ACEOF + #define HAVE_FLOORL 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_FMODL 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_FREXPL 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF #define HAVE_HYPOTL 1 _ACEOF *************** _ACEOF *** 53499,53504 **** --- 53551,53596 ---- #define HAVE_ISNANL 1 _ACEOF + cat >>confdefs.h <<\_ACEOF + #define HAVE_LOGL 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_LOG10L 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_MODFL 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_POWL 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_SINL 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_SINHL 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_SINCOSL 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_SQRTL 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_TANL 1 + _ACEOF + + cat >>confdefs.h <<\_ACEOF + #define HAVE_TANHL 1 + _ACEOF + fi ;; *-mingw32*) *************** fi *** 54008,54013 **** --- 54100,54106 ---- done + for ac_func in __signbitf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` *************** done *** 54193,54199 **** fi ! # XXX Review this. Nothing uses it. if test -n "$LIBMATHOBJS"; then need_libmath=yes fi --- 54286,54292 ---- fi ! # Used in libmath/Makefile.am. if test -n "$LIBMATHOBJS"; then need_libmath=yes fi *************** fi *** 55974,55979 **** --- 56067,56073 ---- done + for ac_func in __signbitf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` *************** done *** 56159,56165 **** fi ! # XXX Review this. Nothing uses it. if test -n "$LIBMATHOBJS"; then need_libmath=yes fi --- 56253,56259 ---- fi ! # Used in libmath/Makefile.am. if test -n "$LIBMATHOBJS"; then need_libmath=yes fi *************** fi *** 57839,57844 **** --- 57933,57939 ---- done + for ac_func in __signbitf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` *************** done *** 58024,58030 **** fi ! # XXX Review this. Nothing uses it. if test -n "$LIBMATHOBJS"; then need_libmath=yes fi --- 58119,58125 ---- fi ! # Used in libmath/Makefile.am. if test -n "$LIBMATHOBJS"; then need_libmath=yes fi *************** fi *** 61517,61522 **** --- 61612,61618 ---- done + for ac_func in __signbitf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` *************** done *** 61702,61708 **** fi ! # XXX Review this. Nothing uses it. if test -n "$LIBMATHOBJS"; then need_libmath=yes fi --- 61798,61804 ---- fi ! # Used in libmath/Makefile.am. if test -n "$LIBMATHOBJS"; then need_libmath=yes fi *************** echo "$as_me: versioning on shared libra *** 63565,63571 **** # This depends on GLIBCXX_ENABLE_SYMVERS and GLIBCXX_IS_NATIVE. if $GLIBCXX_IS_NATIVE && test $is_hosted = yes; then ! # Do checks for memory limit functions. setrlimit_have_headers=yes --- 63661,63667 ---- # This depends on GLIBCXX_ENABLE_SYMVERS and GLIBCXX_IS_NATIVE. if $GLIBCXX_IS_NATIVE && test $is_hosted = yes; then ! # Do checks for resource limit functions. setrlimit_have_headers=yes *************** fi *** 63760,63766 **** rm -f conftest.$ac_objext conftest.$ac_ext cat >>confdefs.h <<_ACEOF ! #define HAVE_MEMLIMIT_DATA $glibcxx_mresult _ACEOF --- 63856,63862 ---- rm -f conftest.$ac_objext conftest.$ac_ext cat >>confdefs.h <<_ACEOF ! #define HAVE_LIMIT_DATA $glibcxx_mresult _ACEOF *************** fi *** 63806,63812 **** rm -f conftest.$ac_objext conftest.$ac_ext cat >>confdefs.h <<_ACEOF ! #define HAVE_MEMLIMIT_RSS $glibcxx_mresult _ACEOF --- 63902,63908 ---- rm -f conftest.$ac_objext conftest.$ac_ext cat >>confdefs.h <<_ACEOF ! #define HAVE_LIMIT_RSS $glibcxx_mresult _ACEOF *************** fi *** 63852,63858 **** rm -f conftest.$ac_objext conftest.$ac_ext cat >>confdefs.h <<_ACEOF ! #define HAVE_MEMLIMIT_VMEM $glibcxx_mresult _ACEOF --- 63948,63954 ---- rm -f conftest.$ac_objext conftest.$ac_ext cat >>confdefs.h <<_ACEOF ! #define HAVE_LIMIT_VMEM $glibcxx_mresult _ACEOF *************** fi *** 63898,63904 **** rm -f conftest.$ac_objext conftest.$ac_ext cat >>confdefs.h <<_ACEOF ! #define HAVE_MEMLIMIT_AS $glibcxx_mresult _ACEOF --- 63994,64046 ---- rm -f conftest.$ac_objext conftest.$ac_ext cat >>confdefs.h <<_ACEOF ! #define HAVE_LIMIT_AS $glibcxx_mresult ! _ACEOF ! ! ! ! cat >conftest.$ac_ext <<_ACEOF ! #line $LINENO "configure" ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #include ! #include ! #include ! ! int ! main () ! { ! int f = RLIMIT_FSIZE ; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! glibcxx_mresult=1 ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! glibcxx_mresult=0 ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! ! cat >>confdefs.h <<_ACEOF ! #define HAVE_LIMIT_FSIZE $glibcxx_mresult _ACEOF *************** fi *** 63953,63971 **** fi ! echo "$as_me:$LINENO: checking for testsuite memory limit support" >&5 ! echo $ECHO_N "checking for testsuite memory limit support... $ECHO_C" >&6 if test $setrlimit_have_headers = yes && test $ac_setrlimit = yes; then ! ac_mem_limits=yes cat >>confdefs.h <<\_ACEOF ! #define _GLIBCXX_MEM_LIMITS 1 _ACEOF else ! ac_mem_limits=no fi ! echo "$as_me:$LINENO: result: $ac_mem_limits" >&5 ! echo "${ECHO_T}$ac_mem_limits" >&6 # Look for setenv, so that extended locale tests can be performed. --- 64095,64113 ---- fi ! echo "$as_me:$LINENO: checking for testsuite resource limits support" >&5 ! echo $ECHO_N "checking for testsuite resource limits support... $ECHO_C" >&6 if test $setrlimit_have_headers = yes && test $ac_setrlimit = yes; then ! ac_res_limits=yes cat >>confdefs.h <<\_ACEOF ! #define _GLIBCXX_RES_LIMITS 1 _ACEOF else ! ac_res_limits=no fi ! echo "$as_me:$LINENO: result: $ac_res_limits" >&5 ! echo "${ECHO_T}$ac_res_limits" >&6 # Look for setenv, so that extended locale tests can be performed. diff -Nrc3pad gcc-3.4.0/libstdc++-v3/configure.ac gcc-3.4.1/libstdc++-v3/configure.ac *** gcc-3.4.0/libstdc++-v3/configure.ac 2004-03-18 17:36:12.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/configure.ac 2004-05-31 21:18:53.000000000 +0000 *************** AC_CONFIG_HEADER(config.h) *** 13,19 **** ### am handles this now? ORIGINAL_LD_FOR_MULTILIBS=$LD # For libtool versioning info, format is CURRENT:REVISION:AGE ! libtool_VERSION=6:0:0 AC_SUBST(libtool_VERSION) # Find the rest of the source tree framework. --- 13,19 ---- ### am handles this now? ORIGINAL_LD_FOR_MULTILIBS=$LD # For libtool versioning info, format is CURRENT:REVISION:AGE ! libtool_VERSION=6:1:0 AC_SUBST(libtool_VERSION) # Find the rest of the source tree framework. diff -Nrc3pad gcc-3.4.0/libstdc++-v3/crossconfig.m4 gcc-3.4.1/libstdc++-v3/crossconfig.m4 *** gcc-3.4.0/libstdc++-v3/crossconfig.m4 2004-02-09 07:17:55.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/crossconfig.m4 2004-06-10 17:12:14.000000000 +0000 *************** case "${host}" in *** 125,131 **** *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu) AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \ machine/endian.h machine/param.h sys/machine.h sys/types.h \ ! fp.h locale.h float.h inttypes.h]) SECTION_FLAGS='-ffunction-sections -fdata-sections' AC_SUBST(SECTION_FLAGS) GLIBCXX_CHECK_LINKER_FEATURES --- 125,131 ---- *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu) AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \ machine/endian.h machine/param.h sys/machine.h sys/types.h \ ! fp.h float.h endian.h inttypes.h locale.h float.h stdint.h]) SECTION_FLAGS='-ffunction-sections -fdata-sections' AC_SUBST(SECTION_FLAGS) GLIBCXX_CHECK_LINKER_FEATURES *************** case "${host}" in *** 151,173 **** --- 151,216 ---- AC_CHECK_HEADERS(sys/uio.h) GLIBCXX_CHECK_WRITEV + AC_DEFINE(HAVE_ACOSF) + AC_DEFINE(HAVE_ASINF) + AC_DEFINE(HAVE_ATANF) + AC_DEFINE(HAVE_ATAN2F) + AC_DEFINE(HAVE_CEILF) AC_DEFINE(HAVE_COPYSIGN) AC_DEFINE(HAVE_COPYSIGNF) + AC_DEFINE(HAVE_COSF) + AC_DEFINE(HAVE_COSHF) + AC_DEFINE(HAVE_EXPF) + AC_DEFINE(HAVE_FABSF) AC_DEFINE(HAVE_FINITE) AC_DEFINE(HAVE_FINITEF) + AC_DEFINE(HAVE_FLOORF) + AC_DEFINE(HAVE_FMODF) AC_DEFINE(HAVE_FREXPF) + AC_DEFINE(HAVE_HYPOT) AC_DEFINE(HAVE_HYPOTF) AC_DEFINE(HAVE_ISINF) AC_DEFINE(HAVE_ISINFF) AC_DEFINE(HAVE_ISNAN) AC_DEFINE(HAVE_ISNANF) + AC_DEFINE(HAVE_LOGF) + AC_DEFINE(HAVE_LOG10F) + AC_DEFINE(HAVE_MODFF) + AC_DEFINE(HAVE_SINF) + AC_DEFINE(HAVE_SINHF) AC_DEFINE(HAVE_SINCOS) AC_DEFINE(HAVE_SINCOSF) + AC_DEFINE(HAVE_SQRTF) + AC_DEFINE(HAVE_TANF) + AC_DEFINE(HAVE_TANHF) if test x"long_double_math_on_this_cpu" = x"yes"; then + AC_DEFINE(HAVE_ACOSL) + AC_DEFINE(HAVE_ASINL) + AC_DEFINE(HAVE_ATANL) + AC_DEFINE(HAVE_ATAN2L) + AC_DEFINE(HAVE_CEILL) + AC_DEFINE(HAVE_COPYSIGNL) + AC_DEFINE(HAVE_COSL) + AC_DEFINE(HAVE_COSHL) + AC_DEFINE(HAVE_EXPL) + AC_DEFINE(HAVE_FABSL) AC_DEFINE(HAVE_FINITEL) + AC_DEFINE(HAVE_FLOORL) + AC_DEFINE(HAVE_FMODL) + AC_DEFINE(HAVE_FREXPL) AC_DEFINE(HAVE_HYPOTL) AC_DEFINE(HAVE_ISINFL) AC_DEFINE(HAVE_ISNANL) + AC_DEFINE(HAVE_LOGL) + AC_DEFINE(HAVE_LOG10L) + AC_DEFINE(HAVE_MODFL) + AC_DEFINE(HAVE_POWL) + AC_DEFINE(HAVE_SINL) + AC_DEFINE(HAVE_SINHL) + AC_DEFINE(HAVE_SINCOSL) + AC_DEFINE(HAVE_SQRTL) + AC_DEFINE(HAVE_TANL) + AC_DEFINE(HAVE_TANHL) fi ;; *-mingw32*) diff -Nrc3pad gcc-3.4.0/libstdc++-v3/docs/doxygen/filter.sed gcc-3.4.1/libstdc++-v3/docs/doxygen/filter.sed *** gcc-3.4.0/libstdc++-v3/docs/doxygen/filter.sed 2003-05-30 19:12:55.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/docs/doxygen/filter.sed 2004-06-10 15:46:51.000000000 +0000 *************** *** 1,5 **** # Input filter for doxygen. ! # Copyright (C) 2003 Free Software Foundation, Inc. # Phil Edwards # single+capital is easy --- 1,5 ---- # Input filter for doxygen. ! # Copyright (C) 2003, 2004 Free Software Foundation, Inc. # Phil Edwards # single+capital is easy *************** s/__s/s/g *** 23,26 **** s/__value/value/g s/__x/x/g s/__y/y/g ! --- 23,26 ---- s/__value/value/g s/__x/x/g s/__y/y/g ! s/GLIBCXXSTD/std/g diff -Nrc3pad gcc-3.4.0/libstdc++-v3/docs/doxygen/guide.html gcc-3.4.1/libstdc++-v3/docs/doxygen/guide.html *** gcc-3.4.0/libstdc++-v3/docs/doxygen/guide.html 2003-08-05 01:20:15.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/docs/doxygen/guide.html 2004-05-22 05:07:19.000000000 +0000 *************** *** 34,39 **** --- 34,44 ---- Doxygen , a working version of g++ somewhere in the PATH, and the GNU coreutils. + + In addition, to generate the pretty pictures, the + Graphviz + package will need to be installed. (g++ is used to build a program which manipulates man pages. GNU versions of find, xargs, and possibly sed and grep are used, just because the GNU versions make things very easy.) diff -Nrc3pad gcc-3.4.0/libstdc++-v3/docs/doxygen/Intro.3 gcc-3.4.1/libstdc++-v3/docs/doxygen/Intro.3 *** gcc-3.4.0/libstdc++-v3/docs/doxygen/Intro.3 2003-02-26 00:02:16.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/docs/doxygen/Intro.3 2004-05-22 05:07:19.000000000 +0000 *************** *** 1,6 **** .\" t .\" This man page is released under the FDL as part of libstdc++-v3. ! .TH C++Intro 3 "25 Febuary 2003" "GNU libstdc++-v3" "Standard C++ Library" .SH NAME C++Intro \- Introduction to the GNU libstdc++-v3 man pages .SH DESCRIPTION --- 1,6 ---- .\" t .\" This man page is released under the FDL as part of libstdc++-v3. ! .TH C++Intro 3 "20 May 2004" "GNU libstdc++-v3" "Standard C++ Library" .SH NAME C++Intro \- Introduction to the GNU libstdc++-v3 man pages .SH DESCRIPTION *************** and have manual entries beginning with " *** 16,22 **** documentation of the template class .I std::vector one would use "man std::vector". Some entities do not have a separate man ! page; for those see the main listing in "man Namespace_Std". .P All the man pages are automatically generated by Doxygen. For more information on this tool, see the HTML counterpart to these man pages. --- 16,22 ---- documentation of the template class .I std::vector one would use "man std::vector". Some entities do not have a separate man ! page; for those see the main listing in "man Namespace_std". .P All the man pages are automatically generated by Doxygen. For more information on this tool, see the HTML counterpart to these man pages. *************** introduction to the various categories, *** 27,51 **** or Austern's.) These category pages are: .P .\" These are separated by ONE TAB. Nothing else. I don't like it either. - .\" Keep them alphabatized. .TS lB l. ! Allocators Classes encapsulating memory allocation schemes. ! Arithmetic_functors Functors for basic math. Assoc_containers Key-based containers. Binder_functors Functors which "remember" an argument. Comparison_functors Functors wrapping built-in comparisons. - Containers An introduction to container classes. Func_ptr_functors Functors for use with pointers to functions. - C++Intro This page. - Intro_functors An introduction to function objects, or functors. - Iterator_types Programatically distinguishing iterators/pointers. Logical_functors Functors wrapping the Boolean operations. Member_ptr_functor Functors for use with pointers to members. - Namespace_Std A listing of the contents of std::. Negation_functors Functors which negate their contents. SGIextensions A list of the extensions from the SGI STL subset. ! Sequences Linear containers. .TE .P The HTML documentation typically goes into much more depth. --- 27,51 ---- or Austern's.) These category pages are: .P .\" These are separated by ONE TAB. Nothing else. I don't like it either. .TS lB l. ! C++Intro This page. ! Namespace_std A listing of the contents of std::. ! Namespace___gnu_cxx A listing of the contents of __gnu_cxx::. ! Containers An introduction to container classes. ! Sequences Linear containers. Assoc_containers Key-based containers. + Iterator_types Programatically distinguishing iterators/pointers. + Intro_functors An introduction to function objects, or functors. + Arithmetic_functors Functors for basic math. Binder_functors Functors which "remember" an argument. Comparison_functors Functors wrapping built-in comparisons. Func_ptr_functors Functors for use with pointers to functions. Logical_functors Functors wrapping the Boolean operations. Member_ptr_functor Functors for use with pointers to members. Negation_functors Functors which negate their contents. SGIextensions A list of the extensions from the SGI STL subset. ! .TE .P The HTML documentation typically goes into much more depth. *************** in the name. Otherwise you need to read *** 94,103 **** .\" Easy way to generate these columns of headers is to use GNU ls(1): .\" ls -w 40 file1 file2... | sed 's=[a-z_][a-z_]*==g' .TS ! lB. ! ! ! .TE .SS Libraries .TP --- 94,109 ---- .\" Easy way to generate these columns of headers is to use GNU ls(1): .\" ls -w 40 file1 file2... | sed 's=[a-z_][a-z_]*==g' .TS ! lB lB. ! ! ! ! ! ! ! ! ! .TE .SS Libraries .TP diff -Nrc3pad gcc-3.4.0/libstdc++-v3/docs/doxygen/mainpage.html gcc-3.4.1/libstdc++-v3/docs/doxygen/mainpage.html *** gcc-3.4.0/libstdc++-v3/docs/doxygen/mainpage.html 2003-08-05 01:20:15.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/docs/doxygen/mainpage.html 2004-06-10 15:46:51.000000000 +0000 *************** *** 48,59 ****
  • Modules
  • Namespace List
  • Class Hierarchy -
  • Alphabetical List
  • Compound List
  • File List -
  • Namespace Members -
  • Compound Members -
  • File Members
  • TODO List (This is incomplete... how ironic.)

    --- 48,56 ----
  • Modules
  • Namespace List
  • Class Hierarchy
  • Compound List +
  • Alphabetical List
  • File List
  • TODO List (This is incomplete... how ironic.)

    diff -Nrc3pad gcc-3.4.0/libstdc++-v3/docs/doxygen/run_doxygen gcc-3.4.1/libstdc++-v3/docs/doxygen/run_doxygen *** gcc-3.4.0/libstdc++-v3/docs/doxygen/run_doxygen 2003-09-13 20:58:27.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/docs/doxygen/run_doxygen 2004-05-22 07:13:13.000000000 +0000 *************** *** 9,15 **** # We can check now that the version of doxygen is >= this variable. ! DOXYVER=1.2.15 find_doxygen() { local -r v_required=`echo $DOXYVER | \ --- 9,15 ---- # We can check now that the version of doxygen is >= this variable. ! DOXYVER=1.3.7 find_doxygen() { local -r v_required=`echo $DOXYVER | \ *************** mv s20_3_5_negators.3 Negation_fun *** 215,228 **** mv s20_3_6_binder.3 Binder_functors.3 mv s20_3_7_adaptors.3 Func_ptr_functors.3 mv s20_3_8_memadaptors.3 Member_ptr_functors.3 - mv std.3 Namespace_Std.3 mv iterator_tags.3 Iterator_types.3 # man pages are for functions/types/other entities, not source files # directly. who the heck would type "man foo.h" anyhow? find . -name "[a-z]*" -a ! -name "std_*" -print | xargs rm ! rm -f *.h.3 *config* *.cc.3 *.tcc.3 ! rm -f *_t.3 # workaround doxygen template parsing bug for now # this is used to examine what we would have deleted, for debugging #mkdir trash #find . -name "[a-z]*" -a ! -name "std_*" -print | xargs -i mv {} trash --- 215,228 ---- mv s20_3_6_binder.3 Binder_functors.3 mv s20_3_7_adaptors.3 Func_ptr_functors.3 mv s20_3_8_memadaptors.3 Member_ptr_functors.3 mv iterator_tags.3 Iterator_types.3 + mv std.3 Namespace_std.3 + mv __gnu_cxx.3 Namespace___gnu_cxx.3 # man pages are for functions/types/other entities, not source files # directly. who the heck would type "man foo.h" anyhow? find . -name "[a-z]*" -a ! -name "std_*" -print | xargs rm ! rm -f *.h.3 *config* *.cc.3 *.tcc.3 *_t.3 # this is used to examine what we would have deleted, for debugging #mkdir trash #find . -name "[a-z]*" -a ! -name "std_*" -print | xargs -i mv {} trash *************** rm stdheader *** 247,254 **** # implementations of man(1), e.g., Linux's. We need to have another top-level # *roff tag to /stop/ the .SH NAME entry. #problematic=`egrep --files-without-match '^\.SH SYNOPSIS' [A-Z]*.3` ! problematic='Containers.3 Sequences.3 Assoc_containers.3 Allocators.3 ! Iterator_types.3' for f in $problematic; do sed '/^\.SH NAME/{ n --- 247,253 ---- # implementations of man(1), e.g., Linux's. We need to have another top-level # *roff tag to /stop/ the .SH NAME entry. #problematic=`egrep --files-without-match '^\.SH SYNOPSIS' [A-Z]*.3` ! problematic='Containers.3 Sequences.3 Assoc_containers.3 Iterator_types.3' for f in $problematic; do sed '/^\.SH NAME/{ n *************** for f in __gnu_cxx_*; do *** 280,287 **** newname=`echo $f | sed 's/^__gnu_cxx_/__gnu_cxx::/'` mv $f $newname done ! for f in *__policy_*; do ! newname=`echo $f | sed 's/__policy_/__policy::/'` mv $f $newname done --- 279,290 ---- newname=`echo $f | sed 's/^__gnu_cxx_/__gnu_cxx::/'` mv $f $newname done ! for f in __gnu_debug_*; do ! newname=`echo $f | sed 's/^__gnu_debug_/__gnu_debug::/'` ! mv $f $newname ! done ! for f in GLIBCXXSTD_*; do ! newname=`echo $f | sed 's/^GLIBCXXSTD_/std::/'` mv $f $newname done diff -Nrc3pad gcc-3.4.0/libstdc++-v3/docs/doxygen/stdheader.cc gcc-3.4.1/libstdc++-v3/docs/doxygen/stdheader.cc *** gcc-3.4.0/libstdc++-v3/docs/doxygen/stdheader.cc 2002-11-21 08:16:32.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/docs/doxygen/stdheader.cc 2004-05-22 05:07:19.000000000 +0000 *************** void init_map() *** 25,41 **** headers["algo.h"] = "algorithm"; headers["algobase.h"] = "algorithm"; headers["algorithm.h"] = "algorithm"; ! headers["alloc.h"] = "memory"; headers["basic_ios.h"] = "ios"; headers["basic_ios.tcc"] = "ios"; - headers["basic_string.h"] = "string"; - headers["basic_string.tcc"] = "string"; headers["bitset.h"] = "bitset"; headers["bvector.h"] = "vector"; - //headers["char_traits.h"] uhhhhhh headers["complex.h"] = "complex"; //headers["construct.h"] stl_construct.h entirely internal headers["deque.h"] = "deque"; headers["fstream.h"] = "fstream"; headers["fstream.tcc"] = "fstream"; headers["function.h"] = "functional"; --- 25,39 ---- headers["algo.h"] = "algorithm"; headers["algobase.h"] = "algorithm"; headers["algorithm.h"] = "algorithm"; ! headers["allocator.h"] = "memory"; headers["basic_ios.h"] = "ios"; headers["basic_ios.tcc"] = "ios"; headers["bitset.h"] = "bitset"; headers["bvector.h"] = "vector"; headers["complex.h"] = "complex"; //headers["construct.h"] stl_construct.h entirely internal headers["deque.h"] = "deque"; + headers["deque.tcc"] = "deque"; headers["fstream.h"] = "fstream"; headers["fstream.tcc"] = "fstream"; headers["function.h"] = "functional"; *************** void init_map() *** 52,58 **** --- 50,60 ---- headers["iterator_base_types.h"] = "iterator"; headers["limits.h"] = "limits"; headers["list.h"] = "list"; + headers["list.tcc"] = "list"; + headers["codecvt.h"] = "locale"; headers["locale.h"] = "locale"; + headers["localefwd.h"] = "locale"; + headers["locale_classes.h"] = "locale"; headers["locale_facets.h"] = "locale"; headers["locale_facets.tcc"] = "locale"; headers["map.h"] = "map"; *************** void init_map() *** 63,69 **** headers["ostream.h"] = "ostream"; headers["ostream.tcc"] = "ostream"; headers["pair.h"] = "utility"; - //headers["pthread_alloc.h"] who knows headers["queue.h"] = "queue"; headers["raw_storage_iter.h"] = "memory"; headers["relops.h"] = "utility"; --- 65,70 ---- *************** void init_map() *** 71,91 **** headers["sstream.h"] = "sstream"; headers["sstream.tcc"] = "sstream"; headers["stack.h"] = "stack"; headers["stdexcept.h"] = "stdexcept"; headers["streambuf.h"] = "streambuf"; headers["streambuf.tcc"] = "streambuf"; headers["string.h"] = "string"; headers["tempbuf.h"] = "memory"; - //headers["threads.h"] who knows headers["tree.h"] = "backward/tree.h"; headers["uninitialized.h"] = "memory"; headers["utility.h"] = "utility"; headers["valarray.h"] = "valarray"; headers["valarray_array.h"] = "valarray"; headers["valarray_array.tcc"] = "valarray"; headers["valarray_meta.h"] = "valarray"; headers["vector.h"] = "vector"; // C wrappers -- probably was an easier way to do these, but oh well headers["cassert.h"] = "cassert"; headers["cctype.h"] = "cctype"; --- 72,109 ---- headers["sstream.h"] = "sstream"; headers["sstream.tcc"] = "sstream"; headers["stack.h"] = "stack"; + headers["functexcept.h"] = "stdexcept"; headers["stdexcept.h"] = "stdexcept"; + headers["stream_iterator.h"] = "iterator"; + headers["streambuf_iterator.h"] = "iterator"; headers["streambuf.h"] = "streambuf"; headers["streambuf.tcc"] = "streambuf"; headers["string.h"] = "string"; + headers["char_traits.h"] = "string"; + headers["postypes.h"] = "string"; + headers["basic_string.h"] = "string"; + headers["basic_string.tcc"] = "string"; headers["tempbuf.h"] = "memory"; headers["tree.h"] = "backward/tree.h"; headers["uninitialized.h"] = "memory"; headers["utility.h"] = "utility"; + headers["gslice.h"] = "valarray"; + headers["gslice_array.h"] = "valarray"; + headers["indirect_array.h"] = "valarray"; + headers["mask_array.h"] = "valarray"; + headers["slice_array.h"] = "valarray"; headers["valarray.h"] = "valarray"; + headers["valarray_after.h"] = "valarray"; + headers["valarray_before.h"] = "valarray"; headers["valarray_array.h"] = "valarray"; headers["valarray_array.tcc"] = "valarray"; headers["valarray_meta.h"] = "valarray"; headers["vector.h"] = "vector"; + //headers["threads.h"] who knows + //headers["concurrence.h"] who knows + //headers["atomicity.h"] who knows + // C wrappers -- probably was an easier way to do these, but oh well headers["cassert.h"] = "cassert"; headers["cctype.h"] = "cctype"; *************** int main (int argc, char**) *** 149,153 **** do_word (w); } - // vim:ts=4:et: --- 167,170 ---- diff -Nrc3pad gcc-3.4.0/libstdc++-v3/docs/doxygen/user.cfg.in gcc-3.4.1/libstdc++-v3/docs/doxygen/user.cfg.in *** gcc-3.4.0/libstdc++-v3/docs/doxygen/user.cfg.in 2003-09-13 20:58:27.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/docs/doxygen/user.cfg.in 2004-05-22 05:07:19.000000000 +0000 *************** *** 1,4 **** ! # Doxyfile 1.3-rc2 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project --- 1,4 ---- ! # Doxyfile 1.3.7 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project *************** *** 10,24 **** # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") - ### When doxygen is run, the current directory is the top of the - ### libstdc++-v3 build directory. Keep this in mind while writing - ### relative-path directories. - ### - ### Currently this is not really run through autoconf; it just looks that way. - - #--------------------------------------------------------------------------- ! # General configuration options #--------------------------------------------------------------------------- # The PROJECT_NAME tag is a single word (or a sequence of words surrounded --- 10,17 ---- # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- ! # Project related configuration options #--------------------------------------------------------------------------- # The PROJECT_NAME tag is a single word (or a sequence of words surrounded *************** PROJECT_NUMBER = *** 39,55 **** OUTPUT_DIRECTORY = @outdir@ # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, # Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en ! # (Japanese with english messages), Korean, Norwegian, Polish, Portuguese, ! # Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish and Ukrainian. OUTPUT_LANGUAGE = English # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless --- 32,212 ---- OUTPUT_DIRECTORY = @outdir@ + # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create + # 2 levels of 10 sub-directories under the output directory of each output + # format and will distribute the generated files over these directories. + # Enabling this option can be useful when feeding doxygen a huge amount of source + # files, where putting all generated files in the same directory would otherwise + # cause performance problems for the file system. + + CREATE_SUBDIRS = NO + # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, # Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en ! # (Japanese with English messages), Korean, Korean-en, Norwegian, Polish, Portuguese, ! # Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. OUTPUT_LANGUAGE = English + # This tag can be used to specify the encoding used in the generated output. + # The encoding is not always determined by the language that is chosen, + # but also whether or not the output is meant for Windows or non-Windows users. + # In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES + # forces the Windows encoding (this is the default for the Windows binary), + # whereas setting the tag to NO uses a Unix-style encoding (the default for + # all platforms other than Windows). + + USE_WINDOWS_ENCODING = NO + + # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will + # include brief member descriptions after the members that are listed in + # the file and class documentation (similar to JavaDoc). + # Set to NO to disable this. + + BRIEF_MEMBER_DESC = YES + + # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend + # the brief description of a member or function before the detailed description. + # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the + # brief descriptions will be completely suppressed. + + REPEAT_BRIEF = YES + + # This tag implements a quasi-intelligent brief description abbreviator + # that is used to form the text in various listings. Each string + # in this list, if found as the leading text of the brief description, will be + # stripped from the text and the result after processing the whole list, is used + # as the annotated text. Otherwise, the brief description is used as-is. If left + # blank, the following values are used ("$name" is automatically replaced with the + # name of the entity): "The $name class" "The $name widget" "The $name file" + # "is" "provides" "specifies" "contains" "represents" "a" "an" "the" + + ABBREVIATE_BRIEF = + + # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then + # Doxygen will generate a detailed section even if there is only a brief + # description. + + ALWAYS_DETAILED_SEC = YES + + # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited + # members of a class in the documentation of that class as if those members were + # ordinary class members. Constructors, destructors and assignment operators of + # the base classes will not be shown. + + INLINE_INHERITED_MEMB = YES + + # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full + # path before files name in the file list and in the header files. If set + # to NO the shortest path that makes the file name unique will be used. + + FULL_PATH_NAMES = NO + + # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag + # can be used to strip a user-defined part of the path. Stripping is + # only done if one of the specified strings matches the left-hand part of + # the path. The tag can be used to show relative paths in the file list. + # If left blank the directory from which doxygen is run is used as the + # path to strip. + + STRIP_FROM_PATH = + + # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of + # the path mentioned in the documentation of a class, which tells + # the reader which header file to include in order to use a class. + # If left blank only the name of the header file containing the class + # definition is used. Otherwise one should specify the include paths that + # are normally passed to the compiler using the -I flag. + + STRIP_FROM_INC_PATH = + + # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter + # (but less readable) file names. This can be useful is your file systems + # doesn't support long names like on DOS, Mac, or CD-ROM. + + SHORT_NAMES = NO + + # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen + # will interpret the first line (until the first dot) of a JavaDoc-style + # comment as the brief description. If set to NO, the JavaDoc + # comments will behave just like the Qt-style comments (thus requiring an + # explicit @brief command for a brief description. + + JAVADOC_AUTOBRIEF = NO + + # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen + # treat a multi-line C++ special comment block (i.e. a block of //! or /// + # comments) as a brief description. This used to be the default behaviour. + # The new default is to treat a multi-line C++ comment block as a detailed + # description. Set this tag to YES if you prefer the old behaviour instead. + + MULTILINE_CPP_IS_BRIEF = YES + + # If the DETAILS_AT_TOP tag is set to YES then Doxygen + # will output the detailed description near the top, like JavaDoc. + # If set to NO, the detailed description appears after the member + # documentation. + + DETAILS_AT_TOP = NO + + # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented + # member inherits the documentation from any documented member that it + # re-implements. + + INHERIT_DOCS = YES + + # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC + # tag is set to YES, then doxygen will reuse the documentation of the first + # member in the group (if any) for the other members of the group. By default + # all members of a group must be documented explicitly. + + DISTRIBUTE_GROUP_DOC = YES + + # The TAB_SIZE tag can be used to set the number of spaces in a tab. + # Doxygen uses this value to replace tabs by spaces in code fragments. + + TAB_SIZE = 4 + + # This tag can be used to specify a number of aliases that acts + # as commands in the documentation. An alias has the form "name=value". + # For example adding "sideeffect=\par Side Effects:\n" will allow you to + # put the command \sideeffect (or @sideeffect) in the documentation, which + # will result in a user-defined paragraph with heading "Side Effects:". + # You can put \n's in the value part of an alias to insert newlines. + + ALIASES = "doctodo=@todo\nDoc me! See docs/doxygen/TODO and http://gcc.gnu.org/ml/libstdc++/2002-02/msg00003.html for more." \ + "isiosfwd=One of the @link s27_2_iosfwd I/O forward declarations @endlink" + + # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources + # only. Doxygen will then generate output that is more tailored for C. + # For instance, some of the names that are used will be different. The list + # of all members will be omitted, etc. + + OPTIMIZE_OUTPUT_FOR_C = NO + + # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources + # only. Doxygen will then generate output that is more tailored for Java. + # For instance, namespaces will be presented as packages, qualified scopes + # will look different, etc. + + OPTIMIZE_OUTPUT_JAVA = NO + + # Set the SUBGROUPING tag to YES (the default) to allow class member groups of + # the same type (for instance a group of public functions) to be put as a + # subgroup of that type (e.g. under the Public Functions section). Set it to + # NO to prevent subgrouping. Alternatively, this can be done per class using + # the \nosubgrouping command. + + SUBGROUPING = YES + + #--------------------------------------------------------------------------- + # Build related configuration options + #--------------------------------------------------------------------------- + # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless *************** EXTRACT_STATIC = YES *** 73,78 **** --- 230,242 ---- EXTRACT_LOCAL_CLASSES = NO + # This flag is only useful for Objective-C code. When set to YES local + # methods, which are defined in the implementation section but not in + # the interface are included in the documentation. + # If set to NO (the default) only methods in the interface are included. + + EXTRACT_LOCAL_METHODS = NO + # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the *************** HIDE_UNDOC_MEMBERS = YES *** 83,89 **** # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. ! # If set to NO (the default) these class will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = YES --- 247,253 ---- # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. ! # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = YES *************** HIDE_FRIEND_COMPOUNDS = NO *** 102,148 **** HIDE_IN_BODY_DOCS = NO - # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will - # include brief member descriptions after the members that are listed in - # the file and class documentation (similar to JavaDoc). - # Set to NO to disable this. - - BRIEF_MEMBER_DESC = YES - - # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend - # the brief description of a member or function before the detailed description. - # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the - # brief descriptions will be completely suppressed. - - REPEAT_BRIEF = YES - - # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then - # Doxygen will generate a detailed section even if there is only a brief - # description. - - ALWAYS_DETAILED_SEC = YES - - # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited - # members of a class in the documentation of that class as if those members were - # ordinary class members. Constructors, destructors and assignment operators of - # the base classes will not be shown. - - INLINE_INHERITED_MEMB = YES - # pedwards -- this is useful, but ch27 gets huge - - # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full - # path before files name in the file list and in the header files. If set - # to NO the shortest path that makes the file name unique will be used. - - FULL_PATH_NAMES = NO - - # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag - # can be used to strip a user defined part of the path. Stripping is - # only done if one of the specified strings matches the left-hand part of - # the path. It is allowed to use relative paths in the argument list. - - STRIP_FROM_PATH = - # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. --- 266,271 ---- *************** STRIP_FROM_PATH = *** 151,216 **** INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate ! # file names in lower case letters. If set to YES upper case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows ! # users are adviced to set this option to NO. CASE_SENSE_NAMES = NO - # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter - # (but less readable) file names. This can be useful is your file systems - # doesn't support long names like on DOS, Mac, or CD-ROM. - - SHORT_NAMES = NO - # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO - # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen - # will generate a verbatim copy of the header file for each class for - # which an include is specified. Set to NO to disable this. - - VERBATIM_HEADERS = NO - # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen ! # will put list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES - # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen - # will interpret the first line (until the first dot) of a JavaDoc-style - # comment as the brief description. If set to NO, the JavaDoc - # comments will behave just like the Qt-style comments (thus requiring an - # explict @brief command for a brief description. - - JAVADOC_AUTOBRIEF = NO - - # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen - # treat a multi-line C++ special comment block (i.e. a block of //! or /// - # comments) as a brief description. This used to be the default behaviour. - # The new default is to treat a multi-line C++ comment block as a detailed - # description. Set this tag to YES if you prefer the old behaviour instead. - - MULTILINE_CPP_IS_BRIEF = YES - - # If the DETAILS_AT_TOP tag is set to YES then Doxygen - # will output the detailed description near the top, like JavaDoc. - # If set to NO, the detailed description appears after the member - # documentation. - - DETAILS_AT_TOP = NO - - # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented - # member inherits the documentation from any documented member that it - # reimplements. - - INHERIT_DOCS = YES - # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. --- 274,298 ---- INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate ! # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows ! # users are advised to set this option to NO. CASE_SENSE_NAMES = NO # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen ! # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. *************** INLINE_INFO = YES *** 223,239 **** SORT_MEMBER_DOCS = YES ! # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC ! # tag is set to YES, then doxygen will reuse the documentation of the first ! # member in the group (if any) for the other members of the group. By default ! # all members of a group must be documented explicitly. ! DISTRIBUTE_GROUP_DOC = YES ! # The TAB_SIZE tag can be used to set the number of spaces in a tab. ! # Doxygen uses this value to replace tabs by spaces in code fragments. ! TAB_SIZE = 4 # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo --- 305,326 ---- SORT_MEMBER_DOCS = YES ! # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the ! # brief documentation of file, namespace and class members alphabetically ! # by member name. If set to NO (the default) the members will appear in ! # declaration order. ! SORT_BRIEF_DOCS = NO ! # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be ! # sorted by fully-qualified names, including namespaces. If set to ! # NO (the default), the class list will be sorted only by class name, ! # not including the namespace part. ! # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. ! # Note: This option applies only to the class list, not to the ! # alphabetical list. ! SORT_BY_SCOPE_NAME = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo *************** GENERATE_BUGLIST = YES *** 259,281 **** GENERATE_DEPRECATEDLIST= YES - # This tag can be used to specify a number of aliases that acts - # as commands in the documentation. An alias has the form "name=value". - # For example adding "sideeffect=\par Side Effects:\n" will allow you to - # put the command \sideeffect (or @sideeffect) in the documentation, which - # will result in a user defined paragraph with heading "Side Effects:". - # You can put \n's in the value part of an alias to insert newlines. - - ALIASES = "doctodo=@todo\nDoc me! See docs/doxygen/TODO and http://gcc.gnu.org/ml/libstdc++/2002-02/msg00003.html for more." \ - "isiosfwd=One of the @link s27_2_iosfwd I/O forward declarations @endlink" - # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = @enabled_sections@ # The MAX_INITIALIZER_LINES tag determines the maximum number of lines ! # the initial value of a variable or define consist of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and defines in the --- 346,358 ---- GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = @enabled_sections@ # The MAX_INITIALIZER_LINES tag determines the maximum number of lines ! # the initial value of a variable or define consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and defines in the *************** ENABLED_SECTIONS = @enabled_sectio *** 284,303 **** MAX_INITIALIZER_LINES = 0 - # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources - # only. Doxygen will then generate output that is more tailored for C. - # For instance some of the names that are used will be different. The list - # of all members will be omitted, etc. - - OPTIMIZE_OUTPUT_FOR_C = NO - - # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources - # only. Doxygen will then generate output that is more tailored for Java. - # For instance namespaces will be presented as packages, qualified scopes - # will look different, etc. - - OPTIMIZE_OUTPUT_JAVA = NO - # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. --- 361,366 ---- *************** INPUT = @srcdir@/docs/d *** 361,374 **** @srcdir@/libsupc++/typeinfo \ include - - # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left ! # blank file matching one of the following patterns are included: ! # *.c *.cc *.cxx *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp ! # *.h++ *.idl FILE_PATTERNS = * --- 424,435 ---- @srcdir@/libsupc++/typeinfo \ include # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left ! # blank the following patterns are tested: ! # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp ! # *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm FILE_PATTERNS = * *************** RECURSIVE = YES *** 385,391 **** EXCLUDE = Makefile \ CVS \ include/bits/demangle.h \ ! stdc++.h.gch # The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories # that are symbolic links (a Unix filesystem feature) are excluded from the input. --- 446,452 ---- EXCLUDE = Makefile \ CVS \ include/bits/demangle.h \ ! stdc++.h.gch # The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories # that are symbolic links (a Unix filesystem feature) are excluded from the input. *************** EXCLUDE_SYMLINKS = NO *** 399,405 **** EXCLUDE_PATTERNS = CVS \ stamp-* \ Makefile \ ! *gch* # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see --- 460,466 ---- EXCLUDE_PATTERNS = CVS \ stamp-* \ Makefile \ ! *gch* # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see *************** FILTER_SOURCE_FILES = NO *** 447,453 **** #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will ! # be generated. Documented entities will be cross-referenced with these sources. SOURCE_BROWSER = YES --- 508,516 ---- #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will ! # be generated. Documented entities will be cross-referenced with these sources. ! # Note: To get rid of all source code in the generated output, make sure also ! # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = YES *************** REFERENCED_BY_RELATION = YES *** 474,479 **** --- 537,548 ---- REFERENCES_RELATION = YES + # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen + # will generate a verbatim copy of the header file for each class for + # which an include is specified. Set to NO to disable this. + + VERBATIM_HEADERS = NO + #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- *************** GENERATE_HTML = @do_html@ *** 512,519 **** HTML_OUTPUT = @html_output_dir@ ! # The HTML_FILE_EXTENSION tag can be used to specify the file extension for ! # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html --- 581,588 ---- HTML_OUTPUT = @html_output_dir@ ! # The HTML_FILE_EXTENSION tag can be used to specify the file extension for ! # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html *************** HTML_HEADER = *** 530,539 **** HTML_FOOTER = ! # The HTML_STYLESHEET tag can be used to specify a user defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen ! # will generate a default style sheet HTML_STYLESHEET = @srcdir@/docs/doxygen/style.css --- 599,610 ---- HTML_FOOTER = ! # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen ! # will generate a default style sheet. Note that doxygen will try to copy ! # the style sheet file to the HTML output directory, so don't put your own ! # stylesheet in the HTML output directory as well, or it will be erased! HTML_STYLESHEET = @srcdir@/docs/doxygen/style.css *************** GENERATE_HTMLHELP = NO *** 553,566 **** # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be ! # written to the html output dir. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of ! # the HTML help compiler (hhc.exe). If non empty doxygen will try to run ! # the html help compiler on the generated index.hhp. HHC_LOCATION = --- 624,637 ---- # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be ! # written to the html output directory. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of ! # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run ! # the HTML help compiler on the generated index.hhp. HHC_LOCATION = *************** GENERATE_CHI = NO *** 577,583 **** BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members ! # to the contents of the Html help documentation and to the tree view. TOC_EXPAND = NO --- 648,654 ---- BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members ! # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO *************** ENUM_VALUES_PER_LINE = 4 *** 595,604 **** # If the GENERATE_TREEVIEW tag is set to YES, a side panel will be # generated containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports ! # JavaScript and frames is required (for instance Mozilla, Netscape 4.0+, ! # or Internet explorer 4.0+). Note that for large projects the tree generation ! # can take a very long time. In such cases it is better to disable this feature. ! # Windows users are probably better off using the HTML help feature. GENERATE_TREEVIEW = NO --- 666,674 ---- # If the GENERATE_TREEVIEW tag is set to YES, a side panel will be # generated containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports ! # JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, ! # Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are ! # probably better off using the HTML help feature. GENERATE_TREEVIEW = NO *************** USE_PDFLATEX = NO *** 678,689 **** LATEX_BATCHMODE = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output ! # The RTF output is optimised for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO --- 748,765 ---- LATEX_BATCHMODE = NO + # If LATEX_HIDE_INDICES is set to YES then doxygen will not + # include the index chapters (such as File Index, Compound Index, etc.) + # in the output. + + LATEX_HIDE_INDICES = NO + #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output ! # The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO *************** COMPACT_RTF = NO *** 710,716 **** RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's ! # config file, i.e. a series of assigments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = --- 786,792 ---- RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's ! # config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = *************** MAN_LINKS = NO *** 754,765 **** # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of ! # the code including all documentation. Note that this ! # feature is still experimental and incomplete at the ! # moment. GENERATE_XML = NO # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. --- 830,845 ---- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of ! # the code including all documentation. GENERATE_XML = NO + # The XML_OUTPUT tag is used to specify where the XML pages will be put. + # If a relative path is entered the value of OUTPUT_DIRECTORY will be + # put in front of it. If left blank `xml' will be used as the default path. + + XML_OUTPUT = xml + # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. *************** XML_SCHEMA = *** 772,777 **** --- 852,864 ---- XML_DTD = + # If the XML_PROGRAMLISTING tag is set to YES Doxygen will + # dump the program listings (including syntax highlighting + # and cross-referencing information) to the XML output. Note that + # enabling this will significantly increase the size of the XML output. + + XML_PROGRAMLISTING = YES + #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- *************** INCLUDE_FILE_PATTERNS = *** 864,884 **** # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. ! ### The deprecated functions are clearly marked as such in the code, but ! ### the DEPRECATED macro must be defined for that code to be seen by doxygen. ! ### The class_requires macros are kludges because SKIP_FUNCTION_MACROS is ! ### completely broken, and the presence of the macros confuses the parser. ! ! PREDEFINED = _GLIBCXX_DEPRECATED \ ! _GLIBCXX_USE_WCHAR_T \ ! _GLIBCXX_USE_LONG_LONG \ ! __glibcxx_class_requires="//" \ ! __glibcxx_class_requires2="//" \ ! __glibcxx_class_requires3="//" \ ! __glibcxx_class_requires4="//" ! # If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then ! # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. --- 951,966 ---- # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. ! PREDEFINED = _GLIBCXX_DEPRECATED \ ! _GLIBCXX_USE_WCHAR_T \ ! _GLIBCXX_USE_LONG_LONG \ ! __glibcxx_class_requires=// \ ! __glibcxx_class_requires2=// \ ! __glibcxx_class_requires3=// \ ! __glibcxx_class_requires4=// ! # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then ! # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. *************** EXPAND_AS_DEFINED = *** 886,901 **** # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all function-like macros that are alone ! # on a line and do not end with a semicolon. Such function macros are typically ! # used for boiler-plate code, and will confuse the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- ! # Configuration::addtions related to external references #--------------------------------------------------------------------------- ! # The TAGFILES tag can be used to specify one or more tagfiles. TAGFILES = --- 968,997 ---- # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all function-like macros that are alone ! # on a line, have an all uppercase name, and do not end with a semicolon. Such ! # function macros are typically used for boiler-plate code, and will confuse the ! # parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- ! # Configuration::additions related to external references #--------------------------------------------------------------------------- ! # The TAGFILES option can be used to specify one or more tagfiles. ! # Optionally an initial location of the external documentation ! # can be added for each tagfile. The format of a tag file without ! # this location is as follows: ! # TAGFILES = file1 file2 ... ! # Adding location for the tag files is done as follows: ! # TAGFILES = file1=loc1 "file2 = loc2" ... ! # where "loc1" and "loc2" can be relative or absolute paths or ! # URLs. If a location is present for each tag, the installdox tool ! # does not have to be run to correct the links. ! # Note that each tag file must have a unique name ! # (where the name does NOT include the path) ! # If a tag file is not located in the directory in which doxygen ! # is run, you must also specify the path to the tagfile here. TAGFILES = *************** PERL_PATH = /usr/bin/perl *** 926,935 **** #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will ! # generate a inheritance diagram (in Html, RTF and LaTeX) for classes with base or # super classes. Setting the tag to NO turns the diagrams off. Note that this ! # option is superceded by the HAVE_DOT option below. This is only a fallback. It is ! # recommended to install and use dot, since it yield more powerful graphs. CLASS_DIAGRAMS = YES --- 1022,1031 ---- #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will ! # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or # super classes. Setting the tag to NO turns the diagrams off. Note that this ! # option is superseded by the HAVE_DOT option below. This is only a fallback. It is ! # recommended to install and use dot, since it yields more powerful graphs. CLASS_DIAGRAMS = YES *************** CLASS_GRAPH = YES *** 960,965 **** --- 1056,1067 ---- COLLABORATION_GRAPH = YES + # If the UML_LOOK tag is set to YES doxygen will generate inheritance and + # collaboration diagrams in a style similar to the OMG's Unified Modeling + # Language. + + UML_LOOK = NO + # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. *************** INCLUDE_GRAPH = YES *** 979,984 **** --- 1081,1094 ---- INCLUDED_BY_GRAPH = YES + # If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will + # generate a call dependency graph for every global function or class method. + # Note that enabling this option will significantly increase the time of a run. + # So in most cases it will be better to enable call graphs for selected + # functions only using the \callgraph command. + + CALL_GRAPH = NO + # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. *************** MAX_DOT_GRAPH_WIDTH = 1024 *** 1017,1022 **** --- 1127,1143 ---- MAX_DOT_GRAPH_HEIGHT = 1024 + # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the + # graphs generated by dot. A depth value of 3 means that only nodes reachable + # from the root by following a path via at most 3 edges will be shown. Nodes that + # lay further from the root node will be omitted. Note that setting this option to + # 1 or 2 may greatly reduce the computation time needed for large code bases. Also + # note that a graph may be further truncated if the graph's image dimensions are + # not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). + # If 0 is used for the depth value (the default), the graph is not depth-constrained. + + MAX_DOT_GRAPH_DEPTH = 0 + # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. *************** MAX_DOT_GRAPH_HEIGHT = 1024 *** 1024,1074 **** GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will ! # remove the intermedate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- ! # Configuration::addtions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO - - # The CGI_NAME tag should be the name of the CGI script that - # starts the search engine (doxysearch) with the correct parameters. - # A script with this name will be generated by doxygen. - - CGI_NAME = search.cgi - - # The CGI_URL tag should be the absolute URL to the directory where the - # cgi binaries are located. See the documentation of your http daemon for - # details. - - CGI_URL = - - # The DOC_URL tag should be the absolute URL to the directory where the - # documentation is located. If left blank the absolute path to the - # documentation, with file:// prepended to it, will be used. - - DOC_URL = - - # The DOC_ABSPATH tag should be the absolute path to the directory where the - # documentation is located. If left blank the directory on the local machine - # will be used. - - DOC_ABSPATH = - - # The BIN_ABSPATH tag must point to the directory where the doxysearch binary - # is installed. - - BIN_ABSPATH = /usr/local/bin/ - - # The EXT_DOC_PATHS tag can be used to specify one or more paths to - # documentation generated for other projects. This allows doxysearch to search - # the documentation for these projects as well. - - EXT_DOC_PATHS = --- 1145,1160 ---- GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will ! # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- ! # Configuration::additions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO diff -Nrc3pad gcc-3.4.0/libstdc++-v3/docs/html/17_intro/TODO gcc-3.4.1/libstdc++-v3/docs/html/17_intro/TODO *** gcc-3.4.0/libstdc++-v3/docs/html/17_intro/TODO 2003-11-13 00:25:23.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/docs/html/17_intro/TODO 2004-05-15 20:44:13.000000000 +0000 *************** std::allocator *** 2,17 **** - switch to mt_allocator with --enable-threads=posix. - - Try to figure out a way to switch allocators in a more elegant - manner, and make the default allocator configurable. - - persistent allocator - global/extern allocator std::string ! - re-design for multi-paradigm, meta string class solution incorporating COW vs. deep copy issues, MT scalability See Andrei Alexandrescu, June 2001, C/C++ Users Journal "Generic: A Policy-Based basic_string Implementation" --- 2,14 ---- - switch to mt_allocator with --enable-threads=posix. - persistent allocator - global/extern allocator std::string ! - Policy-based design incorporating COW vs. deep copy issues, MT scalability See Andrei Alexandrescu, June 2001, C/C++ Users Journal "Generic: A Policy-Based basic_string Implementation" *************** std::locale *** 53,60 **** - minimize ctype convertion in data facets, see numpunct/num_put/num_get - - finish caching data facets and using the caches - std::basic_filebuf, 27_io - wfilebuf, get variable-encoding working and tested, including --- 50,55 ---- *************** testsuite *** 86,96 **** - diffing generated output files - make check-abi needs to have full symbol checking. Scope the LSB testsuite, see what's going on with the typeinfo etc. bits. - - provide testsuites for numerics. - - try to do a better job of ABI testing, with instantiations of all standard-specified types checked, not just exported symbols. --- 81,91 ---- - diffing generated output files + - provide testsuites for numerics. + - make check-abi needs to have full symbol checking. Scope the LSB testsuite, see what's going on with the typeinfo etc. bits. - try to do a better job of ABI testing, with instantiations of all standard-specified types checked, not just exported symbols. *************** Nathan's commentary on cantrip, http://w *** 140,148 **** - auto_ptr: seems to be some disagreement on what is standards-conformant behavior, specially on conversion operators. - - looks like deque::get_allocator not standards conformant or deque - allocator non-standard. - - list::assignment operator needs const_cast - a cleaner division between pointers-to-value_type and true iterators --- 135,140 ---- diff -Nrc3pad gcc-3.4.0/libstdc++-v3/docs/html/20_util/allocator.html gcc-3.4.1/libstdc++-v3/docs/html/20_util/allocator.html *** gcc-3.4.0/libstdc++-v3/docs/html/20_util/allocator.html 2004-03-18 17:36:39.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/docs/html/20_util/allocator.html 2004-04-30 03:23:45.000000000 +0000 *************** *** 308,313 **** --- 308,319 ---- + + __gnu_cxx::bitmap_allocator<T> + <ext/bitmap_allocator.h> + + +

    More details on each of these allocators follows.

    *************** *** 381,386 **** --- 387,400 ---- href="../ext/mt_allocator.html">here.

  • + +
  • bitmap_allocator +

    A high-performance allocator that uses a bit-map to keep track + of the used and unused memory locations. It has its own + documentation, found here. +

    +
  • diff -Nrc3pad gcc-3.4.0/libstdc++-v3/docs/html/abi.html gcc-3.4.1/libstdc++-v3/docs/html/abi.html *** gcc-3.4.0/libstdc++-v3/docs/html/abi.html 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/docs/html/abi.html 2004-05-22 05:07:20.000000000 +0000 *************** *** 0 **** --- 1,883 ---- + + + + + + + + + + Standard C++ Library ABI + + + + + + +

    C++ Standard Library ABI

    + +

    + The latest version of this document is always available at + + http://gcc.gnu.org/onlinedocs/libstdc++/abi.html. +

    + +

    + To the libstdc++-v3 homepage. +

    + + +
    +

    + The C++ interface +

    + +

    C++ applications often dependent on specific language support + routines, say for throwing exceptions, or catching exceptions, and + perhaps also dependent on features in the C++ Standard Library. +

    + +

    The C++ Standard Library has many include files, types defined in + those include files, specific named functions, and other behavior. The + text of these behaviors, as written in source include files, is called + the Application Programing Interface, or API. +

    + +

    Furthermore, C++ source that is compiled into object files is + transformed by the compiler: it arranges objects with specific + alignment and in a particular layout, mangling names according to a + well-defined algorithm, has specific arrangements for the support of + virtual functions, etc. These details are defined as the compiler + Application Binary Interface, or ABI. The GNU C++ compiler uses an + industry-standard C++ ABI starting with version 3. Details can be + found in the + ABI specification. +

    + +

    + The GNU C++ compiler, g++, has a compiler command line option to + switch between various different C++ ABIs. This explicit version + switch is the flag -fabi-version. In addition, some + g++ command line options may change the ABI as a side-effect of + use. Such flags include -fpack-struct and + -fno-exceptions, but include others: see the complete + list in the GCC manual under the heading Options + for Code Generation Conventions. +

    + +

    The configure options used when building a specific libstdc++ + version may also impact the resulting library ABI. The available + configure options, and their impact on the library ABI, are documented + + here. +

    + +

    Putting all of these ideas together results in the C++ Standard + library ABI, which is the compilation of a given library API by a + given compiler ABI. In a nutshell: +

    + + library API + compiler ABI = library ABI + +

    + The library ABI is mostly of interest for end-users who have + unresolved symbols and are linking dynamically to the C++ Standard + library, and who thus must be careful to compile their application + with a compiler that is compatible with the available C++ Standard + library binary. In this case, compatible is defined with the equation + above: given an application compiled with a given compiler ABI and + library API, it will work correctly with a Standard C++ Library + created with the same constraints. +

    + +

    + To use a specific version of the C++ ABI, one must use a + corresponding GNU C++ toolchain (Ie, g++ and libstdc++) that + implements the C++ ABI in question. +

    + +

    + Versioning +

    + +

    The C++ interface has evolved throughout the history of the GNU + C++ toolchain. With each release, various details have been changed so + as to give distinct versions to the C++ interface. +

    + +
    + Goals of versioning +
    + +

    Extending existing, stable ABIs. Versioning gives subsequent stable + releases series libraries the ability to add new symbols and add + functionality, all the while retaining backwards compatibility with + the previous releases in the series. Note: the reverse is not true. It + is not possible to take binaries linked with the latest version of a + release series (if symbols have been added) and expect the initial + release of the series to remain link compatible. +

    + +

    Allows multiple, incompatible ABIs to coexist at the same time. +

    + +

    +

    + +
    + Version History +
    +

    + How can this complexity be managed? What does C++ versioning mean? + Because library and compiler changes often make binaries compiled + with one version of the GNU tools incompatible with binaries + compiled with other (either newer or older) versions of the same GNU + tools, specific techniques are used to make managing this complexity + easier. +

    + +

    + The following techniques are used: +

    + +
      + +
    • Release versioning on the libgcc_s.so binary. This is + implemented via file names and the ELF DT_SONAME mechanism (at least + on ELF systems).

      + +

      It is versioned as follows: +

      +
        +
      • gcc-3.0.0: libgcc_s.so.1
      • +
      • gcc-3.0.1: libgcc_s.so.1
      • +
      • gcc-3.0.2: libgcc_s.so.1
      • +
      • gcc-3.0.3: libgcc_s.so.1
      • +
      • gcc-3.0.4: libgcc_s.so.1
      • +
      • gcc-3.1.0: libgcc_s.so.1
      • +
      • gcc-3.1.1: libgcc_s.so.1
      • +
      • gcc-3.2.0: libgcc_s.so.1
      • +
      • gcc-3.2.1: libgcc_s.so.1
      • +
      • gcc-3.2.2: libgcc_s.so.1
      • +
      • gcc-3.2.3: libgcc_s.so.1
      • +
      • gcc-3.3.0: libgcc_s.so.1
      • +
      • gcc-3.3.1: libgcc_s.so.1
      • +
      • gcc-3.3.2: libgcc_s.so.1
      • +
      • gcc-3.3.3: libgcc_s.so.1
      • +
      • gcc-3.4.0: on m68k-linux and hppa-linux this is either libgcc_s.so.1 + (when configuring --with-sjlj-exceptions) or + libgcc_s.so.2. For all others, this is libgcc_s.so.1. +
      • +
      +

      +
    • + +
    • Release versioning on the libstdc++.so binary, implemented in the same was as the libgcc_s.so binary, above. + +

      It is versioned as follows: +

      +
        +
      • gcc-3.0.0: libstdc++.so.3.0.0
      • +
      • gcc-3.0.1: libstdc++.so.3.0.1
      • +
      • gcc-3.0.2: libstdc++.so.3.0.2
      • +
      • gcc-3.0.3: libstdc++.so.3.0.2 (Error should be libstdc++.so.3.0.3)
      • +
      • gcc-3.0.4: libstdc++.so.3.0.4
      • +
      • gcc-3.1.0: libstdc++.so.4.0.0
      • +
      • gcc-3.1.1: libstdc++.so.4.0.1
      • +
      • gcc-3.2.0: libstdc++.so.5.0.0
      • +
      • gcc-3.2.1: libstdc++.so.5.0.1
      • +
      • gcc-3.2.2: libstdc++.so.5.0.2
      • +
      • gcc-3.2.3: libstdc++.so.5.0.3 (Not strictly required)
      • +
      • gcc-3.3.0: libstdc++.so.5.0.4
      • +
      • gcc-3.3.1: libstdc++.so.5.0.5
      • +
      • gcc-3.3.2: libstdc++.so.5.0.5
      • +
      • gcc-3.3.3: libstdc++.so.5.0.5
      • +
      • gcc-3.4.0: libstdc++.so.6.0.0
      • +
      +

      +
    • + +
    • Symbol versioning on the libgcc_s.so binary. +

      mapfile: gcc/libgcc-std.ver

      + +

      It is versioned with the following labels and version definitions:

      +
        +
      • gcc-3.0.0: GCC_3.0
      • +
      • gcc-3.0.1: GCC_3.0
      • +
      • gcc-3.0.2: GCC_3.0
      • +
      • gcc-3.0.3: GCC_3.0
      • +
      • gcc-3.0.4: GCC_3.0
      • +
      • gcc-3.1.0: GCC_3.0
      • +
      • gcc-3.1.1: GCC_3.0
      • +
      • gcc-3.2.0: GCC_3.0
      • +
      • gcc-3.2.1: GCC_3.0
      • +
      • gcc-3.2.2: GCC_3.0
      • +
      • gcc-3.2.3: GCC_3.0
      • +
      • gcc-3.3.0: GCC_3.0
      • +
      • gcc-3.3.1: GCC_3.0
      • +
      • gcc-3.3.2: GCC_3.0
      • +
      • gcc-3.3.3: GCC_3.0
      • +
      • gcc-3.4.0: GCC_3.0
      • +
      +

      +
    • + +
    • Symbol versioning on the libstdc++.so binary. + +

      mapfile: libstdc++-v3/config/linker-map.gnu

      +

      It is versioned with the following labels and version + definitions, where the version definition is the maximum for a + particular release. Note, only symbol which are newly introduced + will use the maximum version definition. Thus, for release series + with the same label, but incremented version definitions, the later + release has both versions. (An example of this would be the + gcc-3.2.1 release, which has GLIBCPP_3.2.1 for new symbols and + GLIBCPP_3.2 for symbols that were introduced in the gcc-3.2.0 + release.) +

      +
        +
      • gcc-3.0.0: (Error, not versioned)
      • +
      • gcc-3.0.1: (Error, not versioned)
      • +
      • gcc-3.0.2: (Error, not versioned)
      • +
      • gcc-3.0.3: (Error, not versioned)
      • +
      • gcc-3.0.4: (Error, not versioned)
      • +
      • gcc-3.1.0: GLIBCPP_3.1, CXXABI_1
      • +
      • gcc-3.1.1: GLIBCPP_3.1, CXXABI_1
      • +
      • gcc-3.2.0: GLIBCPP_3.2, CXXABI_1.2
      • +
      • gcc-3.2.1: GLIBCPP_3.2.1, CXXABI_1.2
      • +
      • gcc-3.2.2: GLIBCPP_3.2.2, CXXABI_1.2
      • +
      • gcc-3.2.3: GLIBCPP_3.2.2, CXXABI_1.2
      • +
      • gcc-3.3.0: GLIBCPP_3.2.2, CXXABI_1.2.1
      • +
      • gcc-3.3.1: GLIBCPP_3.2.3, CXXABI_1.2.1
      • +
      • gcc-3.3.2: GLIBCPP_3.2.3, CXXABI_1.2.1
      • +
      • gcc-3.3.3: GLIBCPP_3.2.3, CXXABI_1.2.1
      • +
      • gcc-3.4.0: GLIBCXX_3.4, CXXABI_1.3
      • +
      +

      +
    • + +
    • +

      Incremental bumping of a compiler pre-defined macro, + __GXX_ABI_VERSION. This macro is defined as the version of the + compiler v3 ABI, with g++ 3.0.x being version 100. This macro will + be automatically defined whenever g++ is used (the curious can + test this by invoking g++ with the '-v' flag.) +

      + +

      + This macro was defined in the file "lang-specs.h" in the gcc/cp directory. + Later versions defined it in "c-common.c" in the gcc directory, and from + G++ 3.4 it is defined in c-cppbuiltin.c and its value determined by the + '-fabi-version' command line option. +

      + +

      + It is versioned as follows, where 'n' is given by '-fabi-version=n': +

      +
        +
      • gcc-3.0.x: 100
      • +
      • gcc-3.1.x: 100 (Error, should be 101)
      • +
      • gcc-3.2.x: 102
      • +
      • gcc-3.3.x: 102
      • +
      • gcc-3.4.x: 102 (when n=1)
      • +
      • gcc-3.4.x: 1000+n (when n>1)
      • +
      • gcc-3.4.x: 999999 (when n=0)
      • +
      +

      +
    • + +
    • +

      Changes to the default compiler option for + -fabi-version. +

      +

      + It is versioned as follows: +

      +
        +
      • gcc-3.0.x: (Error, not versioned)
      • +
      • gcc-3.1.x: (Error, not versioned)
      • +
      • gcc-3.2.x: -fabi-version=1
      • +
      • gcc-3.3.x: -fabi-version=1
      • +
      • gcc-3.4.x: -fabi-version=2
      • +
      +

      +
    • + +
    • +

      Incremental bumping of a library pre-defined macro. For releases + before 3.4.0, the macro is __GLIBCPP__. For later releases, it's + __GLIBCXX__. (The libstdc++ project generously changed from CPP to + CXX throughout its source to allow the "C" pre-processor the CPP + macro namespace.) These macros are defined as the date the library + was released, in compressed ISO date format, as an unsigned long. +

      + +

      + In addition, the pre-defined macro is defined in the file + "c++config" in the "libstdc++-v3/include/bits" directory and is + changed every night by an automated script. +

      +

      + It is versioned as follows: +

      +
        +
      • gcc-3.0.0: 20010615
      • +
      • gcc-3.0.1: 20010819
      • +
      • gcc-3.0.2: 20011023
      • +
      • gcc-3.0.3: 20011220
      • +
      • gcc-3.0.4: 20020220
      • +
      • gcc-3.1.0: 20020514
      • +
      • gcc-3.1.1: 20020725
      • +
      • gcc-3.2.0: 20020814
      • +
      • gcc-3.2.1: 20021119
      • +
      • gcc-3.2.2: 20030205
      • +
      • gcc-3.2.3: 20030422
      • +
      • gcc-3.3.0: 20030513
      • +
      • gcc-3.3.1: 20030804
      • +
      • gcc-3.3.2: 20031016
      • +
      • gcc-3.3.3: 20040214
      • +
      • gcc-3.4.0: 20040419
      • +
      +

      +
    • + + +
    • +

      + Incremental bumping of a library pre-defined macro, + _GLIBCPP_VERSION. This macro is defined as the released version of + the library, as a string literal. This is only implemented in + gcc-3.1.0 releases and higher, and is deprecated in 3.4 (where it + is called _GLIBCXX_VERSION). +

      + +

      + This macro is defined in the file "c++config" in the + "libstdc++-v3/include/bits" directory and is generated + automatically by autoconf as part of the configure-time generation + of config.h. +

      + +

      + It is versioned as follows: +

      +
        +
      • gcc-3.0.0: "3.0.0"
      • +
      • gcc-3.0.1: "3.0.0" (Error, should be "3.0.1")
      • +
      • gcc-3.0.2: "3.0.0" (Error, should be "3.0.2")
      • +
      • gcc-3.0.3: "3.0.0" (Error, should be "3.0.3")
      • +
      • gcc-3.0.4: "3.0.0" (Error, should be "3.0.4")
      • +
      • gcc-3.1.0: "3.1.0"
      • +
      • gcc-3.1.1: "3.1.1"
      • +
      • gcc-3.2.0: "3.2"
      • +
      • gcc-3.2.1: "3.2.1"
      • +
      • gcc-3.2.2: "3.2.2"
      • +
      • gcc-3.2.3: "3.2.3"
      • +
      • gcc-3.3.0: "3.3"
      • +
      • gcc-3.3.1: "3.3.1"
      • +
      • gcc-3.3.2: "3.3.2"
      • +
      • gcc-3.3.3: "3.3.3"
      • +
      • gcc-3.4.0: "version-unused"
      • +
      +

      +
    • + +
    • +

      + Matching each specific C++ compiler release to a specific set of + C++ include files. This is only implemented in gcc-3.1.1 releases + and higher. +

      +

      + All C++ includes are installed in include/c++, then nest in a + directory hierarchy corresponding to the C++ compiler's released + version. This version corresponds to the variable "gcc_version" in + "libstdc++-v3/acinclude.m4," and more details can be found in that + file's macro GLIBCXX_CONFIGURE (GLIBCPP_CONFIGURE before gcc-3.4.0). +

      +

      + C++ includes are versioned as follows: +

      +
        +
      • gcc-3.0.0: include/g++-v3
      • +
      • gcc-3.0.1: include/g++-v3
      • +
      • gcc-3.0.2: include/g++-v3
      • +
      • gcc-3.0.3: include/g++-v3
      • +
      • gcc-3.0.4: include/g++-v3
      • +
      • gcc-3.1.0: include/g++-v3
      • +
      • gcc-3.1.1: include/c++/3.1.1
      • +
      • gcc-3.2.0: include/c++/3.2
      • +
      • gcc-3.2.1: include/c++/3.2.1
      • +
      • gcc-3.2.2: include/c++/3.2.2
      • +
      • gcc-3.2.3: include/c++/3.2.3
      • +
      • gcc-3.3.0: include/c++/3.3
      • +
      • gcc-3.3.1: include/c++/3.3.1
      • +
      • gcc-3.3.2: include/c++/3.3.2
      • +
      • gcc-3.3.3: include/c++/3.3.3
      • +
      • gcc-3.4.0: include/c++/3.4.0
      • +
      +

      +
    • +
    +

    + Taken together, these techniques can accurately specify interface + and implementation changes in the GNU C++ tools themselves. Used + properly, they allow both the GNU C++ tools implementation, and + programs using them, an evolving yet controlled development that + maintains backward compatibility. +

    + + + +
    + Minimum requirements for a versioned ABI +
    +

    + Minimum environment that supports a versioned ABI: A supported + dynamic linker, a GNU linker of sufficient vintage to understand + demangled C++ name globbing (ld), a shared executable compiled with + g++, and shared libraries (libgcc_s, libstdc++-v3) compiled by a + compiler (g++) with a compatible ABI. Phew. +

    + +

    + On top of all that, an additional constraint: libstdc++ did not + attempt to version symbols (or age gracefully, really) until version + 3.1.0. +

    + +

    + Most modern Linux and BSD versions, particularly ones using + gcc-3.1.x tools and more recent vintages, will meet the requirements above. +

    + + +
    + What configure options impact symbol versioning? +
    +

    + It turns out that most of the configure options that change default + behavior will impact the mangled names of exported symbols, and thus + impact versioning and compatibility. +

    + +

    + For more information on configure options, including ABI impacts, see: + http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html +

    + +

    + There is one flag that explicitly deals with symbol versioning: + --enable-symvers. +

    + +

    + In particular, libstdc++-v3/acinclude.m4 has a macro called + GLIBCXX_ENABLE_SYMVERS that defaults to yes (or the argument passed + in via --enable-symvers=foo). At that point, the macro attempts to + make sure that all the requirement for symbol versioning are in + place. For more information, please consult acinclude.m4. +

    + + +
    + How to tell if symbol versioning is, indeed, active? +
    +

    + When the GNU C++ library is being built with symbol versioning on, + you should see the following at configure time for libstdc++-v3: +

    + + + checking versioning on shared library symbols... gnu + +

    + If you don't see this line in the configure output, or if this line + appears but the last word is 'no', then you are out of luck. +

    + +

    + If the compiler is pre-installed, a quick way to test is to compile + the following (or any) simple C++ file and link it to the shared + libstdc++ library: +

    + +
    + #include <iostream>
    + 
    + int main()
    + { std::cout << "hello" << std::endl; return 0; }
    + 
    + %g++ hello.cc -o hello.out
    + 
    + %ldd hello.out
    +         libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x00764000)
    +         libm.so.6 => /lib/tls/libm.so.6 (0x004a8000)
    +         libgcc_s.so.1 => /mnt/hd/bld/gcc/gcc/libgcc_s.so.1 (0x40016000)
    +         libc.so.6 => /lib/tls/libc.so.6 (0x0036d000)
    +         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00355000)
    + 
    + %nm hello.out
    + 
    + +

    + If you see symbols in the resulting output with "GLIBCXX_3" as part + of the name, then the executable is versioned. Here's an example: +

    + + U _ZNSt8ios_base4InitC1Ev@@GLIBCXX_3.4 + +

    + Library allowed ABI changes +

    +

    + The following will cause the library minor version number to + increase, say from "libstdc++.so.3.0.4" to "libstdc++.so.3.0.5". +

    +
      +
    • adding an exported global or static data member
    • +
    • adding an exported function, static or non-virtual member function
    • +
    • adding an exported symbol or symbols by additional instantiations
    • +
    +

    +

    +

    + Other allowed changes are possible. +

    + + +

    + Library disallowed ABI changes +

    + +

    + The following non-exhaustive list will cause the library major version + number to increase, say from "libstdc++.so.3.0.4" to + "libstdc++.so.4.0.0". +

    +
      +
    • changes in the gcc/g++ compiler ABI
    • +
    • changing size of an exported symbol
    • +
    • changing alignment of an exported symbol
    • +
    • changing the layout of an exported symbol
    • +
    • changing mangling on an exported symbol
    • +
    • deleting an exported symbol
    • +
    • changing the inheritance properties of a type by adding or removing + base classes
    • +
    • + changing the size, alignment, or layout of types + specified in the C++ standard. These may not necessarily be + instantiated or otherwise exported in the library binary, and + include all the required locale facets, as well as things like + std::basic_streambuf, et al. +
    • +
    + +

    + Library implementation strategy +

    + +
      +
    • Separation of interface and implementation +

      This is accomplished by two techniques that separate the API from + the ABI: forcing undefined references to link against a library binary + for definitions. +

      + +
      +
      Include files have declarations, source files have defines
      + +
      For non-templatized types, such as much of class + locale, the appropriate standard C++ include, say + locale, can contain full declarations, while various + source files (say locale.cc, locale_init.cc, + localename.cc) contain definitions.
      + +
      Extern template on required types
      + +
      For parts of the standard that have an explicit list of required + instantiations, the GNU extension syntax extern template + can be used to control where template definitions + reside. By marking required instantiations as extern + template in include files, and providing explicit + instantiations in the appropriate instantiation files, non-inlined + template functions can be versioned. This technique is mostly used + on parts of the standard that require char and + wchar_t instantiations, and includes + basic_string, the locale facets, and the types in + iostreams.
      + +
      +

      In addition, these techniques have the additional benefit that + they reduce binary size, which can increase runtime performance. +

      +
    • + +
    • Namespaces linking symbol definitions to export mapfiles + +

      All symbols in the shared library binary are processed by a linker + script at build time that either allows or disallows external + linkage. Because of this, some symbols, regardless of normal C/C++ + linkage, are not visible. Symbols that are internal have several + appealing characteristics: by not exporting the symbols, there are no + relocations when the shared library is started and thus this makes for + faster runtime loading performance by the underlying dynamic loading + mechanism. In addition, they have the possibility of changing without + impacting ABI compatibility. +

      + +

      The following namespaces are transformed by the mapfile:

      + +
      +
      namespace std
      +
      Defaults to exporting all symbols in label + GLIBCXX that do not begin with an underscore, ie + __test_func would not be exported by default. Select + exceptional symbols are allowed to be visible.
      + +
      namespace __gnu_cxx
      +
      Defaults to not exporting any symbols in label + GLIBCXX, select items are allowed to be visible.
      + +
      namespace __gnu_internal
      +
      Defaults to not exported, no items are allowed to be visible.
      + +
      namespace __cxxabiv1, aliased to namespace abi
      +
      Defaults to not exporting any symbols in label + CXXABI, select items are allowed to be visible.
      +
      +

      +

      +
    • + +
    • Freezing the API +

      Disallowed changes, as above, are not made on a stable release + branch. Enforcement tends to be less strict with GNU extensions that + standard includes.

      +
    • +
    + +

    + Testing ABI changes +

    + +

    + Testing for GNU C++ ABI changes is composed of two distinct areas: + testing the C++ compiler (g++) for compiler changes, and testing the + C++ library (libstdc++) for library changes. +

    + +

    + Testing the C++ compiler ABI can be done various ways. +

    + +

    + One. + Intel ABI checker. More information can be obtained + here. +

    + +

    + Two. + The second is yet unreleased, but has been announced on the gcc + mailing list. It is yet unspecified if these tools will be freely + available, and able to be included in a GNU project. Please contact + Mark Mitchell (mark@codesourcery.com) for more details, and current + status. +

    + +

    + Three. + Involves using the vlad.consistency test framework. This has also been + discussed on the gcc mailing lists. +

    + +

    + Testing the C++ library ABI can also be done various ways. +

    + +

    + One. + (Brendan Kehoe, Jeff Law suggestion to run 'make check-c++' two ways, + one with a new compiler and an old library, and the other with an old + compiler and a new library, and look for testsuite regressions) +

    + +

    + Details on how to set this kind of test up can be found here: + http://gcc.gnu.org/ml/gcc/2002-08/msg00142.html +

    + +

    + Two. + Use the 'make check-abi' rule in the libstdc++-v3 Makefile. +

    + +

    + This is a proactive check the library ABI. Currently, exported symbol + names that are either weak or defined are checked against a last known + good baseline. Currently, this baseline is keyed off of 3.2.0 + binaries, as this was the last time the .so number was incremented. In + addition, all exported names are demangled, and the exported objects + are checked to make sure they are the same size as the same object in + the baseline. +

    + +

    + This dataset is insufficient, yet a start. Also needed is a + comprehensive check for all user-visible types part of the standard + library for sizeof() and alignof() changes. +

    + +

    + Verifying compatible layouts of objects is not even attempted. It + should be possible to use sizeof, alignof, and offsetof to compute + offsets for each structure and type in the standard library, saving to + another datafile. Then, compute this in a similar way for new + binaries, and look for differences. +

    + +

    + Another approach might be to use the -fdump-class-hierarchy flag to + get information. However, currently this approach gives insufficient + data for use in library testing, as class data members, their offsets, + and other detailed data is not displayed with this flag. + (See g++/7470 on how this was used to find bugs.) +

    + +

    + Perhaps there are other C++ ABI checkers. If so, please notify + us. We'd like to know about them! +

    + +

    + Testing Multi-ABI binaries +

    + +

    + A "C" application, dynamically linked to two shared libraries, liba, + libb. The dependent library liba is C++ shared library compiled with + gcc-3.3.x, and uses io, exceptions, locale, etc. The dependent library + libb is a C++ shared library compiled with gcc-3.4.x, and also uses io, + exceptions, locale, etc. +

    + +

    As above, libone is constructed as follows:

    +
    + %$bld/H-x86-gcc-3.4.0/bin/g++ -fPIC -DPIC -c a.cc
    + 
    + %$bld/H-x86-gcc-3.4.0/bin/g++ -shared -Wl,-soname -Wl,libone.so.1 -Wl,-O1 -Wl,-z,defs a.o -o libone.so.1.0.0
    + 
    + %ln -s libone.so.1.0.0 libone.so
    + 
    + %$bld/H-x86-gcc-3.4.0/bin/g++ -c a.cc
    + 
    + %ar cru libone.a a.o 
    + 
    + +

    And, libtwo is constructed as follows:

    + +
    + %$bld/H-x86-gcc-3.3.3/bin/g++ -fPIC -DPIC -c b.cc
    + 
    + %$bld/H-x86-gcc-3.3.3/bin/g++ -shared -Wl,-soname -Wl,libtwo.so.1 -Wl,-O1 -Wl,-z,defs b.o -o libtwo.so.1.0.0
    + 
    + %ln -s libtwo.so.1.0.0 libtwo.so
    + 
    + %$bld/H-x86-gcc-3.3.3/bin/g++ -c b.cc
    + 
    + %ar cru libtwo.a b.o 
    + 
    + +

    ...with the resulting libraries looking like

    +
    + %ldd libone.so.1.0.0
    +         libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x40016000)
    +         libm.so.6 => /lib/tls/libm.so.6 (0x400fa000)
    +         libgcc_s.so.1 => /mnt/hd/bld/gcc/gcc/libgcc_s.so.1 (0x4011c000)
    +         libc.so.6 => /lib/tls/libc.so.6 (0x40125000)
    +         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00355000)
    + 
    + %ldd libtwo.so.1.0.0
    +         libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x40027000)
    +         libm.so.6 => /lib/tls/libm.so.6 (0x400e1000)
    +         libgcc_s.so.1 => /mnt/hd/bld/gcc/gcc/libgcc_s.so.1 (0x40103000)
    +         libc.so.6 => /lib/tls/libc.so.6 (0x4010c000)
    +         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00355000)
    + 
    + 
    + +

    Then, the "C" compiler is used to compile a source file that uses + functions from each library.

    +
    + gcc test.c -g -O2 -L. -lone -ltwo /usr/lib/libstdc++.so.5 /usr/lib/libstdc++.so.6
    + 
    + +

    + Which gives the expected: +

    +
    + %ldd a.out
    +         libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x00764000)
    +         libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x40015000)
    +         libc.so.6 => /lib/tls/libc.so.6 (0x0036d000)
    +         libm.so.6 => /lib/tls/libm.so.6 (0x004a8000)
    +         libgcc_s.so.1 => /mnt/hd/bld/gcc/gcc/libgcc_s.so.1 (0x400e5000)
    +         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00355000)
    + 
    + +

    + This resulting binary, when executed, will be able to safely use code + from both liba, and the dependent libstdc++.so.6, and libb, with the + dependent libstdc++.so.5. +

    + +

    + Bibliography / Further Reading +

    + +

    + ABIcheck, a vague idea of checking ABI compatibility +
    + http://abicheck.sourceforge.net/ +

    + +

    + C++ ABI reference +
    + http://www.codesourcery.com/cxx-abi/ +

    + +

    + Intel ABI documentation +
    + "Intel® Compilers for Linux* -Compatibility with the GNU Compilers" +
    + (included in icc 6.0) +

    + +

    + Sun Solaris 2.9 docs +
    + Linker and Libraries Guide (document 816-1386) +
    + C++ Migration Guide (document 816-2459) +
    + http://docs.sun.com/db/prod/solaris.9 +
    + http://docs.sun.com/?p=/doc/816-1386&a=load +

    + +

    + Ulrich Drepper, "ELF Symbol Versioning" +
    + http://people.redhat.com/drepper/symbol-versioning +

    + + + + diff -Nrc3pad gcc-3.4.0/libstdc++-v3/docs/html/abi.txt gcc-3.4.1/libstdc++-v3/docs/html/abi.txt *** gcc-3.4.0/libstdc++-v3/docs/html/abi.txt 2003-07-28 04:13:57.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/docs/html/abi.txt 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,389 **** - - 2002-10-14 Benjamin Kosnik - - Description of the libstdc++ ABI. - - I. What is an ABI? What's covered? What's not? - - - scope of document, of use to system integrators. - - - What's the deal with C++? Why can't different compiler's object - files link with each other? Bug? Feature? - - - compilation includes and linked library binary must match up.. - - - shared library only, static is immutable. - - - What's an ABI? - - - library ABI, compiler ABI different issues, (but related) - - - GNU C++ does not have a compiler command line option to switch - between various different C++ ABIs. For instance, there is no way to - switch between the gcc-3.0.x ABI, gcc-3.1.x ABI, and the gcc-3.2.x - ABI during compilation. Other C++ compilers do allow this, and some - g++ command line options may change the ABI (-fno-exceptions, see - the complete list), but there is no version switch. Sorry. - - To use a specific C++ABI, one must use the corresponding GNU C++ - toolchain. - - - How can this complexity be managed? What does C++ versioning mean? - Because library and compiler changes often make binaries compiled - with one version of the GNU tools incompatible with binaries - compiled with other (either newer or older) versions of the same GNU - tools, specific techniques are used to make managing this complexity - easier. - - The following techniques are used: - - - Release versioning on the libgcc_s.so binary. - - It is versioned as follows: - gcc-3.0.0: libgcc_s.so.1 - gcc-3.0.1: libgcc_s.so.1 - gcc-3.0.2: libgcc_s.so.1 - gcc-3.0.3: libgcc_s.so.1 - gcc-3.0.4: libgcc_s.so.1 - gcc-3.1.0: libgcc_s.so.1 - gcc-3.1.1: libgcc_s.so.1 - gcc-3.2.0: libgcc_s.so.1 - - - - Release versioning on the libstdc++.so binary. - - It is versioned as follows: - gcc-3.0.0: libstdc++.so.3.0.0 - gcc-3.0.1: libstdc++.so.3.0.1 - gcc-3.0.2: libstdc++.so.3.0.2 - gcc-3.0.3: libstdc++.so.3.0.2 (Error, should be libstdc++.so.3.0.3) - gcc-3.0.4: libstdc++.so.3.0.4 - gcc-3.1.0: libstdc++.so.4.0.0 - gcc-3.1.1: libstdc++.so.4.0.1 - gcc-3.2.0: libstdc++.so.5.0.0 - - - - Symbol versioning on the libgcc_s.so binary. - - file: gcc/libgcc-std.ver - - It is versioned as follows: - gcc-3.0.0: GCC_3.0 - gcc-3.0.1: GCC_3.0 - gcc-3.0.2: GCC_3.0 - gcc-3.0.3: GCC_3.0 - gcc-3.0.4: GCC_3.0 - gcc-3.1.0: GCC_3.0 - gcc-3.1.1: GCC_3.0 - gcc-3.2.0: GCC_3.0 - - - - Symbol versioning on the libstdc++.so binary. - - It is versioned as follows: - gcc-3.0.0: (Error, unversioned) - gcc-3.0.1: (Error, unversioned) - gcc-3.0.2: (Error, unversioned) - gcc-3.0.3: (Error, unversioned) - gcc-3.0.4: (Error, unversioned) - gcc-3.1.0: GLIBCPP_3.1, CXXABI_1 - gcc-3.1.1: GLIBCPP_3.1, CXXABI_1 - gcc-3.2.0: GLIBCPP_3.2, CXXABI_1.2 - - file: libstdc++-v3/config/linker-map.gnu - - - - Incremental bumping of a compiler pre-defined macro, - __GXX_ABI_VERSION. This macro is defined as the version of the - compiler v3 ABI, with g++ 3.0.x being version 100. This macro will - be automatically defined whenever g++ is used (the curious can - test this by invoking g++ with the '-v' flag.) - - This macro is defined in the file "lang-specs.h" in the gcc/cp directory. - Later versions define it in "c-common.c" in the gcc directory. - - It is versioned as follows: - gcc-3.0.x: 100 - gcc-3.1.x: 100 (Error, should be 101) - gcc-3.2.x: 102 - - - - Incremental bumping of a library pre-defined macro, __GLIBCPP__ or - __GLIBCXX__. This macro is defined as the date the library was - released, in compressed ISO date format, as an unsigned long. - - This macro is defined in the file "c++config" in the - "libstdc++-v3/include/bits" directory and is changed every night - by an automated script. - - It is versioned as follows: - gcc-3.0.0: 20010615 - gcc-3.0.1: 20010819 - gcc-3.0.2: 20011023 - gcc-3.0.3: 20011220 - gcc-3.0.4: 20020220 - gcc-3.1.0: 20020514 - gcc-3.1.1: 20020725 - gcc-3.2.0: 20020814 - - - - Incremental bumping of a library pre-defined macro, - _GLIBCPP_VERSION. This macro is defined as the released version of - the library, as a string literal. This is only implemented in - gcc-3.1.0 releases and higher, and changed to _GLIBCXX_VERSION in 3.4. - - This macro is defined in the file "c++config" in the - "libstdc++-v3/include/bits" directory and is generated - automatically by autoconf as part of the configure-time generation - of config.h. - - It is versioned as follows: - gcc-3.0.0: "3.0.0" - gcc-3.0.1: "3.0.0" (Error, should be "3.0.1") - gcc-3.0.2: "3.0.0" (Error, should be "3.0.2") - gcc-3.0.3: "3.0.0" (Error, should be "3.0.3") - gcc-3.0.4: "3.0.0" (Error, should be "3.0.4") - gcc-3.1.0: "3.1.0" - gcc-3.1.1: "3.1.1" - gcc-3.2.0: "3.2" - - - - Matching each specific C++ compiler release to a specific set of - C++ include files. This is only implemented in gcc-3.1.1 releases - and higher. - - All C++ includes are installed in include/c++, then nest in a - directory hierarchy corresponding to the C++ compiler's released - version. This version corresponds to the variable "gcc_version" in - "libstdc++-v3/acinclude.m4," and more details can be found in that - file's macro GLIBCPP_CONFIGURE. - - C++ includes are versioned as follows: - gcc-3.0.0: include/g++-v3 - gcc-3.0.1: include/g++-v3 - gcc-3.0.2: include/g++-v3 - gcc-3.0.3: include/g++-v3 - gcc-3.0.4: include/g++-v3 - gcc-3.1.0: include/g++-v3 - gcc-3.1.1: include/c++/3.1.1 - gcc-3.2.0: include/c++/3.2 - - Taken together, these techniques can accurately specify interface - and implementation changes in the GNU C++ tools themselves. Used - properly, they allow both the GNU C++ tools implementation, and - programs using them, an evolving yet controlled development that - maintains backward compatibility. - - - Minimum environment that supports a versioned ABI: what's needed? A - supported dynamic linker, a GNU linker of sufficient vintage to - understand demangled C++ name globbing (ld), a shared executable - compiled with g++, and shared libraries (libgcc_s, libstdc++-v3) - compiled by a compiler (g++) with a compatible ABI. Phew. - - On top of all that, an additional constraint: libstdc++ did not - attempt to version symbols (or age gracefully, really) until version - 3.1.0. - - Most modern Linux and BSD versions, particularly ones using - gcc-3.1.x tools, will meet the requirements above. - - - What configure options impact symbol versioning? - - It turns out that most of the configure options that change default - behavior will impact the mangled names of exported symbols, and thus - impact versioning and compatibility. - - For more information on configure options, including ABI impacts, see: - http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html - - There is one flag that explicitly deals with symbol versioning: - --enable-symvers. - - In particular, libstdc++-v3/acinclude.m4 has a macro called - GLIBCXX_ENABLE_SYMVERS that defaults to yes (or the argument passed - in via --enable-symvers=foo). At that point, the macro attempts to - make sure that all the requirement for symbol versioning are in - place. For more information, please consult acinclude.m4. - - - How can I tell if symbol versioning is, indeed, active? - - When the GNU C++ library is being built with symbol versioning on, - you should see the following at configure time for libstdc++-v3: - - checking versioning on shared library symbols... gnu - - If you don't see this line in the configure output, or if this line - appears but the last word is 'no', then you are out of luck. - - If the compiler is pre-installed, a quick way to test is to compile - the following (or any) simple C++ file: - - #include - - int main() - { std::cout << "hello" << std::endl; return 0; } - - %g++ hello.cc -o hello.out - %nm hello.out - - If you see symbols in the resulting output with "GLIBCPP_3.x" as part - of the name, then the executable is versioned. Here's an example: - - U _ZNSt8ios_base4InitC1Ev@@GLIBCPP_3.1 - - - II. Library ABI changes - - The following will cause the library major version number to - increase, say from "libstdc++.so.3.0.4" to "libstdc++.so.4.0.0". - - - (anything) changing in the gcc/g++ compiler ABI - - - (anything) changing size of an exported symbol - - - (anything) changing alignment of an exported symbol - - - (anything) changing the layout of an exported symbol - - - (anything) changing mangling on an exported symbol - - - (anything) deleting an exported symbol - - - (anything) changing the size, alignment, or layout of types - specified in the C++ standard. These may not necessarily be - instantiated or otherwise exported in the library binary, and - include all the required locale facets, as well as things like - std::basic_streambuf, et al. - - Note: adding an exported symbol, if it's in a new and dependent - interface name, is ok. - - The following will cause the library revision version number to - increase, say from "libstdc++.so.5.0.0" to "libstdc++.so.5.0.1". - - - any release of the gcc toolchain. - - - III. Versioning - - - include files - - - versioning headers with version, why necessary - (need to control member/non-member functions, add delete files) - - - shared library binaries - - - release versions - - - libtool versions - - - when does so version get a bump? what are the options? - - - how is the link map used? - - - in an non-abi breaking minor release, how are symbols added? - removed? - - - in an abi-breaking major release, what happens? symbol fall back - - - IV. Testing ABI changes - - Testing for GNU C++ ABI changes is composed of two distinct areas: - testing the C++ compiler (g++) for compiler changes, and testing the - C++ library (libstdc++) for library changes. - - Testing the C++ compiler ABI can be done various ways. - - One. - Intel ABI checker. More information can be obtained - here. - - Two. - The second is yet unreleased, but has been announced on the gcc - mailing list. It is yet unspecified if these tools will be freely - available, and able to be included in a GNU project. Please contact - Mark Mitchell (mark@codesourcery.com) for more details, and current - status. - - Three. - Involves using the vlad.consistency test framework. This has also been - discussed on the gcc mailing lists. - - Testing the C++ library ABI can also be done various ways. - - One. - (Brendan Kehoe, Jeff Law suggestion to run 'make check-c++' two ways, - one with a new compiler and an old library, and the other with an old - compiler and a new library, and look for testsuite regressions) - - Details on how to set this kind of test up can be found here: - http://gcc.gnu.org/ml/gcc/2002-08/msg00142.html - - Two. - Use the 'make check-abi' rule in the libstdc++-v3 Makefile. - - This is a proactive check the library ABI. Currently, exported symbol - names that are either weak or defined are checked against a last known - good baseline. Currently, this baseline is keyed off of 3.2.0 - binaries, as this was the last time the .so number was incremented. In - addition, all exported names are demangled, and the exported objects - are checked to make sure they are the same size as the same object in - the baseline. - - This dataset is insufficient, yet a start. Also needed is a - comprehensive check for all user-visible types part of the standard - library for sizeof() and alignof() changes. - - Verifying compatible layouts of objects is not even attempted. It - should be possible to use sizeof, alignof, and offsetof to compute - offsets for each structure and type in the standard library, saving to - another datafile. Then, compute this in a similar way for new - binaries, and look for differences. - - Another approach might be to use the -fdump-class-hierarchy flag to - get information. However, currently this approach gives insufficient - data for use in library testing, as class data members, their offsets, - and other detailed data is not displayed with this flag. - (See g++/7470 on how this was used to find bugs.) - - Perhaps there are other C++ ABI checkers. If so, please notify - us. We'd like to know about them! - - - V. Issues not directly addressed, and possible suggestions - - - what to do about multi-ABI systems (nathan scenario)? - - - compatibility libs - - --enable-version-specific-runtime-libs - - - Alexandre Oliva proposal to have extended name attributes, modify ld - - - directory-level versioning - - - wrapping C++ API's in "C" to use the C ABI. - - - V. References - - ABIcheck, a vague idea of checking ABI compatibility - http://abicheck.sourceforge.net/ - - C++ ABI reference - http://www.codesourcery.com/cxx-abi/ - - Intel ABI documentation - "Intel® Compilers for Linux* -Compatibility with the GNU Compilers" - (included in icc 6.0) - - Sun Solaris 2.9 docs - Linker and Libraries Guide (document 816-1386) - C++ Migration Guide (document 816-2459) - http://docs.sun.com/db/prod/solaris.9 - http://docs.sun.com/?p=/doc/816-1386&a=load - - Ulrich Drepper, "ELF Symbol Versioning" - http://people.redhat.com/drepper/symbol-versioning - --- 0 ---- diff -Nrc3pad gcc-3.4.0/libstdc++-v3/docs/html/configopts.html gcc-3.4.1/libstdc++-v3/docs/html/configopts.html *** gcc-3.4.0/libstdc++-v3/docs/html/configopts.html 2004-03-18 17:36:36.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/docs/html/configopts.html 2004-04-23 22:05:26.000000000 +0000 *************** options *** 135,141 ****

    Select a target-specific underlying std::allocator. The choices are 'new' to specify a wrapper for new, 'malloc' to specify a wrapper for malloc, 'mt' for a fixed power of two allocator ! (More info) or 'bitmap' for a bitmap allocator. This option can change the library ABI.

    --- 135,141 ----

    Select a target-specific underlying std::allocator. The choices are 'new' to specify a wrapper for new, 'malloc' to specify a wrapper for malloc, 'mt' for a fixed power of two allocator ! (documented under extensions) or 'bitmap' for a bitmap allocator. This option can change the library ABI.

    diff -Nrc3pad gcc-3.4.0/libstdc++-v3/docs/html/documentation.html gcc-3.4.1/libstdc++-v3/docs/html/documentation.html *** gcc-3.4.0/libstdc++-v3/docs/html/documentation.html 2004-03-18 17:36:36.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/docs/html/documentation.html 2004-05-30 16:12:09.000000000 +0000 *************** *** 30,36 ****
    • License - GPL v2 license terms
    • !
    • ABI Policy and Guidelines
    • BUGS
    • PROBLEMS - target-specific known issues
    • --- 30,36 ----
      • License - GPL v2 license terms
      • !
      • ABI Policy and Guidelines
      • BUGS
      • PROBLEMS - target-specific known issues
      • *************** *** 73,79 **** be viewed online:

          !
        • for the 3.3 release
        • "the latest collection" (for the main development tree; see the date on the first page)
        • --- 73,79 ---- be viewed online:

            !
          • for the 3.4 release
          • "the latest collection" (for the main development tree; see the date on the first page)
          • diff -Nrc3pad gcc-3.4.0/libstdc++-v3/docs/html/faq/index.html gcc-3.4.1/libstdc++-v3/docs/html/faq/index.html *** gcc-3.4.0/libstdc++-v3/docs/html/faq/index.html 2004-03-18 17:36:41.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/docs/html/faq/index.html 2004-05-13 15:27:41.000000000 +0000 *************** which is no longer available, thanks dej *** 395,410 ****

            It's not a bug, and it's not really a problem. Nevertheless, some people don't like it, so here are two pseudo-solutions:

            !

            If the only functions from libstdc++.a which you need are language ! support functions (those listed in ! clause 18 of the standard, ! e.g., new and delete), then try linking ! against libsupc++.a (usually specifying ! -lsupc++ when calling g++ for the final link step will ! do it). This library contains only those support routines, one per ! object file. But if you are using anything from the rest of the ! library, such as IOStreams or vectors, then you'll still need ! pieces from libstdc++.a.

            The second method is one we hope to incorporate into the library build process. Some platforms can place each function and variable --- 395,411 ----

            It's not a bug, and it's not really a problem. Nevertheless, some people don't like it, so here are two pseudo-solutions:

            !

            If the only functions from libstdc++.a which you need are ! language support functions (those listed in clause 18 of the ! standard, e.g., new and delete), ! then try linking against libsupc++.a (Using ! gcc instead of g++ and explicitly ! linking in -lsupc++ for the final link step will ! do it). This library contains only those support routines, ! one per object file. But if you are using anything from the ! rest of the library, such as IOStreams or vectors, then ! you'll still need pieces from libstdc++.a.

            The second method is one we hope to incorporate into the library build process. Some platforms can place each function and variable diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/backward/iterator.h gcc-3.4.1/libstdc++-v3/include/backward/iterator.h *** gcc-3.4.0/libstdc++-v3/include/backward/iterator.h 2003-12-09 03:27:10.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/backward/iterator.h 2004-05-06 22:07:06.000000000 +0000 *************** *** 1,3 **** --- 1,32 ---- + // Backward-compat support -*- C++ -*- + + // Copyright (C) 2001, 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + // As a special exception, you may use this file as part of a free software + // library without restriction. Specifically, if other files instantiate + // templates or use macros or inline functions from this file, or you compile + // this file and link it with other files to produce an executable, this + // file does not by itself cause the resulting executable to be covered by + // the GNU General Public License. This exception does not however + // invalidate any other reasons why the executable file might be covered by + // the GNU General Public License. + /* * * Copyright (c) 1994 diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/backward/strstream gcc-3.4.1/libstdc++-v3/include/backward/strstream *** gcc-3.4.0/libstdc++-v3/include/backward/strstream 2003-12-09 03:27:10.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/backward/strstream 2004-05-24 20:49:48.000000000 +0000 *************** *** 1,6 **** // Backward-compat support -*- C++ -*- ! // 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 ---- // Backward-compat support -*- C++ -*- ! // 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 *************** namespace std *** 98,103 **** --- 98,108 ---- = ios_base::in | ios_base::out); private: + strstreambuf& + operator=(const strstreambuf&); + + strstreambuf(const strstreambuf&); + // Dynamic allocation, possibly using _M_alloc_fun and _M_free_fun. char* _M_alloc(size_t); void _M_free(char*); diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/basic_ios.h gcc-3.4.1/libstdc++-v3/include/bits/basic_ios.h *** gcc-3.4.0/libstdc++-v3/include/bits/basic_ios.h 2004-03-18 17:36:46.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/bits/basic_ios.h 2004-05-24 20:49:48.000000000 +0000 *************** *** 1,6 **** // Iostreams base classes -*- C++ -*- ! // Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free --- 1,6 ---- // Iostreams base classes -*- C++ -*- ! // Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003, 2004 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free *************** namespace std *** 254,260 **** */ explicit basic_ios(basic_streambuf<_CharT, _Traits>* __sb) ! : ios_base(), _M_ctype(0), _M_num_put(0), _M_num_get(0) { this->init(__sb); } /** --- 254,261 ---- */ explicit basic_ios(basic_streambuf<_CharT, _Traits>* __sb) ! : ios_base(), _M_tie(0), _M_fill(), _M_fill_init(false), _M_streambuf(0), ! _M_ctype(0), _M_num_put(0), _M_num_get(0) { this->init(__sb); } /** *************** namespace std *** 440,446 **** * The default constructor does nothing and is not normally * accessible to users. */ ! basic_ios() : ios_base(), _M_ctype(0), _M_num_put(0), _M_num_get(0) { } /** --- 441,449 ---- * The default constructor does nothing and is not normally * accessible to users. */ ! basic_ios() ! : ios_base(), _M_tie(0), _M_fill(char_type()), _M_fill_init(false), ! _M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0) { } /** diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/basic_string.h gcc-3.4.1/libstdc++-v3/include/bits/basic_string.h *** gcc-3.4.0/libstdc++-v3/include/bits/basic_string.h 2004-03-18 17:36:46.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/bits/basic_string.h 2004-05-24 20:49:49.000000000 +0000 *************** namespace std *** 418,431 **** * @param str Source string. */ basic_string& ! operator=(const basic_string& __str) { return this->assign(__str); } /** * @brief Copy contents of @a s into this string. * @param s Source null-terminated string. */ basic_string& ! operator=(const _CharT* __s) { return this->assign(__s); } /** * @brief Set value to string of length 1. --- 418,439 ---- * @param str Source string. */ basic_string& ! operator=(const basic_string& __str) ! { ! this->assign(__str); ! return *this; ! } /** * @brief Copy contents of @a s into this string. * @param s Source null-terminated string. */ basic_string& ! operator=(const _CharT* __s) ! { ! this->assign(__s); ! return *this; ! } /** * @brief Set value to string of length 1. *************** namespace std *** 435,441 **** * (*this)[0] == @a c. */ basic_string& ! operator=(_CharT __c) { return this->assign(1, __c); } // Iterators: /** --- 443,453 ---- * (*this)[0] == @a c. */ basic_string& ! operator=(_CharT __c) ! { ! this->assign(1, __c); ! return *this; ! } // Iterators: /** *************** namespace std *** 1342,1348 **** if (this->max_size() - (this->size() - __n1) < __n2) __throw_length_error(__N("basic_string::_M_replace_aux")); _M_mutate(__pos1, __n1, __n2); ! if (__n2) traits_type::assign(_M_data() + __pos1, __n2, __c); return *this; } --- 1354,1362 ---- if (this->max_size() - (this->size() - __n1) < __n2) __throw_length_error(__N("basic_string::_M_replace_aux")); _M_mutate(__pos1, __n1, __n2); ! if (__n2 == 1) ! _M_data()[__pos1] = __c; ! else if (__n2) traits_type::assign(_M_data() + __pos1, __n2, __c); return *this; } *************** namespace std *** 1352,1358 **** size_type __n2) { _M_mutate(__pos1, __n1, __n2); ! if (__n2) traits_type::copy(_M_data() + __pos1, __s, __n2); return *this; } --- 1366,1374 ---- size_type __n2) { _M_mutate(__pos1, __n1, __n2); ! if (__n2 == 1) ! _M_data()[__pos1] = *__s; ! else if (__n2) traits_type::copy(_M_data() + __pos1, __s, __n2); return *this; } *************** namespace std *** 1960,1966 **** * @param rhs Last string. * @return New string with value of @a lhs followed by @a rhs. */ ! template basic_string<_CharT, _Traits, _Alloc> operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) --- 1976,1982 ---- * @param rhs Last string. * @return New string with value of @a lhs followed by @a rhs. */ ! template basic_string<_CharT, _Traits, _Alloc> operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/basic_string.tcc gcc-3.4.1/libstdc++-v3/include/bits/basic_string.tcc *** gcc-3.4.0/libstdc++-v3/include/bits/basic_string.tcc 2004-03-18 17:36:47.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/bits/basic_string.tcc 2004-05-09 23:27:56.000000000 +0000 *************** namespace std *** 91,97 **** if (__beg == __end && __a == _Alloc()) return _S_empty_rep()._M_refdata(); // Avoid reallocation for common case. ! _CharT __buf[100]; size_type __len = 0; while (__beg != __end && __len < sizeof(__buf) / sizeof(_CharT)) { --- 91,97 ---- if (__beg == __end && __a == _Alloc()) return _S_empty_rep()._M_refdata(); // Avoid reallocation for common case. ! _CharT __buf[128]; size_type __len = 0; while (__beg != __end && __len < sizeof(__buf) / sizeof(_CharT)) { *************** namespace std *** 178,185 **** template basic_string<_CharT, _Traits, _Alloc>:: basic_string(const basic_string& __str) ! : _M_dataplus(__str._M_rep()->_M_grab(_Alloc(), __str.get_allocator()), ! __str.get_allocator()) { } template --- 178,186 ---- template basic_string<_CharT, _Traits, _Alloc>:: basic_string(const basic_string& __str) ! : _M_dataplus(__str._M_rep()->_M_grab(_Alloc(__str.get_allocator()), ! __str.get_allocator()), ! __str.get_allocator()) { } template *************** namespace std *** 382,388 **** { const size_type __old_size = this->size(); const size_type __new_size = __old_size + __len2 - __len1; - const _CharT* __src = _M_data() + __pos + __len1; const size_type __how_much = __old_size - __pos - __len1; if (_M_rep() == &_S_empty_rep() --- 383,388 ---- *************** namespace std *** 396,402 **** traits_type::copy(__r->_M_refdata(), _M_data(), __pos); if (__how_much) traits_type::copy(__r->_M_refdata() + __pos + __len2, ! __src, __how_much); _M_rep()->_M_dispose(__a); _M_data(__r->_M_refdata()); --- 396,402 ---- traits_type::copy(__r->_M_refdata(), _M_data(), __pos); if (__how_much) traits_type::copy(__r->_M_refdata() + __pos + __len2, ! _M_data() + __pos + __len1, __how_much); _M_rep()->_M_dispose(__a); _M_data(__r->_M_refdata()); *************** namespace std *** 404,410 **** else if (__how_much && __len1 != __len2) { // Work in-place ! traits_type::move(_M_data() + __pos + __len2, __src, __how_much); } _M_rep()->_M_set_sharable(); _M_rep()->_M_length = __new_size; --- 404,411 ---- else if (__how_much && __len1 != __len2) { // Work in-place ! traits_type::move(_M_data() + __pos + __len2, ! _M_data() + __pos + __len1, __how_much); } _M_rep()->_M_set_sharable(); _M_rep()->_M_length = __new_size; diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/boost_concept_check.h gcc-3.4.1/libstdc++-v3/include/bits/boost_concept_check.h *** gcc-3.4.0/libstdc++-v3/include/bits/boost_concept_check.h 2004-03-18 17:36:47.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/bits/boost_concept_check.h 2004-06-23 16:09:48.000000000 +0000 *************** *** 1,4 **** --- 1,30 ---- + // Copyright (C) 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + // As a special exception, you may use this file as part of a free software + // library without restriction. Specifically, if other files instantiate + // templates or use macros or inline functions from this file, or you compile + // this file and link it with other files to produce an executable, this + // file does not by itself cause the resulting executable to be covered by + // the GNU General Public License. This exception does not however + // invalidate any other reasons why the executable file might be covered by + // the GNU General Public License. + // (C) Copyright Jeremy Siek 2000. Permission to copy, use, modify, // sell and distribute this software is granted provided this // copyright notice appears in all copies. This software is provided *************** inline void __function_requires() *** 36,41 **** --- 62,73 ---- 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() {} }; --- 120,126 ---- 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() {} }; --- 136,142 ---- 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 --- 147,153 ---- template struct _UnsignedIntegerConcept { void __constraints() { ! __error_type_must_be_an_unsigned_integer_type(); } }; template <> struct _UnsignedIntegerConcept *************** struct _Aux_require_same<_Tp,_Tp> { type *** 162,168 **** __const_constraints(__a); } void __const_constraints(const _Tp& __a) { ! _Tp __c(__a) _IsUnused; // require const copy constructor const _Tp* __ptr _IsUnused = &__a; // require const address of operator } _Tp __b; --- 194,200 ---- __const_constraints(__a); } void __const_constraints(const _Tp& __a) { ! _Tp __c _IsUnused(__a); // require const copy constructor const _Tp* __ptr _IsUnused = &__a; // require const address of operator } _Tp __b; *************** struct _Aux_require_same<_Tp,_Tp> { type *** 173,184 **** struct _SGIAssignableConcept { void __constraints() { ! _Tp __b(__a) _IsUnused; __a = __a; // require assignment operator __const_constraints(__a); } void __const_constraints(const _Tp& __b) { ! _Tp __c(__b) _IsUnused; __a = __b; // const required for argument to assignment } _Tp __a; --- 205,216 ---- struct _SGIAssignableConcept { void __constraints() { ! _Tp __b _IsUnused(__a); __a = __a; // require assignment operator __const_constraints(__a); } void __const_constraints(const _Tp& __b) { ! _Tp __c _IsUnused(__b); __a = __b; // const required for argument to assignment } _Tp __a; *************** struct _Aux_require_same<_Tp,_Tp> { type *** 386,392 **** struct _TrivialIteratorConcept { void __constraints() { ! __function_requires< _DefaultConstructibleConcept<_Tp> >(); __function_requires< _AssignableConcept<_Tp> >(); __function_requires< _EqualityComparableConcept<_Tp> >(); // typedef typename std::iterator_traits<_Tp>::value_type _V; --- 418,424 ---- struct _TrivialIteratorConcept { void __constraints() { ! // __function_requires< _DefaultConstructibleConcept<_Tp> >(); __function_requires< _AssignableConcept<_Tp> >(); __function_requires< _EqualityComparableConcept<_Tp> >(); // typedef typename std::iterator_traits<_Tp>::value_type _V; *************** struct _Aux_require_same<_Tp,_Tp> { type *** 443,448 **** --- 475,481 ---- { void __constraints() { __function_requires< _InputIteratorConcept<_Tp> >(); + __function_requires< _DefaultConstructibleConcept<_Tp> >(); __function_requires< _ConvertibleConcept< typename std::iterator_traits<_Tp>::iterator_category, std::forward_iterator_tag> >(); *************** struct _Aux_require_same<_Tp,_Tp> { type *** 694,702 **** __function_requires< _DefaultConstructibleConcept<_Sequence> >(); _Sequence ! __c(__n) _IsUnused, ! __c2(__n, __t) _IsUnused, ! __c3(__first, __last) _IsUnused; __c.insert(__p, __t); __c.insert(__p, __n, __t); --- 727,735 ---- __function_requires< _DefaultConstructibleConcept<_Sequence> >(); _Sequence ! __c _IsUnused(__n), ! __c2 _IsUnused(__n, __t), ! __c3 _IsUnused(__first, __last); __c.insert(__p, __t); __c.insert(__p, __n, __t); *************** struct _Aux_require_same<_Tp,_Tp> { type *** 813,819 **** __c.insert(__first, __last); } ! typename _MultipleAssociativeContainer::iterator __pos _IsUnused; typename _MultipleAssociativeContainer::value_type __t; typename _MultipleAssociativeContainer::value_type *__first, *__last; }; --- 846,852 ---- __c.insert(__first, __last); } ! typename _MultipleAssociativeContainer::iterator __pos; typename _MultipleAssociativeContainer::value_type __t; typename _MultipleAssociativeContainer::value_type *__first, *__last; }; *************** struct _Aux_require_same<_Tp,_Tp> { type *** 856,864 **** _ReversibleContainerConcept<_SortedAssociativeContainer> >(); _SortedAssociativeContainer ! __c(__kc) _IsUnused, ! __c2(__first, __last) _IsUnused, ! __c3(__first, __last, __kc) _IsUnused; __p = __c.upper_bound(__k); __p = __c.lower_bound(__k); --- 889,897 ---- _ReversibleContainerConcept<_SortedAssociativeContainer> >(); _SortedAssociativeContainer ! __c _IsUnused(__kc), ! __c2 _IsUnused(__first, __last), ! __c3 _IsUnused(__first, __last, __kc); __p = __c.upper_bound(__k); __p = __c.lower_bound(__k); diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/c++config gcc-3.4.1/libstdc++-v3/include/bits/c++config *** gcc-3.4.0/libstdc++-v3/include/bits/c++config 2004-04-19 00:16:03.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/bits/c++config 2004-07-01 00:16:05.000000000 +0000 *************** *** 35,41 **** #include // The current version of the C++ library in compressed ISO date format. ! #define __GLIBCXX__ 20040419 // Allow use of "export template." This is currently not a feature // that g++ supports. --- 35,41 ---- #include // The current version of the C++ library in compressed ISO date format. ! #define __GLIBCXX__ 20040701 // Allow use of "export template." This is currently not a feature // that g++ supports. diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/codecvt.h gcc-3.4.1/libstdc++-v3/include/bits/codecvt.h *** gcc-3.4.0/libstdc++-v3/include/bits/codecvt.h 2004-03-18 17:36:47.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/bits/codecvt.h 2004-04-30 04:20:22.000000000 +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); } } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/fstream.tcc gcc-3.4.1/libstdc++-v3/include/bits/fstream.tcc *** gcc-3.4.0/libstdc++-v3/include/bits/fstream.tcc 2004-03-18 17:36:49.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/bits/fstream.tcc 2004-05-24 20:49:49.000000000 +0000 *************** namespace std *** 73,82 **** template basic_filebuf<_CharT, _Traits>:: ! basic_filebuf() : __streambuf_type(), _M_file(&_M_lock), _M_mode(ios_base::openmode(0)), _M_state_beg(), _M_state_cur(), _M_state_last(), _M_buf(NULL), _M_buf_size(BUFSIZ), ! _M_buf_allocated(false), _M_reading(false), _M_writing(false), _M_pback_cur_save(0), _M_pback_end_save(0), _M_pback_init(false), _M_codecvt(0), _M_ext_buf(0), _M_ext_buf_size(0), _M_ext_next(0), _M_ext_end(0) --- 73,82 ---- template basic_filebuf<_CharT, _Traits>:: ! basic_filebuf() : __streambuf_type(), _M_lock(), _M_file(&_M_lock), _M_mode(ios_base::openmode(0)), _M_state_beg(), _M_state_cur(), _M_state_last(), _M_buf(NULL), _M_buf_size(BUFSIZ), ! _M_buf_allocated(false), _M_reading(false), _M_writing(false), _M_pback(), _M_pback_cur_save(0), _M_pback_end_save(0), _M_pback_init(false), _M_codecvt(0), _M_ext_buf(0), _M_ext_buf_size(0), _M_ext_next(0), _M_ext_end(0) *************** namespace std *** 786,791 **** --- 786,793 ---- if (__testvalid) _M_codecvt = _M_codecvt_tmp; + else + _M_codecvt = 0; } // Inhibit implicit instantiations for required instantiations, diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/istream.tcc gcc-3.4.1/libstdc++-v3/include/bits/istream.tcc *** gcc-3.4.0/libstdc++-v3/include/bits/istream.tcc 2004-03-18 17:36:50.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/bits/istream.tcc 2004-05-25 22:13:24.000000000 +0000 *************** *** 1,6 **** // istream classes -*- C++ -*- ! // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free --- 1,6 ---- // istream classes -*- C++ -*- ! // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free *************** *** 29,35 **** // the GNU General Public License. // ! // ISO C++ 14882: 27.6.2 Output streams // #ifndef _ISTREAM_TCC --- 29,35 ---- // the GNU General Public License. // ! // ISO C++ 14882: 27.6.1 Input streams // #ifndef _ISTREAM_TCC *************** namespace std *** 44,57 **** { template basic_istream<_CharT, _Traits>::sentry:: ! sentry(basic_istream<_CharT, _Traits>& __in, bool __noskipws) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); if (__in.good()) { if (__in.tie()) __in.tie()->flush(); ! if (!__noskipws && (__in.flags() & ios_base::skipws)) { const __int_type __eof = traits_type::eof(); __streambuf_type* __sb = __in.rdbuf(); --- 44,57 ---- { template basic_istream<_CharT, _Traits>::sentry:: ! sentry(basic_istream<_CharT, _Traits>& __in, bool __noskip) : _M_ok(false) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); if (__in.good()) { if (__in.tie()) __in.tie()->flush(); ! if (!__noskip && (__in.flags() & ios_base::skipws)) { const __int_type __eof = traits_type::eof(); __streambuf_type* __sb = __in.rdbuf(); *************** namespace std *** 59,65 **** const __ctype_type& __ct = __check_facet(__in._M_ctype); while (!traits_type::eq_int_type(__c, __eof) ! && __ct.is(ctype_base::space, traits_type::to_char_type(__c))) __c = __sb->snextc(); --- 59,65 ---- const __ctype_type& __ct = __check_facet(__in._M_ctype); while (!traits_type::eq_int_type(__c, __eof) ! && __ct.is(ctype_base::space, traits_type::to_char_type(__c))) __c = __sb->snextc(); *************** namespace std *** 75,81 **** _M_ok = true; else { - _M_ok = false; __err |= ios_base::failbit; __in.setstate(__err); } --- 75,80 ---- *************** namespace std *** 478,484 **** { try { ! int_type __cb = this->rdbuf()->sbumpc(); // 27.6.1.1 paragraph 3 if (!traits_type::eq_int_type(__cb, traits_type::eof())) { --- 477,483 ---- { try { ! const int_type __cb = this->rdbuf()->sbumpc(); // 27.6.1.1 paragraph 3 if (!traits_type::eq_int_type(__cb, traits_type::eof())) { *************** namespace std *** 520,527 **** && !traits_type::eq_int_type(__c, __idelim)) { *__s++ = traits_type::to_char_type(__c); - __c = __sb->snextc(); ++_M_gcount; } if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; --- 519,526 ---- && !traits_type::eq_int_type(__c, __idelim)) { *__s++ = traits_type::to_char_type(__c); ++_M_gcount; + __c = __sb->snextc(); } if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; *************** namespace std *** 592,618 **** const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); int_type __c = __sb->sgetc(); ! while (_M_gcount + 1 < __n && !traits_type::eq_int_type(__c, __eof) && !traits_type::eq_int_type(__c, __idelim)) { ! *__s++ = traits_type::to_char_type(__c); ! __c = __sb->snextc(); ! ++_M_gcount; } if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; ! else { ! if (traits_type::eq_int_type(__c, __idelim)) ! { ! __sb->sbumpc(); ! ++_M_gcount; ! } ! else ! __err |= ios_base::failbit; } } catch(...) { this->_M_setstate(ios_base::badbit); } --- 591,634 ---- const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); int_type __c = __sb->sgetc(); ! while (_M_gcount + 1 < __n && !traits_type::eq_int_type(__c, __eof) && !traits_type::eq_int_type(__c, __idelim)) { ! streamsize __size = std::min(streamsize(__sb->egptr() ! - __sb->gptr()), ! __n - _M_gcount - 1); ! if (__size > 1) ! { ! const char_type* __p = traits_type::find(__sb->gptr(), ! __size, ! __delim); ! if (__p) ! __size = __p - __sb->gptr(); ! traits_type::copy(__s, __sb->gptr(), __size); ! __s += __size; ! __sb->gbump(__size); ! _M_gcount += __size; ! __c = __sb->sgetc(); ! } ! else ! { ! *__s++ = traits_type::to_char_type(__c); ! ++_M_gcount; ! __c = __sb->snextc(); ! } } + if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; ! else if (traits_type::eq_int_type(__c, __idelim)) { ! ++_M_gcount; ! __sb->sbumpc(); } + else + __err |= ios_base::failbit; } catch(...) { this->_M_setstate(ios_base::badbit); } *************** namespace std *** 641,648 **** __streambuf_type* __sb = this->rdbuf(); int_type __c; ! __n = std::min(__n, numeric_limits::max()); ! while (_M_gcount < __n && !traits_type::eq_int_type(__c = __sb->sbumpc(), __eof)) { ++_M_gcount; --- 657,665 ---- __streambuf_type* __sb = this->rdbuf(); int_type __c; ! if (__n != numeric_limits::max()) ! --__n; ! while (_M_gcount <= __n && !traits_type::eq_int_type(__c = __sb->sbumpc(), __eof)) { ++_M_gcount; *************** namespace std *** 722,735 **** try { // Cannot compare int_type with streamsize generically. ! streamsize __num = this->rdbuf()->in_avail(); ! if (__num >= 0) ! { ! __num = std::min(__num, __n); ! if (__num) ! _M_gcount = this->rdbuf()->sgetn(__s, __num); ! } ! else __err |= ios_base::eofbit; } catch(...) --- 739,748 ---- try { // Cannot compare int_type with streamsize generically. ! const streamsize __num = this->rdbuf()->in_avail(); ! if (__num > 0) ! _M_gcount = this->rdbuf()->sgetn(__s, std::min(__num, __n)); ! else if (__num == -1) __err |= ios_base::eofbit; } catch(...) *************** namespace std *** 858,864 **** if (!this->fail()) { // 136. seekp, seekg setting wrong streams? ! pos_type __p = this->rdbuf()->pubseekpos(__pos, ios_base::in); // 129. Need error indication from seekp() and seekg() if (__p == pos_type(off_type(-1))) --- 871,878 ---- if (!this->fail()) { // 136. seekp, seekg setting wrong streams? ! const pos_type __p = this->rdbuf()->pubseekpos(__pos, ! ios_base::in); // 129. Need error indication from seekp() and seekg() if (__p == pos_type(off_type(-1))) *************** namespace std *** 885,892 **** if (!this->fail()) { // 136. seekp, seekg setting wrong streams? ! pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, ! ios_base::in); // 129. Need error indication from seekp() and seekg() if (__p == pos_type(off_type(-1))) --- 899,906 ---- if (!this->fail()) { // 136. seekp, seekg setting wrong streams? ! const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, ! ios_base::in); // 129. Need error indication from seekp() and seekg() if (__p == pos_type(off_type(-1))) *************** namespace std *** 906,918 **** operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) { typedef basic_istream<_CharT, _Traits> __istream_type; typename __istream_type::sentry __cerb(__in, false); if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); try { ! typename __istream_type::int_type __cb = __in.rdbuf()->sbumpc(); if (!_Traits::eq_int_type(__cb, _Traits::eof())) __c = _Traits::to_char_type(__cb); else --- 920,934 ---- operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) { typedef basic_istream<_CharT, _Traits> __istream_type; + typedef typename __istream_type::int_type __int_type; + typename __istream_type::sentry __cerb(__in, false); if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); try { ! const __int_type __cb = __in.rdbuf()->sbumpc(); if (!_Traits::eq_int_type(__cb, _Traits::eof())) __c = _Traits::to_char_type(__cb); else *************** namespace std *** 1025,1035 **** { try { __str.erase(); ! streamsize __w = __in.width(); ! __size_type __n; ! __n = __w > 0 ? static_cast<__size_type>(__w) : __str.max_size(); ! const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); const __int_type __eof = _Traits::eof(); __streambuf_type* __sb = __in.rdbuf(); --- 1041,1053 ---- { try { + // Avoid reallocation for common case. __str.erase(); ! _CharT __buf[128]; ! __size_type __len = 0; ! const streamsize __w = __in.width(); ! const __size_type __n = __w > 0 ? static_cast<__size_type>(__w) ! : __str.max_size(); const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); const __int_type __eof = _Traits::eof(); __streambuf_type* __sb = __in.rdbuf(); *************** namespace std *** 1039,1048 **** && !_Traits::eq_int_type(__c, __eof) && !__ct.is(ctype_base::space, _Traits::to_char_type(__c))) { ! __str += _Traits::to_char_type(__c); ++__extracted; __c = __sb->snextc(); } if (_Traits::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; __in.width(0); --- 1057,1073 ---- && !_Traits::eq_int_type(__c, __eof) && !__ct.is(ctype_base::space, _Traits::to_char_type(__c))) { ! if (__len == sizeof(__buf) / sizeof(_CharT)) ! { ! __str.append(__buf, sizeof(__buf) / sizeof(_CharT)); ! __len = 0; ! } ! __buf[__len++] = _Traits::to_char_type(__c); ++__extracted; __c = __sb->snextc(); } + __str.append(__buf, __len); + if (_Traits::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; __in.width(0); *************** namespace std *** 1077,1106 **** __size_type __extracted = 0; const __size_type __n = __str.max_size(); - bool __testdelim = false; ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); typename __istream_type::sentry __cerb(__in, true); if (__cerb) { try { __str.erase(); ! __int_type __idelim = _Traits::to_int_type(__delim); ! __streambuf_type* __sb = __in.rdbuf(); ! __int_type __c = __sb->sbumpc(); const __int_type __eof = _Traits::eof(); ! __testdelim = _Traits::eq_int_type(__c, __idelim); ! while (!_Traits::eq_int_type(__c, __eof) && !__testdelim ! && __extracted < __n) { ! __str += _Traits::to_char_type(__c); ++__extracted; ! __c = __sb->sbumpc(); ! __testdelim = _Traits::eq_int_type(__c, __idelim); } if (_Traits::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; } catch(...) { --- 1102,1146 ---- __size_type __extracted = 0; const __size_type __n = __str.max_size(); ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); typename __istream_type::sentry __cerb(__in, true); if (__cerb) { try { + // Avoid reallocation for common case. __str.erase(); ! _CharT __buf[128]; ! __size_type __len = 0; ! const __int_type __idelim = _Traits::to_int_type(__delim); const __int_type __eof = _Traits::eof(); ! __streambuf_type* __sb = __in.rdbuf(); ! __int_type __c = __sb->sgetc(); ! while (__extracted < __n ! && !_Traits::eq_int_type(__c, __eof) ! && !_Traits::eq_int_type(__c, __idelim)) { ! if (__len == sizeof(__buf) / sizeof(_CharT)) ! { ! __str.append(__buf, sizeof(__buf) / sizeof(_CharT)); ! __len = 0; ! } ! __buf[__len++] = _Traits::to_char_type(__c); ++__extracted; ! __c = __sb->snextc(); } + __str.append(__buf, __len); + if (_Traits::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; + else if (_Traits::eq_int_type(__c, __idelim)) + { + ++__extracted; + __sb->sbumpc(); + } + else + __err |= ios_base::failbit; } catch(...) { *************** namespace std *** 1110,1116 **** __in._M_setstate(ios_base::badbit); } } ! if ((!__extracted && !__testdelim) || __extracted == __n) __err |= ios_base::failbit; if (__err) __in.setstate(__err); --- 1150,1156 ---- __in._M_setstate(ios_base::badbit); } } ! if (!__extracted) __err |= ios_base::failbit; if (__err) __in.setstate(__err); diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/locale_classes.h gcc-3.4.1/libstdc++-v3/include/bits/locale_classes.h *** gcc-3.4.0/libstdc++-v3/include/bits/locale_classes.h 2004-03-18 17:36:50.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/bits/locale_classes.h 2004-05-24 20:49:49.000000000 +0000 *************** namespace std *** 416,422 **** facet(const facet&); // Not defined. ! void operator=(const facet&); // Not defined. }; --- 416,422 ---- facet(const facet&); // Not defined. ! facet& operator=(const facet&); // Not defined. }; diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/locale_facets.h gcc-3.4.1/libstdc++-v3/include/bits/locale_facets.h *** gcc-3.4.0/libstdc++-v3/include/bits/locale_facets.h 2004-03-24 21:11:32.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/bits/locale_facets.h 2004-05-24 20:49:49.000000000 +0000 *************** namespace std *** 1161,1168 **** _M_widen_ok = 1; // Set _M_widen_ok to 2 if memcpy can't be used. ! for (size_t __i = 0; __i < sizeof(_M_widen); ++__i) ! if (__tmp[__i] != _M_widen[__i]) { _M_widen_ok = 2; break; --- 1161,1168 ---- _M_widen_ok = 1; // Set _M_widen_ok to 2 if memcpy can't be used. ! for (size_t __j = 0; __j < sizeof(_M_widen); ++__j) ! if (__tmp[__j] != _M_widen[__j]) { _M_widen_ok = 2; break; *************** namespace std *** 1182,1192 **** // Check if any default values were created. Do this by // renarrowing with a different default value and comparing. bool __consecutive = true; ! for (size_t __i = 0; __i < sizeof(_M_narrow); ++__i) ! if (!_M_narrow[__i]) { char __c; ! do_narrow(__tmp + __i, __tmp + __i + 1, 1, &__c); if (__c == 1) { __consecutive = false; --- 1182,1192 ---- // Check if any default values were created. Do this by // renarrowing with a different default value and comparing. bool __consecutive = true; ! for (size_t __j = 0; __j < sizeof(_M_narrow); ++__j) ! if (!_M_narrow[__j]) { char __c; ! do_narrow(__tmp + __j, __tmp + __j + 1, 1, &__c); if (__c == 1) { __consecutive = false; *************** namespace std *** 1624,1629 **** --- 1624,1636 ---- void _M_cache(const locale& __loc); + + private: + __numpunct_cache& + operator=(const __numpunct_cache&); + + explicit + __numpunct_cache(const __numpunct_cache&); }; template *************** namespace std *** 2487,2494 **** */ explicit collate(size_t __refs = 0) ! : facet(__refs) ! { _M_c_locale_collate = _S_get_c_locale(); } /** * @brief Internal constructor. Not for general use. --- 2494,2501 ---- */ explicit collate(size_t __refs = 0) ! : facet(__refs), _M_c_locale_collate(_S_get_c_locale()) ! { } /** * @brief Internal constructor. Not for general use. *************** namespace std *** 2501,2508 **** */ explicit collate(__c_locale __cloc, size_t __refs = 0) ! : facet(__refs) ! { _M_c_locale_collate = _S_clone_c_locale(__cloc); } /** * @brief Compare two strings. --- 2508,2515 ---- */ explicit collate(__c_locale __cloc, size_t __refs = 0) ! : facet(__refs), _M_c_locale_collate(_S_clone_c_locale(__cloc)) ! { } /** * @brief Compare two strings. *************** namespace std *** 2757,2762 **** --- 2764,2776 ---- void _M_cache(const locale& __loc); + + private: + __timepunct_cache& + operator=(const __timepunct_cache&); + + explicit + __timepunct_cache(const __timepunct_cache&); }; template *************** namespace std *** 3493,3498 **** --- 3507,3519 ---- void _M_cache(const locale& __loc); + + private: + __moneypunct_cache& + operator=(const __moneypunct_cache&); + + explicit + __moneypunct_cache(const __moneypunct_cache&); }; template diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/locale_facets.tcc gcc-3.4.1/libstdc++-v3/include/bits/locale_facets.tcc *** gcc-3.4.0/libstdc++-v3/include/bits/locale_facets.tcc 2004-03-24 21:11:33.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/bits/locale_facets.tcc 2004-06-17 10:39:32.000000000 +0000 *************** namespace std *** 497,503 **** // At this point, base is determined. If not hex, only allow // base digits as valid input. ! const size_t __len = __base == 16 ? __num_base::_S_iend - __num_base::_S_izero : __base; // Extract. string __found_grouping; --- 497,505 ---- // At this point, base is determined. If not hex, only allow // base digits as valid input. ! const size_t __len = __base == 16 ? (__num_base::_S_iend ! - __num_base::_S_izero) ! : __base; // Extract. string __found_grouping; *************** namespace std *** 826,832 **** inline int __int_to_char(_CharT* __bufend, unsigned long __v, const _CharT* __lit, ios_base::fmtflags __flags) ! { return __int_to_char(__bufend, __v, __lit, __flags, false); } #ifdef _GLIBCXX_USE_LONG_LONG template --- 828,838 ---- inline int __int_to_char(_CharT* __bufend, unsigned long __v, const _CharT* __lit, ios_base::fmtflags __flags) ! { ! // About showpos, see Table 60 and C99 7.19.6.1, p6 (+). ! return __int_to_char(__bufend, __v, __lit, ! __flags & ~ios_base::showpos, false); ! } #ifdef _GLIBCXX_USE_LONG_LONG template *************** namespace std *** 848,854 **** inline int __int_to_char(_CharT* __bufend, unsigned long long __v, const _CharT* __lit, ios_base::fmtflags __flags) ! { return __int_to_char(__bufend, __v, __lit, __flags, false); } #endif template --- 854,861 ---- inline int __int_to_char(_CharT* __bufend, unsigned long long __v, const _CharT* __lit, ios_base::fmtflags __flags) ! { return __int_to_char(__bufend, __v, __lit, ! __flags & ~ios_base::showpos, false); } #endif template *************** namespace std *** 1043,1071 **** const locale& __loc = __io._M_getloc(); const __cache_type* __lc = __uc(__loc); - // Note: digits10 is rounded down: add 1 to ensure the maximum - // available precision. Then, in general, one more 1 needs to - // be added since, when the %{g,G} conversion specifiers are - // chosen inside _S_format_float, the precision field is "the - // maximum number of significant digits", *not* the "number of - // digits to appear after the decimal point", as happens for - // %{e,E,f,F} (C99, 7.19.6.1,4). - const int __max_digits = numeric_limits<_ValueT>::digits10 + 2; - // Use default precision if out of range. streamsize __prec = __io.precision(); ! if (__prec > static_cast(__max_digits)) ! __prec = static_cast(__max_digits); ! else if (__prec < static_cast(0)) __prec = static_cast(6); // [22.2.2.2.2] Stage 1, numeric conversion to character. int __len; // Long enough for the max format spec. char __fbuf[16]; #ifdef _GLIBCXX_USE_C99 ! // First try a buffer perhaps big enough (for sure sufficient // for non-ios_base::fixed outputs) int __cs_size = __max_digits * 3; char* __cs = static_cast(__builtin_alloca(__cs_size)); --- 1050,1069 ---- const locale& __loc = __io._M_getloc(); const __cache_type* __lc = __uc(__loc); // Use default precision if out of range. streamsize __prec = __io.precision(); ! if (__prec < static_cast(0)) __prec = static_cast(6); + const int __max_digits = numeric_limits<_ValueT>::digits10; + // [22.2.2.2.2] Stage 1, numeric conversion to character. int __len; // Long enough for the max format spec. char __fbuf[16]; #ifdef _GLIBCXX_USE_C99 ! // First try a buffer perhaps big enough (most probably sufficient // for non-ios_base::fixed outputs) int __cs_size = __max_digits * 3; char* __cs = static_cast(__builtin_alloca(__cs_size)); *************** namespace std *** 1088,1100 **** const int __max_exp = numeric_limits<_ValueT>::max_exponent10; // The size of the output string is computed as follows. ! // ios_base::fixed outputs may need up to __max_exp+1 chars ! // for the integer part + up to __max_digits chars for the ! // fractional part + 3 chars for sign, decimal point, '\0'. On ! // the other hand, for non-fixed outputs __max_digits*3 chars ! // are largely sufficient. ! const int __cs_size = __fixed ? __max_exp + __max_digits + 4 ! : __max_digits * 3; char* __cs = static_cast(__builtin_alloca(__cs_size)); __num_base::_S_format_float(__io, __fbuf, __mod); --- 1086,1098 ---- const int __max_exp = numeric_limits<_ValueT>::max_exponent10; // The size of the output string is computed as follows. ! // ios_base::fixed outputs may need up to __max_exp + 1 chars ! // for the integer part + __prec chars for the fractional part ! // + 3 chars for sign, decimal point, '\0'. On the other hand, ! // for non-fixed outputs __max_digits * 2 + __prec chars are ! // largely sufficient. ! const int __cs_size = __fixed ? __max_exp + __prec + 4 ! : __max_digits * 2 + __prec; char* __cs = static_cast(__builtin_alloca(__cs_size)); __num_base::_S_format_float(__io, __fbuf, __mod); *************** namespace std *** 1998,2032 **** while (__nmatches > 1) { // Find smallest matching string. ! size_t __minlen = 10; ! for (size_t __i2 = 0; __i2 < __nmatches; ++__i2) __minlen = std::min(__minlen, __traits_type::length(__names[__matches[__i2]])); ++__beg; if (__pos < __minlen && __beg != __end) ! { ! ++__pos; ! for (size_t __i3 = 0; __i3 < __nmatches; ++__i3) ! { ! __name = __names[__matches[__i3]]; ! if (__name[__pos] != *__beg) ! __matches[__i3] = __matches[--__nmatches]; ! } ! } else break; } if (__nmatches == 1) { - // If there was only one match, the first compare is redundant. - if (__pos == 0) - { - ++__pos; - ++__beg; - } - // Make sure found name is completely extracted. __name = __names[__matches[0]]; const size_t __len = __traits_type::length(__name); while (__pos < __len && __beg != __end && __name[__pos] == *__beg) --- 1996,2025 ---- while (__nmatches > 1) { // Find smallest matching string. ! size_t __minlen = __traits_type::length(__names[__matches[0]]); ! for (size_t __i2 = 1; __i2 < __nmatches; ++__i2) __minlen = std::min(__minlen, __traits_type::length(__names[__matches[__i2]])); + ++__pos; ++__beg; if (__pos < __minlen && __beg != __end) ! for (size_t __i3 = 0; __i3 < __nmatches;) ! { ! __name = __names[__matches[__i3]]; ! if (__name[__pos] != *__beg) ! __matches[__i3] = __matches[--__nmatches]; ! else ! ++__i3; ! } else break; } if (__nmatches == 1) { // Make sure found name is completely extracted. + ++__pos; + ++__beg; __name = __names[__matches[0]]; const size_t __len = __traits_type::length(__name); while (__pos < __len && __beg != __end && __name[__pos] == *__beg) diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/ostream.tcc gcc-3.4.1/libstdc++-v3/include/bits/ostream.tcc *** gcc-3.4.0/libstdc++-v3/include/bits/ostream.tcc 2004-03-18 17:36:52.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/bits/ostream.tcc 2004-05-25 22:13:24.000000000 +0000 *************** *** 1,6 **** // ostream classes -*- C++ -*- ! // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free --- 1,6 ---- // ostream classes -*- C++ -*- ! // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free *************** namespace std *** 44,50 **** template basic_ostream<_CharT, _Traits>::sentry:: sentry(basic_ostream<_CharT, _Traits>& __os) ! : _M_os(__os) { // XXX MT if (__os.tie() && __os.good()) --- 44,50 ---- template basic_ostream<_CharT, _Traits>::sentry:: sentry(basic_ostream<_CharT, _Traits>& __os) ! : _M_ok(false), _M_os(__os) { // XXX MT if (__os.tie() && __os.good()) *************** namespace std *** 53,62 **** if (__os.good()) _M_ok = true; else ! { ! _M_ok = false; ! __os.setstate(ios_base::failbit); ! } } template --- 53,59 ---- if (__os.good()) _M_ok = true; else ! __os.setstate(ios_base::failbit); } template *************** namespace std *** 129,140 **** try { bool __b = false; ! char_type __c = this->fill(); ! ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; const __num_put_type& __np = __check_facet(this->_M_num_put); if ((__fmt & ios_base::oct) || (__fmt & ios_base::hex)) { ! unsigned long __l = static_cast(__n); __b = __np.put(*this, *this, __c, __l).failed(); } else --- 126,138 ---- try { bool __b = false; ! const char_type __c = this->fill(); ! const ios_base::fmtflags __fmt = (this->flags() ! & ios_base::basefield); const __num_put_type& __np = __check_facet(this->_M_num_put); if ((__fmt & ios_base::oct) || (__fmt & ios_base::hex)) { ! const unsigned long __l = static_cast(__n); __b = __np.put(*this, *this, __c, __l).failed(); } else *************** namespace std *** 186,198 **** try { bool __b = false; ! char_type __c = this->fill(); ! ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; const __num_put_type& __np = __check_facet(this->_M_num_put); if ((__fmt & ios_base::oct) || (__fmt & ios_base::hex)) { ! unsigned long long __l; ! __l = static_cast(__n); __b = __np.put(*this, *this, __c, __l).failed(); } else --- 184,197 ---- try { bool __b = false; ! const char_type __c = this->fill(); ! const ios_base::fmtflags __fmt = (this->flags() ! & ios_base::basefield); const __num_put_type& __np = __check_facet(this->_M_num_put); if ((__fmt & ios_base::oct) || (__fmt & ios_base::hex)) { ! const unsigned long long __l = (static_cast< ! unsigned long long>(__n)); __b = __np.put(*this, *this, __c, __l).failed(); } else *************** namespace std *** 342,348 **** ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); try { ! int_type __put = this->rdbuf()->sputc(__c); if (traits_type::eq_int_type(__put, traits_type::eof())) __err |= ios_base::badbit; } --- 341,347 ---- ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); try { ! const int_type __put = this->rdbuf()->sputc(__c); if (traits_type::eq_int_type(__put, traits_type::eof())) __err |= ios_base::badbit; } *************** namespace std *** 426,432 **** { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 136. seekp, seekg setting wrong streams? ! pos_type __p = this->rdbuf()->pubseekpos(__pos, ios_base::out); // 129. Need error indication from seekp() and seekg() if (__p == pos_type(off_type(-1))) --- 425,432 ---- { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 136. seekp, seekg setting wrong streams? ! const pos_type __p = this->rdbuf()->pubseekpos(__pos, ! ios_base::out); // 129. Need error indication from seekp() and seekg() if (__p == pos_type(off_type(-1))) *************** namespace std *** 452,459 **** { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 136. seekp, seekg setting wrong streams? ! pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, ! ios_base::out); // 129. Need error indication from seekp() and seekg() if (__p == pos_type(off_type(-1))) --- 452,459 ---- { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 136. seekp, seekg setting wrong streams? ! const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, ! ios_base::out); // 129. Need error indication from seekp() and seekg() if (__p == pos_type(off_type(-1))) *************** namespace std *** 542,549 **** streamsize __len = static_cast(_Traits::length(__s)); if (__w > __len) { ! _CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) ! * __w)); __pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __cs, __s, __w, __len, false); __s = __cs; --- 542,550 ---- streamsize __len = static_cast(_Traits::length(__s)); if (__w > __len) { ! _CharT* __cs = (static_cast< ! _CharT*>(__builtin_alloca(sizeof(_CharT) ! * __w))); __pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __cs, __s, __w, __len, false); __s = __cs; *************** namespace std *** 585,592 **** streamsize __len = static_cast(__clen); if (__w > __len) { ! _CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) ! * __w)); __pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __cs, __ws, __w, __len, false); __str = __cs; --- 586,594 ---- streamsize __len = static_cast(__clen); if (__w > __len) { ! _CharT* __cs = (static_cast< ! _CharT*>(__builtin_alloca(sizeof(_CharT) ! * __w))); __pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __cs, __ws, __w, __len, false); __str = __cs; *************** namespace std *** 653,659 **** // 25. String operator<< uses width() value wrong if (__w > __len) { ! _CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __w)); __pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __cs, __s, __w, __len, false); __s = __cs; --- 655,662 ---- // 25. String operator<< uses width() value wrong if (__w > __len) { ! _CharT* __cs = (static_cast< ! _CharT*>(__builtin_alloca(sizeof(_CharT) * __w))); __pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __cs, __s, __w, __len, false); __s = __cs; diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/stl_deque.h gcc-3.4.1/libstdc++-v3/include/bits/stl_deque.h *** gcc-3.4.0/libstdc++-v3/include/bits/stl_deque.h 2004-04-16 19:08:34.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/bits/stl_deque.h 2004-06-11 18:44:57.000000000 +0000 *************** namespace _GLIBCXX_STD *** 591,604 **** public: typedef _Tp value_type; ! typedef value_type* pointer; ! typedef const value_type* const_pointer; typedef typename _Base::iterator iterator; typedef typename _Base::const_iterator const_iterator; typedef std::reverse_iterator const_reverse_iterator; typedef std::reverse_iterator reverse_iterator; - typedef value_type& reference; - typedef const value_type& const_reference; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef typename _Base::allocator_type allocator_type; --- 591,604 ---- public: typedef _Tp value_type; ! typedef typename _Alloc::pointer pointer; ! typedef typename _Alloc::const_pointer const_pointer; ! typedef typename _Alloc::reference reference; ! typedef typename _Alloc::const_reference const_reference; typedef typename _Base::iterator iterator; typedef typename _Base::const_iterator const_iterator; typedef std::reverse_iterator const_reverse_iterator; typedef std::reverse_iterator reverse_iterator; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef typename _Base::allocator_type allocator_type; diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/stl_list.h gcc-3.4.1/libstdc++-v3/include/bits/stl_list.h *** gcc-3.4.0/libstdc++-v3/include/bits/stl_list.h 2004-04-16 19:08:34.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/bits/stl_list.h 2004-06-11 18:44:58.000000000 +0000 *************** namespace _GLIBCXX_STD *** 392,409 **** typedef _List_base<_Tp, _Alloc> _Base; public: ! typedef _Tp value_type; ! typedef value_type* pointer; ! typedef const value_type* const_pointer; ! typedef _List_iterator<_Tp> iterator; ! typedef _List_const_iterator<_Tp> const_iterator; ! typedef std::reverse_iterator const_reverse_iterator; ! typedef std::reverse_iterator reverse_iterator; ! typedef value_type& reference; ! typedef const value_type& const_reference; ! typedef size_t size_type; ! typedef ptrdiff_t difference_type; ! typedef typename _Base::allocator_type allocator_type; protected: // Note that pointers-to-_Node's can be ctor-converted to --- 392,409 ---- typedef _List_base<_Tp, _Alloc> _Base; public: ! typedef _Tp value_type; ! typedef typename _Alloc::pointer pointer; ! typedef typename _Alloc::const_pointer const_pointer; ! typedef typename _Alloc::reference reference; ! typedef typename _Alloc::const_reference const_reference; ! typedef _List_iterator<_Tp> iterator; ! typedef _List_const_iterator<_Tp> const_iterator; ! typedef std::reverse_iterator const_reverse_iterator; ! typedef std::reverse_iterator reverse_iterator; ! typedef size_t size_type; ! typedef ptrdiff_t difference_type; ! typedef typename _Base::allocator_type allocator_type; protected: // Note that pointers-to-_Node's can be ctor-converted to diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/stl_map.h gcc-3.4.1/libstdc++-v3/include/bits/stl_map.h *** gcc-3.4.0/libstdc++-v3/include/bits/stl_map.h 2004-04-16 19:08:34.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/bits/stl_map.h 2004-06-11 18:44:58.000000000 +0000 *************** namespace _GLIBCXX_STD *** 126,142 **** public: // many of these are specified differently in ISO, but the following are // "functionally equivalent" ! typedef typename _Rep_type::allocator_type allocator_type; ! typedef typename _Rep_type::reference reference; ! typedef typename _Rep_type::const_reference const_reference; ! typedef typename _Rep_type::iterator iterator; ! typedef typename _Rep_type::const_iterator const_iterator; ! typedef typename _Rep_type::size_type size_type; ! typedef typename _Rep_type::difference_type difference_type; ! typedef typename _Rep_type::pointer pointer; ! typedef typename _Rep_type::const_pointer const_pointer; ! typedef typename _Rep_type::reverse_iterator reverse_iterator; ! typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; // [23.3.1.1] construct/copy/destroy // (get_allocator() is normally listed in this section, but seems to have --- 126,142 ---- public: // many of these are specified differently in ISO, but the following are // "functionally equivalent" ! typedef typename _Alloc::pointer pointer; ! typedef typename _Alloc::const_pointer const_pointer; ! typedef typename _Alloc::reference reference; ! typedef typename _Alloc::const_reference const_reference; ! typedef typename _Rep_type::allocator_type allocator_type; ! typedef typename _Rep_type::iterator iterator; ! typedef typename _Rep_type::const_iterator const_iterator; ! typedef typename _Rep_type::size_type size_type; ! typedef typename _Rep_type::difference_type difference_type; ! typedef typename _Rep_type::reverse_iterator reverse_iterator; ! typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; // [23.3.1.1] construct/copy/destroy // (get_allocator() is normally listed in this section, but seems to have diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/stl_multimap.h gcc-3.4.1/libstdc++-v3/include/bits/stl_multimap.h *** gcc-3.4.0/libstdc++-v3/include/bits/stl_multimap.h 2004-04-16 19:08:34.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/bits/stl_multimap.h 2004-06-11 18:44:58.000000000 +0000 *************** namespace _GLIBCXX_STD *** 142,160 **** public: // many of these are specified differently in ISO, but the following are // "functionally equivalent" typedef typename _Rep_type::allocator_type allocator_type; - typedef typename _Rep_type::reference reference; - typedef typename _Rep_type::const_reference const_reference; typedef typename _Rep_type::iterator iterator; typedef typename _Rep_type::const_iterator const_iterator; typedef typename _Rep_type::size_type size_type; typedef typename _Rep_type::difference_type difference_type; - typedef typename _Rep_type::pointer pointer; - typedef typename _Rep_type::const_pointer const_pointer; typedef typename _Rep_type::reverse_iterator reverse_iterator; typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; - // [23.3.2] construct/copy/destroy // (get_allocator() is also listed in this section) /** --- 142,159 ---- public: // many of these are specified differently in ISO, but the following are // "functionally equivalent" + typedef typename _Alloc::pointer pointer; + typedef typename _Alloc::const_pointer const_pointer; + typedef typename _Alloc::reference reference; + typedef typename _Alloc::const_reference const_reference; typedef typename _Rep_type::allocator_type allocator_type; typedef typename _Rep_type::iterator iterator; typedef typename _Rep_type::const_iterator const_iterator; typedef typename _Rep_type::size_type size_type; typedef typename _Rep_type::difference_type difference_type; typedef typename _Rep_type::reverse_iterator reverse_iterator; typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; // [23.3.2] construct/copy/destroy // (get_allocator() is also listed in this section) /** diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/stl_pair.h gcc-3.4.1/libstdc++-v3/include/bits/stl_pair.h *** gcc-3.4.0/libstdc++-v3/include/bits/stl_pair.h 2004-03-18 17:37:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/bits/stl_pair.h 2004-05-15 20:44:13.000000000 +0000 *************** *** 63,71 **** namespace std { - /// pair holds two objects of arbitrary type. ! template struct pair { typedef _T1 first_type; ///< @c first_type is the first bound type --- 63,70 ---- namespace std { /// pair holds two objects of arbitrary type. ! template struct pair { typedef _T1 first_type; ///< @c first_type is the first bound type *************** namespace std *** 79,129 **** /** The default constructor creates @c first and @c second using their * respective default constructors. */ pair() ! : first(), second() {} /** Two objects may be passed to a @c pair constructor to be copied. */ pair(const _T1& __a, const _T2& __b) ! : first(__a), second(__b) {} /** There is also a templated copy ctor for the @c pair class itself. */ ! template pair(const pair<_U1, _U2>& __p) ! : first(__p.first), second(__p.second) {} }; /// Two pairs of the same type are equal iff their members are equal. ! template inline bool operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return __x.first == __y.first && __x.second == __y.second; } /// ! template inline bool operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return __x.first < __y.first || (!(__y.first < __x.first) && __x.second < __y.second); } /// Uses @c operator== to find the result. ! template inline bool operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return !(__x == __y); } /// Uses @c operator< to find the result. ! template inline bool operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return __y < __x; } /// Uses @c operator< to find the result. ! template inline bool operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return !(__y < __x); } /// Uses @c operator< to find the result. ! template inline bool operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return !(__x < __y); } --- 78,128 ---- /** The default constructor creates @c first and @c second using their * respective default constructors. */ pair() ! : first(), second() { } /** Two objects may be passed to a @c pair constructor to be copied. */ pair(const _T1& __a, const _T2& __b) ! : first(__a), second(__b) { } /** There is also a templated copy ctor for the @c pair class itself. */ ! template pair(const pair<_U1, _U2>& __p) ! : first(__p.first), second(__p.second) { } }; /// Two pairs of the same type are equal iff their members are equal. ! template inline bool operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return __x.first == __y.first && __x.second == __y.second; } /// ! template inline bool operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return __x.first < __y.first || (!(__y.first < __x.first) && __x.second < __y.second); } /// Uses @c operator== to find the result. ! template inline bool operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return !(__x == __y); } /// Uses @c operator< to find the result. ! template inline bool operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return __y < __x; } /// Uses @c operator< to find the result. ! template inline bool operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return !(__y < __x); } /// Uses @c operator< to find the result. ! template inline bool operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return !(__x < __y); } *************** namespace std *** 138,155 **** * but LWG issue #181 says they should be passed by const value. We follow * the LWG by default. */ - template - // _GLIBCXX_RESOLVE_LIB_DEFECTS // 181. make_pair() unintended behavior ! inline pair<_T1, _T2> ! make_pair(_T1 __x, _T2 __y) ! { return pair<_T1, _T2>(__x, __y); } ! } // namespace std #endif /* _PAIR_H */ - - // Local Variables: - // mode:C++ - // End: --- 137,147 ---- * but LWG issue #181 says they should be passed by const value. We follow * the LWG by default. */ // _GLIBCXX_RESOLVE_LIB_DEFECTS // 181. make_pair() unintended behavior ! template ! inline pair<_T1, _T2> ! make_pair(_T1 __x, _T2 __y) { return pair<_T1, _T2>(__x, __y); } } // namespace std #endif /* _PAIR_H */ diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/stl_threads.h gcc-3.4.1/libstdc++-v3/include/bits/stl_threads.h *** gcc-3.4.0/libstdc++-v3/include/bits/stl_threads.h 2004-03-18 17:37:01.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/bits/stl_threads.h 2004-05-13 15:25:54.000000000 +0000 *************** *** 1,6 **** // Threading support -*- 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 ---- // Threading support -*- 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 *************** *** 54,60 **** // layer. #include "bits/gthr.h" ! namespace __gnu_cxx { #if !defined(__GTHREAD_MUTEX_INIT) && defined(__GTHREAD_MUTEX_INIT_FUNCTION) extern __gthread_mutex_t _GLIBCXX_mutex; --- 54,60 ---- // layer. #include "bits/gthr.h" ! namespace __gnu_internal { #if !defined(__GTHREAD_MUTEX_INIT) && defined(__GTHREAD_MUTEX_INIT_FUNCTION) extern __gthread_mutex_t _GLIBCXX_mutex; *************** namespace __gnu_cxx *** 63,69 **** --- 63,72 ---- extern void _GLIBCXX_mutex_init(void); extern void _GLIBCXX_mutex_address_init(void); #endif + } // namespace __gnu_internal + namespace __gnu_cxx + { // Locking class. Note that this class *does not have a // constructor*. It must be initialized either statically, with // __STL_MUTEX_INITIALIZER, or dynamically, by explicitly calling *************** namespace __gnu_cxx *** 92,115 **** // There should be no code in this path given the usage rules above. #elif defined(__GTHREAD_MUTEX_INIT_FUNCTION) if (_M_init_flag) return; ! if (__gthread_once(&__gnu_cxx::_GLIBCXX_once, ! __gnu_cxx::_GLIBCXX_mutex_init) != 0 && __gthread_active_p()) abort (); ! __gthread_mutex_lock(&__gnu_cxx::_GLIBCXX_mutex); if (!_M_init_flag) { // Even though we have a global lock, we use __gthread_once to be // absolutely certain the _M_lock mutex is only initialized once on // multiprocessor systems. ! __gnu_cxx::_GLIBCXX_mutex_address = &_M_lock; if (__gthread_once(&_M_once, ! __gnu_cxx::_GLIBCXX_mutex_address_init) != 0 && __gthread_active_p()) abort(); _M_init_flag = 1; } ! __gthread_mutex_unlock(&__gnu_cxx::_GLIBCXX_mutex); #endif } --- 95,118 ---- // There should be no code in this path given the usage rules above. #elif defined(__GTHREAD_MUTEX_INIT_FUNCTION) if (_M_init_flag) return; ! if (__gthread_once(&__gnu_internal::_GLIBCXX_once, ! __gnu_internal::_GLIBCXX_mutex_init) != 0 && __gthread_active_p()) abort (); ! __gthread_mutex_lock(&__gnu_internal::_GLIBCXX_mutex); if (!_M_init_flag) { // Even though we have a global lock, we use __gthread_once to be // absolutely certain the _M_lock mutex is only initialized once on // multiprocessor systems. ! __gnu_internal::_GLIBCXX_mutex_address = &_M_lock; if (__gthread_once(&_M_once, ! __gnu_internal::_GLIBCXX_mutex_address_init) != 0 && __gthread_active_p()) abort(); _M_init_flag = 1; } ! __gthread_mutex_unlock(&__gnu_internal::_GLIBCXX_mutex); #endif } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/bits/stl_vector.h gcc-3.4.1/libstdc++-v3/include/bits/stl_vector.h *** gcc-3.4.0/libstdc++-v3/include/bits/stl_vector.h 2004-04-16 19:08:34.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/bits/stl_vector.h 2004-06-11 18:44:58.000000000 +0000 *************** namespace _GLIBCXX_STD *** 147,165 **** typedef vector<_Tp, _Alloc> vector_type; public: ! typedef _Tp value_type; ! typedef value_type* pointer; ! typedef const value_type* const_pointer; typedef __gnu_cxx::__normal_iterator iterator; typedef __gnu_cxx::__normal_iterator const_iterator; ! typedef std::reverse_iterator const_reverse_iterator; ! typedef std::reverse_iterator reverse_iterator; ! typedef value_type& reference; ! typedef const value_type& const_reference; ! typedef size_t size_type; ! typedef ptrdiff_t difference_type; ! typedef typename _Base::allocator_type allocator_type; protected: /** @if maint --- 147,165 ---- typedef vector<_Tp, _Alloc> vector_type; public: ! typedef _Tp value_type; ! typedef typename _Alloc::pointer pointer; ! typedef typename _Alloc::const_pointer const_pointer; ! typedef typename _Alloc::reference reference; ! typedef typename _Alloc::const_reference const_reference; typedef __gnu_cxx::__normal_iterator iterator; typedef __gnu_cxx::__normal_iterator const_iterator; ! typedef std::reverse_iterator const_reverse_iterator; ! typedef std::reverse_iterator reverse_iterator; ! typedef size_t size_type; ! typedef ptrdiff_t difference_type; ! typedef typename _Base::allocator_type allocator_type; protected: /** @if maint diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/debug/formatter.h gcc-3.4.1/libstdc++-v3/include/debug/formatter.h *** gcc-3.4.0/libstdc++-v3/include/debug/formatter.h 2004-04-16 19:08:34.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/debug/formatter.h 2004-06-25 07:08:15.000000000 +0000 *************** namespace __gnu_debug *** 189,203 **** } _M_string; } _M_variant; ! _Parameter() : _M_kind(__unused_param) { } ! _Parameter(long __value, const char* __name) : _M_kind(__integer) { _M_variant._M_integer._M_name = __name; _M_variant._M_integer._M_value = __value; } ! _Parameter(const char* __value, const char* __name) : _M_kind(__string) { _M_variant._M_string._M_name = __name; _M_variant._M_string._M_value = __value; --- 189,205 ---- } _M_string; } _M_variant; ! _Parameter() : _M_kind(__unused_param), _M_variant() { } ! _Parameter(long __value, const char* __name) ! : _M_kind(__integer), _M_variant() { _M_variant._M_integer._M_name = __name; _M_variant._M_integer._M_value = __value; } ! _Parameter(const char* __value, const char* __name) ! : _M_kind(__string), _M_variant() { _M_variant._M_string._M_name = __name; _M_variant._M_string._M_value = __value; *************** namespace __gnu_debug *** 206,212 **** template _Parameter(const _Safe_iterator<_Iterator, _Sequence>& __it, const char* __name, _Is_iterator) ! : _M_kind(__iterator) { _M_variant._M_iterator._M_name = __name; _M_variant._M_iterator._M_address = &__it; --- 208,214 ---- template _Parameter(const _Safe_iterator<_Iterator, _Sequence>& __it, const char* __name, _Is_iterator) ! : _M_kind(__iterator), _M_variant() { _M_variant._M_iterator._M_name = __name; _M_variant._M_iterator._M_address = &__it; *************** namespace __gnu_debug *** 235,241 **** template _Parameter(const _Type*& __it, const char* __name, _Is_iterator) ! : _M_kind(__iterator) { _M_variant._M_iterator._M_name = __name; _M_variant._M_iterator._M_address = &__it; --- 237,243 ---- template _Parameter(const _Type*& __it, const char* __name, _Is_iterator) ! : _M_kind(__iterator), _M_variant() { _M_variant._M_iterator._M_name = __name; _M_variant._M_iterator._M_address = &__it; *************** namespace __gnu_debug *** 248,254 **** template _Parameter(_Type*& __it, const char* __name, _Is_iterator) ! : _M_kind(__iterator) { _M_variant._M_iterator._M_name = __name; _M_variant._M_iterator._M_address = &__it; --- 250,256 ---- template _Parameter(_Type*& __it, const char* __name, _Is_iterator) ! : _M_kind(__iterator), _M_variant() { _M_variant._M_iterator._M_name = __name; _M_variant._M_iterator._M_address = &__it; *************** namespace __gnu_debug *** 261,267 **** template _Parameter(const _Iterator& __it, const char* __name, _Is_iterator) ! : _M_kind(__iterator) { _M_variant._M_iterator._M_name = __name; _M_variant._M_iterator._M_address = &__it; --- 263,269 ---- template _Parameter(const _Iterator& __it, const char* __name, _Is_iterator) ! : _M_kind(__iterator), _M_variant() { _M_variant._M_iterator._M_name = __name; _M_variant._M_iterator._M_address = &__it; *************** namespace __gnu_debug *** 276,282 **** template _Parameter(const _Safe_sequence<_Sequence>& __seq, const char* __name, _Is_sequence) ! : _M_kind(__sequence) { _M_variant._M_sequence._M_name = __name; _M_variant._M_sequence._M_address = --- 278,284 ---- template _Parameter(const _Safe_sequence<_Sequence>& __seq, const char* __name, _Is_sequence) ! : _M_kind(__sequence), _M_variant() { _M_variant._M_sequence._M_name = __name; _M_variant._M_sequence._M_address = *************** namespace __gnu_debug *** 286,292 **** template _Parameter(const _Sequence& __seq, const char* __name, _Is_sequence) ! : _M_kind(__sequence) { _M_variant._M_sequence._M_name = __name; _M_variant._M_sequence._M_address = &__seq; --- 288,294 ---- template _Parameter(const _Sequence& __seq, const char* __name, _Is_sequence) ! : _M_kind(__sequence), _M_variant() { _M_variant._M_sequence._M_name = __name; _M_variant._M_sequence._M_address = &__seq; diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/debug/safe_base.h gcc-3.4.1/libstdc++-v3/include/debug/safe_base.h *** gcc-3.4.0/libstdc++-v3/include/debug/safe_base.h 2003-12-09 04:26:28.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/debug/safe_base.h 2004-06-28 19:00:23.000000000 +0000 *************** *** 1,6 **** // Safe sequence/iterator base implementation -*- C++ -*- ! // Copyright (C) 2003 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free --- 1,6 ---- // Safe sequence/iterator base implementation -*- C++ -*- ! // Copyright (C) 2003, 2004 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free *************** namespace __gnu_debug *** 95,100 **** --- 95,106 ---- : _M_sequence(0), _M_version(0), _M_prior(0), _M_next(0) { this->_M_attach(__x._M_sequence, __constant); } + _Safe_iterator_base& + operator=(const _Safe_iterator_base&); + + explicit + _Safe_iterator_base(const _Safe_iterator_base&); + ~_Safe_iterator_base() { this->_M_detach(); } public: diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/debug/safe_iterator.h gcc-3.4.1/libstdc++-v3/include/debug/safe_iterator.h *** gcc-3.4.0/libstdc++-v3/include/debug/safe_iterator.h 2004-04-16 19:08:34.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/debug/safe_iterator.h 2004-05-18 18:41:16.000000000 +0000 *************** *** 35,40 **** --- 35,41 ---- #include #include #include + #include namespace __gnu_debug { *************** namespace __gnu_debug *** 88,93 **** --- 89,95 ---- typedef iterator_traits<_Iterator> _Traits; public: + typedef _Iterator _Base_iterator; typedef typename _Traits::iterator_category iterator_category; typedef typename _Traits::value_type value_type; typedef typename _Traits::difference_type difference_type; *************** namespace __gnu_debug *** 132,138 **** * @pre @p x is not singular */ template ! _Safe_iterator(const _Safe_iterator<_MutableIterator, _Sequence>& __x) : _Safe_iterator_base(__x, _M_constant()), _M_current(__x.base()) { _GLIBCXX_DEBUG_VERIFY(!__x._M_singular(), --- 134,146 ---- * @pre @p x is not singular */ template ! _Safe_iterator( ! const _Safe_iterator<_MutableIterator, ! typename std::__enable_if< ! _Sequence, ! (std::__are_same<_MutableIterator, ! typename _Sequence::iterator::_Base_iterator>::_M_type) ! >::_M_type>& __x) : _Safe_iterator_base(__x, _M_constant()), _M_current(__x.base()) { _GLIBCXX_DEBUG_VERIFY(!__x._M_singular(), diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/debug/safe_iterator.tcc gcc-3.4.1/libstdc++-v3/include/debug/safe_iterator.tcc *** gcc-3.4.0/libstdc++-v3/include/debug/safe_iterator.tcc 2003-12-09 04:26:28.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/debug/safe_iterator.tcc 2004-05-15 21:17:59.000000000 +0000 *************** *** 1,6 **** // Debugging iterator implementation (out of line) -*- C++ -*- ! // Copyright (C) 2003 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free --- 1,6 ---- // Debugging iterator implementation (out of line) -*- C++ -*- ! // Copyright (C) 2003, 2004 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free *************** namespace __gnu_debug *** 123,133 **** if (this->base() == __victim->base()) __victim->_M_version = 0; } ! for (_Safe_iterator_base* iter = _M_sequence->_M_const_iterators; ! iter; /* increment in loop */) { ! const_iterator* __victim = static_cast(iter); ! iter = iter->_M_next; if (this->base() == __victim->base()) __victim->_M_version = 0; } --- 123,133 ---- if (this->base() == __victim->base()) __victim->_M_version = 0; } ! for (_Safe_iterator_base* iter2 = _M_sequence->_M_const_iterators; ! iter2; /* increment in loop */) { ! const_iterator* __victim = static_cast(iter2); ! iter2 = iter2->_M_next; if (this->base() == __victim->base()) __victim->_M_version = 0; } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/debug/safe_sequence.h gcc-3.4.1/libstdc++-v3/include/debug/safe_sequence.h *** gcc-3.4.0/libstdc++-v3/include/debug/safe_sequence.h 2003-12-09 04:26:28.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/debug/safe_sequence.h 2004-05-15 21:17:59.000000000 +0000 *************** *** 1,6 **** // Safe sequence implementation -*- C++ -*- ! // Copyright (C) 2003 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free --- 1,6 ---- // Safe sequence implementation -*- C++ -*- ! // Copyright (C) 2003, 2004 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free *************** namespace __gnu_debug *** 133,142 **** } } ! for (_Safe_iterator_base* __iter = _M_const_iterators; __iter; ) { ! const_iterator* __victim = static_cast(__iter); ! __iter = __iter->_M_next; if (!__victim->_M_singular()) { if (__pred(__victim->base())) --- 133,142 ---- } } ! for (_Safe_iterator_base* __iter2 = _M_const_iterators; __iter2; ) { ! const_iterator* __victim = static_cast(__iter2); ! __iter2 = __iter2->_M_next; if (!__victim->_M_singular()) { if (__pred(__victim->base())) *************** namespace __gnu_debug *** 166,175 **** __victim->_M_attach(static_cast<_Sequence*>(this)); } ! for (_Safe_iterator_base* __iter = __from->_M_const_iterators; __iter;) { ! const_iterator* __victim = static_cast(__iter); ! __iter = __iter->_M_next; if (!__victim->_M_singular() && __victim->base() == __x.base()) __victim->_M_attach(static_cast<_Sequence*>(this)); } --- 166,176 ---- __victim->_M_attach(static_cast<_Sequence*>(this)); } ! for (_Safe_iterator_base* __iter2 = __from->_M_const_iterators; ! __iter2;) { ! const_iterator* __victim = static_cast(__iter2); ! __iter2 = __iter2->_M_next; if (!__victim->_M_singular() && __victim->base() == __x.base()) __victim->_M_attach(static_cast<_Sequence*>(this)); } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/ext/bitmap_allocator.h gcc-3.4.1/libstdc++-v3/include/ext/bitmap_allocator.h *** gcc-3.4.0/libstdc++-v3/include/ext/bitmap_allocator.h 2004-03-18 17:37:05.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/ext/bitmap_allocator.h 2004-04-30 03:22:04.000000000 +0000 *************** *** 37,43 **** #include //For std::pair. #include ! //std::find_if. #include //For the free list of exponentially growing memory blocks. At max, //size of the vector should be not more than the number of bits in an --- 37,43 ---- #include //For std::pair. #include ! //std::find_if, and std::lower_bound. #include //For the free list of exponentially growing memory blocks. At max, //size of the vector should be not more than the number of bits in an *************** *** 55,64 **** --- 55,72 ---- #define NDEBUG //#define CHECK_FOR_ERRORS + //#define __CPU_HAS_BACKWARD_BRANCH_PREDICTION namespace __gnu_cxx { + namespace { + #if defined __GTHREADS + bool const __threads_enabled = __gthread_active_p(); + #endif + } + + #if defined __GTHREADS class _Mutex { __gthread_mutex_t _M_mut; //Prevent Copying and assignment. *************** namespace __gnu_cxx *** 67,78 **** public: _Mutex () { #if !defined __GTHREAD_MUTEX_INIT ! __GTHREAD_MUTEX_INIT_FUNCTION(&_M_mut); #else ! __gthread_mutex_t __mtemp = __GTHREAD_MUTEX_INIT; ! _M_mut = __mtemp; #endif } ~_Mutex () { --- 75,89 ---- public: _Mutex () { + if (__threads_enabled) + { #if !defined __GTHREAD_MUTEX_INIT ! __GTHREAD_MUTEX_INIT_FUNCTION(&_M_mut); #else ! __gthread_mutex_t __mtemp = __GTHREAD_MUTEX_INIT; ! _M_mut = __mtemp; #endif + } } ~_Mutex () { *************** namespace __gnu_cxx *** 81,102 **** __gthread_mutex_t *_M_get() { return &_M_mut; } }; - class _Lock { ! _Mutex& _M_mt; //Prevent Copying and assignment. _Lock (_Lock const&); _Lock& operator= (_Lock const&); public: ! _Lock (_Mutex& __mref) : _M_mt(__mref) { ! __gthread_mutex_lock(_M_mt._M_get()); } ! ~_Lock () { __gthread_mutex_unlock(_M_mt._M_get()); } }; - namespace __aux_balloc { static const unsigned int _Bits_Per_Byte = 8; static const unsigned int _Bits_Per_Block = sizeof(unsigned int) * _Bits_Per_Byte; --- 92,133 ---- __gthread_mutex_t *_M_get() { return &_M_mut; } }; class _Lock { ! _Mutex* _M_pmt; ! bool _M_locked; //Prevent Copying and assignment. _Lock (_Lock const&); _Lock& operator= (_Lock const&); public: ! _Lock(_Mutex* __mptr) ! : _M_pmt(__mptr), _M_locked(false) ! { this->_M_lock(); } ! void _M_lock() { ! if (__threads_enabled) ! { ! _M_locked = true; ! __gthread_mutex_lock(_M_pmt->_M_get()); ! } } ! void _M_unlock() ! { ! if (__threads_enabled) ! { ! if (__builtin_expect(_M_locked, true)) ! { ! __gthread_mutex_unlock(_M_pmt->_M_get()); ! _M_locked = false; ! } ! } ! } ! ~_Lock() { this->_M_unlock(); } }; + #endif + + namespace __aux_balloc { static const unsigned int _Bits_Per_Byte = 8; static const unsigned int _Bits_Per_Block = sizeof(unsigned int) * _Bits_Per_Byte; *************** namespace __gnu_cxx *** 148,154 **** //T should be a pointer type, and A is the Allocator for the vector. template ! class _Ffit_finder : public std::unary_function, bool> { typedef typename std::vector, _Alloc> _BPVector; typedef typename _BPVector::difference_type _Counter_type; typedef typename std::pair<_Tp, _Tp> _Block_pair; --- 179,186 ---- //T should be a pointer type, and A is the Allocator for the vector. template ! class _Ffit_finder ! : public std::unary_function, bool> { typedef typename std::vector, _Alloc> _BPVector; typedef typename _BPVector::difference_type _Counter_type; typedef typename std::pair<_Tp, _Tp> _Block_pair; *************** namespace __gnu_cxx *** 157,163 **** unsigned int _M_data_offset; public: ! _Ffit_finder () : _M_pbitmap (0), _M_data_offset (0) { } bool operator() (_Block_pair __bp) throw() { --- 189,197 ---- unsigned int _M_data_offset; public: ! _Ffit_finder () ! : _M_pbitmap (0), _M_data_offset (0) ! { } bool operator() (_Block_pair __bp) throw() { *************** namespace __gnu_cxx *** 214,220 **** //Use the 2nd parameter with care. Make sure that such an entry //exists in the vector before passing that particular index to //this ctor. ! _Bit_map_counter (_BPVector& Rvbp, int __index = -1) : _M_vbp(Rvbp) { this->_M_reset(__index); } --- 248,255 ---- //Use the 2nd parameter with care. Make sure that such an entry //exists in the vector before passing that particular index to //this ctor. ! _Bit_map_counter (_BPVector& Rvbp, int __index = -1) ! : _M_vbp(Rvbp) { this->_M_reset(__index); } *************** namespace __gnu_cxx *** 238,244 **** } //Dangerous Function! Use with extreme care. Pass to this ! //functions ONLY those values that are known to be correct, //otherwise this will mess up big time. void _M_set_internal_bit_map (unsigned int *__new_internal_marker) throw() { --- 273,279 ---- } //Dangerous Function! Use with extreme care. Pass to this ! //function ONLY those values that are known to be correct, //otherwise this will mess up big time. void _M_set_internal_bit_map (unsigned int *__new_internal_marker) throw() { *************** namespace __gnu_cxx *** 275,302 **** return _M_curr_bmap; } ! pointer base () { return _M_vbp[_M_curr_index].first; } unsigned int _M_offset () { ! return _Bits_Per_Block * ((reinterpret_cast(this->base()) - _M_curr_bmap) - 1); } unsigned int _M_where () { return _M_curr_index; } }; } ! //Generic Version of the bsf instruction. ! typedef unsigned int _Bit_map_type; ! static inline unsigned int _Bit_scan_forward (_Bit_map_type __num) ! { ! unsigned int __ret_val = 0; ! while (__num % 2 == 0) ! { ! ++__ret_val; ! __num >>= 1; ! } ! return __ret_val; ! } struct _OOM_handler { static std::new_handler _S_old_handler; --- 310,331 ---- return _M_curr_bmap; } ! pointer _M_base () { return _M_vbp[_M_curr_index].first; } unsigned int _M_offset () { ! return _Bits_Per_Block * ((reinterpret_cast(this->_M_base()) - _M_curr_bmap) - 1); } unsigned int _M_where () { return _M_curr_index; } }; } ! //Generic Version of the bsf instruction. ! typedef unsigned int _Bit_map_type; ! static inline unsigned int _Bit_scan_forward (register _Bit_map_type __num) ! { ! return static_cast(__builtin_ctz(__num)); ! } struct _OOM_handler { static std::new_handler _S_old_handler; *************** namespace __gnu_cxx *** 347,354 **** static void _S_validate_free_list(unsigned int *__addr) throw() { ! const unsigned int Max_Size = 64; ! if (_S_free_list.size() >= Max_Size) { //Ok, the threshold value has been reached. //We determine which block to remove from the list of free --- 376,383 ---- static void _S_validate_free_list(unsigned int *__addr) throw() { ! const unsigned int __max_size = 64; ! if (_S_free_list.size() >= __max_size) { //Ok, the threshold value has been reached. //We determine which block to remove from the list of free *************** namespace __gnu_cxx *** 380,389 **** static bool _S_should_i_give(unsigned int __block_size, unsigned int __required_size) throw() { ! const unsigned int Max_Wastage_Percentage = 36; ! if (__block_size >= __required_size && ! (((__block_size - __required_size) * 100 / __block_size) < Max_Wastage_Percentage)) return true; else return false; --- 409,417 ---- static bool _S_should_i_give(unsigned int __block_size, unsigned int __required_size) throw() { ! const unsigned int __max_wastage_percentage = 36; if (__block_size >= __required_size && ! (((__block_size - __required_size) * 100 / __block_size) < __max_wastage_percentage)) return true; else return false; *************** namespace __gnu_cxx *** 395,401 **** static inline void _S_insert_free_list(unsigned int *__addr) throw() { #if defined __GTHREADS ! _Lock __bfl_lock(*&_S_bfl_mutex); #endif //Call _S_validate_free_list to decide what should be done with this //particular free list. --- 423,429 ---- static inline void _S_insert_free_list(unsigned int *__addr) throw() { #if defined __GTHREADS ! _Lock __bfl_lock(&_S_bfl_mutex); #endif //Call _S_validate_free_list to decide what should be done with this //particular free list. *************** namespace __gnu_cxx *** 405,416 **** static unsigned int *_S_get_free_list(unsigned int __sz) throw (std::bad_alloc) { #if defined __GTHREADS ! _Lock __bfl_lock(*&_S_bfl_mutex); #endif _FLIter __temp = std::lower_bound(_S_free_list.begin(), _S_free_list.end(), __sz, _LT_pointer_compare()); if (__temp == _S_free_list.end() || !_S_should_i_give (**__temp, __sz)) { _OOM_handler __set_handler(_BFL_type::_S_clear); unsigned int *__ret_val = reinterpret_cast (operator new (__sz + sizeof(unsigned int))); --- 433,446 ---- static unsigned int *_S_get_free_list(unsigned int __sz) throw (std::bad_alloc) { #if defined __GTHREADS ! _Lock __bfl_lock(&_S_bfl_mutex); #endif _FLIter __temp = std::lower_bound(_S_free_list.begin(), _S_free_list.end(), __sz, _LT_pointer_compare()); if (__temp == _S_free_list.end() || !_S_should_i_give (**__temp, __sz)) { + //We hold the lock because the OOM_Handler is a stateless + //entity. _OOM_handler __set_handler(_BFL_type::_S_clear); unsigned int *__ret_val = reinterpret_cast (operator new (__sz + sizeof(unsigned int))); *************** namespace __gnu_cxx *** 430,436 **** static void _S_clear() { #if defined __GTHREADS ! _Lock __bfl_lock(*&_S_bfl_mutex); #endif _FLIter __iter = _S_free_list.begin(); while (__iter != _S_free_list.end()) --- 460,466 ---- static void _S_clear() { #if defined __GTHREADS ! _Lock __bfl_lock(&_S_bfl_mutex); #endif _FLIter __iter = _S_free_list.begin(); while (__iter != _S_free_list.end()) *************** namespace __gnu_cxx *** 448,454 **** #endif std::vector _BA_free_list_store::_S_free_list; ! template class bitmap_allocator; // specialize for void: template <> class bitmap_allocator { public: --- 478,484 ---- #endif std::vector _BA_free_list_store::_S_free_list; ! template class bitmap_allocator; // specialize for void: template <> class bitmap_allocator { public: *************** namespace __gnu_cxx *** 456,465 **** typedef const void* const_pointer; // reference-to-void members are impossible. typedef void value_type; ! template struct rebind { typedef bitmap_allocator other; }; }; ! template class bitmap_allocator : private _BA_free_list_store { public: typedef size_t size_type; typedef ptrdiff_t difference_type; --- 486,495 ---- typedef const void* const_pointer; // reference-to-void members are impossible. typedef void value_type; ! template struct rebind { typedef bitmap_allocator<_Tp1> other; }; }; ! template class bitmap_allocator : private _BA_free_list_store { public: typedef size_t size_type; typedef ptrdiff_t difference_type; *************** namespace __gnu_cxx *** 468,474 **** typedef _Tp& reference; typedef const _Tp& const_reference; typedef _Tp value_type; ! template struct rebind { typedef bitmap_allocator other; }; private: static const unsigned int _Bits_Per_Byte = 8; --- 498,504 ---- typedef _Tp& reference; typedef const _Tp& const_reference; typedef _Tp value_type; ! template struct rebind { typedef bitmap_allocator<_Tp1> other; }; private: static const unsigned int _Bits_Per_Byte = 8; *************** namespace __gnu_cxx *** 481,489 **** *__pbmap &= __mask; } ! static inline void _S_bit_free(unsigned int *__pbmap, unsigned int __Pos) throw() { ! unsigned int __mask = 1 << __Pos; *__pbmap |= __mask; } --- 511,519 ---- *__pbmap &= __mask; } ! static inline void _S_bit_free(unsigned int *__pbmap, unsigned int __pos) throw() { ! unsigned int __mask = 1 << __pos; *__pbmap |= __mask; } *************** namespace __gnu_cxx *** 565,582 **** static _Mutex _S_mut; #endif - public: - bitmap_allocator() throw() - { } - - bitmap_allocator(const bitmap_allocator&) { } - - template bitmap_allocator(const bitmap_allocator<_Tp1>&) throw() - { } - - ~bitmap_allocator() throw() - { } - //Complexity: Worst case complexity is O(N), but that is hardly ever //hit. if and when this particular case is encountered, the next few //cases are guaranteed to have a worst case complexity of O(1)! --- 595,600 ---- *************** namespace __gnu_cxx *** 586,607 **** static pointer _S_allocate_single_object() { #if defined __GTHREADS ! _Lock _bit_lock(*&_S_mut); #endif //The algorithm is something like this: The last_requst variable //points to the last accessed Bit Map. When such a condition //occurs, we try to find a free block in the current bitmap, or //succeeding bitmaps until the last bitmap is reached. If no free ! //block turns up, we resort to First Fit method. But, again, the ! //First Fit is used only upto the point where we started the ! //previous linear search. while (_S_last_request._M_finished() == false && (*(_S_last_request._M_get()) == 0)) { _S_last_request.operator++(); } ! if (_S_last_request._M_finished()) { //Fall Back to First Fit algorithm. typedef typename __gnu_cxx::__aux_balloc::_Ffit_finder _FFF; --- 604,630 ---- static pointer _S_allocate_single_object() { #if defined __GTHREADS ! _Lock __bit_lock(&_S_mut); #endif + //The algorithm is something like this: The last_requst variable //points to the last accessed Bit Map. When such a condition //occurs, we try to find a free block in the current bitmap, or //succeeding bitmaps until the last bitmap is reached. If no free ! //block turns up, we resort to First Fit method. + //WARNING: Do not re-order the condition in the while statement + //below, because it relies on C++'s short-circuit + //evaluation. The return from _S_last_request->_M_get() will NOT + //be dereferenceable if _S_last_request->_M_finished() returns + //true. This would inevitibly lead to a NULL pointer dereference + //if tinkered with. while (_S_last_request._M_finished() == false && (*(_S_last_request._M_get()) == 0)) { _S_last_request.operator++(); } ! if (__builtin_expect(_S_last_request._M_finished() == true, false)) { //Fall Back to First Fit algorithm. typedef typename __gnu_cxx::__aux_balloc::_Ffit_finder _FFF; *************** namespace __gnu_cxx *** 645,651 **** unsigned int __nz_bit = _Bit_scan_forward(*_S_last_request._M_get()); _S_bit_allocate(_S_last_request._M_get(), __nz_bit); ! pointer __ret_val = _S_last_request.base() + _S_last_request._M_offset() + __nz_bit; unsigned int *__puse_count = reinterpret_cast (_S_mem_blocks[_S_last_request._M_where()].first) - --- 668,674 ---- unsigned int __nz_bit = _Bit_scan_forward(*_S_last_request._M_get()); _S_bit_allocate(_S_last_request._M_get(), __nz_bit); ! pointer __ret_val = _S_last_request._M_base() + _S_last_request._M_offset() + __nz_bit; unsigned int *__puse_count = reinterpret_cast (_S_mem_blocks[_S_last_request._M_where()].first) - *************** namespace __gnu_cxx *** 654,702 **** return __ret_val; } - //Complexity: O(1), but internally the complexity depends upon the - //complexity of the function(s) _S_allocate_single_object and - //_S_memory_get. - pointer allocate(size_type __n) - { - if (__n == 1) - return _S_allocate_single_object(); - else - return reinterpret_cast(_S_memory_get(__n * sizeof(value_type))); - } - - //Complexity: Worst case complexity is O(N) where N is the number of - //blocks of size sizeof(value_type) within the free lists that the - //allocator holds. However, this worst case is hit only when the - //user supplies a bogus argument to hint. If the hint argument is - //sensible, then the complexity drops to O(lg(N)), and in extreme - //cases, even drops to as low as O(1). So, if the user supplied - //argument is good, then this function performs very well. - pointer allocate(size_type __n, typename bitmap_allocator::const_pointer) - { - return allocate(__n); - } - - void deallocate(pointer __p, size_type __n) throw() - { - if (__n == 1) - _S_deallocate_single_object(__p); - else - _S_memory_put(__p); - } - //Complexity: O(lg(N)), but the worst case is hit quite often! I //need to do something about this. I'll be able to work on it, only //when I have some solid figures from a few real apps. static void _S_deallocate_single_object(pointer __p) throw() { #if defined __GTHREADS ! _Lock _bit_lock(*&_S_mut); #endif - typedef typename _BPVector::iterator iterator; - typedef typename _BPVector::difference_type diff_type; ! diff_type __diff; int __displacement; assert(_S_last_dealloc_index >= 0); --- 677,695 ---- return __ret_val; } //Complexity: O(lg(N)), but the worst case is hit quite often! I //need to do something about this. I'll be able to work on it, only //when I have some solid figures from a few real apps. static void _S_deallocate_single_object(pointer __p) throw() { #if defined __GTHREADS ! _Lock __bit_lock(&_S_mut); #endif ! typedef typename _BPVector::iterator _Iterator; ! typedef typename _BPVector::difference_type _Difference_type; ! ! _Difference_type __diff; int __displacement; assert(_S_last_dealloc_index >= 0); *************** namespace __gnu_cxx *** 711,717 **** } else { ! iterator _iter = (std::find_if(_S_mem_blocks.begin(), _S_mem_blocks.end(), __gnu_cxx::__aux_balloc::_Inclusive_between(__p))); assert(_iter != _S_mem_blocks.end()); --- 704,710 ---- } else { ! _Iterator _iter = (std::find_if(_S_mem_blocks.begin(), _S_mem_blocks.end(), __gnu_cxx::__aux_balloc::_Inclusive_between(__p))); assert(_iter != _S_mem_blocks.end()); *************** namespace __gnu_cxx *** 734,740 **** --(*__puse_count); ! if (!*__puse_count) { _S_block_size /= 2; --- 727,733 ---- --(*__puse_count); ! if (__builtin_expect(*__puse_count == 0, false)) { _S_block_size /= 2; *************** namespace __gnu_cxx *** 744,755 **** _S_mem_blocks.erase(_S_mem_blocks.begin() + __diff); //We reset the _S_last_request variable to reflect the erased ! //block. We do this to pretect future requests after the last //block has been removed from a particular memory Chunk, //which in turn has been returned to the free list, and //hence had been erased from the vector, so the size of the //vector gets reduced by 1. ! if ((diff_type)_S_last_request._M_where() >= __diff--) { _S_last_request._M_reset(__diff); // assert(__diff >= 0); --- 737,748 ---- _S_mem_blocks.erase(_S_mem_blocks.begin() + __diff); //We reset the _S_last_request variable to reflect the erased ! //block. We do this to protect future requests after the last //block has been removed from a particular memory Chunk, //which in turn has been returned to the free list, and //hence had been erased from the vector, so the size of the //vector gets reduced by 1. ! if ((_Difference_type)_S_last_request._M_where() >= __diff--) { _S_last_request._M_reset(__diff); // assert(__diff >= 0); *************** namespace __gnu_cxx *** 768,781 **** } } pointer address(reference r) const { return &r; } const_pointer address(const_reference r) const { return &r; } size_type max_size(void) const throw() { return (size_type()-1)/sizeof(value_type); } ! void construct (pointer p, const_reference _data) { ! new (p) value_type (_data); } void destroy (pointer p) --- 761,817 ---- } } + public: + bitmap_allocator() throw() + { } + + bitmap_allocator(const bitmap_allocator&) { } + + template bitmap_allocator(const bitmap_allocator<_Tp1>&) throw() + { } + + ~bitmap_allocator() throw() + { } + + //Complexity: O(1), but internally the complexity depends upon the + //complexity of the function(s) _S_allocate_single_object and + //_S_memory_get. + pointer allocate(size_type __n) + { + if (__builtin_expect(__n == 1, true)) + return _S_allocate_single_object(); + else + return reinterpret_cast(_S_memory_get(__n * sizeof(value_type))); + } + + //Complexity: Worst case complexity is O(N) where N is the number of + //blocks of size sizeof(value_type) within the free lists that the + //allocator holds. However, this worst case is hit only when the + //user supplies a bogus argument to hint. If the hint argument is + //sensible, then the complexity drops to O(lg(N)), and in extreme + //cases, even drops to as low as O(1). So, if the user supplied + //argument is good, then this function performs very well. + pointer allocate(size_type __n, typename bitmap_allocator::const_pointer) + { + return allocate(__n); + } + + void deallocate(pointer __p, size_type __n) throw() + { + if (__builtin_expect(__n == 1, true)) + _S_deallocate_single_object(__p); + else + _S_memory_put(__p); + } + pointer address(reference r) const { return &r; } const_pointer address(const_reference r) const { return &r; } size_type max_size(void) const throw() { return (size_type()-1)/sizeof(value_type); } ! void construct (pointer p, const_reference __data) { ! ::new(p) value_type(__data); } void destroy (pointer p) diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/ext/debug_allocator.h gcc-3.4.1/libstdc++-v3/include/ext/debug_allocator.h *** gcc-3.4.0/libstdc++-v3/include/ext/debug_allocator.h 2004-03-18 17:37:05.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/ext/debug_allocator.h 2004-04-30 03:25:08.000000000 +0000 *************** namespace __gnu_cxx *** 108,114 **** void deallocate(pointer __p, size_type __n) { ! pointer __real_p = __p - _M_extra; if (*reinterpret_cast(__real_p) != __n) abort(); _M_allocator.deallocate(__real_p, __n + _M_extra); --- 108,116 ---- void deallocate(pointer __p, size_type __n) { ! if (!__p) ! abort(); ! pointer __real_p = __p - _M_extra; if (*reinterpret_cast(__real_p) != __n) abort(); _M_allocator.deallocate(__real_p, __n + _M_extra); diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/ext/enc_filebuf.h gcc-3.4.1/libstdc++-v3/include/ext/enc_filebuf.h *** gcc-3.4.0/libstdc++-v3/include/ext/enc_filebuf.h 2003-12-09 04:31:53.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/ext/enc_filebuf.h 2004-05-18 09:15:11.000000000 +0000 *************** namespace __gnu_cxx *** 54,65 **** enc_filebuf(state_type& __state) : std::basic_filebuf<_CharT, enc_char_traits<_CharT> >() { - // Set state type to something useful. - // Something more than copyconstructible is needed here, so - // require default and copy constructible + assignment operator. - __glibcxx_class_requires(state_type, _SGIAssignableConcept); this->_M_state_beg = __state; this->_M_state_beg._M_init(); ! }; }; } // namespace __gnu_cxx --- 54,68 ---- enc_filebuf(state_type& __state) : std::basic_filebuf<_CharT, enc_char_traits<_CharT> >() { this->_M_state_beg = __state; this->_M_state_beg._M_init(); ! } ! ! private: ! // concept requirements: ! // Set state type to something useful. ! // Something more than copyconstructible is needed here, so ! // require default and copy constructible + assignment operator. ! __glibcxx_class_requires(state_type, _SGIAssignableConcept) }; } // namespace __gnu_cxx diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/ext/malloc_allocator.h gcc-3.4.1/libstdc++-v3/include/ext/malloc_allocator.h *** gcc-3.4.0/libstdc++-v3/include/ext/malloc_allocator.h 2004-03-18 17:37:05.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/ext/malloc_allocator.h 2004-04-30 03:25:08.000000000 +0000 *************** namespace __gnu_cxx *** 78,84 **** // about what the return value is when __n == 0. pointer allocate(size_type __n, const void* = 0) ! { return static_cast<_Tp*>(malloc(__n * sizeof(_Tp))); } // __p is not permitted to be a null pointer. void --- 78,89 ---- // about what the return value is when __n == 0. pointer allocate(size_type __n, const void* = 0) ! { ! pointer __ret = static_cast<_Tp*>(malloc(__n * sizeof(_Tp))); ! if (!__ret) ! throw std::bad_alloc(); ! return __ret; ! } // __p is not permitted to be a null pointer. void *************** namespace __gnu_cxx *** 93,99 **** // 402. wrong new expression in [some_] allocator::construct void construct(pointer __p, const _Tp& __val) ! { *__p = __val; } void destroy(pointer __p) { __p->~_Tp(); } --- 98,104 ---- // 402. wrong new expression in [some_] allocator::construct void construct(pointer __p, const _Tp& __val) ! { ::new(__p) value_type(__val); } void destroy(pointer __p) { __p->~_Tp(); } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/ext/mt_allocator.h gcc-3.4.1/libstdc++-v3/include/ext/mt_allocator.h *** gcc-3.4.0/libstdc++-v3/include/ext/mt_allocator.h 2004-03-18 17:37:05.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/ext/mt_allocator.h 2004-06-18 23:32:08.000000000 +0000 *************** namespace __gnu_cxx *** 57,69 **** class __mt_alloc { public: ! typedef size_t size_type; ! typedef ptrdiff_t difference_type; ! typedef _Tp* pointer; ! typedef const _Tp* const_pointer; ! typedef _Tp& reference; ! typedef const _Tp& const_reference; ! typedef _Tp value_type; template struct rebind --- 57,69 ---- class __mt_alloc { public: ! typedef size_t size_type; ! typedef ptrdiff_t difference_type; ! typedef _Tp* pointer; ! typedef const _Tp* const_pointer; ! typedef _Tp& reference; ! typedef const _Tp& const_reference; ! typedef _Tp value_type; template struct rebind *************** namespace __gnu_cxx *** 88,97 **** ~__mt_alloc() throw() { } pointer ! address(reference __x) const { return &__x; } const_pointer ! address(const_reference __x) const { return &__x; } size_type max_size() const throw() --- 88,99 ---- ~__mt_alloc() throw() { } pointer ! address(reference __x) const ! { return &__x; } const_pointer ! address(const_reference __x) const ! { return &__x; } size_type max_size() const throw() *************** namespace __gnu_cxx *** 107,126 **** destroy(pointer __p) { __p->~_Tp(); } pointer ! allocate(size_t __n, const void* = 0); void deallocate(pointer __p, size_type __n); // Variables used to configure the behavior of the allocator, // assigned and explained in detail below. ! struct tune { // Allocation requests (after round-up to power of 2) below // this value will be handled by the allocator. A raw new/ // call will be used for requests larger than this value. size_t _M_max_bytes; // In order to avoid fragmenting and minimize the number of // new() calls we always request new memory using this // value. Based on previous discussions on the libstdc++ --- 109,137 ---- destroy(pointer __p) { __p->~_Tp(); } pointer ! allocate(size_type __n, const void* = 0); void deallocate(pointer __p, size_type __n); // Variables used to configure the behavior of the allocator, // assigned and explained in detail below. ! struct _Tune { + // Alignment needed. + // NB: In any case must be >= sizeof(_Block_record), that + // is 4 on 32 bit machines and 8 on 64 bit machines. + size_t _M_align; + // Allocation requests (after round-up to power of 2) below // this value will be handled by the allocator. A raw new/ // call will be used for requests larger than this value. size_t _M_max_bytes; + // Size in bytes of the smallest bin. + // NB: Must be a power of 2 and >= _M_align. + size_t _M_min_bin; + // In order to avoid fragmenting and minimize the number of // new() calls we always request new memory using this // value. Based on previous discussions on the libstdc++ *************** namespace __gnu_cxx *** 143,165 **** // Set to true forces all allocations to use new(). bool _M_force_new; ! explicit tune() ! : _M_max_bytes(128), _M_chunk_size(4096 - 4 * sizeof(void*)), ! #ifdef __GTHREADS ! _M_max_threads(4096), ! #else ! _M_max_threads(0), ! #endif ! _M_freelist_headroom(10), ! _M_force_new(getenv("GLIBCXX_FORCE_NEW") ? true : false) ! { } ! explicit tune(size_t __maxb, size_t __chunk, size_t __maxthreads, ! size_t __headroom, bool __force) ! : _M_max_bytes(__maxb), _M_chunk_size(__chunk), ! _M_max_threads(__maxthreads), _M_freelist_headroom(__headroom), ! _M_force_new(__force) ! { } }; private: --- 154,175 ---- // Set to true forces all allocations to use new(). bool _M_force_new; ! explicit ! _Tune() ! : _M_align(8), _M_max_bytes(128), _M_min_bin(8), ! _M_chunk_size(4096 - 4 * sizeof(void*)), ! _M_max_threads(4096), _M_freelist_headroom(10), ! _M_force_new(getenv("GLIBCXX_FORCE_NEW") ? true : false) ! { } ! explicit ! _Tune(size_t __align, size_t __maxb, size_t __minbin, ! size_t __chunk, size_t __maxthreads, size_t __headroom, ! bool __force) ! : _M_align(__align), _M_max_bytes(__maxb), _M_min_bin(__minbin), ! _M_chunk_size(__chunk), _M_max_threads(__maxthreads), ! _M_freelist_headroom(__headroom), _M_force_new(__force) ! { } }; private: *************** namespace __gnu_cxx *** 170,186 **** #endif static bool _S_init; ! static void _S_initialize(); // Configuration options. ! static tune _S_options; ! static const tune ! _S_get_options() { return _S_options; } static void ! _S_set_options(tune __t) { if (!_S_init) _S_options = __t; --- 180,197 ---- #endif static bool _S_init; ! static void _S_initialize(); // Configuration options. ! static _Tune _S_options; ! static const _Tune ! _S_get_options() ! { return _S_options; } static void ! _S_set_options(_Tune __t) { if (!_S_init) _S_options = __t; *************** namespace __gnu_cxx *** 188,195 **** // Using short int as type for the binmap implies we are never // caching blocks larger than 65535 with this allocator ! typedef unsigned short int binmap_type; ! static binmap_type* _S_binmap; // Each requesting thread is assigned an id ranging from 1 to // _S_max_threads. Thread id 0 is used as a global memory pool. --- 199,206 ---- // Using short int as type for the binmap implies we are never // caching blocks larger than 65535 with this allocator ! typedef unsigned short int _Binmap_type; ! static _Binmap_type* _S_binmap; // Each requesting thread is assigned an id ranging from 1 to // _S_max_threads. Thread id 0 is used as a global memory pool. *************** namespace __gnu_cxx *** 201,263 **** // (i.e. the thread dies) is called, we return the thread id to // the front of this list. #ifdef __GTHREADS ! struct thread_record { // Points to next free thread id record. NULL if last record in list. ! thread_record* volatile next; // Thread id ranging from 1 to _S_max_threads. ! size_t id; }; ! static thread_record* volatile _S_thread_freelist_first; static __gthread_mutex_t _S_thread_freelist_mutex; static __gthread_key_t _S_thread_key; static void ! _S_destroy_thread_key(void* freelist_pos); #endif static size_t _S_get_thread_id(); ! struct block_record { ! // Points to the next block_record for its thread_id. ! block_record* volatile next; - // The thread id of the thread which has requested this block. #ifdef __GTHREADS ! size_t thread_id; #endif }; ! struct bin_record { // An "array" of pointers to the first free block for each // thread id. Memory to this "array" is allocated in _S_initialize() // for _S_max_threads + global pool 0. ! block_record** volatile first; // An "array" of counters used to keep track of the amount of // blocks that are on the freelist/used for each thread id. // Memory to these "arrays" is allocated in _S_initialize() for // _S_max_threads + global pool 0. ! size_t* volatile free; ! size_t* volatile used; // Each bin has its own mutex which is used to ensure data // integrity while changing "ownership" on a block. The mutex // is initialized in _S_initialize(). ! #ifdef __GTHREADS ! __gthread_mutex_t* mutex; #endif }; // An "array" of bin_records each of which represents a specific // power of 2 size. Memory to this "array" is allocated in // _S_initialize(). ! static bin_record* volatile _S_bin; // Actual value calculated in _S_initialize(). static size_t _S_bin_size; --- 212,274 ---- // (i.e. the thread dies) is called, we return the thread id to // the front of this list. #ifdef __GTHREADS ! struct _Thread_record { // Points to next free thread id record. NULL if last record in list. ! _Thread_record* volatile _M_next; // Thread id ranging from 1 to _S_max_threads. ! size_t _M_id; }; ! static _Thread_record* volatile _S_thread_freelist_first; static __gthread_mutex_t _S_thread_freelist_mutex; static __gthread_key_t _S_thread_key; static void ! _S_destroy_thread_key(void* __freelist_pos); #endif static size_t _S_get_thread_id(); ! union _Block_record { ! // Points to the block_record of the next free block. ! _Block_record* volatile _M_next; #ifdef __GTHREADS ! // The thread id of the thread which has requested this block. ! size_t _M_thread_id; #endif }; ! struct _Bin_record { // An "array" of pointers to the first free block for each // thread id. Memory to this "array" is allocated in _S_initialize() // for _S_max_threads + global pool 0. ! _Block_record** volatile _M_first; + #ifdef __GTHREADS // An "array" of counters used to keep track of the amount of // blocks that are on the freelist/used for each thread id. // Memory to these "arrays" is allocated in _S_initialize() for // _S_max_threads + global pool 0. ! size_t* volatile _M_free; ! size_t* volatile _M_used; // Each bin has its own mutex which is used to ensure data // integrity while changing "ownership" on a block. The mutex // is initialized in _S_initialize(). ! __gthread_mutex_t* _M_mutex; #endif }; // An "array" of bin_records each of which represents a specific // power of 2 size. Memory to this "array" is allocated in // _S_initialize(). ! static _Bin_record* volatile _S_bin; // Actual value calculated in _S_initialize(). static size_t _S_bin_size; *************** namespace __gnu_cxx *** 266,272 **** template typename __mt_alloc<_Tp>::pointer __mt_alloc<_Tp>:: ! allocate(size_t __n, const void*) { // Although the test in __gthread_once() would suffice, we wrap // test of the once condition in our own unlocked check. This --- 277,283 ---- template typename __mt_alloc<_Tp>::pointer __mt_alloc<_Tp>:: ! allocate(size_type __n, const void*) { // Although the test in __gthread_once() would suffice, we wrap // test of the once condition in our own unlocked check. This *************** namespace __gnu_cxx *** 291,310 **** void* __ret = ::operator new(__bytes); return static_cast<_Tp*>(__ret); } ! // Round up to power of 2 and figure out which bin to use. const size_t __which = _S_binmap[__bytes]; const size_t __thread_id = _S_get_thread_id(); // Find out if we have blocks on our freelist. If so, go ahead // and use them directly without having to lock anything. ! const bin_record& __bin = _S_bin[__which]; ! block_record* block = NULL; ! if (__bin.first[__thread_id] == NULL) { // Are we using threads? // - Yes, check if there are free blocks on the global ! // list. If so, grab up to block_count blocks in one // lock and change ownership. If the global list is // empty, we allocate a new chunk and add those blocks // directly to our own freelist (with us as owner). --- 302,327 ---- void* __ret = ::operator new(__bytes); return static_cast<_Tp*>(__ret); } ! // Round up to power of 2 and figure out which bin to use. const size_t __which = _S_binmap[__bytes]; const size_t __thread_id = _S_get_thread_id(); // Find out if we have blocks on our freelist. If so, go ahead // and use them directly without having to lock anything. ! const _Bin_record& __bin = _S_bin[__which]; ! _Block_record* __block = NULL; ! if (__bin._M_first[__thread_id] == NULL) { + // NB: For alignment reasons, we can't use the first _M_align + // bytes, even when sizeof(_Block_record) < _M_align. + const size_t __bin_size = ((_S_options._M_min_bin << __which) + + _S_options._M_align); + size_t __block_count = _S_options._M_chunk_size / __bin_size; + // Are we using threads? // - Yes, check if there are free blocks on the global ! // list. If so, grab up to __block_count blocks in one // lock and change ownership. If the global list is // empty, we allocate a new chunk and add those blocks // directly to our own freelist (with us as owner). *************** namespace __gnu_cxx *** 315,429 **** #ifdef __GTHREADS if (__gthread_active_p()) { ! const size_t bin_size = (1 << __which) + sizeof(block_record); ! size_t block_count = _S_options._M_chunk_size / bin_size; ! ! __gthread_mutex_lock(__bin.mutex); ! if (__bin.first[0] == NULL) { // No need to hold the lock when we are adding a // whole chunk to our own list. ! __gthread_mutex_unlock(__bin.mutex); ! ! void* v = ::operator new(_S_options._M_chunk_size); ! __bin.first[__thread_id] = static_cast(v); ! ! __bin.free[__thread_id] = block_count; ! block_count--; ! block = __bin.first[__thread_id]; ! while (block_count > 0) { ! char* c = reinterpret_cast(block) + bin_size; ! block->next = reinterpret_cast(c); ! block->thread_id = __thread_id; ! block = block->next; ! block_count--; } ! ! block->next = NULL; ! block->thread_id = __thread_id; } else { ! size_t global_count = 0; ! block_record* tmp; ! while (__bin.first[0] != NULL && global_count < block_count) { ! tmp = __bin.first[0]->next; ! block = __bin.first[0]; ! ! if (__bin.first[__thread_id] == NULL) ! { ! __bin.first[__thread_id] = block; ! block->next = NULL; ! } ! else ! { ! block->next = __bin.first[__thread_id]; ! __bin.first[__thread_id] = block; ! } ! ! block->thread_id = __thread_id; ! __bin.free[__thread_id]++; ! __bin.first[0] = tmp; ! global_count++; } ! __gthread_mutex_unlock(__bin.mutex); } - - // Return the first newly added block in our list and - // update the counters - block = __bin.first[__thread_id]; - __bin.first[__thread_id] = __bin.first[__thread_id]->next; - __bin.free[__thread_id]--; - __bin.used[__thread_id]++; } else #endif { void* __v = ::operator new(_S_options._M_chunk_size); ! __bin.first[0] = static_cast(__v); ! ! const size_t bin_size = (1 << __which) + sizeof(block_record); ! size_t block_count = _S_options._M_chunk_size / bin_size; ! block_count--; ! block = __bin.first[0]; ! while (block_count > 0) { ! char* __c = reinterpret_cast(block) + bin_size; ! block->next = reinterpret_cast(__c); ! block = block->next; ! block_count--; } ! block->next = NULL; ! ! // Remove from list. ! block = __bin.first[0]; ! __bin.first[0] = __bin.first[0]->next; } } - else - { - // "Default" operation - we have blocks on our own freelist - // grab the first record and update the counters. - block = __bin.first[__thread_id]; - __bin.first[__thread_id] = __bin.first[__thread_id]->next; #ifdef __GTHREADS ! if (__gthread_active_p()) ! { ! __bin.free[__thread_id]--; ! __bin.used[__thread_id]++; ! } ! #endif } ! char* __c = reinterpret_cast(block) + sizeof(block_record); return static_cast<_Tp*>(static_cast(__c)); } - template void __mt_alloc<_Tp>:: --- 332,417 ---- #ifdef __GTHREADS if (__gthread_active_p()) { ! __gthread_mutex_lock(__bin._M_mutex); ! if (__bin._M_first[0] == NULL) { // No need to hold the lock when we are adding a // whole chunk to our own list. ! __gthread_mutex_unlock(__bin._M_mutex); ! void* __v = ::operator new(_S_options._M_chunk_size); ! __bin._M_first[__thread_id] = static_cast<_Block_record*>(__v); ! __bin._M_free[__thread_id] = __block_count; ! ! --__block_count; ! __block = __bin._M_first[__thread_id]; ! while (__block_count-- > 0) { ! char* __c = reinterpret_cast(__block) + __bin_size; ! __block->_M_next = reinterpret_cast<_Block_record*>(__c); ! __block = __block->_M_next; } ! __block->_M_next = NULL; } else { ! // Is the number of required blocks greater than or ! // equal to the number that can be provided by the ! // global free list? ! __bin._M_first[__thread_id] = __bin._M_first[0]; ! if (__block_count >= __bin._M_free[0]) { ! __bin._M_free[__thread_id] = __bin._M_free[0]; ! __bin._M_free[0] = 0; ! __bin._M_first[0] = NULL; } ! else ! { ! __bin._M_free[__thread_id] = __block_count; ! __bin._M_free[0] -= __block_count; ! --__block_count; ! __block = __bin._M_first[0]; ! while (__block_count-- > 0) ! __block = __block->_M_next; ! __bin._M_first[0] = __block->_M_next; ! __block->_M_next = NULL; ! } ! __gthread_mutex_unlock(__bin._M_mutex); } } else #endif { void* __v = ::operator new(_S_options._M_chunk_size); ! __bin._M_first[0] = static_cast<_Block_record*>(__v); ! --__block_count; ! __block = __bin._M_first[0]; ! while (__block_count-- > 0) { ! char* __c = reinterpret_cast(__block) + __bin_size; ! __block->_M_next = reinterpret_cast<_Block_record*>(__c); ! __block = __block->_M_next; } ! __block->_M_next = NULL; } } + __block = __bin._M_first[__thread_id]; + __bin._M_first[__thread_id] = __bin._M_first[__thread_id]->_M_next; #ifdef __GTHREADS ! if (__gthread_active_p()) ! { ! __block->_M_thread_id = __thread_id; ! --__bin._M_free[__thread_id]; ! ++__bin._M_used[__thread_id]; } ! #endif ! ! char* __c = reinterpret_cast(__block) + _S_options._M_align; return static_cast<_Tp*>(static_cast(__c)); } template void __mt_alloc<_Tp>:: *************** namespace __gnu_cxx *** 440,526 **** // Round up to power of 2 and figure out which bin to use. const size_t __which = _S_binmap[__bytes]; ! const size_t thread_id = _S_get_thread_id(); ! const bin_record& __bin = _S_bin[__which]; ! char* __c = reinterpret_cast(__p) - sizeof(block_record); ! block_record* block = reinterpret_cast(__c); #ifdef __GTHREADS if (__gthread_active_p()) { ! // Calculate the number of records to remove from our freelist. ! int remove = __bin.free[thread_id] - ! (__bin.used[thread_id] / _S_options._M_freelist_headroom); ! // The calculation above will almost always tell us to ! // remove one or two records at a time, but this creates too ! // much contention when locking and therefore we wait until ! // the number of records is "high enough". ! int __cond1 = static_cast(100 * (_S_bin_size - __which)); ! int __cond2 = static_cast(__bin.free[thread_id] / _S_options._M_freelist_headroom); ! if (remove > __cond1 && remove > __cond2) { ! __gthread_mutex_lock(__bin.mutex); ! block_record* tmp; ! while (remove > 0) ! { ! tmp = __bin.first[thread_id]->next; ! if (__bin.first[0] == NULL) ! { ! __bin.first[0] = __bin.first[thread_id]; ! __bin.first[0]->next = NULL; ! } ! else ! { ! __bin.first[thread_id]->next = __bin.first[0]; ! __bin.first[0] = __bin.first[thread_id]; ! } ! ! __bin.first[thread_id] = tmp; ! __bin.free[thread_id]--; ! remove--; ! } ! __gthread_mutex_unlock(__bin.mutex); } // Return this block to our list and update counters and // owner id as needed. ! if (__bin.first[thread_id] == NULL) ! { ! __bin.first[thread_id] = block; ! block->next = NULL; ! } ! else ! { ! block->next = __bin.first[thread_id]; ! __bin.first[thread_id] = block; ! } ! ! __bin.free[thread_id]++; ! if (thread_id == block->thread_id) ! __bin.used[thread_id]--; ! else ! { ! __bin.used[block->thread_id]--; ! block->thread_id = thread_id; ! } } else #endif { // Single threaded application - return to global pool. ! if (__bin.first[0] == NULL) ! { ! __bin.first[0] = block; ! block->next = NULL; ! } ! else ! { ! block->next = __bin.first[0]; ! __bin.first[0] = block; ! } } } --- 428,485 ---- // Round up to power of 2 and figure out which bin to use. const size_t __which = _S_binmap[__bytes]; ! const _Bin_record& __bin = _S_bin[__which]; ! char* __c = reinterpret_cast(__p) - _S_options._M_align; ! _Block_record* __block = reinterpret_cast<_Block_record*>(__c); #ifdef __GTHREADS if (__gthread_active_p()) { ! // Calculate the number of records to remove from our freelist: ! // in order to avoid too much contention we wait until the ! // number of records is "high enough". ! const size_t __thread_id = _S_get_thread_id(); ! long __remove = ((__bin._M_free[__thread_id] ! * _S_options._M_freelist_headroom) ! - __bin._M_used[__thread_id]); ! if (__remove > static_cast(100 * (_S_bin_size - __which) ! * _S_options._M_freelist_headroom) ! && __remove > static_cast(__bin._M_free[__thread_id])) { ! _Block_record* __tmp = __bin._M_first[__thread_id]; ! _Block_record* __first = __tmp; ! __remove /= _S_options._M_freelist_headroom; ! const long __removed = __remove; ! --__remove; ! while (__remove-- > 0) ! __tmp = __tmp->_M_next; ! __bin._M_first[__thread_id] = __tmp->_M_next; ! __bin._M_free[__thread_id] -= __removed; ! ! __gthread_mutex_lock(__bin._M_mutex); ! __tmp->_M_next = __bin._M_first[0]; ! __bin._M_first[0] = __first; ! __bin._M_free[0] += __removed; ! __gthread_mutex_unlock(__bin._M_mutex); } // Return this block to our list and update counters and // owner id as needed. ! --__bin._M_used[__block->_M_thread_id]; ! ! __block->_M_next = __bin._M_first[__thread_id]; ! __bin._M_first[__thread_id] = __block; ! ++__bin._M_free[__thread_id]; } else #endif { // Single threaded application - return to global pool. ! __block->_M_next = __bin._M_first[0]; ! __bin._M_first[0] = __block; } } *************** namespace __gnu_cxx *** 534,588 **** // Calculate the number of bins required based on _M_max_bytes. // _S_bin_size is statically-initialized to one. ! size_t __bin_size = 1; while (_S_options._M_max_bytes > __bin_size) { ! __bin_size = __bin_size << 1; ! _S_bin_size++; } // Setup the bin map for quick lookup of the relevant bin. ! const size_t __j = (_S_options._M_max_bytes + 1) * sizeof(binmap_type); ! _S_binmap = static_cast(::operator new(__j)); ! binmap_type* __bp = _S_binmap; ! binmap_type __bin_max = 1; ! binmap_type __bint = 0; ! for (binmap_type __ct = 0; __ct <= _S_options._M_max_bytes; __ct++) { if (__ct > __bin_max) { __bin_max <<= 1; ! __bint++; } *__bp++ = __bint; } // If __gthread_active_p() create and initialize the list of // free thread ids. Single threaded applications use thread id 0 // directly and have no need for this. - void* __v; #ifdef __GTHREADS if (__gthread_active_p()) { ! const size_t __k = sizeof(thread_record) * _S_options._M_max_threads; __v = ::operator new(__k); ! _S_thread_freelist_first = static_cast(__v); // NOTE! The first assignable thread id is 1 since the // global pool uses id 0 size_t __i; ! for (__i = 1; __i < _S_options._M_max_threads; __i++) { ! thread_record& __tr = _S_thread_freelist_first[__i - 1]; ! __tr.next = &_S_thread_freelist_first[__i]; ! __tr.id = __i; } // Set last record. ! _S_thread_freelist_first[__i - 1].next = NULL; ! _S_thread_freelist_first[__i - 1].id = __i; ! // Make sure this is initialized. #ifndef __GTHREAD_MUTEX_INIT --- 493,549 ---- // Calculate the number of bins required based on _M_max_bytes. // _S_bin_size is statically-initialized to one. ! size_t __bin_size = _S_options._M_min_bin; while (_S_options._M_max_bytes > __bin_size) { ! __bin_size <<= 1; ! ++_S_bin_size; } // Setup the bin map for quick lookup of the relevant bin. ! const size_t __j = (_S_options._M_max_bytes + 1) * sizeof(_Binmap_type); ! _S_binmap = static_cast<_Binmap_type*>(::operator new(__j)); ! _Binmap_type* __bp = _S_binmap; ! _Binmap_type __bin_max = _S_options._M_min_bin; ! _Binmap_type __bint = 0; ! for (_Binmap_type __ct = 0; __ct <= _S_options._M_max_bytes; ++__ct) { if (__ct > __bin_max) { __bin_max <<= 1; ! ++__bint; } *__bp++ = __bint; } + // Initialize _S_bin and its members. + void* __v = ::operator new(sizeof(_Bin_record) * _S_bin_size); + _S_bin = static_cast<_Bin_record*>(__v); + // If __gthread_active_p() create and initialize the list of // free thread ids. Single threaded applications use thread id 0 // directly and have no need for this. #ifdef __GTHREADS if (__gthread_active_p()) { ! const size_t __k = sizeof(_Thread_record) * _S_options._M_max_threads; __v = ::operator new(__k); ! _S_thread_freelist_first = static_cast<_Thread_record*>(__v); // NOTE! The first assignable thread id is 1 since the // global pool uses id 0 size_t __i; ! for (__i = 1; __i < _S_options._M_max_threads; ++__i) { ! _Thread_record& __tr = _S_thread_freelist_first[__i - 1]; ! __tr._M_next = &_S_thread_freelist_first[__i]; ! __tr._M_id = __i; } // Set last record. ! _S_thread_freelist_first[__i - 1]._M_next = NULL; ! _S_thread_freelist_first[__i - 1]._M_id = __i; // Make sure this is initialized. #ifndef __GTHREAD_MUTEX_INIT *************** namespace __gnu_cxx *** 591,652 **** // Initialize per thread key to hold pointer to // _S_thread_freelist. __gthread_key_create(&_S_thread_key, _S_destroy_thread_key); - } - #endif - - // Initialize _S_bin and its members. - __v = ::operator new(sizeof(bin_record) * _S_bin_size); - _S_bin = static_cast(__v); - - // Maximum number of threads. - size_t __max_threads = 1; - #ifdef __GTHREADS - if (__gthread_active_p()) - __max_threads = _S_options._M_max_threads + 1; - #endif ! for (size_t __n = 0; __n < _S_bin_size; __n++) ! { ! bin_record& __bin = _S_bin[__n]; ! __v = ::operator new(sizeof(block_record*) * __max_threads); ! __bin.first = static_cast(__v); - #ifdef __GTHREADS - if (__gthread_active_p()) - { __v = ::operator new(sizeof(size_t) * __max_threads); ! __bin.free = static_cast(__v); __v = ::operator new(sizeof(size_t) * __max_threads); ! __bin.used = static_cast(__v); __v = ::operator new(sizeof(__gthread_mutex_t)); ! __bin.mutex = static_cast<__gthread_mutex_t*>(__v); #ifdef __GTHREAD_MUTEX_INIT { // Do not copy a POSIX/gthr mutex once in use. __gthread_mutex_t __tmp = __GTHREAD_MUTEX_INIT; ! *__bin.mutex = __tmp; } #else ! { __GTHREAD_MUTEX_INIT_FUNCTION(__bin.mutex); } ! #endif ! } #endif ! for (size_t __threadn = 0; __threadn < __max_threads; __threadn++) ! { ! __bin.first[__threadn] = NULL; ! #ifdef __GTHREADS ! if (__gthread_active_p()) ! { ! __bin.free[__threadn] = 0; ! __bin.used[__threadn] = 0; ! } ! #endif ! } ! } _S_init = true; } --- 552,603 ---- // Initialize per thread key to hold pointer to // _S_thread_freelist. __gthread_key_create(&_S_thread_key, _S_destroy_thread_key); ! const size_t __max_threads = _S_options._M_max_threads + 1; ! for (size_t __n = 0; __n < _S_bin_size; ++__n) ! { ! _Bin_record& __bin = _S_bin[__n]; ! __v = ::operator new(sizeof(_Block_record*) * __max_threads); ! __bin._M_first = static_cast<_Block_record**>(__v); __v = ::operator new(sizeof(size_t) * __max_threads); ! __bin._M_free = static_cast(__v); __v = ::operator new(sizeof(size_t) * __max_threads); ! __bin._M_used = static_cast(__v); __v = ::operator new(sizeof(__gthread_mutex_t)); ! __bin._M_mutex = static_cast<__gthread_mutex_t*>(__v); #ifdef __GTHREAD_MUTEX_INIT { // Do not copy a POSIX/gthr mutex once in use. __gthread_mutex_t __tmp = __GTHREAD_MUTEX_INIT; ! *__bin._M_mutex = __tmp; } #else ! { __GTHREAD_MUTEX_INIT_FUNCTION(__bin._M_mutex); } #endif ! for (size_t __threadn = 0; __threadn < __max_threads; ! ++__threadn) ! { ! __bin._M_first[__threadn] = NULL; ! __bin._M_free[__threadn] = 0; ! __bin._M_used[__threadn] = 0; ! } ! } ! } ! else ! #endif ! for (size_t __n = 0; __n < _S_bin_size; ++__n) ! { ! _Bin_record& __bin = _S_bin[__n]; ! __v = ::operator new(sizeof(_Block_record*)); ! __bin._M_first = static_cast<_Block_record**>(__v); ! __bin._M_first[0] = NULL; ! } ! _S_init = true; } *************** namespace __gnu_cxx *** 657,668 **** { #ifdef __GTHREADS // If we have thread support and it's active we check the thread ! // key value and return it's id or if it's not set we take the // first record from _S_thread_freelist and sets the key and // returns it's id. if (__gthread_active_p()) { ! thread_record* __freelist_pos = static_cast(__gthread_getspecific(_S_thread_key)); if (__freelist_pos == NULL) { // Since _S_options._M_max_threads must be larger than --- 608,620 ---- { #ifdef __GTHREADS // If we have thread support and it's active we check the thread ! // key value and return its id or if it's not set we take the // first record from _S_thread_freelist and sets the key and // returns it's id. if (__gthread_active_p()) { ! _Thread_record* __freelist_pos = ! static_cast<_Thread_record*>(__gthread_getspecific(_S_thread_key)); if (__freelist_pos == NULL) { // Since _S_options._M_max_threads must be larger than *************** namespace __gnu_cxx *** 670,682 **** // list can never be empty. __gthread_mutex_lock(&_S_thread_freelist_mutex); __freelist_pos = _S_thread_freelist_first; ! _S_thread_freelist_first = _S_thread_freelist_first->next; __gthread_mutex_unlock(&_S_thread_freelist_mutex); __gthread_setspecific(_S_thread_key, static_cast(__freelist_pos)); } ! return __freelist_pos->id; } #endif // Otherwise (no thread support or inactive) all requests are --- 622,634 ---- // list can never be empty. __gthread_mutex_lock(&_S_thread_freelist_mutex); __freelist_pos = _S_thread_freelist_first; ! _S_thread_freelist_first = _S_thread_freelist_first->_M_next; __gthread_mutex_unlock(&_S_thread_freelist_mutex); __gthread_setspecific(_S_thread_key, static_cast(__freelist_pos)); } ! return __freelist_pos->_M_id; } #endif // Otherwise (no thread support or inactive) all requests are *************** namespace __gnu_cxx *** 692,699 **** { // Return this thread id record to front of thread_freelist. __gthread_mutex_lock(&_S_thread_freelist_mutex); ! thread_record* __tr = static_cast(__freelist_pos); ! __tr->next = _S_thread_freelist_first; _S_thread_freelist_first = __tr; __gthread_mutex_unlock(&_S_thread_freelist_mutex); } --- 644,651 ---- { // Return this thread id record to front of thread_freelist. __gthread_mutex_lock(&_S_thread_freelist_mutex); ! _Thread_record* __tr = static_cast<_Thread_record*>(__freelist_pos); ! __tr->_M_next = _S_thread_freelist_first; _S_thread_freelist_first = __tr; __gthread_mutex_unlock(&_S_thread_freelist_mutex); } *************** namespace __gnu_cxx *** 713,725 **** bool __mt_alloc<_Tp>::_S_init = false; template ! typename __mt_alloc<_Tp>::tune __mt_alloc<_Tp>::_S_options; template ! typename __mt_alloc<_Tp>::binmap_type* __mt_alloc<_Tp>::_S_binmap; template ! typename __mt_alloc<_Tp>::bin_record* volatile __mt_alloc<_Tp>::_S_bin; template size_t __mt_alloc<_Tp>::_S_bin_size = 1; --- 665,677 ---- bool __mt_alloc<_Tp>::_S_init = false; template ! typename __mt_alloc<_Tp>::_Tune __mt_alloc<_Tp>::_S_options; template ! typename __mt_alloc<_Tp>::_Binmap_type* __mt_alloc<_Tp>::_S_binmap; template ! typename __mt_alloc<_Tp>::_Bin_record* volatile __mt_alloc<_Tp>::_S_bin; template size_t __mt_alloc<_Tp>::_S_bin_size = 1; *************** namespace __gnu_cxx *** 730,736 **** __gthread_once_t __mt_alloc<_Tp>::_S_once = __GTHREAD_ONCE_INIT; template ! typename __mt_alloc<_Tp>::thread_record* volatile __mt_alloc<_Tp>::_S_thread_freelist_first = NULL; template --- 682,688 ---- __gthread_once_t __mt_alloc<_Tp>::_S_once = __GTHREAD_ONCE_INIT; template ! typename __mt_alloc<_Tp>::_Thread_record* volatile __mt_alloc<_Tp>::_S_thread_freelist_first = NULL; template diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/ext/pool_allocator.h gcc-3.4.1/libstdc++-v3/include/ext/pool_allocator.h *** gcc-3.4.0/libstdc++-v3/include/ext/pool_allocator.h 2004-03-18 17:37:06.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/ext/pool_allocator.h 2004-06-17 10:39:33.000000000 +0000 *************** namespace __gnu_cxx *** 59,67 **** /** * @if maint ! * Default node allocator. "SGI" style. Uses various allocators to ! * fulfill underlying requests (and makes as few requests as possible ! * when in default high-speed pool mode). * * Important implementation properties: * 0. If globally mandated, then allocate objects from new --- 59,66 ---- /** * @if maint ! * Uses various allocators to fulfill underlying requests (and makes as ! * few requests as possible when in default high-speed pool mode). * * Important implementation properties: * 0. If globally mandated, then allocate objects from new *************** namespace __gnu_cxx *** 72,246 **** * information that we can return the object to the proper free list * without permanently losing part of the object. * ! * The first template parameter specifies whether more than one thread may ! * use this allocator. It is safe to allocate an object from one instance ! * of a default_alloc and deallocate it with another one. This effectively * transfers its ownership to the second one. This may have undesirable * effects on reference locality. * - * The second parameter is unused and serves only to allow the - * creation of multiple default_alloc instances. Note that - * containers built on different allocator instances have different - * types, limiting the utility of this approach. If you do not - * wish to share the free lists with the main default_alloc - * instance, instantiate this with a non-zero __inst. - * * @endif * (See @link Allocators allocators info @endlink for more.) */ ! template ! class __pool_alloc { ! private: ! enum {_S_align = 8}; ! enum {_S_max_bytes = 128}; ! enum {_S_freelists = _S_max_bytes / _S_align}; ! union _Obj { ! union _Obj* _M_free_list_link; ! char _M_client_data[1]; // The client sees this. }; ! static _Obj* volatile _S_free_list[_S_freelists]; ! // Chunk allocation state. static char* _S_start_free; static char* _S_end_free; static size_t _S_heap_size; ! static _STL_mutex_lock _S_lock; static _Atomic_word _S_force_new; ! static size_t _S_round_up(size_t __bytes) { return ((__bytes + (size_t)_S_align - 1) & ~((size_t)_S_align - 1)); } ! static size_t _S_freelist_index(size_t __bytes) ! { return ((__bytes + (size_t)_S_align - 1)/(size_t)_S_align - 1); } ! // Returns an object of size __n, and optionally adds to size __n // free list. static void* _S_refill(size_t __n); ! // Allocates a chunk for nobjs of size size. nobjs may be reduced // if it is inconvenient to allocate the requested number. static char* _S_chunk_alloc(size_t __n, int& __nobjs); ! // It would be nice to use _STL_auto_lock here. But we need a // test whether threads are in use. struct _Lock { ! _Lock() { if (__threads) _S_lock._M_acquire_lock(); } ! ~_Lock() { if (__threads) _S_lock._M_release_lock(); } } __attribute__ ((__unused__)); friend struct _Lock; public: ! // __n must be > 0 ! static void* ! allocate(size_t __n); ! // __p may not be 0 ! static void ! deallocate(void* __p, size_t __n); }; ! template inline bool ! operator==(const __pool_alloc<__threads,__inst>&, ! const __pool_alloc<__threads,__inst>&) { return true; } ! template inline bool ! operator!=(const __pool_alloc<__threads,__inst>&, ! const __pool_alloc<__threads,__inst>&) { return false; } - // Allocate memory in large chunks in order to avoid fragmenting the // heap too much. Assume that __n is properly aligned. We hold // the allocation lock. ! template char* ! __pool_alloc<__threads, __inst>::_S_chunk_alloc(size_t __n, int& __nobjs) { char* __result; size_t __total_bytes = __n * __nobjs; size_t __bytes_left = _S_end_free - _S_start_free; ! if (__bytes_left >= __total_bytes) ! { ! __result = _S_start_free; ! _S_start_free += __total_bytes; ! return __result ; ! } else if (__bytes_left >= __n) ! { ! __nobjs = (int)(__bytes_left/__n); ! __total_bytes = __n * __nobjs; ! __result = _S_start_free; ! _S_start_free += __total_bytes; ! return __result; ! } else ! { ! size_t __bytes_to_get = ! 2 * __total_bytes + _S_round_up(_S_heap_size >> 4); ! // Try to make use of the left-over piece. ! if (__bytes_left > 0) ! { ! _Obj* volatile* __free_list = ! _S_free_list + _S_freelist_index(__bytes_left); ! ! ((_Obj*)(void*)_S_start_free)->_M_free_list_link = *__free_list; ! *__free_list = (_Obj*)(void*)_S_start_free; ! } ! _S_start_free = static_cast(::operator new(__bytes_to_get)); ! if (_S_start_free == 0) ! { ! size_t __i; ! _Obj* volatile* __free_list; ! _Obj* __p; ! // Try to make do with what we have. That can't hurt. We ! // do not try smaller requests, since that tends to result ! // in disaster on multi-process machines. ! __i = __n; ! for (; __i <= (size_t) _S_max_bytes; __i += (size_t) _S_align) ! { ! __free_list = _S_free_list + _S_freelist_index(__i); ! __p = *__free_list; ! if (__p != 0) ! { ! *__free_list = __p -> _M_free_list_link; ! _S_start_free = (char*)__p; ! _S_end_free = _S_start_free + __i; ! return _S_chunk_alloc(__n, __nobjs); ! // Any leftover piece will eventually make it to the ! // right free list. ! } ! } ! _S_end_free = 0; // In case of exception. ! _S_start_free = static_cast(::operator new(__bytes_to_get)); ! // This should either throw an exception or remedy the situation. ! // Thus we assume it succeeded. ! } ! _S_heap_size += __bytes_to_get; ! _S_end_free = _S_start_free + __bytes_to_get; ! return _S_chunk_alloc(__n, __nobjs); ! } } ! // Returns an object of size __n, and optionally adds to "size // __n"'s free list. We assume that __n is properly aligned. We // hold the allocation lock. ! template void* ! __pool_alloc<__threads, __inst>::_S_refill(size_t __n) { int __nobjs = 20; char* __chunk = _S_chunk_alloc(__n, __nobjs); --- 71,279 ---- * information that we can return the object to the proper free list * without permanently losing part of the object. * ! * The template parameter specifies whether more than one thread may use ! * this allocator. It is safe to allocate an object from one instance ! * of the allocator and deallocate it with another one. This effectively * transfers its ownership to the second one. This may have undesirable * effects on reference locality. * * @endif * (See @link Allocators allocators info @endlink for more.) */ ! template ! struct __pool_base { ! enum { _S_align = 8 }; ! enum { _S_max_bytes = 128 }; ! enum { _S_freelists = _S_max_bytes / _S_align }; ! union _Obj { ! union _Obj* _M_free_list_link; ! char _M_client_data[1]; // The client sees this. }; ! static _Obj* volatile _S_free_list[_S_freelists]; ! // Chunk allocation state. static char* _S_start_free; static char* _S_end_free; static size_t _S_heap_size; ! static _STL_mutex_lock _S_lock; static _Atomic_word _S_force_new; ! static size_t _S_round_up(size_t __bytes) { return ((__bytes + (size_t)_S_align - 1) & ~((size_t)_S_align - 1)); } ! static size_t _S_freelist_index(size_t __bytes) ! { return ((__bytes + (size_t)_S_align - 1) / (size_t)_S_align - 1); } ! // Returns an object of size __n, and optionally adds to size __n // free list. static void* _S_refill(size_t __n); ! // Allocates a chunk for nobjs of size size. nobjs may be reduced // if it is inconvenient to allocate the requested number. static char* _S_chunk_alloc(size_t __n, int& __nobjs); ! // It would be nice to use _STL_auto_lock here. But we need a // test whether threads are in use. struct _Lock { ! _Lock() { if (__threads) _S_lock._M_acquire_lock(); } ! ~_Lock() { if (__threads) _S_lock._M_release_lock(); } } __attribute__ ((__unused__)); friend struct _Lock; + }; + + typedef __pool_base __pool_alloc_base; + template + class __pool_alloc : private __pool_alloc_base + { public: ! typedef size_t size_type; ! typedef ptrdiff_t difference_type; ! typedef _Tp* pointer; ! typedef const _Tp* const_pointer; ! typedef _Tp& reference; ! typedef const _Tp& const_reference; ! typedef _Tp value_type; ! template ! struct rebind ! { typedef __pool_alloc<_Tp1> other; }; ! ! __pool_alloc() throw() { } ! ! __pool_alloc(const __pool_alloc&) throw() { } ! ! template ! __pool_alloc(const __pool_alloc<_Tp1>&) throw() { } ! ! ~__pool_alloc() throw() { } ! ! pointer ! address(reference __x) const { return &__x; } ! ! const_pointer ! address(const_reference __x) const { return &__x; } ! ! size_type ! max_size() const throw() ! { return size_t(-1) / sizeof(_Tp); } ! ! // _GLIBCXX_RESOLVE_LIB_DEFECTS ! // 402. wrong new expression in [some_] allocator::construct ! void ! construct(pointer __p, const _Tp& __val) ! { ::new(__p) _Tp(__val); } ! ! void ! destroy(pointer __p) { __p->~_Tp(); } ! ! pointer ! allocate(size_type __n, const void* = 0); ! ! void ! deallocate(pointer __p, size_type __n); }; ! template inline bool ! operator==(const __pool_alloc<_Tp>&, const __pool_alloc<_Tp>&) { return true; } ! template inline bool ! operator!=(const __pool_alloc<_Tp>&, const __pool_alloc<_Tp>&) { return false; } // Allocate memory in large chunks in order to avoid fragmenting the // heap too much. Assume that __n is properly aligned. We hold // the allocation lock. ! template char* ! __pool_base<__threads>::_S_chunk_alloc(size_t __n, int& __nobjs) { char* __result; size_t __total_bytes = __n * __nobjs; size_t __bytes_left = _S_end_free - _S_start_free; ! if (__bytes_left >= __total_bytes) ! { ! __result = _S_start_free; ! _S_start_free += __total_bytes; ! return __result ; ! } else if (__bytes_left >= __n) ! { ! __nobjs = (int)(__bytes_left / __n); ! __total_bytes = __n * __nobjs; ! __result = _S_start_free; ! _S_start_free += __total_bytes; ! return __result; ! } else ! { ! size_t __bytes_to_get = (2 * __total_bytes ! + _S_round_up(_S_heap_size >> 4)); ! // Try to make use of the left-over piece. ! if (__bytes_left > 0) ! { ! _Obj* volatile* __free_list = (_S_free_list ! + _S_freelist_index(__bytes_left)); ! ! ((_Obj*)(void*)_S_start_free)->_M_free_list_link = *__free_list; ! *__free_list = (_Obj*)(void*)_S_start_free; ! } ! ! _S_start_free = static_cast(::operator new(__bytes_to_get)); ! if (_S_start_free == 0) ! { ! size_t __i; ! _Obj* volatile* __free_list; ! _Obj* __p; ! // Try to make do with what we have. That can't hurt. We ! // do not try smaller requests, since that tends to result ! // in disaster on multi-process machines. ! __i = __n; ! for (; __i <= (size_t) _S_max_bytes; __i += (size_t) _S_align) ! { ! __free_list = _S_free_list + _S_freelist_index(__i); ! __p = *__free_list; ! if (__p != 0) ! { ! *__free_list = __p -> _M_free_list_link; ! _S_start_free = (char*)__p; ! _S_end_free = _S_start_free + __i; ! return _S_chunk_alloc(__n, __nobjs); ! // Any leftover piece will eventually make it to the ! // right free list. ! } ! } ! _S_end_free = 0; // In case of exception. ! _S_start_free = static_cast(::operator new(__bytes_to_get)); ! // This should either throw an exception or remedy the situation. ! // Thus we assume it succeeded. ! } ! _S_heap_size += __bytes_to_get; ! _S_end_free = _S_start_free + __bytes_to_get; ! return _S_chunk_alloc(__n, __nobjs); ! } } ! // Returns an object of size __n, and optionally adds to "size // __n"'s free list. We assume that __n is properly aligned. We // hold the allocation lock. ! template void* ! __pool_base<__threads>::_S_refill(size_t __n) { int __nobjs = 20; char* __chunk = _S_chunk_alloc(__n, __nobjs); *************** namespace __gnu_cxx *** 249,266 **** _Obj* __current_obj; _Obj* __next_obj; int __i; ! if (1 == __nobjs) ! return __chunk; __free_list = _S_free_list + _S_freelist_index(__n); ! // Build free list in chunk. __result = (_Obj*)(void*)__chunk; *__free_list = __next_obj = (_Obj*)(void*)(__chunk + __n); for (__i = 1; ; __i++) ! { __current_obj = __next_obj; ! __next_obj = (_Obj*)(void*)((char*)__next_obj + __n); if (__nobjs - 1 == __i) { __current_obj -> _M_free_list_link = 0; --- 282,299 ---- _Obj* __current_obj; _Obj* __next_obj; int __i; ! if (1 == __nobjs) ! return __chunk; __free_list = _S_free_list + _S_freelist_index(__n); ! // Build free list in chunk. __result = (_Obj*)(void*)__chunk; *__free_list = __next_obj = (_Obj*)(void*)(__chunk + __n); for (__i = 1; ; __i++) ! { __current_obj = __next_obj; ! __next_obj = (_Obj*)(void*)((char*)__next_obj + __n); if (__nobjs - 1 == __i) { __current_obj -> _M_free_list_link = 0; *************** namespace __gnu_cxx *** 272,363 **** return __result; } ! template ! void* ! __pool_alloc<__threads, __inst>::allocate(size_t __n) { ! void* __ret = 0; ! ! // If there is a race through here, assume answer from getenv ! // will resolve in same direction. Inspired by techniques ! // to efficiently support threading found in basic_string.h. ! if (_S_force_new == 0) ! { ! if (getenv("GLIBCXX_FORCE_NEW")) ! __atomic_add(&_S_force_new, 1); ! else ! __atomic_add(&_S_force_new, -1); ! } ! ! if ((__n > (size_t) _S_max_bytes) || (_S_force_new > 0)) ! __ret = ::operator new(__n); ! else { ! _Obj* volatile* __free_list = _S_free_list + _S_freelist_index(__n); ! // Acquire the lock here with a constructor call. This ! // ensures that it is released in exit or during stack ! // unwinding. ! _Lock __lock_instance; ! _Obj* __restrict__ __result = *__free_list; ! if (__builtin_expect(__result == 0, 0)) ! __ret = _S_refill(_S_round_up(__n)); ! else { ! *__free_list = __result -> _M_free_list_link; ! __ret = __result; } ! if (__builtin_expect(__ret == 0, 0)) __throw_bad_alloc(); } return __ret; } ! template void ! __pool_alloc<__threads, __inst>::deallocate(void* __p, size_t __n) { ! if ((__n > (size_t) _S_max_bytes) || (_S_force_new > 0)) ! ::operator delete(__p); ! else { ! _Obj* volatile* __free_list = _S_free_list + _S_freelist_index(__n); ! _Obj* __q = (_Obj*)__p; ! // Acquire the lock here with a constructor call. This ! // ensures that it is released in exit or during stack ! // unwinding. ! _Lock __lock_instance; ! __q -> _M_free_list_link = *__free_list; ! *__free_list = __q; } } ! template ! typename __pool_alloc<__threads, __inst>::_Obj* volatile ! __pool_alloc<__threads, __inst>::_S_free_list[_S_freelists]; ! template ! char* __pool_alloc<__threads, __inst>::_S_start_free = 0; ! template ! char* __pool_alloc<__threads, __inst>::_S_end_free = 0; ! template ! size_t __pool_alloc<__threads, __inst>::_S_heap_size = 0; ! template _STL_mutex_lock ! __pool_alloc<__threads, __inst>::_S_lock __STL_MUTEX_INITIALIZER; ! ! template _Atomic_word ! __pool_alloc<__threads, __inst>::_S_force_new = 0; ! // Inhibit implicit instantiations for required instantiations, ! // which are defined via explicit instantiations elsewhere. ! // NB: This syntax is a GNU extension. ! #if _GLIBCXX_EXTERN_TEMPLATE ! extern template class __pool_alloc; ! #endif } // namespace __gnu_cxx #endif --- 305,404 ---- return __result; } ! template ! _Tp* ! __pool_alloc<_Tp>::allocate(size_type __n, const void*) { ! pointer __ret = 0; ! if (__n) { ! if (__n <= max_size()) { ! const size_t __bytes = __n * sizeof(_Tp); ! // If there is a race through here, assume answer from getenv ! // will resolve in same direction. Inspired by techniques ! // to efficiently support threading found in basic_string.h. ! if (_S_force_new == 0) ! { ! if (getenv("GLIBCXX_FORCE_NEW")) ! __atomic_add(&_S_force_new, 1); ! else ! __atomic_add(&_S_force_new, -1); ! } ! ! if ((__bytes > (size_t) _S_max_bytes) || (_S_force_new > 0)) ! __ret = static_cast<_Tp*>(::operator new(__bytes)); ! else ! { ! _Obj* volatile* __free_list = (_S_free_list ! + _S_freelist_index(__bytes)); ! // Acquire the lock here with a constructor call. This ! // ensures that it is released in exit or during stack ! // unwinding. ! _Lock __lock_instance; ! _Obj* __restrict__ __result = *__free_list; ! if (__builtin_expect(__result == 0, 0)) ! __ret = static_cast<_Tp*>(_S_refill(_S_round_up(__bytes))); ! else ! { ! *__free_list = __result->_M_free_list_link; ! __ret = reinterpret_cast<_Tp*>(__result); ! } ! if (__builtin_expect(__ret == 0, 0)) ! __throw_bad_alloc(); ! } } ! else __throw_bad_alloc(); } return __ret; } ! template void ! __pool_alloc<_Tp>::deallocate(pointer __p, size_type __n) { ! if (__n) { ! const size_t __bytes = __n * sizeof(_Tp); ! if ((__bytes > (size_t) _S_max_bytes) || (_S_force_new > 0)) ! ::operator delete(__p); ! else ! { ! _Obj* volatile* __free_list = (_S_free_list ! + _S_freelist_index(__bytes)); ! _Obj* __q = (_Obj*)__p; ! // Acquire the lock here with a constructor call. This ! // ensures that it is released in exit or during stack ! // unwinding. ! _Lock __lock_instance; ! __q -> _M_free_list_link = *__free_list; ! *__free_list = __q; ! } } } ! template ! typename __pool_base<__threads>::_Obj* volatile ! __pool_base<__threads>::_S_free_list[_S_freelists]; ! template ! char* __pool_base<__threads>::_S_start_free = 0; ! template ! char* __pool_base<__threads>::_S_end_free = 0; ! template ! size_t __pool_base<__threads>::_S_heap_size = 0; ! template _STL_mutex_lock ! __pool_base<__threads>::_S_lock __STL_MUTEX_INITIALIZER; ! template ! _Atomic_word ! __pool_base<__threads>::_S_force_new = 0; } // namespace __gnu_cxx #endif diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/ext/rope gcc-3.4.1/libstdc++-v3/include/ext/rope *** gcc-3.4.0/libstdc++-v3/include/ext/rope 2004-01-13 11:46:50.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/ext/rope 2004-06-18 10:28:08.000000000 +0000 *************** class sequence_buffer : public iterator< *** 215,221 **** } sequence_buffer& operator*() { return *this; } sequence_buffer& operator++() { return *this; } ! sequence_buffer& operator++(int) { return *this; } }; // The following should be treated as private, at least for now. --- 215,221 ---- } sequence_buffer& operator*() { return *this; } sequence_buffer& operator++() { return *this; } ! sequence_buffer operator++(int) { return *this; } }; // The following should be treated as private, at least for now. *************** 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; *************** identity_element(_Rope_Concat_fn<_CharT, *** 359,365 **** // Constructor __gthread_mutex_t _M_ref_count_lock; ! _Refcount_Base(_RC_t __n) : _M_ref_count(__n) { #ifdef __GTHREAD_MUTEX_INIT __gthread_mutex_t __tmp = __GTHREAD_MUTEX_INIT; --- 359,365 ---- // Constructor __gthread_mutex_t _M_ref_count_lock; ! _Refcount_Base(_RC_t __n) : _M_ref_count(__n), _M_ref_count_lock() { #ifdef __GTHREAD_MUTEX_INIT __gthread_mutex_t __tmp = __GTHREAD_MUTEX_INIT; *************** 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_RopeRep : public _Rope_rep_ *** 544,550 **** --- 547,557 ---- static void _S_ref(_Rope_RopeRep*) {} static void _S_free_if_unref(_Rope_RopeRep*) {} # endif + protected: + _Rope_RopeRep& + operator=(const _Rope_RopeRep&); + _Rope_RopeRep(const _Rope_RopeRep&); }; template *************** 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. --- 586,592 ---- 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_RopeLeaf : public _Rope_Rop *** 592,604 **** // the proper allocator and the properly padded size. // In contrast, the destructor deallocates the data: # ifndef __GC ! ~_Rope_RopeLeaf() { if (_M_data != this->_M_c_string) { this->_M_free_c_string(); } __STL_FREE_STRING(_M_data, this->_M_size, this->get_allocator()); } # endif }; template --- 597,614 ---- // the proper allocator and the properly padded size. // In contrast, the destructor deallocates the data: # ifndef __GC ! ~_Rope_RopeLeaf() throw() { if (_M_data != this->_M_c_string) { this->_M_free_c_string(); } __STL_FREE_STRING(_M_data, this->_M_size, this->get_allocator()); } # endif + protected: + _Rope_RopeLeaf& + operator=(const _Rope_RopeLeaf&); + + _Rope_RopeLeaf(const _Rope_RopeLeaf&); }; template *************** struct _Rope_RopeConcatenation : public *** 612,630 **** _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), _M_left(__l), _M_right(__r) {} # ifndef __GC ! ~_Rope_RopeConcatenation() { this->_M_free_c_string(); _M_left->_M_unref_nonnil(); _M_right->_M_unref_nonnil(); } # endif }; template --- 622,645 ---- _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), _M_left(__l), _M_right(__r) {} # ifndef __GC ! ~_Rope_RopeConcatenation() throw() { this->_M_free_c_string(); _M_left->_M_unref_nonnil(); _M_right->_M_unref_nonnil(); } # endif + protected: + _Rope_RopeConcatenation& + operator=(const _Rope_RopeConcatenation&); + + _Rope_RopeConcatenation(const _Rope_RopeConcatenation&); }; template *************** 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 --- 665,671 ---- 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_RopeFunction : public _Rope *** 665,677 **** # endif } # ifndef __GC ! ~_Rope_RopeFunction() { this->_M_free_c_string(); if (_M_delete_when_done) { delete _M_fn; } } # endif }; // Substring results are usually represented using just // concatenation nodes. But in the case of very long flat ropes --- 680,697 ---- # endif } # ifndef __GC ! ~_Rope_RopeFunction() throw() { this->_M_free_c_string(); if (_M_delete_when_done) { delete _M_fn; } } # endif + protected: + _Rope_RopeFunction& + operator=(const _Rope_RopeFunction&); + + _Rope_RopeFunction(const _Rope_RopeFunction&); }; // Substring results are usually represented using just // concatenation nodes. But in the case of very long flat ropes *************** 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; --- 710,724 ---- 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,730 **** # ifndef __GC _M_base->_M_ref_nonnil(); # endif ! this->_M_tag = _Rope_RopeFunction<_CharT,_Alloc>::_S_substringfn; } ! virtual ~_Rope_RopeSubstring() { # ifndef __GC _M_base->_M_unref_nonnil(); --- 742,750 ---- # ifndef __GC _M_base->_M_ref_nonnil(); # endif ! this->_M_tag = _Rope_constants::_S_substringfn; } ! virtual ~_Rope_RopeSubstring() throw() { # ifndef __GC _M_base->_M_unref_nonnil(); *************** class _Rope_char_ref_proxy { *** 786,798 **** _My_rope* _M_root; // The whole rope. public: _Rope_char_ref_proxy(_My_rope* __r, size_t __p) ! : _M_pos(__p), _M_current_valid(false), _M_root(__r) {} _Rope_char_ref_proxy(const _Rope_char_ref_proxy& __x) ! : _M_pos(__x._M_pos), _M_current_valid(false), _M_root(__x._M_root) {} ! // Don't preserve cache if the reference can outlive the ! // expression. We claim that's not possible without calling ! // a copy constructor or generating reference to a proxy ! // reference. We declare the latter to have undefined semantics. _Rope_char_ref_proxy(_My_rope* __r, size_t __p, _CharT __c) : _M_pos(__p), _M_current(__c), _M_current_valid(true), _M_root(__r) {} inline operator _CharT () const; --- 806,821 ---- _My_rope* _M_root; // The whole rope. public: _Rope_char_ref_proxy(_My_rope* __r, size_t __p) ! : _M_pos(__p), _M_current(), _M_current_valid(false), _M_root(__r) {} ! _Rope_char_ref_proxy(const _Rope_char_ref_proxy& __x) ! : _M_pos(__x._M_pos), _M_current(__x._M_current), _M_current_valid(false), ! _M_root(__x._M_root) {} ! ! // Don't preserve cache if the reference can outlive the ! // expression. We claim that's not possible without calling ! // a copy constructor or generating reference to a proxy ! // reference. We declare the latter to have undefined semantics. _Rope_char_ref_proxy(_My_rope* __r, size_t __p, _CharT __c) : _M_pos(__p), _M_current(__c), _M_current_valid(true), _M_root(__r) {} inline operator _CharT () const; *************** struct _Rope_base *** 1193,1198 **** --- 1216,1227 ---- { __name##Alloc().deallocate(__p, __n); } __ROPE_DEFINE_ALLOCS(_Alloc) # undef __ROPE_DEFINE_ALLOC + + protected: + _Rope_base& + operator=(const _Rope_base&); + + _Rope_base(const _Rope_base&); }; *************** 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]); } --- 1455,1461 ---- _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 { --- 1540,1546 ---- rope(_CharT __c, const allocator_type& __a = allocator_type()) : _Base(__a) { ! _CharT* __buf = this->_Data_allocate(_S_rounded_up_size(1)); std::_Construct(__buf, __c); try { *************** class rope : public _Rope_base<_CharT,_A *** 1545,1554 **** _S_ref(this->_M_tree_ptr); } ! ~rope() ! { ! _S_unref(this->_M_tree_ptr); ! } rope& operator=(const rope& __x) { --- 1574,1581 ---- _S_ref(this->_M_tree_ptr); } ! ~rope() throw() ! { _S_unref(this->_M_tree_ptr); } rope& operator=(const rope& __x) { *************** class rope : public _Rope_base<_CharT,_A *** 1556,1562 **** this->_M_tree_ptr = __x._M_tree_ptr; _S_ref(this->_M_tree_ptr); _S_unref(__old); ! return(*this); } void clear() --- 1583,1589 ---- this->_M_tree_ptr = __x._M_tree_ptr; _S_ref(this->_M_tree_ptr); _S_unref(__old); ! return *this; } void clear() *************** 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 --- 1691,1697 ---- // 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. --- 1738,1744 ---- } 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. diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/ext/ropeimpl.h gcc-3.4.1/libstdc++-v3/include/ext/ropeimpl.h *** gcc-3.4.0/libstdc++-v3/include/ext/ropeimpl.h 2004-03-19 16:37:19.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/ext/ropeimpl.h 2004-06-18 10:28:08.000000000 +0000 *************** void _Rope_iterator_base<_CharT,_Alloc>: *** 75,88 **** size_t __pos = __x._M_current_pos; switch(__leaf->_M_tag) { ! case _RopeRep::_S_leaf: __x._M_buf_start = ((_Rope_RopeLeaf<_CharT,_Alloc>*)__leaf)->_M_data; __x._M_buf_ptr = __x._M_buf_start + (__pos - __leaf_pos); __x._M_buf_end = __x._M_buf_start + __leaf->_M_size; break; ! case _RopeRep::_S_function: ! case _RopeRep::_S_substringfn: { size_t __len = _S_iterator_buf_len; size_t __buf_start_pos = __leaf_pos; --- 75,88 ---- size_t __pos = __x._M_current_pos; switch(__leaf->_M_tag) { ! case _Rope_constants::_S_leaf: __x._M_buf_start = ((_Rope_RopeLeaf<_CharT,_Alloc>*)__leaf)->_M_data; __x._M_buf_ptr = __x._M_buf_start + (__pos - __leaf_pos); __x._M_buf_end = __x._M_buf_start + __leaf->_M_size; break; ! case _Rope_constants::_S_function: ! case _Rope_constants::_S_substringfn: { size_t __len = _S_iterator_buf_len; size_t __buf_start_pos = __leaf_pos; *************** 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; *************** void _Rope_iterator_base<_CharT,_Alloc>: *** 142,153 **** ++__curr_depth; __path[__curr_depth] = __curr_rope; switch(__curr_rope->_M_tag) { ! case _RopeRep::_S_leaf: ! case _RopeRep::_S_function: ! case _RopeRep::_S_substringfn: __x._M_leaf_pos = __curr_start_pos; goto done; ! case _RopeRep::_S_concat: { _Rope_RopeConcatenation<_CharT,_Alloc>* __c = (_Rope_RopeConcatenation<_CharT,_Alloc>*)__curr_rope; --- 142,153 ---- ++__curr_depth; __path[__curr_depth] = __curr_rope; switch(__curr_rope->_M_tag) { ! case _Rope_constants::_S_leaf: ! case _Rope_constants::_S_function: ! case _Rope_constants::_S_substringfn: __x._M_leaf_pos = __curr_start_pos; goto done; ! case _Rope_constants::_S_concat: { _Rope_RopeConcatenation<_CharT,_Alloc>* __c = (_Rope_RopeConcatenation<_CharT,_Alloc>*)__curr_rope; *************** void _Rope_iterator_base<_CharT,_Alloc>: *** 225,231 **** __current_node = __c->_M_right; __x._M_path_end[++__current_index] = __current_node; __dirns |= 1; ! while (_RopeRep::_S_concat == __current_node->_M_tag) { ++__current_index; if (_S_path_cache_len == __current_index) { int __i; --- 225,231 ---- __current_node = __c->_M_right; __x._M_path_end[++__current_index] = __current_node; __dirns |= 1; ! while (_Rope_constants::_S_concat == __current_node->_M_tag) { ++__current_index; if (_S_path_cache_len == __current_index) { int __i; *************** inline void _Rope_RopeRep<_CharT,_Alloc> *** 322,328 **** if (0 != __cstr) { size_t __size = this->_M_size + 1; _Destroy(__cstr, __cstr + __size); ! _Data_deallocate(__cstr, __size); } } --- 322,328 ---- if (0 != __cstr) { size_t __size = this->_M_size + 1; _Destroy(__cstr, __cstr + __size); ! this->_Data_deallocate(__cstr, __size); } } *************** 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*) ! _Data_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 *** 679,685 **** __adj_endp1 = __endp1; } switch(__base->_M_tag) { ! case _RopeRep::_S_concat: { _RopeConcatenation* __c = (_RopeConcatenation*)__base; _RopeRep* __left = __c->_M_left; --- 679,685 ---- __adj_endp1 = __endp1; } switch(__base->_M_tag) { ! case _Rope_constants::_S_concat: { _RopeConcatenation* __c = (_RopeConcatenation*)__base; _RopeRep* __left = __c->_M_left; *************** rope<_CharT,_Alloc>::_S_substring(_RopeR *** 700,706 **** __result = _S_concat(__left_result, __right_result); return __result; } ! case _RopeRep::_S_leaf: { _RopeLeaf* __l = (_RopeLeaf*)__base; _RopeLeaf* __result; --- 700,706 ---- __result = _S_concat(__left_result, __right_result); return __result; } ! case _Rope_constants::_S_leaf: { _RopeLeaf* __l = (_RopeLeaf*)__base; _RopeLeaf* __result; *************** rope<_CharT,_Alloc>::_S_substring(_RopeR *** 721,727 **** # endif return __result; } ! case _RopeRep::_S_substringfn: // Avoid introducing multiple layers of substring nodes. { _RopeSubstring* __old = (_RopeSubstring*)__base; --- 721,727 ---- # endif return __result; } ! case _Rope_constants::_S_substringfn: // Avoid introducing multiple layers of substring nodes. { _RopeSubstring* __old = (_RopeSubstring*)__base; *************** rope<_CharT,_Alloc>::_S_substring(_RopeR *** 738,744 **** } // *** else fall through: *** } ! case _RopeRep::_S_function: { _RopeFunction* __f = (_RopeFunction*)__base; _CharT* __section; --- 738,744 ---- } // *** else fall through: *** } ! case _Rope_constants::_S_function: { _RopeFunction* __f = (_RopeFunction*)__base; _CharT* __section; *************** 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*) ! _Data_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* _ *** 1010,1016 **** if (0 == __r) { printf("NULL\n"); return; } ! if (_RopeRep::_S_concat == __r->_M_tag) { _RopeConcatenation* __c = (_RopeConcatenation*)__r; _RopeRep* __left = __c->_M_left; _RopeRep* __right = __c->_M_right; --- 1010,1016 ---- if (0 == __r) { printf("NULL\n"); return; } ! if (_Rope_constants::_S_concat == __r->_M_tag) { _RopeConcatenation* __c = (_RopeConcatenation*)__r; _RopeRep* __left = __c->_M_left; _RopeRep* __right = __c->_M_right; *************** rope<_CharT,_Alloc>::_S_dump(_RopeRep* _ *** 1031,1043 **** char* __kind; switch (__r->_M_tag) { ! case _RopeRep::_S_leaf: __kind = "Leaf"; break; ! case _RopeRep::_S_function: __kind = "Function"; break; ! case _RopeRep::_S_substringfn: __kind = "Function representing substring"; break; default: --- 1031,1043 ---- char* __kind; switch (__r->_M_tag) { ! case _Rope_constants::_S_leaf: __kind = "Leaf"; break; ! case _Rope_constants::_S_function: __kind = "Function"; break; ! case _Rope_constants::_S_substringfn: __kind = "Function representing substring"; break; default: *************** 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,1248 **** _CharT* rope<_CharT,_Alloc>::_S_fetch_ptr(_RopeRep* __r, size_type __i) { ! _RopeRep* __clrstack[_RopeRep::_S_max_rope_depth]; size_t __csptr = 0; for(;;) { if (__r->_M_ref_count > 1) return 0; switch(__r->_M_tag) { ! case _RopeRep::_S_concat: { _RopeConcatenation* __c = (_RopeConcatenation*)__r; _RopeRep* __left = __c->_M_left; --- 1235,1247 ---- _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(;;) { if (__r->_M_ref_count > 1) return 0; switch(__r->_M_tag) { ! case _Rope_constants::_S_concat: { _RopeConcatenation* __c = (_RopeConcatenation*)__r; _RopeRep* __left = __c->_M_left; *************** rope<_CharT,_Alloc>::_S_fetch_ptr(_RopeR *** 1257,1263 **** } } break; ! case _RopeRep::_S_leaf: { _RopeLeaf* __l = (_RopeLeaf*)__r; if (__l->_M_c_string != __l->_M_data && __l->_M_c_string != 0) --- 1256,1262 ---- } } break; ! case _Rope_constants::_S_leaf: { _RopeLeaf* __l = (_RopeLeaf*)__r; if (__l->_M_c_string != __l->_M_data && __l->_M_c_string != 0) *************** rope<_CharT,_Alloc>::_S_fetch_ptr(_RopeR *** 1270,1277 **** } return __l->_M_data + __i; } ! case _RopeRep::_S_function: ! case _RopeRep::_S_substringfn: return 0; } } --- 1269,1276 ---- } return __l->_M_data + __i; } ! case _Rope_constants::_S_function: ! case _Rope_constants::_S_substringfn: return 0; } } *************** rope<_CharT,_Alloc>::_S_compare (const _ *** 1294,1300 **** if (0 == __left) return -1; __left_len = __left->_M_size; __right_len = __right->_M_size; ! if (_RopeRep::_S_leaf == __left->_M_tag) { _RopeLeaf* __l = (_RopeLeaf*) __left; if (_RopeRep::_S_leaf == __right->_M_tag) { _RopeLeaf* __r = (_RopeLeaf*) __right; --- 1293,1299 ---- if (0 == __left) return -1; __left_len = __left->_M_size; __right_len = __right->_M_size; ! if (_Rope_constants::_S_leaf == __left->_M_tag) { _RopeLeaf* __l = (_RopeLeaf*) __left; if (_RopeRep::_S_leaf == __right->_M_tag) { _RopeLeaf* __r = (_RopeLeaf*) __right; *************** rope<_CharT,_Alloc>::_S_compare (const _ *** 1311,1317 **** } else { const_iterator __lstart(__left, 0); const_iterator __lend(__left, __left_len); ! if (_RopeRep::_S_leaf == __right->_M_tag) { _RopeLeaf* __r = (_RopeLeaf*) __right; return lexicographical_compare_3way( __lstart, __lend, --- 1310,1316 ---- } else { const_iterator __lstart(__left, 0); const_iterator __lend(__left, __left_len); ! if (_Rope_constants::_S_leaf == __right->_M_tag) { _RopeLeaf* __r = (_RopeLeaf*) __right; return lexicographical_compare_3way( __lstart, __lend, *************** 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 = this->_Data_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 = ! this->_Data_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>::repla *** 1470,1481 **** return _S_empty_c_str; } __GC_CONST _CharT* __old_c_string = this->_M_tree_ptr->_M_c_string; ! if (_RopeRep::_S_leaf == this->_M_tree_ptr->_M_tag && 0 != __old_c_string) { 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(); --- 1469,1480 ---- return _S_empty_c_str; } __GC_CONST _CharT* __old_c_string = this->_M_tree_ptr->_M_c_string; ! if (_Rope_constants::_S_leaf == this->_M_tree_ptr->_M_tag && 0 != __old_c_string) { return(__old_c_string); } size_t __s = size(); ! _CharT* __result = this->_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(); diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/ext/stdio_filebuf.h gcc-3.4.1/libstdc++-v3/include/ext/stdio_filebuf.h *** gcc-3.4.0/libstdc++-v3/include/ext/stdio_filebuf.h 2003-12-09 04:31:53.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/ext/stdio_filebuf.h 2004-05-31 21:18:55.000000000 +0000 *************** *** 1,6 **** // File descriptor layer for filebuf -*- C++ -*- ! // Copyright (C) 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 ---- // File descriptor layer for filebuf -*- C++ -*- ! // Copyright (C) 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 __gnu_cxx *** 63,74 **** public: /** * @param fd An open file descriptor. * @param mode Same meaning as in a standard filebuf. * @param size Optimal or preferred size of internal buffer, in chars. * * This constructor associates a file stream buffer with an open ! * POSIX file descriptor. */ stdio_filebuf(int __fd, std::ios_base::openmode __mode, size_t __size = static_cast(BUFSIZ)); --- 63,80 ---- public: /** + * deferred initialization + */ + stdio_filebuf() : std::basic_filebuf<_CharT, _Traits>() {} + + /** * @param fd An open file descriptor. * @param mode Same meaning as in a standard filebuf. * @param size Optimal or preferred size of internal buffer, in chars. * * This constructor associates a file stream buffer with an open ! * POSIX file descriptor. The file descriptor will be automatically ! * closed when the stdio_filebuf is closed/destroyed. */ stdio_filebuf(int __fd, std::ios_base::openmode __mode, size_t __size = static_cast(BUFSIZ)); *************** namespace __gnu_cxx *** 87,94 **** size_t __size = static_cast(BUFSIZ)); /** ! * Possibly closes the external data stream, in the case of the file ! * descriptor constructor and @c del @c == @c true. */ virtual ~stdio_filebuf(); --- 93,100 ---- size_t __size = static_cast(BUFSIZ)); /** ! * Closes the external data stream if the file descriptor constructor ! * was used. */ virtual ~stdio_filebuf(); *************** namespace __gnu_cxx *** 102,109 **** * descriptor, so be careful. */ int ! fd() ! { return this->_M_file.fd(); } }; template --- 108,124 ---- * descriptor, so be careful. */ int ! fd() { return this->_M_file.fd(); } ! ! /** ! * @return The underlying FILE*. ! * ! * This function can be used to access the underlying "C" file pointer. ! * Note that there is no way for the library to track what you do ! * with the file, so be careful. ! */ ! std::__c_file* ! file() { return this->_M_file.file(); } }; template diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/ext/stdio_sync_filebuf.h gcc-3.4.1/libstdc++-v3/include/ext/stdio_sync_filebuf.h *** gcc-3.4.0/libstdc++-v3/include/ext/stdio_sync_filebuf.h 2003-12-09 04:31:53.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/ext/stdio_sync_filebuf.h 2004-05-31 21:18:55.000000000 +0000 *************** *** 1,6 **** // Iostreams wrapper for stdio FILE* -*- C++ -*- ! // Copyright (C) 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 ---- // Iostreams wrapper for stdio FILE* -*- C++ -*- ! // Copyright (C) 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 *************** *** 38,53 **** #include #include - - #if defined(_GLIBCXX_HAVE_S_ISREG) || defined(_GLIBCXX_HAVE_S_IFREG) - # include - # ifdef _GLIBCXX_HAVE_S_ISREG - # define _GLIBCXX_ISREG(x) S_ISREG(x) - # else - # define _GLIBCXX_ISREG(x) (((x) & S_IFMT) == S_IFREG) - # endif - #endif - #include #ifdef _GLIBCXX_USE_WCHAR_T --- 38,43 ---- *************** namespace __gnu_cxx *** 81,88 **** : _M_file(__f), _M_unget_buf(traits_type::eof()) { } ! protected: int_type syncgetc(); --- 71,87 ---- : _M_file(__f), _M_unget_buf(traits_type::eof()) { } ! /** ! * @return The underlying FILE*. ! * ! * This function can be used to access the underlying "C" file pointer. ! * Note that there is no way for the library to track what you do ! * with the file, so be careful. ! */ ! std::__c_file* const ! file() { return this->_M_file; } + protected: int_type syncgetc(); *************** namespace __gnu_cxx *** 132,150 **** virtual std::streamsize xsgetn(char_type* __s, std::streamsize __n); - virtual std::streamsize - showmanyc() - { - #if defined(_GLIBCXX_HAVE_S_ISREG) || defined(_GLIBCXX_HAVE_S_IFREG) - // Regular files. - struct stat __buffer; - int __ret = fstat(fileno(_M_file), &__buffer); - if (!__ret && _GLIBCXX_ISREG(__buffer.st_mode)) - return __buffer.st_size - ftell(_M_file); - #endif - return 0; - } - virtual int_type overflow(int_type __c = traits_type::eof()) { --- 131,136 ---- diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/std/std_bitset.h gcc-3.4.1/libstdc++-v3/include/std/std_bitset.h *** gcc-3.4.0/libstdc++-v3/include/std/std_bitset.h 2004-04-16 19:08:34.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/std/std_bitset.h 2004-05-14 19:13:47.000000000 +0000 *************** *** 1,6 **** // -*- 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 ---- // -*- 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 _GLIBCXX_STD *** 290,296 **** ++__prev; // check out of bounds ! if ( __prev >= _Nw * _GLIBCXX_BITSET_BITS_PER_WORD ) return __not_found; // search first word --- 290,296 ---- ++__prev; // check out of bounds ! if (__prev >= _Nw * _GLIBCXX_BITSET_BITS_PER_WORD) return __not_found; // search first word *************** namespace _GLIBCXX_STD *** 298,304 **** _WordT __thisword = _M_w[__i]; // mask off bits below bound ! __thisword >>= __prev + 1; if (__thisword != static_cast<_WordT>(0)) return __i * _GLIBCXX_BITSET_BITS_PER_WORD --- 298,304 ---- _WordT __thisword = _M_w[__i]; // mask off bits below bound ! __thisword &= (~static_cast<_WordT>(0)) << _S_whichbit(__prev); if (__thisword != static_cast<_WordT>(0)) return __i * _GLIBCXX_BITSET_BITS_PER_WORD diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/std/std_sstream.h gcc-3.4.1/libstdc++-v3/include/std/std_sstream.h *** gcc-3.4.0/libstdc++-v3/include/std/std_sstream.h 2003-10-12 10:12:08.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/std/std_sstream.h 2004-05-24 20:49:53.000000000 +0000 *************** *** 1,6 **** // String based streams -*- C++ -*- ! // Copyright (C) 1997, 1998, 1999, 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,7 ---- // String based streams -*- C++ -*- ! // Copyright (C) 1997, 1998, 1999, 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 *** 110,116 **** */ explicit basic_stringbuf(ios_base::openmode __mode = ios_base::in | ios_base::out) ! : __streambuf_type(), _M_string() { _M_stringbuf_init(__mode); } /** --- 111,117 ---- */ explicit basic_stringbuf(ios_base::openmode __mode = ios_base::in | ios_base::out) ! : __streambuf_type(), _M_mode(), _M_string() { _M_stringbuf_init(__mode); } /** *************** namespace std *** 124,130 **** explicit basic_stringbuf(const __string_type& __str, ios_base::openmode __mode = ios_base::in | ios_base::out) ! : __streambuf_type(), _M_string(__str.data(), __str.size()) { _M_stringbuf_init(__mode); } // Get and set: --- 125,131 ---- explicit basic_stringbuf(const __string_type& __str, ios_base::openmode __mode = ios_base::in | ios_base::out) ! : __streambuf_type(), _M_mode(), _M_string(__str.data(), __str.size()) { _M_stringbuf_init(__mode); } // Get and set: diff -Nrc3pad gcc-3.4.0/libstdc++-v3/include/std/std_streambuf.h gcc-3.4.1/libstdc++-v3/include/std/std_streambuf.h *** gcc-3.4.0/libstdc++-v3/include/std/std_streambuf.h 2003-11-27 13:13:18.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/include/std/std_streambuf.h 2004-05-24 20:49:53.000000000 +0000 *************** *** 1,6 **** // Stream buffer classes -*- C++ -*- ! // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free --- 1,6 ---- // Stream buffer classes -*- C++ -*- ! // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free *************** namespace std *** 762,771 **** } #endif - // _GLIBCXX_RESOLVE_LIB_DEFECTS - // Side effect of DR 50. private: ! basic_streambuf(const __streambuf_type&) { }; __streambuf_type& operator=(const __streambuf_type&) { return *this; }; --- 762,776 ---- } #endif private: ! // _GLIBCXX_RESOLVE_LIB_DEFECTS ! // Side effect of DR 50. ! basic_streambuf(const __streambuf_type& __sb) ! : _M_in_beg(__sb._M_in_beg), _M_in_cur(__sb._M_in_cur), ! _M_in_end(__sb._M_in_end), _M_out_beg(__sb._M_out_beg), ! _M_out_cur(__sb._M_out_cur), _M_out_end(__sb._M_out_cur), ! _M_buf_locale(__sb._M_buf_locale) ! { } __streambuf_type& operator=(const __streambuf_type&) { return *this; }; diff -Nrc3pad gcc-3.4.0/libstdc++-v3/libsupc++/cxxabi.h gcc-3.4.1/libstdc++-v3/libsupc++/cxxabi.h *** gcc-3.4.0/libstdc++-v3/libsupc++/cxxabi.h 2003-10-03 00:36:45.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/libsupc++/cxxabi.h 2004-05-24 18:36:44.000000000 +0000 *************** *** 1,6 **** // new abi support -*- C++ -*- ! // Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc. // // This file is part of GCC. // --- 1,6 ---- // new abi support -*- C++ -*- ! // Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc. // // This file is part of GCC. // *************** *** 42,558 **** #ifndef _CXXABI_H #define _CXXABI_H 1 #ifdef __cplusplus ! // We use the compiler builtins __SIZE_TYPE__ and __PTRDIFF_TYPE__ instead of ! // std::size_t and std::ptrdiff_t respectively. This makes us independent of ! // the conformance level of and whether -fhonor-std was supplied. ! // is not currently available during compiler building anyway. ! // Including would be wrong, as that would rudely place size_t in ! // the global namespace. ! ! #include ! namespace __cxxabiv1 ! { ! /* type information for int, float etc */ ! class __fundamental_type_info ! : public std::type_info ! { ! public: ! virtual ~__fundamental_type_info (); ! public: ! explicit __fundamental_type_info (const char *__n) ! : std::type_info (__n) ! { } ! }; ! /* type information for array objects */ ! class __array_type_info ! : public std::type_info ! { ! /* abi defined member functions */ ! protected: ! virtual ~__array_type_info (); ! public: ! explicit __array_type_info (const char *__n) ! : std::type_info (__n) ! { } ! }; ! /* type information for functions (both member and non-member) */ ! class __function_type_info ! : public std::type_info ! { ! /* abi defined member functions */ ! public: ! virtual ~__function_type_info (); ! public: ! explicit __function_type_info (const char *__n) ! : std::type_info (__n) ! { } ! /* implementation defined member functions */ ! protected: ! virtual bool __is_function_p () const; ! }; ! /* type information for enumerations */ ! class __enum_type_info ! : public std::type_info ! { ! /* abi defined member functions */ ! public: ! virtual ~__enum_type_info (); ! public: ! explicit __enum_type_info (const char *__n) ! : std::type_info (__n) ! { } ! }; ! /* common type information for simple pointers and pointers to member */ ! class __pbase_type_info ! : public std::type_info ! { ! /* abi defined member variables */ ! public: ! unsigned int __flags; /* qualification of the target object */ ! const std::type_info *__pointee; /* type of pointed to object */ ! /* abi defined member functions */ ! public: ! virtual ~__pbase_type_info (); ! public: ! explicit __pbase_type_info (const char *__n, ! int __quals, ! const std::type_info *__type) ! : std::type_info (__n), __flags (__quals), __pointee (__type) ! { } ! /* implementation defined types */ ! public: ! enum __masks { ! __const_mask = 0x1, ! __volatile_mask = 0x2, ! __restrict_mask = 0x4, ! __incomplete_mask = 0x8, ! __incomplete_class_mask = 0x10 ! }; ! /* implementation defined member functions */ ! protected: ! virtual bool __do_catch (const std::type_info *__thr_type, ! void **__thr_obj, ! unsigned __outer) const; ! protected: ! inline virtual bool __pointer_catch (const __pbase_type_info *__thr_type, ! void **__thr_obj, ! unsigned __outer) const; ! }; ! /* type information for simple pointers */ ! class __pointer_type_info ! : public __pbase_type_info ! { ! /* abi defined member functions */ ! public: ! virtual ~__pointer_type_info (); ! public: ! explicit __pointer_type_info (const char *__n, ! int __quals, ! const std::type_info *__type) ! : __pbase_type_info (__n, __quals, __type) ! { } ! /* implementation defined member functions */ ! protected: ! virtual bool __is_pointer_p () const; ! protected: ! virtual bool __pointer_catch (const __pbase_type_info *__thr_type, ! void **__thr_obj, ! unsigned __outer) const; ! }; ! class __class_type_info; ! /* type information for a pointer to member variable */ ! class __pointer_to_member_type_info ! : public __pbase_type_info ! { ! /* abi defined member variables */ ! public: ! __class_type_info *__context; /* class of the member */ ! /* abi defined member functions */ ! public: ! virtual ~__pointer_to_member_type_info (); ! public: ! explicit __pointer_to_member_type_info (const char *__n, ! int __quals, ! const std::type_info *__type, ! __class_type_info *__klass) ! : __pbase_type_info (__n, __quals, __type), __context (__klass) ! { } ! /* implementation defined member functions */ ! protected: ! virtual bool __pointer_catch (const __pbase_type_info *__thr_type, ! void **__thr_obj, ! unsigned __outer) const; ! }; ! /* helper class for __vmi_class_type */ ! class __base_class_type_info { ! /* abi defined member variables */ ! public: ! const __class_type_info* __base_type; /* base class type */ ! long __offset_flags; /* offset and info */ ! /* implementation defined types */ ! public: ! enum __offset_flags_masks { ! __virtual_mask = 0x1, ! __public_mask = 0x2, ! __hwm_bit = 2, ! __offset_shift = 8 /* bits to shift offset by */ }; - - /* implementation defined member functions */ - public: - bool __is_virtual_p () const - { return __offset_flags & __virtual_mask; } - bool __is_public_p () const - { return __offset_flags & __public_mask; } - __PTRDIFF_TYPE__ __offset () const - { - // This shift, being of a signed type, is implementation defined. GCC - // implements such shifts as arithmetic, which is what we want. - return static_cast<__PTRDIFF_TYPE__> (__offset_flags) >> __offset_shift; - } - }; ! /* type information for a class */ ! class __class_type_info ! : public std::type_info ! { ! /* abi defined member functions */ ! public: ! virtual ~__class_type_info (); ! public: ! explicit __class_type_info (const char *__n) ! : type_info (__n) ! { } ! /* implementation defined types */ ! public: ! /* sub_kind tells us about how a base object is contained within a derived ! object. We often do this lazily, hence the UNKNOWN value. At other times ! we may use NOT_CONTAINED to mean not publicly contained. */ ! enum __sub_kind { ! __unknown = 0, /* we have no idea */ ! __not_contained, /* not contained within us (in some */ ! /* circumstances this might mean not contained */ ! /* publicly) */ ! __contained_ambig, /* contained ambiguously */ ! ! __contained_virtual_mask = __base_class_type_info::__virtual_mask, /* via a virtual path */ ! __contained_public_mask = __base_class_type_info::__public_mask, /* via a public path */ ! __contained_mask = 1 << __base_class_type_info::__hwm_bit, /* contained within us */ ! __contained_private = __contained_mask, ! __contained_public = __contained_mask | __contained_public_mask }; ! public: ! struct __upcast_result; ! struct __dyncast_result; - /* implementation defined member functions */ - protected: - virtual bool __do_upcast (const __class_type_info *__dst_type, void **__obj_ptr) const; ! protected: ! virtual bool __do_catch (const type_info *__thr_type, void **__thr_obj, ! unsigned __outer) const; ! public: ! /* Helper for upcast. See if DST is us, or one of our bases. */ ! /* Return false if not found, true if found. */ ! virtual bool __do_upcast (const __class_type_info *__dst, ! const void *__obj, ! __upcast_result &__restrict __result) const; ! public: ! /* Indicate whether SRC_PTR of type SRC_TYPE is contained publicly within ! OBJ_PTR. OBJ_PTR points to a base object of our type, which is the ! destination type. SRC2DST indicates how SRC objects might be contained ! within this type. If SRC_PTR is one of our SRC_TYPE bases, indicate the ! virtuality. Returns not_contained for non containment or private ! containment. */ ! inline __sub_kind __find_public_src (__PTRDIFF_TYPE__ __src2dst, ! const void *__obj_ptr, ! const __class_type_info *__src_type, ! const void *__src_ptr) const; ! public: ! /* dynamic cast helper. ACCESS_PATH gives the access from the most derived ! object to this base. DST_TYPE indicates the desired type we want. OBJ_PTR ! points to a base of our type within the complete object. SRC_TYPE ! indicates the static type started from and SRC_PTR points to that base ! within the most derived object. Fill in RESULT with what we find. Return ! true if we have located an ambiguous match. */ ! virtual bool __do_dyncast (__PTRDIFF_TYPE__ __src2dst, ! __sub_kind __access_path, ! const __class_type_info *__dst_type, ! const void *__obj_ptr, ! const __class_type_info *__src_type, ! const void *__src_ptr, ! __dyncast_result &__result) const; ! public: ! /* Helper for find_public_subobj. SRC2DST indicates how SRC_TYPE bases are ! inherited by the type started from -- which is not necessarily the ! current type. The current type will be a base of the destination type. ! OBJ_PTR points to the current base. */ ! virtual __sub_kind __do_find_public_src (__PTRDIFF_TYPE__ __src2dst, ! const void *__obj_ptr, ! const __class_type_info *__src_type, ! const void *__src_ptr) const; ! }; ! /* type information for a class with a single non-virtual base */ ! class __si_class_type_info ! : public __class_type_info ! { ! /* abi defined member variables */ ! public: ! const __class_type_info *__base_type; ! /* abi defined member functions */ ! public: ! virtual ~__si_class_type_info (); ! public: ! explicit __si_class_type_info (const char *__n, ! const __class_type_info *__base) ! : __class_type_info (__n), __base_type (__base) ! { } ! /* implementation defined member functions */ ! protected: ! virtual bool __do_dyncast (__PTRDIFF_TYPE__ __src2dst, ! __sub_kind __access_path, ! const __class_type_info *__dst_type, ! const void *__obj_ptr, ! const __class_type_info *__src_type, ! const void *__src_ptr, ! __dyncast_result &__result) const; ! virtual __sub_kind __do_find_public_src (__PTRDIFF_TYPE__ __src2dst, ! const void *__obj_ptr, ! const __class_type_info *__src_type, ! const void *__sub_ptr) const; ! virtual bool __do_upcast (const __class_type_info *__dst, ! const void *__obj, ! __upcast_result &__restrict __result) const; ! }; ! /* type information for a class with multiple and/or virtual bases */ ! class __vmi_class_type_info : public __class_type_info { ! /* abi defined member variables */ ! public: ! unsigned int __flags; /* details about the class hierarchy */ ! unsigned int __base_count; /* number of direct bases */ ! __base_class_type_info __base_info[1]; /* array of bases */ ! /* The array of bases uses the trailing array struct hack ! so this class is not constructable with a normal constructor. It is ! internally generated by the compiler. */ ! /* abi defined member functions */ ! public: ! virtual ~__vmi_class_type_info (); ! public: ! explicit __vmi_class_type_info (const char *__n, ! int ___flags) ! : __class_type_info (__n), __flags (___flags), __base_count (0) ! { } ! /* implementation defined types */ ! public: ! enum __flags_masks { ! __non_diamond_repeat_mask = 0x1, /* distinct instance of repeated base */ ! __diamond_shaped_mask = 0x2, /* diamond shaped multiple inheritance */ ! __flags_unknown_mask = 0x10 }; ! /* implementation defined member functions */ ! protected: ! virtual bool __do_dyncast (__PTRDIFF_TYPE__ __src2dst, ! __sub_kind __access_path, ! const __class_type_info *__dst_type, ! const void *__obj_ptr, ! const __class_type_info *__src_type, ! const void *__src_ptr, ! __dyncast_result &__result) const; ! virtual __sub_kind __do_find_public_src (__PTRDIFF_TYPE__ __src2dst, ! const void *__obj_ptr, ! const __class_type_info *__src_type, ! const void *__src_ptr) const; ! virtual bool __do_upcast (const __class_type_info *__dst, ! const void *__obj, ! __upcast_result &__restrict __result) const; ! }; ! /* dynamic cast runtime */ ! extern "C" ! void *__dynamic_cast (const void *__src_ptr, /* object started from */ ! const __class_type_info *__src_type, /* static type of object */ ! const __class_type_info *__dst_type, /* desired target type */ ! __PTRDIFF_TYPE__ __src2dst); /* how src and dst are related */ ! /* src2dst has the following possible values ! >= 0: src_type is a unique public non-virtual base of dst_type ! dst_ptr + src2dst == src_ptr ! -1: unspecified relationship ! -2: src_type is not a public base of dst_type ! -3: src_type is a multiple public non-virtual base of dst_type */ ! /* array ctor/dtor routines */ ! /* allocate and construct array */ ! extern "C" ! void *__cxa_vec_new (__SIZE_TYPE__ __element_count, ! __SIZE_TYPE__ __element_size, ! __SIZE_TYPE__ __padding_size, ! void (*__constructor) (void *), ! void (*__destructor) (void *)); ! extern "C" ! void *__cxa_vec_new2 (__SIZE_TYPE__ __element_count, ! __SIZE_TYPE__ __element_size, ! __SIZE_TYPE__ __padding_size, ! void (*__constructor) (void *), ! void (*__destructor) (void *), ! void *(*__alloc) (__SIZE_TYPE__), ! void (*__dealloc) (void *)); ! extern "C" ! void *__cxa_vec_new3 (__SIZE_TYPE__ __element_count, ! __SIZE_TYPE__ __element_size, ! __SIZE_TYPE__ __padding_size, ! void (*__constructor) (void *), ! void (*__destructor) (void *), ! void *(*__alloc) (__SIZE_TYPE__), ! void (*__dealloc) (void *, __SIZE_TYPE__)); ! /* construct array */ ! extern "C" ! void __cxa_vec_ctor (void *__array_address, ! __SIZE_TYPE__ __element_count, ! __SIZE_TYPE__ __element_size, ! void (*__constructor) (void *), ! void (*__destructor) (void *)); ! extern "C" ! void __cxa_vec_cctor (void *dest_array, ! void *src_array, ! __SIZE_TYPE__ element_count, ! __SIZE_TYPE__ element_size, ! void (*constructor) (void *, void *), ! void (*destructor) (void *)); ! ! /* destruct array */ ! extern "C" ! void __cxa_vec_dtor (void *__array_address, ! __SIZE_TYPE__ __element_count, ! __SIZE_TYPE__ __element_size, ! void (*__destructor) (void *)); ! /* destruct array */ ! extern "C" ! void __cxa_vec_cleanup (void *__array_address, ! __SIZE_TYPE__ __element_count, ! __SIZE_TYPE__ __element_size, ! void (*__destructor) (void *)); ! /* destruct and release array */ ! extern "C" ! void __cxa_vec_delete (void *__array_address, ! __SIZE_TYPE__ __element_size, ! __SIZE_TYPE__ __padding_size, ! void (*__destructor) (void *)); ! extern "C" ! void __cxa_vec_delete2 (void *__array_address, ! __SIZE_TYPE__ __element_size, ! __SIZE_TYPE__ __padding_size, ! void (*__destructor) (void *), ! void (*__dealloc) (void *)); ! ! extern "C" ! void __cxa_vec_delete3 (void *__array_address, ! __SIZE_TYPE__ __element_size, ! __SIZE_TYPE__ __padding_size, ! void (*__destructor) (void *), ! void (*__dealloc) (void *, __SIZE_TYPE__)); ! /* guard variables */ ! /* The ABI requires a 64-bit type. */ ! __extension__ typedef int __guard __attribute__((mode (__DI__))); ! extern "C" ! int __cxa_guard_acquire (__guard *); ! extern "C" ! void __cxa_guard_release (__guard *); ! extern "C" ! void __cxa_guard_abort (__guard *); ! /* pure virtual functions */ ! extern "C" void ! __cxa_pure_virtual (void); ! /* exception handling */ ! extern "C" void ! __cxa_bad_cast (); ! extern "C" void ! __cxa_bad_typeid (); ! /* DSO destruction */ ! extern "C" int ! __cxa_atexit (void (*)(void *), void *, void *); ! extern "C" int ! __cxa_finalize (void *); ! /* demangling routines */ ! extern "C" ! char *__cxa_demangle (const char *__mangled_name, ! char *__output_buffer, ! __SIZE_TYPE__ *__length, ! int *__status); ! // Returns the type_info for the currently handled exception [15.3/8], or ! // null if there is none. ! extern "C" ! std::type_info *__cxa_current_exception_type (); ! } /* namespace __cxxabiv1 */ - /* User programs should use the alias `abi'. */ - namespace abi = __cxxabiv1; ! #else ! #endif /* __cplusplus */ ! #endif /* __CXXABI_H */ --- 42,528 ---- #ifndef _CXXABI_H #define _CXXABI_H 1 + #include + #ifdef __cplusplus + namespace __cxxabiv1 + { + extern "C" + { + #endif ! // Allocate array. ! void* ! __cxa_vec_new(size_t __element_count, size_t __element_size, ! size_t __padding_size, void (*__constructor) (void*), ! void (*__destructor) (void*)); ! void* ! __cxa_vec_new2(size_t __element_count, size_t __element_size, ! size_t __padding_size, void (*__constructor) (void*), ! void (*__destructor) (void*), void *(*__alloc) (size_t), ! void (*__dealloc) (void*)); ! void* ! __cxa_vec_new3(size_t __element_count, size_t __element_size, ! size_t __padding_size, void (*__constructor) (void*), ! void (*__destructor) (void*), void *(*__alloc) (size_t), ! void (*__dealloc) (void*, size_t)); ! // Construct array. ! void ! __cxa_vec_ctor(void* __array_address, size_t __element_count, ! size_t __element_size, void (*__constructor) (void*), ! void (*__destructor) (void*)); ! void ! __cxa_vec_cctor(void* dest_array, void* src_array, size_t element_count, ! size_t element_size, void (*constructor) (void*, void*), ! void (*destructor) (void*)); ! ! // Destruct array. ! void ! __cxa_vec_dtor(void* __array_address, size_t __element_count, ! size_t __element_size, void (*__destructor) (void*)); ! void ! __cxa_vec_cleanup(void* __array_address, size_t __element_count, ! size_t __element_size, void (*__destructor) (void*)); ! ! // Destruct and release array. ! void ! __cxa_vec_delete(void* __array_address, size_t __element_size, ! size_t __padding_size, void (*__destructor) (void*)); ! void ! __cxa_vec_delete2(void* __array_address, size_t __element_size, ! size_t __padding_size, void (*__destructor) (void*), ! void (*__dealloc) (void*)); ! ! void ! __cxa_vec_delete3(void* __array_address, size_t __element_size, ! size_t __padding_size, void (*__destructor) (void*), ! void (*__dealloc) (void*, size_t)); ! // The ABI requires a 64-bit type. ! __extension__ typedef int __guard __attribute__((mode (__DI__))); ! int ! __cxa_guard_acquire(__guard*); ! void ! __cxa_guard_release(__guard*); ! void ! __cxa_guard_abort(__guard*); ! // Pure virtual functions. ! void ! __cxa_pure_virtual(void); ! // Exception handling. ! void ! __cxa_bad_cast(); ! void ! __cxa_bad_typeid(); ! // DSO destruction. ! int ! __cxa_atexit(void (*)(void*), void*, void*); ! int ! __cxa_finalize(void*); ! // Demangling routines. ! char* ! __cxa_demangle(const char* __mangled_name, char* __output_buffer, ! size_t* __length, int* __status); ! #ifdef __cplusplus ! } ! } // namespace __cxxabiv1 ! #endif ! #ifdef __cplusplus ! #include ! ! namespace __cxxabiv1 { ! // Type information for int, float etc. ! class __fundamental_type_info : public std::type_info ! { ! public: ! explicit ! __fundamental_type_info(const char* __n) : std::type_info(__n) { } ! virtual ! ~__fundamental_type_info(); }; ! // Type information for array objects. ! class __array_type_info : public std::type_info ! { ! public: ! explicit ! __array_type_info(const char* __n) : std::type_info(__n) { } ! virtual ! ~__array_type_info(); ! }; ! ! // Type information for functions (both member and non-member). ! class __function_type_info : public std::type_info { ! public: ! explicit ! __function_type_info(const char* __n) : std::type_info(__n) { } ! ! virtual ! ~__function_type_info(); ! ! protected: ! // Implementation defined member function. ! virtual bool ! __is_function_p() const; ! }; ! ! // Type information for enumerations. ! class __enum_type_info : public std::type_info ! { ! public: ! explicit ! __enum_type_info(const char* __n) : std::type_info(__n) { } ! ! virtual ! ~__enum_type_info(); ! }; ! ! // Common type information for simple pointers and pointers to member. ! class __pbase_type_info : public std::type_info ! { ! public: ! unsigned int __flags; // Qualification of the target object. ! const std::type_info* __pointee; // Type of pointed to object. ! ! explicit ! __pbase_type_info(const char* __n, int __quals, ! const std::type_info* __type) ! : std::type_info(__n), __flags(__quals), __pointee(__type) ! { } ! virtual ! ~__pbase_type_info(); ! ! // Implementation defined type. ! enum __masks ! { ! __const_mask = 0x1, ! __volatile_mask = 0x2, ! __restrict_mask = 0x4, ! __incomplete_mask = 0x8, ! __incomplete_class_mask = 0x10 ! }; ! ! protected: ! __pbase_type_info(const __pbase_type_info&); ! ! __pbase_type_info& ! operator=(const __pbase_type_info&); ! ! // Implementation defined member functions. ! virtual bool ! __do_catch(const std::type_info* __thr_type, void** __thr_obj, ! unsigned int __outer) const; ! ! inline virtual bool ! __pointer_catch(const __pbase_type_info* __thr_type, void** __thr_obj, ! unsigned __outer) const; }; ! // Type information for simple pointers. ! class __pointer_type_info : public __pbase_type_info ! { ! public: ! explicit ! __pointer_type_info(const char* __n, int __quals, ! const std::type_info* __type) ! : __pbase_type_info (__n, __quals, __type) { } ! virtual ! ~__pointer_type_info(); + protected: + // Implementation defined member functions. + virtual bool + __is_pointer_p() const; ! virtual bool ! __pointer_catch(const __pbase_type_info* __thr_type, void** __thr_obj, ! unsigned __outer) const; ! }; ! class __class_type_info; ! // Type information for a pointer to member variable. ! class __pointer_to_member_type_info : public __pbase_type_info ! { ! public: ! __class_type_info* __context; // Class of the member. ! explicit ! __pointer_to_member_type_info(const char* __n, int __quals, ! const std::type_info* __type, ! __class_type_info* __klass) ! : __pbase_type_info(__n, __quals, __type), __context(__klass) { } ! virtual ! ~__pointer_to_member_type_info(); ! protected: ! __pointer_to_member_type_info(const __pointer_to_member_type_info&); ! __pointer_to_member_type_info& ! operator=(const __pointer_to_member_type_info&); ! // Implementation defined member function. ! virtual bool ! __pointer_catch(const __pbase_type_info* __thr_type, void** __thr_obj, ! unsigned __outer) const; ! }; ! // Helper class for __vmi_class_type. ! class __base_class_type_info ! { ! public: ! const __class_type_info* __base_type; // Base class type. ! long __offset_flags; // Offset and info. ! ! enum __offset_flags_masks ! { ! __virtual_mask = 0x1, ! __public_mask = 0x2, ! __hwm_bit = 2, ! __offset_shift = 8 // Bits to shift offset. ! }; ! ! // Implementation defined member functions. ! bool ! __is_virtual_p() const ! { return __offset_flags & __virtual_mask; } ! ! bool ! __is_public_p() const ! { return __offset_flags & __public_mask; } ! ! ptrdiff_t ! __offset() const ! { ! // This shift, being of a signed type, is implementation ! // defined. GCC implements such shifts as arithmetic, which is ! // what we want. ! return static_cast(__offset_flags) >> __offset_shift; ! } }; ! // Type information for a class. ! class __class_type_info : public std::type_info ! { ! public: ! explicit ! __class_type_info (const char *__n) : type_info(__n) { } ! virtual ! ~__class_type_info (); ! // Implementation defined types. ! // The type sub_kind tells us about how a base object is contained ! // within a derived object. We often do this lazily, hence the ! // UNKNOWN value. At other times we may use NOT_CONTAINED to mean ! // not publicly contained. ! enum __sub_kind ! { ! // We have no idea. ! __unknown = 0, ! // Not contained within us (in some circumstances this might ! // mean not contained publicly) ! __not_contained, ! // Contained ambiguously. ! __contained_ambig, ! ! // Via a virtual path. ! __contained_virtual_mask = __base_class_type_info::__virtual_mask, ! // Via a public path. ! __contained_public_mask = __base_class_type_info::__public_mask, ! // Contained within us. ! __contained_mask = 1 << __base_class_type_info::__hwm_bit, ! ! __contained_private = __contained_mask, ! __contained_public = __contained_mask | __contained_public_mask ! }; ! struct __upcast_result; ! struct __dyncast_result; ! protected: ! // Implementation defined member functions. ! virtual bool ! __do_upcast(const __class_type_info* __dst_type, void**__obj_ptr) const; ! virtual bool ! __do_catch(const type_info* __thr_type, void** __thr_obj, ! unsigned __outer) const; ! public: ! // Helper for upcast. See if DST is us, or one of our bases. ! // Return false if not found, true if found. ! virtual bool ! __do_upcast(const __class_type_info* __dst, const void* __obj, ! __upcast_result& __restrict __result) const; ! // Indicate whether SRC_PTR of type SRC_TYPE is contained publicly ! // within OBJ_PTR. OBJ_PTR points to a base object of our type, ! // which is the destination type. SRC2DST indicates how SRC ! // objects might be contained within this type. If SRC_PTR is one ! // of our SRC_TYPE bases, indicate the virtuality. Returns ! // not_contained for non containment or private containment. ! inline __sub_kind ! __find_public_src(ptrdiff_t __src2dst, const void* __obj_ptr, ! const __class_type_info* __src_type, ! const void* __src_ptr) const; ! // Helper for dynamic cast. ACCESS_PATH gives the access from the ! // most derived object to this base. DST_TYPE indicates the ! // desired type we want. OBJ_PTR points to a base of our type ! // within the complete object. SRC_TYPE indicates the static type ! // started from and SRC_PTR points to that base within the most ! // derived object. Fill in RESULT with what we find. Return true ! // if we have located an ambiguous match. ! virtual bool ! __do_dyncast(ptrdiff_t __src2dst, __sub_kind __access_path, ! const __class_type_info* __dst_type, const void* __obj_ptr, ! const __class_type_info* __src_type, const void* __src_ptr, ! __dyncast_result& __result) const; ! ! // Helper for find_public_subobj. SRC2DST indicates how SRC_TYPE ! // bases are inherited by the type started from -- which is not ! // necessarily the current type. The current type will be a base ! // of the destination type. OBJ_PTR points to the current base. ! virtual __sub_kind ! __do_find_public_src(ptrdiff_t __src2dst, const void* __obj_ptr, ! const __class_type_info* __src_type, ! const void* __src_ptr) const; ! }; ! // Type information for a class with a single non-virtual base. ! class __si_class_type_info : public __class_type_info ! { ! public: ! const __class_type_info* __base_type; ! explicit ! __si_class_type_info(const char *__n, const __class_type_info *__base) ! : __class_type_info(__n), __base_type(__base) { } ! virtual ! ~__si_class_type_info(); ! protected: ! __si_class_type_info(const __si_class_type_info&); ! __si_class_type_info& ! operator=(const __si_class_type_info&); ! // Implementation defined member functions. ! virtual bool ! __do_dyncast(ptrdiff_t __src2dst, __sub_kind __access_path, ! const __class_type_info* __dst_type, const void* __obj_ptr, ! const __class_type_info* __src_type, const void* __src_ptr, ! __dyncast_result& __result) const; ! virtual __sub_kind ! __do_find_public_src(ptrdiff_t __src2dst, const void* __obj_ptr, ! const __class_type_info* __src_type, ! const void* __sub_ptr) const; ! virtual bool ! __do_upcast(const __class_type_info*__dst, const void*__obj, ! __upcast_result& __restrict __result) const; ! }; ! // Type information for a class with multiple and/or virtual bases. ! class __vmi_class_type_info : public __class_type_info ! { ! public: ! unsigned int __flags; // Details about the class hierarchy. ! unsigned int __base_count; // Dumber of direct bases. ! // The array of bases uses the trailing array struct hack so this ! // class is not constructable with a normal constructor. It is ! // internally generated by the compiler. ! __base_class_type_info __base_info[1]; // Array of bases. ! explicit ! __vmi_class_type_info(const char* __n, int ___flags) ! : __class_type_info(__n), __flags(___flags), __base_count(0) { } ! virtual ! ~__vmi_class_type_info(); ! // Implementation defined types. ! enum __flags_masks ! { ! __non_diamond_repeat_mask = 0x1, // Distinct instance of repeated base. ! __diamond_shaped_mask = 0x2, // Diamond shaped multiple inheritance. ! __flags_unknown_mask = 0x10 ! }; ! protected: ! // Implementation defined member functions. ! virtual bool ! __do_dyncast(ptrdiff_t __src2dst, __sub_kind __access_path, ! const __class_type_info* __dst_type, const void* __obj_ptr, ! const __class_type_info* __src_type, const void* __src_ptr, ! __dyncast_result& __result) const; ! virtual __sub_kind ! __do_find_public_src(ptrdiff_t __src2dst, const void* __obj_ptr, ! const __class_type_info* __src_type, ! const void* __src_ptr) const; ! ! virtual bool ! __do_upcast(const __class_type_info* __dst, const void* __obj, ! __upcast_result& __restrict __result) const; ! }; ! // Dynamic cast runtime. ! // src2dst has the following possible values ! // >-1: src_type is a unique public non-virtual base of dst_type ! // dst_ptr + src2dst == src_ptr ! // -1: unspecified relationship ! // -2: src_type is not a public base of dst_type ! // -3: src_type is a multiple public non-virtual base of dst_type ! extern "C" void* ! __dynamic_cast(const void* __src_ptr, // Starting object. ! const __class_type_info* __src_type, // Static type of object. ! const __class_type_info* __dst_type, // Desired target type. ! ptrdiff_t __src2dst); // How src and dst are related. ! // Returns the type_info for the currently handled exception [15.3/8], or ! // null if there is none. ! extern "C" std::type_info* ! __cxa_current_exception_type(); ! } // namespace __cxxabiv1 + // User programs should use the alias `abi'. + namespace abi = __cxxabiv1; ! #endif // __cplusplus ! ! #endif // __CXXABI_H diff -Nrc3pad gcc-3.4.0/libstdc++-v3/libsupc++/del_op.cc gcc-3.4.1/libstdc++-v3/libsupc++/del_op.cc *** gcc-3.4.0/libstdc++-v3/libsupc++/del_op.cc 2003-05-24 16:22:03.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/libsupc++/del_op.cc 2004-04-30 04:20:24.000000000 +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 diff -Nrc3pad gcc-3.4.0/libstdc++-v3/libsupc++/eh_alloc.cc gcc-3.4.1/libstdc++-v3/libsupc++/eh_alloc.cc *** gcc-3.4.0/libstdc++-v3/libsupc++/eh_alloc.cc 2003-05-24 16:22:03.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/libsupc++/eh_alloc.cc 2004-04-30 04:20:24.000000000 +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] diff -Nrc3pad gcc-3.4.0/libstdc++-v3/libsupc++/eh_aux_runtime.cc gcc-3.4.1/libstdc++-v3/libsupc++/eh_aux_runtime.cc *** gcc-3.4.0/libstdc++-v3/libsupc++/eh_aux_runtime.cc 2003-05-24 16:22:03.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/libsupc++/eh_aux_runtime.cc 2004-04-30 04:20:24.000000000 +0000 *************** *** 34,40 **** #include "unwind-cxx.h" #include "exception_defines.h" - extern "C" void __cxa_bad_cast () { --- 34,39 ---- diff -Nrc3pad gcc-3.4.0/libstdc++-v3/libsupc++/eh_catch.cc gcc-3.4.1/libstdc++-v3/libsupc++/eh_catch.cc *** gcc-3.4.0/libstdc++-v3/libsupc++/eh_catch.cc 2004-02-08 18:11:23.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/libsupc++/eh_catch.cc 2004-04-30 04:20:24.000000000 +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); diff -Nrc3pad gcc-3.4.0/libstdc++-v3/libsupc++/eh_globals.cc gcc-3.4.1/libstdc++-v3/libsupc++/eh_globals.cc *** gcc-3.4.0/libstdc++-v3/libsupc++/eh_globals.cc 2003-05-24 16:22:03.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/libsupc++/eh_globals.cc 2004-04-30 04:20:24.000000000 +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; diff -Nrc3pad gcc-3.4.0/libstdc++-v3/libsupc++/tinfo.cc gcc-3.4.1/libstdc++-v3/libsupc++/tinfo.cc *** gcc-3.4.0/libstdc++-v3/libsupc++/tinfo.cc 2003-07-05 04:05:40.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/libsupc++/tinfo.cc 2004-06-28 19:00:22.000000000 +0000 *************** *** 1,5 **** // Methods for type_info for -*- C++ -*- Run Time Type Identification. ! // Copyright (C) 1994, 1996, 1998, 1999, 2000, 2001, 2002, 2003 // Free Software Foundation // // This file is part of GCC. --- 1,5 ---- // Methods for type_info for -*- C++ -*- Run Time Type Identification. ! // Copyright (C) 1994, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004 // Free Software Foundation // // This file is part of GCC. *************** struct __class_type_info::__upcast_resul *** 200,206 **** // if in vbase the __class_type_info of vbase // if a non-virtual base then 1 // else NULL - public: __upcast_result (int d) :dst_ptr (NULL), part2dst (__unknown), src_details (d), base_type (NULL) {} --- 200,205 ---- *************** struct __class_type_info::__dyncast_resu *** 216,227 **** __sub_kind dst2src; // path from target to sub object int whole_details; // details of the whole class hierarchy - public: __dyncast_result (int details_ = __vmi_class_type_info::__flags_unknown_mask) :dst_ptr (NULL), whole2dst (__unknown), whole2src (__unknown), dst2src (__unknown), whole_details (details_) {} }; bool __class_type_info:: --- 215,231 ---- __sub_kind dst2src; // path from target to sub object int whole_details; // details of the whole class hierarchy __dyncast_result (int details_ = __vmi_class_type_info::__flags_unknown_mask) :dst_ptr (NULL), whole2dst (__unknown), whole2src (__unknown), dst2src (__unknown), whole_details (details_) {} + + protected: + __dyncast_result(const __dyncast_result&); + + __dyncast_result& + operator=(const __dyncast_result&); }; bool __class_type_info:: diff -Nrc3pad gcc-3.4.0/libstdc++-v3/libsupc++/tinfo.h gcc-3.4.1/libstdc++-v3/libsupc++/tinfo.h *** gcc-3.4.0/libstdc++-v3/libsupc++/tinfo.h 2002-01-16 19:57:34.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/libsupc++/tinfo.h 2004-05-06 22:07:07.000000000 +0000 *************** *** 1,7 **** // RTTI support internals for -*- C++ -*- ! // Copyright (C) 1994, 1995, 1996, 1998, 1999, 2000, 2001 // Free Software Foundation #include "typeinfo" #include --- 1,33 ---- // RTTI support internals for -*- C++ -*- ! // Copyright (C) 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2004 // Free Software Foundation + // This file is part of GCC. + // + // GCC is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2, or (at your option) + // any later version. + + // GCC is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License + // along with GCC; see the file COPYING. If not, write to + // the Free Software Foundation, 59 Temple Place - Suite 330, + // Boston, MA 02111-1307, USA. + + // As a special exception, you may use this file as part of a free software + // library without restriction. Specifically, if other files instantiate + // templates or use macros or inline functions from this file, or you compile + // this file and link it with other files to produce an executable, this + // file does not by itself cause the resulting executable to be covered by + // the GNU General Public License. This exception does not however + // invalidate any other reasons why the executable file might be covered by + // the GNU General Public License. + #include "typeinfo" #include diff -Nrc3pad gcc-3.4.0/libstdc++-v3/libsupc++/vec.cc gcc-3.4.1/libstdc++-v3/libsupc++/vec.cc *** gcc-3.4.0/libstdc++-v3/libsupc++/vec.cc 2003-11-08 00:36:13.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/libsupc++/vec.cc 2004-05-24 18:36:44.000000000 +0000 *************** *** 1,6 **** // New abi Support -*- C++ -*- ! // Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. // // This file is part of GCC. // --- 1,6 ---- // New abi Support -*- C++ -*- ! // Copyright (C) 2000, 2001, 2003, 2004 Free Software Foundation, Inc. // // This file is part of GCC. // *************** namespace __cxxabiv1 *** 42,54 **** { struct uncatch_exception { ! uncatch_exception (); ~uncatch_exception () { __cxa_begin_catch (&p->unwindHeader); } ! __cxa_exception *p; }; ! uncatch_exception::uncatch_exception () { __cxa_eh_globals *globals = __cxa_get_globals_fast (); --- 42,60 ---- { struct uncatch_exception { ! uncatch_exception(); ~uncatch_exception () { __cxa_begin_catch (&p->unwindHeader); } ! __cxa_exception* p; ! ! private: ! uncatch_exception& ! operator=(const uncatch_exception&); ! ! uncatch_exception(const uncatch_exception&); }; ! uncatch_exception::uncatch_exception() : p(0) { __cxa_eh_globals *globals = __cxa_get_globals_fast (); diff -Nrc3pad gcc-3.4.0/libstdc++-v3/linkage.m4 gcc-3.4.1/libstdc++-v3/linkage.m4 *** gcc-3.4.0/libstdc++-v3/linkage.m4 2004-03-18 17:36:13.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/linkage.m4 2004-06-25 22:02:47.000000000 +0000 *************** *** 1,5 **** dnl ! dnl This file contains stuff. dnl dnl --- 1,5 ---- dnl ! dnl This file contains macros for testing linkage. dnl dnl *************** AC_DEFUN([GLIBCXX_CHECK_MATH_DECL_1], [ *** 20,26 **** #endif ], [ $1(0);], ! [glibcxx_cv_func_$1_use=yes], [glibcxx_cv_func_$1_use=no]) AC_LANG_RESTORE ]) fi --- 20,26 ---- #endif ], [ $1(0);], ! [glibcxx_cv_func_$1_use=yes], [glibcxx_cv_func_$1_use=no]) AC_LANG_RESTORE ]) fi *************** AC_DEFUN([GLIBCXX_CHECK_BUILTIN_MATH_DEC *** 291,297 **** AC_MSG_RESULT($glibcxx_cv_func_$1_link) if test x$glibcxx_cv_func_$1_link = x"yes"; then ac_tr_func=HAVE_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! AC_DEFINE_UNQUOTED(${ac_tr_func}) fi fi ]) --- 291,297 ---- AC_MSG_RESULT($glibcxx_cv_func_$1_link) if test x$glibcxx_cv_func_$1_link = x"yes"; then ac_tr_func=HAVE_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! AC_DEFINE_UNQUOTED(${ac_tr_func}, 1, [Defined if $1 exists.]) fi fi ]) *************** AC_DEFUN([GLIBCXX_CHECK_BUILTIN_MATH_SUP *** 336,365 **** GLIBCXX_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_cosf) GLIBCXX_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_cos) GLIBCXX_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_cosl) - - dnl There is, without a doubt, a more elegant way to have these - dnl names exported so that they won't be stripped out of acconfig.h by - dnl autoheader. I leave this as an exercise to somebody less frustrated - dnl than I.... please email the libstdc++ list if you can figure out a - dnl more elegant approach (see autoconf/acgen.m4 and specifically - dnl AC_CHECK_FUNC for things to steal.) - dummyvar=no - if test x$dummyvar = x"yes"; then - AC_DEFINE(HAVE___BUILTIN_ABS) - AC_DEFINE(HAVE___BUILTIN_LABS) - AC_DEFINE(HAVE___BUILTIN_COS) - AC_DEFINE(HAVE___BUILTIN_COSF) - AC_DEFINE(HAVE___BUILTIN_COSL) - AC_DEFINE(HAVE___BUILTIN_FABS) - AC_DEFINE(HAVE___BUILTIN_FABSF) - AC_DEFINE(HAVE___BUILTIN_FABSL) - AC_DEFINE(HAVE___BUILTIN_SIN) - AC_DEFINE(HAVE___BUILTIN_SINF) - AC_DEFINE(HAVE___BUILTIN_SINL) - AC_DEFINE(HAVE___BUILTIN_SQRT) - AC_DEFINE(HAVE___BUILTIN_SQRTF) - AC_DEFINE(HAVE___BUILTIN_SQRTL) - fi ]) dnl --- 336,341 ---- *************** AC_DEFUN([GLIBCXX_CHECK_COMPLEX_MATH_SUP *** 513,519 **** --- 489,498 ---- AC_REPLACE_MATHFUNCS(copysignf) dnl For __signbit to signbit conversions. + dnl Not sure why this is done, as these will be macros mostly. + dnl Should probably coordinate this with std_cmath.h. AC_CHECK_FUNCS([__signbit], , [LIBMATHOBJS="$LIBMATHOBJS signbit.lo"]) + AC_CHECK_FUNCS([__signbitf], , [LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"]) dnl Compile the long double complex functions only if the function *************** AC_DEFUN([GLIBCXX_CHECK_COMPLEX_MATH_SUP *** 524,530 **** AC_CHECK_FUNCS([__signbitl], , [LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"]) fi ! # XXX Review this. Nothing uses it. if test -n "$LIBMATHOBJS"; then need_libmath=yes fi --- 503,509 ---- AC_CHECK_FUNCS([__signbitl], , [LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"]) fi ! # Used in libmath/Makefile.am. if test -n "$LIBMATHOBJS"; then need_libmath=yes fi *************** AC_DEFUN([GLIBCXX_CHECK_COMPLEX_MATH_SUP *** 545,549 **** dnl AC_REPLACE_MATHFUNCS(FUNCTION...) AC_DEFUN([AC_REPLACE_MATHFUNCS], [AC_CHECK_FUNCS([$1], , [LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"])]) - - dnl vim:et:ts=2 --- 524,526 ---- diff -Nrc3pad gcc-3.4.0/libstdc++-v3/po/string_literals.cc gcc-3.4.1/libstdc++-v3/po/string_literals.cc *** gcc-3.4.0/libstdc++-v3/po/string_literals.cc 2001-08-14 01:24:30.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/po/string_literals.cc 2004-05-06 22:07:07.000000000 +0000 *************** *** 16,21 **** --- 16,30 ---- // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, // USA. + // As a special exception, you may use this file as part of a free software + // library without restriction. Specifically, if other files instantiate + // templates or use macros or inline functions from this file, or you compile + // this file and link it with other files to produce an executable, this + // file does not by itself cause the resulting executable to be covered by + // the GNU General Public License. This exception does not however + // invalidate any other reasons why the executable file might be covered by + // the GNU General Public License. + #include #define gettext_noop(Str) Str diff -Nrc3pad gcc-3.4.0/libstdc++-v3/scripts/create_testsuite_files gcc-3.4.1/libstdc++-v3/scripts/create_testsuite_files *** gcc-3.4.0/libstdc++-v3/scripts/create_testsuite_files 2003-07-06 03:14:37.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/scripts/create_testsuite_files 2004-05-30 16:10:48.000000000 +0000 *************** tests_file_perf="$outdir/testsuite_files *** 30,41 **** cd $srcdir # This is the ugly version of "everything but the current directory". It's ! # what has to happen when find(1) doesn't support -mindepth. dlist=`echo [0-9][0-9]*` for d in [a-z]*; do test -d $d && dlist="$dlist $d" done ! find $dlist -type f -name "*.cc" | sort > $tmp.1 # If the library is not configured to support wchar_t, don't run those tests. if test -f "$outdir/testsuite_wchar_t"; then --- 30,44 ---- cd $srcdir # This is the ugly version of "everything but the current directory". It's ! # what has to happen when find(1) doesn't support -mindepth, or -xtype. dlist=`echo [0-9][0-9]*` for d in [a-z]*; do test -d $d && dlist="$dlist $d" done ! find $dlist "(" -type f -o -type l ")" -name "*.cc" | sort > $tmp.1 ! if test ! -s "$tmp.1"; then ! exit 1 ! fi # If the library is not configured to support wchar_t, don't run those tests. if test -f "$outdir/testsuite_wchar_t"; then diff -Nrc3pad gcc-3.4.0/libstdc++-v3/src/allocator.cc gcc-3.4.1/libstdc++-v3/src/allocator.cc *** gcc-3.4.0/libstdc++-v3/src/allocator.cc 2004-03-18 17:37:11.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/src/allocator.cc 2004-06-17 10:39:34.000000000 +0000 *************** namespace __gnu_cxx *** 44,48 **** template class __mt_alloc; // Static members of __pool_alloc. ! template class __pool_alloc; } // namespace __gnu_cxx --- 44,51 ---- template class __mt_alloc; // Static members of __pool_alloc. ! template class __pool_alloc; ! template class __pool_alloc; ! ! template class __pool_base; } // namespace __gnu_cxx diff -Nrc3pad gcc-3.4.0/libstdc++-v3/src/codecvt.cc gcc-3.4.1/libstdc++-v3/src/codecvt.cc *** gcc-3.4.0/libstdc++-v3/src/codecvt.cc 2003-10-02 16:56:39.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/src/codecvt.cc 2004-05-24 20:49:53.000000000 +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 *** 45,57 **** codecvt:: codecvt(size_t __refs) ! : __codecvt_abstract_base(__refs) ! { _M_c_locale_codecvt = _S_get_c_locale(); } codecvt:: codecvt(__c_locale __cloc, size_t __refs) ! : __codecvt_abstract_base(__refs) ! { _M_c_locale_codecvt = _S_clone_c_locale(__cloc); } codecvt:: ~codecvt() --- 45,59 ---- codecvt:: codecvt(size_t __refs) ! : __codecvt_abstract_base(__refs), ! _M_c_locale_codecvt(_S_get_c_locale()) ! { } codecvt:: codecvt(__c_locale __cloc, size_t __refs) ! : __codecvt_abstract_base(__refs), ! _M_c_locale_codecvt(_S_clone_c_locale(__cloc)) ! { } codecvt:: ~codecvt() *************** 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 [...] --- 87,93 ---- 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:: --- 111,120 ---- 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:: *************** namespace std *** 121,133 **** // codecvt required specialization codecvt:: codecvt(size_t __refs) ! : __codecvt_abstract_base(__refs) ! { _M_c_locale_codecvt = _S_get_c_locale(); } codecvt:: codecvt(__c_locale __cloc, size_t __refs) ! : __codecvt_abstract_base(__refs) ! { _M_c_locale_codecvt = _S_clone_c_locale(__cloc); } codecvt:: ~codecvt() --- 125,139 ---- // codecvt required specialization codecvt:: codecvt(size_t __refs) ! : __codecvt_abstract_base(__refs), ! _M_c_locale_codecvt(_S_get_c_locale()) ! { } codecvt:: codecvt(__c_locale __cloc, size_t __refs) ! : __codecvt_abstract_base(__refs), ! _M_c_locale_codecvt(_S_clone_c_locale(__cloc)) ! { } codecvt:: ~codecvt() diff -Nrc3pad gcc-3.4.0/libstdc++-v3/src/ctype.cc gcc-3.4.1/libstdc++-v3/src/ctype.cc *** gcc-3.4.0/libstdc++-v3/src/ctype.cc 2003-12-12 19:44:15.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/src/ctype.cc 2004-05-24 20:49:54.000000000 +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 *** 86,103 **** #ifdef _GLIBCXX_USE_WCHAR_T ctype::ctype(size_t __refs) ! : __ctype_abstract_base(__refs) ! { ! _M_c_locale_ctype = _S_get_c_locale(); ! _M_initialize_ctype(); ! } ctype::ctype(__c_locale __cloc, size_t __refs) ! : __ctype_abstract_base(__refs) ! { ! _M_c_locale_ctype = _S_clone_c_locale(__cloc); ! _M_initialize_ctype(); ! } ctype::~ctype() { _S_destroy_c_locale(_M_c_locale_ctype); } --- 86,99 ---- #ifdef _GLIBCXX_USE_WCHAR_T ctype::ctype(size_t __refs) ! : __ctype_abstract_base(__refs), ! _M_c_locale_ctype(_S_get_c_locale()), _M_narrow_ok(false) ! { _M_initialize_ctype(); } ctype::ctype(__c_locale __cloc, size_t __refs) ! : __ctype_abstract_base(__refs), ! _M_c_locale_ctype(_S_clone_c_locale(__cloc)), _M_narrow_ok(false) ! { _M_initialize_ctype(); } ctype::~ctype() { _S_destroy_c_locale(_M_c_locale_ctype); } *************** 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 --- 104,112 ---- { 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 diff -Nrc3pad gcc-3.4.0/libstdc++-v3/src/debug.cc gcc-3.4.1/libstdc++-v3/src/debug.cc *** gcc-3.4.0/libstdc++-v3/src/debug.cc 2004-03-18 17:37:11.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/src/debug.cc 2004-05-15 21:17:59.000000000 +0000 *************** namespace __gnu_debug *** 114,123 **** __old->_M_attach(0, false); } ! for (_Safe_iterator_base* __iter = _M_const_iterators; __iter; ) { ! _Safe_iterator_base* __old = __iter; ! __iter = __iter->_M_next; __old->_M_attach(0, true); } } --- 114,123 ---- __old->_M_attach(0, false); } ! for (_Safe_iterator_base* __iter2 = _M_const_iterators; __iter2; ) { ! _Safe_iterator_base* __old = __iter2; ! __iter2 = __iter2->_M_next; __old->_M_attach(0, true); } } *************** namespace __gnu_debug *** 134,143 **** __old->_M_attach(0, false); } ! for (_Safe_iterator_base* __iter = _M_const_iterators; __iter; ) { ! _Safe_iterator_base* __old = __iter; ! __iter = __iter->_M_next; if (__old->_M_singular()) __old->_M_attach(0, true); } --- 134,143 ---- __old->_M_attach(0, false); } ! for (_Safe_iterator_base* __iter2 = _M_const_iterators; __iter2; ) { ! _Safe_iterator_base* __old = __iter2; ! __iter2 = __iter2->_M_next; if (__old->_M_singular()) __old->_M_attach(0, true); } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/src/ext-inst.cc gcc-3.4.1/libstdc++-v3/src/ext-inst.cc *** gcc-3.4.0/libstdc++-v3/src/ext-inst.cc 2003-07-05 04:05:42.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/src/ext-inst.cc 2004-04-30 04:20:24.000000000 +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 diff -Nrc3pad gcc-3.4.0/libstdc++-v3/src/ios.cc gcc-3.4.1/libstdc++-v3/src/ios.cc *** gcc-3.4.0/libstdc++-v3/src/ios.cc 2004-03-18 17:37:14.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/src/ios.cc 2004-05-24 20:49:54.000000000 +0000 *************** namespace std *** 112,118 **** bool ios_base::Init::_S_synced_with_stdio = true; ios_base::ios_base() ! : _M_callbacks(0), _M_word_size(_S_local_word_size), _M_word(_M_local_word) { // Do nothing: basic_ios::init() does it. // NB: _M_callbacks and _M_word must be zero for non-initialized --- 112,120 ---- bool ios_base::Init::_S_synced_with_stdio = true; ios_base::ios_base() ! : _M_precision(), _M_width(), _M_flags(), _M_exception(), ! _M_streambuf_state(), _M_callbacks(0), _M_word_zero(), ! _M_word_size(_S_local_word_size), _M_word(_M_local_word), _M_ios_locale() { // Do nothing: basic_ios::init() does it. // NB: _M_callbacks and _M_word must be zero for non-initialized diff -Nrc3pad gcc-3.4.0/libstdc++-v3/src/locale.cc gcc-3.4.1/libstdc++-v3/src/locale.cc *** gcc-3.4.0/libstdc++-v3/src/locale.cc 2004-03-18 17:37:15.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/src/locale.cc 2004-05-24 20:49:54.000000000 +0000 *************** namespace std *** 56,62 **** #endif locale::locale(const locale& __other) throw() ! { (_M_impl = __other._M_impl)->_M_add_reference(); } // This is used to initialize global and classic locales, and // assumes that the _Impl objects are constructed correctly. --- 56,63 ---- #endif locale::locale(const locale& __other) throw() ! : _M_impl(__other._M_impl) ! { _M_impl->_M_add_reference(); } // This is used to initialize global and classic locales, and // assumes that the _Impl objects are constructed correctly. *************** namespace std *** 70,78 **** bool locale::operator==(const locale& __rhs) const throw() { ! string __name = this->name(); ! return (_M_impl == __rhs._M_impl ! || (__name != "*" && __name == __rhs.name())); } const locale& --- 71,86 ---- bool locale::operator==(const locale& __rhs) const throw() { ! bool __ret = false; ! if (_M_impl == __rhs._M_impl) ! __ret = true; ! else ! { ! const string __name = this->name(); ! if (__name != "*" && __name == __rhs.name()) ! __ret = true; ! } ! return __ret; } const locale& *************** namespace std *** 211,220 **** // Clone existing _Impl object. locale::_Impl:: _Impl(const _Impl& __imp, size_t __refs) ! : _M_refcount(__refs), _M_facets_size(__imp._M_facets_size) { - _M_facets = _M_caches = 0; - _M_names = 0; try { _M_facets = new const facet*[_M_facets_size]; --- 219,227 ---- // Clone existing _Impl object. locale::_Impl:: _Impl(const _Impl& __imp, size_t __refs) ! : _M_refcount(__refs), _M_facets(0), _M_facets_size(__imp._M_facets_size), ! _M_caches(0), _M_names(0) { try { _M_facets = new const facet*[_M_facets_size]; *************** namespace std *** 225,246 **** _M_facets[__i]->_M_add_reference(); } _M_caches = new const facet*[_M_facets_size]; ! for (size_t __i = 0; __i < _M_facets_size; ++__i) { ! _M_caches[__i] = __imp._M_caches[__i]; ! if (_M_caches[__i]) ! _M_caches[__i]->_M_add_reference(); } _M_names = new char*[_S_categories_size]; ! for (size_t __i = 0; __i < _S_categories_size; ++__i) ! _M_names[__i] = 0; // Name all the categories. ! for (size_t __i = 0; __i < _S_categories_size; ++__i) { ! char* __new = new char[std::strlen(__imp._M_names[__i]) + 1]; ! std::strcpy(__new, __imp._M_names[__i]); ! _M_names[__i] = __new; } } catch(...) --- 232,253 ---- _M_facets[__i]->_M_add_reference(); } _M_caches = new const facet*[_M_facets_size]; ! for (size_t __j = 0; __j < _M_facets_size; ++__j) { ! _M_caches[__j] = __imp._M_caches[__j]; ! if (_M_caches[__j]) ! _M_caches[__j]->_M_add_reference(); } _M_names = new char*[_S_categories_size]; ! for (size_t __k = 0; __k < _S_categories_size; ++__k) ! _M_names[__k] = 0; // Name all the categories. ! for (size_t __l = 0; __l < _S_categories_size; ++__l) { ! char* __new = new char[std::strlen(__imp._M_names[__l]) + 1]; ! std::strcpy(__new, __imp._M_names[__l]); ! _M_names[__l] = __new; } } catch(...) *************** namespace std *** 252,258 **** void locale::_Impl:: ! _M_replace_category(const _Impl* __imp, const locale::id* const* __idpp) { for (; *__idpp; ++__idpp) _M_replace_facet(__imp, *__idpp); --- 259,266 ---- void locale::_Impl:: ! _M_replace_category(const _Impl* __imp, ! const locale::id* const* __idpp) { for (; *__idpp; ++__idpp) _M_replace_facet(__imp, *__idpp); *************** namespace std *** 263,269 **** _M_replace_facet(const _Impl* __imp, const locale::id* __idp) { size_t __index = __idp->_M_id(); ! if ((__index > (__imp->_M_facets_size - 1)) || !__imp->_M_facets[__index]) __throw_runtime_error(__N("locale::_Impl::_M_replace_facet")); _M_install_facet(__idp, __imp->_M_facets[__index]); } --- 271,278 ---- _M_replace_facet(const _Impl* __imp, const locale::id* __idp) { size_t __index = __idp->_M_id(); ! if ((__index > (__imp->_M_facets_size - 1)) ! || !__imp->_M_facets[__index]) __throw_runtime_error(__N("locale::_Impl::_M_replace_facet")); _M_install_facet(__idp, __imp->_M_facets[__index]); } *************** namespace std *** 287,294 **** __newf = new const facet*[__new_size]; for (size_t __i = 0; __i < _M_facets_size; ++__i) __newf[__i] = _M_facets[__i]; ! for (size_t __i2 = _M_facets_size; __i2 < __new_size; ++__i2) ! __newf[__i2] = 0; // New cache array. const facet** __oldc = _M_caches; --- 296,303 ---- __newf = new const facet*[__new_size]; for (size_t __i = 0; __i < _M_facets_size; ++__i) __newf[__i] = _M_facets[__i]; ! for (size_t __l = _M_facets_size; __l < __new_size; ++__l) ! __newf[__l] = 0; // New cache array. const facet** __oldc = _M_caches; *************** namespace std *** 302,311 **** delete [] __newf; __throw_exception_again; } ! for (size_t __i = 0; __i < _M_facets_size; ++__i) ! __newc[__i] = _M_caches[__i]; ! for (size_t __i2 = _M_facets_size; __i2 < __new_size; ++__i2) ! __newc[__i2] = 0; _M_facets_size = __new_size; _M_facets = __newf; --- 311,320 ---- delete [] __newf; __throw_exception_again; } ! for (size_t __j = 0; __j < _M_facets_size; ++__j) ! __newc[__j] = _M_caches[__j]; ! for (size_t __k = _M_facets_size; __k < __new_size; ++__k) ! __newc[__k] = 0; _M_facets_size = __new_size; _M_facets = __newf; diff -Nrc3pad gcc-3.4.0/libstdc++-v3/src/locale_init.cc gcc-3.4.1/libstdc++-v3/src/locale_init.cc *** gcc-3.4.0/libstdc++-v3/src/locale_init.cc 2004-03-18 17:37:15.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/src/locale_init.cc 2004-05-24 20:49:54.000000000 +0000 *************** namespace std *** 98,104 **** { using namespace __gnu_internal; ! locale::locale() throw() { _S_initialize(); __glibcxx_mutex_lock(__gnu_internal::locale_cons_mutex); --- 98,104 ---- { using namespace __gnu_internal; ! locale::locale() throw() : _M_impl(0) { _S_initialize(); __glibcxx_mutex_lock(__gnu_internal::locale_cons_mutex); *************** namespace std *** 248,254 **** // Construct "C" _Impl. locale::_Impl:: _Impl(size_t __refs) throw() ! : _M_refcount(__refs), _M_facets_size(_GLIBCXX_NUM_FACETS) { _M_facets = new (&facet_vec) const facet*[_M_facets_size]; _M_caches = new (&cache_vec) const facet*[_M_facets_size]; --- 248,255 ---- // Construct "C" _Impl. locale::_Impl:: _Impl(size_t __refs) throw() ! : _M_refcount(__refs), _M_facets(0), _M_facets_size(_GLIBCXX_NUM_FACETS), ! _M_caches(0), _M_names(0) { _M_facets = new (&facet_vec) const facet*[_M_facets_size]; _M_caches = new (&cache_vec) const facet*[_M_facets_size]; *************** namespace std *** 257,266 **** // Name all the categories. _M_names = new (&name_vec) char*[_S_categories_size]; ! for (size_t __i = 0; __i < _S_categories_size; ++__i) { ! _M_names[__i] = new (&name_c[__i]) char[2]; ! std::strcpy(_M_names[__i], locale::facet::_S_get_c_name()); } // This is needed as presently the C++ version of "C" locales --- 258,267 ---- // Name all the categories. _M_names = new (&name_vec) char*[_S_categories_size]; ! for (size_t __j = 0; __j < _S_categories_size; ++__j) { ! _M_names[__j] = new (&name_c[__j]) char[2]; ! std::strcpy(_M_names[__j], locale::facet::_S_get_c_name()); } // This is needed as presently the C++ version of "C" locales diff -Nrc3pad gcc-3.4.0/libstdc++-v3/src/localename.cc gcc-3.4.1/libstdc++-v3/src/localename.cc *** gcc-3.4.0/libstdc++-v3/src/localename.cc 2004-01-28 00:50:56.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/src/localename.cc 2004-05-24 20:49:54.000000000 +0000 *************** *** 1,4 **** ! // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 // 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, 2003, 2004 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free *************** namespace std *** 35,41 **** using namespace __gnu_cxx; ! locale::locale(const char* __s) { if (__s) { --- 35,41 ---- using namespace __gnu_cxx; ! locale::locale(const char* __s) : _M_impl(0) { if (__s) { *************** namespace std *** 148,153 **** --- 148,154 ---- } locale::locale(const locale& __base, const char* __s, category __cat) + : _M_impl(0) { // NB: There are complicated, yet more efficient ways to do // this. Building up locales on a per-category way is tedious, so *************** namespace std *** 157,162 **** --- 158,164 ---- } locale::locale(const locale& __base, const locale& __add, category __cat) + : _M_impl(0) { _M_coalesce(__base, __add, __cat); } void *************** namespace std *** 178,203 **** // Construct named _Impl. locale::_Impl:: _Impl(const char* __s, size_t __refs) ! : _M_refcount(__refs), _M_facets_size(_GLIBCXX_NUM_FACETS) { // Initialize the underlying locale model, which also checks to // see if the given name is valid. __c_locale __cloc; locale::facet::_S_create_c_locale(__cloc, __s); - _M_facets = _M_caches = 0; - _M_names = 0; try { _M_facets = new const facet*[_M_facets_size]; for (size_t __i = 0; __i < _M_facets_size; ++__i) _M_facets[__i] = 0; _M_caches = new const facet*[_M_facets_size]; ! for (size_t __i = 0; __i < _M_facets_size; ++__i) ! _M_caches[__i] = 0; _M_names = new char*[_S_categories_size]; ! for (size_t __i = 0; __i < _S_categories_size; ++__i) ! _M_names[__i] = 0; // Name all the categories. const size_t __len = std::strlen(__s); --- 180,204 ---- // Construct named _Impl. locale::_Impl:: _Impl(const char* __s, size_t __refs) ! : _M_refcount(__refs), _M_facets(0), _M_facets_size(_GLIBCXX_NUM_FACETS), ! _M_caches(0), _M_names(0) { // Initialize the underlying locale model, which also checks to // see if the given name is valid. __c_locale __cloc; locale::facet::_S_create_c_locale(__cloc, __s); try { _M_facets = new const facet*[_M_facets_size]; for (size_t __i = 0; __i < _M_facets_size; ++__i) _M_facets[__i] = 0; _M_caches = new const facet*[_M_facets_size]; ! for (size_t __j = 0; __j < _M_facets_size; ++__j) ! _M_caches[__j] = 0; _M_names = new char*[_S_categories_size]; ! for (size_t __k = 0; __k < _S_categories_size; ++__k) ! _M_names[__k] = 0; // Name all the categories. const size_t __len = std::strlen(__s); diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/18_support/new_delete_placement.cc gcc-3.4.1/libstdc++-v3/testsuite/18_support/new_delete_placement.cc *** gcc-3.4.0/libstdc++-v3/testsuite/18_support/new_delete_placement.cc 2002-07-24 19:49:21.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/18_support/new_delete_placement.cc 2004-04-30 04:20:24.000000000 +0000 *************** *** 1,6 **** // 2002-07-24 Benjamin Kosnik ! // Copyright (C) 2002 Free Software Foundation // // 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 ---- // 2002-07-24 Benjamin Kosnik ! // Copyright (C) 2002, 2004 Free Software Foundation // // 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 *************** void test01() *** 28,34 **** { void* pc = new char; void* pa = new char[10]; ! void* tmp; operator delete(pc, tmp); operator delete[](pa, tmp); } --- 28,34 ---- { void* pc = new char; void* pa = new char[10]; ! void* tmp = NULL; operator delete(pc, tmp); operator delete[](pa, tmp); } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/21_strings/basic_string/capacity/1.cc gcc-3.4.1/libstdc++-v3/testsuite/21_strings/basic_string/capacity/1.cc *** gcc-3.4.0/libstdc++-v3/testsuite/21_strings/basic_string/capacity/1.cc 2003-12-11 22:29:12.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/21_strings/basic_string/capacity/1.cc 2004-04-30 04:20:24.000000000 +0000 *************** *** 1,6 **** // 1999-05-11 bkoz ! // Copyright (C) 1999, 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 ---- // 1999-05-11 bkoz ! // Copyright (C) 1999, 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 *************** void test01() *** 140,146 **** VERIFY( sz04 >= 100 ); str02.reserve(); sz03 = str02.capacity(); ! VERIFY( sz03 >= 0 ); sz03 = str02.size() + 5; str02.resize(sz03); --- 140,146 ---- VERIFY( sz04 >= 100 ); str02.reserve(); sz03 = str02.capacity(); ! VERIFY( sz03 == 0 ); sz03 = str02.size() + 5; str02.resize(sz03); diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/1.cc gcc-3.4.1/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/1.cc *** gcc-3.4.0/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/1.cc 2003-12-11 22:29:12.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/1.cc 2004-04-30 04:20:25.000000000 +0000 *************** *** 1,6 **** // 1999-05-11 bkoz ! // Copyright (C) 1999, 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 ---- // 1999-05-11 bkoz ! // Copyright (C) 1999, 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 *************** void test01() *** 37,43 **** VERIFY( sz02 >= 100 ); str01.reserve(); sz01 = str01.capacity(); ! VERIFY( sz01 >= 0 ); sz01 = str01.size() + 5; str01.resize(sz01); --- 37,43 ---- VERIFY( sz02 >= 100 ); str01.reserve(); sz01 = str01.capacity(); ! VERIFY( sz01 == 0 ); sz01 = str01.size() + 5; str01.resize(sz01); diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/1.cc gcc-3.4.1/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/1.cc *** gcc-3.4.0/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/1.cc 2003-12-11 22:29:12.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/1.cc 2004-04-30 04:20:25.000000000 +0000 *************** *** 1,6 **** // 1999-05-11 bkoz ! // Copyright (C) 1999, 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 ---- // 1999-05-11 bkoz ! // Copyright (C) 1999, 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 *************** void test01() *** 37,43 **** VERIFY( sz02 >= 100 ); str01.reserve(); sz01 = str01.capacity(); ! VERIFY( sz01 >= 0 ); sz01 = str01.size() + 5; str01.resize(sz01); --- 37,43 ---- VERIFY( sz02 >= 100 ); str01.reserve(); sz01 = str01.capacity(); ! VERIFY( sz01 == 0 ); sz01 = str01.size() + 5; str01.resize(sz01); diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/10.cc gcc-3.4.1/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/10.cc *** gcc-3.4.0/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/10.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/10.cc 2004-05-25 22:13:24.000000000 +0000 *************** *** 0 **** --- 1,84 ---- + // Copyright (C) 2004 Free Software Foundation + // + // 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + // 21.3.7.9 inserters and extractors + + #include + #include + #include + #include + + using namespace std; + + string prepare(string::size_type len, unsigned nchunks, char delim) + { + string ret; + for (unsigned i = 0; i < nchunks; ++i) + { + for (string::size_type j = 0; j < len; ++j) + ret.push_back('a' + rand() % 26); + len *= 2; + ret.push_back(delim); + } + return ret; + } + + void check(istream& stream, const string& str, unsigned nchunks, char delim) + { + bool test __attribute__((unused)) = true; + + string chunk; + string::size_type index = 0, index_new = 0; + unsigned n = 0; + + while (getline(stream, chunk, delim)) + { + index_new = str.find(delim, index); + VERIFY( !str.compare(index, index_new - index, chunk) ); + index = index_new + 1; + ++n; + } + VERIFY( stream.eof() ); + VERIFY( n == nchunks ); + } + + // istream& getline(istream&, string&, char) + void test01() + { + const char filename[] = "inserters_extractors-2.txt"; + + const char delim = '|'; + const unsigned nchunks = 10; + const string data = prepare(777, nchunks, delim); + + ofstream ofstrm; + ofstrm.open(filename); + ofstrm.write(data.data(), data.size()); + ofstrm.close(); + + ifstream ifstrm; + ifstrm.open(filename); + check(ifstrm, data, nchunks, delim); + ifstrm.close(); + } + + int main() + { + test01(); + return 0; + } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/11.cc gcc-3.4.1/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/11.cc *** gcc-3.4.0/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/11.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/11.cc 2004-05-25 22:13:24.000000000 +0000 *************** *** 0 **** --- 1,83 ---- + // Copyright (C) 2004 Free Software Foundation + // + // 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + // 21.3.7.9 inserters and extractors + + #include + #include + #include + #include + + using namespace std; + + string prepare(string::size_type len, unsigned nchunks) + { + string ret; + for (unsigned i = 0; i < nchunks; ++i) + { + for (string::size_type j = 0; j < len; ++j) + ret.push_back('a' + rand() % 26); + len *= 2; + ret.push_back(' '); + } + return ret; + } + + void check(istream& stream, const string& str, unsigned nchunks) + { + bool test __attribute__((unused)) = true; + + string chunk; + string::size_type index = 0, index_new = 0; + unsigned n = 0; + + while (stream >> chunk) + { + index_new = str.find(' ', index); + VERIFY( !str.compare(index, index_new - index, chunk) ); + index = index_new + 1; + ++n; + } + VERIFY( stream.eof() ); + VERIFY( n == nchunks ); + } + + // istream& operator>>(istream&, string&) + void test01() + { + const char filename[] = "inserters_extractors-3.txt"; + + const unsigned nchunks = 10; + const string data = prepare(666, nchunks); + + ofstream ofstrm; + ofstrm.open(filename); + ofstrm.write(data.data(), data.size()); + ofstrm.close(); + + ifstream ifstrm; + ifstrm.open(filename); + check(ifstrm, data, nchunks); + ifstrm.close(); + } + + int main() + { + test01(); + return 0; + } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/10.cc gcc-3.4.1/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/10.cc *** gcc-3.4.0/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/10.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/10.cc 2004-05-25 22:13:25.000000000 +0000 *************** *** 0 **** --- 1,84 ---- + // Copyright (C) 2004 Free Software Foundation + // + // 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + // 21.3.7.9 inserters and extractors + + #include + #include + #include + #include + + using namespace std; + + wstring prepare(wstring::size_type len, unsigned nchunks, wchar_t delim) + { + wstring ret; + for (unsigned i = 0; i < nchunks; ++i) + { + for (wstring::size_type j = 0; j < len; ++j) + ret.push_back(L'a' + rand() % 26); + len *= 2; + ret.push_back(delim); + } + return ret; + } + + void check(wistream& stream, const wstring& str, unsigned nchunks, wchar_t delim) + { + bool test __attribute__((unused)) = true; + + wstring chunk; + wstring::size_type index = 0, index_new = 0; + unsigned n = 0; + + while (getline(stream, chunk, delim)) + { + index_new = str.find(delim, index); + VERIFY( !str.compare(index, index_new - index, chunk) ); + index = index_new + 1; + ++n; + } + VERIFY( stream.eof() ); + VERIFY( n == nchunks ); + } + + // istream& getline(istream&, string&, char) + void test01() + { + const char filename[] = "inserters_extractors-2.txt"; + + const wchar_t delim = L'|'; + const unsigned nchunks = 10; + const wstring data = prepare(777, nchunks, delim); + + wofstream ofstrm; + ofstrm.open(filename); + ofstrm.write(data.data(), data.size()); + ofstrm.close(); + + wifstream ifstrm; + ifstrm.open(filename); + check(ifstrm, data, nchunks, delim); + ifstrm.close(); + } + + int main() + { + test01(); + return 0; + } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/11.cc gcc-3.4.1/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/11.cc *** gcc-3.4.0/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/11.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/11.cc 2004-05-25 22:13:25.000000000 +0000 *************** *** 0 **** --- 1,83 ---- + // Copyright (C) 2004 Free Software Foundation + // + // 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + // 21.3.7.9 inserters and extractors + + #include + #include + #include + #include + + using namespace std; + + wstring prepare(wstring::size_type len, unsigned nchunks) + { + wstring ret; + for (unsigned i = 0; i < nchunks; ++i) + { + for (wstring::size_type j = 0; j < len; ++j) + ret.push_back(L'a' + rand() % 26); + len *= 2; + ret.push_back(L' '); + } + return ret; + } + + void check(wistream& stream, const wstring& str, unsigned nchunks) + { + bool test __attribute__((unused)) = true; + + wstring chunk; + wstring::size_type index = 0, index_new = 0; + unsigned n = 0; + + while (stream >> chunk) + { + index_new = str.find(L' ', index); + VERIFY( !str.compare(index, index_new - index, chunk) ); + index = index_new + 1; + ++n; + } + VERIFY( stream.eof() ); + VERIFY( n == nchunks ); + } + + // istream& operator>>(istream&, string&) + void test01() + { + const char filename[] = "inserters_extractors-3.txt"; + + const unsigned nchunks = 10; + const wstring data = prepare(666, nchunks); + + wofstream ofstrm; + ofstrm.open(filename); + ofstrm.write(data.data(), data.size()); + ofstrm.close(); + + wifstream ifstrm; + ifstrm.open(filename); + check(ifstrm, data, nchunks); + ifstrm.close(); + } + + int main() + { + test01(); + return 0; + } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/1.cc gcc-3.4.1/libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/1.cc *** gcc-3.4.0/libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/1.cc 2003-09-23 20:02:11.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/1.cc 2004-04-30 04:20:25.000000000 +0000 *************** *** 1,6 **** // 1999-06-03 bkoz ! // Copyright (C) 1999, 2000, 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 ---- // 1999-06-03 bkoz ! // Copyright (C) 1999, 2000, 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 *************** void test01(void) *** 56,61 **** --- 56,62 ---- const char str_lit1[] = "montara and ocean beach"; int len = sizeof(str_lit1) + sizeof(array1) - 1; // two terminating chars char array2[len]; + std::char_traits::copy(array2, "boracay, philippines", len); VERIFY( str_lit1[0] == 'm' ); c1 = array2[0]; diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/21_strings/char_traits/requirements/short/1.cc gcc-3.4.1/libstdc++-v3/testsuite/21_strings/char_traits/requirements/short/1.cc *** gcc-3.4.0/libstdc++-v3/testsuite/21_strings/char_traits/requirements/short/1.cc 2003-09-23 20:02:12.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/21_strings/char_traits/requirements/short/1.cc 2004-04-30 04:20:26.000000000 +0000 *************** *** 1,7 **** // 1999-06-03 bkoz // 2003-07-22 Matt Austern ! // Copyright (C) 1999, 2000, 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,7 ---- // 1999-06-03 bkoz // 2003-07-22 Matt Austern ! // Copyright (C) 1999, 2000, 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 *************** void test02(void) *** 76,82 **** --- 76,84 ---- int len = sizeof(str_lit1)/sizeof(short) + sizeof(array1)/sizeof(short) - 1; // two terminating chars + short array3[] = {'b', 'o', 'r', 'a', 'c', 'a', 'y', ',', ' ', 'p', 'h', 'i', 'l', 'i', 'p', 'p', 'i', 'n', 'e', 's', 0}; short array2[len]; + std::char_traits::copy(array2, array3, len); VERIFY( str_lit1[0] == 'm' ); c1 = array2[0]; diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/21_strings/char_traits/requirements/wchar_t/1.cc gcc-3.4.1/libstdc++-v3/testsuite/21_strings/char_traits/requirements/wchar_t/1.cc *** gcc-3.4.0/libstdc++-v3/testsuite/21_strings/char_traits/requirements/wchar_t/1.cc 2003-09-23 20:02:12.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/21_strings/char_traits/requirements/wchar_t/1.cc 2004-04-30 04:20:26.000000000 +0000 *************** *** 1,6 **** // 1999-06-03 bkoz ! // Copyright (C) 1999, 2000, 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 ---- // 1999-06-03 bkoz ! // Copyright (C) 1999, 2000, 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 *************** void test02(void) *** 56,61 **** --- 56,62 ---- const wchar_t str_lit1[] = L"montara and ocean beach"; int len = sizeof(str_lit1) + sizeof(array1) - 1; // two terminating chars wchar_t array2[len]; + std::char_traits::copy(array2, L"boracay, philippines", len); VERIFY( str_lit1[0] == 'm' ); c1 = array2[0]; diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/22_locale/money_get/get/char/1.cc gcc-3.4.1/libstdc++-v3/testsuite/22_locale/money_get/get/char/1.cc *** gcc-3.4.0/libstdc++-v3/testsuite/22_locale/money_get/get/char/1.cc 2004-03-18 17:37:27.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/22_locale/money_get/get/char/1.cc 2004-05-24 20:49:54.000000000 +0000 *************** void test01() *** 53,59 **** iterator_type is_it01(iss); string result1; ios_base::iostate err01 = ios_base::goodbit; ! mon_get.get(is_it01, end, true, iss, err01, result1); VERIFY( result1 == digits1 ); VERIFY( err01 == ios_base::eofbit ); --- 53,59 ---- iterator_type is_it01(iss); string result1; ios_base::iostate err01 = ios_base::goodbit; ! mon_get.get(is_it01, end, true, iss, err01, result1); // xxx VERIFY( result1 == digits1 ); VERIFY( err01 == ios_base::eofbit ); diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/22_locale/num_put/put/char/14220.cc gcc-3.4.1/libstdc++-v3/testsuite/22_locale/num_put/put/char/14220.cc *** gcc-3.4.0/libstdc++-v3/testsuite/22_locale/num_put/put/char/14220.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/22_locale/num_put/put/char/14220.cc 2004-04-30 17:46:52.000000000 +0000 *************** *** 0 **** --- 1,49 ---- + // 2004-04-30 Paolo Carlini + + // Copyright (C) 2004 Free Software Foundation + // + // 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + // 22.2.2.2.1 num_put members + + #include + #include + #include + + // libstdc++/14220 + void test01() + { + using namespace std; + bool test __attribute__((unused)) = true; + + ostringstream oss; + const num_put& np = use_facet >(oss.getloc()); + + int precision = 10; + + oss.precision(precision); + oss.setf(ios_base::fixed); + np.put(oss.rdbuf(), oss, '+', 1.0); + string result = oss.str(); + VERIFY( result.size() > precision ); + } + + int main() + { + test01(); + return 0; + } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/22_locale/num_put/put/char/15565.cc gcc-3.4.1/libstdc++-v3/testsuite/22_locale/num_put/put/char/15565.cc *** gcc-3.4.0/libstdc++-v3/testsuite/22_locale/num_put/put/char/15565.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/22_locale/num_put/put/char/15565.cc 2004-05-27 15:37:15.000000000 +0000 *************** *** 0 **** --- 1,63 ---- + // Copyright (C) 2004 Free Software Foundation + // + // 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + // 22.2.2.2.1 num_put members + + #include + #include + #include + + // libstdc++/15565 + void test01() + { + using namespace std; + bool test __attribute__((unused)) = true; + + // basic construction + locale loc_c = locale::classic(); + + // sanity check the data is correct. + const string empty; + + // cache the num_put facet + ostringstream oss; + oss.imbue(loc_c); + const num_put& np = use_facet >(oss.getloc()); + + unsigned long ul1 = 42UL; + oss.str(empty); + oss.clear(); + oss.setf(ios_base::showpos); + np.put(oss.rdbuf(), oss, ' ', ul1); + VERIFY( oss.str() == "42" ); + + #ifdef _GLIBCXX_USE_LONG_LONG + unsigned long long ull1 = 31ULL; + oss.str(empty); + oss.clear(); + oss.setf(ios_base::showpos); + np.put(oss.rdbuf(), oss, ' ', ull1); + VERIFY( oss.str() == "31" ); + #endif + } + + int main() + { + test01(); + return 0; + } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/14220.cc gcc-3.4.1/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/14220.cc *** gcc-3.4.0/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/14220.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/14220.cc 2004-04-30 17:46:52.000000000 +0000 *************** *** 0 **** --- 1,49 ---- + // 2004-04-30 Paolo Carlini + + // Copyright (C) 2004 Free Software Foundation + // + // 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + // 22.2.2.2.1 num_put members + + #include + #include + #include + + // libstdc++/14220 + void test01() + { + using namespace std; + bool test __attribute__((unused)) = true; + + wostringstream oss; + const num_put& np = use_facet >(oss.getloc()); + + int precision = 10; + + oss.precision(precision); + oss.setf(ios_base::fixed); + np.put(oss.rdbuf(), oss, L'+', 1.0); + wstring result = oss.str(); + VERIFY( result.size() > precision ); + } + + int main() + { + test01(); + return 0; + } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/15565.cc gcc-3.4.1/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/15565.cc *** gcc-3.4.0/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/15565.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/15565.cc 2004-05-27 15:37:15.000000000 +0000 *************** *** 0 **** --- 1,63 ---- + // Copyright (C) 2004 Free Software Foundation + // + // 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + // 22.2.2.2.1 num_put members + + #include + #include + #include + + // libstdc++/15565 + void test01() + { + using namespace std; + bool test __attribute__((unused)) = true; + + // basic construction + locale loc_c = locale::classic(); + + // sanity check the data is correct. + const wstring empty; + + // cache the num_put facet + wostringstream oss; + oss.imbue(loc_c); + const num_put& np = use_facet >(oss.getloc()); + + unsigned long ul1 = 42UL; + oss.str(empty); + oss.clear(); + oss.setf(ios_base::showpos); + np.put(oss.rdbuf(), oss, L' ', ul1); + VERIFY( oss.str() == L"42" ); + + #ifdef _GLIBCXX_USE_LONG_LONG + unsigned long long ull1 = 31ULL; + oss.str(empty); + oss.clear(); + oss.setf(ios_base::showpos); + np.put(oss.rdbuf(), oss, L' ', ull1); + VERIFY( oss.str() == L"31" ); + #endif + } + + int main() + { + test01(); + return 0; + } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/1.cc gcc-3.4.1/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/1.cc *** gcc-3.4.0/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/1.cc 2003-09-23 20:02:32.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/1.cc 2004-05-27 15:37:15.000000000 +0000 *************** *** 1,6 **** // 2001-11-19 Benjamin Kosnik ! // Copyright (C) 2001, 2002, 2003 Free Software Foundation // // 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 ---- // 2001-11-19 Benjamin Kosnik ! // Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation // // 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 *************** void test01() *** 65,77 **** // bool, simple iterator_type os_it00 = oss.rdbuf(); ! iterator_type os_it01 = np.put(os_it00, oss, '+', b1); result1 = oss.str(); VERIFY( result1 == L"1" ); // VERIFY( os_it00 != os_it01 ); oss.str(empty); ! np.put(oss.rdbuf(), oss, '+', b0); result2 = oss.str(); VERIFY( result2 == L"0" ); --- 65,77 ---- // bool, simple iterator_type os_it00 = oss.rdbuf(); ! iterator_type os_it01 = np.put(os_it00, oss, L'+', b1); result1 = oss.str(); VERIFY( result1 == L"1" ); // VERIFY( os_it00 != os_it01 ); oss.str(empty); ! np.put(oss.rdbuf(), oss, L'+', b0); result2 = oss.str(); VERIFY( result2 == L"0" ); *************** void test01() *** 81,87 **** oss.clear(); oss.width(20); oss.setf(ios_base::left, ios_base::adjustfield); ! np.put(oss.rdbuf(), oss, '+', ul1); result1 = oss.str(); VERIFY( result1 == L"1.294.967.294+++++++" ); --- 81,87 ---- oss.clear(); oss.width(20); oss.setf(ios_base::left, ios_base::adjustfield); ! np.put(oss.rdbuf(), oss, L'+', ul1); result1 = oss.str(); VERIFY( result1 == L"1.294.967.294+++++++" ); *************** void test01() *** 90,96 **** oss.clear(); oss.width(20); oss.setf(ios_base::left, ios_base::adjustfield); ! np.put(oss.rdbuf(), oss, '+', d1); result1 = oss.str(); VERIFY( result1 == L"1,79769e+308++++++++" ); --- 90,96 ---- oss.clear(); oss.width(20); oss.setf(ios_base::left, ios_base::adjustfield); ! np.put(oss.rdbuf(), oss, L'+', d1); result1 = oss.str(); VERIFY( result1 == L"1,79769e+308++++++++" ); *************** void test01() *** 98,104 **** oss.clear(); oss.width(20); oss.setf(ios_base::right, ios_base::adjustfield); ! np.put(oss.rdbuf(), oss, '+', d2); result1 = oss.str(); VERIFY( result1 == L"++++++++2,22507e-308" ); --- 98,104 ---- oss.clear(); oss.width(20); oss.setf(ios_base::right, ios_base::adjustfield); ! np.put(oss.rdbuf(), oss, L'+', d2); result1 = oss.str(); VERIFY( result1 == L"++++++++2,22507e-308" ); *************** void test01() *** 107,113 **** oss.width(20); oss.setf(ios_base::right, ios_base::adjustfield); oss.setf(ios_base::scientific, ios_base::floatfield); ! np.put(oss.rdbuf(), oss, '+', d2); result2 = oss.str(); VERIFY( result2 == L"+++++++2,225074e-308" ); --- 107,113 ---- oss.width(20); oss.setf(ios_base::right, ios_base::adjustfield); oss.setf(ios_base::scientific, ios_base::floatfield); ! np.put(oss.rdbuf(), oss, L'+', d2); result2 = oss.str(); VERIFY( result2 == L"+++++++2,225074e-308" ); *************** void test01() *** 118,131 **** oss.setf(ios_base::right, ios_base::adjustfield); oss.setf(ios_base::scientific, ios_base::floatfield); oss.setf(ios_base::uppercase); ! np.put(oss.rdbuf(), oss, '+', d2); result1 = oss.str(); VERIFY( result1 == L"+++2,2250738585E-308" ); // long double oss.str(empty); oss.clear(); ! np.put(oss.rdbuf(), oss, '+', ld1); result1 = oss.str(); VERIFY( result1 == L"1,7976931349E+308" ); --- 118,131 ---- oss.setf(ios_base::right, ios_base::adjustfield); oss.setf(ios_base::scientific, ios_base::floatfield); oss.setf(ios_base::uppercase); ! np.put(oss.rdbuf(), oss, L'+', d2); result1 = oss.str(); VERIFY( result1 == L"+++2,2250738585E-308" ); // long double oss.str(empty); oss.clear(); ! np.put(oss.rdbuf(), oss, L'+', ld1); result1 = oss.str(); VERIFY( result1 == L"1,7976931349E+308" ); *************** void test01() *** 133,146 **** oss.clear(); oss.precision(0); oss.setf(ios_base::fixed, ios_base::floatfield); ! np.put(oss.rdbuf(), oss, '+', ld2); result1 = oss.str(); VERIFY( result1 == L"0" ); // const void oss.str(empty); oss.clear(); ! np.put(oss.rdbuf(), oss, '+', cv); result1 = oss.str(); // No grouping characters. VERIFY( !char_traits::find(result1.c_str(), --- 133,146 ---- oss.clear(); oss.precision(0); oss.setf(ios_base::fixed, ios_base::floatfield); ! np.put(oss.rdbuf(), oss, L'+', ld2); result1 = oss.str(); VERIFY( result1 == L"0" ); // const void oss.str(empty); oss.clear(); ! np.put(oss.rdbuf(), oss, L'+', cv); result1 = oss.str(); // No grouping characters. VERIFY( !char_traits::find(result1.c_str(), *************** void test01() *** 154,160 **** oss.str(empty); oss.clear(); ! np.put(oss.rdbuf(), oss, '+', ll1); result1 = oss.str(); VERIFY( result1 == L"9.223.372.036.854.775.807" ); #endif --- 154,160 ---- oss.str(empty); oss.clear(); ! np.put(oss.rdbuf(), oss, L'+', ll1); result1 = oss.str(); VERIFY( result1 == L"9.223.372.036.854.775.807" ); #endif *************** int main() *** 165,169 **** test01(); return 0; } - - --- 165,167 ---- diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/2.cc gcc-3.4.1/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/2.cc *** gcc-3.4.0/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/2.cc 2003-09-23 20:02:32.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/2.cc 2004-05-27 15:37:15.000000000 +0000 *************** *** 1,6 **** // 2001-11-19 Benjamin Kosnik ! // Copyright (C) 2001, 2002, 2003 Free Software Foundation // // 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 ---- // 2001-11-19 Benjamin Kosnik ! // Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation // // 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 *************** void test02() *** 61,67 **** oss.str(empty); oss.width(20); oss.setf(ios_base::right, ios_base::adjustfield); ! np.put(oss.rdbuf(), oss, '+', b0); result1 = oss.str(); VERIFY( result1 == L"+++++++++++++++++++0" ); --- 61,67 ---- oss.str(empty); oss.width(20); oss.setf(ios_base::right, ios_base::adjustfield); ! np.put(oss.rdbuf(), oss, L'+', b0); result1 = oss.str(); VERIFY( result1 == L"+++++++++++++++++++0" ); *************** void test02() *** 69,75 **** oss.width(20); oss.setf(ios_base::left, ios_base::adjustfield); oss.setf(ios_base::boolalpha); ! np.put(oss.rdbuf(), oss, '+', b1); result2 = oss.str(); VERIFY( result2 == L"true++++++++++++++++" ); --- 69,75 ---- oss.width(20); oss.setf(ios_base::left, ios_base::adjustfield); oss.setf(ios_base::boolalpha); ! np.put(oss.rdbuf(), oss, L'+', b1); result2 = oss.str(); VERIFY( result2 == L"true++++++++++++++++" ); *************** void test02() *** 77,83 **** oss.imbue(loc_c); oss.str(empty); oss.clear(); ! np.put(oss.rdbuf(), oss, '+', ul1); result1 = oss.str(); VERIFY( result1 == L"1294967294" ); --- 77,83 ---- oss.imbue(loc_c); oss.str(empty); oss.clear(); ! np.put(oss.rdbuf(), oss, L'+', ul1); result1 = oss.str(); VERIFY( result1 == L"1294967294" ); *************** void test02() *** 85,91 **** oss.clear(); oss.width(20); oss.setf(ios_base::left, ios_base::adjustfield); ! np.put(oss.rdbuf(), oss, '+', ul2); result1 = oss.str(); VERIFY( result1 == L"0+++++++++++++++++++" ); } --- 85,91 ---- oss.clear(); oss.width(20); oss.setf(ios_base::left, ios_base::adjustfield); ! np.put(oss.rdbuf(), oss, L'+', ul2); result1 = oss.str(); VERIFY( result1 == L"0+++++++++++++++++++" ); } *************** int main() *** 95,99 **** test02(); return 0; } - - --- 95,97 ---- diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/3.cc gcc-3.4.1/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/3.cc *** gcc-3.4.0/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/3.cc 2003-09-23 20:02:32.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/3.cc 2004-05-27 15:37:15.000000000 +0000 *************** *** 1,6 **** // 2001-11-19 Benjamin Kosnik ! // Copyright (C) 2001, 2002, 2003 Free Software Foundation // // 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 ---- // 2001-11-19 Benjamin Kosnik ! // Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation // // 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 *************** void test03() *** 58,64 **** // long, in a locale that expects grouping oss.str(empty); oss.clear(); ! np.put(oss.rdbuf(), oss, '+', l1); result1 = oss.str(); VERIFY( result1 == L"2,147,483,647" ); --- 58,64 ---- // long, in a locale that expects grouping oss.str(empty); oss.clear(); ! np.put(oss.rdbuf(), oss, L'+', l1); result1 = oss.str(); VERIFY( result1 == L"2,147,483,647" ); *************** void test03() *** 66,72 **** oss.clear(); oss.width(20); oss.setf(ios_base::left, ios_base::adjustfield); ! np.put(oss.rdbuf(), oss, '+', l2); result1 = oss.str(); VERIFY( result1 == L"-2,147,483,647++++++" ); } --- 66,72 ---- oss.clear(); oss.width(20); oss.setf(ios_base::left, ios_base::adjustfield); ! np.put(oss.rdbuf(), oss, L'+', l2); result1 = oss.str(); VERIFY( result1 == L"-2,147,483,647++++++" ); } *************** int main() *** 76,80 **** test03(); return 0; } - - --- 76,78 ---- diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/4.cc gcc-3.4.1/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/4.cc *** gcc-3.4.0/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/4.cc 2004-03-18 17:37:36.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/4.cc 2004-05-27 15:37:15.000000000 +0000 *************** void test04() *** 53,59 **** // 01 put(long) const long l = 1798; res = x; ! iter_type ret1 = tp.put(res.begin(), oss, ' ', l); wstring sanity1(res.begin(), ret1); VERIFY( res == L"1798xxxxxxxxxxxxxx" ); VERIFY( sanity1 == L"1798" ); --- 53,59 ---- // 01 put(long) const long l = 1798; res = x; ! iter_type ret1 = tp.put(res.begin(), oss, L' ', l); wstring sanity1(res.begin(), ret1); VERIFY( res == L"1798xxxxxxxxxxxxxx" ); VERIFY( sanity1 == L"1798" ); *************** void test04() *** 61,67 **** // 02 put(long double) const long double ld = 1798.0; res = x; ! iter_type ret2 = tp.put(res.begin(), oss, ' ', ld); wstring sanity2(res.begin(), ret2); VERIFY( res == L"1798xxxxxxxxxxxxxx" ); VERIFY( sanity2 == L"1798" ); --- 61,67 ---- // 02 put(long double) const long double ld = 1798.0; res = x; ! iter_type ret2 = tp.put(res.begin(), oss, L' ', ld); wstring sanity2(res.begin(), ret2); VERIFY( res == L"1798xxxxxxxxxxxxxx" ); VERIFY( sanity2 == L"1798" ); *************** void test04() *** 69,75 **** // 03 put(bool) bool b = 1; res = x; ! iter_type ret3 = tp.put(res.begin(), oss, ' ', b); wstring sanity3(res.begin(), ret3); VERIFY( res == L"1xxxxxxxxxxxxxxxxx" ); VERIFY( sanity3 == L"1" ); --- 69,75 ---- // 03 put(bool) bool b = 1; res = x; ! iter_type ret3 = tp.put(res.begin(), oss, L' ', b); wstring sanity3(res.begin(), ret3); VERIFY( res == L"1xxxxxxxxxxxxxxxxx" ); VERIFY( sanity3 == L"1" ); *************** void test04() *** 77,83 **** b = 0; res = x; oss.setf(ios_base::boolalpha); ! iter_type ret4 = tp.put(res.begin(), oss, ' ', b); wstring sanity4(res.begin(), ret4); VERIFY( res == L"falsexxxxxxxxxxxxx" ); VERIFY( sanity4 == L"false" ); --- 77,83 ---- b = 0; res = x; oss.setf(ios_base::boolalpha); ! iter_type ret4 = tp.put(res.begin(), oss, L' ', b); wstring sanity4(res.begin(), ret4); VERIFY( res == L"falsexxxxxxxxxxxxx" ); VERIFY( sanity4 == L"false" ); *************** void test04() *** 87,93 **** const void* cv = &ld; res = x; oss.setf(ios_base::fixed, ios_base::floatfield); ! iter_type ret5 = tp.put(res.begin(), oss, ' ', cv); wstring sanity5(res.begin(), ret5); VERIFY( sanity5.size() ); VERIFY( sanity5[1] == L'x' ); --- 87,93 ---- const void* cv = &ld; res = x; oss.setf(ios_base::fixed, ios_base::floatfield); ! iter_type ret5 = tp.put(res.begin(), oss, L' ', cv); wstring sanity5(res.begin(), ret5); VERIFY( sanity5.size() ); VERIFY( sanity5[1] == L'x' ); *************** int main() *** 98,102 **** test04(); return 0; } - - --- 98,100 ---- diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/5.cc gcc-3.4.1/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/5.cc *** gcc-3.4.0/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/5.cc 2003-09-23 20:02:32.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/5.cc 2004-05-27 15:37:16.000000000 +0000 *************** *** 1,6 **** // 2001-11-19 Benjamin Kosnik ! // Copyright (C) 2001, 2002, 2003 Free Software Foundation // // 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 ---- // 2001-11-19 Benjamin Kosnik ! // Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation // // 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 *************** void test05() *** 48,54 **** oss.clear(); oss.setf(ios::showbase); oss.setf(ios::hex, ios::basefield); ! np.put(oss.rdbuf(), oss, '+', l); result = oss.str(); VERIFY( result == L"0" ); --- 48,54 ---- oss.clear(); oss.setf(ios::showbase); oss.setf(ios::hex, ios::basefield); ! np.put(oss.rdbuf(), oss, L'+', l); result = oss.str(); VERIFY( result == L"0" ); *************** void test05() *** 56,62 **** oss.clear(); oss.setf(ios::showbase); oss.setf(ios::oct, ios::basefield); ! np.put(oss.rdbuf(), oss, '+', l); result = oss.str(); VERIFY( result == L"0" ); } --- 56,62 ---- oss.clear(); oss.setf(ios::showbase); oss.setf(ios::oct, ios::basefield); ! np.put(oss.rdbuf(), oss, L'+', l); result = oss.str(); VERIFY( result == L"0" ); } *************** int main() *** 66,70 **** test05(); return 0; } - - --- 66,68 ---- diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/6.cc gcc-3.4.1/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/6.cc *** gcc-3.4.0/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/6.cc 2003-09-23 20:02:32.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/6.cc 2004-05-27 15:37:16.000000000 +0000 *************** *** 1,6 **** // 2003-02-05 Paolo Carlini ! // Copyright (C) 2003 Free Software Foundation // // 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 ---- // 2003-02-05 Paolo Carlini ! // Copyright (C) 2003, 2004 Free Software Foundation // // 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 *************** void test01() *** 38,50 **** woss1.precision(-1); woss1.setf(ios_base::fixed, ios_base::floatfield); ! np1.put(woss1.rdbuf(), woss1, '+', 30.5); result1 = woss1.str(); VERIFY( result1 == L"30.500000" ); woss2.precision(0); woss2.setf(ios_base::scientific, ios_base::floatfield); ! np2.put(woss2.rdbuf(), woss2, '+', 1.0); result2 = woss2.str(); VERIFY( result2 == L"1e+00" ); } --- 38,50 ---- woss1.precision(-1); woss1.setf(ios_base::fixed, ios_base::floatfield); ! np1.put(woss1.rdbuf(), woss1, L'+', 30.5); result1 = woss1.str(); VERIFY( result1 == L"30.500000" ); woss2.precision(0); woss2.setf(ios_base::scientific, ios_base::floatfield); ! np2.put(woss2.rdbuf(), woss2, L'+', 1.0); result2 = woss2.str(); VERIFY( result2 == L"1e+00" ); } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/8.cc gcc-3.4.1/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/8.cc *** gcc-3.4.0/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/8.cc 2003-11-17 08:39:57.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/8.cc 2004-05-27 15:37:16.000000000 +0000 *************** *** 1,4 **** ! // Copyright (C) 2003 Free Software Foundation // // 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) 2003, 2004 Free Software Foundation // // 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 *************** void test01() *** 51,63 **** long inum = 123; double fnum = 123.456; ! np.put(oss.rdbuf(), oss, '+', inum); result = oss.str(); VERIFY( result == L"XYZ" ); oss.clear(); oss.str(empty); ! np.put(oss.rdbuf(), oss, '+', fnum); result = oss.str(); VERIFY( result == L"XYZ.ABC" ); } --- 51,63 ---- long inum = 123; double fnum = 123.456; ! np.put(oss.rdbuf(), oss, L'+', inum); result = oss.str(); VERIFY( result == L"XYZ" ); oss.clear(); oss.str(empty); ! np.put(oss.rdbuf(), oss, L'+', fnum); result = oss.str(); VERIFY( result == L"XYZ.ABC" ); } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/4.cc gcc-3.4.1/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/4.cc *** gcc-3.4.0/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/4.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/4.cc 2004-04-24 18:43:50.000000000 +0000 *************** *** 0 **** --- 1,59 ---- + // 2004-04-24 Paolo Carlini + + // Copyright (C) 2004 Free Software Foundation + // + // 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + // 22.2.5.1.1 time_get members + + #include + #include + #include + + void test01() + { + using namespace std; + bool test __attribute__((unused)) = true; + + typedef istreambuf_iterator iterator_type; + + const ios_base::iostate good = ios_base::goodbit; + ios_base::iostate errorstate = good; + + // basic construction + locale loc_c = locale::classic(); + + iterator_type end; + istringstream iss; + iss.imbue(loc_c); + const time_get& tim_get = + use_facet >(iss.getloc()); + + iss.str("Jul"); + iterator_type is_it01(iss); + tm time01; + errorstate = good; + tim_get.get_monthname(is_it01, end, iss, errorstate, &time01); + VERIFY( time01.tm_mon == 6 ); + VERIFY( errorstate == ios_base::eofbit ); + } + + int main() + { + test01(); + return 0; + } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/4.cc gcc-3.4.1/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/4.cc *** gcc-3.4.0/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/4.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/4.cc 2004-04-24 18:43:51.000000000 +0000 *************** *** 0 **** --- 1,59 ---- + // 2004-04-24 Paolo Carlini + + // Copyright (C) 2004 Free Software Foundation + // + // 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + // 22.2.5.1.1 time_get members + + #include + #include + #include + + void test01() + { + using namespace std; + bool test __attribute__((unused)) = true; + + typedef istreambuf_iterator iterator_type; + + const ios_base::iostate good = ios_base::goodbit; + ios_base::iostate errorstate = good; + + // basic construction + locale loc_c = locale::classic(); + + iterator_type end; + wistringstream iss; + iss.imbue(loc_c); + const time_get& tim_get = + use_facet >(iss.getloc()); + + iss.str(L"Jul"); + iterator_type is_it01(iss); + tm time01; + errorstate = good; + tim_get.get_monthname(is_it01, end, iss, errorstate, &time01); + VERIFY( time01.tm_mon == 6 ); + VERIFY( errorstate == ios_base::eofbit ); + } + + int main() + { + test01(); + return 0; + } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/23_containers/bitset/cons/16020.cc gcc-3.4.1/libstdc++-v3/testsuite/23_containers/bitset/cons/16020.cc *** gcc-3.4.0/libstdc++-v3/testsuite/23_containers/bitset/cons/16020.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/23_containers/bitset/cons/16020.cc 2004-06-18 21:56:14.000000000 +0000 *************** *** 0 **** --- 1,42 ---- + // Copyright (C) 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + #include + #include + + // libstdc++/16020 + void test01() + { + using __gnu_debug::bitset; + bool test __attribute__((unused)) = true; + + bitset<5> b(7); + bitset<5> c; + + bitset<5> bb(b); + c = bb; + + VERIFY( bb == b ); + VERIFY( c == bb ); + } + + int main() + { + test01(); + return 0; + } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/23_containers/bitset/ext/15361.cc gcc-3.4.1/libstdc++-v3/testsuite/23_containers/bitset/ext/15361.cc *** gcc-3.4.0/libstdc++-v3/testsuite/23_containers/bitset/ext/15361.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/23_containers/bitset/ext/15361.cc 2004-05-14 19:13:47.000000000 +0000 *************** *** 0 **** --- 1,40 ---- + // Copyright (C) 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + #include + #include + + // libstdc++/15361 + void test01() + { + using namespace std; + bool test __attribute__((unused)) = true; + + bitset<256> b; + b.set(225); + b.set(226); + + VERIFY( b._Find_first() == 225 ); + VERIFY( b._Find_next(225) == 226 ); + } + + int main() + { + test01(); + return 0; + } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/23_containers/deque/14340.cc gcc-3.4.1/libstdc++-v3/testsuite/23_containers/deque/14340.cc *** gcc-3.4.0/libstdc++-v3/testsuite/23_containers/deque/14340.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/23_containers/deque/14340.cc 2004-05-18 18:41:20.000000000 +0000 *************** *** 0 **** --- 1,42 ---- + // -*- C++ -*- + + // Copyright (C) 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + // As a special exception, you may use this file as part of a free software + // library without restriction. Specifically, if other files instantiate + // templates or use macros or inline functions from this file, or you compile + // this file and link it with other files to produce an executable, this + // file does not by itself cause the resulting executable to be covered by + // the GNU General Public License. This exception does not however + // invalidate any other reasons why the executable file might be covered by + // the GNU General Public License. + + #include + #include + + // { dg-options "-D_GLIBCXX_DEBUG" } + // { dg-do compile } + + // libstdc++/14340 + int main() + { + typedef std::deque container; + __gnu_test::conversion::iterator_to_const_iterator(); + return 0; + } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/23_containers/deque/cons/clear_allocator.cc gcc-3.4.1/libstdc++-v3/testsuite/23_containers/deque/cons/clear_allocator.cc *** gcc-3.4.0/libstdc++-v3/testsuite/23_containers/deque/cons/clear_allocator.cc 2004-03-30 18:22:16.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/23_containers/deque/cons/clear_allocator.cc 2004-05-24 18:36:45.000000000 +0000 *************** template *** 31,50 **** struct rebind { typedef clear_alloc other; }; ! virtual void clear() { } ! clear_alloc() { } ! clear_alloc(clear_alloc const& _wa) { } template ! clear_alloc(clear_alloc const& _wa) { } ! virtual ~clear_alloc() { this->clear(); } T* allocate(typename new_allocator::size_type n, const void *hint = 0) --- 31,50 ---- struct rebind { typedef clear_alloc other; }; ! virtual void clear() throw() { } ! clear_alloc() throw() { } ! clear_alloc(clear_alloc const& _wa) throw() { } template ! clear_alloc(clear_alloc const& _wa) throw() { } ! virtual ~clear_alloc() throw() { this->clear(); } T* allocate(typename new_allocator::size_type n, const void *hint = 0) diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/23_containers/list/14340.cc gcc-3.4.1/libstdc++-v3/testsuite/23_containers/list/14340.cc *** gcc-3.4.0/libstdc++-v3/testsuite/23_containers/list/14340.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/23_containers/list/14340.cc 2004-05-18 18:41:21.000000000 +0000 *************** *** 0 **** --- 1,42 ---- + // -*- C++ -*- + + // Copyright (C) 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + // As a special exception, you may use this file as part of a free software + // library without restriction. Specifically, if other files instantiate + // templates or use macros or inline functions from this file, or you compile + // this file and link it with other files to produce an executable, this + // file does not by itself cause the resulting executable to be covered by + // the GNU General Public License. This exception does not however + // invalidate any other reasons why the executable file might be covered by + // the GNU General Public License. + + #include + #include + + // { dg-options "-D_GLIBCXX_DEBUG" } + // { dg-do compile } + + // libstdc++/14340 + int main() + { + typedef std::list container; + __gnu_test::conversion::iterator_to_const_iterator(); + return 0; + } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/23_containers/list/cons/clear_allocator.cc gcc-3.4.1/libstdc++-v3/testsuite/23_containers/list/cons/clear_allocator.cc *** gcc-3.4.0/libstdc++-v3/testsuite/23_containers/list/cons/clear_allocator.cc 2004-03-30 18:22:16.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/23_containers/list/cons/clear_allocator.cc 2004-05-24 18:36:46.000000000 +0000 *************** template *** 31,50 **** struct rebind { typedef clear_alloc other; }; ! virtual void clear() { } ! clear_alloc() { } ! clear_alloc(clear_alloc const& _wa) { } template ! clear_alloc(clear_alloc const& _wa) { } ! virtual ~clear_alloc() { this->clear(); } T* allocate(typename new_allocator::size_type n, const void *hint = 0) --- 31,50 ---- struct rebind { typedef clear_alloc other; }; ! virtual void clear() throw() { } ! clear_alloc() throw() { } ! clear_alloc(clear_alloc const& _wa) throw() { } template ! clear_alloc(clear_alloc const& _wa) throw() { } ! virtual ~clear_alloc() throw() { this->clear(); } T* allocate(typename new_allocator::size_type n, const void *hint = 0) diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/23_containers/map/14340.cc gcc-3.4.1/libstdc++-v3/testsuite/23_containers/map/14340.cc *** gcc-3.4.0/libstdc++-v3/testsuite/23_containers/map/14340.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/23_containers/map/14340.cc 2004-05-18 18:41:21.000000000 +0000 *************** *** 0 **** --- 1,42 ---- + // -*- C++ -*- + + // Copyright (C) 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + // As a special exception, you may use this file as part of a free software + // library without restriction. Specifically, if other files instantiate + // templates or use macros or inline functions from this file, or you compile + // this file and link it with other files to produce an executable, this + // file does not by itself cause the resulting executable to be covered by + // the GNU General Public License. This exception does not however + // invalidate any other reasons why the executable file might be covered by + // the GNU General Public License. + + #include + #include + + // { dg-options "-D_GLIBCXX_DEBUG" } + // { dg-do compile } + + // libstdc++/14340 + int main() + { + typedef std::map container; + __gnu_test::conversion::iterator_to_const_iterator(); + return 0; + } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/23_containers/map/modifiers/swap.cc gcc-3.4.1/libstdc++-v3/testsuite/23_containers/map/modifiers/swap.cc *** gcc-3.4.0/libstdc++-v3/testsuite/23_containers/map/modifiers/swap.cc 2004-03-18 17:37:45.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/23_containers/map/modifiers/swap.cc 2004-05-17 21:56:58.000000000 +0000 *************** *** 21,26 **** --- 21,29 ---- struct T { int i; }; + // T must be LessThanComparable to pass concept-checks + bool operator<(T l, T r) { return l.i < r.i; } + int swap_calls; namespace std diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/23_containers/multimap/14340.cc gcc-3.4.1/libstdc++-v3/testsuite/23_containers/multimap/14340.cc *** gcc-3.4.0/libstdc++-v3/testsuite/23_containers/multimap/14340.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/23_containers/multimap/14340.cc 2004-05-18 18:41:22.000000000 +0000 *************** *** 0 **** --- 1,42 ---- + // -*- C++ -*- + + // Copyright (C) 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + // As a special exception, you may use this file as part of a free software + // library without restriction. Specifically, if other files instantiate + // templates or use macros or inline functions from this file, or you compile + // this file and link it with other files to produce an executable, this + // file does not by itself cause the resulting executable to be covered by + // the GNU General Public License. This exception does not however + // invalidate any other reasons why the executable file might be covered by + // the GNU General Public License. + + #include + #include + + // { dg-options "-D_GLIBCXX_DEBUG" } + // { dg-do compile } + + // libstdc++/14340 + int main() + { + typedef std::multimap container; + __gnu_test::conversion::iterator_to_const_iterator(); + return 0; + } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/23_containers/multimap/modifiers/swap.cc gcc-3.4.1/libstdc++-v3/testsuite/23_containers/multimap/modifiers/swap.cc *** gcc-3.4.0/libstdc++-v3/testsuite/23_containers/multimap/modifiers/swap.cc 2004-03-18 17:37:46.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/23_containers/multimap/modifiers/swap.cc 2004-05-17 21:56:58.000000000 +0000 *************** *** 21,26 **** --- 21,29 ---- struct T { int i; }; + // T must be LessThanComparable to pass concept-checks + bool operator<(T l, T r) { return l.i < r.i; } + int swap_calls; namespace std diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/23_containers/multiset/14340.cc gcc-3.4.1/libstdc++-v3/testsuite/23_containers/multiset/14340.cc *** gcc-3.4.0/libstdc++-v3/testsuite/23_containers/multiset/14340.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/23_containers/multiset/14340.cc 2004-05-18 18:41:22.000000000 +0000 *************** *** 0 **** --- 1,42 ---- + // -*- C++ -*- + + // Copyright (C) 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + // As a special exception, you may use this file as part of a free software + // library without restriction. Specifically, if other files instantiate + // templates or use macros or inline functions from this file, or you compile + // this file and link it with other files to produce an executable, this + // file does not by itself cause the resulting executable to be covered by + // the GNU General Public License. This exception does not however + // invalidate any other reasons why the executable file might be covered by + // the GNU General Public License. + + #include + #include + + // { dg-options "-D_GLIBCXX_DEBUG" } + // { dg-do compile } + + // libstdc++/14340 + int main() + { + typedef std::multiset container; + __gnu_test::conversion::iterator_to_const_iterator(); + return 0; + } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/23_containers/multiset/modifiers/swap.cc gcc-3.4.1/libstdc++-v3/testsuite/23_containers/multiset/modifiers/swap.cc *** gcc-3.4.0/libstdc++-v3/testsuite/23_containers/multiset/modifiers/swap.cc 2004-03-18 17:37:47.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/23_containers/multiset/modifiers/swap.cc 2004-05-17 21:56:58.000000000 +0000 *************** *** 21,26 **** --- 21,29 ---- struct T { int i; }; + // T must be LessThanComparable to pass concept-checks + bool operator<(T l, T r) { return l.i < r.i; } + int swap_calls; namespace std diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/23_containers/set/14340.cc gcc-3.4.1/libstdc++-v3/testsuite/23_containers/set/14340.cc *** gcc-3.4.0/libstdc++-v3/testsuite/23_containers/set/14340.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/23_containers/set/14340.cc 2004-05-18 18:41:23.000000000 +0000 *************** *** 0 **** --- 1,42 ---- + // -*- C++ -*- + + // Copyright (C) 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + // As a special exception, you may use this file as part of a free software + // library without restriction. Specifically, if other files instantiate + // templates or use macros or inline functions from this file, or you compile + // this file and link it with other files to produce an executable, this + // file does not by itself cause the resulting executable to be covered by + // the GNU General Public License. This exception does not however + // invalidate any other reasons why the executable file might be covered by + // the GNU General Public License. + + #include + #include + + // { dg-options "-D_GLIBCXX_DEBUG" } + // { dg-do compile } + + // libstdc++/14340 + int main() + { + typedef std::set container; + __gnu_test::conversion::iterator_to_const_iterator(); + return 0; + } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/23_containers/set/modifiers/swap.cc gcc-3.4.1/libstdc++-v3/testsuite/23_containers/set/modifiers/swap.cc *** gcc-3.4.0/libstdc++-v3/testsuite/23_containers/set/modifiers/swap.cc 2004-03-18 17:37:49.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/23_containers/set/modifiers/swap.cc 2004-05-17 21:56:59.000000000 +0000 *************** *** 21,26 **** --- 21,29 ---- struct T { int i; }; + // T must be LessThanComparable to pass concept-checks + bool operator<(T l, T r) { return l.i < r.i; } + int swap_calls; namespace std diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/23_containers/vector/14340.cc gcc-3.4.1/libstdc++-v3/testsuite/23_containers/vector/14340.cc *** gcc-3.4.0/libstdc++-v3/testsuite/23_containers/vector/14340.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/23_containers/vector/14340.cc 2004-05-18 18:41:24.000000000 +0000 *************** *** 0 **** --- 1,42 ---- + // -*- C++ -*- + + // Copyright (C) 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + // As a special exception, you may use this file as part of a free software + // library without restriction. Specifically, if other files instantiate + // templates or use macros or inline functions from this file, or you compile + // this file and link it with other files to produce an executable, this + // file does not by itself cause the resulting executable to be covered by + // the GNU General Public License. This exception does not however + // invalidate any other reasons why the executable file might be covered by + // the GNU General Public License. + + #include + #include + + // { dg-options "-D_GLIBCXX_DEBUG" } + // { dg-do compile } + + // libstdc++/14340 + int main() + { + typedef std::vector container; + __gnu_test::conversion::iterator_to_const_iterator(); + return 0; + } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/23_containers/vector/cons/clear_allocator.cc gcc-3.4.1/libstdc++-v3/testsuite/23_containers/vector/cons/clear_allocator.cc *** gcc-3.4.0/libstdc++-v3/testsuite/23_containers/vector/cons/clear_allocator.cc 2004-03-30 18:22:17.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/23_containers/vector/cons/clear_allocator.cc 2004-05-24 18:36:47.000000000 +0000 *************** template *** 31,50 **** struct rebind { typedef clear_alloc other; }; ! virtual void clear() { } ! clear_alloc() { } ! clear_alloc(clear_alloc const& _wa) { } template ! clear_alloc(clear_alloc const& _wa) { } ! virtual ~clear_alloc() { this->clear(); } T* allocate(typename new_allocator::size_type n, const void *hint = 0) --- 31,50 ---- struct rebind { typedef clear_alloc other; }; ! virtual void clear() throw() { } ! clear_alloc() throw() { } ! clear_alloc(clear_alloc const& _wa) throw() { } template ! clear_alloc(clear_alloc const& _wa) throw() { } ! virtual ~clear_alloc() throw() { this->clear(); } T* allocate(typename new_allocator::size_type n, const void *hint = 0) diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_filebuf/2.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_filebuf/2.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_filebuf/2.cc 2003-07-24 21:07:53.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_filebuf/2.cc 2004-04-30 04:20:26.000000000 +0000 *************** *** 1,6 **** // 1999-01-17 bkoz test functionality of basic_filebuf for char_type == char ! // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free --- 1,6 ---- // 1999-01-17 bkoz test functionality of basic_filebuf for char_type == char ! // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free *************** *** 30,38 **** // test05 // libstdc++/1886 // should be able to instantiate basic_filebuf for non-standard types. ! namespace test { - using namespace std; using __gnu_test::pod_char; typedef short type_t; template class basic_filebuf >; --- 30,37 ---- // test05 // libstdc++/1886 // should be able to instantiate basic_filebuf for non-standard types. ! namespace std { using __gnu_test::pod_char; typedef short type_t; template class basic_filebuf >; diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-4.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-4.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-4.cc 2003-11-26 15:56:39.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-4.cc 2004-04-30 04:20:26.000000000 +0000 *************** protected: *** 33,39 **** }; // libstdc++/13171 ! int test01() { bool test __attribute__((unused)) = true; using namespace std; --- 33,39 ---- }; // libstdc++/13171 ! void test01() { bool test __attribute__((unused)) = true; using namespace std; *************** int test01() *** 51,54 **** --- 51,55 ---- int main() { test01(); + return 0; } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/14975-1.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/14975-1.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/14975-1.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/14975-1.cc 2004-04-29 10:26:43.000000000 +0000 *************** *** 0 **** --- 1,67 ---- + // 2004-04-16 Petur Runolfsson + + // Copyright (C) 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + // 27.8.1.4 Overridden virtual functions + + #include + #include + #include + + class Buf : public std::filebuf + { + protected: + virtual int_type + overflow(int_type c = traits_type::eof()) + { + return traits_type::eq_int_type(c, traits_type::eof()) ? + traits_type::eof() : std::filebuf::overflow(c); + } + }; + + // libstdc++/14975 + void test01() + { + using namespace std; + bool test __attribute__((unused)) = true; + + Buf fb; + locale loc_us = __gnu_test::try_named_locale("en_US"); + fb.pubimbue(loc_us); + fb.open("tmp_14975-1", ios_base::out); + + try + { + fb.sputc('a'); + fb.sputc('b'); + fb.pubimbue(locale::classic()); + fb.sputc('c'); + fb.pubsync(); + fb.close(); + } + catch (std::exception&) + { + } + } + + int main() + { + test01(); + return 0; + } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-3.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-3.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-3.cc 2004-01-11 15:17:02.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-3.cc 2004-04-30 04:20:27.000000000 +0000 *************** *** 25,31 **** #include // libstdc++/13582 ! int test01() { bool test __attribute__((unused)) = true; using namespace std; --- 25,31 ---- #include // libstdc++/13582 ! void test01() { bool test __attribute__((unused)) = true; using namespace std; diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc 2004-04-29 10:26:43.000000000 +0000 *************** *** 0 **** --- 1,83 ---- + // 2004-04-16 Petur Runolfsson + + // Copyright (C) 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + #include + #include + #include + #include + #include + #include + #include + #include + + // libstdc++/14975 + void test01() + { + using namespace std; + using namespace __gnu_test; + bool test __attribute__((unused)) = true; + + locale loc_us = try_named_locale("en_US"); + + const char* name = "tmp_14975-2"; + + signal(SIGPIPE, SIG_IGN); + + unlink(name); + try_mkfifo(name, S_IRWXU); + + int child = fork(); + VERIFY( child != -1 ); + + if (child == 0) + { + filebuf fbin; + fbin.open(name, ios_base::in); + sleep(2); + exit(0); + } + + wfilebuf fb; + fb.pubimbue(loc_us); + sleep(1); + wfilebuf* ret = fb.open(name, ios_base::out); + VERIFY( ret != NULL ); + VERIFY( fb.is_open() ); + + sleep(3); + + try + { + fb.sputc(L'a'); + fb.sputc(L'b'); + fb.pubimbue(locale::classic()); + fb.sputc(L'c'); + fb.close(); + } + catch (std::exception&) + { + } + } + + int main() + { + test01(); + return 0; + } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_fstream/2.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_fstream/2.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_fstream/2.cc 2003-07-24 21:07:57.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_fstream/2.cc 2004-04-30 04:20:27.000000000 +0000 *************** *** 1,6 **** // 2002-07-25 Benjamin Kosnik ! // Copyright (C) 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 ---- // 2002-07-25 Benjamin Kosnik ! // Copyright (C) 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 *************** *** 35,43 **** // { dg-do compile } ! namespace test { - using namespace std; using __gnu_test::pod_char; typedef short type_t; template class basic_fstream >; --- 35,42 ---- // { dg-do compile } ! namespace std { using __gnu_test::pod_char; typedef short type_t; template class basic_fstream >; diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_ifstream/2.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_ifstream/2.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_ifstream/2.cc 2003-04-10 07:15:29.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_ifstream/2.cc 2004-04-30 04:20:27.000000000 +0000 *************** *** 1,6 **** // 2002-07-25 Benjamin Kosnik ! // Copyright (C) 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 ---- // 2002-07-25 Benjamin Kosnik ! // Copyright (C) 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,42 **** // { dg-do compile } ! namespace test { - using namespace std; typedef short type_t; template class basic_ifstream >; } // test --- 34,41 ---- // { dg-do compile } ! namespace std { typedef short type_t; template class basic_ifstream >; } // test diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_ios/2.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_ios/2.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_ios/2.cc 2003-04-10 07:15:29.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_ios/2.cc 2004-04-30 04:20:28.000000000 +0000 *************** *** 1,6 **** // 2002-07-25 Benjamin Kosnik ! // Copyright (C) 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 ---- // 2002-07-25 Benjamin Kosnik ! // Copyright (C) 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,42 **** // { dg-do compile } ! namespace test { - using namespace std; typedef short type_t; template class basic_ios >; } // test --- 34,41 ---- // { dg-do compile } ! namespace std { typedef short type_t; template class basic_ios >; } // test diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_iostream/2.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_iostream/2.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_iostream/2.cc 2003-04-10 07:15:30.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_iostream/2.cc 2004-04-30 04:20:28.000000000 +0000 *************** *** 1,6 **** // 2002-01-08 bkoz ! // Copyright (C) 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 ---- // 2002-01-08 bkoz ! // Copyright (C) 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,42 **** #include ! namespace test { - using namespace std; typedef short type_t; template class basic_iostream >; } // test --- 34,41 ---- #include ! namespace std { typedef short type_t; template class basic_iostream >; } // test diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_istream/2.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_istream/2.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_istream/2.cc 2003-07-24 21:07:58.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_istream/2.cc 2004-04-30 04:20:28.000000000 +0000 *************** *** 1,6 **** // 1999-09-20 bkoz ! // Copyright (C) 1999, 2000, 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,7 ---- // 1999-09-20 bkoz ! // Copyright (C) 1999, 2000, 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 *************** *** 35,43 **** // { dg-do compile } ! namespace test { - using namespace std; using __gnu_test::pod_char; typedef short type_t; template class basic_istream >; --- 36,43 ---- // { dg-do compile } ! namespace std { using __gnu_test::pod_char; typedef short type_t; template class basic_istream >; diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc 2003-10-27 21:43:33.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc 2004-04-30 04:20:28.000000000 +0000 *************** *** 1,4 **** ! // Copyright (C) 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,4 ---- ! // Copyright (C) 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 *************** void testthrow(T arg) *** 54,60 **** } catch(...) { ! VERIFY( test = false ); } } --- 54,61 ---- } catch(...) { ! test = false; ! VERIFY( test ); } } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/4.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/4.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/4.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/4.cc 2004-05-09 23:27:56.000000000 +0000 *************** *** 0 **** --- 1,108 ---- + // Copyright (C) 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + // As a special exception, you may use this file as part of a free software + // library without restriction. Specifically, if other files instantiate + // templates or use macros or inline functions from this file, or you compile + // this file and link it with other files to produce an executable, this + // file does not by itself cause the resulting executable to be covered by + // the GNU General Public License. This exception does not however + // invalidate any other reasons why the executable file might be covered by + // the GNU General Public License. + + // 27.6.1.3 unformatted input functions + + #include // for strlen + #include + #include + + class Inbuf : public std::streambuf + { + static const char buf[]; + const char* current; + int size; + + public: + Inbuf() + { + current = buf; + size = std::strlen(buf); + } + + int_type underflow() + { + if (current < buf + size) + return traits_type::to_int_type(*current); + return traits_type::eof(); + } + + int_type uflow() + { + if (current < buf + size) + return traits_type::to_int_type(*current++); + return traits_type::eof(); + } + }; + + const char Inbuf::buf[] = "1234567890abcdefghij"; + + void test01() + { + using namespace std; + bool test __attribute__((unused)) = true; + + typedef char_traits traits_type; + + Inbuf inbuf1; + istream is(&inbuf1); + + char buffer[10]; + traits_type::assign(buffer, sizeof(buffer), 'X'); + + is.getline(buffer, sizeof(buffer), '0'); + VERIFY( is.rdstate() == ios_base::goodbit ); + VERIFY( !traits_type::compare(buffer, "123456789\0", sizeof(buffer)) ); + VERIFY( is.gcount() == 10 ); + + is.clear(); + traits_type::assign(buffer, sizeof(buffer), 'X'); + is.getline(buffer, sizeof(buffer)); + VERIFY( is.rdstate() == ios_base::failbit ); + VERIFY( !traits_type::compare(buffer, "abcdefghi\0", sizeof(buffer)) ); + VERIFY( is.gcount() == 9 ); + + is.clear(); + traits_type::assign(buffer, sizeof(buffer), 'X'); + is.getline(buffer, sizeof(buffer)); + VERIFY( is.rdstate() == ios_base::eofbit ); + VERIFY( !traits_type::compare(buffer, "j\0XXXXXXXX", sizeof(buffer)) ); + VERIFY( is.gcount() == 1 ); + + is.clear(); + traits_type::assign(buffer, sizeof(buffer), 'X'); + is.getline(buffer, sizeof(buffer)); + VERIFY( is.rdstate() == (ios_base::eofbit | ios_base::failbit) ); + VERIFY( !traits_type::compare(buffer, "\0XXXXXXXXX", sizeof(buffer)) ); + VERIFY( is.gcount() == 0 ); + } + + int main() + { + test01(); + return 0; + } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/5.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/5.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/5.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/5.cc 2004-05-25 22:13:26.000000000 +0000 *************** *** 0 **** --- 1,85 ---- + // Copyright (C) 2004 Free Software Foundation + // + // 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + // 27.6.1.3 unformatted input functions + + #include + #include + #include + #include + + using namespace std; + + string prepare(string::size_type len, unsigned nchunks, char delim) + { + string ret; + for (unsigned i = 0; i < nchunks; ++i) + { + for (string::size_type j = 0; j < len; ++j) + ret.push_back('a' + rand() % 26); + len *= 2; + ret.push_back(delim); + } + return ret; + } + + void check(istream& stream, const string& str, unsigned nchunks, char delim) + { + bool test __attribute__((unused)) = true; + + char buf[1000000]; + string::size_type index = 0, index_new = 0; + unsigned n = 0; + + while (stream.getline(buf, sizeof(buf), delim)) + { + index_new = str.find(delim, index); + VERIFY( stream.gcount() == index_new - index + 1 ); + VERIFY( !str.compare(index, index_new - index, buf) ); + index = index_new + 1; + ++n; + } + VERIFY( stream.gcount() == 0 ); + VERIFY( stream.eof() ); + VERIFY( n == nchunks ); + } + + void test01() + { + const char filename[] = "istream_getline.txt"; + + const char delim = '|'; + const unsigned nchunks = 10; + const string data = prepare(777, nchunks, delim); + + ofstream ofstrm; + ofstrm.open(filename); + ofstrm.write(data.data(), data.size()); + ofstrm.close(); + + ifstream ifstrm; + ifstrm.open(filename); + check(ifstrm, data, nchunks, delim); + ifstrm.close(); + } + + int main() + { + test01(); + return 0; + } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/2.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/2.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/2.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/2.cc 2004-05-25 22:13:27.000000000 +0000 *************** *** 0 **** --- 1,84 ---- + // Copyright (C) 2004 Free Software Foundation + // + // 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + // 27.6.1.3 unformatted input functions + + #include + #include + #include + #include + #include + + using namespace std; + + string prepare(string::size_type len, unsigned nchunks, char delim) + { + string ret; + for (unsigned i = 0; i < nchunks; ++i) + { + for (string::size_type j = 0; j < len; ++j) + ret.push_back('a' + rand() % 26); + len *= 2; + ret.push_back(delim); + } + return ret; + } + + void check(istream& stream, const string& str, unsigned nchunks, char delim) + { + bool test __attribute__((unused)) = true; + + string::size_type index = 0, index_new = 0; + unsigned n = 0; + + while (stream.ignore(numeric_limits::max(), delim).good()) + { + index_new = str.find(delim, index); + VERIFY( stream.gcount() == index_new - index + 1 ); + index = index_new + 1; + ++n; + } + VERIFY( stream.gcount() == 0 ); + VERIFY( !stream.fail() ); + VERIFY( n == nchunks ); + } + + void test01() + { + const char filename[] = "istream_ignore.txt"; + + const char delim = '|'; + const unsigned nchunks = 10; + const string data = prepare(555, nchunks, delim); + + ofstream ofstrm; + ofstrm.open(filename); + ofstrm.write(data.data(), data.size()); + ofstrm.close(); + + ifstream ifstrm; + ifstrm.open(filename); + check(ifstrm, data, nchunks, delim); + ifstrm.close(); + } + + int main() + { + test01(); + return 0; + } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/exceptions_badbit_throw.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/exceptions_badbit_throw.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/exceptions_badbit_throw.cc 2003-11-27 08:14:23.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_istream/seekg/char/exceptions_badbit_throw.cc 2004-04-30 04:20:29.000000000 +0000 *************** *** 1,4 **** ! // Copyright (C) 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,4 ---- ! // Copyright (C) 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 *************** void test02() *** 67,73 **** istream stream(&bib); stream.exceptions(ios_base::badbit); ! istream::off_type off; try { --- 67,73 ---- istream stream(&bib); stream.exceptions(ios_base::badbit); ! istream::off_type off(5); try { diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_istringstream/2.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_istringstream/2.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_istringstream/2.cc 2003-04-10 07:15:32.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_istringstream/2.cc 2004-04-30 04:20:29.000000000 +0000 *************** *** 1,6 **** // 2002-07-25 Benjamin Kosnik ! // Copyright (C) 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 ---- // 2002-07-25 Benjamin Kosnik ! // Copyright (C) 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,42 **** // { dg-do compile } ! namespace test { - using namespace std; typedef short type_t; template class basic_istringstream >; } // test --- 34,41 ---- // { dg-do compile } ! namespace std { typedef short type_t; template class basic_istringstream >; } // test diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_istringstream/str/char/1.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_istringstream/str/char/1.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_istringstream/str/char/1.cc 2003-09-23 20:03:11.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_istringstream/str/char/1.cc 2004-04-30 04:20:29.000000000 +0000 *************** *** 1,6 **** // 2000-01-10 bkoz ! // Copyright (C) 2000, 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 ---- // 2000-01-10 bkoz ! // Copyright (C) 2000, 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 *************** void test01() *** 48,54 **** state1 = is01.rdstate(); is01 >> a; state2 = is01.rdstate(); ! VERIFY( a = i01 ); // 22.2.2.1.2 num_get virtual functions // p 13 // in any case, if stage 2 processing was terminated by the test for --- 48,54 ---- state1 = is01.rdstate(); is01 >> a; state2 = is01.rdstate(); ! VERIFY( a == i01 ); // 22.2.2.1.2 num_get virtual functions // p 13 // in any case, if stage 2 processing was terminated by the test for diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_ofstream/2.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_ofstream/2.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_ofstream/2.cc 2003-04-10 07:15:32.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_ofstream/2.cc 2004-04-30 04:20:29.000000000 +0000 *************** *** 1,6 **** // 2002-07-25 Benjamin Kosnik ! // Copyright (C) 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 ---- // 2002-07-25 Benjamin Kosnik ! // Copyright (C) 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,42 **** // { dg-do compile } ! namespace test { - using namespace std; typedef short type_t; template class basic_ifstream >; } // test --- 34,41 ---- // { dg-do compile } ! namespace std { typedef short type_t; template class basic_ifstream >; } // test diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_ostream/2.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_ostream/2.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_ostream/2.cc 2003-07-24 21:07:58.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_ostream/2.cc 2004-04-30 04:20:30.000000000 +0000 *************** *** 1,6 **** // 1999-09-20 bkoz ! // Copyright (C) 1999, 2000, 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,7 ---- // 1999-09-20 bkoz ! // Copyright (C) 1999, 2000, 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 *************** *** 35,43 **** // { dg-do compile } ! namespace test { - using namespace std; using __gnu_test::pod_char; typedef short type_t; template class basic_ostream >; --- 36,43 ---- // { dg-do compile } ! namespace std { using __gnu_test::pod_char; typedef short type_t; template class basic_ostream >; diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/exceptions_badbit_throw.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/exceptions_badbit_throw.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/exceptions_badbit_throw.cc 2003-11-27 08:14:24.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/exceptions_badbit_throw.cc 2004-04-30 04:20:30.000000000 +0000 *************** *** 1,6 **** // 2003-03-08 Jerry Quinn ! // Copyright (C) 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 ---- // 2003-03-08 Jerry Quinn ! // Copyright (C) 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 *************** void test_badbit() *** 39,45 **** try { ! T i; stream << i; VERIFY( false ); } --- 39,45 ---- try { ! T i = T(); stream << i; VERIFY( false ); } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/exceptions_failbit_throw.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/exceptions_failbit_throw.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/exceptions_failbit_throw.cc 2003-11-27 08:14:24.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/exceptions_failbit_throw.cc 2004-04-30 04:20:30.000000000 +0000 *************** *** 1,4 **** ! // Copyright (C) 2003 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free --- 1,4 ---- ! // Copyright (C) 2003, 2004 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free *************** void test_failbit() *** 45,51 **** try { ! T i; stream << i; } catch (const ios_base::failure&) --- 45,51 ---- try { ! T i = T(); stream << i; } catch (const ios_base::failure&) diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_ostream/seekp/char/exceptions_badbit_throw.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_ostream/seekp/char/exceptions_badbit_throw.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_ostream/seekp/char/exceptions_badbit_throw.cc 2003-11-27 08:14:24.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_ostream/seekp/char/exceptions_badbit_throw.cc 2004-04-30 04:20:30.000000000 +0000 *************** *** 1,4 **** ! // Copyright (C) 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,4 ---- ! // Copyright (C) 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 *************** void test01() *** 40,46 **** ostream stream(&bib); stream.exceptions(ios_base::badbit); ! ostream::pos_type pos; try { --- 40,46 ---- ostream stream(&bib); stream.exceptions(ios_base::badbit); ! ostream::pos_type pos = ostream::pos_type(); try { *************** void test02() *** 67,73 **** ostream stream(&bib); stream.exceptions(ios_base::badbit); ! ostream::off_type off; try { --- 67,73 ---- ostream stream(&bib); stream.exceptions(ios_base::badbit); ! ostream::off_type off(5); try { diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_ostringstream/2.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_ostringstream/2.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_ostringstream/2.cc 2003-04-10 07:15:34.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_ostringstream/2.cc 2004-04-30 04:20:30.000000000 +0000 *************** *** 1,6 **** // 2002-07-25 Benjamin Kosnik ! // Copyright (C) 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 ---- // 2002-07-25 Benjamin Kosnik ! // Copyright (C) 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,42 **** // { dg-do compile } ! namespace test { - using namespace std; typedef short type_t; template class basic_ostringstream >; } // test --- 34,41 ---- // { dg-do compile } ! namespace std { typedef short type_t; template class basic_ostringstream >; } // test diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_streambuf/2.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_streambuf/2.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_streambuf/2.cc 2003-07-24 21:07:59.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_streambuf/2.cc 2004-04-30 04:20:31.000000000 +0000 *************** *** 1,6 **** // 2002-07-25 Benjamin Kosnik ! // Copyright (C) 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 ---- // 2002-07-25 Benjamin Kosnik ! // Copyright (C) 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 *************** *** 35,43 **** // { dg-do compile } ! namespace test { - using namespace std; using __gnu_test::pod_char; typedef short type_t; template class basic_streambuf >; --- 35,42 ---- // { dg-do compile } ! namespace std { using __gnu_test::pod_char; typedef short type_t; template class basic_streambuf >; diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_stringbuf/1.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_stringbuf/1.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_stringbuf/1.cc 2003-07-24 21:07:59.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_stringbuf/1.cc 2004-04-30 04:20:31.000000000 +0000 *************** void test01() *** 47,61 **** typedef test_type::off_type off_type; } - namespace test - { - using namespace std; - using __gnu_test::pod_char; - typedef short type_t; - template class basic_stringbuf >; - template class basic_stringbuf >; - } // test - int main() { test01(); --- 47,52 ---- diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_stringbuf/2.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_stringbuf/2.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_stringbuf/2.cc 2003-07-24 21:07:59.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_stringbuf/2.cc 2004-04-30 04:20:31.000000000 +0000 *************** *** 1,6 **** // 1999-01-17 bkoz test functionality of basic_filebuf for char_type == char ! // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free --- 1,6 ---- // 1999-01-17 bkoz test functionality of basic_filebuf for char_type == char ! // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free *************** *** 30,43 **** // test05 // libstdc++/1886 // should be able to instantiate basic_stringbuf for non-standard types. ! namespace test { - using namespace std; using __gnu_test::pod_char; typedef short type_t; template class basic_stringbuf >; template class basic_stringbuf >; ! } // test // more surf!!! --- 30,42 ---- // test05 // libstdc++/1886 // should be able to instantiate basic_stringbuf for non-standard types. ! namespace std { using __gnu_test::pod_char; typedef short type_t; template class basic_stringbuf >; template class basic_stringbuf >; ! } // std // more surf!!! diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_stringbuf/4.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_stringbuf/4.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_stringbuf/4.cc 2003-07-24 21:07:59.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_stringbuf/4.cc 2004-04-30 04:20:31.000000000 +0000 *************** *** 1,6 **** // 2003-04-07 bkoz ! // Copyright (C) 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 ---- // 2003-04-07 bkoz ! // Copyright (C) 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 *************** *** 27,35 **** // { dg-do compile } ! namespace test { - using namespace std; using __gnu_test::pod_char; typedef __gnu_test::tracker_alloc alloc_type; template class basic_stringbuf, alloc_type>; --- 27,34 ---- // { dg-do compile } ! namespace std { using __gnu_test::pod_char; typedef __gnu_test::tracker_alloc alloc_type; template class basic_stringbuf, alloc_type>; diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_stringstream/2.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_stringstream/2.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_stringstream/2.cc 2003-07-24 21:08:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_stringstream/2.cc 2004-04-30 04:20:31.000000000 +0000 *************** *** 1,6 **** // 2002-07-25 Benjamin Kosnik ! // Copyright (C) 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 ---- // 2002-07-25 Benjamin Kosnik ! // Copyright (C) 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 *************** *** 35,45 **** // { dg-do compile } ! namespace test { - using namespace std; using __gnu_test::pod_char; typedef short type_t; template class basic_stringstream >; template class basic_stringstream >; ! } // test --- 35,44 ---- // { dg-do compile } ! namespace std { using __gnu_test::pod_char; typedef short type_t; template class basic_stringstream >; template class basic_stringstream >; ! } // std diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/1.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/1.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/1.cc 2003-09-23 20:03:25.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/basic_stringstream/str/char/1.cc 2004-04-30 04:20:32.000000000 +0000 *************** *** 1,6 **** // 2001-05-24 Benjamin Kosnik ! // 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 ---- // 2001-05-24 Benjamin Kosnik ! // 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 *************** void test01() *** 48,54 **** state1 = is01.rdstate(); is01 >> a; state2 = is01.rdstate(); ! VERIFY( a = i01 ); // 22.2.2.1.2 num_get virtual functions // p 13 // in any case, if stage 2 processing was terminated by the test for --- 48,54 ---- state1 = is01.rdstate(); is01 >> a; state2 = is01.rdstate(); ! VERIFY( a == i01 ); // 22.2.2.1.2 num_get virtual functions // p 13 // in any case, if stage 2 processing was terminated by the test for diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/fpos/14320-3.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/fpos/14320-3.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/fpos/14320-3.cc 2004-03-04 09:47:22.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/fpos/14320-3.cc 2004-04-30 04:20:32.000000000 +0000 *************** *** 24,30 **** #include // libstdc++/14320 ! int test01() { using namespace std; bool test __attribute__((unused)) = true; --- 24,30 ---- #include // libstdc++/14320 ! void test01() { using namespace std; bool test __attribute__((unused)) = true; diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/fpos/14775.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/fpos/14775.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/fpos/14775.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/fpos/14775.cc 2004-05-14 10:53:26.000000000 +0000 *************** *** 0 **** --- 1,55 ---- + // 2004-03-31 Paolo Carlini + + // Copyright (C) 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + // 27.4.3 fpos + + #include + #include + + #define TWO_GB 2147483648UL + + // Basic test for LFS support. + void test01() + { + #ifdef _GLIBCXX_USE_LFS + using namespace std; + bool test __attribute__((unused)) = true; + + typedef filebuf::pos_type pos_type; + typedef filebuf::off_type off_type; + + __gnu_test::set_file_limit(TWO_GB + 200); + + basic_filebuf fb; + fb.open("14775_tmp", ios_base::out | ios_base::in | ios_base::trunc); + + pos_type ret = fb.pubseekoff(TWO_GB + 100, ios_base::beg); + VERIFY( ret != pos_type(off_type(-1)) ); + + fb.close(); + #endif + } + + int main() + { + test01(); + return 0; + } + diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/fpos/1.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/fpos/1.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/fpos/1.cc 2003-07-24 21:08:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/fpos/1.cc 2004-04-30 04:20:32.000000000 +0000 *************** *** 1,4 **** ! // Copyright (C) 2003 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free --- 1,4 ---- ! // Copyright (C) 2003, 2004 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free *************** *** 25,38 **** // { dg-do compile } ! namespace test { - using namespace std; using __gnu_test::pod_char; typedef short type_t; template class fpos; template class fpos; ! } // test // more surf!!! --- 25,37 ---- // { dg-do compile } ! namespace std { using __gnu_test::pod_char; typedef short type_t; template class fpos; template class fpos; ! } // std // more surf!!! diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/ios_base/storage/2.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/ios_base/storage/2.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/ios_base/storage/2.cc 2004-03-18 17:37:59.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/ios_base/storage/2.cc 2004-04-30 04:20:32.000000000 +0000 *************** void test02() *** 58,64 **** } catch(...) { ! VERIFY( test = false ); } VERIFY( v == 0 ); --- 58,65 ---- } catch(...) { ! test = false; ! VERIFY( test ); } VERIFY( v == 0 ); *************** void test02() *** 77,83 **** } catch(...) { ! VERIFY( test = false ); } VERIFY( v == &test ); --- 78,85 ---- } catch(...) { ! test = false; ! VERIFY( test ); } VERIFY( v == &test ); *************** void test02() *** 96,102 **** } catch(...) { ! VERIFY( test = false ); } VERIFY( l == 0 ); --- 98,105 ---- } catch(...) { ! test = false; ! VERIFY( test ); } VERIFY( l == 0 ); *************** void test02() *** 115,121 **** } catch(...) { ! VERIFY( test = false ); } VERIFY( l == 1 ); --- 118,125 ---- } catch(...) { ! test = false; ! VERIFY( test ); } VERIFY( l == 1 ); diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/objects/char/9.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/objects/char/9.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/objects/char/9.cc 2003-12-29 19:28:17.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/objects/char/9.cc 2004-04-21 09:59:12.000000000 +0000 *************** *** 1,6 **** // 2003-05-01 Petur Runolfsson ! // Copyright (C) 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 ---- // 2003-05-01 Petur Runolfsson ! // Copyright (C) 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 *************** *** 18,27 **** // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, // USA. - // The ARM simulator does not provide support for "fstat", which - // causes "in_avail" to return an incorrect value. - // { dg-do run { xfail arm-none-elf } } - #include #include #include --- 18,23 ---- *************** void test09() *** 39,46 **** freopen(name, "r", stdin); ! // The number of unread characters should be 4 (a, b, c, \\n) ! VERIFY( 4 == std::cin.rdbuf()->in_avail() ); } int --- 35,42 ---- freopen(name, "r", stdin); ! // basic_streambuf::showmanyc returns 0. ! VERIFY( 0 == std::cin.rdbuf()->in_avail() ); } int diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/27_io/types/2.cc gcc-3.4.1/libstdc++-v3/testsuite/27_io/types/2.cc *** gcc-3.4.0/libstdc++-v3/testsuite/27_io/types/2.cc 2003-09-23 20:03:28.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/27_io/types/2.cc 2004-04-30 04:20:33.000000000 +0000 *************** *** 1,4 **** ! // Copyright (C) 2003 Free Software Foundation // // 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) 2003, 2004 Free Software Foundation // // 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 *************** *** 23,29 **** void test01() { ! std::streamsize ssize; std::streamoff soff; // No signed/unsigned warnings. --- 23,29 ---- void test01() { ! std::streamsize ssize = 0; std::streamoff soff; // No signed/unsigned warnings. diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/abi_check.cc gcc-3.4.1/libstdc++-v3/testsuite/abi_check.cc *** gcc-3.4.0/libstdc++-v3/testsuite/abi_check.cc 2003-07-06 03:14:37.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/abi_check.cc 2004-05-22 17:09:52.000000000 +0000 *************** *** 1,456 **** ! // Utility for libstdc++ ABI analysis -*- C++ -*- ! // Copyright (C) 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 ! // terms of the GNU General Public License as published by the ! // Free Software Foundation; either version 2, or (at your option) ! // any later version. ! // This library is distributed in the hope that it will be useful, ! // but WITHOUT ANY WARRANTY; without even the implied warranty of ! // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! // GNU General Public License for more details. ! // You should have received a copy of the GNU General Public License along ! // with this library; see the file COPYING. If not, write to the Free ! // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ! // USA. ! // As a special exception, you may use this file as part of a free software ! // library without restriction. Specifically, if other files instantiate ! // templates or use macros or inline functions from this file, or you compile ! // this file and link it with other files to produce an executable, this ! // file does not by itself cause the resulting executable to be covered by ! // the GNU General Public License. This exception does not however ! // invalidate any other reasons why the executable file might be covered by ! // the GNU General Public License. // Benjamin Kosnik // Blame subsequent hacks on Loren J. Rittle , Phil // Edwards , and a cast of dozens at libstdc++@gcc.gnu.org. ! ! #include ! #include ! #include ! #include ! #include #include - #include - #include // for system(3) #include // for access(2) - struct symbol_info - { - enum category { none, function, object, error }; - category type; - std::string name; - std::string demangled_name; - int size; - std::string version_name; - - symbol_info() : type(none), size(0) { } - - symbol_info(const symbol_info& other) - : type(other.type), name(other.name), demangled_name(other.demangled_name), - size(other.size), version_name(other.version_name) { } - }; - - namespace __gnu_cxx - { - using namespace std; - - template<> - struct hash - { - size_t operator()(const string& s) const - { - const collate& c = use_facet >(locale::classic()); - return c.hash(s.c_str(), s.c_str() + s.size()); - } - }; - } - - typedef std::deque symbol_names; - typedef __gnu_cxx::hash_map symbol_infos; - - - bool - check_version(const symbol_info& test, bool added = false) - { - typedef std::vector compat_list; - static compat_list known_versions; - if (known_versions.empty()) - { - known_versions.push_back("GLIBCPP_3.2"); // base version - known_versions.push_back("GLIBCPP_3.2.1"); - known_versions.push_back("GLIBCPP_3.2.2"); - known_versions.push_back("GLIBCPP_3.2.3"); // gcc-3.3.0 - known_versions.push_back("GLIBCXX_3.4"); - known_versions.push_back("CXXABI_1.2"); - known_versions.push_back("CXXABI_1.2.1"); - known_versions.push_back("CXXABI_1.3"); - } - compat_list::iterator begin = known_versions.begin(); - compat_list::iterator end = known_versions.end(); - - // Check version names for compatibility... - compat_list::iterator it1 = find(begin, end, test.version_name); - - // Check for weak label. - compat_list::iterator it2 = find(begin, end, test.name); - - // Check that added symbols aren't added in the base version. - bool compat = true; - if (added && test.version_name == known_versions[0]) - compat = false; - - if (it1 == end && it2 == end) - compat = false; - - return compat; - } - - bool - check_compatible(const symbol_info& lhs, const symbol_info& rhs, - bool verbose = false) - { - using namespace std; - bool ret = true; - const char tab = '\t'; - - // Check to see if symbol_infos are compatible. - if (lhs.type != rhs.type) - { - ret = false; - if (verbose) - { - cout << tab << "incompatible types" << endl; - } - } - - if (lhs.name != rhs.name) - { - ret = false; - if (verbose) - { - cout << tab << "incompatible names" << endl; - } - } - - if (lhs.size != rhs.size) - { - ret = false; - if (verbose) - { - cout << tab << "incompatible sizes" << endl; - cout << tab << lhs.size << endl; - cout << tab << rhs.size << endl; - } - } - - if (lhs.version_name != rhs.version_name - && !check_version(lhs) && !check_version(rhs)) - { - ret = false; - if (verbose) - { - cout << tab << "incompatible versions" << endl; - cout << tab << lhs.version_name << endl; - cout << tab << rhs.version_name << endl; - } - } - - if (verbose) - cout << endl; - - return ret; - } - - const char* - demangle(const std::string& mangled) - { - const char* name; - if (mangled[0] != '_' || mangled[1] != 'Z') - { - // This is not a mangled symbol, thus has "C" linkage. - name = mangled.c_str(); - } - else - { - // Use __cxa_demangle to demangle. - int status = 0; - name = abi::__cxa_demangle(mangled.c_str(), 0, 0, &status); - if (!name) - { - switch (status) - { - case 0: - name = "error code = 0: success"; - break; - case -1: - name = "error code = -1: memory allocation failure"; - break; - case -2: - name = "error code = -2: invalid mangled name"; - break; - case -3: - name = "error code = -3: invalid arguments"; - break; - default: - name = "error code unknown - who knows what happened"; - } - } - } - return name; - } - - void - line_to_symbol_info(std::string& input, symbol_info& output) - { - using namespace std; - const char delim = ':'; - const char version_delim = '@'; - const string::size_type npos = string::npos; - string::size_type n = 0; - - // Set the type. - if (input.find("FUNC") == 0) - output.type = symbol_info::function; - else if (input.find("OBJECT") == 0) - output.type = symbol_info::object; - else - output.type = symbol_info::error; - n = input.find_first_of(delim); - if (n != npos) - input.erase(input.begin(), input.begin() + n + 1); - - // Iff object, get size info. - if (output.type == symbol_info::object) - { - n = input.find_first_of(delim); - if (n != npos) - { - string size(input.begin(), input.begin() + n); - istringstream iss(size); - int x; - iss >> x; - if (!iss.fail()) - output.size = x; - input.erase(input.begin(), input.begin() + n + 1); - } - } - - // Set the name. - n = input.find_first_of(version_delim); - if (n != npos) - { - // Found version string. - output.name = string(input.begin(), input.begin() + n); - n = input.find_last_of(version_delim); - input.erase(input.begin(), input.begin() + n + 1); - - // Set version name. - output.version_name = input; - } - else - { - // No versioning info. - output.name = string(input.begin(), input.end()); - input.erase(input.begin(), input.end()); - } - - // Set the demangled name. - output.demangled_name = demangle(output.name); - } - - void - create_symbol_data(const char* file, symbol_infos& symbols, - symbol_names& names) - { - // Parse list of symbols in file into vectors of symbol_info. - // For 3.2.0 on x86/linux, this usually is - // 947 non-weak symbols - // 2084 weak symbols - using namespace std; - ifstream ifs(file); - if (ifs.is_open()) - { - // Organize input into container of symbol_info objects. - const string empty; - string line = empty; - while (getline(ifs, line).good()) - { - symbol_info symbol; - line_to_symbol_info(line, symbol); - symbols[symbol.name] = symbol; - names.push_back(symbol.name); - line = empty; - } - } - } - - void - report_symbol_info(const symbol_info& symbol, std::size_t n, bool ret = true) - { - using namespace std; - const char tab = '\t'; - - // Add any other information to display here. - cout << tab << symbol.demangled_name << endl; - cout << tab << symbol.name << endl; - cout << tab << symbol.version_name << endl; - - if (ret) - cout << endl; - } - - int main(int argc, char** argv) { using namespace std; // Get arguments. (Heading towards getopt_long, I can feel it.) - bool verbose = false; string argv1 = argc > 1 ? argv[1] : ""; if (argv1 == "--help" || argc < 4) { cerr << "usage: abi_check --check current baseline\n" " --check-verbose current baseline\n" ! " --help\n\n" ! "Where CURRENT is a file containing the current results from\n" ! "extract_symvers, and BASELINE is one from config/abi.\n" << endl; exit(1); } ! else if (argv1 == "--check-verbose") ! verbose = true; ! ! // Quick sanity/setup check for arguments. ! const char* test_file = argv[2]; ! const char* baseline_file = argv[3]; ! if (access(test_file, R_OK) != 0) ! { ! cerr << "Cannot read symbols file " << test_file ! << ", did you forget to build first?" << endl; ! exit(1); ! } ! if (access(baseline_file, R_OK) != 0) ! { ! cerr << "Cannot read baseline file " << baseline_file << endl; ! exit(1); ! } ! ! // Input both lists of symbols into container. ! symbol_infos baseline_symbols; ! symbol_names baseline_names; ! symbol_infos test_symbols; ! symbol_names test_names; ! create_symbol_data(baseline_file, baseline_symbols, baseline_names); ! create_symbol_data(test_file, test_symbols, test_names); ! ! // Sanity check results. ! const symbol_names::size_type baseline_size = baseline_names.size(); ! const symbol_names::size_type test_size = test_names.size(); ! if (!baseline_size || !test_size) ! { ! cerr << "Problems parsing the list of exported symbols." << endl; ! exit(2); ! } ! ! // Sort out names. ! // Assuming baseline_names, test_names are both unique w/ no duplicates. ! // ! // The names added to missing_names are baseline_names not found in ! // test_names ! // -> symbols that have been deleted. ! // ! // The names added to added_names are test_names are names not in ! // baseline_names ! // -> symbols that have been added. ! symbol_names shared_names; ! symbol_names missing_names; ! symbol_names added_names = test_names; ! for (size_t i = 0; i < baseline_size; ++i) { ! string what(baseline_names[i]); ! symbol_names::iterator end = added_names.end(); ! symbol_names::iterator it = find(added_names.begin(), end, what); ! if (it != end) { ! // Found. ! shared_names.push_back(what); ! added_names.erase(it); } ! else ! missing_names.push_back(what); ! } ! ! // Check missing names for compatibility. ! typedef pair symbol_pair; ! vector incompatible; ! for (size_t i = 0; i < missing_names.size(); ++i) ! { ! symbol_info base = baseline_symbols[missing_names[i]]; ! incompatible.push_back(symbol_pair(base, base)); ! } ! ! // Check shared names for compatibility. ! for (size_t i = 0; i < shared_names.size(); ++i) ! { ! symbol_info base = baseline_symbols[shared_names[i]]; ! symbol_info test = test_symbols[shared_names[i]]; ! if (!check_compatible(base, test)) ! incompatible.push_back(symbol_pair(base, test)); ! } ! ! // Check added names for compatibility. ! for (size_t i = 0; i < added_names.size(); ++i) ! { ! symbol_info test = test_symbols[added_names[i]]; ! if (!check_version(test, true)) ! incompatible.push_back(symbol_pair(test, test)); ! } ! ! // Report results. ! if (verbose && added_names.size()) ! { ! cout << added_names.size() << " added symbols " << endl; ! for (size_t j = 0; j < added_names.size() ; ++j) ! report_symbol_info(test_symbols[added_names[j]], j + 1); ! } ! ! if (verbose && missing_names.size()) ! { ! cout << missing_names.size() << " missing symbols " << endl; ! for (size_t j = 0; j < missing_names.size() ; ++j) ! report_symbol_info(baseline_symbols[missing_names[j]], j + 1); } ! if (verbose && incompatible.size()) { ! cout << incompatible.size() << " incompatible symbols " << endl; ! for (size_t j = 0; j < incompatible.size() ; ++j) { ! // First, report name. ! const symbol_info& base = incompatible[j].first; ! const symbol_info& test = incompatible[j].second; ! report_symbol_info(test, j + 1, false); ! ! // Second, report reason or reasons incompatible. ! check_compatible(base, test, true); } } - - cout << "\n\t\t=== libstdc++-v3 check-abi Summary ===" << endl; - cout << endl; - cout << "# of added symbols:\t\t " << added_names.size() << endl; - cout << "# of missing symbols:\t\t " << missing_names.size() << endl; - cout << "# of incompatible symbols:\t " << incompatible.size() << endl; - cout << endl; - cout << "using: " << baseline_file << endl; - return 0; } --- 1,94 ---- ! // -*- C++ -*- ! // Copyright (C) 2004 Free Software Foundation, Inc. ! // This library is free software; you can redistribute it and/or ! // modify it under the terms of the GNU General Public License as ! // published by the Free Software Foundation; either version 2, or (at ! // your option) any later version. ! // This library is distributed in the hope that it will be useful, but ! // WITHOUT ANY WARRANTY; without even the implied warranty of ! // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! // General Public License for more details. ! // You should have received a copy of the GNU General Public License ! // along with this library; see the file COPYING. If not, write to ! // the Free Software Foundation, 59 Temple Place - Suite 330, Boston, ! // MA 02111-1307, USA. ! ! // As a special exception, you may use this file as part of a free ! // software library without restriction. Specifically, if other files ! // instantiate templates or use macros or inline functions from this ! // file, or you compile this file and link it with other files to ! // produce an executable, this file does not by itself cause the ! // resulting executable to be covered by the GNU General Public ! // License. This exception does not however invalidate any other ! // reasons why the executable file might be covered by the GNU General ! // Public License. // Benjamin Kosnik // Blame subsequent hacks on Loren J. Rittle , Phil // Edwards , and a cast of dozens at libstdc++@gcc.gnu.org. ! ! #include "testsuite_abi.h" #include #include // for access(2) int main(int argc, char** argv) { using namespace std; // Get arguments. (Heading towards getopt_long, I can feel it.) string argv1 = argc > 1 ? argv[1] : ""; if (argv1 == "--help" || argc < 4) { cerr << "usage: abi_check --check current baseline\n" " --check-verbose current baseline\n" ! " --examine symbol current\n" ! " --help\n" ! "\n" ! "All arguments are string literals.\n" ! "CURRENT is a file generated byextract_symvers.\n" ! "BASELINE is a file from config/abi.\n" ! "SYMBOL is a mangled name.\n" << endl; exit(1); } ! ! if (argv1.find("--check") != string::npos) { ! bool verbose = false; ! if (argv1 == "--check-verbose") ! verbose = true; ! ! // Quick sanity/setup check for arguments. ! const char* test_file = argv[2]; ! const char* baseline_file = argv[3]; ! if (access(test_file, R_OK) != 0) { ! cerr << "Cannot read symbols file " << test_file ! << ", did you forget to build first?" << endl; ! exit(1); } ! if (access(baseline_file, R_OK) != 0) ! { ! cerr << "Cannot read baseline file " << baseline_file << endl; ! exit(1); ! } ! compare_symbols(baseline_file, test_file, verbose); } ! if (argv1 == "--examine") { ! const char* file = argv[3]; ! if (access(file, R_OK) != 0) { ! cerr << "Cannot read symbol file " << file << endl; ! exit(1); } + examine_symbol(argv[2], file); } return 0; } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/ext/rope/1.cc gcc-3.4.1/libstdc++-v3/testsuite/ext/rope/1.cc *** gcc-3.4.0/libstdc++-v3/testsuite/ext/rope/1.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/ext/rope/1.cc 2004-06-18 10:28:09.000000000 +0000 *************** *** 0 **** --- 1,46 ---- + // 2001-10-03 From: Dimitris Vyzovitis + + // Copyright (C) 2001, 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + // rope (SGI extension) + + #include + #include + + void test01() + { + __gnu_cxx::crope foo; + foo += "bar"; + const char* data = foo.c_str(); + std::cout << data << std::endl; + } + + #if !__GXX_WEAK__ && _MT_ALLOCATOR_H + // Explicitly instantiate for systems with no COMDAT or weak support. + template class __gnu_cxx::__mt_alloc<__gnu_cxx::_Rope_RopeLeaf > >; + template class __gnu_cxx::__mt_alloc<__gnu_cxx::_Rope_RopeFunction > >; + template class __gnu_cxx::__mt_alloc<__gnu_cxx::_Rope_RopeSubstring > >; + template class __gnu_cxx::__mt_alloc<__gnu_cxx::_Rope_RopeConcatenation > >; + #endif + + int main() + { + test01(); + return 0; + } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/ext/rope/2.cc gcc-3.4.1/libstdc++-v3/testsuite/ext/rope/2.cc *** gcc-3.4.0/libstdc++-v3/testsuite/ext/rope/2.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/ext/rope/2.cc 2004-06-18 10:28:09.000000000 +0000 *************** *** 0 **** --- 1,58 ---- + // Copyright (C) 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + // rope (SGI extension) + + #include + #include + + void + test01() + { + using namespace std; + using namespace __gnu_cxx; + bool test __attribute__((unused)) = true; + + crope r(10000, 'x'); + crope r2 = r + "abc" + r; + crope r3 = r2.substr(10000, 3); + crope r4 = r2.substr(10000, 10000); + + reverse(r2.mutable_begin(), r2.mutable_end()); + VERIFY( r2[10000] == 'c' ); + + crope r5('a'); + r5.push_front('b'); + VERIFY( r5[0] == 'b' ); + VERIFY( r5[1] == 'a' ); + } + + #if !__GXX_WEAK__ && _MT_ALLOCATOR_H + // Explicitly instantiate for systems with no COMDAT or weak support. + template class __gnu_cxx::__mt_alloc<__gnu_cxx::_Rope_RopeLeaf > >; + template class __gnu_cxx::__mt_alloc<__gnu_cxx::_Rope_RopeFunction > >; + template class __gnu_cxx::__mt_alloc<__gnu_cxx::_Rope_RopeSubstring > >; + template class __gnu_cxx::__mt_alloc<__gnu_cxx::_Rope_RopeConcatenation > >; + #endif + + int main() + { + test01(); + return 0; + } + diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/ext/rope/3.cc gcc-3.4.1/libstdc++-v3/testsuite/ext/rope/3.cc *** gcc-3.4.0/libstdc++-v3/testsuite/ext/rope/3.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/ext/rope/3.cc 2004-06-18 10:28:09.000000000 +0000 *************** *** 0 **** --- 1,108 ---- + // Copyright (C) 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + // rope (SGI extension) + + #include + #include + + const char base[] = + "Happy families are all alike; every unhappy family is unhappy in \ + its own way. \ + \ + Everything was in confusion in the Oblonskys' house. The wife \ + had discovered that the husband was carrying on an intrigue with \ + a French girl, who had been a governess in their family, and she \ + had announced to her husband that she could not go on living in \ + the same house with him. This position of affairs had now lasted \ + three days, and not only the husband and wife themselves, but all \ + the members of their family and household, were painfully \ + conscious of it. Every person in the house felt that there was \ + so sense in their living together, and that the stray people \ + brought together by chance in any inn had more in common with one \ + another than they, the members of the family and household of the \ + Oblonskys. The wife did not leave her own room, the husband had \ + not been at home for three days. The children ran wild all over \ + the house; the English governess quarreled with the housekeeper, \ + and wrote to a friend asking her to look out for a new situation \ + for her; the man-cook had walked off the day before just at \ + dinner time; the kitchen-maid, and the coachman had given \ + warning." + ; + + int baselen = sizeof(base) - 1; + + template + StringType + multiply(const StringType& s, int n) + { + StringType result; + while (n > 0) + { + result += s; + --n; + } + return result; + } + + template + StringType + mung_substrings(const StringType& s, int len, int n, int skip) + { + StringType result; + int start = 0; + while (n > 0) + { + StringType tmp = s.substr (start, len); + result += tmp; + --n; + start += skip; + } + return result; + } + + void + test01() + { + using namespace __gnu_cxx; + bool test __attribute__((unused)) = true; + + crope r; + r = multiply(crope(base), 100000); + + crope r1; + r1 = mung_substrings(r, 100000, 500, 73); + + VERIFY( r1.size() == 50000000 ); + VERIFY( r1.substr(88888, 6)[0] == 's' ); + VERIFY( r1.substr(88888, 6)[2] == 'h' ); + } + + #if !__GXX_WEAK__ && _MT_ALLOCATOR_H + // Explicitly instantiate for systems with no COMDAT or weak support. + template class __gnu_cxx::__mt_alloc<__gnu_cxx::_Rope_RopeLeaf > >; + template class __gnu_cxx::__mt_alloc<__gnu_cxx::_Rope_RopeFunction > >; + template class __gnu_cxx::__mt_alloc<__gnu_cxx::_Rope_RopeSubstring > >; + template class __gnu_cxx::__mt_alloc<__gnu_cxx::_Rope_RopeConcatenation > >; + #endif + + int main() + { + test01(); + return 0; + } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/ext/rope.cc gcc-3.4.1/libstdc++-v3/testsuite/ext/rope.cc *** gcc-3.4.0/libstdc++-v3/testsuite/ext/rope.cc 2004-03-18 17:38:07.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/ext/rope.cc 1970-01-01 00:00:00.000000000 +0000 *************** *** 1,46 **** - // 2001-10-03 From: Dimitris Vyzovitis - - // Copyright (C) 2001, 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 - // terms of the GNU General Public License as published by the - // Free Software Foundation; either version 2, or (at your option) - // any later version. - - // This library is distributed in the hope that it will be useful, - // but WITHOUT ANY WARRANTY; without even the implied warranty of - // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - // GNU General Public License for more details. - - // You should have received a copy of the GNU General Public License along - // with this library; see the file COPYING. If not, write to the Free - // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, - // USA. - - // rope (SGI extension) - - #include - #include - - void test01() - { - __gnu_cxx::crope foo; - foo += "bar"; - const char* data = foo.c_str(); - std::cout << data << std::endl; - } - - #if !__GXX_WEAK__ && _MT_ALLOCATOR_H - // Explicitly instantiate for systems with no COMDAT or weak support. - template class __gnu_cxx::__mt_alloc<__gnu_cxx::_Rope_RopeLeaf > >; - template class __gnu_cxx::__mt_alloc<__gnu_cxx::_Rope_RopeFunction > >; - template class __gnu_cxx::__mt_alloc<__gnu_cxx::_Rope_RopeSubstring > >; - template class __gnu_cxx::__mt_alloc<__gnu_cxx::_Rope_RopeConcatenation > >; - #endif - - int main() - { - test01(); - return 0; - } --- 0 ---- diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/ext/stdio_filebuf/char/1.cc gcc-3.4.1/libstdc++-v3/testsuite/ext/stdio_filebuf/char/1.cc *** gcc-3.4.0/libstdc++-v3/testsuite/ext/stdio_filebuf/char/1.cc 2003-12-05 06:54:24.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/ext/stdio_filebuf/char/1.cc 2004-04-30 04:20:33.000000000 +0000 *************** *** 1,6 **** // 2003-02-11 Paolo Carlini ! // Copyright (C) 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 ---- // 2003-02-11 Paolo Carlini ! // Copyright (C) 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 *************** *** 26,36 **** // { dg-do compile } // libstdc++/9320 ! namespace test { - using namespace std; - using __gnu_test::pod_char; typedef short type_t; ! template class __gnu_cxx::stdio_filebuf >; ! template class __gnu_cxx::stdio_filebuf >; ! } // test --- 26,34 ---- // { dg-do compile } // libstdc++/9320 ! namespace __gnu_cxx { typedef short type_t; ! template class stdio_filebuf >; ! template class stdio_filebuf<__gnu_test::pod_char, std::char_traits<__gnu_test::pod_char> >; ! } // __gnu_cxx diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12077.cc gcc-3.4.1/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12077.cc *** gcc-3.4.0/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12077.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/12077.cc 2004-04-30 04:20:33.000000000 +0000 *************** *** 0 **** --- 1,79 ---- + // Copyright (C) 2004 Free Software Foundation + // + // 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + #include + #include + #include + + // libstdc++/12077 + void test01() + { + using namespace std; + bool test __attribute__((unused)) = true; + + const char* name = "tmp_12077"; + + locale loc = __gnu_test::try_named_locale("is_IS.UTF-8"); + locale::global(loc); + wcin.imbue(loc); + + const char* str = + "\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13" + "\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20!\"#$%&" + "'()*+,-./0123456789:;<=>?@}~\x7f\xc2\x80\xc2\x81\xc2\x82\xc2" + "\x83\xc2\x84\xc2\x85\xc2\x86\xc2\x87\xc2\x88\xc2\x89\xc2\x8a" + "\xc2\x8b\xc2\x8c\xc2\x8d\xc2\x8e\xc2\x8f\xc2\x90\xc2\x91\xc2" + "\x92\xc2\x93\xc2\x94\xc2\x95\xc2\x96\xc2\x97\xc2\x98\xc2\x99" + "\xc2\x9a\xc2\x9b\xc2\x9c\xc3\xba\xc3\xbb\xc3\xbc\xc3\xbd\xc3" + "\xbe\xc3\xbf\xc4\x80\xc4\x81\xc4\x82\xc4\x83\xc4\x84\xc4\x85" + "\xc4\x86\xc4\x87\xc4\x88\xc4\x89\xc4\x8a\xc4\x8b\xc4\x8c\xc4" + "\x8d\xc4\x8e\xc4\x8f\xc4\x90\xc4\x91\xc4\x92\xc4\x93\xc4\x94" + "\xc4\x95\xc4\x96\xc4\x97\xc4\x98\xc4\x99\xdf\xb8\xdf\xb9\xdf" + "\xba\xdf\xbb\xdf\xbc\xdf\xbd\xdf\xbe\xdf\xbf\xe0\xa0\x80\xe0" + "\xa0\x81\xe0\xa0\x82\xe0\xa0\x83\xe0\xa0\x84\xe0\xa0\x85\xe0" + "\xa0\x86\xe0\xa0\x87\xe0\xa0\x88\xe0\xa0\x89\xe0\xa0\x8a\xe0" + "\xa0\x8b\xe0\xa0\x8c\xe0\xa0\x8d\xe0\xa0\x8e\xe0\xa0\x8f\xe0" + "\xa0\x90\xe0\xa0\x91\xe0\xa0\x92\xe0\xa0\x93\xe0\xa0\x94\xe0" + "\xa0\x95\xe0\xa0\x96\xe0\xa0\x97\x1\x2\x4\x8\x10\x20@\xc2\x80" + "\xc4\x80\xc8\x80\xd0\x80\xe0\xa0\x80\xe1\x80\x80\xe2\x80\x80" + "\xe4\x80\x80\xe8\x80\x80\xf0\x90\x80\x80\xf0\xa0\x80\x80\xf1" + "\x80\x80\x80\xf2\x80\x80\x80\xf4\x80\x80\x80\xf8\x88\x80\x80" + "\x80\xf8\x90\x80\x80\x80\xf8\xa0\x80\x80\x80\xf9\x80\x80\x80" + "\x80\xfa\x80\x80\x80\x80\xfc\x84\x80\x80\x80\x80\xfc\x88\x80" + "\x80\x80\x80\xfc\x90\x80\x80\x80\x80\xfc\xa0\x80\x80\x80\x80" + "\xfd\x80\x80\x80\x80\x80"; + + FILE* file = fopen(name, "w"); + fputs(str, file); + fclose(file); + + freopen(name, "r", stdin); + + streamsize n = wcin.rdbuf()->in_avail(); + while (n--) + { + wint_t c = wcin.rdbuf()->sbumpc(); + VERIFY( c != WEOF ); + } + } + + int main() + { + test01(); + return 0; + } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/lib/libstdc++.exp gcc-3.4.1/libstdc++-v3/testsuite/lib/libstdc++.exp *** gcc-3.4.0/libstdc++-v3/testsuite/lib/libstdc++.exp 2004-03-18 17:38:09.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/lib/libstdc++.exp 2004-05-19 23:36:38.000000000 +0000 *************** proc v3track { var n } { *** 59,83 **** } # Called by v3-init below. "Static" to this file. ! proc v3-copy-files {srcfiles dstdir} { foreach f $srcfiles { if { [catch { set symlink [file readlink $f] } x] } then { ! file copy -force $f $dstdir } else { if { [regexp "^/" "$symlink"] } then { ! file copy -force $symlink $dstdir } else { set dirname [file dirname $f] ! file copy -force $dirname/$symlink $dstdir } } } } # Called once, during runtest.exp setup. proc libstdc++_init { testfile } { global env ! global srcdir outdir blddir objdir tool_root_dir global cxx cxxflags global includes global gluefile wrap_flags --- 59,86 ---- } # Called by v3-init below. "Static" to this file. ! proc v3-copy-files {srcfiles} { foreach f $srcfiles { if { [catch { set symlink [file readlink $f] } x] } then { ! remote_download target $f } else { if { [regexp "^/" "$symlink"] } then { ! remote_download target $symlink } else { set dirname [file dirname $f] ! remote_download target $dirname/$symlink } } + set dirname [file dirname $f] + set basename [file tail $f] + file attributes $dirname/$basename -permissions a+w } } # Called once, during runtest.exp setup. proc libstdc++_init { testfile } { global env ! global srcdir blddir objdir tool_root_dir global cxx cxxflags global includes global gluefile wrap_flags *************** proc libstdc++_init { testfile } { *** 116,123 **** set dg-do-what-default run # Copy any required data files. ! v3-copy-files [glob -nocomplain "$srcdir/data/*.tst"] $outdir ! v3-copy-files [glob -nocomplain "$srcdir/data/*.txt"] $outdir # Setup LD_LIBRARY_PATH so that libgcc_s, libstdc++ binaries can be found. # Find the existing LD_LIBRARY_PATH. --- 119,126 ---- set dg-do-what-default run # Copy any required data files. ! v3-copy-files [glob -nocomplain "$srcdir/data/*.tst"] ! v3-copy-files [glob -nocomplain "$srcdir/data/*.txt"] # Setup LD_LIBRARY_PATH so that libgcc_s, libstdc++ binaries can be found. # Find the existing LD_LIBRARY_PATH. diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/Makefile.am gcc-3.4.1/libstdc++-v3/testsuite/Makefile.am *** gcc-3.4.0/libstdc++-v3/testsuite/Makefile.am 2004-04-14 21:17:36.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/Makefile.am 2004-05-15 20:44:13.000000000 +0000 *************** GLIBCXX_DIR=${glibcxx_builddir}/src/.lib *** 39,56 **** CXXLINK = \ $(LIBTOOL) --tag=CXX --mode=link $(CXX) \ -R $(GLIBGCC_DIR) -R $(GLIBCXX_DIR) \ ! $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ ! ! # Generated lists of files to run. All of these names are valid make ! # targets, if you wish to generate a list manually. ! lists_of_files = \ ! testsuite_files \ ! testsuite_files_interactive \ ! testsuite_files_performance ## Build support library. noinst_LIBRARIES = libv3test.a ! libv3test_a_SOURCES = testsuite_hooks.cc testsuite_allocator.cc ## Build support utilities. if GLIBCXX_TEST_ABI --- 39,52 ---- CXXLINK = \ $(LIBTOOL) --tag=CXX --mode=link $(CXX) \ -R $(GLIBGCC_DIR) -R $(GLIBCXX_DIR) \ ! $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -lv3test -L. -o $@ ## Build support library. noinst_LIBRARIES = libv3test.a ! libv3test_a_SOURCES = \ ! testsuite_abi.cc \ ! testsuite_allocator.cc \ ! testsuite_hooks.cc ## Build support utilities. if GLIBCXX_TEST_ABI *************** else *** 59,64 **** --- 55,61 ---- noinst_PROGRAMS = endif abi_check_SOURCES = abi_check.cc + abi_check_DEPENDENCIES = libv3test.a all-local: stamp_wchar testsuite_files *************** else *** 70,75 **** --- 67,80 ---- stamp_wchar: endif + # Generated lists of files to run. All of these names are valid make + # targets, if you wish to generate a list manually. + lists_of_files = \ + testsuite_files \ + testsuite_files_interactive \ + testsuite_files_performance + + # This is automatically run after the generated check-DEJAGNU rule. check-local: check-abi diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/Makefile.in gcc-3.4.1/libstdc++-v3/testsuite/Makefile.in *** gcc-3.4.0/libstdc++-v3/testsuite/Makefile.in 2004-04-14 21:17:36.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/Makefile.in 2004-05-15 20:44:13.000000000 +0000 *************** GLIBCXX_DIR = ${glibcxx_builddir}/src/.l *** 233,241 **** CXXLINK = \ $(LIBTOOL) --tag=CXX --mode=link $(CXX) \ -R $(GLIBGCC_DIR) -R $(GLIBCXX_DIR) \ ! $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ # Generated lists of files to run. All of these names are valid make # targets, if you wish to generate a list manually. lists_of_files = \ --- 233,253 ---- CXXLINK = \ $(LIBTOOL) --tag=CXX --mode=link $(CXX) \ -R $(GLIBGCC_DIR) -R $(GLIBCXX_DIR) \ ! $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -lv3test -L. -o $@ + noinst_LIBRARIES = libv3test.a + libv3test_a_SOURCES = \ + testsuite_abi.cc \ + testsuite_allocator.cc \ + testsuite_hooks.cc + + @GLIBCXX_TEST_ABI_FALSE@noinst_PROGRAMS = + + @GLIBCXX_TEST_ABI_TRUE@noinst_PROGRAMS = abi_check + abi_check_SOURCES = abi_check.cc + abi_check_DEPENDENCIES = libv3test.a + # Generated lists of files to run. All of these names are valid make # targets, if you wish to generate a list manually. lists_of_files = \ *************** lists_of_files = \ *** 244,256 **** testsuite_files_performance - noinst_LIBRARIES = libv3test.a - libv3test_a_SOURCES = testsuite_hooks.cc testsuite_allocator.cc - @GLIBCXX_TEST_ABI_FALSE@noinst_PROGRAMS = - - @GLIBCXX_TEST_ABI_TRUE@noinst_PROGRAMS = abi_check - abi_check_SOURCES = abi_check.cc - baseline_file = ${baseline_dir}/baseline_symbols.txt extract_symvers = $(glibcxx_srcdir)/scripts/extract_symvers --- 256,261 ---- *************** LIBRARIES = $(noinst_LIBRARIES) *** 279,286 **** libv3test_a_AR = $(AR) cru libv3test_a_LIBADD = ! am_libv3test_a_OBJECTS = testsuite_hooks.$(OBJEXT) \ ! testsuite_allocator.$(OBJEXT) libv3test_a_OBJECTS = $(am_libv3test_a_OBJECTS) @GLIBCXX_TEST_ABI_TRUE@noinst_PROGRAMS = abi_check$(EXEEXT) @GLIBCXX_TEST_ABI_FALSE@noinst_PROGRAMS = --- 284,291 ---- libv3test_a_AR = $(AR) cru libv3test_a_LIBADD = ! am_libv3test_a_OBJECTS = testsuite_abi.$(OBJEXT) \ ! testsuite_allocator.$(OBJEXT) testsuite_hooks.$(OBJEXT) libv3test_a_OBJECTS = $(am_libv3test_a_OBJECTS) @GLIBCXX_TEST_ABI_TRUE@noinst_PROGRAMS = abi_check$(EXEEXT) @GLIBCXX_TEST_ABI_FALSE@noinst_PROGRAMS = *************** PROGRAMS = $(noinst_PROGRAMS) *** 289,295 **** am_abi_check_OBJECTS = abi_check.$(OBJEXT) abi_check_OBJECTS = $(am_abi_check_OBJECTS) abi_check_LDADD = $(LDADD) - abi_check_DEPENDENCIES = abi_check_LDFLAGS = DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) --- 294,299 ---- diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/performance/20_util/allocator/insert.cc gcc-3.4.1/libstdc++-v3/testsuite/performance/20_util/allocator/insert.cc *** gcc-3.4.0/libstdc++-v3/testsuite/performance/20_util/allocator/insert.cc 2004-03-18 17:38:12.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/performance/20_util/allocator/insert.cc 2004-05-02 17:44:51.000000000 +0000 *************** *** 44,49 **** --- 44,50 ---- #include #include #include + #include #include #include *************** int main(void) *** 148,153 **** --- 149,155 ---- typedef __gnu_cxx::new_allocator n_alloc_type; typedef __gnu_cxx::__mt_alloc so_alloc_type; typedef __gnu_cxx::bitmap_allocator bit_alloc_type; + typedef __gnu_cxx::__pool_alloc po_alloc_type; #ifdef TEST_B0 test_container(vector()); *************** int main(void) *** 161,219 **** #ifdef TEST_B3 test_container(vector()); #endif - #ifdef TEST_B4 ! test_container(list()); #endif #ifdef TEST_B5 ! test_container(list()); #endif #ifdef TEST_B6 ! test_container(list()); #endif #ifdef TEST_B7 test_container(list()); #endif ! #ifdef TEST_B8 test_container(deque()); #endif ! #ifdef TEST_B9 test_container(deque()); #endif ! #ifdef TEST_B10 test_container(deque()); #endif ! #ifdef TEST_B11 test_container(deque()); #endif typedef less compare_type; ! #ifdef TEST_B12 test_container(map()); #endif ! #ifdef TEST_B13 test_container(map()); #endif ! #ifdef TEST_B14 test_container(map()); #endif ! #ifdef TEST_B15 test_container(map()); #endif ! #ifdef TEST_B16 test_container(set()); #endif ! #ifdef TEST_B17 test_container(set()); #endif ! #ifdef TEST_B18 test_container(set()); #endif ! #ifdef TEST_B19 test_container(set()); #endif #ifdef TEST_T0 test_container(vector(), true); --- 163,236 ---- #ifdef TEST_B3 test_container(vector()); #endif #ifdef TEST_B4 ! test_container(vector()); #endif + #ifdef TEST_B5 ! test_container(list()); #endif #ifdef TEST_B6 ! test_container(list()); #endif #ifdef TEST_B7 + test_container(list()); + #endif + #ifdef TEST_B8 test_container(list()); #endif + #ifdef TEST_B9 + test_container(list()); + #endif ! #ifdef TEST_B10 test_container(deque()); #endif ! #ifdef TEST_B11 test_container(deque()); #endif ! #ifdef TEST_B12 test_container(deque()); #endif ! #ifdef TEST_B13 test_container(deque()); #endif + #ifdef TEST_B14 + test_container(deque()); + #endif typedef less compare_type; ! #ifdef TEST_B15 test_container(map()); #endif ! #ifdef TEST_B16 test_container(map()); #endif ! #ifdef TEST_B17 test_container(map()); #endif ! #ifdef TEST_B18 test_container(map()); #endif + #ifdef TEST_B19 + test_container(map()); + #endif ! #ifdef TEST_B20 test_container(set()); #endif ! #ifdef TEST_B21 test_container(set()); #endif ! #ifdef TEST_B22 test_container(set()); #endif ! #ifdef TEST_B23 test_container(set()); #endif + #ifdef TEST_B24 + test_container(set()); + #endif #ifdef TEST_T0 test_container(vector(), true); *************** int main(void) *** 227,285 **** #ifdef TEST_T3 test_container(vector(), true); #endif - #ifdef TEST_T4 ! test_container(list(), true); #endif #ifdef TEST_T5 ! test_container(list(), true); #endif #ifdef TEST_T6 ! test_container(list(), true); #endif #ifdef TEST_T7 test_container(list(), true); #endif ! #ifdef TEST_T8 test_container(deque(), true); #endif ! #ifdef TEST_T9 test_container(deque(), true); #endif ! #ifdef TEST_T10 test_container(deque(), true); #endif ! #ifdef TEST_T11 test_container(deque(), true); #endif typedef less compare_type; ! #ifdef TEST_T12 test_container(map(), true); #endif ! #ifdef TEST_T13 test_container(map(), true); #endif ! #ifdef TEST_T14 test_container(map(), true); #endif ! #ifdef TEST_T15 test_container(map(), true); #endif ! #ifdef TEST_T16 test_container(set(), true); #endif ! #ifdef TEST_T17 test_container(set(), true); #endif ! #ifdef TEST_T18 test_container(set(), true); #endif ! #ifdef TEST_T19 test_container(set(), true); #endif ! return 0; } --- 244,316 ---- #ifdef TEST_T3 test_container(vector(), true); #endif #ifdef TEST_T4 ! test_container(vector(), true); #endif + #ifdef TEST_T5 ! test_container(list(), true); #endif #ifdef TEST_T6 ! test_container(list(), true); #endif #ifdef TEST_T7 + test_container(list(), true); + #endif + #ifdef TEST_T8 test_container(list(), true); #endif + #ifdef TEST_T9 + test_container(list(), true); + #endif ! #ifdef TEST_T10 test_container(deque(), true); #endif ! #ifdef TEST_T11 test_container(deque(), true); #endif ! #ifdef TEST_T12 test_container(deque(), true); #endif ! #ifdef TEST_T13 test_container(deque(), true); #endif + #ifdef TEST_T14 + test_container(deque(), true); + #endif typedef less compare_type; ! #ifdef TEST_T15 test_container(map(), true); #endif ! #ifdef TEST_T16 test_container(map(), true); #endif ! #ifdef TEST_T17 test_container(map(), true); #endif ! #ifdef TEST_T18 test_container(map(), true); #endif + #ifdef TEST_T19 + test_container(map(), true); + #endif ! #ifdef TEST_T20 test_container(set(), true); #endif ! #ifdef TEST_T21 test_container(set(), true); #endif ! #ifdef TEST_T22 test_container(set(), true); #endif ! #ifdef TEST_T23 test_container(set(), true); #endif ! #ifdef TEST_T24 ! test_container(set(), true); ! #endif return 0; } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/performance/20_util/allocator/insert_insert.cc gcc-3.4.1/libstdc++-v3/testsuite/performance/20_util/allocator/insert_insert.cc *** gcc-3.4.0/libstdc++-v3/testsuite/performance/20_util/allocator/insert_insert.cc 2004-03-18 17:38:12.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/performance/20_util/allocator/insert_insert.cc 2004-05-02 17:44:51.000000000 +0000 *************** *** 44,49 **** --- 44,50 ---- #include #include #include + #include #include #include *************** int main(void) *** 119,124 **** --- 120,126 ---- typedef __gnu_cxx::new_allocator n_alloc_type; typedef __gnu_cxx::__mt_alloc so_alloc_type; typedef __gnu_cxx::bitmap_allocator bit_alloc_type; + typedef __gnu_cxx::__pool_alloc po_alloc_type; #ifdef TEST_S0 test_container(vector()); *************** int main(void) *** 132,193 **** #ifdef TEST_S3 test_container(vector()); #endif - - #ifdef TEST_S4 ! test_container(list()); #endif #ifdef TEST_S5 ! test_container(list()); #endif #ifdef TEST_S6 ! test_container(list()); #endif #ifdef TEST_S7 test_container(list()); #endif ! ! #ifdef TEST_S8 test_container(deque()); #endif ! #ifdef TEST_S9 test_container(deque()); #endif ! #ifdef TEST_S10 test_container(deque()); #endif ! #ifdef TEST_S11 test_container(deque()); #endif typedef less compare_type; ! #ifdef TEST_S12 test_container(map()); #endif ! #ifdef TEST_S13 test_container(map()); #endif ! #ifdef TEST_S14 test_container(map()); #endif ! #ifdef TEST_S15 test_container(map()); #endif ! ! #ifdef TEST_S12 test_container(set()); #endif ! #ifdef TEST_S13 test_container(set()); #endif ! #ifdef TEST_S14 test_container(set()); #endif ! #ifdef TEST_S14 test_container(set()); #endif ! return 0; } --- 134,206 ---- #ifdef TEST_S3 test_container(vector()); #endif #ifdef TEST_S4 ! test_container(vector()); #endif + #ifdef TEST_S5 ! test_container(list()); #endif #ifdef TEST_S6 ! test_container(list()); #endif #ifdef TEST_S7 + test_container(list()); + #endif + #ifdef TEST_S8 test_container(list()); #endif + #ifdef TEST_S9 + test_container(list()); + #endif ! #ifdef TEST_S10 test_container(deque()); #endif ! #ifdef TEST_S11 test_container(deque()); #endif ! #ifdef TEST_S12 test_container(deque()); #endif ! #ifdef TEST_S13 test_container(deque()); #endif + #ifdef TEST_S14 + test_container(deque()); + #endif typedef less compare_type; ! #ifdef TEST_S15 test_container(map()); #endif ! #ifdef TEST_S16 test_container(map()); #endif ! #ifdef TEST_S17 test_container(map()); #endif ! #ifdef TEST_S18 test_container(map()); #endif + #ifdef TEST_S19 + test_container(map()); + #endif ! #ifdef TEST_S20 test_container(set()); #endif ! #ifdef TEST_S21 test_container(set()); #endif ! #ifdef TEST_S22 test_container(set()); #endif ! #ifdef TEST_S23 test_container(set()); #endif ! #ifdef TEST_S24 ! test_container(set()); ! #endif return 0; } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/performance/20_util/allocator/list_sort_search.cc gcc-3.4.1/libstdc++-v3/testsuite/performance/20_util/allocator/list_sort_search.cc *** gcc-3.4.0/libstdc++-v3/testsuite/performance/20_util/allocator/list_sort_search.cc 2004-03-18 17:38:12.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/performance/20_util/allocator/list_sort_search.cc 2004-05-02 17:44:51.000000000 +0000 *************** *** 34,44 **** --- 34,46 ---- #include #include #include + #include using namespace std; using __gnu_cxx::malloc_allocator; using __gnu_cxx::__mt_alloc; using __gnu_cxx::bitmap_allocator; + using __gnu_cxx::__pool_alloc; typedef int test_type; *************** void do_test () *** 105,111 **** report_performance(__FILE__, string(), time, resource); } - int main () { #ifdef TEST_S0 --- 107,112 ---- *************** int main () *** 120,125 **** --- 121,129 ---- #ifdef TEST_S3 do_test<__mt_alloc >(); #endif + #ifdef TEST_S4 + do_test<__pool_alloc >(); + #endif } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/performance/20_util/allocator/map_mt_find.cc gcc-3.4.1/libstdc++-v3/testsuite/performance/20_util/allocator/map_mt_find.cc *** gcc-3.4.0/libstdc++-v3/testsuite/performance/20_util/allocator/map_mt_find.cc 2004-03-18 17:38:12.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/performance/20_util/allocator/map_mt_find.cc 2004-05-02 17:44:51.000000000 +0000 *************** *** 40,50 **** --- 40,52 ---- #include #include #include + #include using namespace std; using __gnu_cxx::malloc_allocator; using __gnu_cxx::__mt_alloc; using __gnu_cxx::bitmap_allocator; + using __gnu_cxx::__pool_alloc; typedef int test_type; *************** int main() *** 145,148 **** --- 147,153 ---- #ifdef TEST_T3 exec_tests<__mt_alloc >(); #endif + #ifdef TEST_T4 + exec_tests<__pool_alloc >(); + #endif } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/performance/20_util/allocator/map_thread.cc gcc-3.4.1/libstdc++-v3/testsuite/performance/20_util/allocator/map_thread.cc *** gcc-3.4.0/libstdc++-v3/testsuite/performance/20_util/allocator/map_thread.cc 2004-03-18 17:38:13.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/performance/20_util/allocator/map_thread.cc 2004-05-02 17:44:51.000000000 +0000 *************** *** 41,46 **** --- 41,47 ---- #include #include #include + #include #include #include *************** using __gnu_cxx::__mt_alloc; *** 49,54 **** --- 50,56 ---- using __gnu_cxx::new_allocator; using __gnu_cxx::malloc_allocator; using __gnu_cxx::bitmap_allocator; + using __gnu_cxx::__pool_alloc; // The number of iterations to be performed. int iterations = 10000; *************** int main(void) *** 125,131 **** #ifdef TEST_T5 test_container(map, bitmap_allocator >()); #endif ! ! return 0; } --- 127,134 ---- #ifdef TEST_T5 test_container(map, bitmap_allocator >()); #endif ! #ifdef TEST_T6 ! test_container(map, __pool_alloc >()); ! #endif return 0; } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/performance/20_util/allocator/producer_consumer.cc gcc-3.4.1/libstdc++-v3/testsuite/performance/20_util/allocator/producer_consumer.cc *** gcc-3.4.0/libstdc++-v3/testsuite/performance/20_util/allocator/producer_consumer.cc 2004-03-18 17:38:13.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/performance/20_util/allocator/producer_consumer.cc 2004-05-02 17:44:51.000000000 +0000 *************** *** 42,47 **** --- 42,48 ---- #include #include #include + #include #include #include *************** using __gnu_cxx::__mt_alloc; *** 51,56 **** --- 52,58 ---- using __gnu_cxx::new_allocator; using __gnu_cxx::malloc_allocator; using __gnu_cxx::bitmap_allocator; + using __gnu_cxx::__pool_alloc; using abi::__cxa_demangle; typedef int test_type; *************** typedef malloc_allocator mall *** 59,64 **** --- 61,67 ---- typedef new_allocator new_alloc_type; typedef __mt_alloc so_alloc_type; typedef bitmap_allocator bit_alloc_type; + typedef __pool_alloc po_alloc_type; // The number of iterations to be performed. int iterations = 10000; *************** template *** 126,133 **** Queue::push_back(const typename Container::value_type& value) { AutoLock auto_lock(lock); queue.insert(queue.end(), value); ! if (queue.size() == 1) pthread_cond_signal(&condition); } template --- 129,137 ---- Queue::push_back(const typename Container::value_type& value) { AutoLock auto_lock(lock); + const bool signal = queue.empty(); queue.insert(queue.end(), value); ! if (signal) pthread_cond_signal(&condition); } template *************** int main(void) *** 298,332 **** #ifdef TEST_T4 test_container(vector()); #endif - - #ifdef TEST_T5 ! test_container(list()); #endif #ifdef TEST_T6 ! test_container(list()); #endif #ifdef TEST_T7 ! test_container(list()); #endif #ifdef TEST_T8 test_container(list()); #endif ! ! #ifdef TEST_T9 test_container(map()); #endif ! #ifdef TEST_T10 test_container(map()); #endif ! #ifdef TEST_T11 test_container(map()); #endif ! #ifdef TEST_T12 test_container(map()); #endif ! return 0; } --- 302,342 ---- #ifdef TEST_T4 test_container(vector()); #endif #ifdef TEST_T5 ! test_container(vector()); #endif + #ifdef TEST_T6 ! test_container(list()); #endif #ifdef TEST_T7 ! test_container(list()); #endif #ifdef TEST_T8 + test_container(list()); + #endif + #ifdef TEST_T9 test_container(list()); #endif + #ifdef TEST_T10 + test_container(list()); + #endif ! #ifdef TEST_T11 test_container(map()); #endif ! #ifdef TEST_T12 test_container(map()); #endif ! #ifdef TEST_T13 test_container(map()); #endif ! #ifdef TEST_T14 test_container(map()); #endif ! #ifdef TEST_T15 ! test_container(map()); ! #endif return 0; } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/performance/27_io/filebuf_sputn_unbuf.cc gcc-3.4.1/libstdc++-v3/testsuite/performance/27_io/filebuf_sputn_unbuf.cc *** gcc-3.4.0/libstdc++-v3/testsuite/performance/27_io/filebuf_sputn_unbuf.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/performance/27_io/filebuf_sputn_unbuf.cc 2004-04-24 18:43:50.000000000 +0000 *************** *** 0 **** --- 1,82 ---- + // Copyright (C) 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 + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, + // USA. + + // As a special exception, you may use this file as part of a free software + // library without restriction. Specifically, if other files instantiate + // templates or use macros or inline functions from this file, or you compile + // this file and link it with other files to produce an executable, this + // file does not by itself cause the resulting executable to be covered by + // the GNU General Public License. This exception does not however + // invalidate any other reasons why the executable file might be covered by + // the GNU General Public License. + + #include + #include + #include + + // libstdc++/11378 + int main() + { + using namespace std; + using namespace __gnu_test; + + time_counter time; + resource_counter resource; + + const int iterations = 500000; + const int chunksize = 100; + + char* chunk = new char[chunksize]; + + // C + FILE* file = fopen("tmp", "w+"); + setvbuf(file, 0, _IONBF, 0); + start_counters(time, resource); + for (int i = 0; i < iterations; ++i) + fwrite(chunk, 1, chunksize, file); + stop_counters(time, resource); + fclose(file); + report_performance(__FILE__, "C", time, resource); + clear_counters(time, resource); + + // C unlocked + file = fopen("tmp", "w+"); + setvbuf(file, 0, _IONBF, 0); + start_counters(time, resource); + for (int i = 0; i < iterations; ++i) + fwrite_unlocked(chunk, 1, chunksize, file); + stop_counters(time, resource); + fclose(file); + report_performance(__FILE__, "C unlocked", time, resource); + clear_counters(time, resource); + + // C++ + filebuf buf; + buf.pubsetbuf(0, 0); + buf.open("tmp", ios_base::out | ios_base::in | ios_base::trunc); + start_counters(time, resource); + for (int i = 0; i < iterations; ++i) + buf.sputn(chunk, chunksize); + stop_counters(time, resource); + report_performance(__FILE__, "C++", time, resource); + + unlink("tmp"); + delete [] chunk; + + return 0; + } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/testsuite_abi.cc gcc-3.4.1/libstdc++-v3/testsuite/testsuite_abi.cc *** gcc-3.4.0/libstdc++-v3/testsuite/testsuite_abi.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/testsuite_abi.cc 2004-05-31 21:18:55.000000000 +0000 *************** *** 0 **** --- 1,463 ---- + // -*- C++ -*- + + // Copyright (C) 2004 Free Software Foundation, Inc. + + // This library is free software; you can redistribute it and/or + // modify it under the terms of the GNU General Public License as + // published by the Free Software Foundation; either version 2, or (at + // your option) any later version. + + // This library is distributed in the hope that it will be useful, but + // WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + // General Public License for more details. + + // You should have received a copy of the GNU General Public License + // along with this library; see the file COPYING. If not, write to + // the Free Software Foundation, 59 Temple Place - Suite 330, Boston, + // MA 02111-1307, USA. + + // As a special exception, you may use this file as part of a free + // software library without restriction. Specifically, if other files + // instantiate templates or use macros or inline functions from this + // file, or you compile this file and link it with other files to + // produce an executable, this file does not by itself cause the + // resulting executable to be covered by the GNU General Public + // License. This exception does not however invalidate any other + // reasons why the executable file might be covered by the GNU General + // Public License. + + // Benjamin Kosnik + + #include "testsuite_abi.h" + #include + #include + #include + + using namespace std; + + void + symbol::init(string& data) + { + const char delim = ':'; + const char version_delim = '@'; + const string::size_type npos = string::npos; + string::size_type n = 0; + + // Set the type. + if (data.find("FUNC") == 0) + type = symbol::function; + else if (data.find("OBJECT") == 0) + type = symbol::object; + else + type = symbol::error; + n = data.find_first_of(delim); + if (n != npos) + data.erase(data.begin(), data.begin() + n + 1); + + // Iff object, get size info. + if (type == symbol::object) + { + n = data.find_first_of(delim); + if (n != npos) + { + string size(data.begin(), data.begin() + n); + istringstream iss(size); + int x; + iss >> x; + if (!iss.fail()) + size = x; + data.erase(data.begin(), data.begin() + n + 1); + } + } + + // Set the name. + n = data.find_first_of(version_delim); + if (n != npos) + { + // Found version string. + name = string(data.begin(), data.begin() + n); + n = data.find_last_of(version_delim); + data.erase(data.begin(), data.begin() + n + 1); + + // Set version name. + version_name = data; + } + else + { + // No versioning info. + name = string(data.begin(), data.end()); + data.erase(data.begin(), data.end()); + } + + // Set the demangled name. + demangled_name = demangle(name); + } + + void + symbol::print() const + { + const char tab = '\t'; + cout << tab << name << endl; + cout << tab << demangled_name << endl; + cout << tab << version_name << endl; + + string type_string; + switch (type) + { + case none: + type_string = "none"; + break; + case function: + type_string = "function"; + break; + case object: + type_string = "object"; + break; + case error: + type_string = "error"; + break; + default: + type_string = ""; + } + cout << tab << type_string << endl; + + if (type == object) + cout << tab << size << endl; + + string status_string; + switch (status) + { + case unknown: + status_string = "unknown"; + break; + case added: + status_string = "added"; + break; + case subtracted: + status_string = "subtracted"; + break; + case compatible: + status_string = "compatible"; + break; + case incompatible: + status_string = "incompatible"; + break; + default: + status_string = ""; + } + cout << tab << status_string << endl; + } + + + bool + check_version(const symbol& test, bool added) + { + typedef std::vector compat_list; + static compat_list known_versions; + if (known_versions.empty()) + { + known_versions.push_back("GLIBCPP_3.2"); // base version + known_versions.push_back("GLIBCPP_3.2.1"); + known_versions.push_back("GLIBCPP_3.2.2"); + known_versions.push_back("GLIBCPP_3.2.3"); // gcc-3.3.0 + known_versions.push_back("GLIBCXX_3.4"); + known_versions.push_back("GLIBCXX_3.4.1"); + known_versions.push_back("CXXABI_1.2"); + known_versions.push_back("CXXABI_1.2.1"); + known_versions.push_back("CXXABI_1.3"); + } + compat_list::iterator begin = known_versions.begin(); + compat_list::iterator end = known_versions.end(); + + // Check version names for compatibility... + compat_list::iterator it1 = find(begin, end, test.version_name); + + // Check for weak label. + compat_list::iterator it2 = find(begin, end, test.name); + + // Check that added symbols aren't added in the base version. + bool compat = true; + if (added && test.version_name == known_versions[0]) + compat = false; + + if (it1 == end && it2 == end) + compat = false; + + return compat; + } + + bool + check_compatible(const symbol& lhs, const symbol& rhs, bool verbose) + { + bool ret = true; + const char tab = '\t'; + + // Check to see if symbol_objects are compatible. + if (lhs.type != rhs.type) + { + ret = false; + if (verbose) + cout << tab << "incompatible types" << endl; + } + + if (lhs.name != rhs.name) + { + ret = false; + if (verbose) + cout << tab << "incompatible names" << endl; + } + + if (lhs.size != rhs.size) + { + ret = false; + if (verbose) + { + cout << tab << "incompatible sizes" << endl; + cout << tab << lhs.size << endl; + cout << tab << rhs.size << endl; + } + } + + if (lhs.version_name != rhs.version_name + && !check_version(lhs) && !check_version(rhs)) + { + ret = false; + if (verbose) + { + cout << tab << "incompatible versions" << endl; + cout << tab << lhs.version_name << endl; + cout << tab << rhs.version_name << endl; + } + } + + if (verbose) + cout << endl; + + return ret; + } + + + bool + has_symbol(const string& mangled, const symbols& s) throw() + { + const symbol_names& names = s.first; + symbol_names::const_iterator i = find(names.begin(), names.end(), mangled); + return i != names.end(); + } + + symbol& + get_symbol(const string& mangled, const symbols& s) + { + const symbol_names& names = s.first; + symbol_names::const_iterator i = find(names.begin(), names.end(), mangled); + if (i != names.end()) + { + symbol_objects objects = s.second; + return objects[mangled]; + } + else + { + ostringstream os; + os << "get_symbol failed for symbol " << mangled; + throw symbol_error(os.str()); + } + } + + void + examine_symbol(const char* name, const char* file) + { + try + { + symbols s = create_symbols(file); + symbol& sym = get_symbol(name, s); + sym.print(); + } + catch(...) + { throw; } + } + + void + compare_symbols(const char* baseline_file, const char* test_file, + bool verbose) + { + // Input both lists of symbols into container. + symbols baseline = create_symbols(baseline_file); + symbols test = create_symbols(test_file); + symbol_names& baseline_names = baseline.first; + symbol_objects& baseline_objects = baseline.second; + symbol_names& test_names = test.first; + symbol_objects& test_objects = test.second; + + // Sanity check results. + const symbol_names::size_type baseline_size = baseline_names.size(); + const symbol_names::size_type test_size = test_names.size(); + if (!baseline_size || !test_size) + { + cerr << "Problems parsing the list of exported symbols." << endl; + exit(2); + } + + // Sort out names. + // Assuming baseline_names, test_names are both unique w/ no duplicates. + // + // The names added to missing_names are baseline_names not found in + // test_names + // -> symbols that have been deleted. + // + // The names added to added_names are test_names are names not in + // baseline_names + // -> symbols that have been added. + symbol_names shared_names; + symbol_names missing_names; + symbol_names added_names = test_names; + for (size_t i = 0; i < baseline_size; ++i) + { + string what(baseline_names[i]); + symbol_names::iterator end = added_names.end(); + symbol_names::iterator it = find(added_names.begin(), end, what); + if (it != end) + { + // Found. + shared_names.push_back(what); + added_names.erase(it); + } + else + missing_names.push_back(what); + } + + // Check missing names for compatibility. + typedef pair symbol_pair; + vector incompatible; + for (size_t j = 0; j < missing_names.size(); ++j) + { + symbol base = baseline_objects[missing_names[j]]; + incompatible.push_back(symbol_pair(base, base)); + } + + // Check shared names for compatibility. + for (size_t k = 0; k < shared_names.size(); ++k) + { + symbol base = baseline_objects[shared_names[k]]; + symbol test = test_objects[shared_names[k]]; + if (!check_compatible(base, test)) + incompatible.push_back(symbol_pair(base, test)); + } + + // Check added names for compatibility. + for (size_t l = 0; l < added_names.size(); ++l) + { + symbol test = test_objects[added_names[l]]; + if (!check_version(test, true)) + incompatible.push_back(symbol_pair(test, test)); + } + + // Report results. + if (verbose && added_names.size()) + { + cout << added_names.size() << " added symbols " << endl; + for (size_t j = 0; j < added_names.size() ; ++j) + test_objects[added_names[j]].print(); + } + + if (verbose && missing_names.size()) + { + cout << missing_names.size() << " missing symbols " << endl; + for (size_t j = 0; j < missing_names.size() ; ++j) + baseline_objects[missing_names[j]].print(); + } + + if (verbose && incompatible.size()) + { + cout << incompatible.size() << " incompatible symbols " << endl; + for (size_t j = 0; j < incompatible.size() ; ++j) + { + // First, report name. + const symbol& base = incompatible[j].first; + const symbol& test = incompatible[j].second; + test.print(); + + // Second, report reason or reasons incompatible. + check_compatible(base, test, true); + } + } + + cout << "\n\t\t=== libstdc++-v3 check-abi Summary ===" << endl; + cout << endl; + cout << "# of added symbols:\t\t " << added_names.size() << endl; + cout << "# of missing symbols:\t\t " << missing_names.size() << endl; + cout << "# of incompatible symbols:\t " << incompatible.size() << endl; + cout << endl; + cout << "using: " << baseline_file << endl; + } + + + symbols + create_symbols(const char* file) + { + symbols s; + ifstream ifs(file); + if (ifs.is_open()) + { + // Organize file data into container of symbol objects. + symbol_names& names = s.first; + symbol_objects& objects = s.second; + const string empty; + string line = empty; + while (getline(ifs, line).good()) + { + symbol tmp; + tmp.init(line); + objects[tmp.name] = tmp; + names.push_back(tmp.name); + line = empty; + } + } + else + { + ostringstream os; + os << "create_symbols failed for file " << file; + throw runtime_error(os.str()); + } + return s; + } + + + const char* + demangle(const std::string& mangled) + { + const char* name; + if (mangled[0] != '_' || mangled[1] != 'Z') + { + // This is not a mangled symbol, thus has "C" linkage. + name = mangled.c_str(); + } + else + { + // Use __cxa_demangle to demangle. + int status = 0; + name = abi::__cxa_demangle(mangled.c_str(), 0, 0, &status); + if (!name) + { + switch (status) + { + case 0: + name = "error code = 0: success"; + break; + case -1: + name = "error code = -1: memory allocation failure"; + break; + case -2: + name = "error code = -2: invalid mangled name"; + break; + case -3: + name = "error code = -3: invalid arguments"; + break; + default: + name = "error code unknown - who knows what happened"; + } + } + } + return name; + } + diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/testsuite_abi.h gcc-3.4.1/libstdc++-v3/testsuite/testsuite_abi.h *** gcc-3.4.0/libstdc++-v3/testsuite/testsuite_abi.h 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/testsuite_abi.h 2004-05-15 20:44:14.000000000 +0000 *************** *** 0 **** --- 1,129 ---- + // -*- C++ -*- + + // Copyright (C) 2004 Free Software Foundation, Inc. + + // This library is free software; you can redistribute it and/or + // modify it under the terms of the GNU General Public License as + // published by the Free Software Foundation; either version 2, or (at + // your option) any later version. + + // This library is distributed in the hope that it will be useful, but + // WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + // General Public License for more details. + + // You should have received a copy of the GNU General Public License + // along with this library; see the file COPYING. If not, write to + // the Free Software Foundation, 59 Temple Place - Suite 330, Boston, + // MA 02111-1307, USA. + + // As a special exception, you may use this file as part of a free + // software library without restriction. Specifically, if other files + // instantiate templates or use macros or inline functions from this + // file, or you compile this file and link it with other files to + // produce an executable, this file does not by itself cause the + // resulting executable to be covered by the GNU General Public + // License. This exception does not however invalidate any other + // reasons why the executable file might be covered by the GNU General + // Public License. + + // Benjamin Kosnik + + #include + #include + #include + #include + #include + + // Encapsulates symbol characteristics. + struct symbol + { + enum category { none, function, object, error }; + enum designation { unknown, added, subtracted, compatible, incompatible }; + enum compatibility + { + compat_type = 1, + compat_name = 2, + compat_size = 4, + compat_version = 8 + }; + + category type; + std::string name; + std::string demangled_name; + int size; + std::string version_name; + designation status; + + symbol() : type(none), size(0), status(unknown) { } + + symbol(const symbol& other) + : type(other.type), name(other.name), demangled_name(other.demangled_name), + size(other.size), version_name(other.version_name), + status(other.status) { } + + void + print() const; + + void + init(std::string& data); + }; + + struct symbol_error : public std::logic_error + { + explicit symbol_error(const std::string& s) : std::logic_error(s) { } + }; + + + typedef __gnu_cxx::hash_map symbol_objects; + + typedef std::deque symbol_names; + + typedef std::pair symbols; + + + // Check. + bool + check_version(const symbol& test, bool added = false); + + bool + check_compatible(const symbol& lhs, const symbol& rhs, bool verbose = false); + + + // Examine. + bool + has_symbol(const std::string& mangled, const symbols& list) throw(); + + symbol& + get_symbol(const std::string& mangled, const symbols& list); + + extern "C" void + examine_symbol(const char* name, const char* file); + + extern "C" void + compare_symbols(const char* baseline_file, const char* test_file, bool verb); + + + // Util. + symbols + create_symbols(const char* file); + + const char* + demangle(const std::string& mangled); + + + // Specialization. + namespace __gnu_cxx + { + using namespace std; + + template<> + struct hash + { + size_t operator()(const string& s) const + { + const collate& c = use_facet >(locale::classic()); + return c.hash(s.c_str(), s.c_str() + s.size()); + } + }; + } diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/testsuite_hooks.cc gcc-3.4.1/libstdc++-v3/testsuite/testsuite_hooks.cc *** gcc-3.4.0/libstdc++-v3/testsuite/testsuite_hooks.cc 2004-02-21 20:33:34.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/testsuite_hooks.cc 2004-05-15 21:17:59.000000000 +0000 *************** *** 1,7 **** // -*- C++ -*- // Utility subroutines for the C++ library testsuite. // ! // Copyright (C) 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,7 ---- // -*- C++ -*- // Utility subroutines for the C++ library testsuite. // ! // Copyright (C) 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 *************** *** 30,36 **** #include ! #ifdef _GLIBCXX_MEM_LIMITS #include #include #include --- 30,36 ---- #include ! #ifdef _GLIBCXX_RES_LIMITS #include #include #include *************** *** 44,50 **** namespace __gnu_test { ! #ifdef _GLIBCXX_MEM_LIMITS void set_memory_limits(float size) { --- 44,50 ---- namespace __gnu_test { ! #ifdef _GLIBCXX_RES_LIMITS void set_memory_limits(float size) { *************** namespace __gnu_test *** 53,73 **** __typeof__ (r.rlim_cur) limit = (__typeof__ (r.rlim_cur))(size * 1048576); // Heap size, seems to be common. ! #if _GLIBCXX_HAVE_MEMLIMIT_DATA getrlimit(RLIMIT_DATA, &r); r.rlim_cur = limit; setrlimit(RLIMIT_DATA, &r); #endif // Resident set size. ! #if _GLIBCXX_HAVE_MEMLIMIT_RSS getrlimit(RLIMIT_RSS, &r); r.rlim_cur = limit; setrlimit(RLIMIT_RSS, &r); #endif // Mapped memory (brk + mmap). ! #if _GLIBCXX_HAVE_MEMLIMIT_VMEM getrlimit(RLIMIT_VMEM, &r); r.rlim_cur = limit; setrlimit(RLIMIT_VMEM, &r); --- 53,73 ---- __typeof__ (r.rlim_cur) limit = (__typeof__ (r.rlim_cur))(size * 1048576); // Heap size, seems to be common. ! #if _GLIBCXX_HAVE_LIMIT_DATA getrlimit(RLIMIT_DATA, &r); r.rlim_cur = limit; setrlimit(RLIMIT_DATA, &r); #endif // Resident set size. ! #if _GLIBCXX_HAVE_LIMIT_RSS getrlimit(RLIMIT_RSS, &r); r.rlim_cur = limit; setrlimit(RLIMIT_RSS, &r); #endif // Mapped memory (brk + mmap). ! #if _GLIBCXX_HAVE_LIMIT_VMEM getrlimit(RLIMIT_VMEM, &r); r.rlim_cur = limit; setrlimit(RLIMIT_VMEM, &r); *************** namespace __gnu_test *** 77,83 **** // On HP-UX 11.23, a trivial C++ program that sets RLIMIT_AS to // anything less than 128MB cannot "malloc" even 1K of memory. // Therefore, we skip RLIMIT_AS on HP-UX. ! #if _GLIBCXX_HAVE_MEMLIMIT_AS && !defined(__hpux__) getrlimit(RLIMIT_AS, &r); r.rlim_cur = limit; setrlimit(RLIMIT_AS, &r); --- 77,83 ---- // On HP-UX 11.23, a trivial C++ program that sets RLIMIT_AS to // anything less than 128MB cannot "malloc" even 1K of memory. // Therefore, we skip RLIMIT_AS on HP-UX. ! #if _GLIBCXX_HAVE_LIMIT_AS && !defined(__hpux__) getrlimit(RLIMIT_AS, &r); r.rlim_cur = limit; setrlimit(RLIMIT_AS, &r); *************** namespace __gnu_test *** 89,94 **** --- 89,113 ---- set_memory_limits(float) { } #endif + #ifdef _GLIBCXX_RES_LIMITS + void + set_file_limit(unsigned long size) + { + #if _GLIBCXX_HAVE_LIMIT_FSIZE + struct rlimit r; + // Cater to the absence of rlim_t. + __typeof__ (r.rlim_cur) limit = (__typeof__ (r.rlim_cur))(size); + + getrlimit(RLIMIT_FSIZE, &r); + r.rlim_cur = limit; + setrlimit(RLIMIT_FSIZE, &r); + #endif + } + + #else + void + set_file_limit(unsigned long) { } + #endif void verify_demangle(const char* mangled, const char* wanted) *************** namespace std *** 354,361 **** } _M_data->_M_atoms_out[__num_base::_S_oend] = pod_type(); ! for (size_t i = 0; i < __num_base::_S_iend; ++i) ! _M_data->_M_atoms_in[i].value = value_type(__num_base::_S_atoms_in[i]); _M_data->_M_atoms_in[__num_base::_S_iend] = pod_type(); // "true" --- 373,380 ---- } _M_data->_M_atoms_out[__num_base::_S_oend] = pod_type(); ! for (size_t j = 0; j < __num_base::_S_iend; ++j) ! _M_data->_M_atoms_in[j].value = value_type(__num_base::_S_atoms_in[j]); _M_data->_M_atoms_in[__num_base::_S_iend] = pod_type(); // "true" diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/testsuite_hooks.h gcc-3.4.1/libstdc++-v3/testsuite/testsuite_hooks.h *** gcc-3.4.0/libstdc++-v3/testsuite/testsuite_hooks.h 2004-03-18 17:37:17.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/testsuite_hooks.h 2004-05-24 18:36:45.000000000 +0000 *************** *** 1,7 **** // -*- C++ -*- // Utility subroutines for the C++ library testsuite. // ! // Copyright (C) 2000, 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,7 ---- // -*- C++ -*- // Utility subroutines for the C++ library testsuite. // ! // Copyright (C) 2000, 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 *************** *** 39,45 **** // set_memory_limits() uses setrlimit() to restrict dynamic memory // allocation. We provide a default memory limit if none is passed by the // calling application. The argument to set_memory_limits() is the ! // limit in megabytes (a floating-point number). If _GLIBCXX_MEM_LIMITS is // not #defined before including this header, then no limiting is attempted. // // 3) counter --- 39,45 ---- // set_memory_limits() uses setrlimit() to restrict dynamic memory // allocation. We provide a default memory limit if none is passed by the // calling application. The argument to set_memory_limits() is the ! // limit in megabytes (a floating-point number). If _GLIBCXX_RES_LIMITS is // not #defined before including this header, then no limiting is attempted. // // 3) counter *************** namespace __gnu_test *** 86,92 **** // from c++config.h // Set memory limits if possible, if not set to 0. ! #ifndef _GLIBCXX_MEM_LIMITS # define MEMLIMIT_MB 0 #else # ifndef MEMLIMIT_MB --- 86,92 ---- // from c++config.h // Set memory limits if possible, if not set to 0. ! #ifndef _GLIBCXX_RES_LIMITS # define MEMLIMIT_MB 0 #else # ifndef MEMLIMIT_MB *************** namespace __gnu_test *** 96,107 **** extern void set_memory_limits(float __size = MEMLIMIT_MB); // Check mangled name demangles (using __cxa_demangle) as expected. void verify_demangle(const char* mangled, const char* wanted); - // Simple callback structure for variable numbers of tests (all with // same signature). Assume all unit tests are of the signature // void test01(); --- 96,108 ---- extern void set_memory_limits(float __size = MEMLIMIT_MB); + extern void + set_file_limit(unsigned long __size); // Check mangled name demangles (using __cxa_demangle) as expected. void verify_demangle(const char* mangled, const char* wanted); // Simple callback structure for variable numbers of tests (all with // same signature). Assume all unit tests are of the signature // void test01(); *************** namespace __gnu_test *** 113,119 **** private: int _M_size; test_type _M_tests[15]; ! public: func_callback(): _M_size(0) { }; --- 114,125 ---- private: int _M_size; test_type _M_tests[15]; ! ! func_callback& ! operator=(const func_callback&); ! ! func_callback(const func_callback&); ! public: func_callback(): _M_size(0) { }; *************** namespace __gnu_test *** 339,344 **** --- 345,368 ---- inline bool operator==(const copy_tracker& lhs, const copy_tracker& rhs) { return lhs.id() == rhs.id(); } + + // Class for checking required type conversions, implicit and + // explicit for given library data structures. + template + struct conversion + { + typedef typename _Container::const_iterator const_iterator; + + // Implicit conversion iterator to const_iterator. + static const_iterator + iterator_to_const_iterator() + { + _Container v; + const_iterator it = v.begin(); + const_iterator end = v.end(); + return it == end ? v.end() : it; + } + }; } // namespace __gnu_test namespace std diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/testsuite_performance.h gcc-3.4.1/libstdc++-v3/testsuite/testsuite_performance.h *** gcc-3.4.0/libstdc++-v3/testsuite/testsuite_performance.h 2004-03-18 17:37:17.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/testsuite_performance.h 2004-06-11 18:44:57.000000000 +0000 *************** *** 43,58 **** #elif defined (__FreeBSD__) extern "C" { ! struct mallinfo { int uordblks; }; ! struct mallinfo mallinfo(void) ! { struct mallinfo m = { (((size_t) sbrk (0) + 1023) / 1024) }; return m; } } #else extern "C" { ! struct mallinfo { int uordblks; }; ! struct mallinfo empty = { 0 }; ! struct mallinfo mallinfo(void) { return empty; } } #endif --- 43,75 ---- #elif defined (__FreeBSD__) extern "C" { ! struct mallinfo ! { ! int uordblks; ! int hblkhd; ! }; ! ! struct mallinfo ! mallinfo(void) ! { ! struct mallinfo m = { (((size_t) sbrk (0) + 1023) / 1024), 0 }; ! return m; ! } } #else extern "C" { ! struct mallinfo ! { ! int uordblks; ! int hblkhd; ! }; ! ! struct mallinfo empty = { 0, 0 }; ! ! struct mallinfo ! mallinfo(void) ! { return empty; } } #endif *************** namespace __gnu_test *** 101,109 **** class resource_counter { ! int who; ! rusage rusage_begin; ! rusage rusage_end; struct mallinfo allocation_begin; struct mallinfo allocation_end; --- 118,126 ---- class resource_counter { ! int who; ! rusage rusage_begin; ! rusage rusage_end; struct mallinfo allocation_begin; struct mallinfo allocation_end; *************** namespace __gnu_test *** 139,145 **** int allocated_memory() const ! { return allocation_end.uordblks - allocation_begin.uordblks; } long hard_page_fault() const --- 156,163 ---- int allocated_memory() const ! { return ((allocation_end.uordblks - allocation_begin.uordblks) ! + (allocation_end.hblkhd - allocation_begin.hblkhd)); } long hard_page_fault() const diff -Nrc3pad gcc-3.4.0/libstdc++-v3/testsuite/thread/pthread7-rope.cc gcc-3.4.1/libstdc++-v3/testsuite/thread/pthread7-rope.cc *** gcc-3.4.0/libstdc++-v3/testsuite/thread/pthread7-rope.cc 2004-03-18 17:38:22.000000000 +0000 --- gcc-3.4.1/libstdc++-v3/testsuite/thread/pthread7-rope.cc 2004-04-24 22:53:40.000000000 +0000 *************** *** 34,39 **** --- 34,40 ---- const int max_thread_count = 4; const int max_loop_count = 10000; + __gnu_cxx::crope foo2; __gnu_cxx::crope foo4; void* thread_main(void *) *************** main() *** 81,87 **** const char* data2; { - __gnu_cxx::crope foo2; foo2 += "bar2"; foo2 += "baz2"; foo2 += "bongle2"; --- 82,87 ---- *************** main() *** 107,114 **** pthread_join (tid[i], NULL); } ! // Nothing says the data will be trashed at this point... ! VERIFY( std::strcmp (data2, "bar2baz2bongle2") ); return 0; } --- 107,114 ---- pthread_join (tid[i], NULL); } ! VERIFY( !std::strcmp (data, "barbazbongle") ); ! VERIFY( !std::strcmp (data2, "bar2baz2bongle2") ); return 0; }