(init...
(init, compstmt, stmt, all_iter_stmt_with_decl): If the lookahead token is a constant and we need to pop the momentary obstack, don't free it. From-SVN: r7382
This commit is contained in:
parent
d3b35d7584
commit
9d4e73d622
@ -1111,7 +1111,8 @@ init:
|
||||
push_momentary (); }
|
||||
initlist_maybe_comma '}'
|
||||
{ $$ = pop_init_level (0);
|
||||
if ($$ == error_mark_node)
|
||||
if ($$ == error_mark_node
|
||||
&& ! (yychar == STRING || yychar == CONSTANT))
|
||||
pop_momentary ();
|
||||
else
|
||||
pop_momentary_nofree (); }
|
||||
@ -1551,16 +1552,25 @@ compstmt: '{' '}'
|
||||
{ emit_line_note (input_filename, lineno);
|
||||
expand_end_bindings (getdecls (), 1, 0);
|
||||
$$ = poplevel (1, 1, 0);
|
||||
if (yychar == CONSTANT || yychar == STRING)
|
||||
pop_momentary_nofree ();
|
||||
else
|
||||
pop_momentary (); }
|
||||
| '{' pushlevel maybe_label_decls error '}'
|
||||
{ emit_line_note (input_filename, lineno);
|
||||
expand_end_bindings (getdecls (), kept_level_p (), 0);
|
||||
$$ = poplevel (kept_level_p (), 0, 0);
|
||||
if (yychar == CONSTANT || yychar == STRING)
|
||||
pop_momentary_nofree ();
|
||||
else
|
||||
pop_momentary (); }
|
||||
| '{' pushlevel maybe_label_decls stmts '}'
|
||||
{ emit_line_note (input_filename, lineno);
|
||||
expand_end_bindings (getdecls (), kept_level_p (), 0);
|
||||
$$ = poplevel (kept_level_p (), 0, 0);
|
||||
if (yychar == CONSTANT || yychar == STRING)
|
||||
pop_momentary_nofree ();
|
||||
else
|
||||
pop_momentary (); }
|
||||
;
|
||||
|
||||
@ -1746,6 +1756,9 @@ stmt:
|
||||
expand_loop_continue_here ();
|
||||
if ($9)
|
||||
c_expand_expr_stmt ($9);
|
||||
if (yychar == CONSTANT || yychar == STRING)
|
||||
pop_momentary_nofree ();
|
||||
else
|
||||
pop_momentary ();
|
||||
expand_end_loop (); }
|
||||
| SWITCH '(' expr ')'
|
||||
@ -1758,6 +1771,9 @@ stmt:
|
||||
position_after_white_space (); }
|
||||
lineno_labeled_stmt
|
||||
{ expand_end_case ($3);
|
||||
if (yychar == CONSTANT || yychar == STRING)
|
||||
pop_momentary_nofree ();
|
||||
else
|
||||
pop_momentary (); }
|
||||
| BREAK ';'
|
||||
{ stmt_count++;
|
||||
@ -1878,6 +1894,9 @@ all_iter_stmt_with_decl:
|
||||
emit_line_note (input_filename, lineno);
|
||||
expand_end_bindings (getdecls (), 1, 0);
|
||||
$<ttype>$ = poplevel (1, 1, 0);
|
||||
if (yychar == CONSTANT || yychar == STRING)
|
||||
pop_momentary_nofree ();
|
||||
else
|
||||
pop_momentary ();
|
||||
}
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user