From: Tom Tromey Date: Sun, 13 Aug 2017 16:40:35 +0000 (-0600) Subject: Remove last cleanups from go-exp.y X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fef704bfec3fdec29b08fca2bd0a5226a04c3113;p=binutils-gdb.git Remove last cleanups from go-exp.y This removes the last remaining cleanups from go-exp.y. 2017-09-05 Tom Tromey * go-exp.y (go_parse): Don't create a cleanup. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c8ba539f053..32c63795597 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2017-09-05 Tom Tromey + + * go-exp.y (go_parse): Don't create a cleanup. + 2017-09-05 Tom Tromey * d-exp.y (PrimaryExpression): Use std::string. diff --git a/gdb/go-exp.y b/gdb/go-exp.y index 098e7340fcd..629093a1187 100644 --- a/gdb/go-exp.y +++ b/gdb/go-exp.y @@ -1560,18 +1560,11 @@ yylex (void) int go_parse (struct parser_state *par_state) { - int result; - struct cleanup *back_to; - /* Setting up the parser state. */ scoped_restore pstate_restore = make_scoped_restore (&pstate); gdb_assert (par_state != NULL); pstate = par_state; - /* Note that parsing (within yyparse) freely installs cleanups - assuming they'll be run here (below). */ - back_to = make_cleanup (null_cleanup, NULL); - scoped_restore restore_yydebug = make_scoped_restore (&yydebug, parser_debug); @@ -1583,9 +1576,7 @@ go_parse (struct parser_state *par_state) popping = 0; name_obstack.clear (); - result = yyparse (); - do_cleanups (back_to); - return result; + return yyparse (); } void