diff options
Diffstat (limited to 'gcc/objc/objc-parse.y')
-rw-r--r-- | gcc/objc/objc-parse.y | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/objc/objc-parse.y b/gcc/objc/objc-parse.y index 7812b9b2ba3..812f831dcee 100644 --- a/gcc/objc/objc-parse.y +++ b/gcc/objc/objc-parse.y @@ -41,7 +41,8 @@ Boston, MA 02111-1307, USA. */ #include "flags.h" #include "output.h" #include "toplev.h" - +#include "ggc.h" + #ifdef MULTIBYTE_CHARS #include <locale.h> #endif @@ -229,6 +230,16 @@ int objc_public_flag; #define YYPRINT(FILE,YYCHAR,YYLVAL) yyprint(FILE,YYCHAR,YYLVAL) extern void yyprint PROTO ((FILE *, int, YYSTYPE)); + +/* Add GC roots for variables local to this file. */ +void +c_parse_init () +{ + ggc_add_tree_root (&declspec_stack, 1); + ggc_add_tree_root (¤t_declspecs, 1); + ggc_add_tree_root (&prefix_attributes, 1); +} + %} %% |