From: Gerald Baumgartner Date: Mon, 19 Jun 1995 16:53:29 +0000 (-0400) Subject: (start_function): If current_class_decl is a signature pointer... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=806d4aa935b18432014325483daf7f99df3bec40;p=platform%2Fupstream%2Fgcc.git (start_function): If current_class_decl is a signature pointer... (start_function): If current_class_decl is a signature pointer, don't dereference it but set C_C_D to current_class_decl. From-SVN: r9999 --- diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 1cb9a4e..4dfff7e 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -11206,16 +11206,24 @@ start_function (declspecs, declarator, raises, pre_parsed_p) we keep the consistency between `current_class_type' and `current_class_decl'. */ tree t = last_function_parms; - int i = suspend_momentary (); my_friendly_assert (t != NULL_TREE && TREE_CODE (t) == PARM_DECL, 162); - /* Fool build_indirect_ref. */ - current_class_decl = NULL_TREE; - C_C_D = build_indirect_ref (t, NULL_PTR); - current_class_decl = t; - resume_momentary (i); + if (TREE_CODE (TREE_TYPE (t)) == POINTER_TYPE) + { + int i = suspend_momentary (); + + /* Fool build_indirect_ref. */ + current_class_decl = NULL_TREE; + C_C_D = build_indirect_ref (t, NULL_PTR); + current_class_decl = t; + resume_momentary (i); + } + else + /* We're having a signature pointer here. */ + C_C_D = current_class_decl = t; + } } else