diff -Nrcpad gcc-3.4.5/gcc/cp/ChangeLog gcc-3.4.6/gcc/cp/ChangeLog *** gcc-3.4.5/gcc/cp/ChangeLog 2005-12-01 02:38:37.000000000 +0000 --- gcc-3.4.6/gcc/cp/ChangeLog 2006-03-06 03:47:33.000000000 +0000 *************** *** 1,3 **** --- 1,127 ---- + 2006-03-05 Release Manager + + * GCC 3.4.6 released. + + 2006-02-23 Volker Reichelt + + PR c++/26291 + * decl.c (grok_op_properties): Check for ellipsis in arguments of + operators. + + 2006-02-08 Volker Reichelt + + PR c++/26070 + * decl.c (grokdeclarator): Clear RID_STATIC together with staticp. + + 2006-02-01 Volker Reichelt + + Backport: + 2005-12-22 Mark Mitchell + + PR c++/25369 + * pt.c (tsubst_copy): Call mark_used on the member referenced by an + OFFSET_REF. + * decl2.c (mark_used): Accept BASELINKs. + + 2006-02-01 Volker Reichelt + + Backport: + 2005-12-19 Mark Mitchell + + PR c++/24915 + * class.c (add_method): Do not treat templates as identical unless + their return types are the same. + + 2006-02-01 Volker Reichelt + + Backport: + 2005-12-19 Mark Mitchell + + PR c++/24278 + * init.c (expand_member_init): Print messages about baseclasses + using %T rather than %D. + + 2006-01-24 Volker Reichelt + + PR c++/16829 + * decl.c (start_preparsed_function): Check default arguments + unconditionally. + * name-lookup.c (pushdecl_maybe_friend): Check default arguments + of all functions and function templates. + * parser.c (cp_parser_late_parsing_default_args): Check default + arguments. + * decl2.c (check_default_args): Set missing default arguments to + error_mark_node. + + 2006-01-19 Volker Reichelt + + PR c++/25854 + * pt.c (maybe_process_partial_specialization): Return early on + error_mark_node. + + 2005-12-19 Volker Reichelt + + PR c++/20552 + Backport: + 2004-03-08 Mark Mitchell + + * decl.c (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS. + + 2005-12-07 Volker Reichelt + + PR c++/19397 + PR c++/19762 + PR c++/19764 + * parser.c (cp_parser_declarator_id): Check for error_mark_node + before building a SCOPE_REF. + + 2005-12-07 Volker Reichelt + + Backport: + 2005-10-20 Mark Mitchell + + PR c++/22618 + * search.c (accessible_p): Check access in the outermost set of + template parameters. + + 2005-12-06 Volker Reichelt + + Backport: + 2005-10-18 Nathan Sidwell + + PR c++/21383 + * name-lookup.c (arg_assoc): Template args can be null in a + template-id-expr. + + 2005-12-05 Volker Reichelt + + Backport: + 2005-10-13 Mark Mitchell + + PR c++/22352 + * pt.c (tsubst_template_parms): Set processing_template_decl while + processing the parameters. + (tsubst_decl): Set processing_template_decl when substituting into + a TEMPLATE_DECL. + + 2005-12-05 Volker Reichelt + + Backport: + 2005-10-13 Mark Mitchell + + PR c++/22464 + * semantics.c (finish_id_expression): Issue errors about uses of + local variables in containing functions even in templates. + + 2005-12-05 Volker Reichelt + + Backport: + 2005-10-13 Mark Mitchell + + PR c++/23307 + * pt.c (push_template_decl_real): Complain about attempts to + declare template variables. + 2005-11-30 Release Manager * GCC 3.4.5 released. diff -Nrcpad gcc-3.4.5/gcc/cp/class.c gcc-3.4.6/gcc/cp/class.c *** gcc-3.4.5/gcc/cp/class.c 2005-11-23 13:53:15.000000000 +0000 --- gcc-3.4.6/gcc/cp/class.c 2006-02-01 11:52:56.000000000 +0000 *************** add_method (tree type, tree method, int *** 879,887 **** fns = OVL_NEXT (fns)) { tree fn = OVL_CURRENT (fns); tree parms1; tree parms2; - bool same = 1; if (TREE_CODE (fn) != TREE_CODE (method)) continue; --- 879,888 ---- fns = OVL_NEXT (fns)) { tree fn = OVL_CURRENT (fns); + tree fn_type; + tree method_type; tree parms1; tree parms2; if (TREE_CODE (fn) != TREE_CODE (method)) continue; *************** add_method (tree type, tree method, int *** 896,903 **** functions in the derived class override and/or hide member functions with the same name and parameter types in a base class (rather than conflicting). */ ! parms1 = TYPE_ARG_TYPES (TREE_TYPE (fn)); ! parms2 = TYPE_ARG_TYPES (TREE_TYPE (method)); /* Compare the quals on the 'this' parm. Don't compare the whole types, as used functions are treated as --- 897,906 ---- functions in the derived class override and/or hide member functions with the same name and parameter types in a base class (rather than conflicting). */ ! fn_type = TREE_TYPE (fn); ! method_type = TREE_TYPE (method); ! parms1 = TYPE_ARG_TYPES (fn_type); ! parms2 = TYPE_ARG_TYPES (method_type); /* Compare the quals on the 'this' parm. Don't compare the whole types, as used functions are treated as *************** add_method (tree type, tree method, int *** 906,928 **** && ! DECL_STATIC_FUNCTION_P (method) && (TYPE_QUALS (TREE_TYPE (TREE_VALUE (parms1))) != TYPE_QUALS (TREE_TYPE (TREE_VALUE (parms2))))) ! same = 0; /* For templates, the template parms must be identical. */ if (TREE_CODE (fn) == TEMPLATE_DECL ! && !comp_template_parms (DECL_TEMPLATE_PARMS (fn), ! DECL_TEMPLATE_PARMS (method))) ! same = 0; if (! DECL_STATIC_FUNCTION_P (fn)) parms1 = TREE_CHAIN (parms1); if (! DECL_STATIC_FUNCTION_P (method)) parms2 = TREE_CHAIN (parms2); ! if (same && compparms (parms1, parms2) && (!DECL_CONV_FN_P (fn) ! || same_type_p (TREE_TYPE (TREE_TYPE (fn)), ! TREE_TYPE (TREE_TYPE (method))))) { if (using && DECL_CONTEXT (fn) == type) /* Defer to the local function. */ --- 909,933 ---- && ! DECL_STATIC_FUNCTION_P (method) && (TYPE_QUALS (TREE_TYPE (TREE_VALUE (parms1))) != TYPE_QUALS (TREE_TYPE (TREE_VALUE (parms2))))) ! continue; /* For templates, the template parms must be identical. */ if (TREE_CODE (fn) == TEMPLATE_DECL ! && (!same_type_p (TREE_TYPE (fn_type), ! TREE_TYPE (method_type)) ! || !comp_template_parms (DECL_TEMPLATE_PARMS (fn), ! DECL_TEMPLATE_PARMS (method)))) ! continue; if (! DECL_STATIC_FUNCTION_P (fn)) parms1 = TREE_CHAIN (parms1); if (! DECL_STATIC_FUNCTION_P (method)) parms2 = TREE_CHAIN (parms2); ! if (compparms (parms1, parms2) && (!DECL_CONV_FN_P (fn) ! || same_type_p (TREE_TYPE (fn_type), ! TREE_TYPE (method_type)))) { if (using && DECL_CONTEXT (fn) == type) /* Defer to the local function. */ diff -Nrcpad gcc-3.4.5/gcc/cp/decl2.c gcc-3.4.6/gcc/cp/decl2.c *** gcc-3.4.5/gcc/cp/decl2.c 2005-09-01 11:47:42.000000000 +0000 --- gcc-3.4.6/gcc/cp/decl2.c 2006-02-01 11:57:42.000000000 +0000 *************** check_default_args (tree x) *** 2959,2965 **** { cp_error_at ("default argument missing for parameter %P of `%+#D'", i, x); ! break; } } } --- 2959,2965 ---- { cp_error_at ("default argument missing for parameter %P of `%+#D'", i, x); ! TREE_PURPOSE (arg) = error_mark_node; } } } *************** check_default_args (tree x) *** 2967,2972 **** --- 2967,2984 ---- void mark_used (tree decl) { + /* If DECL is a BASELINK for a single function, then treat it just + like the DECL for the function. Otherwise, if the BASELINK is + for an overloaded function, we don't know which function was + actually used until after overload resolution. */ + if (TREE_CODE (decl) == BASELINK) + { + decl = BASELINK_FUNCTIONS (decl); + if (really_overloaded_fn (decl)) + return; + decl = OVL_CURRENT (decl); + } + TREE_USED (decl) = 1; if (processing_template_decl || skip_evaluation) return; diff -Nrcpad gcc-3.4.5/gcc/cp/decl.c gcc-3.4.6/gcc/cp/decl.c *** gcc-3.4.5/gcc/cp/decl.c 2005-09-06 15:25:11.000000000 +0000 --- gcc-3.4.6/gcc/cp/decl.c 2006-02-23 11:06:55.000000000 +0000 *************** duplicate_decls (tree newdecl, tree oldd *** 1380,1389 **** else return NULL_TREE; } ! ! /* Already complained about this, so don't do so again. */ ! else if (current_class_type == NULL_TREE ! || IDENTIFIER_ERROR_LOCUS (DECL_ASSEMBLER_NAME (newdecl)) != current_class_type) { error ("conflicting declaration '%#D'", newdecl); cp_error_at ("'%D' has a previous declaration as `%#D'", --- 1380,1386 ---- else return NULL_TREE; } ! else { error ("conflicting declaration '%#D'", newdecl); cp_error_at ("'%D' has a previous declaration as `%#D'", *************** grokdeclarator (tree declarator, *** 7191,7198 **** if (virtualp && staticp == 2) { ! error ("member `%D' cannot be declared both virtual and static", ! dname); staticp = 0; } friendp = RIDBIT_SETP (RID_FRIEND, specbits); --- 7188,7195 ---- if (virtualp && staticp == 2) { ! error ("member `%D' cannot be declared both virtual and static", dname); ! RIDBIT_RESET (RID_STATIC, specbits); staticp = 0; } friendp = RIDBIT_SETP (RID_FRIEND, specbits); *************** grok_op_properties (tree decl, bool comp *** 9016,9032 **** tree name = DECL_NAME (decl); enum tree_code operator_code; int arity; bool ok; tree class_type; /* Assume that the declaration is valid. */ ok = true; ! /* Count the number of arguments. */ for (argtype = argtypes, arity = 0; argtype && argtype != void_list_node; argtype = TREE_CHAIN (argtype)) ++arity; class_type = DECL_CONTEXT (decl); if (class_type && !CLASS_TYPE_P (class_type)) --- 9013,9031 ---- tree name = DECL_NAME (decl); enum tree_code operator_code; int arity; + bool ellipsis_p; bool ok; tree class_type; /* Assume that the declaration is valid. */ ok = true; ! /* Count the number of arguments. and check for ellipsis */ for (argtype = argtypes, arity = 0; argtype && argtype != void_list_node; argtype = TREE_CHAIN (argtype)) ++arity; + ellipsis_p = !argtype; class_type = DECL_CONTEXT (decl); if (class_type && !CLASS_TYPE_P (class_type)) *************** grok_op_properties (tree decl, bool comp *** 9166,9176 **** --- 9165,9178 ---- warning ("conversion to %s%s will never use a type conversion operator", ref ? "a reference to " : "", what); } + if (operator_code == COND_EXPR) { /* 13.4.0.3 */ error ("ISO C++ prohibits overloading operator ?:"); } + else if (ellipsis_p) + error ("`%D' must not have variable number of arguments", decl); else if (ambi_op_p (operator_code)) { if (arity == 1) *************** start_function (tree declspecs, tree dec *** 10333,10338 **** --- 10335,10342 ---- must be complete when you define the function. */ if (! processing_template_decl) check_function_type (decl1, current_function_parms); + /* Make sure no default arg is missing. */ + check_default_args (decl1); /* Build the return declaration for the function. */ restype = TREE_TYPE (fntype); *************** start_function (tree declspecs, tree dec *** 10396,10403 **** /* We need to set the DECL_CONTEXT. */ if (!DECL_CONTEXT (decl1) && DECL_TEMPLATE_INFO (decl1)) DECL_CONTEXT (decl1) = DECL_CONTEXT (DECL_TI_TEMPLATE (decl1)); - /* And make sure we have enough default args. */ - check_default_args (decl1); } fntype = TREE_TYPE (decl1); } --- 10400,10405 ---- diff -Nrcpad gcc-3.4.5/gcc/cp/init.c gcc-3.4.6/gcc/cp/init.c *** gcc-3.4.5/gcc/cp/init.c 2005-10-20 10:10:09.000000000 +0000 --- gcc-3.4.6/gcc/cp/init.c 2006-02-01 11:46:53.000000000 +0000 *************** expand_member_init (tree name) *** 1015,1025 **** if (!direct_binfo && !virtual_binfo) { if (TYPE_USES_VIRTUAL_BASECLASSES (current_class_type)) ! error ("type `%D' is not a direct or virtual base of `%T'", ! name, current_class_type); else ! error ("type `%D' is not a direct base of `%T'", ! name, current_class_type); return NULL_TREE; } --- 1015,1025 ---- if (!direct_binfo && !virtual_binfo) { if (TYPE_USES_VIRTUAL_BASECLASSES (current_class_type)) ! error ("type `%T' is not a direct or virtual base of `%T'", ! basetype, current_class_type); else ! error ("type `%T' is not a direct base of `%T'", ! basetype, current_class_type); return NULL_TREE; } diff -Nrcpad gcc-3.4.5/gcc/cp/name-lookup.c gcc-3.4.6/gcc/cp/name-lookup.c *** gcc-3.4.5/gcc/cp/name-lookup.c 2005-10-11 00:39:26.000000000 +0000 --- gcc-3.4.6/gcc/cp/name-lookup.c 2006-01-24 11:38:06.000000000 +0000 *************** pushdecl (tree x) *** 606,611 **** --- 606,614 ---- { int different_binding_level = 0; + if (TREE_CODE (x) == FUNCTION_DECL || DECL_FUNCTION_TEMPLATE_P (x)) + check_default_args (x); + if (TREE_CODE (name) == TEMPLATE_ID_EXPR) name = TREE_OPERAND (name, 0); *************** pushdecl (tree x) *** 717,724 **** { if (TREE_CODE (t) == TYPE_DECL) SET_IDENTIFIER_TYPE_VALUE (name, TREE_TYPE (t)); - else if (TREE_CODE (t) == FUNCTION_DECL) - check_default_args (t); POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, t); } --- 720,725 ---- *************** pushdecl (tree x) *** 1001,1009 **** } } - if (TREE_CODE (x) == FUNCTION_DECL) - check_default_args (x); - if (TREE_CODE (x) == VAR_DECL) maybe_register_incomplete_var (x); } --- 1002,1007 ---- *************** arg_assoc (struct arg_lookup *k, tree n) *** 4433,4441 **** return true; /* Now the arguments. */ ! for (ix = TREE_VEC_LENGTH (args); ix--;) ! if (arg_assoc_template_arg (k, TREE_VEC_ELT (args, ix)) == 1) ! return true; } else if (TREE_CODE (n) == OVERLOAD) { --- 4431,4440 ---- return true; /* Now the arguments. */ ! if (args) ! for (ix = TREE_VEC_LENGTH (args); ix--;) ! if (arg_assoc_template_arg (k, TREE_VEC_ELT (args, ix)) == 1) ! return true; } else if (TREE_CODE (n) == OVERLOAD) { diff -Nrcpad gcc-3.4.5/gcc/cp/parser.c gcc-3.4.6/gcc/cp/parser.c *** gcc-3.4.5/gcc/cp/parser.c 2005-11-16 13:03:13.000000000 +0000 --- gcc-3.4.6/gcc/cp/parser.c 2006-01-24 11:38:06.000000000 +0000 *************** cp_parser_declarator_id (cp_parser* pars *** 10905,10911 **** /*declarator_p=*/true); /* If the name was qualified, create a SCOPE_REF to represent that. */ ! if (parser->scope) { id_expression = build_nt (SCOPE_REF, parser->scope, id_expression); parser->scope = NULL_TREE; --- 10905,10911 ---- /*declarator_p=*/true); /* If the name was qualified, create a SCOPE_REF to represent that. */ ! if (parser->scope && id_expression != error_mark_node) { id_expression = build_nt (SCOPE_REF, parser->scope, id_expression); parser->scope = NULL_TREE; *************** cp_parser_late_parsing_default_args (cp_ *** 14929,14934 **** --- 14929,14937 ---- parser->local_variables_forbidden_p = saved_local_variables_forbidden_p; } + /* Make sure no default arg is missing. */ + check_default_args (fn); + /* Restore the queue. */ parser->unparsed_functions_queues = TREE_CHAIN (parser->unparsed_functions_queues); diff -Nrcpad gcc-3.4.5/gcc/cp/pt.c gcc-3.4.6/gcc/cp/pt.c *** gcc-3.4.5/gcc/cp/pt.c 2005-11-16 13:03:13.000000000 +0000 --- gcc-3.4.6/gcc/cp/pt.c 2006-02-01 11:57:42.000000000 +0000 *************** check_specialization_namespace (tree tmp *** 744,751 **** void maybe_process_partial_specialization (tree type) { ! /* TYPE maybe an ERROR_MARK_NODE. */ ! tree context = TYPE_P (type) ? TYPE_CONTEXT (type) : NULL_TREE; if (CLASS_TYPE_P (type) && CLASSTYPE_USE_TEMPLATE (type)) { --- 744,755 ---- void maybe_process_partial_specialization (tree type) { ! tree context; ! ! if (type == error_mark_node) ! return; ! ! context = TYPE_CONTEXT (type); if (CLASS_TYPE_P (type) && CLASSTYPE_USE_TEMPLATE (type)) { *************** push_template_decl_real (tree decl, int *** 2837,2845 **** return decl; } } ! else if ((DECL_IMPLICIT_TYPEDEF_P (decl) ! && CLASS_TYPE_P (TREE_TYPE (decl))) ! || (TREE_CODE (decl) == VAR_DECL && ctx && CLASS_TYPE_P (ctx))) /* OK */; else { --- 2841,2848 ---- return decl; } } ! else if (DECL_IMPLICIT_TYPEDEF_P (decl) ! && CLASS_TYPE_P (TREE_TYPE (decl))) /* OK */; else { *************** tsubst_template_parms (tree parms, tree *** 5786,5791 **** --- 5789,5800 ---- tree r = NULL_TREE; tree* new_parms; + /* When substituting into a template, we must set + PROCESSING_TEMPLATE_DECL as the template parameters may be + dependent if they are based on one-another, and the dependency + predicates are short-circuit outside of templates. */ + ++processing_template_decl; + for (new_parms = &r; TMPL_PARMS_DEPTH (parms) > TMPL_ARGS_DEPTH (args); new_parms = &(TREE_CHAIN (*new_parms)), *************** tsubst_template_parms (tree parms, tree *** 5815,5820 **** --- 5824,5831 ---- new_vec, NULL_TREE); } + --processing_template_decl; + return r; } *************** tsubst_decl (tree t, tree args, tree typ *** 6000,6007 **** --- 6011,6024 ---- : DECL_TI_ARGS (DECL_TEMPLATE_RESULT (t)); tree full_args; + /* Because this is a template, the arguments will still be + dependent, even after substitution. If + PROCESSING_TEMPLATE_DECL is not set, the dependency + predicates will short-circuit. */ + ++processing_template_decl; full_args = tsubst_template_args (tmpl_args, args, complain, in_decl); + --processing_template_decl; /* tsubst_template_args doesn't copy the vector if nothing changed. But, *something* should have *************** tsubst_decl (tree t, tree args, tree typ *** 6033,6047 **** break; } - DECL_CONTEXT (r) - = tsubst_aggr_type (DECL_CONTEXT (t), args, - complain, in_decl, - /*entering_scope=*/1); DECL_TEMPLATE_INFO (r) = build_tree_list (t, args); if (TREE_CODE (decl) == TYPE_DECL) { ! tree new_type = tsubst (TREE_TYPE (t), args, complain, in_decl); if (new_type == error_mark_node) return error_mark_node; --- 6050,6063 ---- break; } DECL_TEMPLATE_INFO (r) = build_tree_list (t, args); if (TREE_CODE (decl) == TYPE_DECL) { ! tree new_type; ! ++processing_template_decl; ! new_type = tsubst (TREE_TYPE (t), args, complain, in_decl); ! --processing_template_decl; if (new_type == error_mark_node) return error_mark_node; *************** tsubst_decl (tree t, tree args, tree typ *** 6049,6058 **** CLASSTYPE_TI_TEMPLATE (new_type) = r; DECL_TEMPLATE_RESULT (r) = TYPE_MAIN_DECL (new_type); DECL_TI_ARGS (r) = CLASSTYPE_TI_ARGS (new_type); } else { ! tree new_decl = tsubst (decl, args, complain, in_decl); if (new_decl == error_mark_node) return error_mark_node; --- 6065,6078 ---- CLASSTYPE_TI_TEMPLATE (new_type) = r; DECL_TEMPLATE_RESULT (r) = TYPE_MAIN_DECL (new_type); DECL_TI_ARGS (r) = CLASSTYPE_TI_ARGS (new_type); + DECL_CONTEXT (r) = TYPE_CONTEXT (new_type); } else { ! tree new_decl; ! ++processing_template_decl; ! new_decl = tsubst (decl, args, complain, in_decl); ! --processing_template_decl; if (new_decl == error_mark_node) return error_mark_node; *************** tsubst_decl (tree t, tree args, tree typ *** 6060,6065 **** --- 6080,6086 ---- DECL_TI_TEMPLATE (new_decl) = r; TREE_TYPE (r) = TREE_TYPE (new_decl); DECL_TI_ARGS (r) = DECL_TI_ARGS (new_decl); + DECL_CONTEXT (r) = DECL_CONTEXT (new_decl); } SET_DECL_IMPLICIT_INSTANTIATION (r); *************** tsubst_copy (tree t, tree args, tsubst_f *** 7786,7791 **** --- 7807,7816 ---- in_decl), tsubst (TREE_TYPE (t), args, complain, in_decl)); + case OFFSET_REF: + mark_used (TREE_OPERAND (t, 1)); + return t; + default: return t; } diff -Nrcpad gcc-3.4.5/gcc/cp/search.c gcc-3.4.6/gcc/cp/search.c *** gcc-3.4.5/gcc/cp/search.c 2004-09-27 18:50:24.000000000 +0000 --- gcc-3.4.6/gcc/cp/search.c 2005-12-07 19:32:17.000000000 +0000 *************** accessible_p (tree type, tree decl) *** 946,953 **** /* In a template declaration, we cannot be sure whether the particular specialization that is instantiated will be a friend or not. Therefore, all access checks are deferred until ! instantiation. */ ! if (processing_template_decl) return 1; if (!TYPE_P (type)) --- 946,957 ---- /* In a template declaration, we cannot be sure whether the particular specialization that is instantiated will be a friend or not. Therefore, all access checks are deferred until ! instantiation. However, PROCESSING_TEMPLATE_DECL is set in the ! parameter list for a template (because we may see dependent types ! in default arguments for template parameters), and access ! checking should be performed in the outermost parameter list. */ ! if (processing_template_decl ! && (!processing_template_parmlist || processing_template_decl > 1)) return 1; if (!TYPE_P (type)) diff -Nrcpad gcc-3.4.5/gcc/cp/semantics.c gcc-3.4.6/gcc/cp/semantics.c *** gcc-3.4.5/gcc/cp/semantics.c 2005-08-31 08:56:11.000000000 +0000 --- gcc-3.4.6/gcc/cp/semantics.c 2005-12-05 13:12:29.000000000 +0000 *************** finish_id_expression (tree id_expression *** 2400,2405 **** --- 2400,2420 ---- was entirely defined. */ if (!scope && decl != error_mark_node) maybe_note_name_used_in_class (id_expression, decl); + + /* Disallow uses of local variables from containing functions. */ + if (TREE_CODE (decl) == VAR_DECL || TREE_CODE (decl) == PARM_DECL) + { + tree context = decl_function_context (decl); + if (context != NULL_TREE && context != current_function_decl + && ! TREE_STATIC (decl)) + { + error (TREE_CODE (decl) == VAR_DECL + ? "use of `auto' variable from containing function" + : "use of parameter from containing function"); + cp_error_at (" `%#D' declared here", decl); + return error_mark_node; + } + } } /* If we didn't find anything, or what we found was a type, *************** finish_id_expression (tree id_expression *** 2666,2688 **** } else { - if (TREE_CODE (decl) == VAR_DECL - || TREE_CODE (decl) == PARM_DECL - || TREE_CODE (decl) == RESULT_DECL) - { - tree context = decl_function_context (decl); - - if (context != NULL_TREE && context != current_function_decl - && ! TREE_STATIC (decl)) - { - error ("use of %s from containing function", - (TREE_CODE (decl) == VAR_DECL - ? "`auto' variable" : "parameter")); - cp_error_at (" `%#D' declared here", decl); - return error_mark_node; - } - } - if (DECL_P (decl) && DECL_NONLOCAL (decl) && DECL_CLASS_SCOPE_P (decl) && DECL_CONTEXT (decl) != current_class_type) --- 2681,2686 ---- diff -Nrcpad gcc-3.4.5/libstdc++-v3/ChangeLog gcc-3.4.6/libstdc++-v3/ChangeLog *** gcc-3.4.5/libstdc++-v3/ChangeLog 2005-12-01 02:39:31.000000000 +0000 --- gcc-3.4.6/libstdc++-v3/ChangeLog 2006-03-06 03:48:59.000000000 +0000 *************** *** 1,3 **** --- 1,7 ---- + 2006-03-05 Release Manager + + * GCC 3.4.6 released. + 2005-11-30 Release Manager * GCC 3.4.5 released. diff -Nrcpad gcc-3.4.5/libstdc++-v3/include/bits/c++config gcc-3.4.6/libstdc++-v3/include/bits/c++config *** gcc-3.4.5/libstdc++-v3/include/bits/c++config 2005-12-01 00:16:22.000000000 +0000 --- gcc-3.4.6/libstdc++-v3/include/bits/c++config 2006-03-06 00:17:10.000000000 +0000 *************** *** 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. --- 35,41 ---- #include // The current version of the C++ library in compressed ISO date format. ! #define __GLIBCXX__ 20060306 // Allow use of "export template." This is currently not a feature // that g++ supports.