From 3196cc8ec8061861339f1639213c375e095cb206 Mon Sep 17 00:00:00 2001 From: rakdver Date: Wed, 21 Jan 2004 07:41:49 +0000 Subject: [PATCH] * parser.c (cp_parser_class_specifier): Prevent garbage collection. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76264 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 4 ++++ gcc/cp/parser.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index bfae507284b..2587cf30b01 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2004-01-21 Zdenek Dvorak + + * parser.c (cp_parser_class_specifier): Prevent garbage collection. + 2004-01-20 Kelley Cook * Make-lang.in: Replace $(docdir) with doc. diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 284afc68c7d..4fde7b64a51 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -11699,8 +11699,12 @@ cp_parser_class_specifier (cp_parser* parser) /* Figure out which function we need to process. */ fn = TREE_VALUE (queue_entry); + /* A hack to prevent garbage collection. */ + function_depth++; + /* Parse the function. */ cp_parser_late_parsing_for_member (parser, fn); + function_depth--; } } -- 2.11.4.GIT