(start_function): If current_class_decl is a signature pointer...
authorGerald Baumgartner <gb@alexander.cs.purdue.edu>
Mon, 19 Jun 1995 16:53:29 +0000 (12:53 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Mon, 19 Jun 1995 16:53:29 +0000 (12:53 -0400)
(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

gcc/cp/decl.c

index 1cb9a4e..4dfff7e 100644 (file)
@@ -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