diff options
author | Gerald Baumgartner <gb@alexander.cs.purdue.edu> | 1995-06-19 12:53:29 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1995-06-19 12:53:29 -0400 |
commit | 806d4aa935b18432014325483daf7f99df3bec40 (patch) | |
tree | 082abcaa5781b9da8037e59c2e7d9af4713d2878 | |
parent | 905ab3ced07eea8d23643bf89ad52bd509011a93 (diff) | |
download | gcc-806d4aa935b18432014325483daf7f99df3bec40.zip gcc-806d4aa935b18432014325483daf7f99df3bec40.tar.gz gcc-806d4aa935b18432014325483daf7f99df3bec40.tar.bz2 |
(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
-rw-r--r-- | gcc/cp/decl.c | 20 |
1 files changed, 14 insertions, 6 deletions
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 |