diff -Nrc3pad gcc-3.3.1/gcc/cp/call.c gcc-3.3.2/gcc/cp/call.c *** gcc-3.3.1/gcc/cp/call.c 2003-07-25 00:30:59.000000000 +0000 --- gcc-3.3.2/gcc/cp/call.c 2003-10-07 05:56:58.000000000 +0000 *************** standard_conversion (to, from, expr) *** 756,762 **** if ((TYPE_PTRFN_P (to) || TYPE_PTRMEMFUNC_P (to)) && expr && type_unknown_p (expr)) { ! expr = instantiate_type (to, expr, tf_none); if (expr == error_mark_node) return NULL_TREE; from = TREE_TYPE (expr); --- 756,762 ---- if ((TYPE_PTRFN_P (to) || TYPE_PTRMEMFUNC_P (to)) && expr && type_unknown_p (expr)) { ! expr = instantiate_type (to, expr, tf_conv); if (expr == error_mark_node) return NULL_TREE; from = TREE_TYPE (expr); *************** standard_conversion (to, from, expr) *** 857,872 **** } } else if (IS_AGGR_TYPE (TREE_TYPE (from)) ! && IS_AGGR_TYPE (TREE_TYPE (to))) { ! if (DERIVED_FROM_P (TREE_TYPE (to), TREE_TYPE (from))) ! { ! from = ! cp_build_qualified_type (TREE_TYPE (to), ! cp_type_quals (TREE_TYPE (from))); ! from = build_pointer_type (from); ! conv = build_conv (PTR_CONV, from, conv); ! } } if (same_type_p (from, to)) --- 857,881 ---- } } else if (IS_AGGR_TYPE (TREE_TYPE (from)) ! && IS_AGGR_TYPE (TREE_TYPE (to)) ! /* [conv.ptr] ! ! An rvalue of type "pointer to cv D," where D is a ! class type, can be converted to an rvalue of type ! "pointer to cv B," where B is a base class (clause ! _class.derived_) of D. If B is an inaccessible ! (clause _class.access_) or ambiguous ! (_class.member.lookup_) base class of D, a program ! that necessitates this conversion is ill-formed. */ ! /* Therefore, we use DERIVED_FROM_P, and not ! ACESSIBLY_UNIQUELY_DERIVED_FROM_P, in this test. */ ! && DERIVED_FROM_P (TREE_TYPE (to), TREE_TYPE (from))) { ! from = ! cp_build_qualified_type (TREE_TYPE (to), ! cp_type_quals (TREE_TYPE (from))); ! from = build_pointer_type (from); ! conv = build_conv (PTR_CONV, from, conv); } if (same_type_p (from, to)) *************** perform_implicit_conversion (type, expr) *** 5993,5999 **** /* Convert EXPR to TYPE (as a direct-initialization) if that is permitted. If the conversion is valid, the converted expression is ! returned. Otherwise, NULL_TREE is returned. */ tree perform_direct_initialization_if_possible (tree type, tree expr) --- 6002,6009 ---- /* Convert EXPR to TYPE (as a direct-initialization) if that is permitted. If the conversion is valid, the converted expression is ! returned. Otherwise, NULL_TREE is returned, except in the case ! that TYPE is a class type; in that case, an error is issued. */ tree perform_direct_initialization_if_possible (tree type, tree expr) *************** perform_direct_initialization_if_possibl *** 6002,6007 **** --- 6012,6033 ---- if (type == error_mark_node || error_operand_p (expr)) return error_mark_node; + /* [dcl.init] + + If the destination type is a (possibly cv-qualified) class type: + + -- If the initialization is direct-initialization ..., + constructors are considered. ... If no constructor applies, or + the overload resolution is ambiguous, the initialization is + ill-formed. */ + if (CLASS_TYPE_P (type)) + { + expr = build_special_member_call (NULL_TREE, complete_ctor_identifier, + build_tree_list (NULL_TREE, expr), + TYPE_BINFO (type), + LOOKUP_NORMAL); + return build_cplus_new (type, expr); + } conv = implicit_conversion (type, TREE_TYPE (expr), expr, LOOKUP_NORMAL); if (!conv || ICS_BAD_FLAG (conv)) *************** make_temporary_var_for_ref_to_temp (tree *** 6048,6065 **** return var; } ! /* Convert EXPR to the indicated reference TYPE, in a way suitable for ! initializing a variable of that TYPE. If DECL is non-NULL, it is ! the VAR_DECL being initialized with the EXPR. (In that case, the ! type of DECL will be TYPE.) ! Return the converted expression. */ tree ! initialize_reference (type, expr, decl) tree type; tree expr; tree decl; { tree conv; --- 6074,6096 ---- return var; } ! /* Convert EXPR to the indicated reference TYPE, in a way suitable ! for initializing a variable of that TYPE. If DECL is non-NULL, ! it is the VAR_DECL being initialized with the EXPR. (In that ! case, the type of DECL will be TYPE.) If DECL is non-NULL, then ! CLEANUP must also be non-NULL, and with *CLEANUP initialized to ! NULL. Upon return, if *CLEANUP is no longer NULL, it will be a ! CLEANUP_STMT that should be inserted after the returned ! expression is used to initialize DECL. ! Return the converted expression. */ tree ! initialize_reference (type, expr, decl, cleanup) tree type; tree expr; tree decl; + tree *cleanup; { tree conv; *************** initialize_reference (type, expr, decl) *** 6069,6075 **** conv = reference_binding (type, TREE_TYPE (expr), expr, LOOKUP_NORMAL); if (!conv || ICS_BAD_FLAG (conv)) { ! error ("could not convert `%E' to `%T'", expr, type); return error_mark_node; } --- 6100,6114 ---- conv = reference_binding (type, TREE_TYPE (expr), expr, LOOKUP_NORMAL); if (!conv || ICS_BAD_FLAG (conv)) { ! if (!(TYPE_QUALS (TREE_TYPE (type)) & TYPE_QUAL_CONST) ! && !real_lvalue_p (expr)) ! error ("invalid initialization of non-const reference of " ! "type '%T' from a temporary of type '%T'", ! type, TREE_TYPE (expr)); ! else ! error ("invalid initialization of reference of type " ! "'%T' from expression of type '%T'", type, ! TREE_TYPE (expr)); return error_mark_node; } *************** initialize_reference (type, expr, decl) *** 6135,6148 **** type = TREE_TYPE (expr); var = make_temporary_var_for_ref_to_temp (decl, type); layout_decl (var, 0); if (at_function_scope_p ()) { - tree cleanup; - add_decl_stmt (var); ! cleanup = cxx_maybe_build_cleanup (var); ! if (cleanup) ! finish_decl_cleanup (var, cleanup); } else { --- 6174,6206 ---- type = TREE_TYPE (expr); var = make_temporary_var_for_ref_to_temp (decl, type); layout_decl (var, 0); + /* Create the INIT_EXPR that will initialize the temporary + variable. */ + init = build (INIT_EXPR, type, var, expr); if (at_function_scope_p ()) { add_decl_stmt (var); ! *cleanup = cxx_maybe_build_cleanup (var); ! if (*cleanup) ! /* We must be careful to destroy the temporary only ! after its initialization has taken place. If the ! initialization throws an exception, then the ! destructor should not be run. We cannot simply ! transform INIT into something like: ! ! (INIT, ({ CLEANUP_STMT; })) ! ! because emit_local_var always treats the ! initializer as a full-expression. Thus, the ! destructor would run too early; it would run at the ! end of initializing the reference variable, rather ! than at the end of the block enclosing the ! reference variable. ! ! The solution is to pass back a CLEANUP_STMT which ! the caller is responsible for attaching to the ! statement tree. */ ! *cleanup = build_stmt (CLEANUP_STMT, var, *cleanup); } else { *************** initialize_reference (type, expr, decl) *** 6151,6157 **** static_aggregates = tree_cons (NULL_TREE, var, static_aggregates); } - init = build (INIT_EXPR, type, var, expr); /* Use its address to initialize the reference variable. */ expr = build_address (var); expr = build (COMPOUND_EXPR, TREE_TYPE (expr), init, expr); --- 6209,6214 ---- diff -Nrc3pad gcc-3.3.1/gcc/cp/ChangeLog gcc-3.3.2/gcc/cp/ChangeLog *** gcc-3.3.1/gcc/cp/ChangeLog 2003-08-04 12:48:43.000000000 +0000 --- gcc-3.3.2/gcc/cp/ChangeLog 2003-10-16 19:43:43.000000000 +0000 *************** *** 1,6 **** ! 2003-08-04 Release Manager ! * GCC 3.3.1 Released. 2003-08-04 Release Manager --- 1,175 ---- ! 2003-10-16 Release Manager ! * GCC 3.3.2 Released. ! ! 2003-10-15 Kriang Lerdsuwanakij ! ! PR c++/12369 ! * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend ! is a member of other class. ! * friend.c (do_friend): Don't build TEMPLATE_DECL if friend ! is a specialization of function template. ! ! 2003-10-15 Kriang Lerdsuwanakij ! ! PR c++/7939 ! * typeck.c (comptypes): Don't ICE when its first argument is ! error_mark_node. ! (compparms): Reverse the arguments of same_type_p. ! ! 2003-10-14 Jason Merrill ! ! PR c++/11878 ! * tree.c (build_target_expr_with_type): Call force_rvalue for ! classes with non-trivial copy ctors. ! ! PR c++/11063 ! * typeck.c (build_modify_expr): Call convert rather than abort. ! ! 2003-10-06 Mark Mitchell ! ! PR c++/10147 ! * call.c (initialize_reference): Tweak error message. ! ! PR c++/12337 ! * init.c (build_new_1): Make sure that the expression returned is ! not an lvalue. ! ! PR c++/12344, c++/12236, c++/8656 ! * decl.c (start_function): Do not ignore attributes embedded in a ! function declarator. ! ! 2003-10-04 Roger Sayle ! ! PR c++/11409 ! * class.c (resolve_address_of_overloaded_function): When building ! list of matching non-template function decls, ignore anticipated ! declarations of undeclared or shadowed GCC builtins. ! ! 2003-10-02 Mark Mitchell ! ! PR c++/12486 ! * typeck.c (finish_class_member_access_expr): Issue diagnostic ! on erroneous use of qualified name. ! ! 2003-07-09 Mark Mitchell ! ! * cp-tree.h (break_out_calls): Remove declaration. ! * tree.c (break_out_calls): Remove. ! * typeck.c (build_modify_expr): Avoid invalid sharing of trees. ! ! 2003-09-18 Mark Mitchell ! ! * class.c (resolve_address_of_overloaded_function): Replace ! complain parameter with flags parameter. ! (instantiate_type): Adjust accordingly. ! ! 2003-09-17 Mark Mitchell ! ! PR c++/11991 ! * typeck2.c (incomplete_type_diagnostic): Robustify. ! ! PR c++/12266 ! * cp-tree.h (tsubst_flags_t): Add tf_conv. ! * class.c (standard_conversion): Pass tf_conv to ! instantiate_type. ! (resolve_address_of_overloaded_function): Do not call mark_used ! when just checking conversions. ! ! 2003-09-14 Mark Mitchell ! ! PR c++/3907 ! * cp-tree.h (innermost_scope_is_class_p): New function. ! * class.c (maybe_note_name_used_in_class): Refine test for whether ! or not we are in a class scope. ! * decl.c (innermost_scope_is_class_p): Define. ! ! 2003-09-14 Mark Mitchell ! ! * class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for ! an bit-field whose width exceeds that of its type. ! ! 2003-09-09 Steven Bosscher ! ! PR c++/11595 ! * decl.c (define_label): Remove unreachable timevar pop. ! Always return the decl, even if the definition is invalid. ! ! 2003-09-08 Mark Mitchell ! ! PR c++/11786 ! * decl2.c (add_function): Do not complain about seeing the same ! non-function twice. ! ! 2003-09-08 Mark Mitchell ! ! PR c++/5296 ! * pt.c (try_one_overload): Add addr_p parameter. ! (resolve_overloaded_unification): Pass it. ! ! 2003-09-07 Jason Merrill ! ! PR c++/12181 ! * typeck.c (build_modify_expr): Don't always stabilize the lhs and ! rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs. ! ! 2003-09-06 Mark Mitchell ! ! PR c++/11867 ! * call.c (standard_conversion): Improve comments. ! (perform_direct_initialization): Make sure we return an expression ! of the correct type. ! * typeck.c (build_static_cast): Check for ambiguity and ! accessibility when performing conversions. ! ! 2003-09-05 Mark Mitchell ! ! PR c++/12163 ! * call.c (perform_direct_initialization): Correct logic for ! direct-initialization of a class type. ! ! PR c++/12146 ! * pt.c (lookup_template_function): Robustify. ! ! 2003-09-04 Mark Mitchell ! ! Revert this patch: ! * class.c (include_empty_classes): Correct logic for ABI version 1. ! ! 2003-09-03 Mark Mitchell ! ! PR c++/12053 ! * class.c (include_empty_classes): Correct logic for ABI version 1. ! ! 2003-09-01 Mark Mitchell ! ! PR c++/12114 ! * cp-tree.h (initialize_reference): Change prototype. ! * call.c (initialize_reference): Add cleanup parameter. ! * decl.c (grok_reference_init): Likewise. ! (check_initializer): Likewise. ! (cp_finish_decl): Insert a CLEANUP_STMT if necessary. ! (duplicate_decls): When replacing an anticipated builtin, do not ! honor TREE_NOTHROW. ! * typeck.c (convert_for_initialization): Correct call to ! initialize_reference. ! ! 2003-08-29 Mark Mitchell ! ! PR c++/11928 ! * search.c (add_conversions): Avoid adding two conversion ! operators for the same type. ! ! 2003-08-20 Kaveh R. Ghazi ! ! * cp-tree.h (build_function_call_real): Remove unused parameter. ! * typeck.c (build_function_call_real): Likewise. Caller changed. ! * decl.c (binding_table_reverse_maybe_remap): Initialize variable. ! ! 2003-08-19 Gabriel Dos Reis ! ! PR c++/5293 ! * call.c (initialize_reference): Improve diagnostic. 2003-08-04 Release Manager diff -Nrc3pad gcc-3.3.1/gcc/cp/class.c gcc-3.3.2/gcc/cp/class.c *** gcc-3.3.1/gcc/cp/class.c 2003-07-25 00:30:59.000000000 +0000 --- gcc-3.3.2/gcc/cp/class.c 2003-10-05 03:46:56.000000000 +0000 *************** static int field_decl_cmp PARAMS ((const *** 127,134 **** static int method_name_cmp PARAMS ((const tree *, const tree *)); static void add_implicitly_declared_members PARAMS ((tree, int, int, int)); static tree fixed_type_or_null PARAMS ((tree, int *, int *)); ! static tree resolve_address_of_overloaded_function PARAMS ((tree, tree, int, ! int, int, tree)); static tree build_vtable_entry_ref PARAMS ((tree, tree, tree)); static tree build_vtbl_ref_1 PARAMS ((tree, tree)); static tree build_vtbl_initializer PARAMS ((tree, tree, tree, tree, int *)); --- 127,135 ---- static int method_name_cmp PARAMS ((const tree *, const tree *)); static void add_implicitly_declared_members PARAMS ((tree, int, int, int)); static tree fixed_type_or_null PARAMS ((tree, int *, int *)); ! static tree resolve_address_of_overloaded_function PARAMS ((tree, tree, ! tsubst_flags_t, ! int, int, tree)); static tree build_vtable_entry_ref PARAMS ((tree, tree, tree)); static tree build_vtbl_ref_1 PARAMS ((tree, tree)); static tree build_vtbl_initializer PARAMS ((tree, tree, tree, tree, int *)); *************** layout_class_type (tree t, tree *virtual *** 5042,5047 **** --- 5043,5057 ---- field to the size of its declared type; the rest of the field is effectively invisible. */ DECL_SIZE (field) = TYPE_SIZE (type); + /* We must also reset the DECL_MODE of the field. */ + if (abi_version_at_least (2)) + DECL_MODE (field) = TYPE_MODE (type); + else if (warn_abi + && DECL_MODE (field) != TYPE_MODE (type)) + /* Versions of G++ before G++ 3.4 did not reset the + DECL_MODE. */ + warning ("the offset of `%D' may not be ABI-compliant and may " + "change in a future version of GCC", field); } else { *************** pop_lang_context () *** 5994,6006 **** static tree resolve_address_of_overloaded_function (target_type, overload, ! complain, ptrmem, template_only, explicit_targs) tree target_type; tree overload; ! int complain; int ptrmem; int template_only; tree explicit_targs; --- 6004,6016 ---- static tree resolve_address_of_overloaded_function (target_type, overload, ! flags, ptrmem, template_only, explicit_targs) tree target_type; tree overload; ! tsubst_flags_t flags; int ptrmem; int template_only; tree explicit_targs; *************** resolve_address_of_overloaded_function ( *** 6064,6070 **** } else { ! if (complain) error ("\ cannot resolve overloaded function `%D' based on conversion to type `%T'", DECL_NAME (OVL_FUNCTION (overload)), target_type); --- 6074,6080 ---- } else { ! if (flags & tf_error) error ("\ cannot resolve overloaded function `%D' based on conversion to type `%T'", DECL_NAME (OVL_FUNCTION (overload)), target_type); *************** cannot resolve overloaded function `%D' *** 6093,6099 **** /* We're looking for a non-static member, and this isn't one, or vice versa. */ continue; ! /* See if there's a match. */ fntype = TREE_TYPE (fn); if (is_ptrmem) --- 6103,6113 ---- /* We're looking for a non-static member, and this isn't one, or vice versa. */ continue; ! ! /* Ignore anticipated decls of undeclared builtins. */ ! if (DECL_ANTICIPATED (fn)) ! continue; ! /* See if there's a match. */ fntype = TREE_TYPE (fn); if (is_ptrmem) *************** cannot resolve overloaded function `%D' *** 6184,6190 **** if (matches == NULL_TREE) { /* There were *no* matches. */ ! if (complain) { error ("no matches converting function `%D' to type `%#T'", DECL_NAME (OVL_FUNCTION (overload)), --- 6198,6204 ---- if (matches == NULL_TREE) { /* There were *no* matches. */ ! if (flags & tf_error) { error ("no matches converting function `%D' to type `%#T'", DECL_NAME (OVL_FUNCTION (overload)), *************** cannot resolve overloaded function `%D' *** 6205,6211 **** { /* There were too many matches. */ ! if (complain) { tree match; --- 6219,6225 ---- { /* There were too many matches. */ ! if (flags & tf_error) { tree match; *************** cannot resolve overloaded function `%D' *** 6232,6238 **** { static int explained; ! if (!complain) return error_mark_node; pedwarn ("assuming pointer to member `%D'", fn); --- 6246,6252 ---- { static int explained; ! if (!(flags & tf_error)) return error_mark_node; pedwarn ("assuming pointer to member `%D'", fn); *************** cannot resolve overloaded function `%D' *** 6242,6248 **** explained = 1; } } ! mark_used (fn); if (TYPE_PTRFN_P (target_type) || TYPE_PTRMEMFUNC_P (target_type)) return build_unary_op (ADDR_EXPR, fn, 0); --- 6256,6268 ---- explained = 1; } } ! ! /* If we're doing overload resolution purely for the purpose of ! determining conversion sequences, we should not consider the ! function used. If this conversion sequence is selected, the ! function will be marked as used at this point. */ ! if (!(flags & tf_conv)) ! mark_used (fn); if (TYPE_PTRFN_P (target_type) || TYPE_PTRMEMFUNC_P (target_type)) return build_unary_op (ADDR_EXPR, fn, 0); *************** instantiate_type (lhstype, rhs, flags) *** 6272,6277 **** --- 6292,6298 ---- tree lhstype, rhs; tsubst_flags_t flags; { + tsubst_flags_t flags_in = flags; int complain = (flags & tf_error); int strict = (flags & tf_no_attributes) ? COMPARE_NO_ATTRIBUTES : COMPARE_STRICT; *************** instantiate_type (lhstype, rhs, flags) *** 6362,6368 **** return resolve_address_of_overloaded_function (lhstype, fns, ! complain, allow_ptrmem, /*template_only=*/1, args); --- 6383,6389 ---- return resolve_address_of_overloaded_function (lhstype, fns, ! flags_in, allow_ptrmem, /*template_only=*/1, args); *************** instantiate_type (lhstype, rhs, flags) *** 6372,6378 **** return resolve_address_of_overloaded_function (lhstype, rhs, ! complain, allow_ptrmem, /*template_only=*/0, /*explicit_targs=*/NULL_TREE); --- 6393,6399 ---- return resolve_address_of_overloaded_function (lhstype, rhs, ! flags_in, allow_ptrmem, /*template_only=*/0, /*explicit_targs=*/NULL_TREE); *************** maybe_note_name_used_in_class (name, dec *** 6678,6684 **** splay_tree names_used; /* If we're not defining a class, there's nothing to do. */ ! if (!current_class_type || !TYPE_BEING_DEFINED (current_class_type)) return; /* If there's already a binding for this NAME, then we don't have --- 6699,6705 ---- splay_tree names_used; /* If we're not defining a class, there's nothing to do. */ ! if (!innermost_scope_is_class_p ()) return; /* If there's already a binding for this NAME, then we don't have diff -Nrc3pad gcc-3.3.1/gcc/cp/cp-tree.h gcc-3.3.2/gcc/cp/cp-tree.h *** gcc-3.3.1/gcc/cp/cp-tree.h 2003-07-25 00:30:59.000000000 +0000 --- gcc-3.3.2/gcc/cp/cp-tree.h 2003-10-02 12:00:48.000000000 +0000 *************** typedef enum tsubst_flags_t { *** 3149,3156 **** (make_typename_type use) */ tf_ptrmem_ok = 1 << 5, /* pointers to member ok (internal instantiate_type use) */ ! tf_parsing = 1 << 6 /* called from parser (make_typename_type use) */ } tsubst_flags_t; /* The kind of checking we can do looking in a class hierarchy. */ --- 3149,3160 ---- (make_typename_type use) */ tf_ptrmem_ok = 1 << 5, /* pointers to member ok (internal instantiate_type use) */ ! tf_parsing = 1 << 6, /* called from parser (make_typename_type use) */ + tf_conv = 1 << 8, /* We are determining what kind of + conversion might be permissible, not + actually performing the + conversion. */ } tsubst_flags_t; /* The kind of checking we can do looking in a class hierarchy. */ *************** extern tree type_passed_as *** 3623,3629 **** extern tree convert_for_arg_passing PARAMS ((tree, tree)); extern tree cp_convert_parm_for_inlining PARAMS ((tree, tree, tree)); extern int is_properly_derived_from PARAMS ((tree, tree)); ! extern tree initialize_reference PARAMS ((tree, tree, tree)); extern tree make_temporary_var_for_ref_to_temp (tree, tree); extern tree strip_top_quals PARAMS ((tree)); extern tree perform_implicit_conversion PARAMS ((tree, tree)); --- 3627,3633 ---- extern tree convert_for_arg_passing PARAMS ((tree, tree)); extern tree cp_convert_parm_for_inlining PARAMS ((tree, tree, tree)); extern int is_properly_derived_from PARAMS ((tree, tree)); ! extern tree initialize_reference PARAMS ((tree, tree, tree, tree *)); extern tree make_temporary_var_for_ref_to_temp (tree, tree); extern tree strip_top_quals PARAMS ((tree)); extern tree perform_implicit_conversion PARAMS ((tree, tree)); *************** extern void adjust_clone_args PARAMS ( *** 3696,3701 **** --- 3700,3706 ---- /* decl.c */ extern int global_bindings_p PARAMS ((void)); extern int kept_level_p PARAMS ((void)); + extern bool innermost_scope_is_class_p (void); extern tree getdecls PARAMS ((void)); extern void pushlevel PARAMS ((int)); extern tree poplevel PARAMS ((int,int, int)); *************** extern tree build_min PARAMS ((enum t *** 4312,4318 **** extern tree build_min_nt PARAMS ((enum tree_code, ...)); extern tree build_cplus_new PARAMS ((tree, tree)); extern tree get_target_expr PARAMS ((tree)); - extern tree break_out_calls PARAMS ((tree)); extern tree build_cplus_method_type PARAMS ((tree, tree, tree)); extern tree build_cplus_staticfn_type PARAMS ((tree, tree, tree)); extern tree build_cplus_array_type PARAMS ((tree, tree)); --- 4317,4322 ---- *************** extern tree build_x_indirect_ref PARAMS *** 4405,4411 **** extern tree build_indirect_ref PARAMS ((tree, const char *)); extern tree build_array_ref PARAMS ((tree, tree)); extern tree get_member_function_from_ptrfunc PARAMS ((tree *, tree)); ! extern tree build_function_call_real PARAMS ((tree, tree, int, int)); extern tree build_function_call_maybe PARAMS ((tree, tree)); extern tree convert_arguments PARAMS ((tree, tree, tree, int)); extern tree build_x_binary_op PARAMS ((enum tree_code, tree, tree)); --- 4409,4415 ---- extern tree build_indirect_ref PARAMS ((tree, const char *)); extern tree build_array_ref PARAMS ((tree, tree)); extern tree get_member_function_from_ptrfunc PARAMS ((tree *, tree)); ! extern tree build_function_call_real PARAMS ((tree, tree, int)); extern tree build_function_call_maybe PARAMS ((tree, tree)); extern tree convert_arguments PARAMS ((tree, tree, tree, int)); extern tree build_x_binary_op PARAMS ((enum tree_code, tree, tree)); diff -Nrc3pad gcc-3.3.1/gcc/cp/decl2.c gcc-3.3.2/gcc/cp/decl2.c *** gcc-3.3.1/gcc/cp/decl2.c 2003-07-10 12:43:11.000000000 +0000 --- gcc-3.3.2/gcc/cp/decl2.c 2003-09-08 19:05:42.000000000 +0000 *************** add_function (k, fn) *** 4137,4142 **** --- 4137,4144 ---- /* We must find only functions, or exactly one non-function. */ if (!k->functions) k->functions = fn; + else if (fn == k->functions) + ; else if (is_overloaded_fn (k->functions) && is_overloaded_fn (fn)) k->functions = build_overload (fn, k->functions); else diff -Nrc3pad gcc-3.3.1/gcc/cp/decl.c gcc-3.3.2/gcc/cp/decl.c *** gcc-3.3.1/gcc/cp/decl.c 2003-07-25 00:31:00.000000000 +0000 --- gcc-3.3.2/gcc/cp/decl.c 2003-10-16 09:33:52.000000000 +0000 *************** static tree lookup_tag_reverse PARAMS (( *** 72,78 **** static tree lookup_name_real PARAMS ((tree, int, int, int)); static void push_local_name PARAMS ((tree)); static void warn_extern_redeclared_static PARAMS ((tree, tree)); ! static tree grok_reference_init PARAMS ((tree, tree, tree)); static tree grokfndecl PARAMS ((tree, tree, tree, tree, int, enum overload_flags, tree, tree, int, int, int, int, int, int, tree)); --- 72,78 ---- static tree lookup_name_real PARAMS ((tree, int, int, int)); static void push_local_name PARAMS ((tree)); static void warn_extern_redeclared_static PARAMS ((tree, tree)); ! static tree grok_reference_init PARAMS ((tree, tree, tree, tree *)); static tree grokfndecl PARAMS ((tree, tree, tree, tree, int, enum overload_flags, tree, tree, int, int, int, int, int, int, tree)); *************** static void pop_labels PARAMS ((tree)); *** 123,129 **** static void maybe_deduce_size_from_array_init PARAMS ((tree, tree)); static void layout_var_decl PARAMS ((tree)); static void maybe_commonize_var PARAMS ((tree)); ! static tree check_initializer (tree, tree, int); static void make_rtl_for_nonlocal_decl PARAMS ((tree, tree, const char *)); static void save_function_data PARAMS ((tree)); static void check_function_type PARAMS ((tree, tree)); --- 123,129 ---- static void maybe_deduce_size_from_array_init PARAMS ((tree, tree)); static void layout_var_decl PARAMS ((tree)); static void maybe_commonize_var PARAMS ((tree)); ! static tree check_initializer (tree, tree, int, tree *); static void make_rtl_for_nonlocal_decl PARAMS ((tree, tree, const char *)); static void save_function_data PARAMS ((tree)); static void check_function_type PARAMS ((tree, tree)); *************** binding_table_reverse_maybe_remap (bindi *** 461,467 **** { const size_t chain_count = table->chain_count; binding_entry entry = NULL; ! binding_entry *p; size_t i; for (i = 0; i < chain_count && entry == NULL; ++i) --- 461,467 ---- { const size_t chain_count = table->chain_count; binding_entry entry = NULL; ! binding_entry *p = NULL; size_t i; for (i = 0; i < chain_count && entry == NULL; ++i) *************** kept_level_p () *** 922,927 **** --- 922,935 ---- && !current_binding_level->tag_transparent)); } + /* Returns the kind of the innermost scope. */ + + bool + innermost_scope_is_class_p () + { + return current_binding_level->parm_flag == 2; + } + static void declare_namespace_level () { *************** duplicate_decls (newdecl, olddecl) *** 3380,3388 **** if (DECL_ANTICIPATED (olddecl)) ; /* Do nothing yet. */ else if ((DECL_EXTERN_C_P (newdecl) ! && DECL_EXTERN_C_P (olddecl)) ! || compparms (TYPE_ARG_TYPES (TREE_TYPE (newdecl)), ! TYPE_ARG_TYPES (TREE_TYPE (olddecl)))) { /* A near match; override the builtin. */ --- 3388,3396 ---- if (DECL_ANTICIPATED (olddecl)) ; /* Do nothing yet. */ else if ((DECL_EXTERN_C_P (newdecl) ! && DECL_EXTERN_C_P (olddecl)) ! || compparms (TYPE_ARG_TYPES (TREE_TYPE (newdecl)), ! TYPE_ARG_TYPES (TREE_TYPE (olddecl)))) { /* A near match; override the builtin. */ *************** duplicate_decls (newdecl, olddecl) *** 3409,3414 **** --- 3417,3426 ---- else if (DECL_ANTICIPATED (olddecl)) TREE_TYPE (olddecl) = TREE_TYPE (newdecl); + /* Whether or not the builtin can throw exceptions has no + bearing on this declarator. */ + TREE_NOTHROW (olddecl) = 0; + if (DECL_THIS_STATIC (newdecl) && !DECL_THIS_STATIC (olddecl)) { /* If a builtin function is redeclared as `static', merge *************** check_goto (decl) *** 5398,5405 **** } /* Define a label, specifying the location in the source file. ! Return the LABEL_DECL node for the label, if the definition is valid. ! Otherwise return 0. */ tree define_label (filename, line, name) --- 5410,5416 ---- } /* Define a label, specifying the location in the source file. ! Return the LABEL_DECL node for the label. */ tree define_label (filename, line, name) *************** define_label (filename, line, name) *** 5426,5435 **** pedwarn ("label named wchar_t"); if (DECL_INITIAL (decl) != NULL_TREE) ! { ! error ("duplicate label `%D'", decl); ! POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, NULL_TREE); ! } else { /* Mark label as having been defined. */ --- 5437,5443 ---- pedwarn ("label named wchar_t"); if (DECL_INITIAL (decl) != NULL_TREE) ! error ("duplicate label `%D'", decl); else { /* Mark label as having been defined. */ *************** define_label (filename, line, name) *** 5443,5451 **** ent->binding_level = current_binding_level; } check_previous_gotos (decl); - POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, decl); } timevar_pop (TV_NAME_LOOKUP); } struct cp_switch --- 5451,5460 ---- ent->binding_level = current_binding_level; } check_previous_gotos (decl); } + timevar_pop (TV_NAME_LOOKUP); + return decl; } struct cp_switch *************** start_decl_1 (decl) *** 7899,7913 **** DECL_INITIAL (decl) = NULL_TREE; } ! /* Handle initialization of references. ! These three arguments are from `cp_finish_decl', and have the ! same meaning here that they do there. ! Quotes on semantics can be found in ARM 8.4.3. */ static tree ! grok_reference_init (decl, type, init) ! tree decl, type, init; { tree tmp; --- 7908,7925 ---- DECL_INITIAL (decl) = NULL_TREE; } ! /* Handle initialization of references. DECL, TYPE, and INIT have the ! same meaning as in cp_finish_decl. *CLEANUP must be NULL on entry, ! but will be set to a new CLEANUP_STMT if a temporary is created ! that must be destroeyd subsequently. ! Returns an initializer expression to use to initialize DECL, or ! NULL if the initialization can be performed statically. + Quotes on semantics can be found in ARM 8.4.3. */ + static tree ! grok_reference_init (tree decl, tree type, tree init, tree *cleanup) { tree tmp; *************** grok_reference_init (decl, type, init) *** 7949,7955 **** DECL_INITIAL for local references (instead assigning to them explicitly); we need to allow the temporary to be initialized first. */ ! tmp = initialize_reference (type, init, decl); if (tmp == error_mark_node) return NULL_TREE; --- 7961,7967 ---- DECL_INITIAL for local references (instead assigning to them explicitly); we need to allow the temporary to be initialized first. */ ! tmp = initialize_reference (type, init, decl, cleanup); if (tmp == error_mark_node) return NULL_TREE; *************** reshape_init (tree type, tree *initp) *** 8380,8392 **** } /* Verify INIT (the initializer for DECL), and record the ! initialization in DECL_INITIAL, if appropriate. If the return value is non-NULL, it is an expression that must be evaluated dynamically to initialize DECL. */ static tree ! check_initializer (tree decl, tree init, int flags) { tree type = TREE_TYPE (decl); --- 8392,8405 ---- } /* Verify INIT (the initializer for DECL), and record the ! initialization in DECL_INITIAL, if appropriate. CLEANUP is as for ! grok_reference_init. If the return value is non-NULL, it is an expression that must be evaluated dynamically to initialize DECL. */ static tree ! check_initializer (tree decl, tree init, int flags, tree *cleanup) { tree type = TREE_TYPE (decl); *************** check_initializer (tree decl, tree init, *** 8436,8442 **** init = NULL_TREE; } else if (!DECL_EXTERNAL (decl) && TREE_CODE (type) == REFERENCE_TYPE) ! init = grok_reference_init (decl, type, init); else if (init) { if (TREE_CODE (init) == CONSTRUCTOR && TREE_HAS_CONSTRUCTOR (init)) --- 8449,8455 ---- init = NULL_TREE; } else if (!DECL_EXTERNAL (decl) && TREE_CODE (type) == REFERENCE_TYPE) ! init = grok_reference_init (decl, type, init, cleanup); else if (init) { if (TREE_CODE (init) == CONSTRUCTOR && TREE_HAS_CONSTRUCTOR (init)) *************** cp_finish_decl (decl, init, asmspec_tree *** 8745,8752 **** tree asmspec_tree; int flags; { ! register tree type; tree ttype = NULL_TREE; const char *asmspec = NULL; int was_readonly = 0; --- 8758,8766 ---- tree asmspec_tree; int flags; { ! tree type; tree ttype = NULL_TREE; + tree cleanup; const char *asmspec = NULL; int was_readonly = 0; *************** cp_finish_decl (decl, init, asmspec_tree *** 8757,8762 **** --- 8771,8779 ---- return; } + /* Assume no cleanup is required. */ + cleanup = NULL_TREE; + /* If a name was specified, get the string. */ if (global_scope_p (current_binding_level)) asmspec_tree = maybe_apply_renaming_pragma (decl, asmspec_tree); *************** cp_finish_decl (decl, init, asmspec_tree *** 8857,8863 **** make_decl_rtl (decl, asmspec); } else if (TREE_CODE (decl) == RESULT_DECL) ! init = check_initializer (decl, init, flags); else if (TREE_CODE (decl) == VAR_DECL) { /* Only PODs can have thread-local storage. Other types may require --- 8874,8880 ---- make_decl_rtl (decl, asmspec); } else if (TREE_CODE (decl) == RESULT_DECL) ! init = check_initializer (decl, init, flags, &cleanup); else if (TREE_CODE (decl) == VAR_DECL) { /* Only PODs can have thread-local storage. Other types may require *************** cp_finish_decl (decl, init, asmspec_tree *** 8874,8880 **** is *not* defined. */ && (!DECL_EXTERNAL (decl) || init)) { ! init = check_initializer (decl, init, flags); /* Thread-local storage cannot be dynamically initialized. */ if (DECL_THREAD_LOCAL (decl) && init) { --- 8891,8897 ---- is *not* defined. */ && (!DECL_EXTERNAL (decl) || init)) { ! init = check_initializer (decl, init, flags, &cleanup); /* Thread-local storage cannot be dynamically initialized. */ if (DECL_THREAD_LOCAL (decl) && init) { *************** cp_finish_decl (decl, init, asmspec_tree *** 8993,8998 **** --- 9010,9020 ---- } } + /* If a CLEANUP_STMT was created to destroy a temporary bound to a + reference, insert it in the statement-tree now. */ + if (cleanup) + add_stmt (cleanup); + finish_end: if (was_readonly) *************** grokdeclarator (declarator, declspecs, d *** 12315,12321 **** members of other classes. */ /* All method decls are public, so tell grokfndecl to set TREE_PUBLIC, also. */ ! decl = grokfndecl (ctype, type, declarator, declarator, virtualp, flags, quals, raises, friendp ? -1 : 0, friendp, 1, 0, funcdef_flag, template_count, in_namespace); --- 12337,12346 ---- members of other classes. */ /* All method decls are public, so tell grokfndecl to set TREE_PUBLIC, also. */ ! decl = grokfndecl (ctype, type, ! TREE_CODE (declarator) != TEMPLATE_ID_EXPR ! ? declarator : dname, ! declarator, virtualp, flags, quals, raises, friendp ? -1 : 0, friendp, 1, 0, funcdef_flag, template_count, in_namespace); *************** start_function (declspecs, declarator, a *** 14264,14270 **** } else { ! decl1 = grokdeclarator (declarator, declspecs, FUNCDEF, 1, NULL); /* If the declarator is not suitable for a function definition, cause a syntax error. */ if (decl1 == NULL_TREE || TREE_CODE (decl1) != FUNCTION_DECL) --- 14289,14295 ---- } else { ! decl1 = grokdeclarator (declarator, declspecs, FUNCDEF, 1, &attrs); /* If the declarator is not suitable for a function definition, cause a syntax error. */ if (decl1 == NULL_TREE || TREE_CODE (decl1) != FUNCTION_DECL) diff -Nrc3pad gcc-3.3.1/gcc/cp/friend.c gcc-3.3.2/gcc/cp/friend.c *** gcc-3.3.1/gcc/cp/friend.c 2003-01-31 12:26:10.000000000 +0000 --- gcc-3.3.2/gcc/cp/friend.c 2003-10-16 09:33:53.000000000 +0000 *************** do_friend (ctype, declarator, decl, parm *** 352,357 **** --- 352,359 ---- if (is_friend_template) decl = DECL_TI_TEMPLATE (push_template_decl (decl)); + else if (DECL_TEMPLATE_INFO (decl)) + ; else if (template_class_depth (current_class_type)) decl = push_template_decl_real (decl, /*is_friend=*/1); diff -Nrc3pad gcc-3.3.1/gcc/cp/init.c gcc-3.3.2/gcc/cp/init.c *** gcc-3.3.1/gcc/cp/init.c 2003-07-25 00:31:00.000000000 +0000 --- gcc-3.3.2/gcc/cp/init.c 2003-10-07 05:56:59.000000000 +0000 *************** build_new_1 (exp) *** 2517,2522 **** --- 2517,2526 ---- element. */ rval = convert (build_pointer_type (type), rval); + /* A new-expression is never an lvalue. */ + if (real_lvalue_p (rval)) + rval = build1 (NON_LVALUE_EXPR, TREE_TYPE (rval), rval); + return rval; } diff -Nrc3pad gcc-3.3.1/gcc/cp/parse.h gcc-3.3.2/gcc/cp/parse.h *** gcc-3.3.1/gcc/cp/parse.h 2003-08-04 13:32:36.000000000 +0000 --- gcc-3.3.2/gcc/cp/parse.h 2003-10-16 20:47:06.000000000 +0000 *************** *** 1,5 **** ! #ifndef BISON_P21918_H ! # define BISON_P21918_H #ifndef YYSTYPE typedef union { GTY(()) --- 1,5 ---- ! #ifndef BISON_P9195_H ! # define BISON_P9195_H #ifndef YYSTYPE typedef union { GTY(()) *************** typedef union { GTY(()) *** 104,108 **** extern YYSTYPE yylval; ! #endif /* not BISON_P21918_H */ #define YYEMPTY -2 --- 104,108 ---- extern YYSTYPE yylval; ! #endif /* not BISON_P9195_H */ #define YYEMPTY -2 diff -Nrc3pad gcc-3.3.1/gcc/cp/pt.c gcc-3.3.2/gcc/cp/pt.c *** gcc-3.3.1/gcc/cp/pt.c 2003-07-20 04:49:00.000000000 +0000 --- gcc-3.3.2/gcc/cp/pt.c 2003-09-08 16:58:59.000000000 +0000 *************** static void pop_access_scope PARAMS ((tr *** 95,101 **** static int resolve_overloaded_unification PARAMS ((tree, tree, tree, tree, unification_kind_t, int)); static int try_one_overload PARAMS ((tree, tree, tree, tree, tree, ! unification_kind_t, int)); static int unify PARAMS ((tree, tree, tree, tree, int)); static void add_pending_template PARAMS ((tree)); static void reopen_tinst_level PARAMS ((tree)); --- 95,101 ---- static int resolve_overloaded_unification PARAMS ((tree, tree, tree, tree, unification_kind_t, int)); static int try_one_overload PARAMS ((tree, tree, tree, tree, tree, ! unification_kind_t, int, bool)); static int unify PARAMS ((tree, tree, tree, tree, int)); static void add_pending_template PARAMS ((tree)); static void reopen_tinst_level PARAMS ((tree)); *************** lookup_template_function (fns, arglist) *** 3991,3997 **** if (fns == error_mark_node || arglist == error_mark_node) return error_mark_node; ! if (fns == NULL_TREE) { error ("non-template used as template"); return error_mark_node; --- 3991,3998 ---- if (fns == error_mark_node || arglist == error_mark_node) return error_mark_node; ! if (fns == NULL_TREE ! || TREE_CODE (fns) == FUNCTION_DECL) { error ("non-template used as template"); return error_mark_node; *************** resolve_overloaded_unification (tparms, *** 8437,8445 **** { tree tempargs = copy_node (targs); int good = 0; if (TREE_CODE (arg) == ADDR_EXPR) ! arg = TREE_OPERAND (arg, 0); if (TREE_CODE (arg) == COMPONENT_REF) /* Handle `&x' where `x' is some static or non-static member --- 8438,8452 ---- { tree tempargs = copy_node (targs); int good = 0; + bool addr_p; if (TREE_CODE (arg) == ADDR_EXPR) ! { ! arg = TREE_OPERAND (arg, 0); ! addr_p = true; ! } ! else ! addr_p = false; if (TREE_CODE (arg) == COMPONENT_REF) /* Handle `&x' where `x' is some static or non-static member *************** resolve_overloaded_unification (tparms, *** 8475,8484 **** if (subargs) { elem = tsubst (TREE_TYPE (fn), subargs, tf_none, NULL_TREE); ! if (TREE_CODE (elem) == METHOD_TYPE) ! elem = build_ptrmemfunc_type (build_pointer_type (elem)); ! good += try_one_overload (tparms, targs, tempargs, parm, elem, ! strict, sub_strict); } } } --- 8482,8489 ---- if (subargs) { elem = tsubst (TREE_TYPE (fn), subargs, tf_none, NULL_TREE); ! good += try_one_overload (tparms, targs, tempargs, parm, ! elem, strict, sub_strict, addr_p); } } } *************** resolve_overloaded_unification (tparms, *** 8486,8499 **** || TREE_CODE (arg) == FUNCTION_DECL) { for (; arg; arg = OVL_NEXT (arg)) ! { ! tree type = TREE_TYPE (OVL_CURRENT (arg)); ! if (TREE_CODE (type) == METHOD_TYPE) ! type = build_ptrmemfunc_type (build_pointer_type (type)); ! good += try_one_overload (tparms, targs, tempargs, parm, ! type, ! strict, sub_strict); ! } } else abort (); --- 8491,8499 ---- || TREE_CODE (arg) == FUNCTION_DECL) { for (; arg; arg = OVL_NEXT (arg)) ! good += try_one_overload (tparms, targs, tempargs, parm, ! TREE_TYPE (OVL_CURRENT (arg)), ! strict, sub_strict, addr_p); } else abort (); *************** resolve_overloaded_unification (tparms, *** 8522,8535 **** /* Subroutine of resolve_overloaded_unification; does deduction for a single overload. Fills TARGS with any deduced arguments, or error_mark_node if different overloads deduce different arguments for a given parm. Returns 1 on success. */ static int ! try_one_overload (tparms, orig_targs, targs, parm, arg, strict, ! sub_strict) ! tree tparms, orig_targs, targs, parm, arg; ! unification_kind_t strict; ! int sub_strict; { int nargs; tree tempargs; --- 8522,8541 ---- /* Subroutine of resolve_overloaded_unification; does deduction for a single overload. Fills TARGS with any deduced arguments, or error_mark_node if different overloads deduce different arguments for a given parm. + ADDR_P is true if the expression for which deduction is being + performed was of the form "& fn" rather than simply "fn". + Returns 1 on success. */ static int ! try_one_overload (tree tparms, ! tree orig_targs, ! tree targs, ! tree parm, ! tree arg, ! unification_kind_t strict, ! int sub_strict, ! bool addr_p) { int nargs; tree tempargs; *************** try_one_overload (tparms, orig_targs, ta *** 8545,8550 **** --- 8551,8561 ---- if (uses_template_parms (arg)) return 1; + if (TREE_CODE (arg) == METHOD_TYPE) + arg = build_ptrmemfunc_type (build_pointer_type (arg)); + else if (addr_p) + arg = build_pointer_type (arg); + sub_strict |= maybe_adjust_types_for_deduction (strict, &parm, &arg); /* We don't copy orig_targs for this because if we have already deduced diff -Nrc3pad gcc-3.3.1/gcc/cp/search.c gcc-3.3.2/gcc/cp/search.c *** gcc-3.3.1/gcc/cp/search.c 2003-08-04 11:25:38.000000000 +0000 --- gcc-3.3.2/gcc/cp/search.c 2003-08-29 23:56:17.000000000 +0000 *************** add_conversions (binfo, data) *** 2855,2862 **** /* Make sure we don't already have this conversion. */ if (! IDENTIFIER_MARKED (name)) { ! *conversions = tree_cons (binfo, tmp, *conversions); ! IDENTIFIER_MARKED (name) = 1; } } return NULL_TREE; --- 2855,2881 ---- /* Make sure we don't already have this conversion. */ if (! IDENTIFIER_MARKED (name)) { ! tree t; ! ! /* Make sure that we do not already have a conversion ! operator for this type. Merely checking the NAME is not ! enough because two conversion operators to the same type ! may not have the same NAME. */ ! for (t = *conversions; t; t = TREE_CHAIN (t)) ! { ! tree fn; ! for (fn = TREE_VALUE (t); fn; fn = OVL_NEXT (fn)) ! if (same_type_p (TREE_TYPE (name), ! DECL_CONV_FN_TYPE (OVL_CURRENT (fn)))) ! break; ! if (fn) ! break; ! } ! if (!t) ! { ! *conversions = tree_cons (binfo, tmp, *conversions); ! IDENTIFIER_MARKED (name) = 1; ! } } } return NULL_TREE; diff -Nrc3pad gcc-3.3.1/gcc/cp/tree.c gcc-3.3.2/gcc/cp/tree.c *** gcc-3.3.1/gcc/cp/tree.c 2003-04-15 00:35:53.000000000 +0000 --- gcc-3.3.2/gcc/cp/tree.c 2003-10-14 20:45:39.000000000 +0000 *************** build_target_expr_with_type (init, type) *** 357,362 **** --- 357,368 ---- if (TREE_CODE (init) == TARGET_EXPR) return init; + else if (CLASS_TYPE_P (type) && !TYPE_HAS_TRIVIAL_INIT_REF (type) + && TREE_CODE (init) != COND_EXPR) + /* We need to build up a copy constructor call. COND_EXPR is a special + case because we already have copies on the arms and we don't want + another one here. */ + return force_rvalue (init); slot = build (VAR_DECL, type); DECL_ARTIFICIAL (slot) = 1; *************** get_target_expr (init) *** 375,471 **** { return build_target_expr_with_type (init, TREE_TYPE (init)); } - - /* Recursively perform a preorder search EXP for CALL_EXPRs, making - copies where they are found. Returns a deep copy all nodes transitively - containing CALL_EXPRs. */ - - tree - break_out_calls (exp) - tree exp; - { - register tree t1, t2 = NULL_TREE; - register enum tree_code code; - register int changed = 0; - register int i; - - if (exp == NULL_TREE) - return exp; - - code = TREE_CODE (exp); - - if (code == CALL_EXPR) - return copy_node (exp); - - /* Don't try and defeat a save_expr, as it should only be done once. */ - if (code == SAVE_EXPR) - return exp; - - switch (TREE_CODE_CLASS (code)) - { - default: - abort (); - - case 'c': /* a constant */ - case 't': /* a type node */ - case 'x': /* something random, like an identifier or an ERROR_MARK. */ - return exp; - - case 'd': /* A decl node */ - #if 0 /* This is bogus. jason 9/21/94 */ - - t1 = break_out_calls (DECL_INITIAL (exp)); - if (t1 != DECL_INITIAL (exp)) - { - exp = copy_node (exp); - DECL_INITIAL (exp) = t1; - } - #endif - return exp; - - case 'b': /* A block node */ - { - /* Don't know how to handle these correctly yet. Must do a - break_out_calls on all DECL_INITIAL values for local variables, - and also break_out_calls on all sub-blocks and sub-statements. */ - abort (); - } - return exp; - - case 'e': /* an expression */ - case 'r': /* a reference */ - case 's': /* an expression with side effects */ - for (i = TREE_CODE_LENGTH (code) - 1; i >= 0; i--) - { - t1 = break_out_calls (TREE_OPERAND (exp, i)); - if (t1 != TREE_OPERAND (exp, i)) - { - exp = copy_node (exp); - TREE_OPERAND (exp, i) = t1; - } - } - return exp; - - case '<': /* a comparison expression */ - case '2': /* a binary arithmetic expression */ - t2 = break_out_calls (TREE_OPERAND (exp, 1)); - if (t2 != TREE_OPERAND (exp, 1)) - changed = 1; - case '1': /* a unary arithmetic expression */ - t1 = break_out_calls (TREE_OPERAND (exp, 0)); - if (t1 != TREE_OPERAND (exp, 0)) - changed = 1; - if (changed) - { - if (TREE_CODE_LENGTH (code) == 1) - return build1 (code, TREE_TYPE (exp), t1); - else - return build (code, TREE_TYPE (exp), t1, t2); - } - return exp; - } - - } /* Construct, lay out and return the type of methods belonging to class BASETYPE and whose arguments are described by ARGTYPES and whose values --- 381,386 ---- diff -Nrc3pad gcc-3.3.1/gcc/cp/typeck2.c gcc-3.3.2/gcc/cp/typeck2.c *** gcc-3.3.1/gcc/cp/typeck2.c 2003-03-03 21:58:25.000000000 +0000 --- gcc-3.3.2/gcc/cp/typeck2.c 2003-09-17 23:48:25.000000000 +0000 *************** retry: *** 279,285 **** break; default: ! abort (); } } --- 279,286 ---- break; default: ! (*p_msg) ("invalid use of incomplete type"); ! break; } } diff -Nrc3pad gcc-3.3.1/gcc/cp/typeck.c gcc-3.3.2/gcc/cp/typeck.c *** gcc-3.3.1/gcc/cp/typeck.c 2003-07-06 03:41:26.000000000 +0000 --- gcc-3.3.2/gcc/cp/typeck.c 2003-10-16 02:30:56.000000000 +0000 *************** comptypes (t1, t2, strict) *** 909,918 **** if (t1 == t2) return 1; ! /* This should never happen. */ ! my_friendly_assert (t1 != error_mark_node, 307); ! ! if (t2 == error_mark_node) return 0; /* If either type is the internal version of sizetype, return the --- 909,916 ---- if (t1 == t2) return 1; ! /* Suppress errors caused by previously reported errors */ ! if (t1 == error_mark_node || t2 == error_mark_node) return 0; /* If either type is the internal version of sizetype, return the *************** compparms (parms1, parms2) *** 1405,1411 **** they fail to match. */ if (t1 == 0 || t2 == 0) return 0; ! if (!same_type_p (TREE_VALUE (t2), TREE_VALUE (t1))) return 0; t1 = TREE_CHAIN (t1); --- 1403,1409 ---- they fail to match. */ if (t1 == 0 || t2 == 0) return 0; ! if (!same_type_p (TREE_VALUE (t1), TREE_VALUE (t2))) return 0; t1 = TREE_CHAIN (t1); *************** finish_class_member_access_expr (tree ob *** 2174,2181 **** /* Find the base of OBJECT_TYPE corresponding to SCOPE. */ access_path = lookup_base (object_type, scope, ba_check, NULL); ! if (!access_path || access_path == error_mark_node) return error_mark_node; /* Look up the member. */ member = lookup_member (access_path, name, /*protect=*/1, --- 2172,2184 ---- /* Find the base of OBJECT_TYPE corresponding to SCOPE. */ access_path = lookup_base (object_type, scope, ba_check, NULL); ! if (access_path == error_mark_node) return error_mark_node; + if (!access_path) + { + error ("`%T' is not a base of `%T'", scope, object_type); + return error_mark_node; + } /* Look up the member. */ member = lookup_member (access_path, name, /*protect=*/1, *************** get_member_function_from_ptrfunc (instan *** 2641,2649 **** } tree ! build_function_call_real (function, params, require_complete, flags) tree function, params; ! int require_complete, flags; { register tree fntype, fndecl; register tree coerced_params; --- 2644,2652 ---- } tree ! build_function_call_real (function, params, flags) tree function, params; ! int flags; { register tree fntype, fndecl; register tree coerced_params; *************** tree *** 2757,2763 **** build_function_call (function, params) tree function, params; { ! return build_function_call_real (function, params, 1, LOOKUP_NORMAL); } /* Convert the actual parameter expressions in the list VALUES --- 2760,2766 ---- build_function_call (function, params) tree function, params; { ! return build_function_call_real (function, params, LOOKUP_NORMAL); } /* Convert the actual parameter expressions in the list VALUES *************** build_static_cast (type, expr) *** 4739,4750 **** (TREE_TYPE (type)))) && at_least_as_qualified_p (TREE_TYPE (type), intype)) { ! /* At this point we have checked all of the conditions except ! that B is not a virtual base class of D. That will be ! checked by build_base_path. */ ! tree base = lookup_base (TREE_TYPE (type), intype, ba_any, NULL); ! /* Convert from B* to D*. */ expr = build_base_path (MINUS_EXPR, build_address (expr), base, /*nonnull=*/false); /* Convert the pointer to a reference -- but then remember that --- 4742,4754 ---- (TREE_TYPE (type)))) && at_least_as_qualified_p (TREE_TYPE (type), intype)) { ! /* There is a standard conversion from "D*" to "B*" even if "B" ! is ambiguous or inaccessible. Therefore, we ask lookup_base ! to check these conditions. */ ! tree base = lookup_base (TREE_TYPE (type), intype, ba_check, NULL); ! /* Convert from "B*" to "D*". This function will check that "B" ! is not a virtual base of "D". */ expr = build_base_path (MINUS_EXPR, build_address (expr), base, /*nonnull=*/false); /* Convert the pointer to a reference -- but then remember that *************** build_static_cast (type, expr) *** 4803,4809 **** check_for_casting_away_constness (intype, type); base = lookup_base (TREE_TYPE (type), TREE_TYPE (intype), ! ba_check | ba_quiet, NULL); return build_base_path (MINUS_EXPR, expr, base, /*nonnull=*/false); } if ((TYPE_PTRMEM_P (type) && TYPE_PTRMEM_P (intype)) --- 4807,4813 ---- check_for_casting_away_constness (intype, type); base = lookup_base (TREE_TYPE (type), TREE_TYPE (intype), ! ba_check, NULL); return build_base_path (MINUS_EXPR, expr, base, /*nonnull=*/false); } if ((TYPE_PTRMEM_P (type) && TYPE_PTRMEM_P (intype)) *************** build_modify_expr (lhs, modifycode, rhs) *** 5237,5242 **** --- 5241,5250 ---- TREE_OPERAND (lhs, 0), newrhs); case MODIFY_EXPR: + if (TREE_SIDE_EFFECTS (TREE_OPERAND (lhs, 0))) + lhs = build (TREE_CODE (lhs), TREE_TYPE (lhs), + stabilize_reference (TREE_OPERAND (lhs, 0)), + TREE_OPERAND (lhs, 1)); newrhs = build_modify_expr (TREE_OPERAND (lhs, 0), modifycode, rhs); if (newrhs == error_mark_node) return error_mark_node; *************** build_modify_expr (lhs, modifycode, rhs) *** 5288,5295 **** { if (TREE_CODE (rhs) == CONSTRUCTOR) { ! my_friendly_assert (same_type_p (TREE_TYPE (rhs), lhstype), ! 20011220); result = build (INIT_EXPR, lhstype, lhs, rhs); TREE_SIDE_EFFECTS (result) = 1; return result; --- 5296,5304 ---- { if (TREE_CODE (rhs) == CONSTRUCTOR) { ! if (! same_type_p (TREE_TYPE (rhs), lhstype)) ! /* Call convert to generate an error; see PR 11063. */ ! rhs = convert (lhstype, rhs); result = build (INIT_EXPR, lhstype, lhs, rhs); TREE_SIDE_EFFECTS (result) = 1; return result; *************** build_modify_expr (lhs, modifycode, rhs) *** 5442,5455 **** } } - if (TREE_CODE (lhstype) != REFERENCE_TYPE) - { - if (TREE_SIDE_EFFECTS (lhs)) - lhs = stabilize_reference (lhs); - if (TREE_SIDE_EFFECTS (newrhs)) - newrhs = stabilize_reference (newrhs); - } - /* Convert new value to destination type. */ if (TREE_CODE (lhstype) == ARRAY_TYPE) --- 5451,5456 ---- *************** build_modify_expr (lhs, modifycode, rhs) *** 5505,5548 **** if (newrhs == error_mark_node) return error_mark_node; ! if (TREE_CODE (newrhs) == COND_EXPR) ! { ! tree lhs1; ! tree cond = TREE_OPERAND (newrhs, 0); ! ! if (TREE_SIDE_EFFECTS (lhs)) ! cond = build_compound_expr (tree_cons ! (NULL_TREE, lhs, ! build_tree_list (NULL_TREE, cond))); ! ! /* Cannot have two identical lhs on this one tree (result) as preexpand ! calls will rip them out and fill in RTL for them, but when the ! rtl is generated, the calls will only be in the first side of the ! condition, not on both, or before the conditional jump! (mrs) */ ! lhs1 = break_out_calls (lhs); ! ! if (lhs == lhs1) ! /* If there's no change, the COND_EXPR behaves like any other rhs. */ ! result = build (modifycode == NOP_EXPR ? MODIFY_EXPR : INIT_EXPR, ! lhstype, lhs, newrhs); ! else ! { ! tree result_type = TREE_TYPE (newrhs); ! /* We have to convert each arm to the proper type because the ! types may have been munged by constant folding. */ ! result ! = build (COND_EXPR, result_type, cond, ! build_modify_expr (lhs, modifycode, ! cp_convert (result_type, ! TREE_OPERAND (newrhs, 1))), ! build_modify_expr (lhs1, modifycode, ! cp_convert (result_type, ! TREE_OPERAND (newrhs, 2)))); ! } ! } ! else ! result = build (modifycode == NOP_EXPR ? MODIFY_EXPR : INIT_EXPR, ! lhstype, lhs, newrhs); TREE_SIDE_EFFECTS (result) = 1; --- 5506,5513 ---- if (newrhs == error_mark_node) return error_mark_node; ! result = build (modifycode == NOP_EXPR ? MODIFY_EXPR : INIT_EXPR, ! lhstype, lhs, newrhs); TREE_SIDE_EFFECTS (result) = 1; *************** convert_for_initialization (exp, type, r *** 6100,6106 **** if (fndecl) savew = warningcount, savee = errorcount; ! rhs = initialize_reference (type, rhs, /*decl=*/NULL_TREE); if (fndecl) { if (warningcount > savew) --- 6065,6072 ---- if (fndecl) savew = warningcount, savee = errorcount; ! rhs = initialize_reference (type, rhs, /*decl=*/NULL_TREE, ! /*cleanup=*/NULL); if (fndecl) { if (warningcount > savew) diff -Nrc3pad gcc-3.3.1/libstdc++-v3/acinclude.m4 gcc-3.3.2/libstdc++-v3/acinclude.m4 *** gcc-3.3.1/libstdc++-v3/acinclude.m4 2003-07-01 21:14:44.000000000 +0000 --- gcc-3.3.2/libstdc++-v3/acinclude.m4 2003-09-11 03:08:35.000000000 +0000 *************** AC_DEFUN(GLIBCPP_CONFIGURE_TESTSUITE, [ *** 2132,2138 **** AC_SUBST(baseline_dir) # Determine if checking the ABI is desirable. ! if test x$enable_symvers = xno; then enable_abi_check=no else case "$host" in --- 2132,2140 ---- AC_SUBST(baseline_dir) # Determine if checking the ABI is desirable. ! # Only build this as native, since automake does not understand ! # CXX_FOR_BUILD. ! if test x"$GLIBCPP_IS_CROSS_COMPILING" = xtrue || test x$enable_symvers = xno; then enable_abi_check=no else case "$host" in diff -Nrc3pad gcc-3.3.1/libstdc++-v3/aclocal.m4 gcc-3.3.2/libstdc++-v3/aclocal.m4 *** gcc-3.3.1/libstdc++-v3/aclocal.m4 2003-07-01 21:14:44.000000000 +0000 --- gcc-3.3.2/libstdc++-v3/aclocal.m4 2003-09-11 03:08:35.000000000 +0000 *************** AC_DEFUN(GLIBCPP_CONFIGURE_TESTSUITE, [ *** 2144,2150 **** AC_SUBST(baseline_dir) # Determine if checking the ABI is desirable. ! if test x$enable_symvers = xno; then enable_abi_check=no else case "$host" in --- 2144,2152 ---- AC_SUBST(baseline_dir) # Determine if checking the ABI is desirable. ! # Only build this as native, since automake does not understand ! # CXX_FOR_BUILD. ! if test x"$GLIBCPP_IS_CROSS_COMPILING" = xtrue || test x$enable_symvers = xno; then enable_abi_check=no else case "$host" in diff -Nrc3pad gcc-3.3.1/libstdc++-v3/ChangeLog gcc-3.3.2/libstdc++-v3/ChangeLog *** gcc-3.3.1/libstdc++-v3/ChangeLog 2003-08-04 12:50:05.000000000 +0000 --- gcc-3.3.2/libstdc++-v3/ChangeLog 2003-10-16 19:45:26.000000000 +0000 *************** *** 1,3 **** --- 1,77 ---- + 2003-10-16 Release Manager + + * GCC 3.3.2 Released. + + 2003-10-07 Paolo Carlini + + PR libstdc++/11740 + * config/locale/gnu/ctype_members.cc (ctype::do_is): + Fix to actually return (M & m) != 0 as per 22.2.1.1.2. + * config/locale/generic/ctype_members.cc: Same. + + 2003-10-02 Harald Boehme + + PR libstdc++/12451 + * libsupc++/cxxabi.h: Move forward declaration of __class_type_info. + + 2003-10-01 Rainer Orth + + * configure.target: Handle Solaris 2.5 micro releases explicitly. + Remove wildcards from Solaris 2.6, 7-9: there were no + micro releases. + Treat Solaris 10 and up like 7-9. + + 2003-09-30 Paolo Carlini + + PR libstdc++/12296 + * include/bits/istream.tcc (peek): Set eofbit if sgetc + returns eof. + + 2003-09-30 Nathan Myers + Paolo Carlini + + PR libstdc++/11400 + * include/bits/stl_algo.h (search_n): + Use iterator_traits<>::difference_type for __n. + + 2003-09-25 Benjamin Kosnik + + PR libstdc++/11065 + * config/locale/gnu/ctype_members.cc (ctype::do_is): Fix. + * config/locale/generic/ctype_members.cc: Same. + + * config/os/generic/ctype_inline.h: Update. + + 2003-09-10 Daniel Jacobowitz + Andreas Jaeger + + PR libstdc++/12189 + * acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE): Don't build + abi_check if cross compiling. + * aclocal.m4: Regenerated. + * configure: Regenerated. + + 2003-09-09 Alan Modra + + * configure: Regenerate. + + 2003-08-25 Zack Weinberg + + * config/os/hpux/os_defines.h: Unconditionally define + _GLIBCPP_GTHREAD_USE_WEAK to 0. + + 2003-08-11 Andreas Jaeger + + * include/Makefile.am (stamp-c_base): Add dependency on stamp-bits + to make SMP-safe. + * include/Makefile.in: Regenerated. + + 2003-08-07 Bernardo Innocenti + + PR libstdc++/11784 + * libstdc++-v3/config/cpu/m68k/atomicity.h (__exchange_and_add): + Replace variants with new BSET-based version. + 2003-08-04 Release Manager * GCC 3.3.1 Released. *************** *** 8,15 **** 2003-07-24 Nathan Myers ! * testsuite/23_containers/map_operators.cc: Conform to ! container requirement as value must be Assignable. 2003-07-18 Andreas Jaeger --- 82,89 ---- 2003-07-24 Nathan Myers ! * testsuite/23_containers/map_operators.cc: Conform to ! container requirement as value must be Assignable. 2003-07-18 Andreas Jaeger *************** *** 33,39 **** 2003-07-15 Loren J. Rittle ! * testsuite/thread/pthread4.cc: Further tweak to avoid fini race. 2003-07-15 Petur Runolfsson --- 107,113 ---- 2003-07-15 Loren J. Rittle ! * testsuite/thread/pthread4.cc: Further tweak to avoid fini race. 2003-07-15 Petur Runolfsson *************** *** 46,52 **** Change last parameter from int_type to size_t. 2003-07-08 Benjamin Kosnik ! Jerry Quinn * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. --- 120,126 ---- Change last parameter from int_type to size_t. 2003-07-08 Benjamin Kosnik ! Jerry Quinn * include/bits/ios_base.h (ios_base::_M_getloc): Return reference to the imbued locale. *************** *** 83,94 **** 2003-07-04 Jerry Quinn * include/bits/locale_facets.tcc (__int_to_char): Move common ! case to the top. 2003-07-04 Jerry Quinn * testsuite/27_io/ostream_inserter_arith.cc (test05, test06): ! Add missing bool test. 2003-07-04 H.J. Lu --- 157,168 ---- 2003-07-04 Jerry Quinn * include/bits/locale_facets.tcc (__int_to_char): Move common ! case to the top. 2003-07-04 Jerry Quinn * testsuite/27_io/ostream_inserter_arith.cc (test05, test06): ! Add missing bool test. 2003-07-04 H.J. Lu *************** *** 193,199 **** 2003-06-16 Andreas Jaeger ! * testsuite/abi_check.cc: Create summary report. 2003-06-16 Andreas Jaeger --- 267,273 ---- 2003-06-16 Andreas Jaeger ! * testsuite/abi_check.cc: Create summary report. 2003-06-16 Andreas Jaeger *************** *** 203,209 **** * configure: Regenerate. 2003-06-16 Benjamin Kosnik ! Andreas Jaeger * configure.target: Set x86_64 abi_baseline pair correctly. --- 277,283 ---- * configure: Regenerate. 2003-06-16 Benjamin Kosnik ! Andreas Jaeger * configure.target: Set x86_64 abi_baseline pair correctly. *************** *** 372,378 **** * configure: Regenerated. 2003-05-01 Paolo Carlini ! Nathan Myers Backport from mainline fix of 2003-03-28. PR libstdc++/9533 --- 446,452 ---- * configure: Regenerated. 2003-05-01 Paolo Carlini ! Nathan Myers Backport from mainline fix of 2003-03-28. PR libstdc++/9533 *************** *** 439,445 **** (basic_filebuf::close): Add exception specification of throw(). 2003-04-25 Ranjit Mathew ! Phil Edwards * testsuite_flags.in: Guard against the possibility of having "xgcc" as a part of a folder name in the --- 513,519 ---- (basic_filebuf::close): Add exception specification of throw(). 2003-04-25 Ranjit Mathew ! Phil Edwards * testsuite_flags.in: Guard against the possibility of having "xgcc" as a part of a folder name in the *************** *** 457,464 **** 2003-04-23 Benjamin Kosnik ! * config/locale/generic/c_locale.h (__convert_from_v): Use ! attribute unused. 2003-04-23 Phil Edwards --- 531,538 ---- 2003-04-23 Benjamin Kosnik ! * config/locale/generic/c_locale.h (__convert_from_v): Use ! attribute unused. 2003-04-23 Phil Edwards *************** *** 474,489 **** Benjamin Kosnik * include/bits/basic_ios.h (ios_base::Init::_S_ios_create): ! Declare friend. (basic_ios::init, basic_ios::_M_cache_locale): Add locale ! cache argument. * include/bits/basic_ios.tcc (basic_ios::init): Pass cache to ! _M_cache_locale. (basic_ios::_M_cache_locale): Use placement new if cache is ! provided. Track the distinction in iword(0). * include/bits/locale_facets.tcc ! (__locale_cache::_S_callback): Only delete cache if iword(0) ! is 0, i.e. not static. * src/globals.cc: Allocate space for __locale_cache objects. * src/ios.cc (__gnu_cxx): Declare extern __locale_cache objects for standard wide and narrow stream objects. --- 548,563 ---- Benjamin Kosnik * include/bits/basic_ios.h (ios_base::Init::_S_ios_create): ! Declare friend. (basic_ios::init, basic_ios::_M_cache_locale): Add locale ! cache argument. * include/bits/basic_ios.tcc (basic_ios::init): Pass cache to ! _M_cache_locale. (basic_ios::_M_cache_locale): Use placement new if cache is ! provided. Track the distinction in iword(0). * include/bits/locale_facets.tcc ! (__locale_cache::_S_callback): Only delete cache if iword(0) ! is 0, i.e. not static. * src/globals.cc: Allocate space for __locale_cache objects. * src/ios.cc (__gnu_cxx): Declare extern __locale_cache objects for standard wide and narrow stream objects. *************** *** 515,523 **** * include/bits/istream.tcc: Same. 2003-04-17 Andreas Tobler ! Benjamin Kosnik ! * config/os/generic/ctype_inline.h: Fix. 2003-04-17 Andreas Tobler --- 589,597 ---- * include/bits/istream.tcc: Same. 2003-04-17 Andreas Tobler ! Benjamin Kosnik ! * config/os/generic/ctype_inline.h: Fix. 2003-04-17 Andreas Tobler *************** *** 525,531 **** solaris includes, not generic. 2003-04-15 Benjamin Kosnik ! Paolo Carlini PR libstdc++/9423 * docs/html/27_io/howto.html --- 599,605 ---- solaris includes, not generic. 2003-04-15 Benjamin Kosnik ! Paolo Carlini PR libstdc++/9423 * docs/html/27_io/howto.html *************** *** 534,545 **** 2003-04-15 Andreas Tobler ! * testsuite/thread/pthread1.cc: Enable for darwin test. ! * testsuite/thread/pthread2.cc: Same. ! * testsuite/thread/pthread3.cc: Same. ! * testsuite/thread/pthread4.cc: Same. ! * testsuite/thread/pthread5.cc: Same. ! * testsuite/thread/pthread6.cc: Same. 2003-04-15 Loren J. Rittle --- 608,619 ---- 2003-04-15 Andreas Tobler ! * testsuite/thread/pthread1.cc: Enable for darwin test. ! * testsuite/thread/pthread2.cc: Same. ! * testsuite/thread/pthread3.cc: Same. ! * testsuite/thread/pthread4.cc: Same. ! * testsuite/thread/pthread5.cc: Same. ! * testsuite/thread/pthread6.cc: Same. 2003-04-15 Loren J. Rittle *************** *** 615,622 **** PR libstdc++/5730 * include/bits/c++config (_GLIBCPP_FAST_MATH): Define. ! * include/std/std_complex.h (norm): Use faster, ! less accurate computation for builtin float types under --fast-math. 2003-03-21 Paolo Carlini --- 689,696 ---- PR libstdc++/5730 * include/bits/c++config (_GLIBCPP_FAST_MATH): Define. ! * include/std/std_complex.h (norm): Use faster, ! less accurate computation for builtin float types under --fast-math. 2003-03-21 Paolo Carlini *************** *** 640,649 **** 2003-03-17 Petur Runolfsson ! PR libstdc++/9964 ! * include/bits/fstream.tcc (basic_filebuf::close): ! Always close file, even when write fails. ! * testsuite/27_io/filebuf_members.cc (test_07): New test. 2003-03-17 Danny Smith --- 714,723 ---- 2003-03-17 Petur Runolfsson ! PR libstdc++/9964 ! * include/bits/fstream.tcc (basic_filebuf::close): ! Always close file, even when write fails. ! * testsuite/27_io/filebuf_members.cc (test_07): New test. 2003-03-17 Danny Smith *************** *** 746,752 **** 2003-03-05 Carlo Wood ! * include/bits/ios_base.h(ios_base::Init::_S_initialized()): Added _S_initialized() in order to allow debugging libraries to detect when the std streams are initialized from an overloaded operator new. --- 820,826 ---- 2003-03-05 Carlo Wood ! * include/bits/ios_base.h(ios_base::Init::_S_initialized()): Added _S_initialized() in order to allow debugging libraries to detect when the std streams are initialized from an overloaded operator new. *************** *** 761,767 **** (_M_cache_locale): New. (_M_cache_facets): Deprecate. * include/bits/basic_ios.tcc (basic_ios::copyfmt): Set up locale ! caching. (basic_ios::imbue,basic_ios::init): Use _M_cache_locale. (basic_ios::_M_cache_locale): New. (basic_ios::_M_cache_facets): Deprecate. --- 835,841 ---- (_M_cache_locale): New. (_M_cache_facets): Deprecate. * include/bits/basic_ios.tcc (basic_ios::copyfmt): Set up locale ! caching. (basic_ios::imbue,basic_ios::init): Use _M_cache_locale. (basic_ios::_M_cache_locale): New. (basic_ios::_M_cache_facets): Deprecate. *************** *** 773,781 **** (num_put::_M_convert_int): Use locale cache literal string, grouping flag, thousands separator. (num_out::_M_convert_float): Use locale cache grouping flag, decimal ! point, thousands separator. (__locale_cache<_CharT>::_M_init,__locale_cache<_CharT>::_S_callback): ! New. * src/locale-inst.cc (__locale_cache<_CharT>::_S_callback, __locale_cache, __locale_cache): New. --- 847,855 ---- (num_put::_M_convert_int): Use locale cache literal string, grouping flag, thousands separator. (num_out::_M_convert_float): Use locale cache grouping flag, decimal ! point, thousands separator. (__locale_cache<_CharT>::_M_init,__locale_cache<_CharT>::_S_callback): ! New. * src/locale-inst.cc (__locale_cache<_CharT>::_S_callback, __locale_cache, __locale_cache): New. *************** *** 793,799 **** * testsuite/abi_check.cc: Update. 2003-03-03 Jerry Quinn ! Benjamin Kosnik * include/bits/locale_facets.h (__num_base): Add _S_atoms_out. Add indexes into this array. --- 867,873 ---- * testsuite/abi_check.cc: Update. 2003-03-03 Jerry Quinn ! Benjamin Kosnik * include/bits/locale_facets.h (__num_base): Add _S_atoms_out. Add indexes into this array. *************** *** 824,830 **** set_memory_limits. 2003-02-28 Brad Spencer ! Nathan Myers * src/Makefile.am (stamp-debug): Clean. * src/Makefile.in: Regenerate. --- 898,904 ---- set_memory_limits. 2003-02-28 Brad Spencer ! Nathan Myers * src/Makefile.am (stamp-debug): Clean. * src/Makefile.in: Regenerate. *************** *** 848,859 **** 2003-02-27 Benjamin Kosnik ! * configure.in (GLIBCPP_ENABLE_DEBUG): Default to none. Call GLIBCPP_ENABLE_DEBUG_FLAGS. ! * acinclude.m4 (GLIBCPP_ENABLE_DEBUG): GLIBCPP_BUILD_DEBUG, new ! conditional if --enable-debug is yes. Rework. (GLIBCPP_ENABLE_DEBUG_FLAGS): New. ! * aclocal.m4: Regenerate. * libio/Makefile.am: Remove DEBUG_FLAGS. * libio/Makefile.in: Regenerate. * libsupc++/Makefile.am: Remove DEBUG_FLAGS. --- 922,933 ---- 2003-02-27 Benjamin Kosnik ! * configure.in (GLIBCPP_ENABLE_DEBUG): Default to none. Call GLIBCPP_ENABLE_DEBUG_FLAGS. ! * acinclude.m4 (GLIBCPP_ENABLE_DEBUG): GLIBCPP_BUILD_DEBUG, new ! conditional if --enable-debug is yes. Rework. (GLIBCPP_ENABLE_DEBUG_FLAGS): New. ! * aclocal.m4: Regenerate. * libio/Makefile.am: Remove DEBUG_FLAGS. * libio/Makefile.in: Regenerate. * libsupc++/Makefile.am: Remove DEBUG_FLAGS. *************** *** 916,922 **** 2003-02-27 Jerry Quinn ! * config/locale/generic/messages_members.h (messages::messages): Remove name from unused parameter. 2003-02-27 Benjamin Kosnik --- 990,996 ---- 2003-02-27 Jerry Quinn ! * config/locale/generic/messages_members.h (messages::messages): Remove name from unused parameter. 2003-02-27 Benjamin Kosnik *************** *** 1023,1029 **** for pos_type. 2003-02-11 Paolo Carlini ! Petur Runolfsson PR libstdc++/9318 * include/bits/streambuf.tcc (__copy_streambufs): --- 1097,1103 ---- for pos_type. 2003-02-11 Paolo Carlini ! Petur Runolfsson PR libstdc++/9318 * include/bits/streambuf.tcc (__copy_streambufs): *************** *** 1102,1108 **** 2003-02-05 Benjamin Kosnik ! * testsuite/26_numerics/valarray_name_lookup.cc: Fix. 2003-02-05 Benjamin Kosnik --- 1176,1182 ---- 2003-02-05 Benjamin Kosnik ! * testsuite/26_numerics/valarray_name_lookup.cc: Fix. 2003-02-05 Benjamin Kosnik *************** *** 1356,1363 **** 2003-01-06 Paolo Carlini * src/codecvt.cc ! (codecvt::do_in, do_out): ! Tweak parameters to avoid unused parameter warnings. 2003-01-06 Paolo Carlini --- 1430,1437 ---- 2003-01-06 Paolo Carlini * src/codecvt.cc ! (codecvt::do_in, do_out): ! Tweak parameters to avoid unused parameter warnings. 2003-01-06 Paolo Carlini *************** *** 1476,1482 **** 2002-12-02 Paolo Carlini * include/bits/basic_string.h (compare(const basic_string&)): ! Fully qualify min() with std::. 2002-12-02 Benjamin Kosnik --- 1550,1556 ---- 2002-12-02 Paolo Carlini * include/bits/basic_string.h (compare(const basic_string&)): ! Fully qualify min() with std::. 2002-12-02 Benjamin Kosnik *************** *** 1516,1522 **** * docs/html/faq/index.html: Add tip about a namespace for extensions. 2002-11-28 Paolo Carlini ! Nathan Myers * src/localename.cc (locale::_Impl::_Impl(const char*, size_t)): --- 1590,1596 ---- * docs/html/faq/index.html: Add tip about a namespace for extensions. 2002-11-28 Paolo Carlini ! Nathan Myers * src/localename.cc (locale::_Impl::_Impl(const char*, size_t)): *************** *** 1536,1542 **** __cxa_guard_release, __cxa_guard_abort in CXXABI_1.2.1. 2002-11-25 Paolo Carlini ! Nathan Myers * src/localename.cc (locale::_Impl::_Impl(const char*, size_t)): --- 1610,1616 ---- __cxa_guard_release, __cxa_guard_abort in CXXABI_1.2.1. 2002-11-25 Paolo Carlini ! Nathan Myers * src/localename.cc (locale::_Impl::_Impl(const char*, size_t)): *************** *** 1576,1582 **** Trivial cosmetic tweaks. 2002-11-22 Laszlo Ersek ! Paolo Carlini PR libstdc++/8645 * include/bits/stl_tree.h (_Rb_tree_rebalance_for_erase): --- 1650,1656 ---- Trivial cosmetic tweaks. 2002-11-22 Laszlo Ersek ! Paolo Carlini PR libstdc++/8645 * include/bits/stl_tree.h (_Rb_tree_rebalance_for_erase): *************** *** 1629,1635 **** include/std/std_streambuf.h: Doxygenate all I/O entities. 2002-11-20 Benjamin Kosnik ! Jonathan Lennox * include/bits/streambuf.tcc (__copy_streambufs): Revert previous fix for the interactive half of --- 1703,1709 ---- include/std/std_streambuf.h: Doxygenate all I/O entities. 2002-11-20 Benjamin Kosnik ! Jonathan Lennox * include/bits/streambuf.tcc (__copy_streambufs): Revert previous fix for the interactive half of *************** *** 1669,1675 **** and std::codecvt::codecvt(size_t) into one export pattern. 2002-11-15 Benjamin Kosnik ! Gabriel Dos Reis PR libstdc++/8230 * include/bits/stl_alloc.h: Use builtin_expect for the most --- 1743,1749 ---- and std::codecvt::codecvt(size_t) into one export pattern. 2002-11-15 Benjamin Kosnik ! Gabriel Dos Reis PR libstdc++/8230 * include/bits/stl_alloc.h: Use builtin_expect for the most *************** *** 1686,1692 **** * src/ios.cc [_GLIBCPP_HAVE_UNISTD_H]: Include unistd.h. 2002-11-15 Paolo Carlini ! Loren J. Rittle PR libstdc++/8399 * acinclude.m4 --- 1760,1766 ---- * src/ios.cc [_GLIBCPP_HAVE_UNISTD_H]: Include unistd.h. 2002-11-15 Paolo Carlini ! Loren J. Rittle PR libstdc++/8399 * acinclude.m4 *************** *** 1740,1747 **** 2002-11-11 Benjamin Kosnik ! PR libstdc++/6746 ! * include/bits/fstream.tcc (filebuf::open): Set input pointers. * config/io/basic_file_stdio.cc (__basic_file::_M_open_mode): Set __p_mode as well. (__basic_file::open): Set to non-block for input. --- 1814,1821 ---- 2002-11-11 Benjamin Kosnik ! PR libstdc++/6746 ! * include/bits/fstream.tcc (filebuf::open): Set input pointers. * config/io/basic_file_stdio.cc (__basic_file::_M_open_mode): Set __p_mode as well. (__basic_file::open): Set to non-block for input. *************** *** 1762,1768 **** docs/html/ext/sgiexts.html: Add missing tag. 2002-11-07 Phil Edwards ! Richard Earnshaw * config/cpu/generic/atomicity.h: Provide atomic __exchange_and_add and __atomic_add. --- 1836,1842 ---- docs/html/ext/sgiexts.html: Add missing tag. 2002-11-07 Phil Edwards ! Richard Earnshaw * config/cpu/generic/atomicity.h: Provide atomic __exchange_and_add and __atomic_add. *************** *** 2029,2035 **** * testsuite/22_locale/static_members.cc (test02): Avoid null strings. 2002-10-12 Jonathan Wakely ! Gabriel Dos Reis * docs/html/21_strings/howto.html#5: Correct nasting of XHTML elements. Correct allocator-related text. --- 2103,2109 ---- * testsuite/22_locale/static_members.cc (test02): Avoid null strings. 2002-10-12 Jonathan Wakely ! Gabriel Dos Reis * docs/html/21_strings/howto.html#5: Correct nasting of XHTML elements. Correct allocator-related text. *************** *** 2291,2299 **** __glibcpp_s8_digits10 et al; check vs the installed versions of digits10 for particular sizes. ! * include/std/std_limits.h (__glibcpp_float_is_modulo, ! __glibcpp_double_is_modulo, __glibcpp_long_double_is_modulo): Kill. ! (numeric_limits::is_modulo, T floating): Use false. 2002-09-22 Kaveh R. Ghazi --- 2365,2373 ---- __glibcpp_s8_digits10 et al; check vs the installed versions of digits10 for particular sizes. ! * include/std/std_limits.h (__glibcpp_float_is_modulo, ! __glibcpp_double_is_modulo, __glibcpp_long_double_is_modulo): Kill. ! (numeric_limits::is_modulo, T floating): Use false. 2002-09-22 Kaveh R. Ghazi diff -Nrc3pad gcc-3.3.1/libstdc++-v3/config/cpu/m68k/atomicity.h gcc-3.3.2/libstdc++-v3/config/cpu/m68k/atomicity.h *** gcc-3.3.1/libstdc++-v3/config/cpu/m68k/atomicity.h 2002-06-24 05:47:56.000000000 +0000 --- gcc-3.3.2/libstdc++-v3/config/cpu/m68k/atomicity.h 2003-08-07 20:58:05.000000000 +0000 *************** *** 1,6 **** // Low-level functions for atomic operations: m68k version -*- 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 ---- // Low-level functions for atomic operations: m68k 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 *************** *** 32,39 **** typedef int _Atomic_word; ! #if defined(__mc68020__) || defined(__mc68030__) \ ! || defined(__mc68040__) || defined(__mc68060__) // These variants support compare-and-swap. static inline _Atomic_word --- 32,40 ---- typedef int _Atomic_word; ! #if ( defined(__mc68020__) || defined(__mc68030__) \ ! || defined(__mc68040__) || defined(__mc68060__) ) \ ! && !defined(__mcpu32__) // These variants support compare-and-swap. static inline _Atomic_word *************** __exchange_and_add (volatile _Atomic_wor *** 74,81 **** return __result; } ! #elif !defined(__mcf5200__) && !defined(__mcf5300__) ! // 68000, 68010, cpu32 and 5400 support test-and-set. template struct __Atomicity_lock --- 75,81 ---- return __result; } ! #else template struct __Atomicity_lock *************** __exchange_and_add (volatile _Atomic_wor *** 94,150 **** { _Atomic_word __result; ! __asm__ __volatile__("1: tas %0\n\tjbne 1b" ! : "=m"(__Atomicity_lock<0>::_S_atomicity_lock) ! : "m"(__Atomicity_lock<0>::_S_atomicity_lock)); ! ! __result = *__mem; ! *__mem = __result + __val; ! ! __Atomicity_lock<0>::_S_atomicity_lock = 0; ! ! return __result; ! } ! #elif defined(__vxWorks__) || defined(__embedded__) ! // The best we can hope for is to disable interrupts, which we ! // can only do from supervisor mode. ! static inline _Atomic_word ! __attribute__ ((__unused__)) ! __exchange_and_add (volatile _Atomic_word *__mem, int __val) ! { ! _Atomic_word __result; ! short __level, __tmpsr; ! __asm__ __volatile__ ("move%.w %%sr,%0\n\tor%.l %0,%1\n\tmove%.w %1,%%sr" ! : "=d"(__level), "=d"(__tmpsr) : "1"(0x700)); __result = *__mem; *__mem = __result + __val; ! __asm__ __volatile__ ("move%.w %0,%%sr" : : "d"(__level)); ! ! return __result; ! } ! ! #else ! // These variants do not support any atomic operations at all. ! ! #warning "__exchange_and_add is not atomic for this target" ! ! static inline _Atomic_word ! __attribute__ ((__unused__)) ! __exchange_and_add (volatile _Atomic_word *__mem, int __val) ! { ! _Atomic_word __result; ! ! __result = *__mem; ! *__mem = __result + __val; return __result; } ! #endif /* CAS / IRQ / TAS */ static inline void __attribute__ ((__unused__)) --- 94,129 ---- { _Atomic_word __result; ! // bset with no immediate addressing ! #if defined(__mcf5200__) || defined(__mcf5300__) || defined(__mcf5400__) ! __asm__ __volatile__("1: bset.b #7,%0@\n\tjbne 1b" ! : /* no outputs */ ! : "a"(&__Atomicity_lock<0>::_S_atomicity_lock) ! : "cc", "memory"); ! // bset with immediate addressing ! #elif defined(__mc68000__) ! __asm__ __volatile__("1: bset.b #7,%0\n\tjbne 1b" ! : "+m"(__Atomicity_lock<0>::_S_atomicity_lock) ! : /* none */ ! : "cc"); ! #else // 680x0, cpu32, 5400 support test-and-set. ! __asm__ __volatile__("1: tas %0\n\tjbne 1b" ! : "+m"(__Atomicity_lock<0>::_S_atomicity_lock) ! : /* none */ ! : "cc"); ! #endif __result = *__mem; *__mem = __result + __val; ! __Atomicity_lock<0>::_S_atomicity_lock = 0; return __result; } ! #endif /* TAS / BSET */ static inline void __attribute__ ((__unused__)) *************** __atomic_add (volatile _Atomic_word* __m *** 155,158 **** (void) __exchange_and_add (__mem, __val); } ! #endif /* atomicity.h */ --- 134,137 ---- (void) __exchange_and_add (__mem, __val); } ! #endif /* _BITS_ATOMICITY_H */ diff -Nrc3pad gcc-3.3.1/libstdc++-v3/config/locale/generic/ctype_members.cc gcc-3.3.2/libstdc++-v3/config/locale/generic/ctype_members.cc *** gcc-3.3.1/libstdc++-v3/config/locale/generic/ctype_members.cc 2002-05-24 16:02:32.000000000 +0000 --- gcc-3.3.2/libstdc++-v3/config/locale/generic/ctype_members.cc 2003-10-07 08:40:58.000000000 +0000 *************** *** 1,6 **** // std::ctype implementation details, generic version -*- 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 ---- // 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 *************** namespace std *** 126,140 **** bool ctype:: do_is(mask __m, char_type __c) const ! { return static_cast(iswctype(__c, _M_convert_to_wmask(__m))); } const wchar_t* ctype:: ! do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __m) const { ! while (__lo < __hi && !this->do_is(*__m, *__lo)) ! ++__lo; ! return __lo; } const wchar_t* --- 126,160 ---- bool ctype:: do_is(mask __m, char_type __c) const ! { ! bool __ret = false; ! const size_t __bitmasksize = 10; ! for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) ! { ! const mask __bit = static_cast(1 << __bitcur); ! if (__m & __bit) ! __ret |= iswctype(__c, _M_convert_to_wmask(__bit)); ! } ! return __ret; ! } const wchar_t* ctype:: ! do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const { ! for (;__lo < __hi; ++__vec, ++__lo) ! { ! const size_t __bitmasksize = 10; ! mask __m = 0; ! for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) ! { ! const mask __bit = static_cast(1 << __bitcur); ! if (iswctype(*__lo, _M_convert_to_wmask(__bit))) ! __m |= __bit; ! } ! *__vec = __m; ! } ! return __hi; } const wchar_t* diff -Nrc3pad gcc-3.3.1/libstdc++-v3/config/locale/gnu/ctype_members.cc gcc-3.3.2/libstdc++-v3/config/locale/gnu/ctype_members.cc *** gcc-3.3.1/libstdc++-v3/config/locale/gnu/ctype_members.cc 2003-02-28 06:09:52.000000000 +0000 --- gcc-3.3.2/libstdc++-v3/config/locale/gnu/ctype_members.cc 2003-10-07 08:40:58.000000000 +0000 *************** *** 1,6 **** // std::ctype implementation details, GNU version -*- 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 ---- // 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 *************** namespace std *** 129,147 **** bool ctype:: ! do_is(mask __m, char_type __c) const { ! return static_cast(__iswctype_l(__c, _M_convert_to_wmask(__m), ! _M_c_locale_ctype)); } const wchar_t* ctype:: ! do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __m) const { ! while (__lo < __hi && !this->do_is(*__m, *__lo)) ! ++__lo; ! return __lo; } const wchar_t* --- 129,170 ---- bool ctype:: ! do_is(mask __m, wchar_t __c) const { ! // Highest bitmask in ctype_base == 10, but extra in "C" ! // library for blank. ! bool __ret = false; ! const size_t __bitmasksize = 11; ! for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) ! { ! const mask __bit = static_cast(_ISbit(__bitcur)); ! if (__m & __bit) ! __ret |= __iswctype_l(__c, _M_convert_to_wmask(__bit), ! _M_c_locale_ctype); ! } ! return __ret; } const wchar_t* ctype:: ! do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const { ! for (;__lo < __hi; ++__vec, ++__lo) ! { ! // Highest bitmask in ctype_base == 10, but extra in "C" ! // library for blank. ! const size_t __bitmasksize = 11; ! mask __m = 0; ! for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) ! { ! const mask __bit = static_cast(_ISbit(__bitcur)); ! if (__iswctype_l(*__lo, _M_convert_to_wmask(__bit), ! _M_c_locale_ctype)) ! __m |= __bit; ! } ! *__vec = __m; ! } ! return __hi; } const wchar_t* diff -Nrc3pad gcc-3.3.1/libstdc++-v3/config/os/generic/ctype_inline.h gcc-3.3.2/libstdc++-v3/config/os/generic/ctype_inline.h *** gcc-3.3.1/libstdc++-v3/config/os/generic/ctype_inline.h 2003-04-18 03:47:11.000000000 +0000 --- gcc-3.3.2/libstdc++-v3/config/os/generic/ctype_inline.h 2003-09-25 22:24:59.000000000 +0000 *************** *** 50,62 **** else { bool __ret = true; ! const int __bitmasksize = 11; ! int __bitcur = 0; // Lowest bitmask in ctype_base == 0 ! for (;__ret && __bitcur < __bitmasksize; ++__bitcur) { mask __bit = static_cast(1 << __bitcur); if (__m & __bit) { bool __testis; switch (__bit) { --- 50,64 ---- else { bool __ret = true; ! bool __any_match = false; ! const size_t __bitmasksize = 10; ! size_t __bitcur = 0; // Lowest bitmask in ctype_base == 0 ! for (;__ret && __bitcur <= __bitmasksize; ++__bitcur) { mask __bit = static_cast(1 << __bitcur); if (__m & __bit) { + __any_match = true; bool __testis; switch (__bit) { *************** *** 100,106 **** __ret &= __testis; } } ! return __ret; } } --- 102,108 ---- __ret &= __testis; } } ! return __ret & __any_match; } } *************** *** 114,126 **** else { // Highest bitmask in ctype_base == 10. ! const int __bitmasksize = 11; for (;__low < __high; ++__vec, ++__low) { mask __m = 0; // Lowest bitmask in ctype_base == 0 ! int __i = 0; ! for (;__i < __bitmasksize; ++__i) { mask __bit = static_cast(1 << __i); if (this->is(__bit, *__low)) --- 116,128 ---- else { // Highest bitmask in ctype_base == 10. ! const size_t __bitmasksize = 10; for (;__low < __high; ++__vec, ++__low) { mask __m = 0; // Lowest bitmask in ctype_base == 0 ! size_t __i = 0; ! for (;__i <= __bitmasksize; ++__i) { mask __bit = static_cast(1 << __i); if (this->is(__bit, *__low)) diff -Nrc3pad gcc-3.3.1/libstdc++-v3/config/os/hpux/os_defines.h gcc-3.3.2/libstdc++-v3/config/os/hpux/os_defines.h *** gcc-3.3.1/libstdc++-v3/config/os/hpux/os_defines.h 2003-05-27 21:48:54.000000000 +0000 --- gcc-3.3.2/libstdc++-v3/config/os/hpux/os_defines.h 2003-08-26 06:50:32.000000000 +0000 *************** typedef long int __padding_type; *** 97,104 **** #define _GLIBCPP_INST_ATOMICITY_LOCK 1 #endif ! /* Don't use pragma weak in gthread headers. */ ! #ifdef __hppa__ #define _GLIBCPP_GTHREAD_USE_WEAK 0 ! #endif #endif --- 97,106 ---- #define _GLIBCPP_INST_ATOMICITY_LOCK 1 #endif ! /* Don't use pragma weak in gthread headers. HP-UX rejects programs ! with unsatisfied external references even if all of those references ! are weak; gthread relies on such unsatisfied references being resolved ! to null pointers when weak symbol support is on. */ #define _GLIBCPP_GTHREAD_USE_WEAK 0 ! #endif diff -Nrc3pad gcc-3.3.1/libstdc++-v3/configure gcc-3.3.2/libstdc++-v3/configure *** gcc-3.3.1/libstdc++-v3/configure 2003-07-17 18:32:00.000000000 +0000 --- gcc-3.3.2/libstdc++-v3/configure 2003-09-11 03:08:35.000000000 +0000 *************** else *** 1468,1474 **** if { (eval echo configure:1469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in ! *.c | *.o | *.obj) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done --- 1468,1474 ---- if { (eval echo configure:1469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in ! *.$ac_ext | *.c | *.o | *.obj) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done *************** x86_64-*linux*|ppc*-*linux*|powerpc*-*li *** 2451,2457 **** x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ! ppc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) --- 2451,2457 ---- x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ! ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) *************** done *** 23798,23804 **** # Determine if checking the ABI is desirable. ! if test x$enable_symvers = xno; then enable_abi_check=no else case "$host" in --- 23798,23806 ---- # Determine if checking the ABI is desirable. ! # Only build this as native, since automake does not understand ! # CXX_FOR_BUILD. ! if test x"$GLIBCPP_IS_CROSS_COMPILING" = xtrue || test x$enable_symvers = xno; then enable_abi_check=no else case "$host" in *************** glibcpp_prefixdir=${prefix} *** 23902,23908 **** # Process the option --with-gxx-include-dir= echo $ac_n "checking for --with-gxx-include-dir""... $ac_c" 1>&6 ! echo "configure:23906: checking for --with-gxx-include-dir" >&5 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. if test "${with_gxx_include_dir+set}" = set; then withval="$with_gxx_include_dir" --- 23904,23910 ---- # Process the option --with-gxx-include-dir= echo $ac_n "checking for --with-gxx-include-dir""... $ac_c" 1>&6 ! echo "configure:23908: checking for --with-gxx-include-dir" >&5 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. if test "${with_gxx_include_dir+set}" = set; then withval="$with_gxx_include_dir" *************** echo "$ac_t""$gxx_include_dir" 1>&6 *** 23926,23932 **** # Process the option "--enable-version-specific-runtime-libs" echo $ac_n "checking for --enable-version-specific-runtime-libs""... $ac_c" 1>&6 ! echo "configure:23930: checking for --enable-version-specific-runtime-libs" >&5 # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given. if test "${enable_version_specific_runtime_libs+set}" = set; then enableval="$enable_version_specific_runtime_libs" --- 23928,23934 ---- # Process the option "--enable-version-specific-runtime-libs" echo $ac_n "checking for --enable-version-specific-runtime-libs""... $ac_c" 1>&6 ! echo "configure:23932: checking for --enable-version-specific-runtime-libs" >&5 # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given. if test "${enable_version_specific_runtime_libs+set}" = set; then enableval="$enable_version_specific_runtime_libs" *************** if test x"$glibcpp_toolexecdir" = x"no"; *** 23973,23979 **** fi echo $ac_n "checking for install location""... $ac_c" 1>&6 ! echo "configure:23977: checking for install location" >&5 echo "$ac_t""$gxx_include_dir" 1>&6 --- 23975,23981 ---- fi echo $ac_n "checking for install location""... $ac_c" 1>&6 ! echo "configure:23979: checking for install location" >&5 echo "$ac_t""$gxx_include_dir" 1>&6 diff -Nrc3pad gcc-3.3.1/libstdc++-v3/configure.target gcc-3.3.2/libstdc++-v3/configure.target *** gcc-3.3.1/libstdc++-v3/configure.target 2003-06-24 04:14:45.000000000 +0000 --- gcc-3.3.2/libstdc++-v3/configure.target 2003-10-01 19:07:07.000000000 +0000 *************** case "${target_os}" in *** 154,166 **** netbsd*) os_include_dir="os/bsd/netbsd" ;; ! solaris2.5*) os_include_dir="os/solaris/solaris2.5" ;; ! solaris2.6*) os_include_dir="os/solaris/solaris2.6" ;; ! solaris2.[789]*) os_include_dir="os/solaris/solaris2.7" ;; windiss*) --- 154,166 ---- netbsd*) os_include_dir="os/bsd/netbsd" ;; ! solaris2.5 | solaris2.5.[0-9]) os_include_dir="os/solaris/solaris2.5" ;; ! solaris2.6) os_include_dir="os/solaris/solaris2.6" ;; ! solaris2.[789] | solaris2.1[0-9]) os_include_dir="os/solaris/solaris2.7" ;; windiss*) diff -Nrc3pad gcc-3.3.1/libstdc++-v3/include/bits/c++config gcc-3.3.2/libstdc++-v3/include/bits/c++config *** gcc-3.3.1/libstdc++-v3/include/bits/c++config 2003-08-04 00:16:03.000000000 +0000 --- gcc-3.3.2/libstdc++-v3/include/bits/c++config 2003-10-16 00:16:03.000000000 +0000 *************** *** 35,41 **** #include // The current version of the C++ library in compressed ISO date format. ! #define __GLIBCPP__ 20030804 // This is necessary until GCC supports separate template compilation. #define _GLIBCPP_NO_TEMPLATE_EXPORT 1 --- 35,41 ---- #include // The current version of the C++ library in compressed ISO date format. ! #define __GLIBCPP__ 20031016 // This is necessary until GCC supports separate template compilation. #define _GLIBCPP_NO_TEMPLATE_EXPORT 1 diff -Nrc3pad gcc-3.3.1/libstdc++-v3/include/bits/istream.tcc gcc-3.3.2/libstdc++-v3/include/bits/istream.tcc *** gcc-3.3.1/libstdc++-v3/include/bits/istream.tcc 2003-06-07 20:50:37.000000000 +0000 --- gcc-3.3.2/libstdc++-v3/include/bits/istream.tcc 2003-09-30 14:37:40.000000000 +0000 *************** namespace std *** 757,764 **** sentry __cerb(*this, true); if (__cerb) { ! try ! { __c = this->rdbuf()->sgetc(); } catch(...) { // 27.6.1.3 paragraph 1 --- 757,768 ---- sentry __cerb(*this, true); if (__cerb) { ! try ! { ! __c = this->rdbuf()->sgetc(); ! if (traits_type::eq_int_type(__c, traits_type::eof())) ! this->setstate(ios_base::eofbit); ! } catch(...) { // 27.6.1.3 paragraph 1 diff -Nrc3pad gcc-3.3.1/libstdc++-v3/include/bits/stl_algo.h gcc-3.3.2/libstdc++-v3/include/bits/stl_algo.h *** gcc-3.3.1/libstdc++-v3/include/bits/stl_algo.h 2002-04-18 02:55:50.000000000 +0000 --- gcc-3.3.2/libstdc++-v3/include/bits/stl_algo.h 2003-09-30 14:37:40.000000000 +0000 *************** namespace std *** 609,615 **** else { __first = find(__first, __last, __val); while (__first != __last) { ! _Integer __n = __count - 1; _ForwardIter __i = __first; ++__i; while (__i != __last && __n != 0 && *__i == __val) { --- 609,616 ---- else { __first = find(__first, __last, __val); while (__first != __last) { ! typename iterator_traits<_ForwardIter>::difference_type __n = __count; ! --__n; _ForwardIter __i = __first; ++__i; while (__i != __last && __n != 0 && *__i == __val) { *************** namespace std *** 661,667 **** ++__first; } while (__first != __last) { ! _Integer __n = __count - 1; _ForwardIter __i = __first; ++__i; while (__i != __last && __n != 0 && __binary_pred(*__i, __val)) { --- 662,669 ---- ++__first; } while (__first != __last) { ! typename iterator_traits<_ForwardIter>::difference_type __n = __count; ! --__n; _ForwardIter __i = __first; ++__i; while (__i != __last && __n != 0 && __binary_pred(*__i, __val)) { diff -Nrc3pad gcc-3.3.1/libstdc++-v3/include/Makefile.am gcc-3.3.2/libstdc++-v3/include/Makefile.am *** gcc-3.3.1/libstdc++-v3/include/Makefile.am 2003-02-28 06:09:53.000000000 +0000 --- gcc-3.3.2/libstdc++-v3/include/Makefile.am 2003-08-11 13:58:09.000000000 +0000 *************** stamp-bits: ${bits_headers} *** 372,378 **** (cd ${bits_builddir} && @LN_S@ $? . || true) ;\ echo `date` > stamp-bits ! stamp-c_base: ${c_base_headers} ${c_base_headers_extra} @if [ ! -d "${c_base_builddir}" ]; then \ mkdir -p ${c_base_builddir} ;\ fi ;\ --- 372,378 ---- (cd ${bits_builddir} && @LN_S@ $? . || true) ;\ echo `date` > stamp-bits ! stamp-c_base: stamp-bits ${c_base_headers} ${c_base_headers_extra} @if [ ! -d "${c_base_builddir}" ]; then \ mkdir -p ${c_base_builddir} ;\ fi ;\ diff -Nrc3pad gcc-3.3.1/libstdc++-v3/include/Makefile.in gcc-3.3.2/libstdc++-v3/include/Makefile.in *** gcc-3.3.1/libstdc++-v3/include/Makefile.in 2003-03-17 19:07:38.000000000 +0000 --- gcc-3.3.2/libstdc++-v3/include/Makefile.in 2003-08-11 13:58:09.000000000 +0000 *************** stamp-bits: ${bits_headers} *** 609,615 **** (cd ${bits_builddir} && @LN_S@ $? . || true) ;\ echo `date` > stamp-bits ! stamp-c_base: ${c_base_headers} ${c_base_headers_extra} @if [ ! -d "${c_base_builddir}" ]; then \ mkdir -p ${c_base_builddir} ;\ fi ;\ --- 609,615 ---- (cd ${bits_builddir} && @LN_S@ $? . || true) ;\ echo `date` > stamp-bits ! stamp-c_base: stamp-bits ${c_base_headers} ${c_base_headers_extra} @if [ ! -d "${c_base_builddir}" ]; then \ mkdir -p ${c_base_builddir} ;\ fi ;\ diff -Nrc3pad gcc-3.3.1/libstdc++-v3/libio/ChangeLog gcc-3.3.2/libstdc++-v3/libio/ChangeLog *** gcc-3.3.1/libstdc++-v3/libio/ChangeLog 2003-08-04 12:50:10.000000000 +0000 --- gcc-3.3.2/libstdc++-v3/libio/ChangeLog 2003-10-16 19:45:32.000000000 +0000 *************** *** 1,3 **** --- 1,7 ---- + 2003-10-16 Release Manager + + * GCC 3.3.2 Released. + 2003-08-04 Release Manager * GCC 3.3.1 Released. diff -Nrc3pad gcc-3.3.1/libstdc++-v3/libsupc++/cxxabi.h gcc-3.3.2/libstdc++-v3/libsupc++/cxxabi.h *** gcc-3.3.1/libstdc++-v3/libsupc++/cxxabi.h 2002-12-10 17:09:05.000000000 +0000 --- gcc-3.3.2/libstdc++-v3/libsupc++/cxxabi.h 2003-10-03 00:37:27.000000000 +0000 *************** protected: *** 175,180 **** --- 175,182 ---- 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 *************** protected: *** 201,208 **** unsigned __outer) const; }; - class __class_type_info; - /* helper class for __vmi_class_type */ class __base_class_type_info { --- 203,208 ----