diff -Nrcpad gcc-4.2.0/gcc/cp/ChangeLog gcc-4.2.1/gcc/cp/ChangeLog *** gcc-4.2.0/gcc/cp/ChangeLog Mon May 14 03:13:30 2007 --- gcc-4.2.1/gcc/cp/ChangeLog Thu Jul 19 14:29:21 2007 *************** *** 1,3 **** --- 1,93 ---- + 2007-07-19 Release Manager + + * GCC 4.2.1 released. + + 2007-07-07 Mark Mitchell + + PR c++/32232 + * pt.c (resolve_overloaded_unification): Robustify. Return a + bool, not an int. + (type_unification_real): Adjust accordingly. + + 2007-07-06 Mark Mitchell + + PR c++/32245 + * init.c (build_zero_init): Always build an initializer for + non-static storage. + * typeck2.c (build_functional_cast): Use build_zero_init. + + PR c++/32251 + * init.c (build_new_1): Always pass the allocation function to + build_op_delete_call. + * call.c (build_op_delete_call): Handle operator delete with a + variable-argument list. Do not issue an error when no matching + deallocation function is available for a new operator. + + PR c++/31992 + * cp-tree.h (any_value_dependent_elements_p): Declare it. + * decl.c (value_dependent_init_p): New function. + (cp_finish_decl): Use it. + * pt.c (value_dependent_expression_p): Use + any_value_dependent_elements_p. + * parser.c (cp_parser_primary_expression): Add comment about + treating dependent qualified names as integral + constant-expressions. + + 2007-07-03 Mark Mitchell + + PR c++/31338 + * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE. + * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as + COMPLEX_TYPE is now an ARITHMETIC_TYPE. + * init.c (build_zero_init): Adjust, as + COMPLEX_TYPE is now a SCALAR_TYPE. + * typeck2.c (digest_init): Allow brace-enclosed initializers for + COMPLEX_TYPE, even though that is now a SCALAR_TYPE. + + 2007-07-03 Richard Guenther + + PR c++/32609 + * class.c (fixed_type_or_null): Re-lookup the hashtable slot + after recursing. + + 2007-07-02 Jakub Jelinek + + PR c++/31748 + * semantics.c (finish_omp_clauses): Use %qD instead of %qE for + DECL_P in not a variable and appears more than once error messages. + + 2007-06-27 Simon Martin + + PR c++/27492 + * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for + function decls. + + 2007-06-15 Mark Mitchell + + * cp-tree.h (DECL_VAR_MARKED_P): Remove. + (DECL_ANON_UNION_VAR_P): New macro. + * class.c (fixed_type_or_null): Tidy. Use a hash table, rather + than DECL_VAR_MARKED_P, to keep track of which variables we have + seen. + * decl.c (redeclaration_error_message): Complain about redeclaring + anonymous union members at namespace scope. + * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P. + + 2007-06-08 Dirk Mueller + + PR c++/31809 + PR c++/31806 + Backport from mainline: + 2007-05-31 Jakub Jelinek + + * decl.c (cp_finish_decl): Also clear was_readonly if a static var + needs runtime initialization. + + 2007-05-30 Jakub Jelinek + + * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC + variables that need runtime initialization. + 2007-05-13 Release Manager * GCC 4.2.0 released. diff -Nrcpad gcc-4.2.0/gcc/cp/call.c gcc-4.2.1/gcc/cp/call.c *** gcc-4.2.0/gcc/cp/call.c Mon Apr 16 23:28:21 2007 --- gcc-4.2.1/gcc/cp/call.c Sat Jul 7 02:02:37 2007 *************** build_new_op (enum tree_code code, int f *** 3985,3992 **** GLOBAL_P is true if the delete-expression should not consider class-specific delete operators. PLACEMENT is the corresponding placement new call, or NULL_TREE. ! If PLACEMENT is non-NULL, then ALLOC_FN is the allocation function ! called to perform the placement new. */ tree build_op_delete_call (enum tree_code code, tree addr, tree size, --- 3985,3996 ---- GLOBAL_P is true if the delete-expression should not consider class-specific delete operators. PLACEMENT is the corresponding placement new call, or NULL_TREE. ! ! If this call to "operator delete" is being generated as part to ! deallocate memory allocated via a new-expression (as per [expr.new] ! which requires that if the initialization throws an exception then ! we call a deallocation function), then ALLOC_FN is the allocation ! function. */ tree build_op_delete_call (enum tree_code code, tree addr, tree size, *************** build_op_delete_call (enum tree_code cod *** 4077,4085 **** if (!a && !t) break; } ! /* On the second pass, the second argument must be ! "size_t". */ else if (pass == 1 && same_type_p (TREE_VALUE (t), sizetype) && TREE_CHAIN (t) == void_list_node) break; --- 4081,4093 ---- if (!a && !t) break; } ! /* On the second pass, look for a function with exactly two ! arguments: "void *" and "size_t". */ else if (pass == 1 + /* For "operator delete(void *, ...)" there will be + no second argument, but we will not get an exact + match above. */ + && t && same_type_p (TREE_VALUE (t), sizetype) && TREE_CHAIN (t) == void_list_node) break; *************** build_op_delete_call (enum tree_code cod *** 4119,4128 **** return build_function_call (fn, args); } ! /* If we are doing placement delete we do nothing if we don't find a ! matching op delete. */ ! if (placement) ! return NULL_TREE; error ("no suitable % for %qT", operator_name_info[(int)code].name, type); --- 4127,4144 ---- return build_function_call (fn, args); } ! /* [expr.new] ! ! If no unambiguous matching deallocation function can be found, ! propagating the exception does not cause the object's memory to ! be freed. */ ! if (alloc_fn) ! { ! if (!placement) ! warning (0, "no corresponding deallocation function for `%D'", ! alloc_fn); ! return NULL_TREE; ! } error ("no suitable % for %qT", operator_name_info[(int)code].name, type); diff -Nrcpad gcc-4.2.0/gcc/cp/class.c gcc-4.2.1/gcc/cp/class.c *** gcc-4.2.0/gcc/cp/class.c Thu Apr 12 19:39:09 2007 --- gcc-4.2.1/gcc/cp/class.c Tue Jul 3 15:26:59 2007 *************** fixed_type_or_null (tree instance, int* *** 5350,5371 **** } else if (TREE_CODE (TREE_TYPE (instance)) == REFERENCE_TYPE) { /* Reference variables should be references to objects. */ if (nonnull) *nonnull = 1; ! /* DECL_VAR_MARKED_P is used to prevent recursion; a variable's initializer may refer to the variable itself. */ if (TREE_CODE (instance) == VAR_DECL && DECL_INITIAL (instance) ! && !DECL_VAR_MARKED_P (instance)) { tree type; ! DECL_VAR_MARKED_P (instance) = 1; type = fixed_type_or_null (DECL_INITIAL (instance), nonnull, cdtorp); ! DECL_VAR_MARKED_P (instance) = 0; return type; } } --- 5350,5383 ---- } else if (TREE_CODE (TREE_TYPE (instance)) == REFERENCE_TYPE) { + /* We only need one hash table because it is always left empty. */ + static htab_t ht; + if (!ht) + ht = htab_create (37, + htab_hash_pointer, + htab_eq_pointer, + /*htab_del=*/NULL); + /* Reference variables should be references to objects. */ if (nonnull) *nonnull = 1; ! /* Enter the INSTANCE in a table to prevent recursion; a variable's initializer may refer to the variable itself. */ if (TREE_CODE (instance) == VAR_DECL && DECL_INITIAL (instance) ! && !htab_find (ht, instance)) { tree type; ! void **slot; ! ! slot = htab_find_slot (ht, instance, INSERT); ! *slot = instance; type = fixed_type_or_null (DECL_INITIAL (instance), nonnull, cdtorp); ! htab_remove_elt (ht, instance); ! return type; } } diff -Nrcpad gcc-4.2.0/gcc/cp/cp-tree.h gcc-4.2.1/gcc/cp/cp-tree.h *** gcc-4.2.0/gcc/cp/cp-tree.h Mon Apr 2 19:12:15 2007 --- gcc-4.2.1/gcc/cp/cp-tree.h Sat Jul 7 02:02:37 2007 *************** struct diagnostic_context; *** 107,113 **** DECL_IMPLICIT_TYPEDEF_P (in a TYPE_DECL) 3: DECL_IN_AGGR_P. 4: DECL_C_BIT_FIELD (in a FIELD_DECL) ! DECL_VAR_MARKED_P (in a VAR_DECL) DECL_SELF_REFERENCE_P (in a TYPE_DECL) DECL_INVALID_OVERRIDER_P (in a FUNCTION_DECL) 5: DECL_INTERFACE_KNOWN. --- 107,113 ---- DECL_IMPLICIT_TYPEDEF_P (in a TYPE_DECL) 3: DECL_IN_AGGR_P. 4: DECL_C_BIT_FIELD (in a FIELD_DECL) ! DECL_ANON_UNION_VAR_P (in a VAR_DECL) DECL_SELF_REFERENCE_P (in a TYPE_DECL) DECL_INVALID_OVERRIDER_P (in a FUNCTION_DECL) 5: DECL_INTERFACE_KNOWN. *************** extern void decl_shadowed_for_var_insert *** 2111,2120 **** (DECL_LANG_SPECIFIC (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK (NODE)) \ ->decl_flags.u.template_info) ! /* For a VAR_DECL, indicates that the variable has been processed. ! This flag is set and unset throughout the code; it is always ! used for a temporary purpose. */ ! #define DECL_VAR_MARKED_P(NODE) \ (DECL_LANG_FLAG_4 (VAR_DECL_CHECK (NODE))) /* Template information for a RECORD_TYPE or UNION_TYPE. */ --- 2111,2120 ---- (DECL_LANG_SPECIFIC (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK (NODE)) \ ->decl_flags.u.template_info) ! /* For a VAR_DECL, indicates that the variable is actually a ! non-static data member of anonymous union that has been promoted to ! variable status. */ ! #define DECL_ANON_UNION_VAR_P(NODE) \ (DECL_LANG_FLAG_4 (VAR_DECL_CHECK (NODE))) /* Template information for a RECORD_TYPE or UNION_TYPE. */ *************** extern void decl_shadowed_for_var_insert *** 2418,2431 **** /* [basic.fundamental] Integral and floating types are collectively called arithmetic ! types. Keep these checks in ascending code order. */ #define ARITHMETIC_TYPE_P(TYPE) \ ! (CP_INTEGRAL_TYPE_P (TYPE) || TREE_CODE (TYPE) == REAL_TYPE) /* [basic.types] Arithmetic types, enumeration types, pointer types, and pointer-to-member types, are collectively called scalar types. Keep these checks in ascending code order. */ #define SCALAR_TYPE_P(TYPE) \ (TYPE_PTRMEM_P (TYPE) \ --- 2418,2438 ---- /* [basic.fundamental] Integral and floating types are collectively called arithmetic ! types. ! ! As a GNU extension, we also accept complex types. ! ! Keep these checks in ascending code order. */ #define ARITHMETIC_TYPE_P(TYPE) \ ! (CP_INTEGRAL_TYPE_P (TYPE) \ ! || TREE_CODE (TYPE) == REAL_TYPE \ ! || TREE_CODE (TYPE) == COMPLEX_TYPE) /* [basic.types] Arithmetic types, enumeration types, pointer types, and pointer-to-member types, are collectively called scalar types. + Keep these checks in ascending code order. */ #define SCALAR_TYPE_P(TYPE) \ (TYPE_PTRMEM_P (TYPE) \ *************** extern bool dependent_template_id_p (tr *** 4146,4151 **** --- 4153,4159 ---- extern bool type_dependent_expression_p (tree); extern bool any_type_dependent_arguments_p (tree); extern bool value_dependent_expression_p (tree); + extern bool any_value_dependent_elements_p (tree); extern tree resolve_typename_type (tree, bool); extern tree template_for_substitution (tree); extern tree build_non_dependent_expr (tree); diff -Nrcpad gcc-4.2.0/gcc/cp/decl.c gcc-4.2.1/gcc/cp/decl.c *** gcc-4.2.0/gcc/cp/decl.c Sun Apr 29 06:27:27 2007 --- gcc-4.2.1/gcc/cp/decl.c Sat Jul 7 02:02:37 2007 *************** duplicate_decls (tree newdecl, tree oldd *** 1573,1578 **** --- 1573,1579 ---- DECL_STATIC_DESTRUCTOR (newdecl) |= DECL_STATIC_DESTRUCTOR (olddecl); DECL_PURE_VIRTUAL_P (newdecl) |= DECL_PURE_VIRTUAL_P (olddecl); DECL_VIRTUAL_P (newdecl) |= DECL_VIRTUAL_P (olddecl); + DECL_INVALID_OVERRIDER_P (newdecl) |= DECL_INVALID_OVERRIDER_P (olddecl); DECL_THIS_STATIC (newdecl) |= DECL_THIS_STATIC (olddecl); if (DECL_OVERLOADED_OPERATOR_P (olddecl) != ERROR_MARK) SET_OVERLOADED_OPERATOR_CODE *************** redeclaration_error_message (tree newdec *** 2161,2168 **** } else if (toplevel_bindings_p () || DECL_NAMESPACE_SCOPE_P (newdecl)) { ! /* Objects declared at top level: */ ! /* If at least one is a reference, it's ok. */ if (DECL_EXTERNAL (newdecl) || DECL_EXTERNAL (olddecl)) return NULL; /* Reject two definitions. */ --- 2162,2185 ---- } else if (toplevel_bindings_p () || DECL_NAMESPACE_SCOPE_P (newdecl)) { ! /* The objects have been declared at namespace scope. If either ! is a member of an anonymous union, then this is an invalid ! redeclaration. For example: ! ! int i; ! union { int i; }; ! ! is invalid. */ ! if (DECL_ANON_UNION_VAR_P (newdecl) ! || DECL_ANON_UNION_VAR_P (olddecl)) ! return "redeclaration of %q#D"; ! /* If at least one declaration is a reference, there is no ! conflict. For example: ! ! int i = 3; ! extern int i; ! ! is valid. */ if (DECL_EXTERNAL (newdecl) || DECL_EXTERNAL (olddecl)) return NULL; /* Reject two definitions. */ *************** initialize_artificial_var (tree decl, tr *** 5076,5081 **** --- 5093,5128 ---- make_rtl_for_nonlocal_decl (decl, init, /*asmspec=*/NULL); } + /* INIT is the initializer for a variable, as represented by the + parser. Returns true iff INIT is value-dependent. */ + + static bool + value_dependent_init_p (tree init) + { + if (TREE_CODE (init) == TREE_LIST) + /* A parenthesized initializer, e.g.: int i (3, 2); ? */ + return any_value_dependent_elements_p (init); + else if (TREE_CODE (init) == CONSTRUCTOR) + /* A brace-enclosed initializer, e.g.: int i = { 3 }; ? */ + { + VEC(constructor_elt, gc) *elts; + size_t nelts; + size_t i; + + elts = CONSTRUCTOR_ELTS (init); + nelts = VEC_length (constructor_elt, elts); + for (i = 0; i < nelts; ++i) + if (value_dependent_init_p (VEC_index (constructor_elt, + elts, i)->value)) + return true; + } + else + /* It must be a simple expression, e.g., int i = 3; */ + return value_dependent_expression_p (init); + + return false; + } + /* Finish processing of a declaration; install its line number and initial value. If the length of an array type is not known before, *************** cp_finish_decl (tree decl, tree init, bo *** 5148,5165 **** TREE_CONSTANT (decl) = 1; } ! if (!init ! || !DECL_CLASS_SCOPE_P (decl) ! || !DECL_INTEGRAL_CONSTANT_VAR_P (decl) ! || type_dependent_p ! || value_dependent_expression_p (init) ! /* Check also if initializer is a value dependent ! { integral_constant_expression }. */ ! || (TREE_CODE (init) == CONSTRUCTOR ! && VEC_length (constructor_elt, CONSTRUCTOR_ELTS (init)) == 1 ! && value_dependent_expression_p ! (VEC_index (constructor_elt, ! CONSTRUCTOR_ELTS (init), 0)->value))) { if (init) DECL_INITIAL (decl) = init; --- 5195,5210 ---- TREE_CONSTANT (decl) = 1; } ! /* Generally, initializers in templates are expanded when the ! template is instantiated. But, if DECL is an integral ! constant static data member, then it can be used in future ! integral constant expressions, and its value must be ! available. */ ! if (!(init ! && DECL_CLASS_SCOPE_P (decl) ! && DECL_INTEGRAL_CONSTANT_VAR_P (decl) ! && !type_dependent_p ! && !value_dependent_init_p (init))) { if (init) DECL_INITIAL (decl) = init; *************** cp_finish_decl (tree decl, tree init, bo *** 5368,5374 **** initializer. It is not legal to redeclare a static data member, so this issue does not arise in that case. */ if (var_definition_p && TREE_STATIC (decl)) ! expand_static_init (decl, init); } } --- 5413,5430 ---- initializer. It is not legal to redeclare a static data member, so this issue does not arise in that case. */ if (var_definition_p && TREE_STATIC (decl)) ! { ! /* If a TREE_READONLY variable needs initialization ! at runtime, it is no longer readonly and we need to ! avoid MEM_READONLY_P being set on RTL created for it. */ ! if (init) ! { ! if (TREE_READONLY (decl)) ! TREE_READONLY (decl) = 0; ! was_readonly = 0; ! } ! expand_static_init (decl, init); ! } } } diff -Nrcpad gcc-4.2.0/gcc/cp/decl2.c gcc-4.2.1/gcc/cp/decl2.c *** gcc-4.2.0/gcc/cp/decl2.c Wed Dec 6 17:41:29 2006 --- gcc-4.2.1/gcc/cp/decl2.c Tue Jun 19 00:40:30 2007 *************** build_anon_union_vars (tree type, tree o *** 1056,1061 **** --- 1056,1062 ---- tree base; decl = build_decl (VAR_DECL, DECL_NAME (field), TREE_TYPE (field)); + DECL_ANON_UNION_VAR_P (decl) = 1; base = get_base_address (object); TREE_PUBLIC (decl) = TREE_PUBLIC (base); diff -Nrcpad gcc-4.2.0/gcc/cp/init.c gcc-4.2.1/gcc/cp/init.c *** gcc-4.2.0/gcc/cp/init.c Thu Feb 22 19:57:55 2007 --- gcc-4.2.1/gcc/cp/init.c Sat Jul 7 02:02:37 2007 *************** build_zero_init (tree type, tree nelts, *** 178,185 **** items with static storage duration that are not otherwise initialized are initialized to zero. */ ; ! else if (SCALAR_TYPE_P (type) ! || TREE_CODE (type) == COMPLEX_TYPE) init = convert (type, integer_zero_node); else if (CLASS_TYPE_P (type)) { --- 178,184 ---- items with static storage duration that are not otherwise initialized are initialized to zero. */ ; ! else if (SCALAR_TYPE_P (type)) init = convert (type, integer_zero_node); else if (CLASS_TYPE_P (type)) { *************** build_zero_init (tree type, tree nelts, *** 196,202 **** corresponding to base classes as well. Thus, iterating over TYPE_FIELDs will result in correct initialization of all of the subobjects. */ ! if (static_storage_p && !zero_init_p (TREE_TYPE (field))) { tree value = build_zero_init (TREE_TYPE (field), /*nelts=*/NULL_TREE, --- 195,201 ---- corresponding to base classes as well. Thus, iterating over TYPE_FIELDs will result in correct initialization of all of the subobjects. */ ! if (!static_storage_p || !zero_init_p (TREE_TYPE (field))) { tree value = build_zero_init (TREE_TYPE (field), /*nelts=*/NULL_TREE, *************** build_new_1 (tree placement, tree type, *** 1970,1977 **** globally_qualified_p, (placement_allocation_fn_p ? alloc_call : NULL_TREE), ! (placement_allocation_fn_p ! ? alloc_fn : NULL_TREE)); if (!cleanup) /* We're done. */; --- 1969,1975 ---- globally_qualified_p, (placement_allocation_fn_p ? alloc_call : NULL_TREE), ! alloc_fn); if (!cleanup) /* We're done. */; diff -Nrcpad gcc-4.2.0/gcc/cp/parser.c gcc-4.2.1/gcc/cp/parser.c *** gcc-4.2.0/gcc/cp/parser.c Fri Mar 23 04:36:33 2007 --- gcc-4.2.1/gcc/cp/parser.c Sat Jul 7 02:02:37 2007 *************** cp_parser_primary_expression (cp_parser *** 3197,3203 **** /* If name lookup gives us a SCOPE_REF, then the qualifying scope was dependent. */ if (TREE_CODE (decl) == SCOPE_REF) ! return decl; /* Check to see if DECL is a local variable in a context where that is forbidden. */ if (parser->local_variables_forbidden_p --- 3197,3215 ---- /* If name lookup gives us a SCOPE_REF, then the qualifying scope was dependent. */ if (TREE_CODE (decl) == SCOPE_REF) ! { ! /* At this point, we do not know if DECL is a valid ! integral constant expression. We assume that it is ! in fact such an expression, so that code like: ! ! template struct A { ! int a[B::i]; ! }; ! ! is accepted. At template-instantiation time, we ! will check that B::i is actually a constant. */ ! return decl; ! } /* Check to see if DECL is a local variable in a context where that is forbidden. */ if (parser->local_variables_forbidden_p diff -Nrcpad gcc-4.2.0/gcc/cp/pt.c gcc-4.2.1/gcc/cp/pt.c *** gcc-4.2.0/gcc/cp/pt.c Tue Apr 24 22:36:53 2007 --- gcc-4.2.1/gcc/cp/pt.c Sat Jul 7 19:16:09 2007 *************** static htab_t local_specializations; *** 91,98 **** static void push_access_scope (tree); static void pop_access_scope (tree); ! static int resolve_overloaded_unification (tree, tree, tree, tree, ! unification_kind_t, int); static int try_one_overload (tree, tree, tree, tree, tree, unification_kind_t, int, bool); static int unify (tree, tree, tree, tree, int); --- 91,98 ---- static void push_access_scope (tree); static void pop_access_scope (tree); ! static bool resolve_overloaded_unification (tree, tree, tree, tree, ! unification_kind_t, int); static int try_one_overload (tree, tree, tree, tree, tree, unification_kind_t, int, bool); static int unify (tree, tree, tree, tree, int); *************** type_unification_real (tree tparms, *** 9943,9959 **** gcc_assert (TREE_TYPE (arg) != NULL_TREE); if (type_unknown_p (arg)) { ! /* [temp.deduct.type] A template-argument can be deduced from ! a pointer to function or pointer to member function ! argument if the set of overloaded functions does not ! contain function templates and at most one of a set of ! overloaded functions provides a unique match. */ if (resolve_overloaded_unification ! (tparms, targs, parm, arg, strict, sub_strict) ! != 0) ! return 1; ! continue; } arg = unlowered_expr_type (arg); if (arg == error_mark_node) --- 9943,9960 ---- gcc_assert (TREE_TYPE (arg) != NULL_TREE); if (type_unknown_p (arg)) { ! /* [temp.deduct.type] + A template-argument can be deduced from a pointer to + function or pointer to member function argument if + the set of overloaded functions does not contain + function templates and at most one of a set of + overloaded functions provides a unique match. */ if (resolve_overloaded_unification ! (tparms, targs, parm, arg, strict, sub_strict)) ! continue; ! ! return 1; } arg = unlowered_expr_type (arg); if (arg == error_mark_node) *************** type_unification_real (tree tparms, *** 10006,10017 **** return 0; } ! /* Subroutine of type_unification_real. Args are like the variables at the ! call site. ARG is an overloaded function (or template-id); we try ! deducing template args from each of the overloads, and if only one ! succeeds, we go with that. Modifies TARGS and returns 0 on success. */ ! static int resolve_overloaded_unification (tree tparms, tree targs, tree parm, --- 10007,10019 ---- return 0; } ! /* Subroutine of type_unification_real. Args are like the variables ! at the call site. ARG is an overloaded function (or template-id); ! we try deducing template args from each of the overloads, and if ! only one succeeds, we go with that. Modifies TARGS and returns ! true on success. */ ! static bool resolve_overloaded_unification (tree tparms, tree targs, tree parm, *************** resolve_overloaded_unification (tree tpa *** 10070,10085 **** } } } else ! { ! gcc_assert (TREE_CODE (arg) == OVERLOAD ! || 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); ! } /* [temp.deduct.type] A template-argument can be deduced from a pointer to function or pointer to member function argument if the set of --- 10072,10088 ---- } } } + else if (TREE_CODE (arg) != OVERLOAD + && TREE_CODE (arg) != FUNCTION_DECL) + /* If ARG is, for example, "(0, &f)" then its type will be unknown + -- but the deduction does not succeed because the expression is + not just the function on its own. */ + return false; else ! for (; arg; arg = OVL_NEXT (arg)) ! good += try_one_overload (tparms, targs, tempargs, parm, ! TREE_TYPE (OVL_CURRENT (arg)), ! strict, sub_strict, addr_p); /* [temp.deduct.type] A template-argument can be deduced from a pointer to function or pointer to member function argument if the set of *************** resolve_overloaded_unification (tree tpa *** 10097,10105 **** TREE_VEC_ELT (targs, i) = TREE_VEC_ELT (tempargs, i); } if (good) ! return 0; ! return 1; } /* Subroutine of resolve_overloaded_unification; does deduction for a single --- 10100,10108 ---- TREE_VEC_ELT (targs, i) = TREE_VEC_ELT (tempargs, i); } if (good) ! return true; ! return false; } /* Subroutine of resolve_overloaded_unification; does deduction for a single *************** value_dependent_expression_p (tree expre *** 12895,12906 **** } if (TREE_CODE (expression) == TREE_LIST) ! { ! for (; expression; expression = TREE_CHAIN (expression)) ! if (value_dependent_expression_p (TREE_VALUE (expression))) ! return true; ! return false; ! } return value_dependent_expression_p (expression); } --- 12898,12904 ---- } if (TREE_CODE (expression) == TREE_LIST) ! return any_value_dependent_elements_p (expression); return value_dependent_expression_p (expression); } *************** any_type_dependent_arguments_p (tree arg *** 13104,13109 **** --- 13102,13120 ---- return false; } + /* Returns TRUE if LIST (a TREE_LIST whose TREE_VALUEs are + expressions) contains any value-dependent expressions. */ + + bool + any_value_dependent_elements_p (tree list) + { + for (; list; list = TREE_CHAIN (list)) + if (value_dependent_expression_p (TREE_VALUE (list))) + return true; + + return false; + } + /* Returns TRUE if the ARG (a template argument) is dependent. */ static bool diff -Nrcpad gcc-4.2.0/gcc/cp/semantics.c gcc-4.2.1/gcc/cp/semantics.c *** gcc-4.2.0/gcc/cp/semantics.c Thu Apr 26 07:39:25 2007 --- gcc-4.2.1/gcc/cp/semantics.c Mon Jul 2 13:01:37 2007 *************** finish_omp_clauses (tree clauses) *** 3344,3357 **** { if (processing_template_decl) break; ! error ("%qE is not a variable in clause %qs", t, name); remove = true; } else if (bitmap_bit_p (&generic_head, DECL_UID (t)) || bitmap_bit_p (&firstprivate_head, DECL_UID (t)) || bitmap_bit_p (&lastprivate_head, DECL_UID (t))) { ! error ("%qE appears more than once in data clauses", t); remove = true; } else --- 3344,3360 ---- { if (processing_template_decl) break; ! if (DECL_P (t)) ! error ("%qD is not a variable in clause %qs", t, name); ! else ! error ("%qE is not a variable in clause %qs", t, name); remove = true; } else if (bitmap_bit_p (&generic_head, DECL_UID (t)) || bitmap_bit_p (&firstprivate_head, DECL_UID (t)) || bitmap_bit_p (&lastprivate_head, DECL_UID (t))) { ! error ("%qD appears more than once in data clauses", t); remove = true; } else diff -Nrcpad gcc-4.2.0/gcc/cp/typeck.c gcc-4.2.1/gcc/cp/typeck.c *** gcc-4.2.0/gcc/cp/typeck.c Fri Apr 27 01:37:02 2007 --- gcc-4.2.1/gcc/cp/typeck.c Wed Jul 4 17:18:22 2007 *************** type_after_usual_arithmetic_conversions *** 256,266 **** /* FIXME: Attributes. */ gcc_assert (ARITHMETIC_TYPE_P (t1) - || TREE_CODE (t1) == COMPLEX_TYPE || TREE_CODE (t1) == VECTOR_TYPE || TREE_CODE (t1) == ENUMERAL_TYPE); gcc_assert (ARITHMETIC_TYPE_P (t2) - || TREE_CODE (t2) == COMPLEX_TYPE || TREE_CODE (t2) == VECTOR_TYPE || TREE_CODE (t2) == ENUMERAL_TYPE); --- 256,264 ---- *************** common_type (tree t1, tree t2) *** 761,769 **** code2 = TREE_CODE (t2); if ((ARITHMETIC_TYPE_P (t1) || code1 == ENUMERAL_TYPE ! || code1 == COMPLEX_TYPE || code1 == VECTOR_TYPE) && (ARITHMETIC_TYPE_P (t2) || code2 == ENUMERAL_TYPE ! || code2 == COMPLEX_TYPE || code2 == VECTOR_TYPE)) return type_after_usual_arithmetic_conversions (t1, t2); else if ((TYPE_PTR_P (t1) && TYPE_PTR_P (t2)) --- 759,767 ---- code2 = TREE_CODE (t2); if ((ARITHMETIC_TYPE_P (t1) || code1 == ENUMERAL_TYPE ! || code1 == VECTOR_TYPE) && (ARITHMETIC_TYPE_P (t2) || code2 == ENUMERAL_TYPE ! || code2 == VECTOR_TYPE)) return type_after_usual_arithmetic_conversions (t1, t2); else if ((TYPE_PTR_P (t1) && TYPE_PTR_P (t2)) diff -Nrcpad gcc-4.2.0/gcc/cp/typeck2.c gcc-4.2.1/gcc/cp/typeck2.c *** gcc-4.2.0/gcc/cp/typeck2.c Wed Oct 18 10:57:18 2006 --- gcc-4.2.1/gcc/cp/typeck2.c Sat Jul 7 02:02:37 2007 *************** digest_init (tree type, tree init) *** 710,716 **** } /* Handle scalar types (including conversions) and references. */ ! if (SCALAR_TYPE_P (type) || code == REFERENCE_TYPE) return convert_for_initialization (0, type, init, LOOKUP_NORMAL, "initialization", NULL_TREE, 0); --- 710,717 ---- } /* Handle scalar types (including conversions) and references. */ ! if (TREE_CODE (type) != COMPLEX_TYPE ! && (SCALAR_TYPE_P (type) || code == REFERENCE_TYPE)) return convert_for_initialization (0, type, init, LOOKUP_NORMAL, "initialization", NULL_TREE, 0); *************** build_functional_cast (tree exp, tree pa *** 1347,1353 **** && !CLASSTYPE_NON_POD_P (type) && TYPE_HAS_DEFAULT_CONSTRUCTOR (type)) { ! exp = build_constructor (type, NULL); return get_target_expr (exp); } --- 1348,1356 ---- && !CLASSTYPE_NON_POD_P (type) && TYPE_HAS_DEFAULT_CONSTRUCTOR (type)) { ! exp = build_zero_init (type, ! /*nelts=*/NULL_TREE, ! /*static_storage_p=*/false); return get_target_expr (exp); } diff -Nrcpad gcc-4.2.0/libstdc++-v3/ChangeLog gcc-4.2.1/libstdc++-v3/ChangeLog *** gcc-4.2.0/libstdc++-v3/ChangeLog Mon May 14 03:15:03 2007 --- gcc-4.2.1/libstdc++-v3/ChangeLog Thu Jul 19 14:29:35 2007 *************** *** 1,3 **** --- 1,70 ---- + 2007-07-19 Release Manager + + * GCC 4.2.1 released. + + 2007-07-05 Joerg Richter + + PR libstdc++/31957 + * include/Makefile.am: Work around an AIX sed oddity. + * include/Makefile.in: Regenerate. + + 2007-06-28 Paolo Carlini + + PR libstdc++/32509 + * acinclude.m4 (GLIBCXX_ENABLE_CLOCALE): Carry out the checks + involving the de_DE locale only if an auto locale config is + used for a target suitable for the gnu locale model. + * docs/html/install.html: Update. + * configure: Regenerated. + + 2007-06-26 Benjamin Kosnik + + * include/ext/throw_allocator.h: Fixes for -fno-exceptions. + * testsuite/util/testsuite_shared.cc: Same. + * testsuite/util/io/illegal_input_error.hpp: Same. + * testsuite/util/io/verified_cmd_line_input.cc: Same. + + * libsupc++/typeinfo (type_info): Correct comment formatting, + clarify member access and public interface. + * libsupc++/exception: Less compressed comments. + * libsupc++/new: Same. + + 2007-06-08 Paolo Carlini + + * docs/html/install.html: Adjust consistently with libstdc++/31717. + + 2007-06-08 Francesco Palagi + + * include/std/std_fstream.h: Add Table 92 in comment. + + 2007-06-06 Benjamin Kosnik + Frank Mori Hess + + * docs/html/debug.html: Correct link. + + 2007-05-28 Benjamin Kosnik + + PR libstdc++/31717 + * acinclude.m4 (GLIBCXX_ENABLE_CLOCALE): Re-organize. Sanity check + gnu locale model requests to make sure it will work for the requested + target. Add checks for strxfrm_l, strerror_l when in gnu locale, + and strerror_r everywhere. + * aclocal.m4: Regenerated. + * configure: Regenerated. + * config.h.in: Regenerated. + + 2007-05-24 Paolo Carlini + + * include/bits/ostream.tcc: Do not inhibit implicit instantiation + of __ostream_insert here... + * include/bits/ostream_insert.h: ... do it here. + + 2007-05-21 Paolo Carlini + + PR libstdc++/31621 + * acinclude.m4 ([GLIBCXX_CHECK_LINKER_FEATURES]): Use the C compiler. + * configure: Regenerate. + 2007-05-13 Release Manager * GCC 4.2.0 released. diff -Nrcpad gcc-4.2.0/libstdc++-v3/acinclude.m4 gcc-4.2.1/libstdc++-v3/acinclude.m4 *** gcc-4.2.0/libstdc++-v3/acinclude.m4 Mon Mar 5 16:44:44 2007 --- gcc-4.2.1/libstdc++-v3/acinclude.m4 Thu Jun 28 23:02:05 2007 *************** AC_DEFUN([GLIBCXX_CHECK_LINKER_FEATURES] *** 251,261 **** # NB: This flag only works reliably after 2.16.1. Configure tests # for this are difficult, so hard wire a value that should work. - # All these tests are for C++, but run with the "C" compiler driver. - # Need to do this so that g++ won't try to link in libstdc++/libsupc++. ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" ! CFLAGS='-x c++ -Wl,--gc-sections' # Check for -Wl,--gc-sections AC_MSG_CHECKING([for ld that supports -Wl,--gc-sections]) --- 251,259 ---- # NB: This flag only works reliably after 2.16.1. Configure tests # for this are difficult, so hard wire a value that should work. ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" ! CFLAGS='-Wl,--gc-sections' # Check for -Wl,--gc-sections AC_MSG_CHECKING([for ld that supports -Wl,--gc-sections]) *************** dnl *** 1334,1397 **** dnl Default is generic. dnl AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [ - AC_MSG_CHECKING([for C locale to use]) GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@], [use MODEL for target locale package], [permit generic|gnu|ieee_1003.1-2001|yes|no|auto]) ! # If they didn't use this option switch, or if they specified --enable ! # with no specific model, we'll have to look for one. If they ! # specified --disable (???), do likewise. if test $enable_clocale = no || test $enable_clocale = yes; then enable_clocale=auto fi - - # Either a known package, or "auto" enable_clocale_flag=$enable_clocale ! # Probe for locale support if no specific model is specified. # Default to "generic". if test $enable_clocale_flag = auto; then case ${target_os} in linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu) ! AC_EGREP_CPP([_GLIBCXX_ok], [ ! #include ! #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) ! _GLIBCXX_ok ! #endif ! ], enable_clocale_flag=gnu, enable_clocale_flag=generic) ! ! # Test for bugs early in glibc-2.2.x series ! if test $enable_clocale_flag = gnu; then ! AC_TRY_RUN([ ! #define _GNU_SOURCE 1 ! #include ! #include ! #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) ! extern __typeof(newlocale) __newlocale; ! extern __typeof(duplocale) __duplocale; ! extern __typeof(strcoll_l) __strcoll_l; ! #endif ! int main() ! { ! const char __one[] = "Äuglein Augmen"; ! const char __two[] = "Äuglein"; ! int i; ! int j; ! __locale_t loc; ! __locale_t loc_dup; ! loc = __newlocale(1 << LC_ALL, "de_DE", 0); ! loc_dup = __duplocale(loc); ! i = __strcoll_l(__one, __two, loc); ! j = __strcoll_l(__one, __two, loc_dup); ! return 0; ! } ! ], ! [enable_clocale_flag=gnu],[enable_clocale_flag=generic], ! [enable_clocale_flag=generic]) ! fi ! ! # ... at some point put __strxfrm_l tests in as well. ;; darwin* | freebsd*) enable_clocale_flag=darwin --- 1332,1362 ---- dnl Default is generic. dnl AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [ GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@], [use MODEL for target locale package], [permit generic|gnu|ieee_1003.1-2001|yes|no|auto]) + + # Deal with gettext issues. Default to not using it (=no) until we detect + # support for it later. Let the user turn it off via --e/d, but let that + # default to on for easier handling. + USE_NLS=no + AC_ARG_ENABLE(nls, + AC_HELP_STRING([--enable-nls],[use Native Language Support (default)]), + [], + [enable_nls=yes]) ! # Either a known packaage, or "auto" if test $enable_clocale = no || test $enable_clocale = yes; then enable_clocale=auto fi enable_clocale_flag=$enable_clocale ! # Probe for locale model to use if none specified. # Default to "generic". if test $enable_clocale_flag = auto; then case ${target_os} in linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu) ! enable_clocale_flag=gnu ;; darwin* | freebsd*) enable_clocale_flag=darwin *************** AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [ *** 1402,1417 **** esac fi ! # Deal with gettext issues. Default to not using it (=no) until we detect ! # support for it later. Let the user turn it off via --e/d, but let that ! # default to on for easier handling. ! USE_NLS=no ! AC_ARG_ENABLE(nls, ! AC_HELP_STRING([--enable-nls],[use Native Language Support (default)]), ! [], ! [enable_nls=yes]) # Set configure bits for specified locale package case ${enable_clocale_flag} in generic) AC_MSG_RESULT(generic) --- 1367,1447 ---- esac fi ! # Sanity check model, and test for special functionality. ! if test $enable_clocale_flag = gnu; then ! AC_EGREP_CPP([_GLIBCXX_ok], [ ! #include ! #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) ! _GLIBCXX_ok ! #endif ! ], enable_clocale_flag=gnu, enable_clocale_flag=generic) ! ! if test $enable_clocale = auto; then ! # Test for bugs early in glibc-2.2.x series ! AC_TRY_RUN([ ! #define _GNU_SOURCE 1 ! #include ! #include ! #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) ! extern __typeof(newlocale) __newlocale; ! extern __typeof(duplocale) __duplocale; ! extern __typeof(strcoll_l) __strcoll_l; ! #endif ! int main() ! { ! const char __one[] = "Äuglein Augmen"; ! const char __two[] = "Äuglein"; ! int i; ! int j; ! __locale_t loc; ! __locale_t loc_dup; ! loc = __newlocale(1 << LC_ALL, "de_DE", 0); ! loc_dup = __duplocale(loc); ! i = __strcoll_l(__one, __two, loc); ! j = __strcoll_l(__one, __two, loc_dup); ! return 0; ! } ! ], ! [enable_clocale_flag=gnu],[enable_clocale_flag=generic], ! [enable_clocale_flag=generic]) ! fi ! ! # Set it to scream when it hurts. ! ac_save_CFLAGS="$CFLAGS" ! CFLAGS="-Wimplicit-function-declaration -Werror" ! ! # Use strxfrm_l if available. ! AC_TRY_COMPILE([#define _GNU_SOURCE 1 ! #include ! #include ], ! [char s[128]; __locale_t loc; strxfrm_l(s, "C", 5, loc);], ! AC_DEFINE(HAVE_STRXFRM_L, 1, ! [Define if strxfrm_l is available in .]),) ! ! # Use strerror_l if available. ! AC_TRY_COMPILE([#define _GNU_SOURCE 1 ! #include ! #include ], ! [__locale_t loc; strerror_l(5, loc);], ! AC_DEFINE(HAVE_STRERROR_L, 1, ! [Define if strerror_l is available in .]),) ! ! CFLAGS="$ac_save_CFLAGS" ! fi ! ! # Perhaps use strerror_r if available, and strerror_l isn't. ! ac_save_CFLAGS="$CFLAGS" ! CFLAGS="-Wimplicit-function-declaration -Werror" ! AC_TRY_COMPILE([#define _GNU_SOURCE 1 ! #include ! #include ], ! [char s[128]; strerror_r(5, s, 128);], ! AC_DEFINE(HAVE_STRERROR_R, 1, ! [Define if strerror_r is available in .]),) ! CFLAGS="$ac_save_CFLAGS" # Set configure bits for specified locale package + AC_MSG_CHECKING([for C locale to use]) case ${enable_clocale_flag} in generic) AC_MSG_RESULT(generic) diff -Nrcpad gcc-4.2.0/libstdc++-v3/config.h.in gcc-4.2.1/libstdc++-v3/config.h.in *** gcc-4.2.0/libstdc++-v3/config.h.in Fri Jul 21 21:11:46 2006 --- gcc-4.2.1/libstdc++-v3/config.h.in Fri Jun 1 16:35:34 2007 *************** *** 298,303 **** --- 298,309 ---- /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H + /* Define if strerror_l is available in . */ + #undef HAVE_STRERROR_L + + /* Define if strerror_r is available in . */ + #undef HAVE_STRERROR_R + /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H *************** *** 310,315 **** --- 316,324 ---- /* Define to 1 if you have the `strtold' function. */ #undef HAVE_STRTOLD + /* Define if strxfrm_l is available in . */ + #undef HAVE_STRXFRM_L + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_FILIO_H diff -Nrcpad gcc-4.2.0/libstdc++-v3/configure gcc-4.2.1/libstdc++-v3/configure *** gcc-4.2.0/libstdc++-v3/configure Mon Mar 5 16:44:44 2007 --- gcc-4.2.1/libstdc++-v3/configure Thu Jun 28 23:02:05 2007 *************** done *** 5764,5771 **** - echo "$as_me:$LINENO: checking for C locale to use" >&5 - echo $ECHO_N "checking for C locale to use... $ECHO_C" >&6 # Check whether --enable-clocale or --disable-clocale was given. if test "${enable_clocale+set}" = set; then enableval="$enable_clocale" --- 5764,5769 ---- *************** else *** 5782,5813 **** fi; ! # If they didn't use this option switch, or if they specified --enable ! # with no specific model, we'll have to look for one. If they ! # specified --disable (???), do likewise. if test $enable_clocale = no || test $enable_clocale = yes; then enable_clocale=auto fi - - # Either a known package, or "auto" enable_clocale_flag=$enable_clocale ! # Probe for locale support if no specific model is specified. # Default to "generic". if test $enable_clocale_flag = auto; then case ${target_os} in linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu) ! cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ ! #include ! #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) ! _GLIBCXX_ok ! #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | --- 5780,5832 ---- fi; ! # Deal with gettext issues. Default to not using it (=no) until we detect ! # support for it later. Let the user turn it off via --e/d, but let that ! # default to on for easier handling. ! USE_NLS=no ! # Check whether --enable-nls or --disable-nls was given. ! if test "${enable_nls+set}" = set; then ! enableval="$enable_nls" ! ! else ! enable_nls=yes ! fi; ! ! # Either a known packaage, or "auto" if test $enable_clocale = no || test $enable_clocale = yes; then enable_clocale=auto fi enable_clocale_flag=$enable_clocale ! # Probe for locale model to use if none specified. # Default to "generic". if test $enable_clocale_flag = auto; then case ${target_os} in linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu) ! enable_clocale_flag=gnu ! ;; ! darwin* | freebsd*) ! enable_clocale_flag=darwin ! ;; ! *) ! enable_clocale_flag=generic ! ;; ! esac ! fi ! ! # Sanity check model, and test for special functionality. ! if test $enable_clocale_flag = gnu; then ! cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ ! #include ! #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) ! _GLIBCXX_ok ! #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | *************** fi *** 5819,5827 **** rm -f conftest* ! # Test for bugs early in glibc-2.2.x series ! if test $enable_clocale_flag = gnu; then ! if test "$cross_compiling" = yes; then enable_clocale_flag=generic else cat >conftest.$ac_ext <<_ACEOF --- 5838,5846 ---- rm -f conftest* ! if test $enable_clocale = auto; then ! # Test for bugs early in glibc-2.2.x series ! if test "$cross_compiling" = yes; then enable_clocale_flag=generic else cat >conftest.$ac_ext <<_ACEOF *************** cat confdefs.h >>conftest.$ac_ext *** 5831,5858 **** cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ ! #define _GNU_SOURCE 1 ! #include ! #include ! #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) ! extern __typeof(newlocale) __newlocale; ! extern __typeof(duplocale) __duplocale; ! extern __typeof(strcoll_l) __strcoll_l; ! #endif ! int main() ! { ! const char __one[] = "Äuglein Augmen"; ! const char __two[] = "Äuglein"; ! int i; ! int j; ! __locale_t loc; ! __locale_t loc_dup; ! loc = __newlocale(1 << LC_ALL, "de_DE", 0); ! loc_dup = __duplocale(loc); ! i = __strcoll_l(__one, __two, loc); ! j = __strcoll_l(__one, __two, loc_dup); ! return 0; ! } _ACEOF rm -f conftest$ac_exeext --- 5850,5877 ---- cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ ! #define _GNU_SOURCE 1 ! #include ! #include ! #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) ! extern __typeof(newlocale) __newlocale; ! extern __typeof(duplocale) __duplocale; ! extern __typeof(strcoll_l) __strcoll_l; ! #endif ! int main() ! { ! const char __one[] = "Äuglein Augmen"; ! const char __two[] = "Äuglein"; ! int i; ! int j; ! __locale_t loc; ! __locale_t loc_dup; ! loc = __newlocale(1 << LC_ALL, "de_DE", 0); ! loc_dup = __duplocale(loc); ! i = __strcoll_l(__one, __two, loc); ! j = __strcoll_l(__one, __two, loc_dup); ! return 0; ! } _ACEOF rm -f conftest$ac_exeext *************** enable_clocale_flag=generic *** 5877,5908 **** fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi ! fi ! # ... at some point put __strxfrm_l tests in as well. ! ;; ! darwin* | freebsd*) ! enable_clocale_flag=darwin ! ;; ! *) ! enable_clocale_flag=generic ! ;; ! esac fi ! # Deal with gettext issues. Default to not using it (=no) until we detect ! # support for it later. Let the user turn it off via --e/d, but let that ! # default to on for easier handling. ! USE_NLS=no ! # Check whether --enable-nls or --disable-nls was given. ! if test "${enable_nls+set}" = set; then ! enableval="$enable_nls" else ! enable_nls=yes ! fi; # Set configure bits for specified locale package case ${enable_clocale_flag} in generic) echo "$as_me:$LINENO: result: generic" >&5 --- 5896,6072 ---- fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi ! fi ! # Set it to scream when it hurts. ! ac_save_CFLAGS="$CFLAGS" ! CFLAGS="-Wimplicit-function-declaration -Werror" ! ! # Use strxfrm_l if available. ! cat >conftest.$ac_ext <<_ACEOF ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #define _GNU_SOURCE 1 ! #include ! #include ! int ! main () ! { ! char s[128]; __locale_t loc; strxfrm_l(s, "C", 5, loc); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -z "$ac_c_werror_flag" ! || test ! -s conftest.err' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ! cat >>confdefs.h <<\_ACEOF ! #define HAVE_STRXFRM_L 1 ! _ACEOF ! ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! fi ! rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ! ! # Use strerror_l if available. ! cat >conftest.$ac_ext <<_ACEOF ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #define _GNU_SOURCE 1 ! #include ! #include ! int ! main () ! { ! __locale_t loc; strerror_l(5, loc); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -z "$ac_c_werror_flag" ! || test ! -s conftest.err' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ! cat >>confdefs.h <<\_ACEOF ! #define HAVE_STRERROR_L 1 ! _ACEOF ! ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! fi ! rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ! ! CFLAGS="$ac_save_CFLAGS" fi ! # Perhaps use strerror_r if available, and strerror_l isn't. ! ac_save_CFLAGS="$CFLAGS" ! CFLAGS="-Wimplicit-function-declaration -Werror" ! cat >conftest.$ac_ext <<_ACEOF ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #define _GNU_SOURCE 1 ! #include ! #include ! int ! main () ! { ! char s[128]; strerror_r(5, s, 128); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -z "$ac_c_werror_flag" ! || test ! -s conftest.err' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ! cat >>confdefs.h <<\_ACEOF ! #define HAVE_STRERROR_R 1 ! _ACEOF else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! fi ! rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ! CFLAGS="$ac_save_CFLAGS" # Set configure bits for specified locale package + echo "$as_me:$LINENO: checking for C locale to use" >&5 + echo $ECHO_N "checking for C locale to use... $ECHO_C" >&6 case ${enable_clocale_flag} in generic) echo "$as_me:$LINENO: result: generic" >&5 *************** ac_compiler_gnu=$ac_cv_cxx_compiler_gnu *** 8015,8021 **** # Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style. cat > conftest.$ac_ext << EOF ! #line 8018 "configure" int main() { // NB: _Atomic_word not necessarily int. --- 8179,8185 ---- # Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style. cat > conftest.$ac_ext << EOF ! #line 8182 "configure" int main() { // NB: _Atomic_word not necessarily int. *************** echo "${ECHO_T}$glibcxx_gnu_ld_version" *** 8395,8405 **** # NB: This flag only works reliably after 2.16.1. Configure tests # for this are difficult, so hard wire a value that should work. - # All these tests are for C++, but run with the "C" compiler driver. - # Need to do this so that g++ won't try to link in libstdc++/libsupc++. ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" ! CFLAGS='-x c++ -Wl,--gc-sections' # Check for -Wl,--gc-sections echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5 --- 8559,8567 ---- # NB: This flag only works reliably after 2.16.1. Configure tests # for this are difficult, so hard wire a value that should work. ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" ! CFLAGS='-Wl,--gc-sections' # Check for -Wl,--gc-sections echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5 *************** echo "${ECHO_T}$glibcxx_gnu_ld_version" *** 54307,54317 **** # NB: This flag only works reliably after 2.16.1. Configure tests # for this are difficult, so hard wire a value that should work. - # All these tests are for C++, but run with the "C" compiler driver. - # Need to do this so that g++ won't try to link in libstdc++/libsupc++. ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" ! CFLAGS='-x c++ -Wl,--gc-sections' # Check for -Wl,--gc-sections echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5 --- 54469,54477 ---- # NB: This flag only works reliably after 2.16.1. Configure tests # for this are difficult, so hard wire a value that should work. ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" ! CFLAGS='-Wl,--gc-sections' # Check for -Wl,--gc-sections echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5 *************** echo "${ECHO_T}$glibcxx_gnu_ld_version" *** 75669,75679 **** # NB: This flag only works reliably after 2.16.1. Configure tests # for this are difficult, so hard wire a value that should work. - # All these tests are for C++, but run with the "C" compiler driver. - # Need to do this so that g++ won't try to link in libstdc++/libsupc++. ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" ! CFLAGS='-x c++ -Wl,--gc-sections' # Check for -Wl,--gc-sections echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5 --- 75829,75837 ---- # NB: This flag only works reliably after 2.16.1. Configure tests # for this are difficult, so hard wire a value that should work. ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" ! CFLAGS='-Wl,--gc-sections' # Check for -Wl,--gc-sections echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5 *************** echo "${ECHO_T}$glibcxx_gnu_ld_version" *** 77194,77204 **** # NB: This flag only works reliably after 2.16.1. Configure tests # for this are difficult, so hard wire a value that should work. - # All these tests are for C++, but run with the "C" compiler driver. - # Need to do this so that g++ won't try to link in libstdc++/libsupc++. ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" ! CFLAGS='-x c++ -Wl,--gc-sections' # Check for -Wl,--gc-sections echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5 --- 77352,77360 ---- # NB: This flag only works reliably after 2.16.1. Configure tests # for this are difficult, so hard wire a value that should work. ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" ! CFLAGS='-Wl,--gc-sections' # Check for -Wl,--gc-sections echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5 *************** echo "${ECHO_T}$glibcxx_gnu_ld_version" *** 78687,78697 **** # NB: This flag only works reliably after 2.16.1. Configure tests # for this are difficult, so hard wire a value that should work. - # All these tests are for C++, but run with the "C" compiler driver. - # Need to do this so that g++ won't try to link in libstdc++/libsupc++. ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" ! CFLAGS='-x c++ -Wl,--gc-sections' # Check for -Wl,--gc-sections echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5 --- 78843,78851 ---- # NB: This flag only works reliably after 2.16.1. Configure tests # for this are difficult, so hard wire a value that should work. ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" ! CFLAGS='-Wl,--gc-sections' # Check for -Wl,--gc-sections echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5 *************** echo "${ECHO_T}$glibcxx_gnu_ld_version" *** 100579,100589 **** # NB: This flag only works reliably after 2.16.1. Configure tests # for this are difficult, so hard wire a value that should work. - # All these tests are for C++, but run with the "C" compiler driver. - # Need to do this so that g++ won't try to link in libstdc++/libsupc++. ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" ! CFLAGS='-x c++ -Wl,--gc-sections' # Check for -Wl,--gc-sections echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5 --- 100733,100741 ---- # NB: This flag only works reliably after 2.16.1. Configure tests # for this are difficult, so hard wire a value that should work. ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" ! CFLAGS='-Wl,--gc-sections' # Check for -Wl,--gc-sections echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5 *************** echo "${ECHO_T}$glibcxx_gnu_ld_version" *** 101426,101436 **** # NB: This flag only works reliably after 2.16.1. Configure tests # for this are difficult, so hard wire a value that should work. - # All these tests are for C++, but run with the "C" compiler driver. - # Need to do this so that g++ won't try to link in libstdc++/libsupc++. ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" ! CFLAGS='-x c++ -Wl,--gc-sections' # Check for -Wl,--gc-sections echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5 --- 101578,101586 ---- # NB: This flag only works reliably after 2.16.1. Configure tests # for this are difficult, so hard wire a value that should work. ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" ! CFLAGS='-Wl,--gc-sections' # Check for -Wl,--gc-sections echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5 *************** echo "${ECHO_T}$glibcxx_gnu_ld_version" *** 102829,102839 **** # NB: This flag only works reliably after 2.16.1. Configure tests # for this are difficult, so hard wire a value that should work. - # All these tests are for C++, but run with the "C" compiler driver. - # Need to do this so that g++ won't try to link in libstdc++/libsupc++. ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" ! CFLAGS='-x c++ -Wl,--gc-sections' # Check for -Wl,--gc-sections echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5 --- 102979,102987 ---- # NB: This flag only works reliably after 2.16.1. Configure tests # for this are difficult, so hard wire a value that should work. ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" ! CFLAGS='-Wl,--gc-sections' # Check for -Wl,--gc-sections echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5 *************** echo "${ECHO_T}$glibcxx_gnu_ld_version" *** 104624,104634 **** # NB: This flag only works reliably after 2.16.1. Configure tests # for this are difficult, so hard wire a value that should work. - # All these tests are for C++, but run with the "C" compiler driver. - # Need to do this so that g++ won't try to link in libstdc++/libsupc++. ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" ! CFLAGS='-x c++ -Wl,--gc-sections' # Check for -Wl,--gc-sections echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5 --- 104772,104780 ---- # NB: This flag only works reliably after 2.16.1. Configure tests # for this are difficult, so hard wire a value that should work. ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" ! CFLAGS='-Wl,--gc-sections' # Check for -Wl,--gc-sections echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5 *************** echo "${ECHO_T}$glibcxx_gnu_ld_version" *** 105869,105879 **** # NB: This flag only works reliably after 2.16.1. Configure tests # for this are difficult, so hard wire a value that should work. - # All these tests are for C++, but run with the "C" compiler driver. - # Need to do this so that g++ won't try to link in libstdc++/libsupc++. ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" ! CFLAGS='-x c++ -Wl,--gc-sections' # Check for -Wl,--gc-sections echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5 --- 106015,106023 ---- # NB: This flag only works reliably after 2.16.1. Configure tests # for this are difficult, so hard wire a value that should work. ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" ! CFLAGS='-Wl,--gc-sections' # Check for -Wl,--gc-sections echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5 *************** echo "${ECHO_T}$glibcxx_gnu_ld_version" *** 106898,106908 **** # NB: This flag only works reliably after 2.16.1. Configure tests # for this are difficult, so hard wire a value that should work. - # All these tests are for C++, but run with the "C" compiler driver. - # Need to do this so that g++ won't try to link in libstdc++/libsupc++. ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" ! CFLAGS='-x c++ -Wl,--gc-sections' # Check for -Wl,--gc-sections echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5 --- 107042,107050 ---- # NB: This flag only works reliably after 2.16.1. Configure tests # for this are difficult, so hard wire a value that should work. ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" ! CFLAGS='-Wl,--gc-sections' # Check for -Wl,--gc-sections echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5 diff -Nrcpad gcc-4.2.0/libstdc++-v3/docs/html/debug.html gcc-4.2.1/libstdc++-v3/docs/html/debug.html *** gcc-4.2.0/libstdc++-v3/docs/html/debug.html Thu Feb 9 04:31:38 2006 --- gcc-4.2.1/libstdc++-v3/docs/html/debug.html Wed Jun 6 13:58:20 2007 *************** *** 420,426 ****

