diff -Nrcpad gcc-3.4.4/gcc/cp/call.c gcc-3.4.5/gcc/cp/call.c *** gcc-3.4.4/gcc/cp/call.c 2005-05-01 23:26:21.000000000 +0000 --- gcc-3.4.5/gcc/cp/call.c 2005-10-06 14:07:03.000000000 +0000 *************** add_builtin_candidate (struct z_candidat *** 1556,1562 **** if (IS_AGGR_TYPE (c1) && DERIVED_FROM_P (c2, c1) && (TYPE_PTRMEMFUNC_P (type2) ! || is_complete (TREE_TYPE (TREE_TYPE (type2))))) break; } return; --- 1556,1562 ---- if (IS_AGGR_TYPE (c1) && DERIVED_FROM_P (c2, c1) && (TYPE_PTRMEMFUNC_P (type2) ! || is_complete (TYPE_PTRMEM_POINTED_TO_TYPE (type2)))) break; } return; *************** resolve_args (tree args) *** 2544,2550 **** { tree arg = TREE_VALUE (t); ! if (arg == error_mark_node) return error_mark_node; else if (VOID_TYPE_P (TREE_TYPE (arg))) { --- 2544,2550 ---- { tree arg = TREE_VALUE (t); ! if (error_operand_p (arg)) return error_mark_node; else if (VOID_TYPE_P (TREE_TYPE (arg))) { *************** convert_like_real (tree convs, tree expr *** 4080,4092 **** if (NEED_TEMPORARY_P (convs) || !lvalue_p (expr)) { tree type = TREE_TYPE (TREE_OPERAND (convs, 0)); if (!CP_TYPE_CONST_NON_VOLATILE_P (TREE_TYPE (ref_type))) { /* If the reference is volatile or non-const, we cannot create a temporary. */ - cp_lvalue_kind lvalue = real_lvalue_p (expr); - if (lvalue & clk_bitfield) error ("cannot bind bitfield `%E' to `%T'", expr, ref_type); --- 4080,4091 ---- if (NEED_TEMPORARY_P (convs) || !lvalue_p (expr)) { tree type = TREE_TYPE (TREE_OPERAND (convs, 0)); + cp_lvalue_kind lvalue = real_lvalue_p (expr); if (!CP_TYPE_CONST_NON_VOLATILE_P (TREE_TYPE (ref_type))) { /* If the reference is volatile or non-const, we cannot create a temporary. */ if (lvalue & clk_bitfield) error ("cannot bind bitfield `%E' to `%T'", expr, ref_type); *************** convert_like_real (tree convs, tree expr *** 4097,4102 **** --- 4096,4115 ---- error ("cannot bind rvalue `%E' to `%T'", expr, ref_type); return error_mark_node; } + /* If the source is a packed field, and we must use a copy + constructor, then building the target expr will require + binding the field to the reference parameter to the + copy constructor, and we'll end up with an infinite + loop. If we can use a bitwise copy, then we'll be + OK. */ + if ((lvalue & clk_packed) + && CLASS_TYPE_P (type) + && !TYPE_HAS_TRIVIAL_INIT_REF (type)) + { + error ("cannot bind packed field `%E' to `%T'", + expr, ref_type); + return error_mark_node; + } expr = build_target_expr_with_type (expr, type); } diff -Nrcpad gcc-3.4.4/gcc/cp/ChangeLog gcc-3.4.5/gcc/cp/ChangeLog *** gcc-3.4.4/gcc/cp/ChangeLog 2005-05-19 07:48:05.000000000 +0000 --- gcc-3.4.5/gcc/cp/ChangeLog 2005-12-01 02:38:37.000000000 +0000 *************** *** 1,3 **** --- 1,342 ---- + 2005-11-30 Release Manager + + * GCC 3.4.5 released. + + 2005-11-23 Jakub Jelinek + + PR c++/21983 + * class.c (find_final_overrider): Move diagnostic about no unique final + overrider to... + (update_vtable_entry_for_fn): ... here. + + 2005-11-15 Jason Merrill + + PR c++/24580 + * method.c (locate_copy): Also use skip_artificial_parms here. + (synthesize_exception_spec): Use CLASS_TYPE_P rather than checking + for RECORD_TYPE. + + 2005-11-16 Volker Reichelt + + Backport from mainline: + 2005-10-12 Nathan Sidwell + + PR c++/23797 + * parser.c (cp_parser_functional_cast): Cope when TYPE is not a + TYPE_DECL. Use dependent_type_p to check type. + * pt.c (uses_template_parms_p): Use dependent_type_p for a + TYPE_DECL. + (type_dependent_expression_p): Assert we've not been given a + TYPE_DECL. + + 2005-11-15 Volker Reichelt + + PR c++/19253 + PR c++/22172 + Backport from mainline: + 2005-11-02 Mark Mitchell + + * parser.c (cp_parser_postfix_expression): Use + cp_parser_elaborated_type_specifier to handle typename-types in + functional casts. + (cp_parser_enclosed_argument_list): Skip ahead to the end of the + template argument list if the closing ">" is not found. + + 2005-11-14 Jason Merrill + + PR c++/24580 + * method.c (locate_ctor): Skip all artificial parms, not just + 'this'. + + 2005-10-28 Josh Conner + + PR c++/22153 + * parser.c (cp_parser_member_declaration): Detect and handle + a template specialization. + + 2005-10-20 Volker Reichelt + + PR c++/22508 + * init.c (build_new_1): Remove misleading comment. + + 2005-10-12 Paolo Bonzini + + PR c++/24052 + * error.c (dump_expr): Pass LABEL_DECL to dump_decl. Print + an ADDR_EXPR of a LABEL_DECL as &&. + + 2005-10-11 Volker Reichelt + + Backport: + 2004-09-23 Andrew Pinski + PR c++/17618 + * cvt.c (cp_convert_to_pointer): Return early when the type is + an error_mark_node. + + 2004-05-22 Roger Sayle + * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by + returning when TREE_TYPE is error_mark_node. + * typeck.c (require_complete_type): Return error_mark_node if + value's type is an error_mark_node. + + 2004-11-02 Mark Mitchell + PR c++/18177 + * typeck.c (build_const_cast): Use error_operand_p. + + 2005-10-06 Volker Reichelt + + * call.c (resolve_args): Remove redundant test. + + 2005-09-21 Volker Reichelt + + PR c++/23965 + * call.c (resolve_args): Return error_mark_node on arguments + whose TREE_TYPE is error_mark_node. + + 2005-09-21 Volker Reichelt + + PR c++/17609 + Backport: + + 2004-03-08 Mark Mitchell + * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL + in the innermost scope, rather than at namespace scope. + * name-lookup.c (push_local_binding): Give it external linkage. + * name-lookup.h (push_local_binding): Declare it. + + 2005-09-17 Volker Reichelt + + Backport: + + 2004-11-27 Mark Mitchell + PR c++/18368 + * parser.c (cp_parser_check_for_definition_in_return_type): Take + the defined type as a parameter, and inform the user about the + possibility of a missing semicolon. + (cp_parser_explicit_instantiation): Adjust call to + cp_parser_check_for_definition_in_return_type. + (cp_parser_init_declarator): Likewise. + (cp_parser_member_declaration): Likewise. + + 2005-09-17 Volker Reichelt + + PR c++/18803 + Revert: + + 2005-09-02 Volker Reichelt + PR c++/18445 + * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with + unknown_type as non matching. + * pt.c (build_non_dependent_expr): Do not build a + NON_DEPENDENT_EXPR for a VAR_DECL. + + 2005-09-06 Volker Reichelt + + Backport: + + 2004-12-14 Mark Mitchell + PR c++/18738 + * decl.c (make_typename_type): Do not handle namespace-scoped + names here. + (tag_name): Handle typename_type. + (check_elaborated_type_specifier): Handle typenames. + * parser.c (cp_parser_diagnose_invalid_type_name): Do not call + make_typename_type for namespace-scoped names here. + (cp_parser_elaborated_type_specifier): Use + cp_parser_diagnose_invalid_type_name. + + 2005-09-03 Volker Reichelt + + Backport: + + 2005-08-26 Mark Mitchell + PR c++/19004 + * pt.c (uses_template_parms): Handle IDENTIFIER_NODE. + (type_dependent_expression_p): Allow BASELINKs whose associated + functions are simply a FUNCTION_DECL. + + 2005-09-02 Volker Reichelt + + PR c++/22233 + * pt.c (push_template_decl_real): Return error_mark_node if the + number of template parameters does not match previous definition. + * decl.c (start_function): Handle error_mark_node returned by + push_template_decl. + + 2005-09-02 Volker Reichelt + + Backport: + + 2004-11-25 Mark Mitchell + PR c++/18466 + * decl.c (grokvardecl): Keep track of whether or not a there was + explicit qualification. + * name-lookup.c (set_decl_namespace): Complain about explicit + qualification of a name within its own namespace. + + 2005-09-02 Volker Reichelt + + Backport: + + 2004-11-25 Mark Mitchell + PR c++/18445 + * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with + unknown_type as non matching. + * pt.c (build_non_dependent_expr): Do not build a + NON_DEPENDENT_EXPR for a VAR_DECL. + + 2005-09-01 Volker Reichelt + + Backport: + + 2004-11-27 Mark Mitchell + PR c++/18512 + * parser.c (cp_parser_postfix_expression): Robustify. + + 2005-09-01 Volker Reichelt + + Backport: + + 2004-11-25 Mark Mitchell + PR c++/18545 + * typeck.c (check_return_expr): Robustify. + + 2005-09-01 Volker Reichelt + + Backport: + + 2005-02-22 Mark Mitchell + PR c++/20153 + * decl2.c (build_anon_union_vars): Add type parameter. + (finish_anon_union): Pass it. + + 2005-07-28 Mark Mitchell + PR c++/22545 + * call.c (add_builtin_candidate): Adjust for changes in + representation of pointer-to-member types. + + 2005-09-01 Volker Reichelt + + PR c++/13377 + * parser.c (cp_parser_lookup_name): Pass LOOKUP_COMPLAIN to + lookup_name_real on final parse. + + 2005-08-31 Volker Reichelt + + PR c++/23586 + * parser.c (cp_parser_namespace_name): Move diagnostic for + invalid namespace-name to here from ... + * name-lookup.c (do_namespace_alias): ... here and ... + (do_using_directive): ... here. Remove dead code. + + 2005-08-31 Volker Reichelt + + PR c++/23639 + * semantics.c (qualified_name_lookup_error): Do not complain again + on invalid scope. + + 2005-07-28 Giovanni Bajo + + Backport: + + 2004-09-16 Mark Mitchell + PR c++/16002 + * parser.c (cp_parser_simple_declaration): Commit to tentative + parses after seeing a decl-specifier. + (cp_parser_simple_declaration): Eliminate spurious message. + (cp_parser_init_declarator): Adjust error message. + + 2005-06-17 Geoffrey Keating + PR c++/17413 + * pt.c (type_unification_real): Apply template type deduction even + to procedure parameters that are not dependent on a template + parameter. + + 2004-11-02 Mark Mitchell + PR c++/18124 + * parser.c (cp_parser_type_parameter): Robustify. + PR c++/18155 + * parser.c (cp_parser_single_declaration): Disallow template + typedefs. + (cp_parser_typedef_p): New function. + + 2004-12-21 Mark Mitchell + PR c++/18378 + * call.c (convert_like_real): Do not permit the use of a copy + constructor to copy a packed field. + + 2005-07-25 Giovanni Bajo + + PR c++/19208 + * pt.c (tsubst): Use fold_non_dependent_expr to fold array domains. + + 2005-06-14 Mark Mitchell + + PR c++/21987 + * decl.c (grok_op_properties): Add missing warn_conversion check. + + 2005-06-13 Nathan Sidwell + + PR c++/20789 + * decl.c (cp_finish_decl): Clear runtime runtime initialization if + in-class decl's initializer is bad. + + 2005-06-10 Aldy Hernandez + + PR c++/10611 + * cvt.c (build_expr_type_conversion): Same. + * typeck.c (build_binary_op): Handle vectors. + (common_type): Same. + (type_after_usual_arithmetic_conversions): Same. + * testsuite/g++.dg/conversion/simd2.C: New. + + 2005-06-08 Nathan Sidwell + + PR c++/21903 + * cp-tree.def (DEFAULT_ARG): Document TREE_CHAIN use. + * parser.c (cp_parser_late_parsing_default_args): Propagate parsed + argument to any early instantiations. + * pt.c (tsubst_arg_types): Chain early instantiation of default + arg. + + PR c++/19884 + * pt.c (check_explicit_specialization): Make sure namespace + binding lookup found an overloaded function. + (lookup_template_function): Just assert FNS is an overloaded + function. + + PR c++/19608 + * parser.c (cp_parser_late_parsing_for_member): Use + current_function_decl as scope to push to and from. + testsuite: + + 2005-06-08 Volker Reichelt + + PR c++/20563 + * parser.c (cp_parser_label_declaration): Deal with invalid/missing + identifiers. + + 2005-06-03 Mark Mitchell + + PR c++/21853 + * typeck.c (casts_away_constness_r): Do not drop cv-qualifiers on + the pointed-to type for a pointer-to-member. + + 2005-06-03 Mark Mitchell + + PR c++/21336 + * cp-tree.h (grok_op_properties): Remove friendp parameter. + * decl.c (grokfndecl): Adjust call. + (grok_op_properties): Determine the class of which the function is + a member by looking at its DECL_CONTEXT, not current_class_type. + * pt.c (tsubst_decl): Adjust call to grok_op_properties. + + 2005-05-26 Volker Reichelt + + PR c++/21768 + * pt.c (redeclare_class_template): Change error message according + to coding conventions. + 2005-05-19 Release Manager * GCC 3.4.4 released. diff -Nrcpad gcc-3.4.4/gcc/cp/class.c gcc-3.4.5/gcc/cp/class.c *** gcc-3.4.4/gcc/cp/class.c 2005-05-09 11:47:53.000000000 +0000 --- gcc-3.4.5/gcc/cp/class.c 2005-11-23 13:53:15.000000000 +0000 *************** find_final_overrider (tree derived, tree *** 2035,2045 **** /* If there was no winner, issue an error message. */ if (!ffod.candidates || TREE_CHAIN (ffod.candidates)) ! { ! error ("no unique final overrider for `%D' in `%T'", fn, ! BINFO_TYPE (derived)); ! return error_mark_node; ! } return ffod.candidates; } --- 2035,2041 ---- /* If there was no winner, issue an error message. */ if (!ffod.candidates || TREE_CHAIN (ffod.candidates)) ! return error_mark_node; return ffod.candidates; } *************** update_vtable_entry_for_fn (tree t, tree *** 2099,2105 **** /* Find the final overrider. */ overrider = find_final_overrider (TYPE_BINFO (t), b, target_fn); if (overrider == error_mark_node) ! return; overrider_target = overrider_fn = TREE_PURPOSE (overrider); /* Check for adjusting covariant return types. */ --- 2095,2104 ---- /* Find the final overrider. */ overrider = find_final_overrider (TYPE_BINFO (t), b, target_fn); if (overrider == error_mark_node) ! { ! error ("no unique final overrider for `%D' in `%T'", target_fn, t); ! return; ! } overrider_target = overrider_fn = TREE_PURPOSE (overrider); /* Check for adjusting covariant return types. */ diff -Nrcpad gcc-3.4.4/gcc/cp/cp-tree.def gcc-3.4.5/gcc/cp/cp-tree.def *** gcc-3.4.4/gcc/cp/cp-tree.def 2003-08-15 12:15:56.000000000 +0000 --- gcc-3.4.5/gcc/cp/cp-tree.def 2005-06-09 07:46:23.000000000 +0000 *************** DEFTREECODE (USING_DECL, "using_decl", ' *** 203,209 **** /* A using directive. The operand is USING_STMT_NAMESPACE. */ DEFTREECODE (USING_STMT, "using_directive", 'e', 1) ! /* An un-parsed default argument. Looks like an IDENTIFIER_NODE. */ DEFTREECODE (DEFAULT_ARG, "default_arg", 'x', 0) /* A template-id, like foo. The first operand is the template. --- 203,211 ---- /* A using directive. The operand is USING_STMT_NAMESPACE. */ DEFTREECODE (USING_STMT, "using_directive", 'e', 1) ! /* An un-parsed default argument. ! TREE_CHAIN is used to hold instantiations of functions that had to ! be instantiated before the argument was parsed. */ DEFTREECODE (DEFAULT_ARG, "default_arg", 'x', 0) /* A template-id, like foo. The first operand is the template. diff -Nrcpad gcc-3.4.4/gcc/cp/cp-tree.h gcc-3.4.5/gcc/cp/cp-tree.h *** gcc-3.4.4/gcc/cp/cp-tree.h 2005-05-09 11:47:57.000000000 +0000 --- gcc-3.4.5/gcc/cp/cp-tree.h 2005-06-03 16:29:35.000000000 +0000 *************** extern int copy_fn_p (tree); *** 3683,3689 **** extern tree get_scope_of_declarator (tree); extern void grok_special_member_properties (tree); extern int grok_ctor_properties (tree, tree); ! extern bool grok_op_properties (tree, int, bool); extern tree xref_tag (enum tag_types, tree, bool, bool); extern tree xref_tag_from_type (tree, tree, int); extern void xref_basetypes (tree, tree); --- 3683,3689 ---- extern tree get_scope_of_declarator (tree); extern void grok_special_member_properties (tree); extern int grok_ctor_properties (tree, tree); ! extern bool grok_op_properties (tree, bool); extern tree xref_tag (enum tag_types, tree, bool, bool); extern tree xref_tag_from_type (tree, tree, int); extern void xref_basetypes (tree, tree); diff -Nrcpad gcc-3.4.4/gcc/cp/cvt.c gcc-3.4.5/gcc/cp/cvt.c *** gcc-3.4.4/gcc/cp/cvt.c 2005-02-09 02:21:27.000000000 +0000 --- gcc-3.4.5/gcc/cp/cvt.c 2005-10-11 00:39:26.000000000 +0000 *************** cp_convert_to_pointer (tree type, tree e *** 79,84 **** --- 79,86 ---- tree intype = TREE_TYPE (expr); enum tree_code form; tree rval; + if (intype == error_mark_node) + return error_mark_node; if (IS_AGGR_TYPE (intype)) { *************** build_expr_type_conversion (int desires, *** 1029,1034 **** --- 1031,1037 ---- return expr; /* else fall through... */ + case VECTOR_TYPE: case BOOLEAN_TYPE: return (desires & WANT_INT) ? expr : NULL_TREE; case ENUMERAL_TYPE: diff -Nrcpad gcc-3.4.4/gcc/cp/decl2.c gcc-3.4.5/gcc/cp/decl2.c *** gcc-3.4.4/gcc/cp/decl2.c 2004-10-11 14:42:36.000000000 +0000 --- gcc-3.4.5/gcc/cp/decl2.c 2005-09-01 11:47:42.000000000 +0000 *************** typedef struct priority_info_s { *** 64,70 **** static void mark_vtable_entries (tree); static void grok_function_init (tree, tree); static bool maybe_emit_vtables (tree); - static tree build_anon_union_vars (tree); static bool acceptable_java_type (tree); static tree start_objects (int, int); static void finish_objects (int, int, tree); --- 64,69 ---- *************** defer_fn (tree fn) *** 1131,1144 **** VARRAY_PUSH_TREE (deferred_fns, fn); } ! /* Walks through the namespace- or function-scope anonymous union OBJECT, ! building appropriate ALIAS_DECLs. Returns one of the fields for use in ! the mangled name. */ static tree ! build_anon_union_vars (tree object) { - tree type = TREE_TYPE (object); tree main_decl = NULL_TREE; tree field; --- 1130,1142 ---- VARRAY_PUSH_TREE (deferred_fns, fn); } ! /* Walks through the namespace- or function-scope anonymous union ! OBJECT, with the indicated TYPE, building appropriate ALIAS_DECLs. ! Returns one of the fields for use in the mangled name. */ static tree ! build_anon_union_vars (tree type, tree object) { tree main_decl = NULL_TREE; tree field; *************** build_anon_union_vars (tree object) *** 1185,1191 **** decl = pushdecl (decl); } else if (ANON_AGGR_TYPE_P (TREE_TYPE (field))) ! decl = build_anon_union_vars (ref); else decl = 0; --- 1183,1189 ---- decl = pushdecl (decl); } else if (ANON_AGGR_TYPE_P (TREE_TYPE (field))) ! decl = build_anon_union_vars (TREE_TYPE (field), ref); else decl = 0; *************** finish_anon_union (tree anon_union_decl) *** 1225,1231 **** return; } ! main_decl = build_anon_union_vars (anon_union_decl); if (main_decl == NULL_TREE) { warning ("anonymous union with no members"); --- 1223,1229 ---- return; } ! main_decl = build_anon_union_vars (type, anon_union_decl); if (main_decl == NULL_TREE) { warning ("anonymous union with no members"); diff -Nrcpad gcc-3.4.4/gcc/cp/decl.c gcc-3.4.5/gcc/cp/decl.c *** gcc-3.4.4/gcc/cp/decl.c 2005-03-19 14:00:45.000000000 +0000 --- gcc-3.4.5/gcc/cp/decl.c 2005-09-06 15:25:11.000000000 +0000 *************** make_typename_type (tree context, tree n *** 2647,2662 **** return error_mark_node; } my_friendly_assert (TREE_CODE (name) == IDENTIFIER_NODE, 20030802); ! ! if (TREE_CODE (context) == NAMESPACE_DECL) ! { ! /* We can get here from typename_sub0 in the explicit_template_type ! expansion. Just fail. */ ! if (complain & tf_error) ! error ("no class template named `%#T' in `%#T'", ! name, context); ! return error_mark_node; ! } if (!dependent_type_p (context) || currently_open_class (context)) --- 2647,2653 ---- return error_mark_node; } my_friendly_assert (TREE_CODE (name) == IDENTIFIER_NODE, 20030802); ! my_friendly_assert (TYPE_P (context), 20050905); if (!dependent_type_p (context) || currently_open_class (context)) *************** cp_finish_decl (tree decl, tree init, tr *** 4919,4924 **** --- 4910,4925 ---- "initialized", decl); init = NULL_TREE; } + if (DECL_EXTERNAL (decl) && init) + { + /* The static data member cannot be initialized by a + non-constant when being declared. */ + error ("`%D' cannot be initialized by a non-constant expression" + " when being declared", decl); + DECL_INITIALIZED_IN_CLASS_P (decl) = 0; + init = NULL_TREE; + } + /* Handle: [dcl.init] *************** grokfndecl (tree ctype, *** 5718,5724 **** } if (IDENTIFIER_OPNAME_P (DECL_NAME (decl))) ! grok_op_properties (decl, friendp, /*complain=*/true); if (ctype && decl_function_context (decl)) DECL_NO_STATIC_CHAIN (decl) = 1; --- 5719,5725 ---- } if (IDENTIFIER_OPNAME_P (DECL_NAME (decl))) ! grok_op_properties (decl, /*complain=*/true); if (ctype && decl_function_context (decl)) DECL_NO_STATIC_CHAIN (decl) = 1; *************** grokvardecl (tree type, *** 5893,5898 **** --- 5894,5900 ---- tree scope) { tree decl; + tree explicit_scope; RID_BIT_TYPE specbits; my_friendly_assert (!name || TREE_CODE (name) == IDENTIFIER_NODE, *************** grokvardecl (tree type, *** 5900,5906 **** specbits = *specbits_in; ! /* Compute the scope in which to place the variable. */ if (!scope) { /* An explicit "extern" specifier indicates a namespace-scope --- 5902,5910 ---- specbits = *specbits_in; ! /* Compute the scope in which to place the variable, but remember ! whether or not that scope was explicitly specified by the user. */ ! explicit_scope = scope; if (!scope) { /* An explicit "extern" specifier indicates a namespace-scope *************** grokvardecl (tree type, *** 5929,5936 **** else decl = build_decl (VAR_DECL, name, type); ! if (scope && TREE_CODE (scope) == NAMESPACE_DECL) ! set_decl_namespace (decl, scope, 0); else DECL_CONTEXT (decl) = scope; --- 5933,5940 ---- else decl = build_decl (VAR_DECL, name, type); ! if (explicit_scope && TREE_CODE (explicit_scope) == NAMESPACE_DECL) ! set_decl_namespace (decl, explicit_scope, 0); else DECL_CONTEXT (decl) = scope; *************** unary_op_p (enum tree_code code) *** 9004,9010 **** errors are issued for invalid declarations. */ bool ! grok_op_properties (tree decl, int friendp, bool complain) { tree argtypes = TYPE_ARG_TYPES (TREE_TYPE (decl)); tree argtype; --- 9008,9014 ---- errors are issued for invalid declarations. */ bool ! grok_op_properties (tree decl, bool complain) { tree argtypes = TYPE_ARG_TYPES (TREE_TYPE (decl)); tree argtype; *************** grok_op_properties (tree decl, int frien *** 9013,9018 **** --- 9017,9023 ---- enum tree_code operator_code; int arity; bool ok; + tree class_type; /* Assume that the declaration is valid. */ ok = true; *************** grok_op_properties (tree decl, int frien *** 9023,9031 **** argtype = TREE_CHAIN (argtype)) ++arity; ! if (current_class_type == NULL_TREE) ! friendp = 1; ! if (DECL_CONV_FN_P (decl)) operator_code = TYPE_EXPR; else --- 9028,9037 ---- argtype = TREE_CHAIN (argtype)) ++arity; ! class_type = DECL_CONTEXT (decl); ! if (class_type && !CLASS_TYPE_P (class_type)) ! class_type = NULL_TREE; ! if (DECL_CONV_FN_P (decl)) operator_code = TYPE_EXPR; else *************** grok_op_properties (tree decl, int frien *** 9053,9082 **** my_friendly_assert (operator_code != LAST_CPLUS_TREE_CODE, 20000526); SET_OVERLOADED_OPERATOR_CODE (decl, operator_code); ! if (! friendp) ! { ! switch (operator_code) ! { ! case NEW_EXPR: ! TYPE_HAS_NEW_OPERATOR (current_class_type) = 1; ! break; ! case DELETE_EXPR: ! TYPE_GETS_DELETE (current_class_type) |= 1; ! break; ! case VEC_NEW_EXPR: ! TYPE_HAS_ARRAY_NEW_OPERATOR (current_class_type) = 1; ! break; ! case VEC_DELETE_EXPR: ! TYPE_GETS_DELETE (current_class_type) |= 2; ! break; ! default: ! break; ! } ! } if (operator_code == NEW_EXPR || operator_code == VEC_NEW_EXPR) TREE_TYPE (decl) = coerce_new_type (TREE_TYPE (decl)); --- 9059,9086 ---- my_friendly_assert (operator_code != LAST_CPLUS_TREE_CODE, 20000526); SET_OVERLOADED_OPERATOR_CODE (decl, operator_code); ! if (class_type) ! switch (operator_code) ! { ! case NEW_EXPR: ! TYPE_HAS_NEW_OPERATOR (class_type) = 1; ! break; ! case DELETE_EXPR: ! TYPE_GETS_DELETE (class_type) |= 1; ! break; ! case VEC_NEW_EXPR: ! TYPE_HAS_ARRAY_NEW_OPERATOR (class_type) = 1; ! break; ! case VEC_DELETE_EXPR: ! TYPE_GETS_DELETE (class_type) |= 2; ! break; ! default: ! break; ! } if (operator_code == NEW_EXPR || operator_code == VEC_NEW_EXPR) TREE_TYPE (decl) = coerce_new_type (TREE_TYPE (decl)); *************** grok_op_properties (tree decl, int frien *** 9130,9160 **** if (operator_code == CALL_EXPR) return ok; ! if (IDENTIFIER_TYPENAME_P (name) && ! DECL_TEMPLATE_INFO (decl)) { tree t = TREE_TYPE (name); ! if (! friendp) { ! int ref = (TREE_CODE (t) == REFERENCE_TYPE); ! const char *what = 0; ! ! if (ref) ! t = TYPE_MAIN_VARIANT (TREE_TYPE (t)); ! ! if (TREE_CODE (t) == VOID_TYPE) ! what = "void"; ! else if (t == current_class_type) what = "the same type"; /* Don't force t to be complete here. */ else if (IS_AGGR_TYPE (t) && COMPLETE_TYPE_P (t) ! && DERIVED_FROM_P (t, current_class_type)) what = "a base class"; - - if (what && warn_conversion) - warning ("conversion to %s%s will never use a type conversion operator", - ref ? "a reference to " : "", what); } } if (operator_code == COND_EXPR) { --- 9134,9170 ---- if (operator_code == CALL_EXPR) return ok; ! /* Warn about conversion operators that will never be used. */ ! if (IDENTIFIER_TYPENAME_P (name) ! && ! DECL_TEMPLATE_INFO (decl) ! && warn_conversion ! /* Warn only declaring the function; there is no need to ! warn again about out-of-class definitions. */ ! && class_type == current_class_type) { tree t = TREE_TYPE (name); ! int ref = (TREE_CODE (t) == REFERENCE_TYPE); ! const char *what = 0; ! ! if (ref) ! t = TYPE_MAIN_VARIANT (TREE_TYPE (t)); ! ! if (TREE_CODE (t) == VOID_TYPE) ! what = "void"; ! else if (class_type) { ! if (t == class_type) what = "the same type"; /* Don't force t to be complete here. */ else if (IS_AGGR_TYPE (t) && COMPLETE_TYPE_P (t) ! && DERIVED_FROM_P (t, class_type)) what = "a base class"; } + + if (what) + warning ("conversion to %s%s will never use a type conversion operator", + ref ? "a reference to " : "", what); } if (operator_code == COND_EXPR) { *************** tag_name (enum tag_types code) *** 9325,9333 **** case class_type: return "class"; case union_type: ! return "union "; case enum_type: return "enum"; default: abort (); } --- 9335,9345 ---- case class_type: return "class"; case union_type: ! return "union"; case enum_type: return "enum"; + case typename_type: + return "typename"; default: abort (); } *************** check_elaborated_type_specifier (enum ta *** 9365,9371 **** In other words, the only legitimate declaration to use in the elaborated type specifier is the implicit typedef created when the type is declared. */ ! if (!DECL_IMPLICIT_TYPEDEF_P (decl)) { error ("using typedef-name `%D' after `%s'", decl, tag_name (tag_code)); return IS_AGGR_TYPE (type) ? type : error_mark_node; --- 9377,9384 ---- In other words, the only legitimate declaration to use in the elaborated type specifier is the implicit typedef created when the type is declared. */ ! if (!DECL_IMPLICIT_TYPEDEF_P (decl) ! && tag_code != typename_type) { error ("using typedef-name `%D' after `%s'", decl, tag_name (tag_code)); return IS_AGGR_TYPE (type) ? type : error_mark_node; *************** check_elaborated_type_specifier (enum ta *** 9379,9385 **** } else if (TREE_CODE (type) != RECORD_TYPE && TREE_CODE (type) != UNION_TYPE ! && tag_code != enum_type) { error ("`%T' referred to as `%s'", type, tag_name (tag_code)); return error_mark_node; --- 9392,9399 ---- } else if (TREE_CODE (type) != RECORD_TYPE && TREE_CODE (type) != UNION_TYPE ! && tag_code != enum_type ! && tag_code != typename_type) { error ("`%T' referred to as `%s'", type, tag_name (tag_code)); return error_mark_node; *************** start_function (tree declspecs, tree dec *** 10301,10307 **** class scope, current_class_type will be NULL_TREE until set above by push_nested_class.) */ if (processing_template_decl) ! decl1 = push_template_decl (decl1); /* We are now in the scope of the function being defined. */ current_function_decl = decl1; --- 10315,10325 ---- class scope, current_class_type will be NULL_TREE until set above by push_nested_class.) */ if (processing_template_decl) ! { ! tree newdecl1 = push_template_decl (decl1); ! if (newdecl1 != error_mark_node) ! decl1 = newdecl1; ! } /* We are now in the scope of the function being defined. */ current_function_decl = decl1; diff -Nrcpad gcc-3.4.4/gcc/cp/error.c gcc-3.4.5/gcc/cp/error.c *** gcc-3.4.4/gcc/cp/error.c 2004-10-28 03:49:40.000000000 +0000 --- gcc-3.4.5/gcc/cp/error.c 2005-10-12 13:45:08.000000000 +0000 *************** dump_expr (tree t, int flags) *** 1307,1312 **** --- 1307,1313 ---- case FUNCTION_DECL: case TEMPLATE_DECL: case NAMESPACE_DECL: + case LABEL_DECL: case OVERLOAD: case IDENTIFIER_NODE: dump_decl (t, (flags & ~TFF_DECL_SPECIFIERS) | TFF_NO_FUNCTION_ARGUMENTS); *************** dump_expr (tree t, int flags) *** 1547,1552 **** --- 1548,1555 ---- || (TREE_TYPE (t) && TREE_CODE (TREE_TYPE (t)) == REFERENCE_TYPE)) dump_expr (TREE_OPERAND (t, 0), flags | TFF_EXPR_IN_PARENS); + else if (TREE_CODE (TREE_OPERAND (t, 0)) == LABEL_DECL) + dump_unary_op ("&&", t, flags); else dump_unary_op ("&", t, flags); break; diff -Nrcpad gcc-3.4.4/gcc/cp/init.c gcc-3.4.5/gcc/cp/init.c *** gcc-3.4.4/gcc/cp/init.c 2005-05-02 14:46:34.000000000 +0000 --- gcc-3.4.5/gcc/cp/init.c 2005-10-20 10:10:09.000000000 +0000 *************** build_new_1 (tree exp) *** 2075,2083 **** fns = lookup_fnfields (true_type, fnname, /*protect=*/2); if (!fns) { - /* See PR 15967. This should never happen (and it is - fixed correctly in mainline), but on the release branch - we prefer this less-intrusive approacch. */ error ("no suitable or ambiguous `%D' found in class `%T'", fnname, true_type); return error_mark_node; --- 2075,2080 ---- diff -Nrcpad gcc-3.4.4/gcc/cp/lex.c gcc-3.4.5/gcc/cp/lex.c *** gcc-3.4.4/gcc/cp/lex.c 2004-06-09 18:32:04.000000000 +0000 --- gcc-3.4.5/gcc/cp/lex.c 2005-09-21 15:08:00.000000000 +0000 *************** unqualified_name_lookup_error (tree name *** 627,652 **** if (name != ansi_opname (ERROR_MARK)) error ("`%D' not defined", name); } - else if (current_function_decl == 0) - error ("`%D' was not declared in this scope", name); else { ! if (IDENTIFIER_NAMESPACE_VALUE (name) != error_mark_node ! || IDENTIFIER_ERROR_LOCUS (name) != current_function_decl) { ! static int undeclared_variable_notice; ! ! error ("`%D' undeclared (first use this function)", name); ! ! if (! undeclared_variable_notice) ! { ! error ("(Each undeclared identifier is reported only once for each function it appears in.)"); ! undeclared_variable_notice = 1; ! } } - /* Prevent repeated error messages. */ - SET_IDENTIFIER_NAMESPACE_VALUE (name, error_mark_node); - SET_IDENTIFIER_ERROR_LOCUS (name, current_function_decl); } return error_mark_node; --- 627,644 ---- if (name != ansi_opname (ERROR_MARK)) error ("`%D' not defined", name); } else { ! error ("`%D' was not declared in this scope", name); ! /* Prevent repeated error messages by creating a VAR_DECL with ! this NAME in the innermost block scope. */ ! if (current_function_decl) { ! tree decl; ! decl = build_decl (VAR_DECL, name, error_mark_node); ! DECL_CONTEXT (decl) = current_function_decl; ! push_local_binding (name, decl, 0); } } return error_mark_node; diff -Nrcpad gcc-3.4.4/gcc/cp/method.c gcc-3.4.5/gcc/cp/method.c *** gcc-3.4.4/gcc/cp/method.c 2005-05-09 11:48:01.000000000 +0000 --- gcc-3.4.5/gcc/cp/method.c 2005-11-16 20:27:26.000000000 +0000 *************** synthesize_exception_spec (tree type, tr *** 851,857 **** continue; while (TREE_CODE (type) == ARRAY_TYPE) type = TREE_TYPE (type); ! if (TREE_CODE (type) != RECORD_TYPE) continue; fn = (*extractor) (type, client); --- 851,857 ---- continue; while (TREE_CODE (type) == ARRAY_TYPE) type = TREE_TYPE (type); ! if (!CLASS_TYPE_P (type)) continue; fn = (*extractor) (type, client); *************** locate_ctor (tree type, void *client ATT *** 896,902 **** tree fn = OVL_CURRENT (fns); tree parms = TYPE_ARG_TYPES (TREE_TYPE (fn)); ! if (sufficient_parms_p (TREE_CHAIN (parms))) return fn; } return NULL_TREE; --- 896,904 ---- tree fn = OVL_CURRENT (fns); tree parms = TYPE_ARG_TYPES (TREE_TYPE (fn)); ! parms = skip_artificial_parms_for (fn, parms); ! ! if (sufficient_parms_p (parms)) return fn; } return NULL_TREE; *************** locate_copy (tree type, void *client_) *** 940,946 **** int excess; int quals; ! parms = TREE_CHAIN (parms); if (!parms) continue; src_type = non_reference (TREE_VALUE (parms)); --- 942,948 ---- int excess; int quals; ! parms = skip_artificial_parms_for (fn, parms); if (!parms) continue; src_type = non_reference (TREE_VALUE (parms)); diff -Nrcpad gcc-3.4.4/gcc/cp/name-lookup.c gcc-3.4.5/gcc/cp/name-lookup.c *** gcc-3.4.4/gcc/cp/name-lookup.c 2005-03-02 19:57:07.000000000 +0000 --- gcc-3.4.5/gcc/cp/name-lookup.c 2005-10-11 00:39:26.000000000 +0000 *************** static cxx_scope *innermost_nonclass_lev *** 35,41 **** static tree select_decl (cxx_binding *, int); static cxx_binding *binding_for_name (cxx_scope *, tree); static tree lookup_name_current_level (tree); - static void push_local_binding (tree, tree, int); static tree push_overloaded_decl (tree, int); static bool lookup_using_namespace (tree, cxx_binding *, tree, tree, int); --- 35,40 ---- *************** maybe_push_decl (tree decl) *** 1052,1058 **** doesn't really belong to this binding level, that it got here through a using-declaration. */ ! static void push_local_binding (tree id, tree decl, int flags) { struct cp_binding_level *b; --- 1051,1057 ---- doesn't really belong to this binding level, that it got here through a using-declaration. */ ! void push_local_binding (tree id, tree decl, int flags) { struct cp_binding_level *b; *************** check_for_out_of_scope_variable (tree de *** 1180,1185 **** --- 1179,1188 ---- return decl; DECL_ERROR_REPORTED (decl) = 1; + + if (TREE_TYPE (decl) == error_mark_node) + return decl; + if (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (TREE_TYPE (decl))) { error ("name lookup of `%D' changed for new ISO `for' scoping", *************** set_decl_namespace (tree decl, tree scop *** 3021,3027 **** return; } else ! return; complain: error ("`%D' should have been declared inside `%D'", decl, scope); --- 3024,3036 ---- return; } else ! { ! /* Writing "int N::i" to declare a variable within "N" is invalid. */ ! if (at_namespace_scope_p ()) ! error ("explicit qualification in declaration of `%D'", decl); ! return; ! } ! complain: error ("`%D' should have been declared inside `%D'", decl, scope); *************** namespace_ancestor (tree ns1, tree ns2) *** 3199,3210 **** void do_namespace_alias (tree alias, tree namespace) { ! if (TREE_CODE (namespace) != NAMESPACE_DECL) ! { ! /* The parser did not find it, so it's not there. */ ! error ("unknown namespace `%D'", namespace); ! return; ! } namespace = ORIGINAL_NAMESPACE (namespace); --- 3208,3217 ---- void do_namespace_alias (tree alias, tree namespace) { ! if (namespace == error_mark_node) ! return; ! ! my_friendly_assert (TREE_CODE (namespace) == NAMESPACE_DECL, 20050830); namespace = ORIGINAL_NAMESPACE (namespace); *************** do_toplevel_using_decl (tree decl, tree *** 3345,3370 **** void do_using_directive (tree namespace) { if (building_stmt_tree ()) add_stmt (build_stmt (USING_STMT, namespace)); - - /* using namespace A::B::C; */ - if (TREE_CODE (namespace) == SCOPE_REF) - namespace = TREE_OPERAND (namespace, 1); - if (TREE_CODE (namespace) == IDENTIFIER_NODE) - { - /* Lookup in lexer did not find a namespace. */ - if (!processing_template_decl) - error ("namespace `%T' undeclared", namespace); - return; - } - if (TREE_CODE (namespace) != NAMESPACE_DECL) - { - if (!processing_template_decl) - error ("`%T' is not a namespace", namespace); - return; - } namespace = ORIGINAL_NAMESPACE (namespace); if (!toplevel_bindings_p ()) push_using_directive (namespace); else --- 3352,3366 ---- void do_using_directive (tree namespace) { + if (namespace == error_mark_node) + return; + + my_friendly_assert (TREE_CODE (namespace) == NAMESPACE_DECL, 20050830); + if (building_stmt_tree ()) add_stmt (build_stmt (USING_STMT, namespace)); namespace = ORIGINAL_NAMESPACE (namespace); + if (!toplevel_bindings_p ()) push_using_directive (namespace); else diff -Nrcpad gcc-3.4.4/gcc/cp/name-lookup.h gcc-3.4.5/gcc/cp/name-lookup.h *** gcc-3.4.4/gcc/cp/name-lookup.h 2004-03-01 06:21:39.000000000 +0000 --- gcc-3.4.5/gcc/cp/name-lookup.h 2005-09-21 15:08:00.000000000 +0000 *************** extern tree lookup_namespace_name (tree, *** 287,292 **** --- 287,293 ---- extern tree lookup_qualified_name (tree, tree, bool, bool); extern tree lookup_name_nonclass (tree); extern tree lookup_function_nonclass (tree, tree); + extern void push_local_binding (tree, tree, int); extern int push_class_binding (tree, tree); extern bool pushdecl_class_level (tree); extern tree pushdecl_namespace_level (tree); diff -Nrcpad gcc-3.4.4/gcc/cp/parser.c gcc-3.4.5/gcc/cp/parser.c *** gcc-3.4.4/gcc/cp/parser.c 2005-04-04 23:43:47.000000000 +0000 --- gcc-3.4.5/gcc/cp/parser.c 2005-11-16 13:03:13.000000000 +0000 *************** static bool cp_parser_declares_only_clas *** 1672,1677 **** --- 1672,1679 ---- (cp_parser *); static bool cp_parser_friend_p (tree); + static bool cp_parser_typedef_p + (tree); static cp_token *cp_parser_require (cp_parser *, enum cpp_ttype, const char *); static cp_token *cp_parser_require_keyword *************** static bool cp_parser_simulate_error *** 1717,1723 **** static void cp_parser_check_type_definition (cp_parser *); static void cp_parser_check_for_definition_in_return_type ! (tree, int); static void cp_parser_check_for_invalid_template_id (cp_parser *, tree); static bool cp_parser_non_integral_constant_expression --- 1719,1725 ---- static void cp_parser_check_type_definition (cp_parser *); static void cp_parser_check_for_definition_in_return_type ! (tree, tree); static void cp_parser_check_for_invalid_template_id (cp_parser *, tree); static bool cp_parser_non_integral_constant_expression *************** cp_parser_check_type_definition (cp_pars *** 1849,1862 **** error ("%s", parser->type_definition_forbidden_message); } ! /* This function is called when a declaration is parsed. If ! DECLARATOR is a function declarator and DECLARES_CLASS_OR_ENUM ! indicates that a type was defined in the decl-specifiers for DECL, ! then an error is issued. */ static void ! cp_parser_check_for_definition_in_return_type (tree declarator, ! int declares_class_or_enum) { /* [dcl.fct] forbids type definitions in return types. Unfortunately, it's not easy to know whether or not we are --- 1851,1863 ---- error ("%s", parser->type_definition_forbidden_message); } ! /* This function is called when the DECLARATOR is processed. The TYPE ! was a type defined in the decl-specifiers. If it is invalid to ! define a type in the decl-specifiers for DECLARATOR, an error is ! issued. */ static void ! cp_parser_check_for_definition_in_return_type (tree declarator, tree type) { /* [dcl.fct] forbids type definitions in return types. Unfortunately, it's not easy to know whether or not we are *************** cp_parser_check_for_definition_in_return *** 1866,1874 **** || TREE_CODE (declarator) == ADDR_EXPR)) declarator = TREE_OPERAND (declarator, 0); if (declarator ! && TREE_CODE (declarator) == CALL_EXPR ! && declares_class_or_enum & 2) ! error ("new types may not be defined in a return type"); } /* A type-specifier (TYPE) has been parsed which cannot be followed by --- 1867,1878 ---- || TREE_CODE (declarator) == ADDR_EXPR)) declarator = TREE_OPERAND (declarator, 0); if (declarator ! && TREE_CODE (declarator) == CALL_EXPR) ! { ! error ("new types may not be defined in a return type"); ! inform ("(perhaps a semicolon is missing after the definition of `%T')", ! type); ! } } /* A type-specifier (TYPE) has been parsed which cannot be followed by *************** cp_parser_postfix_expression (cp_parser *** 3548,3599 **** case RID_TYPENAME: { - bool template_p = false; - tree id; tree type; - tree scope; - - /* Consume the `typename' token. */ - cp_lexer_consume_token (parser->lexer); - /* Look for the optional `::' operator. */ - cp_parser_global_scope_opt (parser, - /*current_scope_valid_p=*/false); - /* Look for the nested-name-specifier. In case of error here, - consume the trailing id to avoid subsequent error messages - for usual cases. */ - scope = cp_parser_nested_name_specifier (parser, - /*typename_keyword_p=*/true, - /*check_dependency_p=*/true, - /*type_p=*/true, - /*is_declaration=*/true); - - /* Look for the optional `template' keyword. */ - template_p = cp_parser_optional_template_keyword (parser); - /* We don't know whether we're looking at a template-id or an - identifier. */ - cp_parser_parse_tentatively (parser); - /* Try a template-id. */ - id = cp_parser_template_id (parser, template_p, - /*check_dependency_p=*/true, - /*is_declaration=*/true); - /* If that didn't work, try an identifier. */ - if (!cp_parser_parse_definitely (parser)) - id = cp_parser_identifier (parser); - - /* Don't process id if nested name specifier is invalid. */ - if (scope == error_mark_node) - return error_mark_node; - /* If we look up a template-id in a non-dependent qualifying - scope, there's no need to create a dependent type. */ - else if (TREE_CODE (id) == TYPE_DECL - && !dependent_type_p (parser->scope)) - type = TREE_TYPE (id); - /* Create a TYPENAME_TYPE to represent the type to which the - functional cast is being performed. */ - else - type = make_typename_type (parser->scope, id, - /*complain=*/1); postfix_expression = cp_parser_functional_cast (parser, type); } break; --- 3552,3564 ---- case RID_TYPENAME: { tree type; + /* The syntax permitted here is the same permitted for an + elaborated-type-specifier. */ + type = cp_parser_elaborated_type_specifier (parser, + /*is_friend=*/false, + /*is_declaration=*/false); postfix_expression = cp_parser_functional_cast (parser, type); } break; *************** cp_parser_postfix_expression (cp_parser *** 3964,3983 **** if (parser->scope) idk = CP_ID_KIND_QUALIFIED; ! if (name != error_mark_node ! && !BASELINK_P (name) ! && parser->scope) { ! name = build_nt (SCOPE_REF, parser->scope, name); ! parser->scope = NULL_TREE; ! parser->qualifying_scope = NULL_TREE; ! parser->object_scope = NULL_TREE; } - if (scope && name && BASELINK_P (name)) - adjust_result_of_qualified_name_lookup - (name, BINFO_TYPE (BASELINK_BINFO (name)), scope); - postfix_expression - = finish_class_member_access_expr (postfix_expression, name); } /* We no longer need to look up names in the scope of the --- 3929,3957 ---- if (parser->scope) idk = CP_ID_KIND_QUALIFIED; ! /* If the name is a template-id that names a type, we will ! get a TYPE_DECL here. That is invalid code. */ ! if (TREE_CODE (name) == TYPE_DECL) { ! error ("invalid use of `%D'", name); ! postfix_expression = error_mark_node; ! } ! else ! { ! if (name != error_mark_node && !BASELINK_P (name) ! && parser->scope) ! { ! name = build_nt (SCOPE_REF, parser->scope, name); ! parser->scope = NULL_TREE; ! parser->qualifying_scope = NULL_TREE; ! parser->object_scope = NULL_TREE; ! } ! if (scope && name && BASELINK_P (name)) ! adjust_result_of_qualified_name_lookup ! (name, BINFO_TYPE (BASELINK_BINFO (name)), scope); ! postfix_expression = finish_class_member_access_expr ! (postfix_expression, name); } } /* We no longer need to look up names in the scope of the *************** cp_parser_simple_declaration (cp_parser* *** 6523,6528 **** --- 6497,6509 ---- /* Give up. */ goto done; } + + /* If we have seen at least one decl-specifier, and the next token + is not a parenthesis, then we must be looking at a declaration. + (After "int (" we might be looking at a functional cast.) */ + if (decl_specifiers + && cp_lexer_next_token_is_not (parser->lexer, CPP_OPEN_PAREN)) + cp_parser_commit_to_tentative_parse (parser); /* Keep going until we hit the `;' at the end of the simple declaration. */ *************** cp_parser_simple_declaration (cp_parser* *** 6576,6582 **** /* Anything else is an error. */ else { ! cp_parser_error (parser, "expected `,' or `;'"); /* Skip tokens until we reach the end of the statement. */ cp_parser_skip_to_end_of_statement (parser); /* If the next token is now a `;', consume it. */ --- 6557,6568 ---- /* Anything else is an error. */ else { ! /* If we have already issued an error message we don't need ! to issue another one. */ ! if (decl != error_mark_node ! || (cp_parser_parsing_tentatively (parser) ! && !cp_parser_committed_to_tentative_parse (parser))) ! cp_parser_error (parser, "expected `,' or `;'"); /* Skip tokens until we reach the end of the statement. */ cp_parser_skip_to_end_of_statement (parser); /* If the next token is now a `;', consume it. */ *************** cp_parser_type_parameter (cp_parser* par *** 7802,7810 **** if (cp_lexer_next_token_is_not (parser->lexer, CPP_EQ) && cp_lexer_next_token_is_not (parser->lexer, CPP_GREATER) && cp_lexer_next_token_is_not (parser->lexer, CPP_COMMA)) ! identifier = cp_parser_identifier (parser); else identifier = NULL_TREE; /* Create the template parameter. */ parameter = finish_template_template_parm (class_type_node, identifier); --- 7788,7802 ---- if (cp_lexer_next_token_is_not (parser->lexer, CPP_EQ) && cp_lexer_next_token_is_not (parser->lexer, CPP_GREATER) && cp_lexer_next_token_is_not (parser->lexer, CPP_COMMA)) ! { ! identifier = cp_parser_identifier (parser); ! /* Treat invalid names as if the parameter were nameless. */ ! if (identifier == error_mark_node) ! identifier = NULL_TREE; ! } else identifier = NULL_TREE; + /* Create the template parameter. */ parameter = finish_template_template_parm (class_type_node, identifier); *************** cp_parser_type_parameter (cp_parser* par *** 7846,7860 **** /* Create the combined representation of the parameter and the default argument. */ ! parameter = build_tree_list (default_argument, parameter); } break; default: ! /* Anything else is an error. */ ! cp_parser_error (parser, ! "expected `class', `typename', or `template'"); ! parameter = error_mark_node; } return parameter; --- 7838,7850 ---- /* Create the combined representation of the parameter and the default argument. */ ! parameter = build_tree_list (default_argument, parameter); } break; default: ! abort (); ! break; } return parameter; *************** cp_parser_explicit_instantiation (cp_par *** 8610,8617 **** /*ctor_dtor_or_conv_p=*/NULL, /*parenthesized_p=*/NULL, /*member_p=*/false); ! cp_parser_check_for_definition_in_return_type (declarator, ! declares_class_or_enum); if (declarator != error_mark_node) { decl = grokdeclarator (declarator, decl_specifiers, --- 8600,8608 ---- /*ctor_dtor_or_conv_p=*/NULL, /*parenthesized_p=*/NULL, /*member_p=*/false); ! if (declares_class_or_enum & 2) ! cp_parser_check_for_definition_in_return_type ! (declarator, TREE_VALUE (decl_specifiers)); if (declarator != error_mark_node) { decl = grokdeclarator (declarator, decl_specifiers, *************** cp_parser_elaborated_type_specifier (cp_ *** 9218,9224 **** } /* For a `typename', we needn't call xref_tag. */ ! if (tag_type == typename_type) return make_typename_type (parser->scope, identifier, /*complain=*/1); /* Look up a qualified name in the usual way. */ --- 9209,9216 ---- } /* For a `typename', we needn't call xref_tag. */ ! if (tag_type == typename_type ! && TREE_CODE (parser->scope) != NAMESPACE_DECL) return make_typename_type (parser->scope, identifier, /*complain=*/1); /* Look up a qualified name in the usual way. */ *************** cp_parser_elaborated_type_specifier (cp_ *** 9262,9268 **** if (TREE_CODE (decl) != TYPE_DECL) { ! error ("expected type-name"); return error_mark_node; } --- 9254,9260 ---- if (TREE_CODE (decl) != TYPE_DECL) { ! cp_parser_diagnose_invalid_type_name (parser); return error_mark_node; } *************** cp_parser_namespace_name (cp_parser* par *** 9514,9519 **** --- 9506,9514 ---- if (namespace_decl == error_mark_node || TREE_CODE (namespace_decl) != NAMESPACE_DECL) { + if (!cp_parser_parsing_tentatively (parser) + || cp_parser_committed_to_tentative_parse (parser)) + error ("`%D' is not a namespace-name", identifier); cp_parser_error (parser, "expected namespace-name"); namespace_decl = error_mark_node; } *************** cp_parser_init_declarator (cp_parser* pa *** 9982,9989 **** if (declarator == error_mark_node) return error_mark_node; ! cp_parser_check_for_definition_in_return_type (declarator, ! declares_class_or_enum); /* Figure out what scope the entity declared by the DECLARATOR is located in. `grokdeclarator' sometimes changes the scope, so --- 9977,9985 ---- if (declarator == error_mark_node) return error_mark_node; ! if (declares_class_or_enum & 2) ! cp_parser_check_for_definition_in_return_type ! (declarator, TREE_VALUE (decl_specifiers)); /* Figure out what scope the entity declared by the DECLARATOR is located in. `grokdeclarator' sometimes changes the scope, so *************** cp_parser_init_declarator (cp_parser* pa *** 10069,10075 **** && token->type != CPP_COMMA && token->type != CPP_SEMICOLON) { ! cp_parser_error (parser, "expected init-declarator"); return error_mark_node; } --- 10065,10071 ---- && token->type != CPP_COMMA && token->type != CPP_SEMICOLON) { ! cp_parser_error (parser, "expected initializer"); return error_mark_node; } *************** cp_parser_member_declaration (cp_parser* *** 12483,12490 **** /* Check for a template-declaration. */ if (cp_lexer_next_token_is_keyword (parser->lexer, RID_TEMPLATE)) { ! /* Parse the template-declaration. */ ! cp_parser_template_declaration (parser, /*member_p=*/true); return; } --- 12479,12491 ---- /* Check for a template-declaration. */ if (cp_lexer_next_token_is_keyword (parser->lexer, RID_TEMPLATE)) { ! /* An explicit specialization here is an error condition, and we ! expect the specialization handler to detect and report this. */ ! if (cp_lexer_peek_nth_token (parser->lexer, 2)->type == CPP_LESS ! && cp_lexer_peek_nth_token (parser->lexer, 3)->type == CPP_GREATER) ! cp_parser_explicit_specialization (parser); ! else ! cp_parser_template_declaration (parser, /*member_p=*/true); return; } *************** cp_parser_member_declaration (cp_parser* *** 12685,12692 **** return; } ! cp_parser_check_for_definition_in_return_type ! (declarator, declares_class_or_enum); /* Look for an asm-specification. */ asm_specification = cp_parser_asm_specification_opt (parser); --- 12686,12694 ---- return; } ! if (declares_class_or_enum & 2) ! cp_parser_check_for_definition_in_return_type ! (declarator, TREE_VALUE (decl_specifiers)); /* Look for an asm-specification. */ asm_specification = cp_parser_asm_specification_opt (parser); *************** cp_parser_label_declaration (cp_parser* *** 13639,13645 **** /* Look for an identifier. */ identifier = cp_parser_identifier (parser); ! /* Declare it as a lobel. */ finish_label_decl (identifier); /* If the next token is a `;', stop. */ if (cp_lexer_next_token_is (parser->lexer, CPP_SEMICOLON)) --- 13641,13650 ---- /* Look for an identifier. */ identifier = cp_parser_identifier (parser); ! /* If we failed, stop. */ ! if (identifier == error_mark_node) ! break; ! /* Declare it as a label. */ finish_label_decl (identifier); /* If the next token is a `;', stop. */ if (cp_lexer_next_token_is (parser->lexer, CPP_SEMICOLON)) *************** cp_parser_lookup_name (cp_parser *parser *** 13689,13694 **** --- 13694,13700 ---- bool is_type, bool is_template, bool is_namespace, bool check_dependency) { + int flags = 0; tree decl; tree object_type = parser->context->object_type; *************** cp_parser_lookup_name (cp_parser *parser *** 13700,13705 **** --- 13706,13715 ---- if (name == error_mark_node) return error_mark_node; + if (!cp_parser_parsing_tentatively (parser) + || cp_parser_committed_to_tentative_parse (parser)) + flags |= LOOKUP_COMPLAIN; + /* A template-id has already been resolved; there is no lookup to do. */ if (TREE_CODE (name) == TEMPLATE_ID_EXPR) *************** cp_parser_lookup_name (cp_parser *parser *** 13813,13820 **** /*protect=*/0, is_type); /* Look it up in the enclosing context, too. */ decl = lookup_name_real (name, is_type, /*nonclass=*/0, ! is_namespace, ! /*flags=*/0); parser->object_scope = object_type; parser->qualifying_scope = NULL_TREE; if (object_decl) --- 13823,13829 ---- /*protect=*/0, is_type); /* Look it up in the enclosing context, too. */ decl = lookup_name_real (name, is_type, /*nonclass=*/0, ! is_namespace, flags); parser->object_scope = object_type; parser->qualifying_scope = NULL_TREE; if (object_decl) *************** cp_parser_lookup_name (cp_parser *parser *** 13823,13830 **** else { decl = lookup_name_real (name, is_type, /*nonclass=*/0, ! is_namespace, ! /*flags=*/0); parser->qualifying_scope = NULL_TREE; parser->object_scope = NULL_TREE; } --- 13832,13838 ---- else { decl = lookup_name_real (name, is_type, /*nonclass=*/0, ! is_namespace, flags); parser->qualifying_scope = NULL_TREE; parser->object_scope = NULL_TREE; } *************** cp_parser_single_declaration (cp_parser* *** 14508,14513 **** --- 14516,14527 ---- tree attributes; bool function_definition_p = false; + /* This function is only used when processing a template + declaration. */ + if (innermost_scope_kind () != sk_template_parms + && innermost_scope_kind () != sk_template_spec) + abort (); + /* Defer access checks until we know what is being declared. */ push_deferring_access_checks (dk_deferred); *************** cp_parser_single_declaration (cp_parser* *** 14520,14525 **** --- 14534,14547 ---- &declares_class_or_enum); if (friend_p) *friend_p = cp_parser_friend_p (decl_specifiers); + + /* There are no template typedefs. */ + if (cp_parser_typedef_p (decl_specifiers)) + { + error ("template declaration of `typedef'"); + decl = error_mark_node; + } + /* Gather up the access checks that occurred the decl-specifier-seq. */ stop_deferring_access_checks (); *************** cp_parser_single_declaration (cp_parser* *** 14536,14543 **** decl = error_mark_node; } } - else - decl = NULL_TREE; /* If it's not a template class, try for a template function. If the next token is a `;', then this declaration does not declare anything. But, if there were errors in the decl-specifiers, then --- 14558,14563 ---- *************** cp_parser_single_declaration (cp_parser* *** 14563,14569 **** parser->object_scope = NULL_TREE; /* Look for a trailing `;' after the declaration. */ if (!function_definition_p ! && !cp_parser_require (parser, CPP_SEMICOLON, "`;'")) cp_parser_skip_to_end_of_block_or_statement (parser); return decl; --- 14583,14590 ---- parser->object_scope = NULL_TREE; /* Look for a trailing `;' after the declaration. */ if (!function_definition_p ! && (decl == error_mark_node ! || !cp_parser_require (parser, CPP_SEMICOLON, "`;'"))) cp_parser_skip_to_end_of_block_or_statement (parser); return decl; *************** cp_parser_functional_cast (cp_parser* pa *** 14593,14600 **** cast = build_functional_cast (type, expression_list); /* [expr.const]/1: In an integral constant expression "only type conversions to integral or enumeration type can be used". */ ! if (cast != error_mark_node && !type_dependent_expression_p (type) ! && !INTEGRAL_OR_ENUMERATION_TYPE_P (TREE_TYPE (type))) { if (cp_parser_non_integral_constant_expression (parser, "a call to a constructor")) --- 14614,14623 ---- cast = build_functional_cast (type, expression_list); /* [expr.const]/1: In an integral constant expression "only type conversions to integral or enumeration type can be used". */ ! if (TREE_CODE (type) == TYPE_DECL) ! type = TREE_TYPE (type); ! if (cast != error_mark_node && !dependent_type_p (type) ! && !INTEGRAL_OR_ENUMERATION_TYPE_P (type)) { if (cp_parser_non_integral_constant_expression (parser, "a call to a constructor")) *************** cp_parser_enclosed_template_argument_lis *** 14716,14723 **** cp_lexer_consume_token (parser->lexer); } } ! else if (!cp_parser_require (parser, CPP_GREATER, "`>'")) ! error ("missing `>' to terminate the template argument list"); /* The `>' token might be a greater-than operator again now. */ parser->greater_than_is_operator_p = saved_greater_than_is_operator_p; --- 14739,14746 ---- cp_lexer_consume_token (parser->lexer); } } ! else ! cp_parser_skip_until_found (parser, CPP_GREATER, "`>'"); /* The `>' token might be a greater-than operator again now. */ parser->greater_than_is_operator_p = saved_greater_than_is_operator_p; *************** cp_parser_late_parsing_for_member (cp_pa *** 14768,14776 **** tokens = DECL_PENDING_INLINE_INFO (member_function); DECL_PENDING_INLINE_INFO (member_function) = NULL; DECL_PENDING_INLINE_P (member_function) = 0; ! /* If this was an inline function in a local class, enter the scope ! of the containing function. */ ! function_scope = decl_function_context (member_function); if (function_scope) push_function_context_to (function_scope); --- 14791,14800 ---- tokens = DECL_PENDING_INLINE_INFO (member_function); DECL_PENDING_INLINE_INFO (member_function) = NULL; DECL_PENDING_INLINE_P (member_function) = 0; ! ! /* If this is a local class, enter the scope of the containing ! function. */ ! function_scope = current_function_decl; if (function_scope) push_function_context_to (function_scope); *************** cp_parser_late_parsing_default_args (cp_ *** 14851,14883 **** parameters; parameters = TREE_CHAIN (parameters)) { ! if (!TREE_PURPOSE (parameters) ! || TREE_CODE (TREE_PURPOSE (parameters)) != DEFAULT_ARG) continue; ! /* Save away the current lexer. */ saved_lexer = parser->lexer; ! /* Create a new one, using the tokens we have saved. */ ! tokens = DEFARG_TOKENS (TREE_PURPOSE (parameters)); parser->lexer = cp_lexer_new_from_tokens (tokens); ! /* Set the current source position to be the location of the ! first token in the default argument. */ cp_lexer_peek_token (parser->lexer); ! /* Local variable names (and the `this' keyword) may not appear ! in a default argument. */ saved_local_variables_forbidden_p = parser->local_variables_forbidden_p; parser->local_variables_forbidden_p = true; ! /* Parse the assignment-expression. */ if (DECL_FRIEND_CONTEXT (fn)) push_nested_class (DECL_FRIEND_CONTEXT (fn)); else if (DECL_CLASS_SCOPE_P (fn)) push_nested_class (DECL_CONTEXT (fn)); ! TREE_PURPOSE (parameters) = cp_parser_assignment_expression (parser); if (DECL_FRIEND_CONTEXT (fn) || DECL_CLASS_SCOPE_P (fn)) pop_nested_class (); ! /* If the token stream has not been completely used up, then there was extra junk after the end of the default argument. */ --- 14875,14923 ---- parameters; parameters = TREE_CHAIN (parameters)) { ! tree default_arg = TREE_PURPOSE (parameters); ! tree parsed_arg; ! ! if (!default_arg) ! continue; ! ! if (TREE_CODE (default_arg) != DEFAULT_ARG) ! /* This can happen for a friend declaration for a function ! already declared with default arguments. */ continue; ! /* Save away the current lexer. */ saved_lexer = parser->lexer; ! /* Create a new one, using the tokens we have saved. */ ! tokens = DEFARG_TOKENS (default_arg); parser->lexer = cp_lexer_new_from_tokens (tokens); ! /* Set the current source position to be the location of the ! first token in the default argument. */ cp_lexer_peek_token (parser->lexer); ! /* Local variable names (and the `this' keyword) may not appear ! in a default argument. */ saved_local_variables_forbidden_p = parser->local_variables_forbidden_p; parser->local_variables_forbidden_p = true; ! ! /* Parse the assignment-expression. */ if (DECL_FRIEND_CONTEXT (fn)) push_nested_class (DECL_FRIEND_CONTEXT (fn)); else if (DECL_CLASS_SCOPE_P (fn)) push_nested_class (DECL_CONTEXT (fn)); ! parsed_arg = cp_parser_assignment_expression (parser); if (DECL_FRIEND_CONTEXT (fn) || DECL_CLASS_SCOPE_P (fn)) pop_nested_class (); ! ! TREE_PURPOSE (parameters) = parsed_arg; ! ! /* Update any instantiations we've already created. */ ! for (default_arg = TREE_CHAIN (default_arg); ! default_arg; ! default_arg = TREE_CHAIN (default_arg)) ! TREE_PURPOSE (TREE_PURPOSE (default_arg)) = parsed_arg; ! /* If the token stream has not been completely used up, then there was extra junk after the end of the default argument. */ *************** cp_parser_friend_p (tree decl_specifiers *** 15012,15017 **** --- 15052,15078 ---- return false; } + /* DECL_SPECIFIERS is the representation of a decl-specifier-seq. + Returns TRUE iff `typedef' appears among the DECL_SPECIFIERS. */ + + static bool + cp_parser_typedef_p (tree decl_specifiers) + { + while (decl_specifiers) + { + /* See if this decl-specifier is `typedef'. */ + if (TREE_CODE (TREE_VALUE (decl_specifiers)) == IDENTIFIER_NODE + && C_RID_CODE (TREE_VALUE (decl_specifiers)) == RID_TYPEDEF) + return true; + + /* Go on to the next decl-specifier. */ + decl_specifiers = TREE_CHAIN (decl_specifiers); + } + + return false; + } + + /* If the next token is of the indicated TYPE, consume it. Otherwise, issue an error message indicating that TOKEN_DESC was expected. diff -Nrcpad gcc-3.4.4/gcc/cp/pt.c gcc-3.4.5/gcc/cp/pt.c *** gcc-3.4.4/gcc/cp/pt.c 2005-03-06 16:59:08.000000000 +0000 --- gcc-3.4.5/gcc/cp/pt.c 2005-11-16 13:03:13.000000000 +0000 *************** check_explicit_specialization (tree decl *** 1779,1784 **** --- 1779,1789 ---- /* Find the namespace binding, using the declaration context. */ fns = namespace_binding (dname, CP_DECL_CONTEXT (decl)); + if (!fns || !is_overloaded_fn (fns)) + { + error ("`%D' is not a template function", dname); + fns = error_mark_node; + } } declarator = lookup_template_function (fns, NULL_TREE); *************** push_template_decl_real (tree decl, int *** 2973,2978 **** --- 2978,2984 ---- error ("got %d template parameters for `%#T'", TREE_VEC_LENGTH (a), current); error (" but %d required", TREE_VEC_LENGTH (t)); + return error_mark_node; } /* Perhaps we should also check that the parms are used in the *************** redeclare_class_template (tree type, tre *** 3074,3083 **** if (TREE_VEC_LENGTH (parms) != TREE_VEC_LENGTH (tmpl_parms)) { cp_error_at ("previous declaration `%D'", tmpl); ! error ("used %d template parameter%s instead of %d", ! TREE_VEC_LENGTH (tmpl_parms), ! TREE_VEC_LENGTH (tmpl_parms) == 1 ? "" : "s", ! TREE_VEC_LENGTH (parms)); return; } --- 3080,3088 ---- if (TREE_VEC_LENGTH (parms) != TREE_VEC_LENGTH (tmpl_parms)) { cp_error_at ("previous declaration `%D'", tmpl); ! error ("used %d template parameter(s) instead of %d", ! TREE_VEC_LENGTH (tmpl_parms), ! TREE_VEC_LENGTH (parms)); return; } *************** lookup_template_function (tree fns, tree *** 4067,4084 **** return error_mark_node; my_friendly_assert (!arglist || TREE_CODE (arglist) == TREE_VEC, 20030726); ! if (fns == NULL_TREE ! || TREE_CODE (fns) == FUNCTION_DECL) ! { ! error ("non-template used as template"); ! return error_mark_node; ! } ! ! my_friendly_assert (TREE_CODE (fns) == TEMPLATE_DECL ! || TREE_CODE (fns) == OVERLOAD ! || BASELINK_P (fns) ! || TREE_CODE (fns) == IDENTIFIER_NODE, ! 20020730); if (BASELINK_P (fns)) { --- 4072,4080 ---- return error_mark_node; my_friendly_assert (!arglist || TREE_CODE (arglist) == TREE_VEC, 20030726); ! my_friendly_assert (fns && (is_overloaded_fn (fns) ! || TREE_CODE (fns) == IDENTIFIER_NODE), ! 20050608); if (BASELINK_P (fns)) { *************** uses_template_parms (tree t) *** 4809,4819 **** --- 4805,4818 ---- else if (TREE_CODE (t) == TREE_LIST) dependent_p = (uses_template_parms (TREE_VALUE (t)) || uses_template_parms (TREE_CHAIN (t))); + else if (TREE_CODE (t) == TYPE_DECL) + dependent_p = dependent_type_p (TREE_TYPE (t)); else if (DECL_P (t) || EXPR_P (t) || TREE_CODE (t) == TEMPLATE_PARM_INDEX || TREE_CODE (t) == OVERLOAD || TREE_CODE (t) == BASELINK + || TREE_CODE (t) == IDENTIFIER_NODE || TREE_CODE_CLASS (TREE_CODE (t)) == 'c') dependent_p = (type_dependent_expression_p (t) || value_dependent_expression_p (t)); *************** tsubst_decl (tree t, tree args, tree typ *** 6292,6299 **** clone_function_decl (r, /*update_method_vec_p=*/0); } else if (IDENTIFIER_OPNAME_P (DECL_NAME (r))) ! grok_op_properties (r, DECL_FRIEND_P (r), ! (complain & tf_error) != 0); if (DECL_FRIEND_P (t) && DECL_FRIEND_CONTEXT (t)) SET_DECL_FRIEND_CONTEXT (r, --- 6291,6297 ---- clone_function_decl (r, /*update_method_vec_p=*/0); } else if (IDENTIFIER_OPNAME_P (DECL_NAME (r))) ! grok_op_properties (r, (complain & tf_error) != 0); if (DECL_FRIEND_P (t) && DECL_FRIEND_CONTEXT (t)) SET_DECL_FRIEND_CONTEXT (r, *************** tsubst_arg_types (tree arg_types, *** 6486,6491 **** --- 6484,6491 ---- { tree remaining_arg_types; tree type; + tree default_arg; + tree result = NULL_TREE; if (!arg_types || arg_types == void_list_node) return arg_types; *************** tsubst_arg_types (tree arg_types, *** 6513,6524 **** top-level qualifiers as required. */ type = TYPE_MAIN_VARIANT (type_decays_to (type)); ! /* Note that we do not substitute into default arguments here. The ! standard mandates that they be instantiated only when needed, ! which is done in build_over_call. */ ! return hash_tree_cons (TREE_PURPOSE (arg_types), type, ! remaining_arg_types); ! } /* Substitute into a FUNCTION_TYPE or METHOD_TYPE. This routine does --- 6513,6537 ---- top-level qualifiers as required. */ type = TYPE_MAIN_VARIANT (type_decays_to (type)); ! /* We do not substitute into default arguments here. The standard ! mandates that they be instantiated only when needed, which is ! done in build_over_call. */ ! default_arg = TREE_PURPOSE (arg_types); ! ! if (default_arg && TREE_CODE (default_arg) == DEFAULT_ARG) ! { ! /* We've instantiated a template before its default arguments ! have been parsed. This can happen for a nested template ! class, and is not an error unless we require the default ! argument in a call of this function. */ ! result = tree_cons (default_arg, type, remaining_arg_types); ! TREE_CHAIN (default_arg) = tree_cons (result, NULL_TREE, ! TREE_CHAIN (default_arg)); ! } ! else ! result = hash_tree_cons (default_arg, type, remaining_arg_types); ! ! return result; } /* Substitute into a FUNCTION_TYPE or METHOD_TYPE. This routine does *************** tsubst (tree t, tree args, tsubst_flags_ *** 6711,6718 **** /* The array dimension behaves like a non-type template arg, in that we want to fold it as much as possible. */ max = tsubst_template_arg (omax, args, complain, in_decl); ! if (!processing_template_decl) ! max = decl_constant_value (max); if (integer_zerop (omax)) { --- 6724,6730 ---- /* The array dimension behaves like a non-type template arg, in that we want to fold it as much as possible. */ max = tsubst_template_arg (omax, args, complain, in_decl); ! max = fold_non_dependent_expr (max); if (integer_zerop (omax)) { *************** type_unification_real (tree tparms, *** 9158,9174 **** else type = arg; ! if (strict == DEDUCE_EXACT || strict == DEDUCE_ORDER) ! { ! if (same_type_p (parm, type)) ! continue; ! } ! else ! /* It might work; we shouldn't check now, because we might ! get into infinite recursion. Overload resolution will ! handle it. */ continue; ! return 1; } --- 9170,9181 ---- else type = arg; ! if (same_type_p (parm, type)) continue; ! if (strict != DEDUCE_EXACT ! && can_convert_arg (parm, type, TYPE_P (arg) ? NULL_TREE : arg)) ! continue; ! return 1; } *************** type_dependent_expression_p (tree expres *** 12024,12030 **** return true; expression = TREE_OPERAND (expression, 0); } ! if (TREE_CODE (expression) == OVERLOAD) { while (expression) { --- 12031,12038 ---- return true; expression = TREE_OPERAND (expression, 0); } ! if (TREE_CODE (expression) == OVERLOAD ! || TREE_CODE (expression) == FUNCTION_DECL) { while (expression) { *************** type_dependent_expression_p (tree expres *** 12037,12042 **** --- 12045,12052 ---- abort (); } + my_friendly_assert (TREE_CODE (expression) != TYPE_DECL, 20051116); + return (dependent_type_p (TREE_TYPE (expression))); } diff -Nrcpad gcc-3.4.4/gcc/cp/semantics.c gcc-3.4.5/gcc/cp/semantics.c *** gcc-3.4.4/gcc/cp/semantics.c 2005-03-21 15:25:39.000000000 +0000 --- gcc-3.4.5/gcc/cp/semantics.c 2005-08-31 08:56:11.000000000 +0000 *************** check_multiple_declarators (void) *** 2295,2301 **** void qualified_name_lookup_error (tree scope, tree name) { ! if (TYPE_P (scope)) { if (!COMPLETE_TYPE_P (scope)) error ("incomplete type `%T' used in nested name specifier", scope); --- 2295,2303 ---- void qualified_name_lookup_error (tree scope, tree name) { ! if (scope == error_mark_node) ! ; /* We already complained. */ ! else if (TYPE_P (scope)) { if (!COMPLETE_TYPE_P (scope)) error ("incomplete type `%T' used in nested name specifier", scope); diff -Nrcpad gcc-3.4.4/gcc/cp/typeck.c gcc-3.4.5/gcc/cp/typeck.c *** gcc-3.4.4/gcc/cp/typeck.c 2005-05-02 18:38:43.000000000 +0000 --- gcc-3.4.5/gcc/cp/typeck.c 2005-10-11 00:39:26.000000000 +0000 *************** require_complete_type (tree value) *** 95,100 **** --- 95,103 ---- else type = TREE_TYPE (value); + if (type == error_mark_node) + return error_mark_node; + /* First, detect a valid value with a complete type. */ if (COMPLETE_TYPE_P (type)) return value; *************** type_after_usual_arithmetic_conversions *** 265,274 **** --- 268,279 ---- /* FIXME: Attributes. */ my_friendly_assert (ARITHMETIC_TYPE_P (t1) || TREE_CODE (t1) == COMPLEX_TYPE + || TREE_CODE (t1) == VECTOR_TYPE || TREE_CODE (t1) == ENUMERAL_TYPE, 19990725); my_friendly_assert (ARITHMETIC_TYPE_P (t2) || TREE_CODE (t2) == COMPLEX_TYPE + || TREE_CODE (t2) == VECTOR_TYPE || TREE_CODE (t2) == ENUMERAL_TYPE, 19990725); *************** type_after_usual_arithmetic_conversions *** 296,301 **** --- 301,316 ---- attributes); } + if (code1 == VECTOR_TYPE) + { + /* When we get here we should have two vectors of the same size. + Just prefer the unsigned one if present. */ + if (TREE_UNSIGNED (t1)) + return build_type_attribute_variant (t1, attributes); + else + return build_type_attribute_variant (t2, attributes); + } + /* If only one is real, use it as the result. */ if (code1 == REAL_TYPE && code2 != REAL_TYPE) return build_type_attribute_variant (t1, attributes); *************** common_type (tree t1, tree t2) *** 745,753 **** code2 = TREE_CODE (t2); if ((ARITHMETIC_TYPE_P (t1) || code1 == ENUMERAL_TYPE ! || code1 == COMPLEX_TYPE) && (ARITHMETIC_TYPE_P (t2) || code2 == ENUMERAL_TYPE ! || code2 == COMPLEX_TYPE)) return type_after_usual_arithmetic_conversions (t1, t2); else if ((TYPE_PTR_P (t1) && TYPE_PTR_P (t2)) --- 760,768 ---- 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)) *************** build_binary_op (enum tree_code code, tr *** 2878,2886 **** case ROUND_DIV_EXPR: case EXACT_DIV_EXPR: if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE ! || code0 == COMPLEX_TYPE) && (code1 == INTEGER_TYPE || code1 == REAL_TYPE ! || code1 == COMPLEX_TYPE)) { if (TREE_CODE (op1) == INTEGER_CST && integer_zerop (op1)) warning ("division by zero in `%E / 0'", op0); --- 2893,2901 ---- case ROUND_DIV_EXPR: case EXACT_DIV_EXPR: if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE ! || code0 == COMPLEX_TYPE || code0 == VECTOR_TYPE) && (code1 == INTEGER_TYPE || code1 == REAL_TYPE ! || code1 == COMPLEX_TYPE || code1 == VECTOR_TYPE)) { if (TREE_CODE (op1) == INTEGER_CST && integer_zerop (op1)) warning ("division by zero in `%E / 0'", op0); *************** build_binary_op (enum tree_code code, tr *** 2907,2913 **** case BIT_AND_EXPR: case BIT_IOR_EXPR: case BIT_XOR_EXPR: ! if (code0 == INTEGER_TYPE && code1 == INTEGER_TYPE) shorten = -1; break; --- 2922,2929 ---- case BIT_AND_EXPR: case BIT_IOR_EXPR: case BIT_XOR_EXPR: ! if ((code0 == INTEGER_TYPE && code1 == INTEGER_TYPE) ! || (code0 == VECTOR_TYPE && code1 == VECTOR_TYPE)) shorten = -1; break; *************** build_binary_op (enum tree_code code, tr *** 3158,3169 **** break; } ! if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE || code0 == COMPLEX_TYPE) ! && ! (code1 == INTEGER_TYPE || code1 == REAL_TYPE || code1 == COMPLEX_TYPE)) { int none_complex = (code0 != COMPLEX_TYPE && code1 != COMPLEX_TYPE); if (shorten || common || short_compare) result_type = common_type (type0, type1); --- 3174,3190 ---- break; } ! if (((code0 == INTEGER_TYPE || code0 == REAL_TYPE || code0 == COMPLEX_TYPE) ! && ! (code1 == INTEGER_TYPE || code1 == REAL_TYPE || code1 == COMPLEX_TYPE)) ! || (code0 == VECTOR_TYPE && code1 == VECTOR_TYPE)) { int none_complex = (code0 != COMPLEX_TYPE && code1 != COMPLEX_TYPE); + if (code0 == VECTOR_TYPE && code1 == VECTOR_TYPE + && !tree_int_cst_equal (TYPE_SIZE (type0), TYPE_SIZE (type1))) + error ("can't convert between vector values of different size"); + if (shorten || common || short_compare) result_type = common_type (type0, type1); *************** build_const_cast (tree type, tree expr) *** 4776,4782 **** { tree intype; ! if (type == error_mark_node || expr == error_mark_node) return error_mark_node; if (processing_template_decl) --- 4797,4803 ---- { tree intype; ! if (type == error_mark_node || error_operand_p (expr)) return error_mark_node; if (processing_template_decl) *************** check_return_expr (tree retval) *** 6066,6071 **** --- 6087,6101 ---- /* Remember that this function did return a value. */ current_function_returns_value = 1; + /* Check for erroneous operands -- but after giving ourselves a + chance to provide an error about returning a value from a void + function. */ + if (error_operand_p (retval)) + { + current_function_return_value = error_mark_node; + return error_mark_node; + } + /* Only operator new(...) throw(), can return NULL [expr.new/13]. */ if ((DECL_OVERLOADED_OPERATOR_P (current_function_decl) == NEW_EXPR || DECL_OVERLOADED_OPERATOR_P (current_function_decl) == VEC_NEW_EXPR) *************** check_return_expr (tree retval) *** 6122,6129 **** /* We don't need to do any conversions when there's nothing being returned. */ ! if (!retval || retval == error_mark_node) ! return retval; /* Do any required conversions. */ if (retval == result || DECL_CONSTRUCTOR_P (current_function_decl)) --- 6152,6159 ---- /* We don't need to do any conversions when there's nothing being returned. */ ! if (!retval) ! return NULL_TREE; /* Do any required conversions. */ if (retval == result || DECL_CONSTRUCTOR_P (current_function_decl)) *************** casts_away_constness_r (tree *t1, tree * *** 6314,6324 **** and pointers to members (conv.qual), the "member" aspect of a pointer to member level is ignored when determining if a const cv-qualifier has been cast away. */ - if (TYPE_PTRMEM_P (*t1)) - *t1 = build_pointer_type (TYPE_PTRMEM_POINTED_TO_TYPE (*t1)); - if (TYPE_PTRMEM_P (*t2)) - *t2 = build_pointer_type (TYPE_PTRMEM_POINTED_TO_TYPE (*t2)); - /* [expr.const.cast] For two pointer types: --- 6344,6349 ---- *************** casts_away_constness_r (tree *t1, tree * *** 6336,6344 **** to Tcv2,(M-K+1) * cv2,(M-K+2) * ... cv2,M *. */ ! ! if (TREE_CODE (*t1) != POINTER_TYPE ! || TREE_CODE (*t2) != POINTER_TYPE) { *t1 = cp_build_qualified_type (void_type_node, cp_type_quals (*t1)); --- 6361,6368 ---- to Tcv2,(M-K+1) * cv2,(M-K+2) * ... cv2,M *. */ ! if ((!TYPE_PTR_P (*t1) && !TYPE_PTRMEM_P (*t1)) ! || (!TYPE_PTR_P (*t2) && !TYPE_PTRMEM_P (*t2))) { *t1 = cp_build_qualified_type (void_type_node, cp_type_quals (*t1)); *************** casts_away_constness_r (tree *t1, tree * *** 6349,6356 **** quals1 = cp_type_quals (*t1); quals2 = cp_type_quals (*t2); ! *t1 = TREE_TYPE (*t1); ! *t2 = TREE_TYPE (*t2); casts_away_constness_r (t1, t2); *t1 = build_pointer_type (*t1); *t2 = build_pointer_type (*t2); --- 6373,6388 ---- quals1 = cp_type_quals (*t1); quals2 = cp_type_quals (*t2); ! ! if (TYPE_PTRMEM_P (*t1)) ! *t1 = TYPE_PTRMEM_POINTED_TO_TYPE (*t1); ! else ! *t1 = TREE_TYPE (*t1); ! if (TYPE_PTRMEM_P (*t2)) ! *t2 = TYPE_PTRMEM_POINTED_TO_TYPE (*t2); ! else ! *t2 = TREE_TYPE (*t2); ! casts_away_constness_r (t1, t2); *t1 = build_pointer_type (*t1); *t2 = build_pointer_type (*t2); diff -Nrcpad gcc-3.4.4/libstdc++-v3/ChangeLog gcc-3.4.5/libstdc++-v3/ChangeLog *** gcc-3.4.4/libstdc++-v3/ChangeLog 2005-05-19 07:51:32.000000000 +0000 --- gcc-3.4.5/libstdc++-v3/ChangeLog 2005-12-01 02:39:31.000000000 +0000 *************** *** 1,3 **** --- 1,47 ---- + 2005-11-30 Release Manager + + * GCC 3.4.5 released. + + 2005-09-10 Joseph S. Myers + + * testsuite/26_numerics/c99_classification_macros_c.cc: + XFAIL on *-*-linux*, not *-*-linux-gnu. + + 2005-09-01 Benjamin Kosnik + + * include/c_std/std_cmath.h: Declare C99 functions and helper + functions as inline. + + 2005-08-29 Paolo Carlini + + PR libstdc++/23528 + Port from HEAD/4_0-branch: + 2004-07-28 Matt Austern + * include/ext/hashtable.h: Use rebind so that allocator_type + has correct type for a container's allocator. + * testsuite/ext/23528.cc: New. + + 2005-08-24 Lawrence Lim + Jakub Jelinek + Benjamin Kosnik + + PR libstdc++/23550 + * testsuite/21_strings/char_traits/requirements/char/1.cc + (test01): Simplify counting. + * testsuite/21_strings/char_traits/requirements/wchar_t/1.cc + (test02): Same. + + 2005-07-18 Paolo Carlini + Nathan Myers + + PR libstdc++/21286 + * include/bits/fstream.tcc (basic_filebuf<>::xsgetn): + Loop on short reads. + + 2005-05-27 Mark Mitchell + + * testsuite/Makefile.in: Regenerate with Automake 1.7.8. + 2005-05-19 Release Manager * GCC 3.4.4 released. diff -Nrcpad gcc-3.4.4/libstdc++-v3/include/bits/c++config gcc-3.4.5/libstdc++-v3/include/bits/c++config *** gcc-3.4.4/libstdc++-v3/include/bits/c++config 2005-05-19 00:16:19.000000000 +0000 --- gcc-3.4.5/libstdc++-v3/include/bits/c++config 2005-12-01 00:16:22.000000000 +0000 *************** *** 35,41 **** #include // The current version of the C++ library in compressed ISO date format. ! #define __GLIBCXX__ 20050519 // Allow use of "export template." This is currently not a feature // that g++ supports. --- 35,41 ---- #include // The current version of the C++ library in compressed ISO date format. ! #define __GLIBCXX__ 20051201 // Allow use of "export template." This is currently not a feature // that g++ supports. diff -Nrcpad gcc-3.4.4/libstdc++-v3/include/bits/fstream.tcc gcc-3.4.5/libstdc++-v3/include/bits/fstream.tcc *** gcc-3.4.4/libstdc++-v3/include/bits/fstream.tcc 2004-11-08 00:41:15.000000000 +0000 --- gcc-3.4.5/libstdc++-v3/include/bits/fstream.tcc 2005-07-18 18:31:59.000000000 +0000 *************** namespace std *** 535,547 **** __n -= __avail; } ! const streamsize __len = _M_file.xsgetn(reinterpret_cast(__s), ! __n); ! if (__len == -1) ! __throw_ios_failure(__N("basic_filebuf::xsgetn " ! "error reading the file")); ! __ret += __len; ! if (__len == __n) { _M_set_buffer(0); _M_reading = true; --- 535,562 ---- __n -= __avail; } ! // Need to loop in case of short reads (relatively common ! // with pipes). ! streamsize __len; ! for (;;) ! { ! __len = _M_file.xsgetn(reinterpret_cast(__s), ! __n); ! if (__len == -1) ! __throw_ios_failure(__N("basic_filebuf::xsgetn " ! "error reading the file")); ! if (__len == 0) ! break; ! ! __n -= __len; ! __ret += __len; ! if (__n == 0) ! break; ! ! __s += __len; ! } ! ! if (__n == 0) { _M_set_buffer(0); _M_reading = true; diff -Nrcpad gcc-3.4.4/libstdc++-v3/include/c_std/std_cmath.h gcc-3.4.5/libstdc++-v3/include/c_std/std_cmath.h *** gcc-3.4.4/libstdc++-v3/include/c_std/std_cmath.h 2003-12-29 19:26:11.000000000 +0000 --- gcc-3.4.5/libstdc++-v3/include/c_std/std_cmath.h 2005-09-01 20:57:23.000000000 +0000 *************** namespace std *** 444,500 **** namespace __gnu_cxx { template ! int __capture_fpclassify(_Tp __f) { return fpclassify(__f); } template ! int __capture_isfinite(_Tp __f) { return isfinite(__f); } template ! int __capture_isinf(_Tp __f) { return isinf(__f); } template ! int __capture_isnan(_Tp __f) { return isnan(__f); } template ! int __capture_isnormal(_Tp __f) { return isnormal(__f); } template ! int __capture_signbit(_Tp __f) { return signbit(__f); } template ! int __capture_isgreater(_Tp __f1, _Tp __f2) { return isgreater(__f1, __f2); } template ! int ! __capture_isgreaterequal(_Tp __f1, _Tp __f2) ! { return isgreaterequal(__f1, __f2); } template ! int ! __capture_isless(_Tp __f1, _Tp __f2) { return isless(__f1, __f2); } template ! int ! __capture_islessequal(_Tp __f1, _Tp __f2) ! { return islessequal(__f1, __f2); } template ! int ! __capture_islessgreater(_Tp __f1, _Tp __f2) ! { return islessgreater(__f1, __f2); } template ! int ! __capture_isunordered(_Tp __f1, _Tp __f2) ! { return isunordered(__f1, __f2); } } // Only undefine the C99 FP macros, if actually captured for namespace movement --- 444,500 ---- namespace __gnu_cxx { template ! inline int __capture_fpclassify(_Tp __f) { return fpclassify(__f); } template ! inline int __capture_isfinite(_Tp __f) { return isfinite(__f); } template ! inline int __capture_isinf(_Tp __f) { return isinf(__f); } template ! inline int __capture_isnan(_Tp __f) { return isnan(__f); } template ! inline int __capture_isnormal(_Tp __f) { return isnormal(__f); } template ! inline int __capture_signbit(_Tp __f) { return signbit(__f); } template ! inline int __capture_isgreater(_Tp __f1, _Tp __f2) { return isgreater(__f1, __f2); } template ! inline int ! __capture_isgreaterequal(_Tp __f1, _Tp __f2) ! { return isgreaterequal(__f1, __f2); } template ! inline int ! __capture_isless(_Tp __f1, _Tp __f2) { return isless(__f1, __f2); } template ! inline int ! __capture_islessequal(_Tp __f1, _Tp __f2) ! { return islessequal(__f1, __f2); } template ! inline int ! __capture_islessgreater(_Tp __f1, _Tp __f2) ! { return islessgreater(__f1, __f2); } template ! inline int ! __capture_isunordered(_Tp __f1, _Tp __f2) ! { return isunordered(__f1, __f2); } } // Only undefine the C99 FP macros, if actually captured for namespace movement *************** namespace __gnu_cxx *** 518,571 **** namespace __gnu_cxx { template ! int fpclassify(_Tp __f) { return __capture_fpclassify(__f); } template ! int isfinite(_Tp __f) { return __capture_isfinite(__f); } template ! int isinf(_Tp __f) { return __capture_isinf(__f); } template ! int isnan(_Tp __f) { return __capture_isnan(__f); } template ! int isnormal(_Tp __f) { return __capture_isnormal(__f); } template ! int signbit(_Tp __f) { return __capture_signbit(__f); } template ! int isgreater(_Tp __f1, _Tp __f2) { return __capture_isgreater(__f1, __f2); } template ! int isgreaterequal(_Tp __f1, _Tp __f2) { return __capture_isgreaterequal(__f1, __f2); } template ! int isless(_Tp __f1, _Tp __f2) { return __capture_isless(__f1, __f2); } template ! int islessequal(_Tp __f1, _Tp __f2) { return __capture_islessequal(__f1, __f2); } template ! int islessgreater(_Tp __f1, _Tp __f2) { return __capture_islessgreater(__f1, __f2); } template ! int isunordered(_Tp __f1, _Tp __f2) { return __capture_isunordered(__f1, __f2); } } --- 518,571 ---- namespace __gnu_cxx { template ! inline int fpclassify(_Tp __f) { return __capture_fpclassify(__f); } template ! inline int isfinite(_Tp __f) { return __capture_isfinite(__f); } template ! inline int isinf(_Tp __f) { return __capture_isinf(__f); } template ! inline int isnan(_Tp __f) { return __capture_isnan(__f); } template ! inline int isnormal(_Tp __f) { return __capture_isnormal(__f); } template ! inline int signbit(_Tp __f) { return __capture_signbit(__f); } template ! inline int isgreater(_Tp __f1, _Tp __f2) { return __capture_isgreater(__f1, __f2); } template ! inline int isgreaterequal(_Tp __f1, _Tp __f2) { return __capture_isgreaterequal(__f1, __f2); } template ! inline int isless(_Tp __f1, _Tp __f2) { return __capture_isless(__f1, __f2); } template ! inline int islessequal(_Tp __f1, _Tp __f2) { return __capture_islessequal(__f1, __f2); } template ! inline int islessgreater(_Tp __f1, _Tp __f2) { return __capture_islessgreater(__f1, __f2); } template ! inline int isunordered(_Tp __f1, _Tp __f2) { return __capture_isunordered(__f1, __f2); } } diff -Nrcpad gcc-3.4.4/libstdc++-v3/include/ext/hashtable.h gcc-3.4.5/libstdc++-v3/include/ext/hashtable.h *** gcc-3.4.4/libstdc++-v3/include/ext/hashtable.h 2004-03-18 17:37:05.000000000 +0000 --- gcc-3.4.5/libstdc++-v3/include/ext/hashtable.h 2005-08-29 22:08:50.000000000 +0000 *************** *** 1,6 **** // Hashtable implementation used by containers -*- C++ -*- ! // Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the --- 1,6 ---- // Hashtable implementation used by containers -*- C++ -*- ! // Copyright (C) 2001, 2002, 2003, 2004, 2005 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 *************** private: *** 241,247 **** typedef _Hashtable_node<_Val> _Node; public: ! typedef _Alloc allocator_type; allocator_type get_allocator() const { return _M_node_allocator; } private: typedef typename _Alloc::template rebind<_Node>::other _Node_Alloc; --- 241,247 ---- typedef _Hashtable_node<_Val> _Node; public: ! typedef typename _Alloc::template rebind::other allocator_type; allocator_type get_allocator() const { return _M_node_allocator; } private: typedef typename _Alloc::template rebind<_Node>::other _Node_Alloc; diff -Nrcpad gcc-3.4.4/libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/1.cc gcc-3.4.5/libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/1.cc *** gcc-3.4.4/libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/1.cc 2004-04-30 04:20:25.000000000 +0000 --- gcc-3.4.5/libstdc++-v3/testsuite/21_strings/char_traits/requirements/char/1.cc 2005-08-24 20:31:01.000000000 +0000 *************** *** 1,6 **** // 1999-06-03 bkoz ! // Copyright (C) 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the --- 1,7 ---- // 1999-06-03 bkoz ! // Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005 ! // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the *************** void test01(void) *** 32,43 **** // 21.1.1 character traits requirements // Key for decoding what function signatures really mean: ! // X == char_traits<_CharT> // [c,d] == _CharT // [p,q] == const _CharT* ! // s == _CharT* // [n,i,j] == size_t ! // f == X::int_type // pos == X::pos_type // state == X::state_type --- 33,44 ---- // 21.1.1 character traits requirements // Key for decoding what function signatures really mean: ! // X == char_traits<_CharT> // [c,d] == _CharT // [p,q] == const _CharT* ! // s == _CharT* // [n,i,j] == size_t ! // f == X::int_type // pos == X::pos_type // state == X::state_type *************** void test01(void) *** 54,62 **** // correctly even where p is in [s, s + n), and yields s. char array1[] = {'z', 'u', 'm', 'a', ' ', 'b', 'e', 'a', 'c', 'h', 0}; const char str_lit1[] = "montara and ocean beach"; ! int len = sizeof(str_lit1) + sizeof(array1) - 1; // two terminating chars ! char array2[len]; ! std::char_traits::copy(array2, "boracay, philippines", len); VERIFY( str_lit1[0] == 'm' ); c1 = array2[0]; --- 55,65 ---- // correctly even where p is in [s, s + n), and yields s. char array1[] = {'z', 'u', 'm', 'a', ' ', 'b', 'e', 'a', 'c', 'h', 0}; const char str_lit1[] = "montara and ocean beach"; ! const char str_lit2[] = "boracay, philippines"; ! const int len1 = sizeof(str_lit1)/sizeof(char); ! const int len2 = sizeof(str_lit2)/sizeof(char); ! char array2[len1 + len2 - 1]; // two terminating chars ! std::char_traits::copy(array2, str_lit2, len2); VERIFY( str_lit1[0] == 'm' ); c1 = array2[0]; diff -Nrcpad gcc-3.4.4/libstdc++-v3/testsuite/21_strings/char_traits/requirements/wchar_t/1.cc gcc-3.4.5/libstdc++-v3/testsuite/21_strings/char_traits/requirements/wchar_t/1.cc *** gcc-3.4.4/libstdc++-v3/testsuite/21_strings/char_traits/requirements/wchar_t/1.cc 2004-04-30 04:20:26.000000000 +0000 --- gcc-3.4.5/libstdc++-v3/testsuite/21_strings/char_traits/requirements/wchar_t/1.cc 2005-08-24 20:31:01.000000000 +0000 *************** *** 1,6 **** // 1999-06-03 bkoz ! // Copyright (C) 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the --- 1,7 ---- // 1999-06-03 bkoz ! // Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005 ! // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the *************** void test02(void) *** 54,62 **** // correctly even where p is in [s, s + n), and yields s. wchar_t array1[] = {L'z', L'u', L'm', L'a', L' ', L'b', L'e', L'a', L'c', L'h', 0}; const wchar_t str_lit1[] = L"montara and ocean beach"; ! int len = sizeof(str_lit1) + sizeof(array1) - 1; // two terminating chars ! wchar_t array2[len]; ! std::char_traits::copy(array2, L"boracay, philippines", len); VERIFY( str_lit1[0] == 'm' ); c1 = array2[0]; --- 55,65 ---- // correctly even where p is in [s, s + n), and yields s. wchar_t array1[] = {L'z', L'u', L'm', L'a', L' ', L'b', L'e', L'a', L'c', L'h', 0}; const wchar_t str_lit1[] = L"montara and ocean beach"; ! const wchar_t str_lit2[] = L"boracay, philippines"; ! const int len1 = sizeof(str_lit1)/sizeof(wchar_t); ! const int len2 = sizeof(str_lit2)/sizeof(wchar_t); ! wchar_t array2[len1 + len2 - 1]; // two terminating chars ! std::char_traits::copy(array2, str_lit2, len2); VERIFY( str_lit1[0] == 'm' ); c1 = array2[0]; diff -Nrcpad gcc-3.4.4/libstdc++-v3/testsuite/26_numerics/c99_classification_macros_c.cc gcc-3.4.5/libstdc++-v3/testsuite/26_numerics/c99_classification_macros_c.cc *** gcc-3.4.4/libstdc++-v3/testsuite/26_numerics/c99_classification_macros_c.cc 2003-04-15 00:03:47.000000000 +0000 --- gcc-3.4.5/libstdc++-v3/testsuite/26_numerics/c99_classification_macros_c.cc 2005-09-10 16:47:56.000000000 +0000 *************** *** 27,34 **** // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. ! // { dg-do compile { xfail *-*-linux-gnu *-*-freebsd5* } } ! // { dg-excess-errors "" { target *-*-linux-gnu *-*-freebsd5* } } #include --- 27,34 ---- // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. ! // { dg-do compile { xfail *-*-linux* *-*-freebsd5* } } ! // { dg-excess-errors "" { target *-*-linux* *-*-freebsd5* } } #include diff -Nrcpad gcc-3.4.4/libstdc++-v3/testsuite/ext/23528.cc gcc-3.4.5/libstdc++-v3/testsuite/ext/23528.cc *** gcc-3.4.4/libstdc++-v3/testsuite/ext/23528.cc 1970-01-01 00:00:00.000000000 +0000 --- gcc-3.4.5/libstdc++-v3/testsuite/ext/23528.cc 2005-08-29 22:08:50.000000000 +0000 *************** *** 0 **** --- 1,43 ---- + // Copyright (C) 2005 Free Software Foundation, Inc. + // + // This file is part of the GNU ISO C++ Library. This library is free + // software; you can redistribute it and/or modify it under the + // terms of the GNU General Public License as published by the + // Free Software Foundation; either version 2, or (at your option) + // any later version. + // + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free + // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + // USA. + + // { dg-do compile } + + #include + + // libstdc++/23528 + void test01() + { + __gnu_cxx::hash_map m; + m[888] = 999; + + __gnu_cxx::hash_map::allocator_type a = m.get_allocator(); + + __gnu_cxx::hash_map::value_type *y = a.allocate(1); + + a.construct(y, *m.begin()); + + a.destroy(y); + a.deallocate(y, 1); + } + + int main() + { + test01(); + return 0; + } diff -Nrcpad gcc-3.4.4/libstdc++-v3/testsuite/Makefile.in gcc-3.4.5/libstdc++-v3/testsuite/Makefile.in *** gcc-3.4.4/libstdc++-v3/testsuite/Makefile.in 2005-05-15 12:01:07.000000000 +0000 --- gcc-3.4.5/libstdc++-v3/testsuite/Makefile.in 2005-05-27 22:41:56.000000000 +0000 *************** *** 1,8 **** ! # Makefile.in generated by automake 1.9.2 from Makefile.am. # @configure_input@ ! # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, ! # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. --- 1,8 ---- ! # Makefile.in generated by automake 1.7.8 from Makefile.am. # @configure_input@ ! # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 ! # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. *************** *** 14,21 **** @SET_MAKE@ - SOURCES = $(libv3test_a_SOURCES) - srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ --- 14,19 ---- *************** pkgdatadir = $(datadir)/@PACKAGE@ *** 23,28 **** --- 21,27 ---- pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. + am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 *************** POST_UNINSTALL = : *** 39,82 **** build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ - DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/fragment.am - subdir = testsuite - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/linkage.m4 \ - $(top_srcdir)/../config/no-executables.m4 \ - $(top_srcdir)/../libtool.m4 $(top_srcdir)/crossconfig.m4 \ - $(top_srcdir)/configure.ac - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = - LIBRARIES = $(noinst_LIBRARIES) - ARFLAGS = cru - libv3test_a_AR = $(AR) $(ARFLAGS) - libv3test_a_LIBADD = - am_libv3test_a_OBJECTS = testsuite_abi.$(OBJEXT) \ - testsuite_allocator.$(OBJEXT) testsuite_hooks.$(OBJEXT) - libv3test_a_OBJECTS = $(am_libv3test_a_OBJECTS) - DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) - depcomp = - am__depfiles_maybe = - CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) - LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) - CXXLD = $(CXX) - SOURCES = $(libv3test_a_SOURCES) - DIST_SOURCES = $(libv3test_a_SOURCES) - ETAGS = etags - CTAGS = ctags - DEJATOOL = $(PACKAGE) - RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir - EXPECT = expect - RUNTEST = runtest - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCATOR_H = @ALLOCATOR_H@ ALLOCATOR_NAME = @ALLOCATOR_NAME@ --- 38,43 ---- *************** ac_ct_CXX = @ac_ct_CXX@ *** 186,193 **** ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__leading_dot = @am__leading_dot@ - am__tar = @am__tar@ - am__untar = @am__untar@ baseline_dir = @baseline_dir@ bindir = @bindir@ build = @build@ --- 147,152 ---- *************** libexecdir = @libexecdir@ *** 224,230 **** libtool_VERSION = @libtool_VERSION@ localstatedir = @localstatedir@ mandir = @mandir@ - mkdir_p = @mkdir_p@ multi_basedir = @multi_basedir@ oldincludedir = @oldincludedir@ port_specific_symbol_files = @port_specific_symbol_files@ --- 183,188 ---- *************** target_cpu = @target_cpu@ *** 239,249 **** --- 197,211 ---- target_os = @target_os@ target_vendor = @target_vendor@ toplevel_srcdir = @toplevel_srcdir@ + AUTOMAKE_OPTIONS = dejagnu + MAINT_CHARSET = latin1 + mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs PWD_COMMAND = $${PWDCMD-pwd} STAMP = echo timestamp > + toolexecdir = $(glibcxx_toolexecdir) toolexeclibdir = $(glibcxx_toolexeclibdir) *************** WARN_CXXFLAGS = \ *** 258,274 **** --- 220,241 ---- # -I/-D flags to pass when compiling. AM_CPPFLAGS = $(GLIBCXX_INCLUDES) + AM_MAKEFLAGS = -j1 AM_RUNTESTFLAGS = + testsuite_flags_script = ${glibcxx_builddir}/scripts/testsuite_flags AM_CXXFLAGS = $(shell ${testsuite_flags_script} --cxxflags) + GLIBGCC_DIR = `$(CC) -print-libgcc-file-name | sed 's,/[^/]*$$,,'` GLIBCXX_DIR = ${glibcxx_builddir}/src/.libs + CXXLINK = \ $(LIBTOOL) --tag=CXX --mode=link $(CXX) \ -R $(GLIBGCC_DIR) -R $(GLIBCXX_DIR) \ $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -lv3test -L. -o $@ + noinst_LIBRARIES = libv3test.a libv3test_a_SOURCES = \ testsuite_abi.cc \ *************** lists_of_files = \ *** 283,288 **** --- 250,256 ---- testsuite_files_interactive \ testsuite_files_performance + baseline_file = ${baseline_dir}/baseline_symbols.txt extract_symvers = $(glibcxx_srcdir)/scripts/extract_symvers *************** performance_script = ${glibcxx_srcdir}/s *** 303,341 **** CLEANFILES = *.txt *.tst *.exe core* filebuf_* tmp* ostream_* *.log *.sum \ testsuite_* site.exp abi_check baseline_symbols all: all-am .SUFFIXES: .SUFFIXES: .cc .lo .o .obj ! $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/fragment.am $(am__configure_deps) ! @for dep in $?; do \ ! case '$(am__configure_deps)' in \ ! *$$dep*) \ ! cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ ! && exit 0; \ ! exit 1;; \ ! esac; \ ! done; \ ! echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign --ignore-deps testsuite/Makefile'; \ cd $(top_srcdir) && \ ! $(AUTOMAKE) --foreign --ignore-deps testsuite/Makefile ! .PRECIOUS: Makefile ! Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status ! @case '$?' in \ ! *config.status*) \ ! cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ ! *) \ ! echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ ! cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ ! esac; ! ! $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) ! cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ! ! $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ! cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ! $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) ! cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) --- 271,311 ---- CLEANFILES = *.txt *.tst *.exe core* filebuf_* tmp* ostream_* *.log *.sum \ testsuite_* site.exp abi_check baseline_symbols + subdir = testsuite + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + CONFIG_HEADER = $(top_builddir)/config.h + CONFIG_CLEAN_FILES = + LIBRARIES = $(noinst_LIBRARIES) + + libv3test_a_AR = $(AR) cru + libv3test_a_LIBADD = + am_libv3test_a_OBJECTS = testsuite_abi.$(OBJEXT) \ + testsuite_allocator.$(OBJEXT) testsuite_hooks.$(OBJEXT) + libv3test_a_OBJECTS = $(am_libv3test_a_OBJECTS) + + DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) + depcomp = + am__depfiles_maybe = + CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) + LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) + CXXLD = $(CXX) + DIST_SOURCES = $(libv3test_a_SOURCES) + DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/fragment.am \ + Makefile.am + SOURCES = $(libv3test_a_SOURCES) + all: all-am .SUFFIXES: .SUFFIXES: .cc .lo .o .obj ! $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/fragment.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) cd $(top_srcdir) && \ ! $(AUTOMAKE) --foreign testsuite/Makefile ! Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status ! cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) *************** libv3test.a: $(libv3test_a_OBJECTS) $(li *** 345,363 **** $(RANLIB) libv3test.a mostlyclean-compile: ! -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c .cc.o: ! $(CXXCOMPILE) -c -o $@ $< .cc.obj: ! $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: ! $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo --- 315,333 ---- $(RANLIB) libv3test.a mostlyclean-compile: ! -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c .cc.o: ! $(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< .cc.obj: ! $(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` .cc.lo: ! $(LTCXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< mostlyclean-libtool: -rm -f *.lo *************** distclean-libtool: *** 369,374 **** --- 339,352 ---- -rm -f libtool uninstall-info-am: + ETAGS = etags + ETAGSFLAGS = + + CTAGS = ctags + CTAGSFLAGS = + + tags: TAGS + ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ *************** ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS *** 377,383 **** $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique - tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) --- 355,360 ---- *************** TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEP *** 389,399 **** done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ ! if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ ! test -n "$$unique" || unique=$$empty_fix; \ ! $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ ! $$tags $$unique; \ ! fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) --- 366,375 ---- done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ ! test -z "$(ETAGS_ARGS)$$tags$$unique" \ ! || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ ! $$tags $$unique ! ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) *************** GTAGS: *** 416,421 **** --- 392,402 ---- distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + RUNTESTFLAGS = + DEJATOOL = $(PACKAGE) + RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir + EXPECT = expect + RUNTEST = runtest check-DEJAGNU: site.exp srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \ *************** distclean-DEJAGNU: *** 433,441 **** -l='$(DEJATOOL)'; for tool in $$l; do \ rm -f $$tool.sum $$tool.log; \ done distdir: $(DISTFILES) ! $(mkdir_p) $(distdir)/.. @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ --- 414,426 ---- -l='$(DEJATOOL)'; for tool in $$l; do \ rm -f $$tool.sum $$tool.log; \ done + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + + top_distdir = .. + distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) ! $(mkinstalldirs) $(distdir)/.. @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ *************** distdir: $(DISTFILES) *** 447,453 **** dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ ! $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ --- 432,438 ---- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ ! $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ *************** check-am: all-am *** 466,471 **** --- 451,457 ---- $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU check: check-am all-am: Makefile $(LIBRARIES) all-local + installdirs: install: install-am install-exec: install-exec-am *************** install-am: all-am *** 478,484 **** installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ! install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: --- 464,470 ---- installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ! INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: *************** clean-generic: *** 487,493 **** -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: ! -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" --- 473,479 ---- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: ! -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" *************** dvi: dvi-am *** 506,513 **** dvi-am: - html: html-am - info: info-am info-am: --- 492,497 ---- *************** uninstall-am: uninstall-info-am *** 543,557 **** .PHONY: CTAGS GTAGS all all-am all-local check check-DEJAGNU check-am \ clean clean-generic clean-libtool clean-noinstLIBRARIES ctags \ ! distclean distclean-DEJAGNU distclean-compile \ ! distclean-generic distclean-libtool distclean-tags distdir dvi \ ! dvi-am html html-am info info-am install install-am \ ! install-data install-data-am install-exec install-exec-am \ ! install-info install-info-am install-man install-strip \ ! installcheck installcheck-am installdirs maintainer-clean \ ! maintainer-clean-generic mostlyclean mostlyclean-compile \ ! mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ ! tags uninstall uninstall-am uninstall-info-am all-local: stamp_wchar testsuite_files --- 527,541 ---- .PHONY: CTAGS GTAGS all all-am all-local check check-DEJAGNU check-am \ clean clean-generic clean-libtool clean-noinstLIBRARIES ctags \ ! distclean distclean-DEJAGNU distclean-compile distclean-generic \ ! distclean-libtool distclean-tags distdir dvi dvi-am info \ ! info-am install install-am install-data install-data-am \ ! install-exec install-exec-am install-info install-info-am \ ! install-man install-strip installcheck installcheck-am \ ! installdirs maintainer-clean maintainer-clean-generic \ ! mostlyclean mostlyclean-compile mostlyclean-generic \ ! mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ ! uninstall-am uninstall-info-am all-local: stamp_wchar testsuite_files