From: Zdenek Dvorak Date: Wed, 21 Jan 2004 07:41:49 +0000 (+0100) Subject: * parser.c (cp_parser_class_specifier): Prevent garbage collection. X-Git-Tag: releases/gcc-4.0.0~10879 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4543ee4782fb327781cf1f42f07f60352e9e96c8;p=thirdparty%2Fgcc.git * parser.c (cp_parser_class_specifier): Prevent garbage collection. From-SVN: r76264 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index bfae507284bb..2587cf30b017 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 284afc68c7da..4fde7b64a514 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--; } }