summaryrefslogtreecommitdiff
path: root/gdb/p-exp.y
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/p-exp.y')
-rw-r--r--gdb/p-exp.y8
1 files changed, 2 insertions, 6 deletions
diff --git a/gdb/p-exp.y b/gdb/p-exp.y
index 81eb2162589..eee4fa94b3a 100644
--- a/gdb/p-exp.y
+++ b/gdb/p-exp.y
@@ -1701,16 +1701,12 @@ yylex (void)
int
pascal_parse (struct parser_state *par_state)
{
- int result;
- struct cleanup *c = make_cleanup_clear_parser_state (&pstate);
-
/* Setting up the parser state. */
+ scoped_restore pstate_restore = make_scoped_restore (&pstate);
gdb_assert (par_state != NULL);
pstate = par_state;
- result = yyparse ();
- do_cleanups (c);
- return result;
+ return yyparse ();
}
void