diff options
author | Richard Stallman <rms@gnu.org> | 1993-10-08 12:20:44 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1993-10-08 12:20:44 +0000 |
commit | ea8daa3ba3b801c45e4386b8b9477d065075c5d7 (patch) | |
tree | fc4fc892f43ff6e9ec33662f6ce8f48d532400a9 | |
parent | 1417141fe54052f8c43f34ec4f6bc01001712639 (diff) | |
download | gcc-ea8daa3ba3b801c45e4386b8b9477d065075c5d7.zip gcc-ea8daa3ba3b801c45e4386b8b9477d065075c5d7.tar.gz gcc-ea8daa3ba3b801c45e4386b8b9477d065075c5d7.tar.bz2 |
(initdcl, notype_initdcl): Call push_momentary and pop_momentary here.
(init): Not here.
From-SVN: r5679
-rw-r--r-- | gcc/c-parse.in | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/gcc/c-parse.in b/gcc/c-parse.in index 04879dc..87b7951 100644 --- a/gcc/c-parse.in +++ b/gcc/c-parse.in @@ -1019,12 +1019,16 @@ maybeasm: initdcl: declarator maybeasm maybe_attribute '=' { $<ttype>$ = start_decl ($1, current_declspecs, 1); - start_init ($<ttype>$, $2, global_bindings_p ()); } + start_init ($<ttype>$, $2, global_bindings_p ()); + /* Note that the call to clear_momentary + is in process_init_element. */ + push_momentary (); } init /* Note how the declaration of the variable is in effect while its init is parsed! */ { finish_init (); decl_attributes ($<ttype>5, $3); - finish_decl ($<ttype>5, $6, $2); } + finish_decl ($<ttype>5, $6, $2); + pop_momentary (); } | declarator maybeasm maybe_attribute { tree d = start_decl ($1, current_declspecs, 0); decl_attributes (d, $3); @@ -1034,12 +1038,17 @@ initdcl: notype_initdcl: notype_declarator maybeasm maybe_attribute '=' { $<ttype>$ = start_decl ($1, current_declspecs, 1); - start_init ($<ttype>$, $2, global_bindings_p ()); } + start_init ($<ttype>$, $2, global_bindings_p ()); + /* Note that the call to clear_momentary + is in process_init_element. */ + push_momentary (); } init /* Note how the declaration of the variable is in effect while its init is parsed! */ { finish_init (); decl_attributes ($<ttype>5, $3); - finish_decl ($<ttype>5, $6, $2); } + finish_decl ($<ttype>5, $6, $2); + pop_momentary (); } + | notype_declarator maybeasm maybe_attribute { tree d = start_decl ($1, current_declspecs, 0); decl_attributes (d, $3); @@ -1113,17 +1122,11 @@ attrib init: expr_no_commas | '{' - { really_start_incremental_init (NULL_TREE); - /* Note that the call to clear_momentary - is in process_init_element. */ - push_momentary (); } + { really_start_incremental_init (NULL_TREE); } initlist_maybe_comma '}' - { $$ = pop_init_level (0); - pop_momentary (); } - + { $$ = pop_init_level (0); } | error - { $$ = error_mark_node; - pop_momentary (); } + { $$ = error_mark_node; } ; /* `initlist_maybe_comma' is the guts of an initializer in braces. */ |