Tracking uncaught exceptions

!

The verbose termination handler gives information about uncaught exceptions which are killing the program. It is described in the linked-to page.

--- 420,426 ----

Tracking uncaught exceptions

!

The verbose termination handler gives information about uncaught exceptions which are killing the program. It is described in the linked-to page.

diff -Nrcpad gcc-4.2.0/libstdc++-v3/docs/html/install.html gcc-4.2.1/libstdc++-v3/docs/html/install.html *** gcc-4.2.0/libstdc++-v3/docs/html/install.html Thu Jan 26 16:04:44 2006 --- gcc-4.2.1/libstdc++-v3/docs/html/install.html Thu Jun 28 23:02:05 2007 *************** *** 80,87 **** information must be installed.

! The configure option --enable-clocale can be used force a ! particular behavior.

--- 80,89 ---- information must be installed.

! Note however that the sanity checks involving the de_DE locale are ! skipped when an explicit --enable-clocale=gnu configure option is ! used: only the basic checks are carried out, defending against ! misconfigurations.

diff -Nrcpad gcc-4.2.0/libstdc++-v3/include/Makefile.am gcc-4.2.1/libstdc++-v3/include/Makefile.am *** gcc-4.2.0/libstdc++-v3/include/Makefile.am Thu Apr 12 23:06:37 2007 --- gcc-4.2.1/libstdc++-v3/include/Makefile.am Thu Jul 5 11:46:00 2007 *************** stamp-visibility: *** 986,991 **** --- 986,993 ---- echo 0 > stamp-visibility endif + # NB: The non-empty default ldbl_compat works around an AIX sed + # oddity, see libstdc++/31957 for details. ${host_builddir}/c++config.h: ${CONFIG_HEADER} \ ${glibcxx_srcdir}/include/bits/c++config \ stamp-${host_alias} \ *************** ${host_builddir}/c++config.h: ${CONFIG_H *** 995,1001 **** @date=`cat ${toplevel_srcdir}/gcc/DATESTAMP` ;\ nsa_version=`cat stamp-namespace-version` ;\ visibility=`cat stamp-visibility` ;\ ! ldbl_compat='' ;\ grep "^[ ]*#[ ]*define[ ][ ]*_GLIBCXX_LONG_DOUBLE_COMPAT[ ][ ]*1[ ]*$$" \ ${CONFIG_HEADER} > /dev/null 2>&1 \ && ldbl_compat='s,^#undef _GLIBCXX_LONG_DOUBLE_COMPAT$$,#define _GLIBCXX_LONG_DOUBLE_COMPAT 1,' ;\ --- 997,1003 ---- @date=`cat ${toplevel_srcdir}/gcc/DATESTAMP` ;\ nsa_version=`cat stamp-namespace-version` ;\ visibility=`cat stamp-visibility` ;\ ! ldbl_compat='s,g,g,' ;\ grep "^[ ]*#[ ]*define[ ][ ]*_GLIBCXX_LONG_DOUBLE_COMPAT[ ][ ]*1[ ]*$$" \ ${CONFIG_HEADER} > /dev/null 2>&1 \ && ldbl_compat='s,^#undef _GLIBCXX_LONG_DOUBLE_COMPAT$$,#define _GLIBCXX_LONG_DOUBLE_COMPAT 1,' ;\ diff -Nrcpad gcc-4.2.0/libstdc++-v3/include/Makefile.in gcc-4.2.1/libstdc++-v3/include/Makefile.in *** gcc-4.2.0/libstdc++-v3/include/Makefile.in Thu Apr 12 23:06:37 2007 --- gcc-4.2.1/libstdc++-v3/include/Makefile.in Thu Jul 5 11:46:00 2007 *************** stamp-host: ${host_headers} ${host_heade *** 1363,1368 **** --- 1363,1370 ---- @ENABLE_VISIBILITY_FALSE@stamp-visibility: @ENABLE_VISIBILITY_FALSE@ echo 0 > stamp-visibility + # NB: The non-empty default ldbl_compat works around an AIX sed + # oddity, see libstdc++/31957 for details. ${host_builddir}/c++config.h: ${CONFIG_HEADER} \ ${glibcxx_srcdir}/include/bits/c++config \ stamp-${host_alias} \ *************** ${host_builddir}/c++config.h: ${CONFIG_H *** 1372,1378 **** @date=`cat ${toplevel_srcdir}/gcc/DATESTAMP` ;\ nsa_version=`cat stamp-namespace-version` ;\ visibility=`cat stamp-visibility` ;\ ! ldbl_compat='' ;\ grep "^[ ]*#[ ]*define[ ][ ]*_GLIBCXX_LONG_DOUBLE_COMPAT[ ][ ]*1[ ]*$$" \ ${CONFIG_HEADER} > /dev/null 2>&1 \ && ldbl_compat='s,^#undef _GLIBCXX_LONG_DOUBLE_COMPAT$$,#define _GLIBCXX_LONG_DOUBLE_COMPAT 1,' ;\ --- 1374,1380 ---- @date=`cat ${toplevel_srcdir}/gcc/DATESTAMP` ;\ nsa_version=`cat stamp-namespace-version` ;\ visibility=`cat stamp-visibility` ;\ ! ldbl_compat='s,g,g,' ;\ grep "^[ ]*#[ ]*define[ ][ ]*_GLIBCXX_LONG_DOUBLE_COMPAT[ ][ ]*1[ ]*$$" \ ${CONFIG_HEADER} > /dev/null 2>&1 \ && ldbl_compat='s,^#undef _GLIBCXX_LONG_DOUBLE_COMPAT$$,#define _GLIBCXX_LONG_DOUBLE_COMPAT 1,' ;\ diff -Nrcpad gcc-4.2.0/libstdc++-v3/include/bits/ostream.tcc gcc-4.2.1/libstdc++-v3/include/bits/ostream.tcc *** gcc-4.2.0/libstdc++-v3/include/bits/ostream.tcc Thu Apr 12 23:06:37 2007 --- gcc-4.2.1/libstdc++-v3/include/bits/ostream.tcc Thu May 24 19:21:32 2007 *************** _GLIBCXX_BEGIN_NAMESPACE(std) *** 334,340 **** extern template ostream& operator<<(ostream&, const char*); extern template ostream& operator<<(ostream&, const unsigned char*); extern template ostream& operator<<(ostream&, const signed char*); - extern template ostream& __ostream_insert(ostream&, const char*, streamsize); extern template ostream& ostream::_M_insert(long); extern template ostream& ostream::_M_insert(unsigned long); --- 334,339 ---- *************** _GLIBCXX_BEGIN_NAMESPACE(std) *** 356,363 **** extern template wostream& operator<<(wostream&, char); extern template wostream& operator<<(wostream&, const wchar_t*); extern template wostream& operator<<(wostream&, const char*); - extern template wostream& __ostream_insert(wostream&, const wchar_t*, - streamsize); extern template wostream& wostream::_M_insert(long); extern template wostream& wostream::_M_insert(unsigned long); --- 355,360 ---- diff -Nrcpad gcc-4.2.0/libstdc++-v3/include/bits/ostream_insert.h gcc-4.2.1/libstdc++-v3/include/bits/ostream_insert.h *** gcc-4.2.0/libstdc++-v3/include/bits/ostream_insert.h Thu Apr 12 23:06:37 2007 --- gcc-4.2.1/libstdc++-v3/include/bits/ostream_insert.h Thu May 24 19:21:32 2007 *************** _GLIBCXX_BEGIN_NAMESPACE(std) *** 109,114 **** --- 109,126 ---- return __out; } + // Inhibit implicit instantiations for required instantiations, + // which are defined via explicit instantiations elsewhere. + // NB: This syntax is a GNU extension. + #if _GLIBCXX_EXTERN_TEMPLATE + extern template ostream& __ostream_insert(ostream&, const char*, streamsize); + + #ifdef _GLIBCXX_USE_WCHAR_T + extern template wostream& __ostream_insert(wostream&, const wchar_t*, + streamsize); + #endif + #endif + _GLIBCXX_END_NAMESPACE #endif /* _OSTREAM_INSERT_H */ diff -Nrcpad gcc-4.2.0/libstdc++-v3/include/ext/throw_allocator.h gcc-4.2.1/libstdc++-v3/include/ext/throw_allocator.h *** gcc-4.2.0/libstdc++-v3/include/ext/throw_allocator.h Fri Dec 1 12:56:23 2006 --- gcc-4.2.1/libstdc++-v3/include/ext/throw_allocator.h Tue Jun 26 15:35:42 2007 *************** *** 62,67 **** --- 62,68 ---- #include #include #include + #include _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) *************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) *** 81,90 **** std::tr1::mt19937 _M_generator; }; - struct forced_exception_error : public std::exception { }; class throw_allocator_base { public: --- 82,101 ---- std::tr1::mt19937 _M_generator; }; struct forced_exception_error : public std::exception { }; + // Substitute for concurrence_error object in the case of -fno-exceptions. + inline void + __throw_forced_exception_error() + { + #if __EXCEPTIONS + throw forced_exception_error(); + #else + __builtin_abort(); + #endif + } + class throw_allocator_base { public: *************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) *** 325,331 **** error += '\n'; print_to_string(error, make_entry(p, size)); print_to_string(error, *found_it); ! throw std::logic_error(error); } _S_map.insert(make_entry(p, size)); } --- 336,342 ---- error += '\n'; print_to_string(error, make_entry(p, size)); print_to_string(error, *found_it); ! std::__throw_logic_error(error.c_str()); } _S_map.insert(make_entry(p, size)); } *************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) *** 351,357 **** error += "null erase!"; error += '\n'; print_to_string(error, make_entry(p, size)); ! throw std::logic_error(error); } if (found_it->second.second != size) --- 362,368 ---- error += "null erase!"; error += '\n'; print_to_string(error, make_entry(p, size)); ! std::__throw_logic_error(error.c_str()); } if (found_it->second.second != size) *************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) *** 361,367 **** error += '\n'; print_to_string(error, make_entry(p, size)); print_to_string(error, *found_it); ! throw std::logic_error(error); } } --- 372,378 ---- error += '\n'; print_to_string(error, make_entry(p, size)); print_to_string(error, *found_it); ! std::__throw_logic_error(error.c_str()); } } *************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) *** 382,388 **** std::string error("throw_allocator_base::check_allocated by label "); error += '\n'; error += found; ! throw std::logic_error(error); } } --- 393,399 ---- std::string error("throw_allocator_base::check_allocated by label "); error += '\n'; error += found; ! std::__throw_logic_error(error.c_str()); } } *************** _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) *** 390,396 **** throw_allocator_base::throw_conditionally() { if (_S_g.get_prob() < _S_throw_prob) ! throw forced_exception_error(); } void --- 401,407 ---- throw_allocator_base::throw_conditionally() { if (_S_g.get_prob() < _S_throw_prob) ! __throw_forced_exception_error(); } void diff -Nrcpad gcc-4.2.0/libstdc++-v3/include/std/std_fstream.h gcc-4.2.1/libstdc++-v3/include/std/std_fstream.h *** gcc-4.2.0/libstdc++-v3/include/std/std_fstream.h Thu Dec 7 09:33:51 2006 --- gcc-4.2.1/libstdc++-v3/include/std/std_fstream.h Fri Jun 8 14:27:56 2007 *************** *** 1,6 **** // File based streams -*- C++ -*- ! // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free --- 1,7 ---- // File based streams -*- C++ -*- ! // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, ! // 2006, 2007 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free *************** _GLIBCXX_BEGIN_NAMESPACE(std) *** 257,265 **** * Otherwise it tries to open the file named @a s using the flags * given in @a mode. * ! * [Table 92 gives the relation between openmode combinations and the ! * equivalent fopen() flags, but the table has not been copied yet.] ! */ __filebuf_type* open(const char* __s, ios_base::openmode __mode); --- 258,287 ---- * Otherwise it tries to open the file named @a s using the flags * given in @a mode. * ! * Table 92, adapted here, gives the relation between openmode ! * combinations and the equivalent fopen() flags. ! * (NB: lines in|out|app and binary|in|out|app per DR 596) ! * +---------------------------------------------------------+ ! * | ios_base Flag combination stdio equivalent | ! * |binary in out trunc app | ! * +---------------------------------------------------------+ ! * | + "w" | ! * | + + "a" | ! * | + + "w" | ! * | + "r" | ! * | + + "r+" | ! * | + + + "w+" | ! * | + + + "a+" | ! * +---------------------------------------------------------+ ! * | + + "wb" | ! * | + + + "ab" | ! * | + + + "wb" | ! * | + + "rb" | ! * | + + + "r+b" | ! * | + + + + "w+b" | ! * | + + + + "a+b" | ! * +---------------------------------------------------------+ ! */ __filebuf_type* open(const char* __s, ios_base::openmode __mode); diff -Nrcpad gcc-4.2.0/libstdc++-v3/libsupc++/exception gcc-4.2.1/libstdc++-v3/libsupc++/exception *** gcc-4.2.0/libstdc++-v3/libsupc++/exception Thu Feb 1 15:56:37 2007 --- gcc-4.2.1/libstdc++-v3/libsupc++/exception Tue Jun 26 15:35:42 2007 *************** namespace std *** 58,63 **** --- 58,64 ---- public: exception() throw() { } virtual ~exception() throw(); + /** Returns a C-style character string describing the general cause * of the current error. */ virtual const char* what() const throw(); *************** namespace std *** 69,94 **** --- 70,100 ---- { public: bad_exception() throw() { } + // This declaration is not useless: // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118 virtual ~bad_exception() throw(); + // See comment in eh_exception.cc. virtual const char* what() const throw(); }; /// If you write a replacement %terminate handler, it must be of this type. typedef void (*terminate_handler) (); + /// If you write a replacement %unexpected handler, it must be of this type. typedef void (*unexpected_handler) (); /// Takes a new handler function as an argument, returns the old function. terminate_handler set_terminate(terminate_handler) throw(); + /** The runtime will call this function if %exception handling must be * abandoned for any reason. It can also be called by the user. */ void terminate() __attribute__ ((__noreturn__)); /// Takes a new handler function as an argument, returns the old function. unexpected_handler set_unexpected(unexpected_handler) throw(); + /** The runtime will call this function if an %exception is thrown which * violates the function's %exception specification. */ void unexpected() __attribute__ ((__noreturn__)); diff -Nrcpad gcc-4.2.0/libstdc++-v3/libsupc++/new gcc-4.2.1/libstdc++-v3/libsupc++/new *** gcc-4.2.0/libstdc++-v3/libsupc++/new Thu Feb 1 15:56:37 2007 --- gcc-4.2.1/libstdc++-v3/libsupc++/new Tue Jun 26 15:35:42 2007 *************** namespace std *** 59,77 **** { public: bad_alloc() throw() { } // This declaration is not useless: // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118 virtual ~bad_alloc() throw(); // See comment in eh_exception.cc. virtual const char* what() const throw(); }; struct nothrow_t { }; extern const nothrow_t nothrow; /** If you write your own error handler to be called by @c new, it must * be of this type. */ typedef void (*new_handler)(); ! /// Takes a replacement handler as the argument, returns the previous handler. new_handler set_new_handler(new_handler) throw(); } // namespace std --- 59,83 ---- { public: bad_alloc() throw() { } + // This declaration is not useless: // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118 virtual ~bad_alloc() throw(); + // See comment in eh_exception.cc. virtual const char* what() const throw(); }; struct nothrow_t { }; + extern const nothrow_t nothrow; + /** If you write your own error handler to be called by @c new, it must * be of this type. */ typedef void (*new_handler)(); ! ! /// Takes a replacement handler as the argument, returns the ! /// previous handler. new_handler set_new_handler(new_handler) throw(); } // namespace std diff -Nrcpad gcc-4.2.0/libstdc++-v3/libsupc++/typeinfo gcc-4.2.1/libstdc++-v3/libsupc++/typeinfo *** gcc-4.2.0/libstdc++-v3/libsupc++/typeinfo Thu Feb 1 15:56:37 2007 --- gcc-4.2.1/libstdc++-v3/libsupc++/typeinfo Tue Jun 26 15:35:42 2007 *************** namespace std *** 68,92 **** class type_info { public: ! /** Destructor. Being the first non-inline virtual function, this * controls in which translation unit the vtable is emitted. The * compiler makes use of that information to know where to emit * the runtime-mandated type_info structures in the new-abi. */ virtual ~type_info(); - private: - /// Assigning type_info is not supported. Made private. - type_info& operator=(const type_info&); - type_info(const type_info&); - - protected: - const char *__name; - - protected: - explicit type_info(const char *__n): __name(__n) { } - - public: - // the public interface /** Returns an @e implementation-defined byte string; this is not * portable between compilers! */ const char* name() const --- 68,79 ---- class type_info { public: ! /** Destructor first. Being the first non-inline virtual function, this * controls in which translation unit the vtable is emitted. The * compiler makes use of that information to know where to emit * the runtime-mandated type_info structures in the new-abi. */ virtual ~type_info(); /** Returns an @e implementation-defined byte string; this is not * portable between compilers! */ const char* name() const *************** namespace std *** 94,99 **** --- 81,87 ---- #if !__GXX_MERGED_TYPEINFO_NAMES bool before(const type_info& __arg) const; + // In old abi, or when weak symbols are not supported, there can // be multiple instances of a type_info object for one // type. Uniqueness must use the _name value, not object address. *************** namespace std *** 105,123 **** // and therefore address comparisons are sufficient. bool before(const type_info& __arg) const { return __name < __arg.__name; } bool operator==(const type_info& __arg) const { return __name == __arg.__name; } #endif bool operator!=(const type_info& __arg) const { return !operator==(__arg); } - // the internal interface - public: - // return true if this is a pointer type of some kind - virtual bool __is_pointer_p() const; - // return true if this is a function type - virtual bool __is_function_p() const; - // Try and catch a thrown type. Store an adjusted pointer to the // caught type in THR_OBJ. If THR_TYPE is not a pointer type, then // THR_OBJ points to the thrown object. If THR_TYPE is a pointer --- 93,105 ---- // and therefore address comparisons are sufficient. bool before(const type_info& __arg) const { return __name < __arg.__name; } + bool operator==(const type_info& __arg) const { return __name == __arg.__name; } #endif bool operator!=(const type_info& __arg) const { return !operator==(__arg); } // Try and catch a thrown type. Store an adjusted pointer to the // caught type in THR_OBJ. If THR_TYPE is not a pointer type, then // THR_OBJ points to the thrown object. If THR_TYPE is a pointer *************** namespace std *** 127,135 **** virtual bool __do_catch(const type_info *__thr_type, void **__thr_obj, unsigned __outer) const; ! // internally used during catch matching virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target, void **__obj_ptr) const; }; /** --- 109,133 ---- virtual bool __do_catch(const type_info *__thr_type, void **__thr_obj, unsigned __outer) const; ! // Internally used during catch matching virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target, void **__obj_ptr) const; + + // Return true if this is a pointer type of some kind + virtual bool __is_pointer_p() const; + + // Return true if this is a function type + virtual bool __is_function_p() const; + + protected: + const char *__name; + + explicit type_info(const char *__n): __name(__n) { } + + private: + /// Assigning type_info is not supported. + type_info& operator=(const type_info&); + type_info(const type_info&); }; /** *************** namespace std *** 141,149 **** --- 139,149 ---- { public: bad_cast() throw() { } + // This declaration is not useless: // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118 virtual ~bad_cast() throw(); + // See comment in eh_exception.cc. virtual const char* what() const throw(); }; *************** namespace std *** 153,161 **** --- 153,163 ---- { public: bad_typeid () throw() { } + // This declaration is not useless: // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118 virtual ~bad_typeid() throw(); + // See comment in eh_exception.cc. virtual const char* what() const throw(); }; diff -Nrcpad gcc-4.2.0/libstdc++-v3/testsuite/util/io/illegal_input_error.hpp gcc-4.2.1/libstdc++-v3/testsuite/util/io/illegal_input_error.hpp *** gcc-4.2.0/libstdc++-v3/testsuite/util/io/illegal_input_error.hpp Wed Jun 14 23:09:51 2006 --- gcc-4.2.1/libstdc++-v3/testsuite/util/io/illegal_input_error.hpp Tue Jun 26 15:35:42 2007 *************** *** 1,6 **** // -*- C++ -*- ! // Copyright (C) 2005, 2006 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms --- 1,6 ---- // -*- C++ -*- ! // Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms *************** *** 47,63 **** #ifndef PB_DS_ILLEGAL_INPUT_EX_HPP #define PB_DS_ILLEGAL_INPUT_EX_HPP namespace pb_ds { - namespace test { ! ! class illegal_input_error { }; } // namespace test - } // namespace pb_ds #endif // #ifndef PB_DS_ILLEGAL_INPUT_EX_HPP --- 47,72 ---- #ifndef PB_DS_ILLEGAL_INPUT_EX_HPP #define PB_DS_ILLEGAL_INPUT_EX_HPP + #include + namespace pb_ds { namespace test { ! class illegal_input_error : public std::exception { }; + // Substitute for concurrence_error object in the case of -fno-exceptions. + inline void + __throw_illegal_input_error() + { + #if __EXCEPTIONS + throw illegal_input_error(); + #else + __builtin_abort(); + #endif + } } // namespace test } // namespace pb_ds #endif // #ifndef PB_DS_ILLEGAL_INPUT_EX_HPP diff -Nrcpad gcc-4.2.0/libstdc++-v3/testsuite/util/io/verified_cmd_line_input.cc gcc-4.2.1/libstdc++-v3/testsuite/util/io/verified_cmd_line_input.cc *** gcc-4.2.0/libstdc++-v3/testsuite/util/io/verified_cmd_line_input.cc Wed Jun 14 23:09:51 2006 --- gcc-4.2.1/libstdc++-v3/testsuite/util/io/verified_cmd_line_input.cc Tue Jun 26 15:35:42 2007 *************** *** 1,6 **** // -*- C++ -*- ! // Copyright (C) 2005, 2006 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms --- 1,6 ---- // -*- C++ -*- ! // Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms *************** *** 48,131 **** #include #include #include namespace pb_ds { - namespace test { - void verify_argc(size_t given, size_t required) { if (given != required) ! throw illegal_input_error(); } void verify_prob(double prob) { if (prob < 0 || prob > 1) ! throw illegal_input_error(); } std::string get_cmd_line_str(int argc, char* a_p_argv[], int argn) { if (argc <= argn) ! throw illegal_input_error(); ! const std::string ret(a_p_argv[argn]); ! ! return (ret); } double get_cmd_line_prob(int argc, char* a_p_argv[], int argn) { if (argc <= argn) ! throw illegal_input_error(); ! const double ret = ::atof(a_p_argv[argn]); - verify_prob(ret); ! ! return (ret); } size_t get_cmd_line_size(int argc, char* a_p_argv[], int argn) { if (argc <= argn) ! throw illegal_input_error(); ! const size_t ret = static_cast(::atoi(a_p_argv[argn])); ! ! return (ret); } bool get_cmd_line_bool(int argc, char* a_p_argv[], int argn) { if (argc <= argn) ! throw illegal_input_error(); const std::string opt(a_p_argv[argn]); - if (opt.size() != 1) ! throw illegal_input_error(); ! if (opt[0] == 't') ! return (true); ! if (opt[0] == 'f') ! return (false); ! ! throw illegal_input_error(); ! ! return (false); } - } // namespace test - } // namespace pb_ds --- 48,116 ---- #include #include #include + #include namespace pb_ds { namespace test { void verify_argc(size_t given, size_t required) { if (given != required) ! __throw_illegal_input_error(); } void verify_prob(double prob) { if (prob < 0 || prob > 1) ! __throw_illegal_input_error(); } std::string get_cmd_line_str(int argc, char* a_p_argv[], int argn) { if (argc <= argn) ! __throw_illegal_input_error(); const std::string ret(a_p_argv[argn]); ! return ret; } double get_cmd_line_prob(int argc, char* a_p_argv[], int argn) { if (argc <= argn) ! __throw_illegal_input_error(); const double ret = ::atof(a_p_argv[argn]); verify_prob(ret); ! return ret; } size_t get_cmd_line_size(int argc, char* a_p_argv[], int argn) { if (argc <= argn) ! __throw_illegal_input_error(); const size_t ret = static_cast(::atoi(a_p_argv[argn])); ! return ret; } bool get_cmd_line_bool(int argc, char* a_p_argv[], int argn) { if (argc <= argn) ! __throw_illegal_input_error(); const std::string opt(a_p_argv[argn]); if (opt.size() != 1) ! __throw_illegal_input_error(); if (opt[0] == 't') ! return true; if (opt[0] == 'f') ! return false; ! __throw_illegal_input_error(); ! return false; } } // namespace test } // namespace pb_ds diff -Nrcpad gcc-4.2.0/libstdc++-v3/testsuite/util/testsuite_shared.cc gcc-4.2.1/libstdc++-v3/testsuite/util/testsuite_shared.cc *** gcc-4.2.0/libstdc++-v3/testsuite/util/testsuite_shared.cc Wed Jun 7 14:58:24 2006 --- gcc-4.2.1/libstdc++-v3/testsuite/util/testsuite_shared.cc Tue Jun 26 15:35:42 2007 *************** *** 1,4 **** ! // Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the --- 1,4 ---- ! // Copyright (C) 2004, 2005, 2006, 2007 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 *************** *** 21,26 **** --- 21,27 ---- #include #include #include + #include // libstdc++/22309 extern "C" void *************** try_throw_exception() *** 43,49 **** { try { ! throw std::bad_exception(); } catch (const std::exception& e) { } --- 44,50 ---- { try { ! std::__throw_bad_exception(); } catch (const std::exception& e) { } *************** try_function_random_fail() *** 68,72 **** } // Randomly throw. See if other threads cleanup. ! throw std::bad_exception(); } --- 69,73 ---- } // Randomly throw. See if other threads cleanup. ! std::__throw_bad_exception(); }