aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2002-01-02 15:22:52 -0800
committerRichard Henderson <rth@gcc.gnu.org>2002-01-02 15:22:52 -0800
commitd1094b40dd9f323880a6ccd3e30a2f0a0c2a6766 (patch)
treedb3ca2fa95c7536540869976c96bdda3c9255842
parent5e65297bbb0b49c238b9543a6e730ef54c54196d (diff)
downloadgcc-d1094b40dd9f323880a6ccd3e30a2f0a0c2a6766.zip
gcc-d1094b40dd9f323880a6ccd3e30a2f0a0c2a6766.tar.gz
gcc-d1094b40dd9f323880a6ccd3e30a2f0a0c2a6766.tar.bz2
objc-act.c (hack_method_prototype): Clear current_function_decl after abusing it.
* objc/objc-act.c (hack_method_prototype): Clear current_function_decl after abusing it. From-SVN: r48486
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/objc/objc-act.c6
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 64c0b4d..cf89033 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2002-01-02 Richard Henderson <rth@redhat.com>
+
+ * objc/objc-act.c (hack_method_prototype): Clear current_function_decl
+ after abusing it.
+
2002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.c (default_compilers): Const-ify.
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index d7c7e74..9d4469b 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -1,5 +1,5 @@
/* Implement classes and message passing for Objective C.
- Copyright (C) 1992, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001
+ Copyright (C) 1992, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Contributed by Steve Naroff.
@@ -2951,6 +2951,9 @@ hack_method_prototype (nst_methods, tmp_decl)
/* Usually called from store_parm_decls -> init_function_start. */
DECL_ARGUMENTS (tmp_decl) = TREE_PURPOSE (parms);
+
+ if (current_function_decl)
+ abort ();
current_function_decl = tmp_decl;
{
@@ -2974,6 +2977,7 @@ hack_method_prototype (nst_methods, tmp_decl)
/* install return type */
TREE_TYPE (TREE_TYPE (tmp_decl)) = groktypename (TREE_TYPE (nst_methods));
+ current_function_decl = NULL;
}
static void